Generalization by Adaptation: Diffusion-Based Domain Extension for Domain-Generalized Semantic Segmentation

Joshua Niemeijer, Manuel Schwonberg, Jan-Aike Termöhlen, Nico M. Schmidt, Tim Fingscheidt

Abstract

Semantic segmentation models trained on synthetic data often struggle with domain shift when deployed in real-world environments. This paper introduces DIDEX (Diffusion-Based Domain Extension), a framework that bridges Domain Generalization (DG) and Unsupervised Domain Adaptation (UDA). By utilizing diffusion models to generate a diverse "pseudo-target" domain from synthetic source data, the authors transform the DG problem into a targeted UDA task. Experimental results on benchmarks like Cityscapes and BDD100k demonstrate significant performance gains, with mIoU improvements of up to 11.8%.

Introduction

The challenge of domain shift is a major hurdle in semantic segmentation for autonomous driving. While synthetic datasets like GTA5 provide abundant labeled data, models trained on them often fail to generalize to the diverse lighting, weather, and architectural conditions of the real world. Traditionally, this is addressed via Unsupervised Domain Adaptation (UDA), which requires unlabeled target data, or Domain Generalization (DG), which aims for robustness without any target data.

Conceptual comparison of Domain Adaptation, Domain Generalization, and the proposed Generalization by Adaptation to a Pseudo-Target Domain.

As illustrated in the figure above, standard DG attempts to increase model generalization broadly, whereas the proposed approach adapts the model to a wide-ranging "pseudo-target" domain ($D^{PT}$) generated to encompass potential real-world variations.

Proposed Method: DIDEX

The authors propose a two-step framework called Diffusion-Based Domain Extension (DIDEX).

Step 1: Diffusion-Based Domain Extension

The core of DIDEX is the use of a diffusion model (e.g., Stable Diffusion 2.0) to "re-style" synthetic source images into a diverse set of pseudo-target images. To maintain semantic consistency between the original labels and the generated images, structural guidance (like ControlNet or depth maps) is employed.

A key innovation is the Modular Text Prompt Generation. Prompts are systematically constructed to introduce variations in location (e.g., "Europe", "China"), weather (e.g., "snowy", "rainy"), and lighting. Furthermore, Class-Uniform Sampling (CUS) is used to ensure that rare classes are explicitly mentioned in prompts, preventing the generative model from overlooking them.

Step 2: Generalization by Adaptation

Once the diverse pseudo-target domain ($D^{PT}$) is established, the problem is treated as a standard UDA task.

The two-step DIDEX framework: 1) Generating a pseudo-target domain using diffusion models and 2) Training a segmentation model using UDA techniques.

As shown in the framework diagram, the model is trained using high-performance UDA algorithms (such as DAFormer or MIC) to adapt from the synthetic source data to the generated $D^{PT}$. This effectively leverages the generative model's ability to simulate world diversity as a proxy for real-world target data.

Experiments and Results

The framework was evaluated by training on synthetic datasets (GTA5, SYNTHIA) and testing on real-world datasets including Cityscapes, BDD100k, Mapillary Vistas, and ACDC.

DIDEX achieved a new state-of-the-art in domain-generalized semantic segmentation. Notably, it improved average mIoU by 3.8% when adapting from GTA5 and by a substantial 11.8% when adapting from SYNTHIA. The model's performance on the ACDC dataset, which features adverse weather, confirms that the "semantic randomization" provided by text prompts effectively teaches the model weather-invariant features.

Conclusion

DIDEX demonstrates that diffusion models have reached a level of "functional realism" where they can be used to synthesize training data that is as effective as real-world imagery. By reframing Domain Generalization as a "solved" UDA problem through generative domain extension, this work provides a powerful new paradigm for building robust computer vision models.

Summary updated

BibTeX
@inproceedings{niemeijer2024generalization,
  author = {Joshua Niemeijer and Manuel Schwonberg and Jan-Aike Termöhlen and Nico M. Schmidt and Tim Fingscheidt},
  title = {{Generalization by Adaptation: Diffusion-Based Domain Extension for Domain-Generalized Semantic Segmentation}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00281},
}
Figure