harperreed / photo-similarity-search
- Π²ΠΎΡΠΊΡΠ΅ΡΠ΅Π½ΡΠ΅, 21 Π°ΠΏΡΠ΅Π»Ρ 2024β―Π³. Π² 00:00:07
Super simple MLX (apple silicon) CLIP based photo similarity web app
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. ππΌοΈ
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 interfaceClone the repository:
git clone https://github.com/harperreed/embed-photos.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 http://localhost:5000
to explore the photo similarity search!
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! πβ¨