Joint Semantic Segmentation and Boundary Detection Using Iterative Pyramid Contexts

Mingmin Zhen, Jinglu Wang, Lei Zhou, Shiwei Li, Tianwei Shen, Jiaxiang Shang, Tian Fang, Long Quan

Semantic segmentation and semantic boundary detection are intrinsically linked: the boundary of a semantic region is, by definition, the semantic edge. However, most existing frameworks treat these tasks as separate or loosely coupled, leading to inconsistencies such as blurred object boundaries in segmentation masks or the detection of non-semantic edges (e.g., textures or shadows) in boundary maps. This paper introduces RPCNet (Iterative Pyramid Context Network), a multi-task framework that leverages this duality through iterative refinement and a consistency-enforcing loss.

Methodology

The core of RPCNet is the Iterative Pyramid Context Module (PCM). Unlike traditional single-pass networks, RPCNet employs $S$ iterations (typically $S=8$) to progressively refine feature representations. In each iteration, the PCM facilitates information exchange between the region-based segmentation stream and the edge-based boundary stream. This iterative process allows the network to "negotiate" a consensus where the predicted edges precisely encapsulate the predicted semantic regions. The backbone of the system is a ResNet-101, modified with dilated convolutions to preserve spatial resolution.

The RPCNet architecture featuring iterative Pyramid Context Modules (PCM) and the duality loss framework.

To further enhance boundary precision, the model incorporates Spatial Gradient ($\nabla M$) Fusion. By calculating the spatial gradient of the segmentation probability map, the network can identify areas where class labels are changing. This gradient serves as a guide to suppress "noise" edges—internal textures that do not correspond to actual class boundaries.

Finally, the authors introduce a Duality Loss. Instead of simply summing independent losses for segmentation and boundary detection, this loss explicitly penalizes discrepancies between the predicted boundary and the outer contour of the predicted mask. This mathematical constraint ensures that the two outputs remain structurally consistent.

Experiments and Results

The model was evaluated on the Cityscapes dataset, a challenging benchmark for urban scene understanding consisting of high-resolution images across 19 semantic classes. Since Cityscapes lacks native boundary labels, ground truth boundaries were derived from the provided segmentation masks.

RPCNet achieved state-of-the-art performance in both tasks:

  • Semantic Segmentation: Attained a Mean Intersection over Union (mIoU) of 81.8%, surpassing established models like PSPNet and DANet.
  • Boundary Detection: Demonstrated significant improvements, with a 9.9% increase in Average Precision (AP) and a 6.8% boost in Maximum F-measure (MF) over previous leading methods.
Qualitative results showing the input image, predicted semantic mask, and extracted boundaries.

Ablation studies confirmed the efficacy of the individual components. The PCM alone improved mIoU by 2.3%, while the duality loss was crucial for achieving high-fidelity boundary maps.

Discussion and Conclusion

The success of RPCNet highlights the importance of treating segmentation and boundary detection as a unified problem. By using iterative refinement, the network effectively captures both global context and local detail. While the iterative nature of the PCM increases computational complexity, the resulting gains in accuracy—particularly at object boundaries—provide a significant step forward for applications requiring high-precision scene understanding, such as autonomous driving. Future work may focus on optimizing the inference speed of these iterative passes and testing the framework's generalization to non-urban datasets where boundaries may be more subtle.

Summary updated

BibTeX
@inproceedings{zhen2020joint,
  author = {Mingmin Zhen and Jinglu Wang and Lei Zhou and Shiwei Li and Tianwei Shen and Jiaxiang Shang and Tian Fang and Long Quan},
  title = {{Joint Semantic Segmentation and Boundary Detection Using Iterative Pyramid Contexts}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01368},
}
Figure