-
Notifications
You must be signed in to change notification settings - Fork 642
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
How to use BLIP for duplicate or near-duplicate images? #68
Comments
You can compute the cosine similarity of their image embeddings |
For reference, there are basic tools to find duplicates: https://github.com/idealo/imagededup |
@LiJunnan1992 do you have a example how to extract image embeddings? I don't find any example here https://github.com/salesforce/BLIP/blob/main/demo.ipynb |
Please refer to this code in the demo: |
@LiJunnan1992 as I mentioned for my case is give two images, I have to detect whether they are duplicate or not. For this I have to get the embeddings of two images and then compute the cosine similarity. But the code sample in the demo also have caption involved:
As I mention I only want to get an embedding given an image. Is it possible with this model? |
@smith-co I tested with the following:
Output:
As you see cosine similarity is coming up as But sure, @LiJunnan1992 could provide more authoritative feedback in case I am missing something. |
Given pair of images, my use case is to detect whether they are duplicate or not.
(imageX, imageY) = verdict/score
verdict = duplicate/not duplicate/near duplicate
How can I use BLIP for this use case?
The text was updated successfully, but these errors were encountered: