Skip to content
Merged
Changes from all commits
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
14 changes: 10 additions & 4 deletions mmdet/models/roi_heads/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ def simple_test_bboxes(self,
num_proposals_per_img = tuple(len(p) for p in proposals)
rois = rois.split(num_proposals_per_img, 0)
cls_score = cls_score.split(num_proposals_per_img, 0)
# some detector with_reg is False, bbox_pred will be None
bbox_pred = bbox_pred.split(
num_proposals_per_img,
0) if bbox_pred is not None else [None, None]
# the type of bbox_pred in sabl is tuple not Tensor
if isinstance(bbox_pred, torch.Tensor):
# some detector with_reg is False, bbox_pred will be None
bbox_pred = bbox_pred.split(
num_proposals_per_img,
0) if bbox_pred is not None else [None, None]
else:
# some detector with_reg is False, bbox_pred will be None
bbox_pred = (
bbox_pred, ) if bbox_pred is not None else [None, None]

# apply bbox post-processing to each image individually
det_bboxes = []
Expand Down