Skip to content

Commit

Permalink
fix (get_cls_results): use np.empty for empty bbox rather than np.arr…
Browse files Browse the repository at this point in the history
…ary (#2116)
  • Loading branch information
ZwwWayne committed Feb 19, 2020
1 parent c0ac99e commit 1f4177b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmdet/core/evaluation/mean_ap.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def get_cls_results(det_results, annotations, class_id):
ignore_inds = ann['labels_ignore'] == (class_id + 1)
cls_gts_ignore.append(ann['bboxes_ignore'][ignore_inds, :])
else:
cls_gts_ignore.append(np.array((0, 4), dtype=np.float32))
cls_gts_ignore.append(np.empty((0, 4), dtype=np.float32))

return cls_dets, cls_gts, cls_gts_ignore

Expand Down

0 comments on commit 1f4177b

Please sign in to comment.