Skip to content
Merged
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
66 changes: 37 additions & 29 deletions t4_devkit/helper/rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,23 @@ def render_scene(
first_camera_tokens=first_camera_tokens,
max_timestamp_us=max_timestamp_us,
)
)

# TODO(ktro2828): speed up annotation rendering
self._render_annotation3ds(
viewer=viewer,
first_sample_token=scene.first_sample_token,
max_timestamp_us=max_timestamp_us,
future_seconds=future_seconds,
)
self._render_annotation2ds(
viewer=viewer,
first_sample_token=scene.first_sample_token,
max_timestamp_us=max_time_seconds,
+ [
self._executor.submit(
self._render_annotation3ds(
viewer=viewer,
first_sample_token=scene.first_sample_token,
max_timestamp_us=max_timestamp_us,
future_seconds=future_seconds,
)
),
self._executor.submit(
self._render_annotation2ds(
viewer=viewer,
first_sample_token=scene.first_sample_token,
max_timestamp_us=max_timestamp_us,

Copilot AI Aug 29, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line fixes a bug where max_time_seconds was incorrectly used instead of max_timestamp_us. However, the variable name suggests it should be in seconds, but it's being passed to a parameter expecting microseconds. Verify that the parameter naming and units are consistent throughout the codebase.

Copilot uses AI. Check for mistakes.
)
),
]
)

def render_instance(
Expand Down Expand Up @@ -261,22 +265,26 @@ def render_instance(
viewer=viewer,
first_camera_tokens=first_camera_tokens,
max_timestamp_us=max_timestamp_us,
),
)

# TODO(ktro2828): speed up annotation rendering
self._render_annotation3ds(
viewer=viewer,
first_sample_token=first_sample.token,
max_timestamp_us=max_timestamp_us,
future_seconds=future_seconds,
instance_tokens=instance_tokens,
)
self._render_annotation2ds(
viewer=viewer,
first_sample_token=first_sample.token,
max_timestamp_us=max_timestamp_us,
instance_tokens=instance_tokens,
)
+ [
self._executor.submit(
self._render_annotation3ds(
viewer=viewer,
first_sample_token=first_sample.token,
max_timestamp_us=max_timestamp_us,
future_seconds=future_seconds,
instance_tokens=instance_tokens,
)
),
self._executor.submit(
self._render_annotation2ds(
viewer=viewer,
first_sample_token=first_sample.token,
max_timestamp_us=max_timestamp_us,
instance_tokens=instance_tokens,
)
),
],
Comment thread
ktro2828 marked this conversation as resolved.
)

def render_pointcloud(
Expand Down
Loading