Skip to content

Commit 223bc5c

Browse files
Create README.md
added readme
1 parent 9bb7585 commit 223bc5c

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Image similarity search using deep learning
2+
This project demonstrates, how we can make use of deep learning to do state-of-the-art image similarity search. I have used tensorflow and some publicly available datasets.
3+
4+
## Results
5+
![alt text](https://cdn-images-1.medium.com/max/800/1*dd0QDhLZAjBKD5JZgJCI9w.png)
6+
![alt text](https://cdn-images-1.medium.com/max/800/0*ziXWbDIrdW_qJMCL.png)
7+
![alt text](https://cdn-images-1.medium.com/max/800/0*gL9UZQFdwFk-9smY.png)
8+
9+
## How to run
10+
1. Download [imagenet](https://drive.google.com/open?id=1UOyZ8166qM3SzxGvaUeWpBzSUfoQLUjJ) folder, extraxt and keep it in server directory
11+
2. Download datasets for [footwares](http://vision.cs.utexas.edu/projects/finegrained/utzap50k/), [apparels](http://mmlab.ie.cuhk.edu.hk/projects/DeepFashion/InShopRetrieval.html) keep them inside a directory under upload folder. Final folder strcture will be as below
12+
```
13+
root folder
14+
15+
└───lib
16+
17+
└───server
18+
| │───rest-server.py
19+
| │───imagenet
20+
| │───static
21+
| │───templates
22+
| │───uploads
23+
| │────dogs_and_cats
24+
| │────shoes
25+
| │────sandals
26+
| │────slippers
27+
| │────boots
28+
| │────apparels
29+
```
30+
3. Run image vectorizer which passes each data through an inception-v3 model and collects the bottleneck layer vectors and stores in disc. Edit dataset paths accordingly indide the image_vectorizer.py
31+
```
32+
python server/image_vectorizer.py
33+
```
34+
This will generate two files namely, image_list.pickle and saved_features.txt. Keep them inside lib folder where search.py script is available.
35+
36+
4. Start the server by running rest-server.py. This project uses flask based REST implementation for UI
37+
```
38+
python server/rest-server.py
39+
```
40+
5. Once the server starts up, access the url 127.0.0.1:5000 to get the UI. Now upload any file and see 9 similar images. You can change the value of K from 9 to any values, but dont foreget to update the html file accordingly for displaying.
41+
42+
One interesting application of this project is a recommendation engine based on image features.Here is an example of similar project of mine. Here instead of a web UI i have used an android UI. Once the user clicks a product image, the image will go to the server and k-number of similar product images can be displayed on UI as product recommendations. Theses rescommendations are purely based on image similarity. This kind of recommendations have high potentials in fashion-based ecommerce industry.
43+
44+
![Example Results](server/static/images/result1.jpg)
45+
![Example Results](server/static/images/result2.jpg)
46+

0 commit comments

Comments
 (0)