This is a Caffe implementation of Not Suitable for Work (NSFW) classification deep neural network. This model is now slightly more accurate than Yahoo's Open NSFW. As a bonus, this model executes ~4x faster. We can run classification with this model at 80msec on the mobile phone. For details, please read our blog.
Evaluate HyperNSFW:
python eval_image.py --proto model/mobilenet_v2_deploy.prototxt --model model/HyperNSFW.caffemodel --image ./test.jpg
Expected Outputs:
0.9302 - 'n16000001 sfw'
0.0698 - 'n16000002 nsfw'
cd Prj-Cpp
Compile detection.cpp with OpenCV 3.4.1 or higher version.
You can also compile ncnn_mobilenet.cpp with ncnn framework.
Then test the code.
Prepare your own data and use related files in the train folder to Finetune on your own data.
HyperNSFW is trained with the following projects, we recommend you to take a look:
- MobileNet-Caffe shicai/MobileNet-Caffe
- 体验 Android APP:https://fir.im/HyperNSFW
- cpp code release.
- Android Projects release.