Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use NSFW to try porn detection in pictures

Shulou Source: shulou.com Published: 2022-05-31 14:20:19 10月01日 Update

This article shows you how to use NSFW to try porn detection, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

NSFW

Before you start, you should first understand "NSFW". "NSFW" means (Not Safe For Work) and is not suitable for the workplace. (well, that is to say, watch when it is not suitable for work. Is a set of porn detection model open source by yahoo.

Https://github.com/yahoo/open_nsfw

The use of Caffe model training, mainly for scary, bloody, pornographic and other pictures for identification.

Quick start

The markdown of the project explains how to use it, which is very simple to start with one click of Docker. You can go to github to check how to use it.

Docker build-t caffe:cpu https://raw.githubusercontent.com/BVLC/caffe/master/docker/cpu/Dockerfile

Yes. Okay, no access. A fake address was given. Then we have no choice but to choose another option.

Self-installation failed. Caffe environment did not install successfully, the foreign environment is basically Ubuntu, while the domestic environment is CentOS. Try N times. Give up!

It was later discovered that the version of Tensorflow-nsfw.

"https://github.com/mdietrichstein/tensorflow-open_nsfw"

Python3.6 and tensorflow 1.12 are currently supported. Have passed the relevant test, other versions please test carefully. Try to choose the same version.

If the download is completed, if the environment is normal, you can directly use the

Python classify_nsfw.py-m data/open_nsfw-weights.npy test.jpg

To test it. "Note: currently, only pictures in jpeg format are supported"

Results for 'test.jpg' SFW score: 0.9355766177177429 NSFW score: 0.06442338228225708

NSFW score is to identify scores that are not suitable for work scenarios. The total score is 10, and the higher the score, the less suitable the picture is for the work scene.

test

To be honest, pictures are really hard to find, especially for me, I can't find any pictures that can make the score more than 8 points. I used the search engine to find a few pictures, and I think it should be more than 8 points. But it turns out.

Mr. Cang

Result score

But the calculation results are still far from satisfactory!

The above content is how to use NSFW to try picture porn detection. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Picture score work test try version environment result content scene namely skill way model knowledge support choice horror same concise Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Technology OPPO Reno macOS Docker