Skip to content

Nowadays on social networks where everyone can upload whatever they want without having to count that there might be children watching that or people don't want to watch that. To avoid this we need to come up with a solution that filters based real-time and with high accuracy using chrome extension that filters real-time NSFW (not safe for worki…

Notifications You must be signed in to change notification settings

rushidarge/SaferNet-With-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SaferNet-With-AI

Nowadays on social networks where everyone can upload whatever they want without having to count that there might be children watching that or people don't want to watch that. To avoid this we need to come up with a solution that filters based real-time and with high accuracy using chrome extension that filters real-time NSFW (not safe for working) images and replaces them with SFW (safe for working) images.

The government has definitely taken a step in this direction by blocking some websites, but what about social media sites and other sites? They are openly showing NSFW (not safe for work) content on their sites. We can avoid that content using artificial intelligence.

We can use some advanced computer vision techniques to filter out that content. We cannot access social media servers and block content for everyone, but we can add filters on the user side. To add a filter between a website and a user, we can simply use a browser extension, so we can filter content with very low latency, and it is also easy to deploy by using JavaScript.

You can read blog about this on medium

Flowchart of Chrome Extension

Flowchart

To install extension

  1. Download the SaferNet with AI.zip file to your computer.

  2. Extract file

  3. Go to chrome://extensions/ and check the box for Developer mode in the top right.

  4. Click on Load Unpack.

  5. select the unzipped folder to load your extension.

  6. You will see smiley in extensions.

Note : This version support 0.90 or lower version of chrome

Demo (Working) Before after

Before

before

before

img

Install SaferNet with AI Extension

img

After

after

after

img

Method of implementation

Data

To collect NSFW (Not safe for working) images we need to scrap adult websites, blogs but in India those sites are blocked. To get the dataset, there is same kind of project which segment NSFW images, Nudenets we use this data to train our model.

SFW data means any image it can be tree or building, it can be human or animal, so we need diverse collection of images and also those images are copyright free. For that we use Unsplash which provides free stock images. His lite dataset contains random images of ~25,000 photos. It can be used for both commercial and non-commercial usage.

Model

If we use normal CNN model then the model size will be huge. Even if we train model with 3-5 layers model size gone upto 1 GB. We want to make it lightweight to work smoothly we use MobileNet version 2.

Future Work

  • Change image source using threading
  • Add url change detection
  • Try to batch predict

Bibliography

About

Nowadays on social networks where everyone can upload whatever they want without having to count that there might be children watching that or people don't want to watch that. To avoid this we need to come up with a solution that filters based real-time and with high accuracy using chrome extension that filters real-time NSFW (not safe for worki…

Resources

Stars

Watchers

Forks