Skip to content

Commit 747d1c3

Browse files
committed
remove score filtering in rtmdet_head rewriter since it leads to error shape in batch inference (#1762)
1 parent 5e6a8e0 commit 747d1c3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mmdeploy/codebase/mmdet/models/dense_heads/rtmdet_head.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ def __mark_pred_maps(cls_scores, bbox_preds):
8383
br_x = (priors[..., 0] + flatten_bbox_preds[..., 2])
8484
br_y = (priors[..., 1] + flatten_bbox_preds[..., 3])
8585
bboxes = torch.stack([tl_x, tl_y, br_x, br_y], -1)
86-
# directly multiply score factor and feed to nms
87-
max_scores, _ = torch.max(flatten_cls_scores, 1)
88-
mask = max_scores >= cfg.score_thr
89-
scores = flatten_cls_scores.where(mask, flatten_cls_scores.new_zeros(1))
86+
scores = flatten_cls_scores
9087
if not with_nms:
9188
return bboxes, scores
9289

0 commit comments

Comments
 (0)