Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pochih/CBIR
🏞 A content-based image retrieval (CBIR) system
https://github.com/pochih/CBIR
computer-vision daisy edges feature-fusion gabor histogram hog image-retrieval random-projection resnet vggnet
Last synced: 3 months ago
JSON representation
🏞 A content-based image retrieval (CBIR) system
- Host: GitHub
- URL: https://github.com/pochih/CBIR
- Owner: pochih
- Created: 2017-11-07T11:07:59.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-07T18:07:55.000Z (over 2 years ago)
- Last Synced: 2024-08-01T03:46:10.439Z (6 months ago)
- Topics: computer-vision, daisy, edges, feature-fusion, gabor, histogram, hog, image-retrieval, random-projection, resnet, vggnet
- Language: Python
- Homepage:
- Size: 2.88 MB
- Stars: 609
- Watchers: 16
- Forks: 211
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source-150x25.png?v=103)](https://github.com/ellerbrock/open-source-badges/)
## Intro
__This repository contains a CBIR (content-based image retrieval) system____Extract query image's feature, and retrieve similar ones from image database__
Image src
## Part1: Feature Extraction
In this system, I implement several popular image features:
- color-based
- [RGB histogram](https://github.com/pochih/CBIR/blob/master/src/color.py)
- texture-based
- [gabor filter](https://github.com/pochih/CBIR/blob/master/src/gabor.py)
- shape-based
- [daisy](https://github.com/pochih/CBIR/blob/master/src/daisy.py)
- [edge histogram](https://github.com/pochih/CBIR/blob/master/src/edge.py)
- [HOG (histogram of gradient)](https://github.com/pochih/CBIR/blob/master/src/HOG.py)
- deep methods
- [VGG net](https://github.com/pochih/CBIR/blob/master/src/vggnet.py)
- [Residual net](https://github.com/pochih/CBIR/blob/master/src/resnet.py)##### *all features are modulized*
### Feature Fusion
Some features are not robust enough, and turn to feature fusion
- [fusion.py](https://github.com/pochih/CBIR/blob/master/src/fusion.py)### Dimension Reduction
The curse of dimensionality told that vectors in high dimension will sometimes lose distance property
- [Random Projection](https://github.com/pochih/CBIR/blob/master/src/random_projection.py)## Part2: Evaluation
CBIR system retrieves images based on __feature similarity__
Robustness of system is evaluated by MMAP (mean MAP), the evaluation formulas is refer to here
- image AP : average of precision at each hit
- depth=K means the system will return top-K images
- a correct image in top-K is called a hit
- AP = (hit1.precision + hit2.precision + ... + hitH.precision) / H
- class1 MAP = (class1.img1.AP + class1.img2.AP + ... + class1.imgM.AP) / M
- MMAP = (class1.MAP + class2.MAP + ... + classN.MAP) / NImplementation of evaluation can found at [evaluate.py](https://github.com/pochih/CBIR/blob/master/src/evaluate.py)
My database contains 25 classes, each class with 20 images, 500 images in total, depth=K will return top-K images from database
Method | color | daisy | edge | gabor | HOG | vgg19 | resnet152
--- | --- | --- | --- |--- |--- |--- |---
Mean MAP (depth=10) | 0.614 | 0.468 | 0.301 | 0.346 | 0.450 | 0.914 | 0.944## Part3: Image Retrieval (return top 5 of each method)
Let me show some results of the system### query1 - women dress
#### query
#### color
#### daisy
#### edge
#### gabor
#### HOG
#### VGG19
#### Resnet152### query2 - orange
#### query
#### color
#### daisy
#### edge
#### gabor
#### HOG
#### VGG19
#### Resnet152### query3 - NBA jersey
#### query
#### color
#### daisy
#### edge
#### gabor
#### HOG
#### VGG19
#### Resnet152### query4 - snack
#### query
#### color
#### daisy
#### edge
#### gabor
#### HOG
#### VGG19
#### Resnet152## Part4: Usage of Repository
If you are interesting with the results, and want to try your own images,Please refer to [USAGE.md](https://github.com/pochih/CBIR/blob/master/USAGE.md)
The details are written inside.
## Author
Po-Chih Huang / [@pochih](http://pochih.github.io/)