This repository contains a Content-Based Image Retrieval (CBIR) system that extracts features from a query image and retrieves similar images from a database. The system implements various image features, including color-based, texture-based, shape-based, and deep methods. It also supports feature fusion and dimension reduction.
- RGB Histogram: color.py
- Gabor Filter: gabor.py
- Detected Corners Similarity using SIFT and Harris: local_description.py
Some features may lack robustness, and feature fusion is implemented for enhancement.
- Feature Fusion: fusion.py
To address the curse of dimensionality, random projection is used.
- Random Projection: random_projection.py
The CBIR system evaluates images based on feature similarity using Mean Average Precision (MAP) metrics. The evaluation is implemented in evaluate.py.
| Method | Color | Daisy | Edge | Gabor | HOG | VGG Net | ResNet |
|---|---|---|---|---|---|---|---|
| Mean MAP (depth=10) | 0.614 | 0.468 | 0.301 | 0.346 | 0.450 | 0.914 | 0.944 |
- Clone the repository.
- Create a directory named
databaseand organize your images into subdirectories based on classes.
- Streamlit User Interface
streamlit run gui.py
- Alternatively you can run search queries via
query.pyscript.
Run the data augmentation script to get more images in the same directory.
python data_augmentation/augmentor.py <database_path> [flipv, fliph, noise, rot, trans, zoom, blur]