Giter Club home page Giter Club logo

image_retrieval_paper_implementation's Introduction


content based image retrieval


Here is the scenario: Given a query image, retrieve similar images from an image database ?

Assuming you have an image of an object but you don't know what name it is called, or what characteristics it has. Then, you might want to do an image search on Yandex, Google or Baidu to help retrieve similar images to your query image. Once retrieved, you could know everything you want about your query image based on the similar images retrieved-assuming the retrieval system works well and retrieves the correct/actual matching images.

This repository is an attempt to develop a mini image retrieval system. This has important use in medicine, industrial automation and other domains. It will be shown that Neural networks are very good at computing similarities between objects activation feature vectors than the metric similarity measures (eg euclidean distance) we are familiar with: this fact will be important for the image retrieval task.

3 factors are important:

  • using the activation layers as feature vectors
  • Having a labelled data for training image pair (feature vectors as input and similarity score as target)
  • The target score will be derived using structural similarity index/ euclidean distance with some heuristics to get easy and difficult pair scores

As an example, this is a query image, selected randomly from the internet:

alt-text

Task: retrieve the top-10 similar objects to the random image using euclidean distance as similarity measure:

alt-text

Example, retrieve top-10 similar objects using structural similarity index as similarity measure. This gives better performance. Could you spot the difference ?:

alt-text

Or use ssim divided by the euclidean distance. Try to retrieve top-30 images to cinfirm that this does better: alt-text

Or using Neural network for similarity score prediction:

alt-text

The Neural model was trained just for 5 epochs!


How to Reproduce this result

* Clone this repository
* Download the preprocessed data (see link to the data folder below)
* Place the ipython notebook `CBIR.ipynb` in same folder as the downloaded data
* Run the ipython notebook (note: you could retrain your own neural model)
* No need to rerun the data preprocessing part of the notebook (if you want, you could)
* Enjoy !

Pre-processed Data for Running Model

The folder containing the preprocessed data is in the link below:

Public Data Folder


Dataset

The training was based on the caltech 101 object category data set.

Caltech Category Objects Database

image_retrieval_paper_implementation's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

linghushaoxia

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.