infinitered / nsfwjs

NSFW detection on the client-side via TensorFlow.js
https://nsfwjs.com/
MIT License
7.94k stars 528 forks source link

False positive drawing #459

Closed link-discord closed 1 year ago

link-discord commented 3 years ago

SPOILER_Matou_shinji-1-67-1.png

link-discord commented 3 years ago

The ai classify's this as hentai (Latest mobilenet model)

GantMan commented 3 years ago

Which model did you use? I'm dragging the image to NSFWJS.com and can't reproduce with the 90% mode or the 93% model.

2 1

link-discord commented 3 years ago

I used the 93% one I set the jpg quality of images to 60 before scanning them using nsfwjs

GantMan commented 3 years ago

Can you provide the image you used?

And yes, false positives will happen.

link-discord commented 3 years ago

SPOILER_Matou_shinji-1-67-2.jpg

link-discord commented 3 years ago

for whatever reason I don't have this false positive on the website while I do on my code

maybe its because I use tf prod mode

link-discord commented 3 years ago

From my testings, I have noticed that this issue is with the latest released model from the nsfwjs_model repo when I used a previous release it didn't have this false positive

GantMan commented 3 years ago

@TechnikEmpire - would know what's up.

https://github.com/TechnikEmpire

TechnikEmpire commented 3 years ago

@LINKdiscordd link directly to the model you pulled and I'll check it out to see if I can repro.

TechnikEmpire commented 3 years ago

Just to be clear this could very well be a false positive. Latest models were trained by me with a vastly different data set than previous models. So imo such "bugs" can be expected, if they're defined simply by comparing against previous models.

There will always be a margin of error. Even whether we get 70% or 99% "accuracy", those numbers only apply to the dataset we trained and tested on, not the billions of images in existence.

I'm still happy to verify this though if you link to it. I'm asking for a link so there's no error in verifying.

link-discord commented 3 years ago

https://github.com/GantMan/nsfw_model/releases/download/1.2.0/mobilenet_v2_140_224.1.zip

Its the model from the web model folder which has this false positive

TechnikEmpire commented 3 years ago

I can confirm that this is just a false positive.

TechnikEmpire commented 3 years ago

With relatively low confidence I might add, but still a false positive. 57% confidence.