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

Detection eval - Fix bug if first key has no boxes #408

Merged
merged 3 commits into from
Jun 9, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix bug if first key has no boxes
  • Loading branch information
holger-motional committed Jun 2, 2020
commit 90bd456454539f3caec3f42f3ec9556562a94bbb
7 changes: 5 additions & 2 deletions python-sdk/nuscenes/eval/common/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,11 @@ def filter_eval_boxes(nusc: NuScenes,
"""
# Retrieve box type.
assert len(eval_boxes.boxes) > 0
first_key = list(eval_boxes.boxes.keys())[0]
box = eval_boxes.boxes[first_key][0]
box = None
for val in eval_boxes.boxes.values():
holger-motional marked this conversation as resolved.
Show resolved Hide resolved
if len(val) > 0:
box = val[0]
break
if isinstance(box, DetectionBox):
class_field = 'detection_name'
elif isinstance(box, TrackingBox):
Expand Down