Skip to content

Different sizes of the same image give different results #906

@ghnp5

Description

@ghnp5

Hey!

As per #253,

NSFWJS will automatically resize the input image to be square for you.
No code should be needed on your side.

So, I'm confused why providing different sizes (keeping the aspect ratio) of a JPG brings me totally different outputs.

On this specific image I'm testing with (6794873 for my own reference), if I provide a 1365 × 2048 version of the image, it gives me:

porn: 56.75
neutral: 28.55
hentai: 9.34
sexy: 4.47
drawing: 0.89

But if I provide a resized version of it (480 × 720), it gives me:

porn: 96.25
hentai: 1.84
neutral: 1.03
sexy: 0.83
drawing: 0.05

To me, the output provided by the larger image is much more accurate, than the second output.
If anything, I'd give a higher sexy score, as there isn't any porn in the image (unless the lady in the image is an actress or so, I've no idea).

But still, I'm not understanding why different sizes of the same image are giving such different results.

I tested with several other images, and the results do vary in all of them. Sometimes very close, sometimes very far (like this one).

Is there any expectancy to give the largest image possible to this API, for more accurate results, or the smaller, the better?

Using InceptionV3.

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions