Skip to content

KarimJedda/HackaTUM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Computing FSK using Python and OpenNSFW

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

Installing the stuff we need

  1. Start docker-machine (if Mac)
  2. docker build -t caffe:cpu https://raw.githubusercontent.com/BVLC/caffe/master/docker/standalone/cpu/Dockerfile
  3. docker run caffe:cpu caffe --version
  4. git clone https://github.com/yahoo/open_nsfw.git
  5. cd open_nsfw
  6. docker run --volume=$(pwd):/workspace caffe:cpu
  7. 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

Python Libraries

  1. virtualenv venv
  2. source venv/bin/activate
  3. pip install moviepy
  4. pip install youtube_dl
  5. pip install shlex

Now we are all set

Get a test video using youtube_dl

  1. youtube-dl --merge-output-format mp4 https://www.youtube.com/watch?v=P8IhIPq42Wg

Work on the video and split it into frames

  1. See splitandtest.py

Send every frame into classification

  1. See classify.py

Now automate it and plot and do more

About

Main repository for NSFW stuff

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages