Welcome to our web application designed to implement a robust Content-Based Image Retrieval (CBIR) system that enables efficient image search and management through visual features and relevance feedback mechanisms. Users can upload, download, delete, and categorize images into predefined classes, as well as generate new images by applying transformations like cropping and scaling. The system computes and displays visual descriptors for images, including color histograms, dominant colors, Gabor texture filters, Hu moments, and additional custom descriptors. It supports both basic search to retrieve visually similar images and an advanced Bayesian relevance feedback mechanism to iteratively refine results, providing an intuitive and dynamic way to explore the RSSCN7 dataset, which consists of 2,800 images categorized into seven scene types such as Residential, Forest, and Industry.
To start off, clone this branch of the repo into your local:
git clone https://github.com/Samashi47/content-based-image-retrieval.gitcd content-based-image-retrievalAfter cloning the project, if you are using Python 3.12.z with shared libraries enabled, you can checkout to the edge branch, using the latest pymc version:
git checkout edgeIf not, you can stay on the main branch.
Then, create a virtual environment:
cd apps/apiWindows
py -3 -m venv .venvMacOS/Linus
python3 -m venv .venvThen, activate the env:
Windows
.venv\Scripts\activateMacOS/Linus
. .venv/bin/activateYou can run the following command to install the dependencies:
pip3 install -r requirements.txtAfter installing the dependencies, you should specify the mongodb connection string in the .env file:
touch .envMONGO_URL=<url>Then, you can run the following command to start the backend:
python server.pyOpen another terminal:
cd apps/appThen, run the following command to install the dependencies:
pnpm installthen, run the following command to start the frontend, if you have angular cli installed globally:
ng serveif not, you can run the following command:
pnpm run ng serveThen, open your browser and navigate to http://localhost:4200/ to see the app running.