Skip to main content
QUICK REVIEW

[Paper Review] Weighted Intersection over Union (wIoU) for Evaluating Image Segmentation

Yeong-Jun Cho|arXiv (Cornell University)|Jul 21, 2021
Advanced Neural Network ApplicationsComputer Science32 references14 citations
TL;DR

This paper proposes Weighted Intersection over Union (wIoU), a novel evaluation metric for image segmentation that assigns adaptive weights to pixels based on their distance from object boundaries using a boundary importance factor. By integrating region and boundary evaluation into a single flexible metric, wIoU achieves strong correlation with both standard IoU and boundary-focused metrics like F1-score, depending on the weight parameter, offering a more intuitive and tunable evaluation framework without relying on sensitive hyperparameters.

ABSTRACT

In recent years, many semantic segmentation methods have been proposed to predict label of pixels in the scene. In general, we measure area prediction errors or boundary prediction errors for comparing methods. However, there is no intuitive evaluation metric that evaluates both aspects. In this work, we propose a new evaluation measure called weighted Intersection over Union (wIoU) for semantic segmentation. First, it builds a weight map generated from a boundary distance map, allowing weighted evaluation for each pixel based on a boundary importance factor. The proposed wIoU can evaluate both contour and region by setting a boundary importance factor. We validated the effectiveness of wIoU on a dataset of 33 scenes and demonstrated its flexibility. Using the proposed metric, we expect more flexible and intuitive evaluation in semantic segmentation field are possible.

Motivation & Objective

  • To address the lack of a unified evaluation metric that simultaneously captures both region and boundary accuracy in semantic segmentation.
  • To overcome the limitations of standard IoU, which treats all pixels equally, and boundary-specific metrics like F1-score, which depend heavily on distance tolerance parameters.
  • To develop a metric that enables intuitive, parameter-free evaluation by weighting pixels based on their proximity to object boundaries.
  • To validate the metric's flexibility and effectiveness across diverse segmentation results using a controlled dataset of 33 scenes.
  • To explore the potential of wIoU as a novel training loss function for improving segmentation networks.

Proposed method

  • The method generates a weight map from a boundary distance map, where each pixel’s weight increases with its proximity to object boundaries.
  • A boundary importance factor α controls the relative emphasis on boundary pixels: small α values prioritize region accuracy (similar to IoU), while large α values emphasize boundary precision.
  • The wIoU score is computed as a weighted mean of intersection over union, where each pixel’s contribution is scaled by its corresponding weight from the map.
  • The weight map is derived from the L1 distance transform of the ground-truth segmentation mask, ensuring spatially aware weighting.
  • The metric is designed to be differentiable and compatible with deep learning training pipelines, enabling potential use as a loss function.
  • The approach avoids reliance on tuning parameters like θ in boundary F1-score by embedding the boundary sensitivity directly into the weight map via α.

Experimental results

Research questions

  • RQ1Can a single evaluation metric effectively balance region-based and boundary-based performance in semantic segmentation?
  • RQ2How does the proposed wIoU metric correlate with standard IoU and boundary-specific metrics like F1-score across varying segmentation results?
  • RQ3To what extent does the boundary importance factor α influence the metric’s behavior and sensitivity to different types of errors (e.g., false positives near boundaries)?
  • RQ4Does wIoU maintain consistency in evaluation when the spatial distribution of errors changes, while the total number of errors remains constant?
  • RQ5Can wIoU serve as a viable alternative or complement to existing metrics in both evaluation and training of segmentation models?

Key findings

  • wIoU with a low boundary importance factor (α = 0.01) showed a correlation of 0.98 with standard IoU, confirming its consistency with region-based evaluation.
  • wIoU with a high boundary importance factor (α = 100) achieved a correlation of 0.95 with the edge-based F1-score, demonstrating strong alignment with boundary-focused metrics.
  • The sum of differences between wIoU (α = 100) and edge-based F1-score was significantly lower (0.048) than with other metrics, indicating high similarity in ranking performance.
  • In test images with identical error counts but different spatial distributions, wIoU (α = 1) produced distinct scores, showing sensitivity to error location and meaningful differentiation.
  • The edge-based F1-score varied widely (0.5843 to 0.936) across test images with the same error count, highlighting its instability and sensitivity to prediction layout.
  • The results suggest that wIoU can serve not only as a robust evaluation metric but also as a promising region-contour loss for training segmentation networks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.