OSSA: Unsupervised One-Shot Style Adaptation

Robin Gerster, Holger Caesar, Matthias Rapp, Alexander Wolpert, Michael Teutsch

Introduction

Deep neural networks, particularly Convolutional Neural Networks (CNNs), are notoriously sensitive to "domain shift." A model trained on sunny city streets often fails when deployed in fog, or when moving from a simulated environment to the real world. This performance drop occurs because CNNs exhibit a strong "style bias," prioritizing textures and lighting over the actual geometric shapes of objects.

While Unsupervised Domain Adaptation (UDA) aims to mitigate this, most existing techniques require massive amounts of unlabeled data from the target environment. In many practical scenarios—such as medical imaging or specialized autonomous driving conditions—collecting thousands of images is logistically impossible. OSSA (One-Shot Style Adaptation) addresses this challenge by adapting models using just a single unlabeled image from the target domain.

Methodology

OSSA is a "data-frugal" method that bridges the domain gap at the feature level during training. The core of the approach relies on extracting and manipulating style statistics.

  1. Extracting the Style Prototype: A single unlabeled image from the target domain is passed through the early layers (typically the first two blocks) of a ResNet50 backbone. Channel-wise mean ($\mu$) and standard deviation ($\sigma$) are extracted to serve as a "style prototype."
  2. Strategic Perturbation: To avoid overfitting to the specific lighting or texture of the lone target image, OSSA applies multiplicative Gaussian noise to these statistics. This generates a diverse range of synthetic target styles centered around the actual target domain.
  3. Feature-Level Transfer: Using Adaptive Instance Normalization (AdaIN), these perturbed styles are injected into the source (labeled) images at the feature map level during training. This forces the detector to learn style-invariant features.
  4. Probabilistic Application: The OSSA module is applied with a 50% probability during training, ensuring the model retains high-quality features from the source domain while adapting to the target style.
The OSSA training and inference pipelines. During training, style statistics from a single target image are perturbed and injected into source features via AdaIN.

Experimental Evaluation

The authors evaluated OSSA across three distinct domain-gap scenarios:

  • Adverse Weather: Cityscapes (Source) $\rightarrow$ Foggy Cityscapes (Target).
  • Sim-to-Real: Sim10k (synthetic GTA V images) $\rightarrow$ Cityscapes (Real world).
  • Cross-Spectral: M3FD dataset, adapting from visible-optical images to thermal infrared (TIR) spectra.

Results

OSSA achieves state-of-the-art performance in one-shot adaptation, often rivaling methods that use significantly more data.

  • Foggy Cityscapes: OSSA achieved 39.8 mAP, outperforming the previous best zero-shot method by nearly 3% and exceeding the performance of "full-data" methods like GPA.
  • Sim2Real: The method reached 52.7 mAP, a substantial improvement over the Faster R-CNN baseline of 40.2 mAP.
  • Visible-to-Thermal: On the M3FD benchmark, OSSA improved the baseline from 22.0 mAP to 33.9 mAP.
Qualitative comparison of object detection across three domain-shift scenarios. OSSA (middle column) shows significantly better recall and precision compared to the baseline Faster R-CNN (left column).

Discussion and Limitations

A key insight from this work is that a single image can effectively capture the "essence" of a domain's style. The researchers found that style information is predominantly encoded in early CNN layers; applying OSSA deeper in the network tends to degrade performance by interfering with semantic features.

However, OSSA primarily addresses the style gap (lighting, texture, color). It does not account for the content gap, such as differences in object sizes or camera angles. This explains the remaining performance gap between OSSA and an "Oracle" model trained on full target data. Future work may involve extending OSSA to modern architectures like Vision Transformers (ViTs) or integrating it into source-free domain adaptation frameworks.

Summary updated

BibTeX
@inproceedings{gerster2024ossa,
  author = {Robin Gerster and Holger Caesar and Matthias Rapp and Alexander Wolpert and Michael Teutsch},
  title = {{OSSA: Unsupervised One-Shot Style Adaptation}},
  booktitle = {Workshops @ ECCV},
  year = {2024},
  doi = {10.1007/978-3-031-91672-4\_9},
}
Figure