Skip to content

Identifies, if an image is Not Safe For Work (NSFW) and sends an Alert! message to a specified phone number, either by SMS or a short phone call.

Notifications You must be signed in to change notification settings

AtriTripathi/NSFW-Sense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

NSFW-Sense

This program uses Machine Learning Algorithms to identify whether an image is ‘NSFW’ (Not Safe For Work) and returns probability scores on the likelihood that an image contains any kind of nudity. This model is great for anyone trying to automatically moderate or filter offensive content from their platform.

This program can often be used to protect online businesses and communities and specially children from the trust & safety risks associated with user-generated content.

How it works?

It uses an image as its input, to be passed in the sense-url variable. Next, you have to insert correct values in the following functions, refer to the help comments in the actual code:

  • send_sms()

    • request_payload{}
  • make_call()

    • client.calls.create()

Requirements

This program uses Clarifai for making reverse image search for tags, Twilio for sending Alert SMS and making calls, and finally Hasura for storing the NSFW probability scores as parameters in a table (Still in Beta, can be used to store user details to send SMS & make Calls). It is better if you create free accounts at Clarifai, Twilio and Hasura, and setup your PC according to their Docs, API Keys & Configurations. This will ensure that the program runs without any errors. Make sure to change the API Keys and sepcific authentication variables, according to your account credentials in the NSFW-Sense.py program before running it.

Also make sure to pip install the following packages on your CLI in advance:

pip install clarifai

This will install Clarifai API

pip install twilio

This will install Twilio API

curl -L https://hasura.io/install.sh | bash

This will install Hasura CLI module

If something doesn't works, try to sudo install, check their respective docs, or else raise an issue in the issue tracker.

Future Propects

Develop a Chrome Extension to monitor this program.

Don't forget to Star this Repo, make sure to Fork it, tinker with it, raise your Pull Request and finally come up with better versions of this program. :)

About

Identifies, if an image is Not Safe For Work (NSFW) and sends an Alert! message to a specified phone number, either by SMS or a short phone call.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages