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=[