Merge pull request #72 from coolzilj/patch-1

Fix "not enough values to unpack" error for ResizeMask
This commit is contained in:
Jukka Seppänen 2024-05-16 10:59:34 +03:00 committed by GitHub
commit 2f6e38220c
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)