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.
| Component | Size | Typical use |
|---|---|---|
| Fine annotations | 5,000 images | Supervised training and benchmarking |
| Coarse annotations | 20,000 images | Extra weak supervision |
| Video snippets | 30 frames per labeled image | Temporal models, video segmentation |
| Stereo pairs and disparity | All frames | Depth and scene flow research |
| Vehicle metadata | GPS, odometry, temperature | Context and sensor fusion |
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.
| Split | Images | Labels available |
|---|---|---|
| Training | 2,975 | Public |
| Validation | 500 | Public |
| Test | 1,525 | Withheld for server evaluation |
| Coarse extra | 19,998 | Public, coarse only |
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.
| Task | Main metric | What it rewards |
|---|---|---|
| Semantic segmentation | Class mIoU, category mIoU | Correct pixel labels per class |
| Semantic segmentation | Instance-weighted iIoU | Accuracy on small objects |
| Instance segmentation | AP and AP50 | Separating individual objects |
| Panoptic segmentation | Panoptic quality (PQ) | Joint region and object labeling |
| 3D detection | Detection score with 3D boxes | Vehicle pose and extent |
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.
| Dataset | Main strength | Limitation relative to Cityscapes |
|---|---|---|
| Cityscapes | Fine pixel labels in urban streets | Mostly German daytime scenes |
| KITTI | Lidar, stereo and 3D boxes | Small semantic label set |
| COCO | Broad everyday object classes | Not focused on driving |
| Pascal VOC | Classic segmentation baseline | Low resolution, few classes |
| Mapillary Vistas | Global diversity of street images | Varied cameras, less temporal data |
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.