vision3d.viz#
Optional 3D visualization utilities.
Requires the viz dependency group:
pip install vision3d[viz]
Functions
|
Log 3D bounding boxes to Rerun. |
|
Log all camera images with optional pinhole projection to Rerun. |
|
Log a point cloud to Rerun. |
|
Log a full sample dict to Rerun. |
- vision3d.viz.log_boxes_3d(entity, boxes, *, labels=None, class_ids=None, log_heading=True)[source]#
Log 3D bounding boxes to Rerun.
Logs boxes as
rr.Boxes3Dand optionally heading arrows asrr.Arrows3Don a/headingsub-entity.For consistent class coloring across frames, pass
class_idsand log anrr.AnnotationContexton the entity once before logging any boxes.- Parameters:
entity (str) – Rerun entity path (e.g.
"world/boxes").boxes (BoundingBoxes3D) – Bounding boxes in any supported format.
labels (list[str] | None) – Per-box label strings for display.
class_ids (list[int] | None) – Per-box class IDs for coloring via AnnotationContext.
log_heading (bool) – If True and boxes have rotation, log heading arrows.
- Return type:
None
- vision3d.viz.log_cameras(entity_prefix, images, intrinsics=None, extrinsics=None)[source]#
Log all camera images with optional pinhole projection to Rerun.
Each camera is logged to
{entity_prefix}for a single camera, or{entity_prefix}_{i}for multiple cameras.- Parameters:
entity_prefix (str) – Rerun entity path prefix (e.g.
"world/cam").images (CameraImages | Tensor) – Camera images
[N_cams, C, H, W].intrinsics (CameraIntrinsics | Tensor | None) – Intrinsic matrices
[N_cams, 3, 3].extrinsics (CameraExtrinsics | Tensor | None) – Extrinsic matrices
[N_cams, 4, 4](lidar-to-camera).
- Return type:
None
- vision3d.viz.log_point_cloud(entity, points, *, color_by_distance=True)[source]#
Log a point cloud to Rerun.
- Parameters:
entity (str) – Rerun entity path (e.g.
"world/lidar").points (PointCloud3D | Tensor) – Point cloud
[N, 3+C]. First 3 columns are xyz.color_by_distance (bool) – Color points by distance from origin.
- Return type:
None
- vision3d.viz.log_sample(inputs, targets=None, *, entity_prefix='world', label_to_id=None)[source]#
Log a full sample dict to Rerun.
Convenience function that dispatches to type-specific loggers.
- Parameters:
inputs (SampleInputs) – Dict with
"points","images","extrinsics","intrinsics"keys.targets (SampleTargets | None) – Optional dict with
"boxes","labels"keys.entity_prefix (str) – Rerun entity path prefix.
label_to_id (dict[str, int] | None) – Mapping from class name to class ID for consistent coloring. Build this across all frames before logging.
- Return type:
None