Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LSH knnSerach slow in large dataset

I'm using python version of OpenCV 4.2 and I'm trying to do feature matching inside a large dataset (10K low resolution images) using cv2.flann_Index().

I do need optimal performance in feature detection of "key" image and search. But I'm stuck.

Using AKAZE and KDTree (and after hours of parameters tuning) I do achieve a barely acceptable performance in searching (50ms-100ms over 5 million descriptors) but detectAndCompute takes more than expected (30-50ms for 400-900 descriptors). Memory consumption is also an issue (KAZE descriptors are 64 floats).

ORB + LSH looks promising (32 int descriptors) but the results (in terms of speed) are much worse, especially in knnSearch. I've tried with different parameters but the best result i get is 2000ms per search (table_number=8, key_size=32, multi_probe_level=0) and ORB's detectAndCompute is not faster than AKAZE's (I've read some papers stating it should be a lot faster).

Am I doing something conceptually wrong?

click to hide/show revision 2
None

updated 2020-04-08 10:32:53 -0600

berak gravatar image

LSH knnSerach slow in large dataset

I'm using python version of OpenCV 4.2 and I'm trying to do feature matching inside a large dataset (10K low resolution images) using cv2.flann_Index().

I do need optimal performance in feature detection of "key" image and search. But I'm stuck.

Using AKAZE and KDTree (and after hours of parameters tuning) I do achieve a barely acceptable performance in searching (50ms-100ms over 5 million descriptors) but detectAndCompute takes more than expected (30-50ms for 400-900 descriptors). Memory consumption is also an issue (KAZE descriptors are 64 floats).

ORB + LSH looks promising (32 int descriptors) but the results (in terms of speed) are much worse, especially in knnSearch. I've tried with different parameters but the best result i get is 2000ms per search (table_number=8, key_size=32, multi_probe_level=0) and ORB's detectAndCompute is not faster than AKAZE's (I've read some papers stating it should be a lot faster).

Am I doing something conceptually wrong?