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

Draft: Add ability to search for similar images #4155

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sazarkin
Copy link

@sazarkin sazarkin commented Apr 6, 2024

This is POC for similarity search inspired by this PR #2005

What it does:

  • Uses TensorFlow CLIP (ViT-B-16) model to create embeddings ([512]float32) vector and stores it db
  • Uses FAISS https://github.com/facebookresearch/faiss library to maintain in-memory index for this embeddings. Because MariaDB does not support yet index like this.
  • Adds UI screen to show similar images

image

Saved CLIP model: https://www.dropbox.com/scl/fi/7dg71dr5qjwscmwt13x60/assets-clip.tar.gz?rlkey=5u7ve354auuqcd6dr0gg0b1b2&dl=1

What it can do:

UI is not in very good state, index init is just inserted at the start command, libfaiss is not added into docker image.
This is not in ready state, and I want to receive comments if this approach even desirable in upstream.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sazarkin sazarkin force-pushed the feature/search-similar-photos branch from 1662d8d to 856c6e8 Compare April 6, 2024 14:19
@graciousgrey
Copy link
Member

Thank you very much for that! We will review it and give you feedback as soon as we have finalized our next stable release :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants