CLI reference

py123det-export-mmcv has three subcommands: export writes the pickle, inspect prints its metadata and first frame, and token-map dumps nuScenes sample tokens. This page is generated from the argument parser, so it always matches the installed version.

Export 123D datasets to mmdetection3d info pickles.

usage: py123det-export-mmcv [-h] [-v] {export,inspect,token-map} ...

Positional Arguments

command

Possible choices: export, inspect, token-map

Named Arguments

-v, --verbose

Enable debug logging.

Default: False

Sub-commands

export

Export 123D splits to an mmdet3d .pkl.

py123det-export-mmcv export [-h] [--data-root DATA_ROOT] [--split NAME]
                            [--dataset DATASETS] [--log-name LOG_NAMES]
                            [--sample-rate-hz SAMPLE_RATE_HZ]
                            [--frame-stride FRAME_STRIDE]
                            [--max-logs MAX_LOGS]
                            [--require-modality REQUIRED_MODALITIES]
                            [--merge ROOT:SPLIT[,SPLIT...]]
                            [--disjoint-timestamps] --out OUT
                            [--version VERSION]
                            [--array-format {numpy,portable}]
                            [--pickle-protocol PICKLE_PROTOCOL]
                            [--taxonomy {coin3d_3cls,default_123d,general_3cls,nuscenes_detection_10cls,vehicle_1cls}]
                            [--camera-order CAMERA_ORDER]
                            [--camera-key {native,camera_id}]
                            [--reference-lidar REFERENCE_LIDAR]
                            [--lidar2ego-mode {static,dynamic}]
                            [--camera2ego-mode {static,dynamic}]
                            [--lidar-frame {sensor,ego}]
                            [--max-sweeps MAX_SWEEPS] [--no-2d-annotations]
                            [--yaw-convention {mmdet3d,heading}]
                            [--full-3d-velocity]
                            [--on-missing-camera {skip_frame,drop_camera,error}]
                            [--box-layout {streampetr,mmdet3d_0.17}]
                            [--velocity-source {stored,tracks}]
                            [--velocity-max-dt SECONDS]
                            [--ego-pose-source {sync,nearest}]
                            [--camera-mode {auto,reference,extract}]
                            [--lidar-mode {auto,reference,extract}]
                            [--path-style {absolute,relative}]
                            [--path-relative-to PATH_RELATIVE_TO]
                            [--extract-root EXTRACT_ROOT]
                            [--sensor-root DATASET=PATH]
                            [--token-style {uuid,log_timestamp}]
                            [--nuscenes-root NUSCENES_ROOT]
                            [--token-map TOKEN_MAP]

input

--data-root

123D data root (default: $PY123D_DATA_ROOT).

--split

Split to export, e.g. nuscenes-mini_train. Repeatable. Default: every split under the root.

--dataset

Restrict to a dataset name.

--log-name

Restrict to a log name.

--sample-rate-hz

Target frame rate, e.g. 2.0.

--frame-stride

Keep every N-th raw frame.

--max-logs

Export at most this many logs.

--require-modality

123D modality requirement, e.g. ‘camera:all’. Repeatable.

--merge

Additional source to merge into the same pickle, for cross-dataset training. Repeatable.

--disjoint-timestamps

Offset merged sources in time so mmdet3d’s timestamp sort cannot interleave them.

Default: False

output

--out

Destination .pkl.

--version

Value stored as metadata[‘version’].

Default: 'py123d-v1.0'

--array-format

Possible choices: numpy, portable

‘portable’ stores arrays as nested lists, sidestepping numpy’s pickle format (needs py123detection.mmcv_plugin on the training side).

Default: 'numpy'

--pickle-protocol

Pickle protocol (4 reads on Python >= 3.4).

Default: 4

content

--taxonomy

Possible choices: coin3d_3cls, default_123d, general_3cls, nuscenes_detection_10cls, vehicle_1cls

Class taxonomy. Cross-dataset exports want a default-label taxonomy like general_3cls.

Default: 'nuscenes_detection_10cls'

--camera-order

Comma-separated 123D CameraID names in model input order.

Default: 'PCAM_F0,PCAM_R0,PCAM_L0,PCAM_B0,PCAM_L1,PCAM_R1'

