Skip to content
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

Support for searching with query image #27

Open
nuschandra opened this issue Sep 27, 2024 · 4 comments
Open

Support for searching with query image #27

nuschandra opened this issue Sep 27, 2024 · 4 comments

Comments

@nuschandra
Copy link

nuschandra commented Sep 27, 2024

Hi @bclavie & team,

I currently don't see support for searching through an index with a query image instead of a text query. I understand that there is an encode_image option but that only provides the embeddings of the query image and not a full search through the indexed documents along with maxsim calculations. It would be really nice to have support for querying with an image too.

@nuschandra
Copy link
Author

@bclavie If you think that this would be a useful feature, I'd be happy to contribute and raise a PR for the same.

@bclavie
Copy link
Contributor

bclavie commented Oct 3, 2024

Hey! It'd actually be a completely experimental feature since it's not even done in the paper, but I'd be happy to include it under a beta flag if you would like to contribute it!

@nuschandra
Copy link
Author

@bclavie Thanks for your response! Sure, yes I understand. In terms of the logic it remains the same i.e. process_images would return pixel_values & input_ids for the prompt (just like when we do indexing). If we are searching by image, we just make the forward call with both pixel_values and input_ids and get the embeddings which can later be used for maxsim calculations. I will make the code changes later this week and raise a PR .

@sergenerbay
Copy link

sergenerbay commented Oct 27, 2024

Hi,
I need the same feature. Have you completed the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants