Skip to content

Commit

Permalink
Fix aug test error when the number of prediction bboxes is 0 (#6398)
Browse files Browse the repository at this point in the history
* Fix aug test error when the number of prediction bboxes is 0

* test

* test

* fix lint
  • Loading branch information
hhaAndroid authored Nov 2, 2021
1 parent db256a1 commit 8e297ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mmdet/models/dense_heads/dense_test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def aug_test_bboxes(self, feats, img_metas, rescale=False):

if merged_bboxes.numel() == 0:
det_bboxes = torch.cat([merged_bboxes, merged_scores[:, None]], -1)
return det_bboxes, merged_labels
return [
(det_bboxes, merged_labels),
]

det_bboxes, keep_idxs = batched_nms(merged_bboxes, merged_scores,
merged_labels, self.test_cfg.nms)
Expand Down

0 comments on commit 8e297ff

Please sign in to comment.