Code Monkey home page Code Monkey logo

516_lot1's Introduction

516_lot1: find similar images using global descriptors

todo list:
(1) descriptors generation
(2) kmeans clustering to generate vocabulary (mean of each cluster) (3) generate histogramme for each image in the base, save the histogrammes
(4) given a new test image, calculate hist, compare it to all the hists in the base
(5) get the ranking of closest hist
(6) changes parameters and run tests

Guide to use:

(1)first, run

python visualWordsGen.py

this code will generate descpritors for the train dataset (if descpts_addr = '') and use them to train a kmeans model (parameters can be
configurated in line 51), then the kmeans models (~ 1 hr for training) will be saved for further usage.

(2) second, test for a target image, run

python test.py

this code will generate histogram (global descriptors) for each image from trainset (if hist_addr = '', or it will load
from the existed hists previously saved (the pretrained kmeans models will be loaded and used).
Then, we just calculate the distance (default: euclidean distance), return the top 10 nearest neighbors in terms of distances from the target (index and image name).

516_lot1's People

Contributors

yihongxu avatar tbjszhu avatar

Watchers

James Cloos avatar  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.