Content-Based Image Retrieval System Implemented Using Python, Flask And OpenCV.
- Given a query image, this app returns other images from database in order of similar color content.
- Uses a color histogram to define the color content of an image, uses chi-squared distance to determine how similar two image histograms are.
-
To use a different image dataset (optional)
- Populate image DB in
app/static/images
- Then in Terminal:
>> python3 -m venv venv >> source venv/bin/activate >> pip install -r requirements.txt >> cd app >> python index.py --dataset static/images --index index.csv
- Populate image DB in
-
Run locally using Docker
- Install Docker
- Then in Terminal:
>> docker build --tag=imagesearch . >> docker run -p 80:8000 imagesearch
- You should be able to access app at
localhost:80
in browser
Project was made possible thanks to the many guides provided by @Adrian Rosebrock on pyimagesearch.com