py123d_detection.annotations

Per-frame 3D annotations in mmdetection3d’s nuScenes layout.

123D stores boxes in the global frame, mmdet3d wants them in the keyframe’s lidar frame: gt_boxes (N, 7) as [x, y, z, l, w, h, yaw] around the box center (mmdet3d moves the origin to the bottom face at load time) and gt_velocity (N, 2).

Module Attributes

BOX_LAYOUTS

"streampetr": [x, y, z, l, w, h, yaw], written and read by StreamPETR and mmdetection3d >= 1.0.

Functions

apply_merge_rules(records, taxonomy)

Combine riders with their vehicles, and drop what is left merge-only.

build_frame_annotations(records, global_to_lidar)

Move global-frame records into the lidar frame and build the mmdet3d arrays.

extract_detection_records(detections, taxonomy)

Map 123D detections onto taxonomy classes, dropping unmapped ones.

Classes

DetectionRecord(class_name, label_id, ...)

One annotated object, in the global frame.

FrameAnnotations(gt_boxes, gt_names, ...)

The 3D annotation block of one info, in the lidar frame.

py123d_detection.annotations.BOX_LAYOUTS = ('streampetr', 'mmdet3d_0.17')

“streampetr”: [x, y, z, l, w, h, yaw], written and read by StreamPETR and mmdetection3d >= 1.0. “mmdet3d_0.17”: [x, y, z, w, l, h, -yaw - pi/2], written by mmdetection3d 0.17’s nuScenes converter and fed verbatim into LiDARInstance3DBoxes by its dataset (PETR v1 pins 0.17).