Skip to content
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

Skip hand-object interactions when the object is below detection thre… #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Affonso-Gui
Copy link

Hello,

Thanks for the great work.

When testing the code, I had some errors when a hand-object pair has been detected, but the object had insufficient confidence value. This causes the object_centers list to be null, leading to the following error:

Traceback (most recent call last):
  File "test.py", line 49, in <module>
    im = renderer.render_detections(frames[frame_idx], video_detections[frame_idx])
  File "/home/affonso/epic-kitchens-100-hand-object-bboxes/src/public_lib/epic_kitchens/hoa/visualisation.py", line 93, in render_detections
    hand_object_idx_correspondences = detections.get_hand_object_interactions(
  File "/home/affonso/epic-kitchens-100-hand-object-bboxes/src/public_lib/epic_kitchens/hoa/types.py", line 309, in get_hand_object_interactions
    distances = ((object_centers - estimated_object_position) ** 2).sum(
ValueError: operands could not be broadcast together with shapes (0,) (2,) 

In this PR I am fixing this by skipping evaluation when the object_centers does not hold any values.

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.

1 participant