Code Monkey home page Code Monkey logo

information-retrieval's Introduction

Image similarity search using deep learning

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.

Results

alt text alt text alt text

Environment

==compiler==: python 3.11

==packages==: Flask PyQt5 numpy tensorflow Flask-HTTPAuth scipy imageio matplotlib sklearn

==editor==: Visual Studio Code

==programming language==: html( css, javascript ), python

How to run

  1. Download imagenet folder, extraxt and keep it in server directory
  2. Download datasets for footwares, apparels keep them inside a directory under upload folder. Final folder strcture will be as below
├─.idea
│  └─inspectionProfiles
├─.vscode
├─assets
└─server
    ├─database
    │  ├─dataset
    │  └─tags
    ├─imagenet
    ├─images
    ├─static
    │  ├─images
    │  └─result
    ├─templates
    ├─uploads
    └─__pycache__
  1. 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
  python server/image_vectorizer.py 

This will generate two files namely, image_list.pickle and saved_features.txt. Keep them inside lib folder where search.py script is available.

  1. Start the server by running rest-server.py. This project uses flask based REST implementation for UI
  python server/rest-server.py 
  1. 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.

information-retrieval's People

Contributors

jingziccc avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.