This project introduces a multi-modal image retrieval system designed to perform efficient image searches using both textual descriptions and image queries. At its core, the system leverages OpenAI's CLIP (Contrastive Language-Image Pretraining) model to represent both text and images as vectors in a shared embedding space. This capability allows seamless comparison between text and image embeddings, enabling advanced retrieval functionalities.
- Dual Query Modes: Search images using either a textual description or an uploaded image.
- High-Performance Vector Search: Uses ChromaDB, a high-performance vector database optimized for fast similarity search.
- Intuitive User Interface: Built with Gradio, providing a seamless interface for multi-modal queries.
- Scalability: Designed for large-scale image datasets with responsive performance.
- Visual Search Engines: Enhance user experience with cross-modal search capabilities.
- Content Management Systems: Streamline image retrieval for digital assets.
- Multimedia Recommendation: Recommend visually or semantically related content based on user input.
-
Image Indexing:
- Images are indexed by passing them through the CLIP model, which generates vector embeddings.
- These embeddings are stored in ChromaDB for efficient similarity-based retrieval.
-
Query Handling:
- Text Query: Converts input text into an embedding using the CLIP model and retrieves the most similar image embeddings.
- Image Query: Processes the uploaded image to generate its embedding and finds similar embeddings in the database.
-
User Interface:
- A Gradio-based web app allows users to input a text description or upload an image.
- The app displays the most relevant images retrieved from the database.
- Core Model: OpenAI's CLIP
- Database: ChromaDB
- Web Interface: Gradio
- Programming Language: Python
-
Clone the repository:
git clone https://github.com/your-username/Multi-Modal-Image-Retrieval.git
-
Navigate to the project directory:
cd Multi-Modal-Image-Retrieval -
Install dependencies:
pip install -r requirements.txt
-
Download the required CLIP model:
pip install openai-clip
-
Set up ChromaDB:
- Follow ChromaDB setup instructions for installation and configuration.
-
Start the Gradio interface:
python app.py
Performing a search using a textual description or image
- Run the application:
python app.py
- Open the Gradio interface in your browser.
- Choose your query type:
- Text Input: Enter a description of the image you're searching for.
- Image Upload: Upload an image to find similar content.
- View the results displayed by the interface.
- Add support for hierarchical image categorization.
- Extend support for other embedding models like BLIP or DINO.
- Integrate additional databases for hybrid vector and metadata-based search.
This project is licensed under the MIT License. See the LICENSE file for more details.

