Skip to content

Commit

Permalink
refactor: make shorter the uuid length (#81)
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <[email protected]>
  • Loading branch information
ktro2828 authored Dec 28, 2024
1 parent d7e8ad7 commit 91df6a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t4_devkit/viewer/rendering_data/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _append_with_box(self, box: Box2D) -> None:
self.class_ids.append(self.label2id[box.semantic_label.name])

if box.uuid is not None:
self.uuids.append(box.uuid)
self.uuids.append(box.uuid[:6])

def _append_with_elements(self, roi: RoiType, class_id: int, uuid: str | None = None) -> None:
self.rois.append(roi)
Expand Down
4 changes: 3 additions & 1 deletion t4_devkit/viewer/rendering_data/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def append(self, mask: NDArrayU8, class_id: int, uuid: str | None = None) -> Non
)
self.masks.append(mask)
self.class_ids.append(class_id)
self.uuids.append(uuid)

if uuid is not None:
self.uuids.append(uuid[:6])

def as_segmentation_image(self) -> rr.SegmentationImage:
"""Return mask data as a `rr.SegmentationImage`.
Expand Down

0 comments on commit 91df6a1

Please sign in to comment.