Exploiting Semantics in Adversarial Training for Image-Level Domain Adaptation

Pierluigi Zama Ramirez, Alessio Tonioni, Luigi Di Stefano

TL;DR

This paper introduces a semantically-aware Generative Adversarial Network (GAN) designed to bridge the "domain gap" between synthetic training data and real-world images. By enforcing semantic consistency during the image translation process, the authors enable deep learning models to be trained on synthetic data while achieving significantly higher accuracy on real-world semantic segmentation tasks.

The Problem: Domain Shift in Semantic Segmentation

Deep learning models for semantic segmentation—the task of labeling every pixel in an image (e.g., "road," "pedestrian")—are notoriously data-hungry. Manually annotating these images is exhausting; a single image can take hours to label accurately. To bypass this, researchers often use synthetic data from simulators or video games like Grand Theft Auto V (GTA), where labels are generated automatically.

Synthetic images from GTA V (top) come with pixel-perfect semantic labels (bottom) for free, but suffer from a significant domain gap compared to real-world photos.

However, there is a catch: domain shift. Synthetic images have different textures, lighting, and styles compared to real-world photos. A model trained on "game" pixels often fails when deployed on real streets. While GANs can make synthetic images look more "real," standard GANs often introduce artifacts or distort the geometry of the scene, rendering the original synthetic labels useless.

Methodology: Semantically-Aware GANs

The authors propose a novel image-to-image translation framework based on the CycleGAN architecture, but with two critical enhancements to preserve structural integrity.

The semantically-aware GAN framework ensures that the translated image (orange) maintains the same semantic structure as the source synthetic image (blue) by using the segmentation map (yellow) as a constraint.

1. Semantic Discriminator Loss

Standard GAN discriminators only ask, "Does this image look real?" The authors add a "semantic" task to the discriminator. It must not only distinguish real from fake but also perform semantic segmentation on the synthetic images. This forces the Generator to preserve the identity of objects (e.g., a tree must still look like a tree after translation) to satisfy the discriminator.

2. Weighted Reconstruction Loss

In many street scenes, "road" and "sky" pixels are everywhere, while "traffic lights" or "poles" are rare. Standard loss functions tend to ignore these small, rare classes. The authors introduce a weighting mask that prioritizes the reconstruction of infrequent classes, ensuring that small but vital details aren't "washed away" during the translation process.

Datasets and Evaluation

The study utilizes two primary benchmarks:

  • Source (Synthetic): The GTA dataset, containing 22,000 high-resolution images with pixel-perfect semantic labels.
  • Target (Real): The Cityscapes dataset, featuring 5,000 real-world images of urban traffic scenes.

The effectiveness of the approach was tested by training a standard segmentation network (FCN8s) on the adapted images and testing it on real Cityscapes data.

Key Results

The semantically-aware adaptation significantly improved performance:

  • Accuracy Boost: The model trained on adapted images achieved a 34.2% mIoU (mean Intersection over Union), compared to just 18.2% for a model trained on raw synthetic images.
  • Comparison to Baselines: Their method outperformed standard CycleGAN (29.4% mIoU) and other contemporary domain adaptation techniques.
  • Qualitative Improvement: Visual results show that their GAN produces much sharper edges and fewer artifacts than previous methods, making the generated data much more reliable for training.

Conclusion

By using semantic labels as an "anchor" during adversarial training, the authors successfully decouple image style from content. This allows for the effective use of synthetic data in real-world applications. Future work will explore combining this pixel-level adaptation with feature-level alignment and testing the framework on other tasks like object detection across different environmental shifts.

Summary updated

BibTeX
@inproceedings{ramirez2018exploiting,
  author = {Pierluigi Zama Ramirez and Alessio Tonioni and Luigi Di Stefano},
  title = {{Exploiting Semantics in Adversarial Training for Image-Level Domain Adaptation}},
  booktitle = {IPAS},
  year = {2018},
  doi = {10.1109/ipas.2018.8708884},
}
Figure