Svashasan Logo
Simulated data

Automotive Performance Metrics · Segmentation metric

Mean IoUmIoU

Mean Intersection over Union

Also known as class IoU, IoU_class

IntermediateSource-checked · awaiting technical reviewLast reviewed 6 December 2026

Mean IoU (mIoU) is the standard semantic segmentation metric: IoU = TP / (TP + FP + FN) is computed for each class from pixel counts, and mIoU is the average of the per-class values, so every class carries equal weight.

Explanation

For each class, true positives are pixels correctly assigned to it, false positives are pixels wrongly assigned to it, and false negatives are its pixels assigned to other classes. Cityscapes accumulates these counts over the whole test set before computing IoU, excludes void pixels, and reports mean scores at two granularities: over individual classes (IoU_class) and over broader categories (IoU_category).

Because every class is weighted equally, rare and thin classes such as poles, riders or traffic signs count as much as road or sky, making mIoU sensitive to small-object performance. Pixel-level IoU still favours large objects within a class, so Cityscapes also reports an instance-level iIoU = iTP / (iTP + FP + iFN), in which pixel counts are weighted by instance size.

Two conventions are common in practice: accumulating pixel counts over the dataset before computing IoU, or averaging per-image IoU values. They give different numbers. mIoU values are only comparable with the same class list, void handling, evaluation resolution and accumulation method.

How it works

Build a confusion matrix M over all evaluated pixels, with rows for ground truth and columns for predictions, ignoring void labels. For class c, IoU_c = M[c,c] / (row sum_c + column sum_c − M[c,c]). Average IoU_c over the classes in the benchmark's list to obtain mIoU.

Automotive applications

  • Drivable-area and road segmentation
  • Semantic and panoptic segmentation benchmarks
  • Bird's-eye-view map segmentation
  • Comparing quantised and float segmentation models

Example

A segmentation model scores IoU 0.97 on road and 0.91 on car but 0.38 on traffic sign. Because mIoU weights classes equally, raising traffic-sign IoU by 0.10 improves mIoU exactly as much as raising car IoU by 0.10.

An illustrative example: any figures in it are worked numbers, not measurements.

References

  1. Cityscapes Benchmark Suite (opens in a new tab)

    Cityscapes Dataset (cityscapes-dataset.com) · Project documentation · Pixel-Level Semantic Labeling Task: Metrics (IoU, iIoU) · retrieved 6 December 2026

Definitions are original summaries. Standards text is not reproduced; follow the links for the official publications.