FSDR: Frequency Space Domain Randomization for Domain Generalization

Jiaxing Huang, Dayan Guan, Aoran Xiao, Shijian Lu

Abstract

Deep learning models for semantic segmentation often struggle with domain shift, where performance drops significantly when moving from synthetic training data to real-world environments. This paper introduces Frequency Space Domain Randomization (FSDR), a novel technique that performs randomization in the frequency domain using Discrete Cosine Transform (DCT). By identifying and preserving domain-invariant frequency components (DIFs) while randomizing domain-variant components (DVFs), FSDR enables models to learn robust features that maintain semantic structure. FSDR achieves state-of-the-art results on multiple benchmarks, even rivaling unsupervised domain adaptation methods that have access to target data during training.

Introduction: The Challenge of Domain Shift

Semantic segmentation models trained on synthetic datasets like GTA5 often fail to generalize to real-world datasets like Cityscapes due to differences in lighting, texture, and weather—collectively known as "domain shift." Domain Generalization (DG) aims to mitigate this by training models to be robust across unknown target domains.

A common strategy is Spatial Space Domain Randomization (SSDR), which stylizes source images to force the model to ignore domain-specific features. However, SSDR often relies on complex generative models (GANs) that can inadvertently distort the semantic structures—such as object boundaries and shapes—essential for accurate segmentation.

Comparison of Spatial Space Domain Randomization (SSDR) and Frequency Space Domain Randomization (FSDR).

Methodology: Randomization in the Frequency Domain

FSDR addresses the limitations of spatial randomization by operating in the frequency domain. The core innovation involves decomposing images into 64 frequency components (FCs) using the Discrete Cosine Transform (DCT).

Frequency Decomposition and Identification

The authors discovered that different frequency bands carry different types of information. Domain-variant features (DVFs), such as global lighting and color, typically reside in very low and very high frequencies. Conversely, domain-invariant features (DIFs), which capture the underlying geometry and structure of objects, are concentrated in the middle frequencies.

Visualization of frequency components across synthetic and real domains, highlighting domain-invariant middle frequencies.

FSDR Variants

The paper proposes two implementations of this concept:

  1. FSDR-SA (Spectrum Analysis): A static approach where specific frequency bands are pre-defined as DVFs or DIFs based on prior statistical analysis.
  2. FSDR-SL (Spectrum Learning): A dynamic, bidirectional framework. It employs an entropy-based mechanism to identify DIFs on the fly. If the model predicts a frequency component with high confidence (low entropy) on a target-like image, that component is treated as domain-invariant.

Randomization via Histogram Matching

Instead of using GANs, FSDR randomizes DVFs by matching their frequency-coefficient histograms to those of a randomly selected reference image (e.g., from ImageNet). This process effectively swaps the "style" of the image while leaving the structural "skeleton" (the DIFs) untouched.

Key Results and Performance

FSDR was evaluated on challenging synthetic-to-real benchmarks, including GTA5/SYNTHIA to Cityscapes, BDD100K, and Mapillary Vistas.

  • State-of-the-Art Accuracy: Using a ResNet101 backbone, FSDR achieved a mean Intersection over Union (mIoU) of 43.1% on the GTA5 generalization task, outperforming previous methods like DRPC (39.8%) and IBN-Net (37.2%).
  • Comparison with UDA: FSDR's performance is competitive with several Unsupervised Domain Adaptation (UDA) methods. This is a significant achievement, as UDA methods utilize target domain data during training, whereas FSDR generalizes to unseen domains blindly.
  • Qualitative Superiority: Visual results demonstrate that FSDR maintains much sharper object boundaries and more consistent class labels compared to spatial randomization techniques, which often produce "blobby" or misaligned segmentations.

Conclusion and Future Directions

FSDR demonstrates that the frequency domain offers a more precise "scalpel" for domain randomization than the spatial domain. By targeting specific frequency components, researchers can alter domain-specific styles without compromising the structural integrity of the scene. Future work may explore alternative transforms like Wavelets for even better feature isolation and investigate the impact of different reference datasets for histogram matching.

Summary updated

BibTeX
@inproceedings{huang2021fsdr,
  author = {Jiaxing Huang and Dayan Guan and Aoran Xiao and Shijian Lu},
  title = {{FSDR: Frequency Space Domain Randomization for Domain Generalization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00682},
}
Figure