Fix "not enough values to unpack" error for ResizeMask

This commit is contained in:
Jin Liu 2024-05-16 15:06:02 +08:00 committed by GitHub
parent 7e6bd8d14a
commit c4c63fce73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1200,7 +1200,7 @@ Resizes the mask or batch of masks to the specified width and height.
def resize(self, mask, width, height, keep_proportions):
if keep_proportions:
_, oh, ow, _ = mask.shape
_, oh, ow = mask.shape
width = ow if width == 0 else width
height = oh if height == 0 else height
ratio = min(width / ow, height / oh)