KITTI-C2L-Dataset / code /docs /CALIBRATION.md
mcocheteux's picture
Release v1.1.0: add source-consistent full-projection calibration protocol
1150050 verified
|
Raw History Blame Contribute Delete
7.94 kB

Calibration provenance and the v1.1 projection correction

KITTI provides a carefully calibrated reference, with measurement uncertainty. Our v1.1 update corrects how KITTI-C2L converts that reference into a rectified camera-2 transform. It does not claim a new, independently measured calibration.

What KITTI originally calibrated

The KITTI data paper describes daily calibration after recording. Camera–LiDAR registration used 50 manually selected correspondences and a robust stereo-disparity criterion. It also documents the spinning LiDAR's acquisition times and camera triggering. Those procedures support using KITTI as a reference, but do not establish a sub-centimetre uncertainty bound for every driving frame.

Subsequent camera recalibration work reports improvements in odometry. That is evidence that calibration can be refined for a particular task, rather than proof of a better camera–LiDAR extrinsic ground truth for KITTI-C2L.

Verified correction

For a LiDAR point in metres, KITTI's documented projection is

image_h = P_rect_02 @ R_rect_00 @ T_cam0_from_velodyne @ point_h

Writing P = [K | p] gives P = K [I | b], where b = solve(K, p). Consequently, the transform consumed by a loader that applies K separately is

R = R_rect_00 @ R_cam0_from_velodyne
t = R_rect_00 @ t_cam0_from_velodyne + solve(K, P[:,3])

The numeric source files have non-zero second and third entries in P[:,3]. Keeping only P[0,3]/P[0,0], as frozen v1.0 does, discards those entries and the principal-point coupling in the x translation. The difference is:

Capture date Full minus legacy translation, cm (x, y, z) Euclidean difference
2011-09-30 −0.528028, −0.143972, +0.620322 0.827249 cm
2011-10-03 −0.319263, −0.113119, +0.377976 0.507534 cm

The earlier v1 documentation's “approximately 0.62 cm” described the largest coordinate difference, not the full vector norm. Use the norms above when describing the total translation difference.

This is an algebraic consistency correction. It does not estimate sensor poses from images, fit test sequences, alter raw calibration files, or show that the physical KITTI calibration itself was wrong by these amounts.

Evidence and scope

The machine-readable audit records source calibration hashes, matrices, changes and every regenerated file hash. The audit uses three predetermined frames per drive (10%, 50%, 90% of the sequence), over all ten included drives. Points are restricted to the original image field of view and projected depths above three metres.

  • 30 frames and 590,813 projected LiDAR points were checked.
  • Legacy conversion differs from the supplied projection by 0.22–0.50 pixels on average per drive, with per-drive 95th percentiles of 0.54–1.29 pixels.
  • The full conversion in float64 has a maximum discrepancy below 1e-12 pixels.
  • Actual stored float32 calibration fields have a maximum discrepancy below 0.000039 pixels on the audited points.
  • Regeneration reproduced all four corrected Parquet files byte-for-byte.
  • All rows retain the same IDs, seeds, deltas, rotations, intrinsics, source mappings and splits. Only GT and miscalibrated translations change; the latter are recomposed, not edited independently.

These are projection-consistency checks against the supplied KITTI matrix, not errors against manually observed image correspondences or independent physical measurements. The source projection is the reference in this test.

The six original calibration text files are included unchanged under release/v1.1.0/source_calibration/, so source consistency can be checked without downloading any sensor recordings.

The standalone reference matrices provide both metre and centimetre translations, the camera intrinsics and the original source-file hashes.

Choosing a protocol

Hugging Face configuration Calibration convention
metadata, windows Frozen v1.0, x-only camera shift; unchanged default
metadata_full_projection, windows_full_projection v1.1, complete numeric projection; recommended for new experiments
frames Shared immutable KITTI sensor bytes; independent of label convention
from datasets import load_dataset

repo = "mcocheteux/KITTI-C2L-Dataset"
metadata = load_dataset(repo, "metadata_full_projection", revision="v1.1.0")
windows = load_dataset(repo, "windows_full_projection", revision="v1.1.0")

The existing loader materializes both conventions from their respective rows. Never mix GT from one convention with perturbed transforms from the other. Use one convention consistently for training, validation and testing, and name it in results. The original v1.0.0 tag and sensor shards remain unchanged.

The new checkpoint evaluation evaluates the original three v1-trained models on the v1.1 inputs and targets. It is a migration evaluation, not a new training result. The historical three-seed training comparisons in ASSESSMENT.md and BASELINES.md still apply to v1.0. No published-paper parity or physical accuracy gain is claimed.

Migration evaluation of existing checkpoints

These are the original v1-trained checkpoints, evaluated once per seed on all 2,792 stage-5 test frames with the v1.1 input maps and targets. No retraining or checkpoint selection was performed. Translation is per-axis MAE in centimetres; rotation is mean geodesic degrees. These numbers do not measure physical calibration accuracy.

Training seed Translation MAE, cm Rotation, degrees
42 3.189537 0.729707
43 4.639760 0.813980
44 4.216466 0.782816
Mean 4.015254 0.775501

Reproduction

Inside the public source snapshot, with the original KITTI Raw files:

python scripts/audit_calibration.py \
  --raw-root /path/to/kitti_raw --root /path/to/dataset \
  --data-output scratch/full_projection \
  --report-output scratch/calibration_audit.json
python scripts/check_calibration_release.py \
  --root /path/to/dataset --raw-root /path/to/kitti_raw

The audit refuses to overwrite its outputs. Compare generated Parquet hashes with the report, or compare numerical rows if using different library versions. To generate selected sequences directly:

kitti-c2l generate --kitti-calib-root /path/to/kitti_raw \
  --camera-model full_projection_v1_1 --output-dir scratch/frame
kitti-c2l generate-windows --kitti-calib-root /path/to/kitti_raw \
  --camera-model full_projection_v1_1 --output-dir scratch/window

The CLI and Python generation APIs retain legacy_v1 as their default for backward compatibility. Set the model explicitly for new full-projection data.

Why no newly fitted ground truth is released

Image-edge or photometric alignment can produce a candidate refinement. Its score can also improve by absorbing occlusion, moving objects, LiDAR spin distortion or timestamp offsets into an incorrect rigid transform. Optimizing and assessing the same score would not establish physical accuracy.

The current local Raw subset and released sensor assets contain image_02 and LiDAR, but no right-camera frames, OXTS measurements or LiDAR timestamps. The input inventory is recorded in the audit. A defensible data-driven study would first recover those inputs or independent correspondences, model motion and timing, fit on designated calibration/training drives, and assess stability and accuracy on untouched drives using independent evidence. Its outputs would be released as estimated refinements with uncertainty unless independently validated as ground truth. That evidence has not been established here.