nsfw_model icon indicating copy to clipboard operation
nsfw_model copied to clipboard

big difference in results using saved_model.tflite when compared to nsfwjs.com

Open sandeep5193 opened this issue 2 years ago • 6 comments

I have used saved_model.tflite from v1.1.0 and v1.2.0. image used is 224x224, same jpeg in both testing. here are results:

nsfwjs.com Neutral - 67.35% Porn - 31.40% Drawing - 0.79% Hentai - 0.26% Sexy - 0.19%

saved_model.tflite (v1.1.0, on android with tensorflow lite) porn: 0.8919 sexy: 0.0455 hentai: 0.0355 drawings: 0.0209 neutral: 0.0062

jpeg used is here(safe-for-work): nsfw_input

I am new to this, so correct me if am wrong, I have simply used this tflite without any changes. Am I using the correct version?

sandeep5193 avatar Apr 25 '22 13:04 sandeep5193

while using tflite in android, input RGB is normalised to [0,1] from [0,255].

sandeep5193 avatar Apr 26 '22 14:04 sandeep5193

Tried predict.classify() JavaScript function of this project, with v1.1.0's saved_model.h5. It gave exactly same results as with my android code(using saved_model.tflite).

Wondering if model used in nsfwjs.com is same as v1.1.0 of this repo or something else. @GantMan can you please clarify?

sandeep5193 avatar Apr 27 '22 07:04 sandeep5193

The v1.1.0 is much worse than the nswfjs. No idea why.

KevinColemanInc avatar May 15 '22 23:05 KevinColemanInc

The v1.1.0 is much worse than the nswfjs. No idea why.

~~NSFWJS seems to have higher accuracy on all models, not just v1.1.0~~ nvm, it seems that nsfwjs is only using v1.0 models

Bluebotlabz avatar May 18 '23 06:05 Bluebotlabz

If anyone find's this thread in the future, I ended up using Bumble's Private Detector for my NSFW-FLASK service.

Bumble's has higher precision and accuracy. Bumble's model is about 400mb compressed while this is 135Mb

KevinColemanInc avatar May 18 '23 16:05 KevinColemanInc

Wow, thanks!

Bluebotlabz avatar May 18 '23 16:05 Bluebotlabz