Skip to content

Images (Images Retrieval) is a problem in the field of information queries (Information Retrieval). Its example applications are like Google Search Image, search function Products with pictures on Shopee, Lazada, Tiki, ...

Notifications You must be signed in to change notification settings

NguyenHuy190303/Images-Retrieval-Streamlit

Repository files navigation

Test Image Retrieval

This project demonstrates content-based image retrieval using Streamlit and ChromaDB.

Project Setup

Clone the Repository

Clone the project from GitHub:

git clone https://github.com/NguyenHuy190303/Images-Retrieval-Streamlit

Navigate to the Project Directory

cd Images-Retrieval-Streamlit

Install Dependencies

Install the required dependencies using pip:

pip install -r requirements.txt

Setup and Running create_images_db.py

This script is used to set up the ChromaDB and process the training dataset.

1. Set Up Directory Paths

Before running the script, ensure you have the following directories set up on your system:

  • Training Dataset: Store your images in the directory specified by the ROOTS variable.
  • Database Path: The ChromaDB database will be stored in the directory specified by the db_path variable.

2. Update the Script

Open create_images_db.py and update the following variables:

# Path to your training dataset
ROOTS = r"D:\Python\Text_Image_Retrieval-Streamlit\data\train"

# Path to where the ChromaDB will be created/stored
db_path = r"D:\Python\Text_Image_Retrieval-Streamlit\database"

3. Initialize and Embed Vectors in ChromaDB

Run the script to initialize and embed vectors in the ChromaDB:

python create_images_db.py

Run Streamlit Application

Once the database is set up, you can run the Streamlit application:

streamlit run main.py

About

Images (Images Retrieval) is a problem in the field of information queries (Information Retrieval). Its example applications are like Google Search Image, search function Products with pictures on Shopee, Lazada, Tiki, ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published