From 339f7ae2bc7e612889e634484854c162b6ba9816 Mon Sep 17 00:00:00 2001 From: AllentDan <41138331+AllentDan@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:00:03 +0800 Subject: [PATCH] Fix MRCNN visualization due to error condition for mask resize (#1767) --- mmdeploy/codebase/mmdet/deploy/object_detection_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdeploy/codebase/mmdet/deploy/object_detection_model.py b/mmdeploy/codebase/mmdet/deploy/object_detection_model.py index f31084acc9..28e3006fc1 100644 --- a/mmdeploy/codebase/mmdet/deploy/object_detection_model.py +++ b/mmdeploy/codebase/mmdet/deploy/object_detection_model.py @@ -254,7 +254,7 @@ def forward(self, else: masks = masks[:, :img_h, :img_w] # avoid to resize masks with zero dim - if rescale and masks.shape[0] != 0: + if export_postprocess_mask and rescale and masks.shape[0] != 0: masks = torch.nn.functional.interpolate( masks.unsqueeze(0), size=[