Skip to content

Commit

Permalink
Fix nms error of CornerNet when there is no prediction box (open-mmla…
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaAndroid authored Jan 10, 2021
1 parent 4689a73 commit 6cdb0a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmdet/models/dense_heads/corner_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ def _get_bboxes_single(self,
return detections, labels

def _bboxes_nms(self, bboxes, labels, cfg):
if labels.numel() == 0:
return bboxes, labels
out_bboxes, keep = batched_nms(bboxes[:, :4], bboxes[:, -1], labels,
cfg.nms_cfg)
out_labels = labels[keep]
Expand Down

0 comments on commit 6cdb0a3

Please sign in to comment.