--camera-key

Possible choices: native, camera_id

Key used inside info[‘cams’]. Use camera_id for merged multi-dataset exports.

Default: 'native'

--reference-lidar

LidarID name defining the reference frame.

--lidar2ego-mode

Possible choices: static, dynamic

‘static’ uses the rig extrinsic 123D stores (what mmdet3d’s converter writes); ‘dynamic’ re-derives it from the ego pose at the lidar’s own timestamp.

Default: 'static'

--camera2ego-mode

Possible choices: static, dynamic

Where a camera’s timing offset is booked: ‘static’ reports it in ego2global (mmdet3d’s convention), ‘dynamic’ folds it into sensor2ego. sensor2lidar is unaffected.

Default: 'static'

--lidar-frame

Possible choices: sensor, ego

Frame for boxes and extrinsics: the reference lidar’s sensor frame (mmdet3d’s nuScenes convention) or the ego/IMU frame.

Default: 'sensor'

--max-sweeps

Preceding lidar frames per info.

Default: 10

--no-2d-annotations

Skip per-camera 2D/mono-3D annotations. StreamPETR training needs them.

Default: False

--yaw-convention

Possible choices: mmdet3d, heading

Yaw read-out. ‘mmdet3d’ matches pickles from mmdetection3d’s own converter; ‘heading’ matches the nuScenes evaluation devkit.

Default: 'mmdet3d'

--full-3d-velocity

Keep the vertical velocity component when rotating boxes into the lidar frame. mmdetection3d drops it, so this diverges from stock pickles.

Default: False

--on-missing-camera

Possible choices: skip_frame, drop_camera, error

Behaviour when a configured camera has no data at a frame.

Default: 'skip_frame'

--box-layout

Possible choices: streampetr, mmdet3d_0.17

gt_boxes column layout: ‘streampetr’ = [x,y,z,l,w,h,yaw] (StreamPETR, mmdet3d>=1.0); ‘mmdet3d_0.17’ = [x,y,z,w,l,h,-yaw-pi/2] (mmdetection3d 0.17’s own converter, PETR v1).

Default: 'streampetr'

--velocity-source

Possible choices: stored, tracks

‘stored’ writes the velocity the 123D log carries; ‘tracks’ derives it as a central difference over each track at the log’s native frame rate (for datasets without annotated velocity, e.g. Argoverse 2).

Default: 'stored'

--velocity-max-dt

Neighbour tolerance for –velocity-source tracks (default 0.25 s: one dropped 10 Hz frame).

Default: 0.25

--ego-pose-source

Possible choices: sync, nearest

‘sync’ takes the ego state the log’s sync table associated with the frame; ‘nearest’ looks it up by the frame timestamp instead, which is robust to sync tables built from slightly-off ego timestamps (py123d 0.6.0 AV2 logs).

Default: 'sync'

sensor payloads

--camera-mode

Possible choices: auto, reference, extract

How camera images become paths: reference the original dataset, or extract embedded payloads.

Default: 'auto'

--lidar-mode

Possible choices: auto, reference, extract

Same, for point clouds.

Default: 'auto'

--path-style

Possible choices: absolute, relative

Absolute paths (needed for merged exports) or relative to –path-relative-to.

Default: 'absolute'

--path-relative-to

Root for relative paths.

--extract-root

Directory for extracted payloads.

--sensor-root

Override a dataset’s sensor root, e.g. nuscenes=/data/nuscenes. Repeatable.

tokens

--token-style

Possible choices: uuid, log_timestamp

Token when no native token is restored: the deterministic 123D UUID, or ‘{log_name}/{timestamp_us}’ (reproducible by any converter; use it to diff against a reference pickle for datasets without native frame tokens).

Default: 'uuid'

--nuscenes-root

nuScenes data root. Restores native sample_tokens, which official nuScenes evaluation requires.

--token-map

Token map JSON from the token-map subcommand.

inspect

Print an exported pickle’s metadata and first frame.

py123det-export-mmcv inspect [-h] path

Positional Arguments

path

token-map

Dump a nuScenes sample_token map to JSON.

py123det-export-mmcv token-map [-h] --nuscenes-root NUSCENES_ROOT --out OUT

Named Arguments

--nuscenes-root
--out