The Image Search Engine is a modern AI-powered web application leveraging Retrieval-Augmented Generation (RAG) to combine large language models (LLMs) with advanced image retrieval techniques. Designed for seamless user experience, this tool allows users to upload and search through images in a highly accurate, visually engaging way. Utilizing vector embeddings through OpenAI’s models, the engine achieves context-aware search results that surpass traditional keyword-based searches—ideal for image-heavy applications like e-commerce.
- Image upload with drag-and-drop support
- Image search functionality using vector embeddings
- Responsive grid layout for displaying search results
- Modern UI with smooth animations and transitions
- Integration with Google Drive for image storage
- Utilization of OpenAI’s embeddings models for advanced search capabilities
- Frontend: React.js with Tailwind CSS for styling
- Backend: FastAPI with PostgreSQL and pgvector
- Image Storage: Google Drive
- Vector Embeddings: OpenAI embeddings models
- API: RESTful API for image upload and search
- Node.js and npm
- Python 3.7+
- PostgreSQL with pgvector extension
- Google Drive API credentials
-
Clone the repository:
git clone https://github.com/TNAHOM/Image-Search-Engine.git cd Image-Search-Engine/frontend
-
Install dependencies:
npm install
-
Create a
.env
file in the frontend directory and add necessary environment variables:REACT_APP_API_URL=http://localhost:8000
-
Start the development server:
npm start
-
Navigate to the backend directory:
cd ../backend
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install required packages:
pip install -r requirements.txt
-
Create a
.env
file in the backend directory and add necessary environment variables:DATABASE_URL=postgresql://username:password@localhost/dbname OPENAI_API_KEY=your_openai_api_key GOOGLE_DRIVE_CREDENTIALS_FILE=path/to/your/credentials.json
-
Set up the database:
alembic upgrade head
-
Start the FastAPI server:
uvicorn main:app --reload
-
Uploading Images:
- Drag and drop an image into the upload area, or click to select a file.
- Click the “Upload Image” button to submit the image.
-
Searching Images:
- Use the search bar at the top of the page to enter your search query.
- Press Enter or click the search button to view results.
-
Viewing Results:
- Scroll through the responsive grid of image results.
- Click on an image to view it in full size (if implemented).
/upload/
: POST request to upload an image/search/
: GET request to search for images using vector embeddings
For detailed API documentation, run the backend server and visit http://localhost:8000/docs
.
Contributions to the Image Search Engine project are welcome! Please follow these steps:
- Fork the repository
- Create a new branch:
git checkout -b feature-branch-name
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-branch-name
- Submit a pull request
For any inquiries or issues, please open an issue on the GitHub repository.
Leave a Reply