News for hackers. Stuff that matters.

rhsimplex

Hi everyone, I'm the author of the underlying image matching library ( https://github.com/ascribe/image-match ). First, thank you Alex for your contribution -- it makes image-match much more useful for the typical user.

Just to answer a couple of questions in the comments:

Goldberg's algorithm (the one used in the image-match library) is not very robust against arbitrary rotation -- around +/- 5 degrees should be ok. 90 degree rotations, mirror images, and color inversion are handled with the `all_orientations` parameter but under the hood this is just manipulating the image array and searching multiple times.

Even though the hash is a vector, and the similarity is a vector distance, when it's time to search for an image, we don't compute every distance. The hash vector is binned into integer "words" and we lookup against these columns. Only if there is a hit is the full signature computed. You can find more details in the Goldberg paper ( http://www.cs.cmu.edu/~hcwong/Pdfs/icip02.ps ).

Our original use case was a web image crawler, and hopefully we can release that code someday too. In the meantime, if you decide to roll your own crawler, be sure to Elasticsearch's bulk API ( https://www.elastic.co/guide/en/elasticsearch/reference/curr... ) for the crawlers so as not to burden the Elasticsearch cluster too much. We were able to get well over 10k inserts/s on a 5-node Elasticsearch cluster (I don't remember how many worker nodes...the whole thing is IO limited waiting for images to download for processing, so there is even more optimization to be had there).

Thanks again, Alex!

Re:Image-Match: Open-source scalable reverse image search on Thursday March 10, 2016 @10:22AM (#11259674)
Thank you for the suggestion. I actually did try restricting the terms by measuring correlation between columns -- the idea being that more discriminating terms should be searched first. This did result in modest speedups.

Fortunately or unfortunately, we were already achieving pretty good speed with Elasticsearch so we didn't implement it. However, it didn't occur to me to try a MoreLikeThis query, which should be even simpler -- I will look into it!

Re:Image-Match: Open-source scalable reverse image search on Thursday March 10, 2016 @03:45AM (#11258005)
Hey, author here. We were using the code internally and it was kind of a mess so I fixed it up under my own repository before forking it into ascribe's repository.

Rest assured, this is the correct one!