Skip to content

adhok/Searching-Similar-Images-using-VAE

Repository files navigation

Searching Similar Images of fruits using VAE

This repository contains code for a simple image search engine using Flask & Pytorch trained model. The VAE model was trained using the Fruits 360 data that can be found on Kaggle. The script to get the trained model object (checkpoint.pth) can be found here

Credits

Files & their functions

* server.py - running this file will activate the local application, where the user will choose images. This python file also generates embedding.npy & img_paths.json
* embedding.npy - embedding of each image stored in '.static/img/'
* img_paths.json - This keeps a record of all the images in '.static/img/'
* requirements.txt - List of libraries used for this application.
* feature_extractor.py - This contains functions that will be used by the application to extract image embeddings.

* model/ 
  - checkpoint.pth - This is the saved model file
* templates/
  - index.html - File that contains information about the UI of the app
* static
  - img/ 
    - Contains All the images that are used to construct the embeddings
  - uploaded/
    - Contains images that are uploaded into the application.

Demo

alt text

Running the Demo

Run the following and open http://0.0.0.0:5000/

gh repo clone adhok/Searching-Similar-Images-using-VAE
cd Searching-Similar-Images-using-VAE
pip install -r requirements.txt
python server.py

Feedback

Please let me know if you have any feedback. You can send me an email on padhokshaja@gmail.com

About

Image Search Using Embeddings Extracted from VAE

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published