Computer Vision I (CSCI 3240U)
Faculty of Science, Ontario Tech University
http://vclab.science.ontariotechu.ca
Fall 2026
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.
Download fetch-kitti.sh, make it executable, and run it:
$ chmod +x fetch-kitti.sh
$ ./fetch-kitti.shBy default this puts everything in ./kitti. You can give
it somewhere else:
$ ./fetch-kitti.sh ~/datasets/kittiThe stereo (right camera) images are only needed for Lab 9. Until then you can save yourself 427 MB:
$ ./fetch-kitti.sh --left-onlyThe 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.
If the script does not work on your machine, do it manually. There are only two files.
| 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.zipThese are also linked from the official benchmark page under “Download”.
data_road.zipThis one is straightforward. It creates a data_road/
folder:
$ unzip data_road.zipdata_road_right.zip — read this carefullyThis 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-tmpYou 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 -lIf any count is short, the archive did not extract cleanly. Delete it and download again.
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.
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:
um_* — urban marked road (lane
markings present)umm_* — urban multiple marked
lanesuu_* — urban unmarked road (no
markings at all)Try your methods on all three. A lane detector that only works on
um images is not finished.
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:
*_road_* — the full road surface. Exists for all 289
training images.*_lane_* — the ego lane only. Exists for the 95
um images only.Each calib/*.txt holds the projection matrices
P0–P3, 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.
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.
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.