Email me at [email protected] if you want the trained model.
An AWS Sagemaker Model developed for Nudity / NSFW Images Classification
This is project done for the fullfillment of Udacity Machine Learning Engineer NanoDegree. I have build a model that classifies input image into five categories.
- Nude
- Semi Nude
- Animated
- Porn
- Safe For Work
The model is deployed on aws check it yourself by downloading this repository , then going to demo folder and running index.html.
- classification_tool.ipynb
- clean and prepare data.ipynb
- nsfw-training_built_in_aws.ipynb
- nsfw_deploy.ipynb
- batch_transform.ipynb
- benchmark.ipynb
- analyze_bench.ipynb
- Metrics.ipynb
- analyze_results.ipynb
- Capstone_Project_Report.pdf
- Project_Proposal.pdf
- results.csv
- results_bench.csv
The following guys had collected the data
- B Praneeth 's Data . He did an awesome job in collection
of data . The data is for three classes
- Nude
- Sexy
- Safe
- But the problem is I need more categories for my problem . So I made a simple tool that is helpful for sub classifying the above Nude Images. You just keep all the training samples in one folder and run and run it in a jupyter notebook. I classified a few thousands of these , but then i realized that it would take a while to gather huge data. For class Safe For Work i sampled randomly from his huge dataset.
- Further More I also made a tool that takes a screenshot of the screen and saves it into a folder. It becomes handy when you want to deliberately put difficult examples in your dataset.
The above tools proved helpful but did not solved the problem of gathering large number of examples for training. Therefore scraping was necessary.
- Bazarov 's Dataset . For collecting set of nude images I included the the sub category in the list he provided namely:
- Female genitalia
- Male genitalia
- Breasts
By now I had enough examples of class nude.
3. Alex's Dataset . For classes animated and porn i scraped the data from here.
- Instagram Scrapper For class Semi Nude I used his tool to scrape few Instagram pages that regularly post arousing images of men and women.