ImageSeeker is a Flask-based web application designed for a robust Content-Based Image Retrieval (CBIR) system. It uses advanced machine learning models to search and retrieve similar images from a local database, providing an intuitive way to explore image galleries.
- Sync images from Google Photos using gphotos-sync.
- Extract features from images using facebook/dinov2-small model.
- Index images using FAISS for efficient similarity search.
- Search functionality to find similar images.
- Gallery view to display indexed images.
- Feature Extraction and Matching: OpenCV, Pytorch
- Indexing: Facebook AI Similarity Search
- Backend: Python (Flask)
- Frontend: HTML, CSS, JavaScript
- Python 3.6 or higher
- Flask
- OpenCV
- Pytorch
- Transformers
- FAISS (Facebook AI Similarity Search)
-
Clone the repository:
git clone https://github.com/aniruth5510/ImageSeeker-CBIR-System.git
-
Navigate to the project directory:
cd ImageSeeker-CBIR-System/
-
Install required packages:
conda env create -f faiss.yaml
-
Start the Flask server:
python run.py
-
Access the application in a web browser at
http://localhost:5000
.
-
OAuth Client ID:
- Follow the Creating an OAuth Client ID guide.
- Save the
client_secret.json
in the appropriate configuration directory.
-
Sync Images:
- Run
gphotos-sync .\gallery\
in the command line to sync images from Google Photos.
- Run
- Home Page: Access at
http://localhost:5000/
. - Setup Page: Instructions for setting up OAuth Client ID.
- Sync Page: Sync images and update the FAISS index.
- Gallery Page: View the synced image gallery.
- Search Page: Upload an image and specify the number of similar images to retrieve.
- Images are automatically added to the FAISS index during the sync process.
- The index is updated with new images, and deleted images are removed to keep the index current.