Skip to content

Commit 9d08895

Browse files
Add a docstring
1 parent a74c3d9 commit 9d08895

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/labelformat/model/binary_mask_segmentation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ def decode_column_wise_rle(
139139
def _compute_bbox_from_rle(
140140
rle_row_wise: list[int], width: int, height: int
141141
) -> BoundingBox:
142+
"""Compute bounding box from row-wise RLE.
143+
144+
Scans through the RLE and tracks the min/max x/y coordinates of the '1' pixels.
145+
The time complexity is O(len(rle_row_wise)).
146+
"""
142147
xmin = width
143148
ymin = height
144149
xmax = 0

0 commit comments

Comments
 (0)