Pulling Target to Source: A New Perspective on Domain Adaptive Semantic Segmentation

Haochen Wang, Yujun Shen, Jingjing Fei, Wei Li, Liwei Wu, Yuxi Wang, Zhaoxiang Zhang

Abstract

Semantic segmentation models trained on synthetic data often struggle with the domain gap when applied to real-world images. This paper introduces T2S-DA (Target-to-Source Domain Adaptation), a novel approach that "pulls" target features toward stable, discriminative source features. By utilizing Fourier-based image translation to create labeled pseudo-target queries and a dynamic re-weighting strategy for imbalanced classes, T2S-DA achieves state-of-the-art performance on major benchmarks, particularly for challenging "tail" categories.

Introduction

Deep learning models for semantic segmentation require vast amounts of labeled data. While synthetic datasets like GTA5 provide an abundant source of ground truth, models trained exclusively on them often fail in real-world environments like Cityscapes due to the "domain gap"—discrepancies in lighting, textures, and sensor characteristics.

Conventional Unsupervised Domain Adaptation (UDA) methods typically attempt to align source and target domains into a shared feature space or employ self-training on noisy target predictions. However, global alignment often sacrifices fine-grained category details, and self-training can exacerbate class imbalance, where the model ignores rare but critical classes (e.g., "trains" or "poles") in favor of dominant ones (e.g., "road" or "sky").

Methodology: Pulling Target to Source

The core philosophy of T2S-DA is to treat the labeled source domain as a reliable anchor. Instead of pushing the source toward the target, the method pulls target features toward the source.

Conceptual comparison between conventional DA methods and the proposed T2S-DA approach.

The T2S-DA framework consists of four primary components:

  1. Pseudo-Target Generation: Using Fourier Domain Adaptation (FDA), source images are translated into the style of the target domain. These "pseudo-target" images retain perfect ground-truth labels while mimicking target appearances.
  2. Contrastive "Pulling": Within a contrastive learning framework (InfoNCE), features from pseudo-target images act as queries, while source features serve as positive keys. This forces the model to learn target-style representations that are as discriminative as their source counterparts.
  3. Dynamic Re-Weighting (DRW): To address class imbalance, the model tracks its per-category confidence and automatically increases loss weights for underperforming classes.
  4. Advanced Sampling: Class-Balanced Query Sampling (CBQS) prevents rare classes from being overwhelmed, while Domain-Equalized Negative Pair Sampling (DENPS) ensures the model distinguishes categories effectively across both domains.

Empirical Analysis and Results

The authors evaluate T2S-DA on standard UDA benchmarks, primarily GTA5 → Cityscapes and Synthia → Cityscapes.

Similarity as a Performance Bottleneck

A key insight of the paper is the direct correlation between cross-domain feature similarity and segmentation performance. As shown in Figure 1, categories with low initial feature similarity (like "train") suffer the most from the domain gap. By explicitly "pulling" these features together, T2S-DA achieves dramatic performance gains.

Correlation between cross-domain feature similarity and IoU performance across different categories.

Key Performance Metrics

  • State-of-the-Art Results: On the GTA5 → Cityscapes benchmark, T2S-DA achieved 75.1% mIoU using the HRDA backbone, a +1.3% improvement over previous benchmarks.
  • Tail Class Recovery: The "train" category saw a massive improvement, moving from near-zero IoU in many baselines to over 70%.
  • Robust Generalization: When tested on unseen target domains, T2S-DA improved the baseline by +2.5%, indicating the learning of truly domain-invariant features.

Conclusion and Future Work

T2S-DA demonstrates that the direction of domain alignment is crucial. By anchoring the target domain to the well-defined source domain, models can maintain high discriminative power even in the presence of significant style shifts. While the method currently relies on Fourier-based translation, future work could explore more sophisticated generative models like Stable Diffusion to further enhance pseudo-target quality while maintaining semantic integrity.

Summary updated

BibTeX
@article{wang2023pulling,
  author = {Haochen Wang and Yujun Shen and Jingjing Fei and Wei Li and Liwei Wu and Yuxi Wang and Zhaoxiang Zhang},
  title = {{Pulling Target to Source: A New Perspective on Domain Adaptive Semantic Segmentation}},
  journal = {Int. J. Comput. Vis.},
  year = {2023},
}
Figure