Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve instance visualization doesn't work #108

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions t4_devkit/viewer/rendering_data/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _append_with_box(self, box: Box3D) -> None:
self.velocities.append(box.velocity)

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

if box.future is not None:
self.future.append(box.future)
Expand Down Expand Up @@ -147,6 +147,7 @@ def as_boxes3d(self) -> rr.Boxes3D:
rotations=self.rotations,
labels=labels,
class_ids=self.class_ids,
show_labels=False,
)

def as_arrows3d(self) -> rr.Arrows3D:
Expand Down Expand Up @@ -226,7 +227,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[:6])
self.uuids.append(box.uuid)

def _append_with_elements(self, roi: RoiType, class_id: int, uuid: str | None = None) -> None:
self.rois.append(roi)
Expand All @@ -248,4 +249,5 @@ def as_boxes2d(self) -> rr.Boxes2D:
array_format=rr.Box2DFormat.XYXY,
labels=labels,
class_ids=self.class_ids,
show_labels=False,
)
6 changes: 2 additions & 4 deletions t4_devkit/viewer/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ def _render_box3ds_with_boxes(self, seconds: float, boxes: Sequence[Box3D]) -> N
for box in boxes:
if box.frame_id not in box_data:
box_data[box.frame_id] = BoxData3D(label2id=self.label2id)
else:
box_data[box.frame_id].append(box)
box_data[box.frame_id].append(box)

for frame_id, data in box_data.items():
# record boxes 3d
Expand Down Expand Up @@ -371,8 +370,7 @@ def _render_box2ds_with_boxes(self, seconds: float, boxes: Sequence[Box2D]) -> N
for box in boxes:
if box.frame_id not in box_data:
box_data[box.frame_id] = BoxData2D(label2id=self.label2id)
else:
box_data[box.frame_id].append(box)
box_data[box.frame_id].append(box)

for frame_id, data in box_data.items():
rr.log(
Expand Down
Loading