Getting the KITTI data

Computer Vision I (CSCI 3240U)

Faisal Z. Qureshi

Faculty of Science, Ontario Tech University

http://vclab.science.ontariotechu.ca

Fall 2026


Introduction

Several labs in this course use the KITTI Road/Lane benchmark — images captured from a car driving around Karlsruhe, Germany, together with camera calibration and hand-labelled road regions. Labs 2, 4, 5, 6 and 9 all use it, so it is worth setting up properly once.

You do not need a KITTI account, and you do not need to fill in a request form. The archives are served directly.

You need about 1.7 GB of free disk space if you take everything, or about 900 MB if you skip the stereo images until Lab 9.

Option 1: the script (recommended)

Download fetch-kitti.sh, make it executable, and run it:

$ chmod +x fetch-kitti.sh
$ ./fetch-kitti.sh

By default this puts everything in ./kitti. You can give it somewhere else:

$ ./fetch-kitti.sh ~/datasets/kitti

The stereo (right camera) images are only needed for Lab 9. Until then you can save yourself 427 MB:

$ ./fetch-kitti.sh --left-only

The script resumes interrupted downloads, checks the archives for corruption, and counts the extracted files to confirm nothing is missing. If your connection drops, just run it again — it picks up where it left off.

Windows users: run the script from WSL or Git Bash. If neither is available to you, use Option 2 below.

Option 2: downloading by hand

If the script does not work on your machine, do it manually. There are only two files.

Step 1: download

File Size Needed for
data_road.zip 449 MB Labs 2, 4, 5, 6
data_road_right.zip 427 MB Lab 9 only

Both links are direct downloads — click them in a browser, or:

$ curl -L -O https://s3.eu-central-1.amazonaws.com/avg-kitti/data_road.zip
$ curl -L -O https://s3.eu-central-1.amazonaws.com/avg-kitti/data_road_right.zip

These are also linked from the official benchmark page under “Download”.

Step 2: extract data_road.zip

This one is straightforward. It creates a data_road/ folder:

$ unzip data_road.zip

Step 3: extract data_road_right.zip — read this carefully

This archive does not have a data_road/ prefix inside it. Its contents sit at the top level as training/image_3/ and testing/image_3/. If you simply unzip it next to the other one, the right-camera images will land beside the dataset rather than inside it, and your code will not find them.

Extract it into a temporary folder and move the two directories into place:

$ unzip data_road_right.zip -d right-tmp
$ mv right-tmp/training/image_3 data_road/training/image_3
$ mv right-tmp/testing/image_3  data_road/testing/image_3
$ rm -rf right-tmp

Step 4: check that you got everything

You should end up with exactly this:

data_road/
    training/
        image_2/        289 files    left colour images
        image_3/        289 files    right colour images
        calib/          289 files    camera calibration
        gt_image_2/     384 files    ground truth
    testing/
        image_2/        290 files
        image_3/        290 files
        calib/          290 files

You can count them with:

$ ls data_road/training/image_2 | wc -l

If any count is short, the archive did not extract cleanly. Delete it and download again.

Option 3: Canvas

A mirror of both archives is posted on Canvas under Files. Use this if the KITTI server is slow or unreachable from your network. It is the same data.

Understanding what you downloaded

The images

image_2 is the left colour camera and image_3 is the right colour camera. The two are rectified, which will matter in Lab 9.

Filenames encode the scene category:

Try your methods on all three. A lane detector that only works on um images is not finished.

The ground truth

Ground truth exists for the training split only. The test split has no labels — that is what makes it a benchmark.

Ground truth images are colour coded:

There are two kinds:

The calibration

Each calib/*.txt holds the projection matrices P0P3, the rectifying rotation R0_rect, and the rigid transforms between sensors. P2 is the left colour camera and P3 is the right. We will pull these apart in Lab 2.

Troubleshooting

curl: command not found — install curl, or download the two links in a browser and continue from Step 2.

The download keeps failing partway. — Re-run fetch-kitti.sh; it resumes. If downloading by hand, curl -C - -L -O <url> resumes too.

unzip reports errors. — The archive is corrupt. Delete the .zip and download it again. A truncated download is the usual cause.

My code cannot find the right-camera images. — See Step 3. This catches almost everybody.

I am short on disk space. — Use --left-only, and delete the .zip files once you have confirmed the extraction is complete.

Licence and citation

The KITTI Vision Benchmark Suite is copyright Andreas Geiger, Philip Lenz and Raquel Urtasun, released under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 licence. We use it here for coursework only. Do not redistribute it.

If you refer to this data in a lab report or in your project, cite:

A. Geiger, P. Lenz and R. Urtasun, “Are we ready for autonomous driving? The KITTI vision benchmark suite,” IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012.