Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had the same issue with LSH descriptor matching. I have played around quite a bit with the parameters. I found that the main factor slowing down the process is the use of the multi-probe (third parameter). The multi-probe LSH is a special case of LSH which is meant to improve matching accuracy at the cost of a much higher matching time. The simple LSH (without multi-probe) is much faster (about 10x) and for a low number of descriptors (<10000) the drop in accuracy is not that significant. For 1000x1000 descriptor matching, I get a processing time of about 2 ms on a powerful laptop (about 4.5 ms for brute-force matching). To disable multi-probe, just set the multi-probe parameter (thrid parameter of the LSHIndexParams constructor) to 1.

Lastly, when you call the macthing methods, they always call the train method first. A simple workaround is to derive the FlannBasedMatcher class to make the matchImpl methods public. But then, it is up to you to make sure that the LSH search index has been trained before you invoke a matching method.

I had the same issue with LSH descriptor matching. I have played around quite a bit with the parameters. I found that the main factor slowing down the process is the use of the multi-probe (third parameter). The multi-probe LSH is a special case of LSH which is meant to improve matching accuracy at the cost of a much higher matching time. The simple LSH (without multi-probe) is much faster (about 10x) and for a low number of descriptors (<10000) the drop in accuracy is not that significant. For 1000x1000 descriptor matching, I get a processing time of about 2 ms on a powerful laptop (about 4.5 ms for brute-force matching). To disable multi-probe, just set the multi-probe parameter (thrid parameter of the LSHIndexParams constructor) to 1.

Lastly, when you call the macthing methods, they always call the train method first. A simple workaround is to derive the FlannBasedMatcher class to make the matchImpl xxxMatchImpl methods public. But then, it is up to you to make sure that the LSH search index has been trained before you invoke a matching method.