Courtesy of Yahoo engineering:
https://github.com/yahoo/open_nsfw
Detailed explanation: https://yahooeng.tumblr.com/post/151148689421/open-sourcing-a-deep-learning-solution-for
- Start docker-machine (if Mac)
- docker build -t caffe:cpu https://raw.githubusercontent.com/BVLC/caffe/master/docker/standalone/cpu/Dockerfile
- docker run caffe:cpu caffe --version
- git clone https://github.com/yahoo/open_nsfw.git
- cd open_nsfw
- docker run --volume=$(pwd):/workspace caffe:cpu
- python ./classify_nsfw.py --model_def nsfw_model/deploy.prototxt --pretrained_model nsfw_model/resnet_50_1by2_nsfw.caffemodel test_image.jpg
You will get a result: NSFW score: 0.14057905972
- virtualenv venv
- source venv/bin/activate
- pip install moviepy
- pip install youtube_dl
- pip install shlex
Now we are all set
- youtube-dl --merge-output-format mp4 https://www.youtube.com/watch?v=P8IhIPq42Wg
- See splitandtest.py
- See classify.py
Now automate it and plot and do more