Cityscapes

Also known as: Cityscapes dataset

On this page 7

Cityscapes is a benchmark dataset of urban street scenes recorded from a car driving through 50 cities, with pixel-accurate semantic and instance labels for road users, infrastructure and background. In artificial intelligence, it belongs to the family of well-known training data collections, and it became the reference benchmark for semantic segmentation in driving scenes after its release in 2016.

The Cityscapes dataset was created by researchers from Daimler, the Max Planck Institute for Informatics and TU Darmstadt. It combines 5,000 finely annotated images with 20,000 coarsely annotated images, stereo video and vehicle metadata, which makes it useful both for supervised training and for studying weakly supervised and semi-supervised learning.

How the Cityscapes data was recorded and labeled

Cityscapes was recorded with a calibrated stereo camera rig mounted behind the windshield of a car, capturing frames at 2048 × 1024 pixels with 16-bit high dynamic range. Recordings took place in 50 cities, mostly in Germany and neighboring countries, across spring, summer and fall, in daytime and in good or moderate weather.

Each labeled image is the 20th frame of a 30-frame video snippet, so models can use temporal context from the preceding and following frames. The release also includes right stereo views, precomputed disparity maps, GPS coordinates, vehicle odometry and outside temperature, which support work on depth estimation and scene flow.

Fine annotation was done with polygon outlines drawn by trained annotators, and labeling a single fine image took about 90 minutes on average. Coarse labels cover large regions quickly and deliberately leave ambiguous pixels unlabeled. The table below summarizes the main components of the release.

ComponentSizeTypical use
Fine annotations5,000 imagesSupervised training and benchmarking
Coarse annotations20,000 imagesExtra weak supervision
Video snippets30 frames per labeled imageTemporal models, video segmentation
Stereo pairs and disparityAll framesDepth and scene flow research
Vehicle metadataGPS, odometry, temperatureContext and sensor fusion
Main components of the Cityscapes release

Classes, splits and annotation levels

The label set defines 30 visual classes grouped into 8 categories: flat surfaces, humans, vehicles, construction, objects, nature, sky and void. Only 19 classes are used for evaluation; rare classes such as caravans and trailers are excluded from scoring because they have too few examples for reliable statistics.

Instance-level labels exist for the countable classes such as person, rider, car, truck, bus, train, motorcycle and bicycle, which makes the data suitable for instance segmentation and later for panoptic segmentation. The fine images are divided into fixed splits, and the test labels are withheld so that results can only be obtained from an official evaluation server.

SplitImagesLabels available
Training2,975Public
Validation500Public
Test1,525Withheld for server evaluation
Coarse extra19,998Public, coarse only
Official splits of the finely annotated images

Evaluation metrics on the benchmark

The headline metric of Cityscapes is mean intersection over union, computed per class over the whole test set and averaged across the 19 evaluation classes. Because large classes such as road and sky dominate pixel counts, the benchmark also reports an instance-weighted IoU that gives small objects such as pedestrians a fairer weight.

TaskMain metricWhat it rewards
Semantic segmentationClass mIoU, category mIoUCorrect pixel labels per class
Semantic segmentationInstance-weighted iIoUAccuracy on small objects
Instance segmentationAP and AP50Separating individual objects
Panoptic segmentationPanoptic quality (PQ)Joint region and object labeling
3D detectionDetection score with 3D boxesVehicle pose and extent
Metrics reported on the Cityscapes benchmark

Reported numbers have risen from about 65% mIoU for early fully convolutional networks to above 85% mIoU for recent transformer and convolution hybrids. Validation and test numbers are not interchangeable, and results that use the coarse set or external pretraining should be compared only with methods that use the same extra data.

Cityscapes compared with other driving datasets

Cityscapes is best understood as a dense segmentation benchmark, while several neighbors focus on detection or sensor fusion. KITTI offers lidar and 3D boxes but far fewer pixel labels, and general collections such as COCO cover everyday scenes rather than ego-vehicle views.

DatasetMain strengthLimitation relative to Cityscapes
CityscapesFine pixel labels in urban streetsMostly German daytime scenes
KITTILidar, stereo and 3D boxesSmall semantic label set
COCOBroad everyday object classesNot focused on driving
Pascal VOCClassic segmentation baselineLow resolution, few classes
Mapillary VistasGlobal diversity of street imagesVaried cameras, less temporal data
Cityscapes and related datasets

In practice, many teams pretrain on larger or synthetic sets and then fine-tune and report on Cityscapes, because its consistent label policy and stable test server make comparisons reproducible.

Limitations, licensing and common pitfalls

The most important limitation is geographic and environmental bias. Scenes come mainly from Central European cities in daylight and dry weather, so models trained only on Cityscapes often degrade at night, in rain or snow, or in cities with different road layouts. Variants such as Foggy Cityscapes and dedicated adverse-weather datasets exist to measure this domain shift.

The data is distributed under a non-commercial research license after registration, so product teams must check whether their use is permitted. Common mistakes include:

  • Reporting validation scores as test scores, which inflates comparisons.
  • Training on the 19 evaluation classes but forgetting to map ignored labels correctly.
  • Downsampling to low resolution and then losing thin classes such as poles and traffic signs.
  • Assuming a high benchmark score proves real-world safety in unseen cities.

The short version

Cityscapes is a large set of photos taken from a car driving through European cities. People carefully colored every part of each photo by type. Road is one color, cars another, people another.

A computer program studies these colored photos. It learns to recognize what each pixel shows. Researchers then test their programs on hidden photos and compare scores. Cityscapes works like a shared exam for teaching cars to understand streets.

Where it makes a difference

A research team at a university building a perception module for a delivery robot needs a segmentation model that separates sidewalk, road, curbs and pedestrians. The team pretrains a DeepLab-style network on a large synthetic driving set and then fine-tunes it on the 2,975 Cityscapes training images at full resolution.

On the 500 validation images, the model reaches about 79% mIoU, and pedestrians and riders score well. When the team tests it on footage from its own campus at dusk, however, accuracy on sidewalks drops sharply. Adding a few hundred locally labeled frames with the same 19-class policy restores most of the loss, which shows that Cityscapes is a strong starting point but not a substitute for data from the target environment.