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

ImageRetriever #2445

Closed
ZanSara opened this issue Apr 21, 2022 · 4 comments
Closed

ImageRetriever #2445

ZanSara opened this issue Apr 21, 2022 · 4 comments

Comments

@ZanSara
Copy link
Contributor

ZanSara commented Apr 21, 2022

[Part of #2418]

What
ImageRetriever is a node that is capable of performing two operations:

  • Creating comparable embeddings for text and images
  • Comparing such embeddings to retrieve images that correspond to a given description.

How
ImageRetriever could be based on CLIP, which is available through sentence-transformers.

Given that ImageRetriever has clearly two responsibilities, we can consider splitting them between ImageEmbedder (only creates and stores the embeddings) and ImageRetriever (computes the embeddings for the query only and uses the pre-existing image embeddings from the document stores) #2403

Expected results

  • A pipeline should be capable to take a string as input and output a list of paths to images.
  • All document stores should be able to support image embeddings

NOT expected (yet):

  • Pipelines capable of returning mixed images and text results with comparable scores.

This new node is likely to be implemented in a single PR.

@julian-risch
Copy link
Member

julian-risch commented May 11, 2022

@ZanSara I think we could make use of Data2Vec from transformers: https://huggingface.co/docs/transformers/main/en/model_doc/data2vec That would allow to do the implementation of the embedding calculation in the EmbeddingRetriever in just a few lines of code.

@julian-risch
Copy link
Member

Data2VecVision has been recently added: https://github.com/huggingface/transformers/pull/16760/files
and Data2VecText and Data2VecAudio are already there.

@julian-risch
Copy link
Member

@ZanSara There was a transformers release and Data2VecVision has also been part of the release: https://github.com/huggingface/transformers/releases

@masci
Copy link
Contributor

masci commented Jul 20, 2022

Superseded by #2418

@masci masci closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants