Skip to content

not limitKps inside Feature2D::generateKeypoints when using pyDetector#1223

Merged
matlabbe merged 2 commits intointrolab:masterfrom
hellovuong:mismatch_kp_desc_superpoint
Feb 26, 2024
Merged

not limitKps inside Feature2D::generateKeypoints when using pyDetector#1223
matlabbe merged 2 commits intointrolab:masterfrom
hellovuong:mismatch_kp_desc_superpoint

Conversation

@hellovuong
Copy link
Copy Markdown
Contributor

This only happens with SuperPoint. Rtabmap will limit key points if exceeds the limit set by Kp/MaxFeatures THEN it will generate descriptors based on extracted key points. It will work classic Features Extraction method. However, SuperPoint will generate key points and descriptors at the same time, if the limit key points method calls inside the extract key point method it will lead to a mismatched number of key points and descriptors later when the generate descriptor method calls. It is solved by ignoring the limit key points method inside the generate key point method and only limiting key points after generating the descriptors if necessary.

@hellovuong
Copy link
Copy Markdown
Contributor Author

hellovuong commented Feb 26, 2024

Sorry, there is a wrong pull. I will fix it soon! FIXED

@matlabbe
Copy link
Copy Markdown
Member

matlabbe commented Feb 26, 2024

Good catch. I'll merge it now as it can cause errors, but I opened a new issue #1225 to think about supporting that feature for PyDetector. Without this patch, the workaround would be to set Vis/MaxFeatures=0 and limit the keypoints/descriptors inside the python file. For the visual word dictionary, Kp/MaxFeatures should still work as expected.

@matlabbe matlabbe merged commit 752ca76 into introlab:master Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants