Every day of life will be a surprise and a miracle.
The goal is to implement a content-based image retrieval system that supports multiple methods. Of course, it is mainly a demonstration rather than a real-world application.
Note: This is not a complete project, it exists as a homework for HZAU Summer Training 2020 - Content Based Image Retrieval.
Simple Demo, just repeat two tutorials of pyImageSearch. Lack of availability and quality assurance.
- Refactor to rationalize code.
- More reasonable work flow, minimize manual operation.
- More effective search.
- Support uploading files
- Randomly selecting pictures in the gallery.
- Improve retrieval speed.
- Support more search methods.
- Better UI.
- Access Control.
- Others - Basic Guides. (?)
Since the project is not yet perfect, here is only an overview of the process rather than specific steps.
-
Clone this repository.
git clone git@github.com:PsiACE/polydomino.git
-
Put the images (JPG Only) into the dataset folders.
-
Install dependencies.
pip install pipenv && pipenv install
-
Index pictures.
python polydomino/index.py --dataset "dataset/*" --index mse.csv --method mse
-
Select pictures to search.
- For web, you should edit
.env
to choose algo. Then runpython polydomino/app.py
- For cli, just one line like this
python polydomino/search.py --index polydomino/mse.csv --query 0007.jpg --features mse --searcher mse
- For web, you should edit
Feature extraction algorithms include: 3D-HSV Histogram, Color Moments, Gray Matrix, dHash, Hu Moments, etc.
Search algorithm based on statistical method: Euclidean Distance, Manhattan Distance, Hamming Distance, Cosine Similarity, Pearson Similarity, Spearman Similarity, etc.
Chojan Shang - @PsiACE - psiace@outlook.com
Project Link: https://github.com/psiace/polydomino
Licensed under MIT license (LICENSE or http://opensource.org/licenses/MIT)
Two Tutorials by pyImageSearch