-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different sizes of the same image give different results #906
Comments
Good question! There are a few factors to calculate into account. All images are resized for you to the same square. For inception it is 299x299. Given that your images are roughly the same dimensions, this shouldn't affect it too much. The resizing should be the same using a Bilinear Resize. I do know Inception is more attracted to details than other models, so it might be more sensitive. Can you try other models for me? If you resize your input images to 299x299 with bilinearresize, we can look at see if there are any major visual differences between them. |
Thank you for the reply. I was now going to test the images in different models as you asked. I'm not sure why, but when I test the same images in https://nsfwjs.com/ , with the same InceptionV3, I get different results... 1365 × 2048:
480 × 720:
I confirm the model files I'm using are exactly the same as the ones hosted in this repository. In my NodeJS script, I'm basically getting the image in a bytes array, then:
Which seems to match what is in the I sent the two images (big and small) to your gant@i*******.r** email, if you'd like to have a look! Many thanks!! |
Hey!
As per #253,
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:
But if I provide a resized version of it (480 × 720), it gives me:
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 anyporn
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!
The text was updated successfully, but these errors were encountered: