BAPA-Net: Boundary Adaptation and Prototype Alignment for Cross-domain Semantic Segmentation

Yahao Liu, Jinhong Deng, Xinchen Gao, Wen Li, Lixin Duan

Abstract

Unsupervised Domain Adaptation (UDA) is a critical technique for reducing the high annotation costs associated with semantic segmentation by leveraging synthetic data. However, existing UDA methods often fail at object boundaries where domain shift is most pronounced. We propose BAPA-Net, a novel framework that integrates Boundary Adaptation (BA) and boundary-aware Prototype Alignment (PA). By prioritizing boundary regions during training and excluding them from prototype generation, BAPA-Net achieves state-of-the-art performance on major benchmarks, including a 57.4% mIoU on GTA5 → Cityscapes.

Introduction

Semantic segmentation requires pixel-level labels, making data collection for new domains prohibitively expensive. While training on synthetic datasets like GTA5 and adapting to real-world datasets like Cityscapes offers a solution, the "boundary problem" remains a significant hurdle. Boundary pixels are inherently difficult to classify because their receptive fields often span multiple classes, and this difficulty is exacerbated by the transition from synthetic to real environments. BAPA-Net addresses this by treating boundaries as a primary focus rather than a secondary concern.

Methodology

BAPA-Net introduces two core components designed to improve edge precision and feature representation.

Boundary Adaptation (BA)

The BA module utilizes the CutMix augmentation strategy, where objects from labeled source images are pasted onto unlabeled target images. To enhance the model's sensitivity to edges, a distance map is calculated for every pixel relative to the cut-paste boundary. A weighted cross-entropy loss is then applied, assigning higher importance to pixels near these boundaries. This forces the network to learn the complex transitions between synthetic objects and real-world backgrounds.

Prototype Alignment (PA)

Prototypes represent the average feature vectors for specific classes. Standard UDA methods align source and target prototypes but often include noisy boundary pixels in their calculations. BAPA-Net introduces a "boundary-aware" alignment strategy that explicitly excludes pixels near boundaries when generating prototypes. By using only "clean" interior pixels, the model creates more robust class representations, facilitating more accurate domain alignment.

The framework is implemented within a "Mean Teacher" architecture, where a student model is supervised by ground-truth source data and pseudo-labels from a teacher model.

Experimental Results

BAPA-Net was evaluated on standard synthetic-to-real benchmarks, setting a new high bar for the field:

  • GTA5 → Cityscapes: The model achieved a state-of-the-art 57.4% mIoU, representing a significant 5.3% improvement over previous leading methods like DACS.
  • SYNTHIA → Cityscapes: BAPA-Net reached 53.3% mIoU (on 13 classes), outperforming competitors by margins ranging from 3.5% to 12.1%.

Qualitative Analysis

Visual inspections confirm that BAPA-Net excels at preserving sharp edges and identifying thin structures, such as poles and riders, which are typically lost in standard UDA processes. As shown in the comparison below, the model's predictions closely align with ground truth boundaries even in complex urban scenes.

Qualitative comparison of BAPA-Net results against ground truth and standard UDA methods. (a) Ground Truth, (b) BAPA-Net prediction, (c) and (d) Zoomed-in comparisons showing boundary alignment improvements.

Conclusion

BAPA-Net demonstrates that focusing on object boundaries is key to advancing cross-domain semantic segmentation. By combining boundary-targeted adaptation with noise-reduced prototype alignment, the framework sets a new performance standard. Future work may involve optimizing hyperparameter sensitivity for boundary thresholds and exploring the model's applicability to non-urban domains such as medical or satellite imagery.

Summary updated

BibTeX
@inproceedings{liu2021bapa,
  author = {Yahao Liu and Jinhong Deng and Xinchen Gao and Wen Li and Lixin Duan},
  title = {{BAPA-Net: Boundary Adaptation and Prototype Alignment for Cross-domain Semantic Segmentation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00868},
}
Figure