py123d_detection.velocity

Box velocities derived from object tracks.

Some datasets (Argoverse 2, KITTI-360, …) annotate no velocity, so their 123D logs carry zeros. PETR-style models regress gt_velocity, so the export can derive one the way the nuScenes devkit’s box_velocity does, per track in the global frame at the log’s native frame rate:

  • both neighbours within max_dt_s: v = (p[k+1] - p[k-1]) / (t[k+1] - t[k-1])

  • one neighbour within max_dt_s: the one-sided difference with that neighbour

  • no neighbour within max_dt_s: 0

The devkit uses a 1.5 s limit on 2 Hz keyframes and returns nan in the last case, which mmdetection3d then replaces by 0. The 0.25 s default tolerates one dropped frame at 10 Hz. The reference converters implement the same rule, so their pickles can be diffed against exports.

Functions

velocities_from_track(times_us, centers[, ...])

Velocities of one track.

Classes

TrackVelocityTable([max_dt_s])

Per-frame, per-track velocities of one log.