Texture Learning Domain Randomization for Domain Generalized Segmentation

Sunghwan Kim, Dae-Hwan Kim, Hoseong Kim

Abstract

Deep Neural Networks (DNNs) frequently suffer from "texture bias," where they overfit to the specific visual textures of the training (source) domain. In Domain Generalized Semantic Segmentation (DGSS), this leads to poor performance when the model is deployed in real-world environments that differ from the synthetic training data. While traditional methods attempt to ignore texture to promote shape-based generalization, this paper introduces Texture Learning Domain Randomization (TLDR). TLDR treats texture as a vital, complementary cue to shape rather than a nuisance. By leveraging Gram-matrix-based losses and random style transfer, the framework helps models learn robust, generalizable texture features, achieving a new state-of-the-art in semantic segmentation across unseen domains.

Introduction

Domain Generalized Semantic Segmentation (DGSS) aims to train a model on a source domain (e.g., synthetic data like GTA V) such that it generalizes to diverse, unseen target domains (e.g., real-world cities like Berlin or London) without further fine-tuning. A primary hurdle in this task is the tendency of DNNs to memorize source-specific textures—a phenomenon known as texture bias.

To combat this, existing literature often emphasizes shape-based learning, using normalization techniques or extreme style randomization to strip away texture information. However, the authors of TLDR identify a critical flaw in this "shape-only" approach: many semantic classes, such as "road," "sidewalk," and "terrain," are geometrically similar and primarily distinguishable via texture. By discarding texture, models lose the very cues necessary to differentiate these categories. TLDR proposes to embrace texture by regularizing it rather than removing it.

Methodology

The TLDR framework is designed to prevent the model from memorizing source-specific details while encouraging the learning of generalizable texture patterns. The core of the approach is the Texture Extraction Operator (TEO), which utilizes Gram-matrices—a standard tool in style transfer—to isolate texture patterns from spatial structures.

Texture Learning Objectives

TLDR introduces two primary novel losses to guide the training process:

  1. Texture Regularization Loss ($L_{TR}$): This loss acts as a feature anchor. It ensures that the model’s texture representations remain aligned with those of a model pre-trained on ImageNet. Because ImageNet contains a vast diversity of real-world textures, it serves as an effective proxy for "general" texture knowledge, preventing the model from drifting too far into source-specific synthetic patterns.
  2. Texture Generalization Loss ($L_{TG}$): To improve robustness, the model is exposed to images transformed by a Style Transfer Module (STM) using random styles sampled from ImageNet. To ensure the model learns diverse textures without becoming confused by the style shift, the authors employ Random Style Masking (RSM). RSM identifies the feature map regions most affected by style transfer and enforces consistency on those specific texture-rich features.

To balance these objectives, a Linear Decay Factor (LDF) is applied, gradually reducing the influence of texture constraints as the model converges on the primary segmentation task.

Experimental Setup

The authors evaluated TLDR using standard DGSS benchmarks:

  • Source Domains: Synthetic datasets including GTA V (24,966 images) and SYNTHIA (9,400 images).
  • Target Domains: Real-world datasets including Cityscapes, BDD100K, and Mapillary Vistas.
  • Implementation: The framework was tested using ResNet-50 and ResNet-101 backbones, with random style images for the STM sourced from the ImageNet validation set.

Key Insights and Results

Texture as a Discriminative Cue

The most significant insight of the study is the inherent discriminativeness of texture. Through t-SNE visualization, the authors demonstrated that while shape features for classes like "road" and "sidewalk" are often entangled and difficult to separate, their texture features (represented by Gram-matrices) form naturally distinct clusters. This confirms that texture is a superior cue for distinguishing between visually similar categories.

Performance Benchmarks

TLDR established a new state-of-the-art for domain generalization in segmentation:

  • GTA V → Cityscapes: Using a ResNet-50 backbone, TLDR achieved 46.5 mIoU, a 1.9 point improvement over previous leading methods.
  • Scalability: With a ResNet-101 backbone, performance increased to 47.58 mIoU.
  • Qualitative Results: Visual inspections show that TLDR maintains cleaner boundaries between roads and sidewalks, particularly in adverse conditions like fog or rain where shape cues are degraded but texture remains partially consistent.

Conclusion

TLDR demonstrates that texture should not be discarded in the pursuit of domain generalization. Instead, by regularizing texture representations and using style randomization strategically, models can leverage texture as a robust feature for segmentation.

Future work may address the class-dependent nature of texture importance. While vegetation and road surfaces rely heavily on texture, other classes may prioritize shape. Developing a class-wise texture learning mechanism that dynamically weights these cues remains a promising avenue for further improving model robustness across extreme domain shifts.

Summary updated

BibTeX
@inproceedings{kim2023texture,
  author = {Sunghwan Kim and Dae-Hwan Kim and Hoseong Kim},
  title = {{Texture Learning Domain Randomization for Domain Generalized Segmentation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure