nsfwjs
nsfwjs copied to clipboard
False positive on tiktok videos
I had a discord bot up and running this module, apparently this image is flagging for "Porn" with 62%???
I was running Inception v3 (the default model).

There will be false positives for sure. Can you provide the images in this chat (that link isn't working) and also can you identify which model you were using?
@GantMan sure, here is the image

I am using the default model (Inception v3) as the same as the example in the readme file.
UPDATE: IT IS NOT INCEPTION V3. I just do nsfw.load() without any arguments.

I just tested this on all three models. All 3 said top class was Neutral. While the one you're showing there is barely sure, it's still correct. Which one is saying 62%?
@GantMan hello, I don't know what module I'm currently using, I just copied the example nodejs code in the readme file.

By the way, I found the original image. The image I sent 7 hours ago was a screenshot.

Also, when I upload the bot to heroku, it seems like calling image.dispose() will cause a memory leak. Any solution on this?


More updates: Mangas also got false-flagged.


Hrmmm I'm not sure what the issue is right away. Strange that the result is different from what you see on NSFWJS.com
Also, I'm not sure where your memory leak is coming from either.
I'm a bit busy, so I can't really spin up a node instance to debug at this time. Can you check the image Tensor you're getting against this one?
Here, in this code, I grab the first 100 values of your image: https://bit.ly/3EBYYSi Can you grab the first 100 values of your tensor image and compare?
Hrmmm I'm not sure what the issue is right away. Strange that the result is different from what you see on NSFWJS.com
Also, I'm not sure where your memory leak is coming from either.
I'm a bit busy, so I can't really spin up a node instance to debug at this time. Can you check the image Tensor you're getting against this one?
Here, in this code, I grab the first 100 values of your image: https://bit.ly/3EBYYSi Can you grab the first 100 values of your tensor image and compare?
Hello, sorry for the late reply sir, here is the result.

The code that I used:

Well, the first thing I notice is that the tensors have different values. They don't seem terribly off from one another, but they definitely have different values. That's probably the main issue. I'll see if I can figure out why, you should too.

New false postivite: Rule34 link
Tested by all 3 modules at https://nsfwjs.com/ All 3 returned "Drawing" for > 97%
@GantMan
That link is what we call a "false negative". I'll add it to the dataset for future training.