Unsupervised Pixel-Level Domain Adaptation with Generative Adversarial Networks

Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, Dilip Krishnan

Abstract

Collecting well-annotated image datasets to train modern machine learning algorithms is prohibitively expensive for many tasks. One appealing alternative is rendering synthetic data where ground-truth annotations are generated automatically. Unfortunately, models trained purely on rendered images fail to generalize to real images. To address this shortcoming, prior work introduced unsupervised domain adaptation algorithms that have tried to either map representations between the two domains, or learn to extract features that are domain-invariant. In this work, we approach the problem in a new light by learning in an unsupervised manner a transformation in the pixel space from one domain to the other. Our generative adversarial network (GAN)-based method adapts source-domain images to appear as if drawn from the target domain. Our approach not only produces plausible samples, but also outperforms the state-of-the-art on a number of unsupervised domain adaptation scenarios by large margins. Finally, we demonstrate that the adaptation process generalizes to object classes unseen during training.

Introduction

Modern machine learning relies heavily on large-scale, well-annotated datasets. However, obtaining such data is often prohibitively expensive or logistically challenging. Synthetic data, generated from CAD models or game engines, offers a solution with "free" ground-truth labels, but it introduces a significant "domain gap." Models trained on pristine synthetic images frequently fail when applied to noisy, complex real-world data.

Traditional approaches to unsupervised domain adaptation focus on "feature-level" alignment, attempting to force a neural network's internal representations to be domain-invariant. This paper introduces PixelDA, a method that shifts the focus to the pixel level. By transforming synthetic images to match the visual style of the target domain, PixelDA creates interpretable, architecture-independent training data that bridges the reality gap.

Methodology: The PixelDA Framework

The core of the proposed approach is a GAN-based architecture designed to adapt source-domain images ($x^s$) into target-domain-like "fake" images ($x^f$). The framework consists of three primary components trained in an adversarial and multi-task fashion:

  1. The Generator ($G$): Maps a synthetic image and a noise vector ($z$) to an adapted image. Its objective is to fool the discriminator into believing the adapted image is from the real target domain.
  2. The Discriminator ($D$): Learns to distinguish between adapted (fake) images and actual real-world images ($x^t$).
  3. The Task Classifier ($T$): This component is trained to perform the target task (e.g., classification or pose estimation) using the adapted images. By including a task-specific loss, the generator is forced to preserve the semantic content (like object identity or orientation) of the original synthetic image while altering its appearance.
The PixelDA architecture overview, showing the interaction between the Generator (G), Discriminator (D), and Task Classifier (T).

To ensure structural consistency, the authors employ a Content-Similarity Loss. This masked pairwise mean squared error prevents the generator from hallucinating or distorting the foreground object, ensuring that the labels from the synthetic source remain valid for the adapted output.

Experimental Evaluation

The authors evaluated PixelDA across several challenging benchmarks, focusing on object classification and 3D pose estimation.

Datasets and Results

  • MNIST to MNIST-M: A standard test where clean digits are superimposed over complex, colorful natural backgrounds. PixelDA achieved 98.2% accuracy, a significant leap from the previous best of 83.2%.
  • Synthetic to Real LineMod: A complex 3D dataset requiring both classification and precise 3D pose estimation for 11 different objects. PixelDA reduced the mean angle error to 23.5°, more than halving the error rates of established methods like DANN (56.58°) and DSN (53.27°).
Visual results for MNIST to MNIST-M adaptation: (a) source synthetic digits, (b) adapted images, and (c) target real-world images.

Discussion and Key Insights

PixelDA offers several advantages over feature-level adaptation:

  • Decoupling: Because the adaptation happens in pixel space, the resulting dataset can be used to train any downstream model without retraining the GAN.
  • Interpretability: Researchers can visually inspect the adapted images to diagnose failures in the domain transfer process.
  • Generalization: The model learns general "style" transformations that generalize to object classes not seen during training. For instance, a model trained on certain objects can successfully adapt others because it learns the underlying domain characteristics like lighting and noise.

Limitations

The current framework is optimized for "low-level" domain differences, such as changes in illumination, color, or noise. It is not yet designed to handle "high-level" structural or geometric transformations (e.g., changing the fundamental shape of an object). Future research will explore extending these pixel-level transformations to more complex structural shifts and full-scene simulations.

Summary updated

BibTeX
@inproceedings{bousmalis2017unsupervised,
  author = {Konstantinos Bousmalis and Nathan Silberman and David Dohan and Dumitru Erhan and Dilip Krishnan},
  title = {{Unsupervised Pixel-Level Domain Adaptation with Generative Adversarial Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  url = {https://openreview.net/forum?id=r1bDjkzdbr},
}
Figure