Evaluating Image Segmentation
Evaluating Segmentation Models: Mean IoU
For semantic segmentation, the primary metric is mean Intersection over Union (mIoU). For each class, compute the IoU between the predicted mask and the ground truth mask. Average across classes.
Other useful metrics:
- Pixel accuracy — Fraction of correctly labeled pixels.
- Mean pixel accuracy — Pixel accuracy averaged per class, to handle class imbalance (rare classes otherwise get drowned out).
- Boundary F1 score — Specifically measures accuracy at object boundaries, where segmentation is hardest.
mIoU Explorer
Sky
0.900
Building
0.824
Car
0.659
Road
0.818
mIoU
0.800
Drag solid boxes (predictions) to move · drag corner dot to resize · dashed = ground truth
Drag the solid prediction boxes over the scene. The dashed boxes are ground truth. Watch each class's IoU update as the overlap changes and see how mIoU averages across all four classes.