This constains a PyTorch model for NSFW images detection. It's based on a ResNet50 neural network trained on ~250k images (~40 gb of data)
The dataset contains images of the following categories:
porn
- pornography imageshentai
- hentai images and pornographic drawingssexy
- sexually explicit images, but not pornographyneutral
- safe for work neutral imagesdrawings
- safe for work drawings and anime
The repository contains a Jupiter notebook with an example code for perfoming simple inference on images to make predictions.
The directory images
constains some sample images for running the example.
Tested on Debian 9
matplotlib
numpy
pillow
pytorch
torchvision
Enter a shell and type the following commands:
$ git clone https://github.com/emiliantolo/pytorch_nsfw_model.git
$ cd pytorch_nsfw_model
$ jupyter notebook Inference_example.ipynb
The output will follow this line: