Git Product home page Git Product logo

image-retriever's People

Contributors

melchek avatar zyishai avatar

Watchers

 avatar  avatar  avatar

image-retriever's Issues

Organize code

Improve readability and modularity of existing code, and add helper functions to enable debugging and visualizing of computations.

Implement Correlogram Localization

Reference: Article's section 6.1.1.

Description: For each offset, sum both Correlogram contribution as well as Histogram contribution and take the maximum.

Correlogram contribution is calculated by the difference between the autocorrelogram for query image that corresponds to the color of the offset pixel, and the local autocorrelogram of the sub image in the big image at location of the offset.

Translate from color image to numeric representation

Transform image object to 2d numeric representation of the image, where each cell gets a label based on its KMean's cluster.

This has two advantages:

  1. Working with numeric array is much faster than working with Numpy's arrays and OpenCV's colors.
  2. Two different colors will get the same numeric representation, if they are in the same cluster (simplify equality check).

Micro optimization: take only few major colors

Problem: when calculating a correlogram, we should calculate specific correlogram for each two colors combination and for each distance. In an image, there are possibly 2563 different color combinations. Even for small images (e.g 160x160) that's too much (25600! options, not including different distances!!).

Suggested Solution: take only few major colors of the image, preferably colors that are close to each other (local correlations between colors are more significant than global correlations). This will also allow us to use relatively small distance.

Parallelization of calculations

To calculate correlogram of an image, we need to run for each two colors and for each distance the specific correlogram calculation. These calculations does not depend on each other, so we can parallelize them.

Task: move calculations to a queue and allow workers to calculate them asynchronously.

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.