Reverse image search not selecting obviously the most simmilar images in some cases #4475
Replies: 4 comments 1 reply
-
Hello @vincenthawke The most robust way to figure out whether the problem is in the model or not is to compare embeddings via brute force. |
Beta Was this translation helpful? Give feedback.
-
I tried that next. I used
As you can see, it found the exact matched image of a cat:
gatto/7.jpeg does exist in the database as seen here: How would I go about writing my own comparison function? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Sometimes neural networks struggle with things which are obvious for people. If I understand correctly, you're trying to evaluate the quality of your search and you're creating synthetic examples, but it seems that they have a different distribution rather than the original data. I would suggest you trying out other augmentation techniques to create a validation dataset, or even label some of the queries on your own. |
Beta Was this translation helpful? Give feedback.
-
I don't understand why some of my slightly modified images do not get ranked as the most simmilar images.
I used only jpeg cat images from folder gatto: https://www.kaggle.com/datasets/andrewmvd/animal-faces
Images I modified to test, if the similarity search will pick my modified images as most simmilar: https://imgur.com/a/ciX8p51 and added them to the database with the rest of cat faces.
Specifically this image is confusing to me:
Instead of finding the most simmilar image the one without black lines, it selects images such as:
Same image is having same problems with other models like resnet50, so I don't think the issue is in the model. This was supposed to be a reverse image search but it seems that my extracted features are performing worse on average than a typical pHash would. Any advice is much appreciated. The rest of the code below:
Beta Was this translation helpful? Give feedback.
All reactions