Figure: Sample Object Detection and Censorship using still image from “Before the Devil Knows” movie

Abstract

Unlikely as it seems, the porn industry has always been leading technology. Good internet speed, online payments, and internet streaming are just a few examples of their contribution to innovation. However, with this innovation, porn has intruded into our lives in unwelcome ways. Given this, we want to maintain our safe space online, attempting to answer: “can we create an AI-based classifier that flags pornographic and NSFW images, and can we automate the censorship of these flagged objects?”.

To address this, we created a database of 34,018 images evenly split between pornographic and safe images. Different Machine Learning and Deep Learning Techniques such as Logistic Regression, Random Forest and Pre-Trained Convolutional + Classifier Networks were experimented to find the best model that can detect and censor pornographic images. From our experimentation, we found that the combination of pre-trained Inception ResNet v2 coupled with our trained classifier yielded the best accuracy of 96.2% with a precision of 97.6% and recall of 95.5%. Our network is also real-time ready with a classification time of 0.4 seconds.