Skip to content

๐Ÿ” A CLIP-powered image similarity finder built with Streamlit โ€” upload a query image and find the most visually similar matches from a gallery using deep visual embeddings.

License

Notifications You must be signed in to change notification settings

Rakshath66/ClipFindr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  CLIP Image Similarity Finder โ€” Streamlit + Transformers

A powerful visual similarity search app using the CLIP model to match uploaded query images against a gallery โ€” all within an interactive Streamlit UI.

โœ… Built with: CLIP, Transformers, Streamlit, PIL, PyTorch, scikit-learn

GitHub Repo stars GitHub forks MIT License


๐Ÿ“ธ Preview

image


๐Ÿง  Features

  • ๐Ÿ–ผ๏ธ Upload a query image
  • ๐Ÿ—‚๏ธ Upload a set of gallery images
  • ๐Ÿ” Get top 3 visually similar matches using CLIP embeddings
  • ๐Ÿ“Š Similarity scores shown using cosine similarity
  • ๐ŸŽจ Clean, minimal Streamlit UI

๐Ÿš€ Getting Started

๐Ÿ”ง Prerequisites

  • Python 3.8 or higher

๐Ÿ–ฅ๏ธ Local Installation

# 1. Clone this repo
git clone https://github.com/rakshath66/clipfindr.git
cd clipfindr

# 2. (Optional) Create a virtual environment
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows

# 3. Install dependencies
pip install -r requirements.txt

# 4. Run the app
streamlit run app.py

๐Ÿ—‚๏ธ Project Structure

clipfindr/
โ”œโ”€โ”€ app.py                  # Streamlit app with CLIP visual search
โ”œโ”€โ”€ gallery/                # Uploaded gallery images (auto-created)
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”œโ”€โ”€ README.md               # This file

๐Ÿ“š Technology Used

  • ๐Ÿง  CLIP from OpenAI
  • ๐Ÿค— Hugging Face Transformers
  • ๐Ÿงฎ PyTorch + TorchVision
  • ๐Ÿ“Š Cosine Similarity via scikit-learn
  • ๐ŸŽจ PIL for image handling
  • ๐Ÿ–ผ๏ธ Streamlit for the frontend

๐Ÿ’ก Example Use Cases

  • Product image deduplication
  • Visual search for screenshots
  • Reverse lookup from dataset images
  • Similar fashion or object search

๐Ÿ” No API Keys Needed

CLIP is loaded directly via Hugging Face โ€” no tokens required.

Optional: To avoid rate limits, run huggingface-cli login if you have an account.


โญ Contribute

๐Ÿ›  Steps to contribute:

  1. Fork the repo
  2. Create a branch: git checkout -b my-feature
  3. Make changes and commit: git commit -m "Add: new feature"
  4. Push: git push origin my-feature
  5. Open a pull request โœ…

Clean, modular contributions welcome!


๐Ÿ“ƒ License

MIT License ยฉ Rakshath U Shetty


๐Ÿ›ฃ๏ธ Roadmap

โœ… Phase 1: Core App

  • CLIP-based similarity matching
  • Top 3 results with similarity scores
  • Clean Streamlit UI

๐Ÿ”œ Phase 2: Enhancements

  • โœ… Save image metadata
  • ๐Ÿง  Add text + image matching
  • ๐Ÿ–ผ๏ธ Visual heatmap of similarity
  • ๐ŸŒ Optional: add BLIP-based captioning

๐Ÿง‘โ€๐Ÿ’ป Built by Rakshath U Shetty

Releases

No releases published

Packages

No packages published

Languages