Learning Texture Invariant Representation for Domain Adaptation of Semantic Segmentation

Myeongjin Kim, Hyeran ByunCVPR 2020

Abstract

Domain adaptation for semantic segmentation is often hindered by the "domain gap" between synthetic training data and real-world testing environments. This paper identifies texture bias in Convolutional Neural Networks (CNNs) as a primary driver of this gap. We propose a two-stage framework that first learns texture-invariant representations by diversifying synthetic data with thousands of artistic styles, followed by a self-training stage on the target domain. Our method achieves state-of-the-art performance on synthetic-to-real benchmarks, demonstrating that prioritizing shape over texture significantly enhances model robustness and generalization.

Introduction

Training deep learning models for semantic segmentation requires massive amounts of human-annotated data. While synthetic data from game engines like GTA5 provides a cost-effective alternative with automated labels, models trained on such data often fail when deployed in real-world scenarios. This failure is attributed to the domain gap—the stylistic and distributional differences between synthetic and real images.

Recent research suggests that standard CNNs are heavily biased toward texture rather than shape. Consequently, a model trained on synthetic data overfits to the specific rendering style of the game engine, failing to recognize objects like roads or trees when their textures change in real-world photographs. This paper addresses this challenge by forcing the model to ignore specific textures and focus on invariant geometric features.

Methodology

The proposed framework consists of a two-stage training process designed to bridge the domain gap by promoting texture invariance.

Stage 1: Learning Texture Invariance

In the first stage, the model is trained to extract features that are independent of local texture. This is achieved through two primary mechanisms:

  1. Style Transfer (Style-swap): Instead of merely attempting to make synthetic images look "real," we apply thousands of random artistic textures from the "Painter by Numbers" dataset to the synthetic source images. This prevents the model from relying on any single texture for object identification.
  2. Dual-Stream Training: The network is trained alternately on these stylized images and "translated" images (synthetic images modified via CycleGAN to match the target domain's color palette). An adversarial loss, implemented via a discriminator, aligns the feature distributions between the source and target domains.
Overview of the proposed domain adaptation framework featuring dual-stream training with stylized and translated source data.

Stage 2: Target Domain Adaptation

Once the model has learned texture-invariant representations, it undergoes a self-training phase. The model generates predictions for the real-world (target) images; the most confident of these predictions are used as "pseudo-labels" to provide direct supervision, allowing the model to adapt to the specific textures present in the target domain without losing its shape-based recognition capabilities.

Data Augmentation and Texture Invariance

The core innovation lies in using artistic stylization as a regularizer. By "breaking" the model's dependence on local pixel patterns, we force it to learn the global structure and shape of objects. This approach mimics human visual perception, which is inherently more shape-dependent than standard CNNs.

Comparison of original synthetic images (left), translated images (middle), and stylized images with artistic textures (right).

Our analysis shows that texture sensitivity varies by class. Large-area classes such as "road" and "sidewalk" are highly sensitive to texture changes, and our method yields the most significant gains in these categories. Conversely, small objects like "traffic signs" depend more on layout and shape, where the texture gap is less pronounced than the "layout gap" (discrepancies in object size and placement).

Experimental Results

The method was evaluated on standard synthetic-to-real benchmarks, including GTA5 to Cityscapes and SYNTHIA to Cityscapes.

  • State-of-the-Art Performance: On the GTA5 $\to$ Cityscapes benchmark, the proposed method achieved a 50.2 mIoU (mean Intersection over Union), outperforming previous leading methods such as BDL (48.5).
  • Ablation Studies: Results indicate that training on stylized images alone (42.5 mIoU) is more effective than training solely on images translated to look real (41.0 mIoU). This confirms that texture diversity is a more potent regularizer than visual realism during the initial learning phase.
  • Robustness: The texture-invariant model demonstrates significantly higher robustness to digital noise (e.g., Gaussian or speckle noise) compared to standard domain adaptation methods, as it does not rely on high-frequency texture details that noise typically corrupts.

Conclusion and Future Work

By shifting the focus from texture to shape, we provide a robust solution for synthetic-to-real domain adaptation in semantic segmentation. While this method successfully addresses the texture gap, a "layout gap" remains—particularly for small objects whose relative sizes differ between datasets. Future work will explore integrating layout-aware adaptation and class-ratio priors to further close the performance gap between synthetic and real-world training.

Summary updated

BibTeX
@inproceedings{kim2020learning,
  author = {Myeongjin Kim and Hyeran Byun},
  title = {{Learning Texture Invariant Representation for Domain Adaptation of Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01299},
}
Figure