Interesting read. Especially the lookup method based on partitioning.<p>I tried to implement a similar reverse image search based on dHash as explained here <a href="https://github.com/Rayraegah/dhash" rel="nofollow">https://github.com/Rayraegah/dhash</a> . However, I also had lookup performance problems. Exact matches are not a problem but the Hamming distance threshold matching is. Because my project was in Python, I tried to eke out more performance by writing a BK-tree backend module in C++ <a href="https://github.com/mxmlnkn/cppbktree" rel="nofollow">https://github.com/mxmlnkn/cppbktree</a> It was 2 to 10x faster than an existing similar module but still was too slow when trying to look up something in a database of millions of images. However, as lookup tended to depend on the exact Hamming-distance threshold value, my next step would have been to try and optimize the hash. E.g, make it shorter so that only a short Hamming distance is necessary to be looked up but the mentioned multi-indexing method looks much more promising and tested.