DGSS : Domain Generalized Semantic Segmentation using Iterative Style Mining and Latent Representation Alignment

Pranjay Shyam, Antyanta Bangunharcana, Kuk-Jin Yoon, Kyung-Soo KimarXiv 2022

Abstract

Semantic segmentation algorithms require access to well-annotated datasets captured under diverse illumination conditions to ensure consistent performance. However, poor visibility conditions at varying illumination conditions result in laborious and error-prone labeling. Alternatively, using synthetic samples to train segmentation algorithms has gained interest with the drawback of domain gap that results in sub-optimal performance. While current state-of-the-art (SoTA) have proposed different mechanisms to bridge the domain gap, they still perform poorly in low illumination conditions with an average performance drop of -10.7 mIoU. In this paper, we focus upon single source domain generalization to overcome the domain gap and propose a two-step framework wherein we first identify an adversarial style that maximizes the domain gap between stylized and source images. Subsequently, these stylized images are used to categorically align features such that features belonging to the same class are clustered together in latent space, irrespective of domain gap. Furthermore, to increase intra-class variance while training, we propose a style mixing mechanism wherein the same objects from different styles are mixed to construct a new training image. This framework allows us to achieve a domain generalized semantic segmentation algorithm with consistent performance without prior information of the target domain while relying on a single source. Based on extensive experiments, we match SoTA performance on SYNTHIA -> Cityscapes, GTAV -> Cityscapes while setting new SoTA on GTAV -> Dark Zurich and GTAV -> Night Driving benchmarks without retraining.

Introduction

Semantic segmentation—the task of labeling every pixel in an image (e.g., "this is a car," "this is a sidewalk")—is critical for autonomous driving. However, training these models requires massive amounts of human-labeled data. While synthetic data from game engines (like GTA-V) provides "free" labels, there is a significant domain gap between game graphics and the real world, especially in low-light or adverse weather conditions.

Visualizing the domain gap between daytime and nighttime driving scenes.

Most existing solutions use Unsupervised Domain Adaptation (UDA), which requires access to unlabeled images from the target environment during training. This paper tackles the harder problem of Domain Generalization (DG): building a model that can handle any unknown environment (day, night, rain) after being trained only on a single synthetic source, without ever seeing the target domain beforehand.

Methodology

The proposed DGSS framework focuses on learning "texture-invariant structural details" through three primary components:

  1. Iterative Style Mining (ISM): Instead of using a fixed set of styles, the system uses a lightweight style transfer network to generate various versions of a training image. It specifically "mines" for adversarial styles—those that maximize the distance in the model's feature space between the original and the stylized image. This forces the model to work harder to recognize objects despite wild changes in appearance.
  2. Latent Representation Alignment: To ensure the model remains robust to these styles, two specific loss functions are employed:
  3. Supervised Contrastive Learning ($L_{SupCon}$): This pulls features of the same class (e.g., all "tree" pixels) together in the model's internal representation while pushing different classes apart.
  4. Cosine Similarity Loss ($L_{cosine}$): This enforces separation between different category clusters, ensuring maximum separation in the latent space.
  5. Style Mixing Augmentation: The framework combines "Cut-Mix" and "Copy-Paste" techniques, taking objects from different stylized versions of the same scene and mixing them into a single training image. This creates a "mosaic" of textures for the same object class, pushing the model to ignore texture and focus on shape and structure.

Experimental Results

The researchers evaluated DGSS using synthetic sources (GTA-V, SYNTHIA) and real-world targets (Cityscapes, Dark Zurich, Night Driving).

Comparison of DGSS segmentation results against ground truth for nighttime scenes.

DGSS sets a new high bar for domain generalization in semantic segmentation. On the GTA-V -> Dark Zurich benchmark, DGSS achieved 36.5 mIoU, significantly outperforming previous methods like DANNet (32.0 mIoU). When evaluated on the Night Driving dataset without any prior training, DGSS reached 51.1 mIoU, nearly doubling the performance of recent UDA methods like ProDA (26.8 mIoU). Crucially, the model maintained high performance across both daytime and nighttime datasets without needing retraining for specific lighting conditions.

Conclusion

DGSS demonstrates that adversarial style mining and categorical alignment can effectively mitigate the domain gap in semantic segmentation. By prioritizing structural features over transient textures, the model achieves robust performance in challenging low-light environments using only synthetic training data. While the iterative generation of styles adds computational overhead, the resulting blind generalization capabilities represent a significant step forward for robust autonomous perception.

Summary updated

BibTeX
@misc{shyam2022dgss,
  author = {Pranjay Shyam and Antyanta Bangunharcana and Kuk-Jin Yoon and Kyung-Soo Kim},
  title = {{DGSS : Domain Generalized Semantic Segmentation using Iterative Style Mining and Latent Representation Alignment}},
  year = {2022},
  eprint = {2202.13144},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.13144},
}
Figure