Welcome to Embed-Photos, a powerful photo similarity search engine built by @harperreed! 🎉 This project leverages the CLIP (Contrastive Language-Image Pre-training) model to find visually similar images based on textual descriptions. 🔍🖼️
- 🚀 Fast and efficient image search using the CLIP model
- 💻 Works on Apple Silicon (MLX) only
- 💾 Persistent storage of image embeddings using SQLite and Chroma
- 🌐 Web interface for easy interaction and exploration
- 🔒 Secure image serving and handling
- 📊 Logging and monitoring for performance analysis
- 🔧 Configurable settings using environment variables
embed-photos/
├── README.md
├── generate_embeddings.py
├── requirements.txt
├── start_web.py
└── templates
├── README.md
├── base.html
├── display_image.html
├── index.html
├── output.txt
└── query_results.html
generate_embeddings.py
: Script to generate image embeddings using the CLIP modelrequirements.txt
: Lists the required Python dependenciesstart_web.py
: Flask web application for the photo similarity searchtemplates/
: Contains HTML templates for the web interface
-
Clone the repository:
git clone https://github.com/harperreed/photo-similarity-search.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure the application by setting the necessary environment variables in a
.env
file. -
Generate image embeddings:
python generate_embeddings.py
-
Start the web application:
python start_web.py
-
Open your web browser and navigate to
https://localhost:5000
to explore the photo similarity search!
- Use siglip instead of clip
- add a more robust config
- make mlx optional
The Embed-Photos project builds upon the work of the Apple (mlx!), the CLIP model and leverages various open-source libraries. We extend our gratitude to the authors and contributors of these projects.
Happy searching! 🔍✨