nsfw_model icon indicating copy to clipboard operation
nsfw_model copied to clipboard

model.json version model is not as good as .h5 version

Open qiankunxienb opened this issue 5 years ago • 7 comments

For example, https://s3.amazonaws.com/ir_public/nsfwjscdn/nsfw_mobilenet2.224x224.h5 is more accurate than https://github.com/GantMan/nsfw_model/releases/download/1.2.0/mobilenet_v2_140_224.1.zip.

What is the key difference?

qiankunxienb avatar Jan 13 '21 11:01 qiankunxienb

The one on s3 was created using TF1.0 by me, and the second one was by @TechnikEmpire who's been helping improve the model.

GantMan avatar Jan 13 '21 21:01 GantMan

I would ask for evidence to back up the accuracy claims but, yesterday I re-trained a model and tf said it was 96% accurate... then I tested it in a brand new group of images never seen before in train or validation and "accuracy" was not a word I would even use to describe anything about it. Puzzling.

TechnikEmpire avatar Jan 13 '21 21:01 TechnikEmpire

Agreed. We need data.

GantMan avatar Jan 13 '21 22:01 GantMan

for example, please see the images below: 0OUtSc_G_004dBV7E00

the results of mode.json vs h5 are like below:

image

mode.json version model says it is more like a porn image than h5 version model.

qiankunxienb avatar Jan 14 '21 02:01 qiankunxienb

However, https://nsfwjs.com/ always do the right job.

image

How does this site do a better job? Did the site train the mode by itself or use the same mode as you?

qiankunxienb avatar Jan 14 '21 03:01 qiankunxienb

The site 93% model I believe is one release version old.

The 90% accuracy was from the TF 1.0 training session.

Can you look through release history and see which model works best for you and we'll try to update?

GantMan avatar Jan 15 '21 20:01 GantMan

However, https://nsfwjs.com/ always do the right job.

I'd just like to point out that, it's not doing "the right job", it's calling a screen grab of a police interaction a "drawing".

TechnikEmpire avatar Jan 19 '21 13:01 TechnikEmpire

I believe this is resolved. Please reopen if you have further questions or discussion.

colindean avatar Feb 24 '23 04:02 colindean