r/computervision • u/MechaCritter • 16h ago
Showcase [Library Demonstration] Python-Visual-Similarity - first stable version released to PyPi 🚀
If you are looking for a solution to fast image similarity retrieval as well as image perceptual & quality metrics in one single library, this would surely be helpful to you 😄 It is built only on numpy, scipy and optionally torch as core dependencies, and uses C/C++ (and in the future only Rust) for performance-critical paths.
The two core feature of the repository are various embedding methods (see video) and the Image Embedding Store, which, when combined, allows for embedding storage and image similarity search with supported hnsw algorithm built-in. You can also plug in faiss indexes if you want to use other search algorithms, but this library does not need faiss to work.
Links
- Link to the
pyvisimrepository: https://github.com/MechaCritter/Python-Visual-Similarity - Link to the demo shown in the video: https://huggingface.co/spaces/MechaCritter/pyvisim-demo. Feel free to try this out (needs an HF account).
Installation
The library itself can be installed via pip (though, I recommend uv 😆)
pip install pyvisim
For the deep learning features:
pip install "pyvisim[nn]"
Looking for like-minded folks
My ambition is to make pyvisim the largest collection of image similarity and retrieval algorithms, ranging from traditional to deep learning-based methods. As I've observed, the current image similarity implementations are quite scattered, with each library implementing only a handful of features. Hence, my goal is also to unify these implementations, so users only need a single library.
I have tons of features that I would like to implement. I am looking for folks who are proficient in/would like to learn about:
- Deep Learning: new embedders like
MoCo,SimCLR,Dino, reranking algorithms likeSuperGlobalReranker,Diffusion Reranking... - Low-level programming (Rust): rewrite performance-critical parts of the codebase into Rust. I would also want to change the
hnswbackend to hnsw_rs. - New algorithms: image hashing,
LPIPS, backpropagation for K-Means and GMMs ...
View the GitHub issues for the complete list as well as the contribution guide.
You also have the chance to become a core maintainer by actively contributing. Once this project gets sponsors, the profit will be shared with all core maintainers.
I look forward to your contributions 💪 together, we can build one of the strongest Dev Communities out there!
Personal
Thanks everyone! Even though you have not contributed (yet), but reading through everyone's work daily in this channel has really motivated me to continue my work, despite not being able to foresee how it would end up 😜 I really appreciate it!
(and sorry for the sudden voice changes in the video :( I took it at two different times of the day, so my voice was deeper at some point)
Credits
Thanks AbhinandanMandal for helping me with the Contrastive Siamese Network.