lanpai / isAI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

isAI

Demo

Youtube Video: https://www.youtube.com/watch?v=OUNllPPX8r0

🏆 Awarded Best Use of CockroachDB at HackMIT 2021


Inspiration

One of the biggest challenges in the 21st century is the widespread of misinformation online, especially because of the rapid advancement of Artificial Intelligence, it is getting harder and harder for human eyes to catch the difference between AI-generated, fake media and real media taken or written by humans. The only way to fight against these powerful and advanced machine learning technologies is to utilize machine learning in our favor.


What it does

The chrome extension isAI() is a browser extension that uses machine learning to determine whether or not the media content (currently supports image and text) being viewed was generated by an AI. This user-friendly browser limits the widespread use of AI for nefarious acts not only by helping educate the average layperson about the dangers of AI misuse and its prevalence in the modern internet but also by utilizing ML models and tools created by researchers from top-tier institutes in their daily lives. The extension also keeps track of the websites and data collected by users to warn users as soon as they visit websites that are previously detected to use AI-generated information by other users.


How We built it

Our team used open-source research papers/projects, CNN-generated images are surprisingly easy to spot... for now and CTRL - A Conditional Transformer Language Model for Controllable Generation, to detect the AI-generated data. However, we improved accuracy and performance of the detection by selectively increasing the sample area cropping image on key target areas to limit model’s runtime, which resulted in incredibly higher consistency.

We used HTML5, CSS, JavaScript, Chrome API on the front end, Python, Flask, Pytorch, Torchvision for back end ML implementation, and Node.js, Express.JS, CockroachDB (sponsored by Cockroach Labs) for the database server.


How to run

  • clone the repository
  • open terminal, cd into /backend, and run pip install -r requirements & flask run
  • open second tab on terminal, cd into /server, and run npm install & npm run dev
  • open chrome browser, go to chrome://extensions, click "Load unpacked" button, and load /extensions folder
  • go to CockroachDB, sign up, create a cluster, click "Connect" button, navigate to "Connection parameters", and make .env file in /serverfolder of the project using the parameters information
DATABASE_USER=[username]
DATABASE_HOST=[host]
DATABASE_PORT=26257
DATABASE_NAME=[database]
DATABASE_PASSWORD=[password]
  • finally, browse to any website and check if the media isAI()!
    • For image detection, right click on an image and click checkisAI(imaeg)
    • For text detectio, highlight texts (accuracy increases with the length of the text), right click on the highlighted texts, and click checkisAI(text)

About


Languages

Language:HTML 43.0%Language:JavaScript 41.7%Language:Python 15.3%