Skip to content

Commit

Permalink
Fix scores not contiguous error in centernet_head. (open-mmlab#6016)
Browse files Browse the repository at this point in the history
* Update centernet_head.py

* Update centernet_head.py

* Update centernet_head.py

* Update centernet_head.py

* Update centernet_head.py
  • Loading branch information
ypwhs authored Sep 7, 2021
1 parent 003f520 commit 460934d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmdet/models/dense_heads/centernet_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ def _bboxes_nms(self, bboxes, labels, cfg):
if labels.numel() == 0:
return bboxes, labels

out_bboxes, keep = batched_nms(bboxes[:, :4], bboxes[:, -1], labels,
out_bboxes, keep = batched_nms(bboxes[:, :4].contiguous(),
bboxes[:, -1].contiguous(), labels,
cfg.nms_cfg)
out_labels = labels[keep]

Expand Down

0 comments on commit 460934d

Please sign in to comment.