Skip to content

Commit

Permalink
Fix code rabbit confusing variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
NicDionne committed Oct 18, 2024
1 parent 1df8997 commit 513b633
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fiftyone/utils/cvat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 513b633

Please sign in to comment.