NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Contextual-Relation Consistent Domain Adaptation for Semantic Segmentation

Jiaxing Huang, Shijian Lu, Dayan Guan, Xiaobing Zhang

Introduction

Semantic segmentation is a critical task in computer vision, requiring the assignment of a class label to every pixel in an image. While deep learning models have achieved remarkable success in this area, they typically rely on vast amounts of human-annotated data, which is both time-consuming and expensive to produce. To mitigate this, researchers utilize Unsupervised Domain Adaptation (UDA), training models on synthetic datasets (e.g., GTA5, SYNTHIA) where labels are automatically generated, and then adapting them to real-world target domains (e.g., Cityscapes).

The Challenge of Local Inconsistency

The primary obstacle in UDA is the "domain shift"—the stylistic and structural differences between synthetic and real-world data. Conventional UDA methods often employ adversarial learning with global discriminators to align the overall distribution of features. However, these global approaches frequently overlook or disrupt local contextual consistency. For instance, a model might correctly identify a "building" globally but fail to maintain the logical relationship that "sky" should not appear within its boundaries. This leads to fragmented and logically inconsistent segmentation maps in the target domain.

Comparison of Global Alignment (TGA) vs. Local Alignment (CrCDA). Global alignment can lead to logical errors like sky appearing inside buildings, while CrCDA preserves contextual relations.

The CrCDA Framework

To address these limitations, this paper introduces Contextual-Relation Consistent Domain Adaptation (CrCDA). The core philosophy is that while textures change between domains, the underlying "contextual logic"—such as a pole typically standing next to a sidewalk—remains invariant. CrCDA aligns features across three scales: pixel, local, and global.

Contextual-Relation Pseudo Labeling

To capture local relationships, the framework samples regions from the labeled source domain and uses DBSCAN clustering on histograms of gradients. This process groups regions into $N$ prototypical "contextual relations" (e.g., road-sidewalk, sky-building), which serve as pseudo-labels for a specialized local-relation classifier ($C_{cr}$).

Adaptive Entropy Max-Min (AEMM) Learning

Rather than relying on a separate, often unstable GAN-style discriminator, CrCDA utilizes an adversarial entropy scheme to perform local alignment:

  1. Maximization: The classifier ($C_{cr}$) maximizes entropy on target data to identify potential prototypes.
  2. Minimization: The feature extractor ($E$) minimizes this entropy, forcing target features to cluster tightly around the established source prototypes.
The CrCDA architecture illustrating the Adaptive Entropy Max-Min (AEMM) scheme. The model aligns domains by optimizing entropy across dual classifiers without requiring a separate discriminator network.

Experimental Evaluation

CrCDA was evaluated on standard synthetic-to-real benchmarks, demonstrating state-of-the-art performance:

  • GTA5 to Cityscapes: The model achieved 48.6% mIoU (mean Intersection over Union) using a ResNet-101 backbone, representing a +2.1% improvement over previous leading methods.
  • SYNTHIA to Cityscapes: It reached 50.0% mIoU (across 13 classes), outperforming established competitors like AdvEnt and CLAN.

Qualitative results confirm that CrCDA produces significantly smoother segmentation boundaries and fewer "speckle" errors, particularly for thin or small objects like traffic signs and poles that are often lost during global alignment.

Conclusion

CrCDA demonstrates that focusing on local contextual consistency is a powerful alternative to purely global feature alignment. By leveraging the invariant relationships between objects and using a discriminator-free adversarial entropy scheme, the framework achieves superior adaptation results with higher logical integrity. Future work may extend this contextual consistency approach to other dense prediction tasks, such as instance segmentation and depth estimation.

Summary updated

BibTeX
@inproceedings{huang2020contextual,
  author = {Jiaxing Huang and Shijian Lu and Dayan Guan and Xiaobing Zhang},
  title = {{Contextual-Relation Consistent Domain Adaptation for Semantic Segmentation}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58555-6\_42},
}
Figure