From db73d555a0bdee0d47bc8c5fce14d4ed7ace9196 Mon Sep 17 00:00:00 2001 From: LuukvandenBent <94459309+LuukvandenBent@users.noreply.github.com> Date: Thu, 30 Nov 2023 08:01:56 +0100 Subject: [PATCH] Fix mask dimensions mismatch in rtmdet-ins models after exporting to onnx (#2574) --- mmdeploy/mmcv/ops/nms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdeploy/mmcv/ops/nms.py b/mmdeploy/mmcv/ops/nms.py index b384d75d47..226eca48f2 100644 --- a/mmdeploy/mmcv/ops/nms.py +++ b/mmdeploy/mmcv/ops/nms.py @@ -369,7 +369,7 @@ def _multiclass_nms_single(boxes: Tensor, if pre_top_k > 0: bbox_index = pre_topk_inds[None, box_inds] if keep_top_k > 0: - bbox_index = bbox_index[:, topk_inds[:-1]] + bbox_index = bbox_index[:, topk_inds] return dets, labels, bbox_index else: return dets, labels