-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use average coordinate of merged keypoints during NMS #711
base: master
Are you sure you want to change the base?
Conversation
…re-retrieval-baseline
…re-retrieval-baseline
…re-retrieval-baseline
…re-retrieval-baseline
# Modify global keypoint coordinate to be set to average value of merged detections, instead of | ||
# using the first identified coordinate. | ||
updated_uv = np.mean([per_image_kpt_coordinates[i][img_global_kpt_idx], uv], axis=0) | ||
per_image_kpt_coordinates[i][img_global_kpt_idx] = updated_uv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you take the mean after you've determined which keypoints are to be merged?
is_identical = np.any(diff_norms == 0) | ||
if len(per_image_kpt_coordinates[i]) > 0 and is_identical: | ||
is_duplicate = np.any(diff_norms <= self.nms_merge_radius) | ||
if len(per_image_kpt_coordinates[i]) > 0 and is_duplicate: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you tested with len(per_image_kpt_coordinates[i]) == 0? does the <=
work with empty arrrays?
Also np.any should be false in that case, so you would not need that condition at all?
No description provided.