A sane Python loader for KITTI's chaos of files
Because downloading a robotics dataset shouldn't require a PhD in directory archaeology.

What it does
pykitti is a thin Python wrapper that loads the KITTI vision/robotics dataset into memory without making you parse calibration files, timestamps, or IMU packets by hand. It exposes cameras, Velodyne scans, GPS/IMU data, and calibration matrices as Python objects you can actually use.
The interesting bit
The API is deliberately dual-mode: generators for sequential access (think visual odometry loops) and indexed getters for random access (think PyTorch DataLoaders). It’s a small design choice that saves you from writing two different loading pipelines.
Key highlights
- Supports raw KITTI datasets and the odometry benchmark; other benchmarks are noted as future work
- Returns homogeneous transforms as 4×4 numpy arrays with explicit frame notation (
T_cam0_velo, not mystery matrices) - Camera and Velodyne data stream via generators; random access via
get_camN(idx),get_velo(idx), etc. - Images come back as PIL.Image objects; OpenCV conversion is documented but not required
- Named tuples keep calibration fields and OXTS packets readable instead of index-guessing
Caveats
- Only raw and odometry datasets are supported; other KITTI benchmarks (tracking, object detection, etc.) aren’t handled yet
- You must download calibration files separately and preserve the original zip file directory structure exactly
Verdict
Grab this if you’re doing KITTI-based SLAM, odometry, or sensor fusion in Python and want to stop writing parser boilerplate. Skip it if you need the full suite of KITTI benchmarks or want a framework that handles preprocessing pipelines end-to-end.