Intra- & Extra-Source Exemplar-Based Style Synthesis for Improved Domain Generalization

Yumeng Li, Dan Zhang, Margret Keuper, Anna Khoreva

Abstract

Domain Generalization (DG) remains a critical hurdle for deploying semantic segmentation models in autonomous driving. Models trained on source domains (e.g., sunny weather) frequently fail when encountering unseen target domains like rain, snow, or night. This paper presents a novel pipeline for style synthesis using a masked noise encoder for StyleGAN2. By disentangling spatial layout from global style, the proposed method enables Intra-Source and Extra-Source Style Augmentation (ISSA and ESSA). These techniques generate diverse, label-preserving training samples that significantly enhance model robustness, yielding up to a 12.4% improvement in mIoU on challenging benchmarks.

Introduction

Deep learning models for autonomous driving are notoriously brittle. A model trained on the sunny streets of Germany (Cityscapes dataset) often fails when it encounters a snowy night in Switzerland or a rainy afternoon in the US. This is the Domain Generalization (DG) challenge. The standard solution—collecting and labeling more data for every possible weather condition—is prohibitively expensive. While basic data augmentation helps, it often fails to capture the complex "style" of real-world domain shifts. This research aims to create a pipeline that generates highly realistic, label-preserving variations of training data to make models more robust.

Methodology

The core of this approach is a new method for GAN Inversion, which involves finding the latent code that allows a pre-trained StyleGAN2 to recreate a real image.

The Masked Noise Encoder

Standard inversion often struggles to perfectly reconstruct complex driving scenes. The authors introduce a "masked noise encoder" that predicts an additive noise map to capture fine-grained spatial details (content/layout). To prevent the noise map from capturing style information, the authors employ random noise masking during training. This forces the model's latent codes ($w$) to capture the global style while restricting the noise map to the underlying geometry.

Style Augmentation Strategies

  1. Intra-Source Style Augmentation (ISSA): Randomly swapping styles between images within the same training set.
  2. Extra-Source Style Augmentation (ESSA): Applying the style from a completely unrelated, unlabelled image (e.g., a web-crawled photo of a sunset) to the training layout.

Because the semantic layout remains identical, the original ground-truth labels remain valid for the new stylized images, providing a "free" source of diverse training data.

Experimental Results

The authors evaluated their method on standard driving benchmarks, using Cityscapes and BDD100K-Daytime as source domains and ACDC (Rain, Fog, Snow, Night) and Dark Zürich as unseen target domains.

Qualitative comparison of semantic segmentation on an unseen snowy domain. The proposed method ("Ours") significantly outperforms the baseline in capturing the truck and pole structures.

Key Findings

  • Significant mIoU Gains: ISSA achieved up to a 12.4% improvement in mean Intersection over Union (mIoU) on driving scenes under various data shifts.
  • Model Agnostic: The method improved both CNN-based (HRNet) and Transformer-based (SegFormer) architectures.
  • Complementary to SOTA: When added to RobustNet, it provided an additional 3% mIoU boost on the Cityscapes to Dark Zürich benchmark.
  • Proxy Validation: The pipeline can create a "stylized proxy validation set" to predict model performance in specific conditions (e.g., rain) with a high correlation ($\rho > 0.95$) to real-world target performance.

Conclusion

By leveraging GAN inversion with a masked noise encoder, this work demonstrates that disentangling style from content is a powerful tool for domain generalization. While currently focused on global style transformations, future work may integrate language-vision models like CLIP for text-driven style synthesis, providing even more granular control over synthetic data generation.

Summary updated

BibTeX
@article{li2024intra,
  author = {Yumeng Li and Dan Zhang and Margret Keuper and Anna Khoreva},
  title = {{Intra- \& Extra-Source Exemplar-Based Style Synthesis for Improved Domain Generalization}},
  journal = {Int. J. Comput. Vis.},
  year = {2024},
  doi = {10.1007/s11263-023-01878-8},
}
Figure