From 513b6338101e34b6cdceb3773be8fb4fda9e3aa6 Mon Sep 17 00:00:00 2001 From: NicDionne Date: Thu, 17 Oct 2024 22:20:34 -0400 Subject: [PATCH] Fix code rabbit confusing variable name --- fiftyone/utils/cvat.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fiftyone/utils/cvat.py b/fiftyone/utils/cvat.py index 8e8d72e687..aeb1da1e5a 100644 --- a/fiftyone/utils/cvat.py +++ b/fiftyone/utils/cvat.py @@ -1598,10 +1598,7 @@ def rle_to_binary_image_mask(rle, mask_width, mask_height) -> np.ndarray: mask[counter : counter + val] = 1 counter += val - return mask.reshape(mask_width, mask_height) - # mask = np.zeros(mask_width * mask_height, dtype=np.uint8) - # mask[np.add.accumulate(rle)[::2]] = 1 - # return mask.reshape(mask_width, mask_height) + return mask.reshape(mask_height, mask_width) @staticmethod def mask_to_cvat_rle(binary_mask: np.ndarray) -> np.array: @@ -7119,7 +7116,7 @@ def to_instance_detection(self): round(ybr - ytl) + 1, ) # We need to add 1 because cvat uses - 1 mask = HasCVATBinMask.rle_to_binary_image_mask( - rel, mask_width=mask_h, mask_height=mask_w + rel, mask_height=mask_h, mask_width=mask_w ) bbox = [ xtl / frame_width,