Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.04 KB

README.md

File metadata and controls

38 lines (24 loc) · 1.04 KB

A simple image retrieval demo with pytorch and flask

This is a simple demo of image retrieval based on pretrained CNN.

Demo.

The demo video is shown downside. image

Usage.

Please install requirements.txt first:

$ pip install requirements.txt

Get the pretrained CNN model from this link and put the model in path "./retrieval/models/".

run the following command:

$ python image_retrieval_cnn.py

Your computer where the code run will work as a server, other terminals within the same LAN network can visit the website: "http://XXX.XXX.XXX.XXX:8080/", where "XXX.XXX.XXX.XXX" is ip of the server, type "ifconfig" in command widow to get it.

Only Test.

If you only want to test the retrieval proccess, just read the code image_retrieval_cnn.py for reference, and run the following command:

$ cd retieval/
$ python retrieval.py

The sorted images will be printed.