lovoo / NSFWDetector

A NSFW (aka porn) detector with CoreML
BSD 3-Clause "New" or "Revised" License
1.59k stars 109 forks source link

I have tested 10 sets of data, but it doesn't feel very accurate. I want to know how you define the value of nsfwConfidence #19

Open SiterZzz opened 6 years ago

SiterZzz commented 6 years ago

I have tested 10 sets of data, but it doesn't feel very accurate. I want to know how you define the value of nsfwConfidence

SiterZzz commented 6 years ago

NsfwConfidence has a value of 0.1 to 0.4

absolute-heike commented 6 years ago

Hey thanks for asking :)

We defined genitals, female breasts, etc. as NSFW. In other words explicit content.

Being naked while wearing a bra or covering your body parts on the other hand is considered Safe for Work. Note that detecting violence, blood and other topics considered as NSFW is not part of NSFWDetector.

I am working on a way to share the dataset without getting into legal problems here.

If you need your own definition of NSFW, then I'd suggest to just train the model yourself. It's very easy and you don't need a huge amount of pictures for that to work 😄 Check out "Introducing Create ML". Small tip: make sure to include some pictures of clear SFW-samples: Buildings, trees, cars, children playing, etc. Otherwise the model won't know if a landscape picture is SFW or not ;)

ghost commented 6 years ago

A screenshot of a porn scene with straight up nudity gets a confidence rating of 45%.

A fully dressed woman gets in a Thai traditional outfit gets 2%.

A fully dressed woman with Mickey Mouse ears gets 1%.

A fully dressed woman in a winter bubble jacket gets 0.01%.

How do you guys use this on your app and not deal with users leaving by the droves?

yarodevuci commented 5 years ago

@datureezy @absolute-heike I tried on pure naked body from front and back and it's like 0.5 -0.7 percent. nah would not use this in my app..

dustturtle commented 5 years ago

I think the createML created model have a kind of fault. The confidence rate is not so linear. The problem may be due to the design : extracting image feature and then a logistic regression. If you fine tuning a model, that problem will not occur.

lukepighetti commented 5 years ago

@datureezy set your threshold for 30%? Idk, just guessing

yarodevuci commented 5 years ago

does anyone has a better model ?

lukepighetti commented 5 years ago

No but seriously, what's the problem? If it's detecting them reliably at 30% then use 30% as your threshold.