Skip to content

Commit 30836ba

Browse files
committed
fix: fix rle decode bug for empty string
1 parent 43d1223 commit 30836ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

next_cvat/types/mask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def rle_decode(self) -> np.ndarray:
182182
Returns:
183183
A numpy 2D array of booleans representing the decoded mask
184184
"""
185-
counts = np.array([int(x) for x in self.rle.split(",")])
185+
counts = np.array([int(x) for x in self.rle.split(",")] if self.rle != "" else [])
186186
total_pixels = self.height * self.width
187187

188188
# Calculate positions where values change

0 commit comments

Comments
 (0)