Coder Social home page Coder Social logo

py-cbir's Introduction

Demo of Content Based Image Retrieval, implemented by Python and Tornado.

Image descriptors

  • perceptual hash
  • Otsu's method
  • gray/RGB/YUV/HSV histograms
  • GIST
  • HoG and LSH (built by Kmeans clustering)
  • SIFT and LSH (built by Kmeans clustering)
  • Dense SIFT

Distance functions

  • Hamming distance, or norm0 distance (L0)
  • abs distance (L1)
  • Eculidean distance (L2)

Simple re-ranking

  • blending: mix results
  • ensembling: weighted sum

Code structure

  • util/: feature descriptors, feature and LSH preparation
  • app/: http server, matching and retrieval
  • templates/: html templates
  • static/: datasets, js, css
  • conf/: log.conf, and for feature data
  • logs/: for log data
  • settings.py: http port, common setting
  • urls.py: server url path

Dependencies

  • Tornado
  • Image
  • numpy, scipy

Run (Linux or Mac)

  • cd util/pyleargist-2.0.5/lear_gist/ && make && cp compute_gist ../../ && cd -
  • cd util && python prepare.py && cd -
  • python main.py
  • access http://localhost:19999/cbir

How to change dataset

  • add a new image folder in static/dataset/
  • in util/prepare.py, change dataset to the folder name, like dataset = 'ferrari'
  • run as previous section

Author

Any question, please contact: Zuotao Liu([email protected])

py-cbir's People

Contributors

fancyspeed 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.