Source-Free Domain Adaptation for Semantic Segmentation

Yuang Liu, Wei Zhang, Jun Wang

Abstract

Traditional Unsupervised Domain Adaptation (UDA) for semantic segmentation relies on concurrent access to both source and target datasets. However, data privacy and proprietary concerns often restrict access to source data, leaving only a pre-trained model available for adaptation. This paper introduces SFDA, a framework designed for source-free domain adaptation. SFDA recovers source knowledge through generative modeling of Batch Normalization Statistics and utilizes a dual attention distillation mechanism alongside patch-level self-supervision. Experimental results on GTA5, SYNTHIA, and cross-city benchmarks demonstrate that SFDA rivals and occasionally outperforms traditional UDA methods that require full source data access.

The Challenge of Source-Free Adaptation

In semantic segmentation, models must assign a class label to every pixel. Adapting these models from a source domain (e.g., synthetic data) to a target domain (e.g., real-world imagery) typically involves aligning feature distributions between the two. Standard UDA techniques assume that both datasets are available during training. In practice, source data is often inaccessible due to legal or commercial constraints.

Overview of the SFDA framework, highlighting the inaccessible source domain and the use of shared models to generate pseudo-labels for the target domain.

When the source data is missing, the model lacks a reference for the original distribution, making it difficult to prevent "catastrophic forgetting" or to maintain the structural integrity of segmentation maps during adaptation. This paper addresses this constraint by treating the pre-trained model itself as a repository of source knowledge.

The SFDA Framework

The proposed SFDA method operates in two primary stages: knowledge recovery and target adaptation.

1. Source Knowledge Recovery

Since the original source images are unavailable, SFDA uses a generator to synthesize proxy source samples. This process leverages Batch Normalization Statistics (BNS) stored within the pre-trained source model. These statistics serve as a mathematical fingerprint of the source distribution. To ensure these synthesized images maintain realistic spatial relationships (e.g., sky above roads), a Dual Attention Distillation (DAD) mechanism is employed to capture long-range dependencies in both spatial and channel dimensions.

2. Intra-domain Patch-level Self-supervision (IPSM)

During adaptation to the target domain, the model generates pseudo-labels. Unlike previous methods that treat entire images as uniform, SFDA employs a patch-level strategy.

Visualization of pseudo-labeling where the model clusters target features to assign labels in the absence of ground truth.

By breaking images into patches and ranking them by entropy, the system identifies "easy" patches where the model is confident. These high-confidence patches then provide supervision for "hard" (high-entropy) patches through an adversarial learning process. This granularity is crucial for the pixel-perfect requirements of semantic segmentation.

Key Insights

  • The Model is the Memory: Batch Normalization layers contain enough statistical information to reconstruct a proxy of the source domain, eliminating the need for the original raw data.
  • Attention as a Bridge: While the visual style of domains may differ, the attention maps (where the model focuses to identify objects) are often domain-agnostic. Distilling this attention helps ground the model during adaptation.
  • Granularity Matters: Moving from image-level to patch-level supervision (IPSM) allows the model to learn from locally accurate regions to correct errors in more complex parts of the scene.

Experimental Evaluation

The authors evaluated SFDA across several challenging benchmarks, showing that it can match or exceed "source-driven" methods:

  • GTA5 → Cityscapes: SFDA achieved a mean Intersection over Union (mIoU) of 43.16, surpassing the source-driven MinEnt method (40.17).
  • SYNTHIA → Cityscapes: The framework reached 45.89 mIoU (13 classes), outperforming multiple established UDA competitors.
  • Cross-City Adaptation: Tested on the Cityscapes to NTHU benchmark (covering Rio, Rome, Tokyo, and Taipei), SFDA showed consistent performance gains, proving its robustness to varying urban environments.

Conclusion

SFDA demonstrates that the internal statistics of a trained model can effectively substitute for the original training data. By focusing on patch-level self-supervision and attention distillation, the framework overcomes the limitations of source-free environments. Future research aims to improve the quality of synthesized source proxies using advanced generative models, which could further bridge the gap between source-free and fully supervised domain adaptation.

Summary updated

BibTeX
@inproceedings{liu2021source,
  author = {Yuang Liu and Wei Zhang and Jun Wang},
  title = {{Source-Free Domain Adaptation for Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00127},
}
Figure