Adversarially Tuned Scene Generation

V. S. R. Veeravasarapu, Constantin A. Rothkopf, Visvanathan Ramesh

Abstract

The generalization performance of computer vision (CV) systems trained on computer graphics (CG) data is often limited by the "domain shift" between virtual and real-world data. While simulated data can be augmented with real samples to mitigate this, manually annotating real-world images for tasks like semantic labeling is labor-intensive. This paper presents an unsupervised method that combines stochastic 3D scene layout generation with generative adversarial training. By iteratively estimating the posterior density of prior distributions for a generative graphical model, we tune the graphics engine to match the statistics of a target real-world domain. Our approach demonstrates significant performance gains on the CityScapes and CamVid benchmarks, improving the Intersection over Union (IoU) metric by 2.28 and 3.14 points, respectively.

Introduction

In computer vision, synthetic data is a powerful tool because it provides pixel-perfect labels at zero cost. However, models trained on synthetic data often fail in the real world due to domain shift. This shift occurs when the parameters of the synthetic environment—such as lighting, camera angles, and object placement—do not reflect the distributions found in real-world datasets. Manually tuning these parameters is difficult, and labeling real-world data to bridge the gap is prohibitively expensive. This work proposes an unsupervised adversarial framework to automatically tune a 3D graphics engine to mimic the "priors" of a target real-world dataset.

Methodology

The Adversarial Tuning Loop

The core of our method is an iterative loop that treats a 3D graphics engine (Blender) as a generator within an adversarial framework. Unlike standard GANs that generate pixels, our generator produces scenes based on a parametric graphical model.

The adversarial tuning loop for scene generation.
  1. Initialization: We begin with uniform prior distributions over scene parameters (e.g., sun position, car density).
  2. Rendering: The generator renders a batch of synthetic images ($V$) based on these parameters.
  3. Discrimination: A discriminator ($D$), typically a deep CNN, is trained to distinguish between these virtual images and unlabeled real images ($R$).
  4. Density Estimation & Update: The discriminator's output serves as a feedback signal. We use rejection sampling and Bayesian updates to refine the scene priors, favoring parameters that produce images the discriminator finds difficult to distinguish from reality.

The Generative Model

The scene is described by a generative graphical model that controls both geometry and photometry. This includes the placement and scale of static and dynamic objects, ground textures, road networks, and environmental factors like weather and light sources.

Components of the 3D scene state and the library of assets used for generation.

By using a physics-based renderer, we ensure that the generated data is always a coherent 3D scene. This allows the system to produce a variety of ground-truth labels—including semantic maps, depth, and surface normals—automatically for every rendered frame.

Experimental Results

We evaluated the effectiveness of adversarially tuned data by training a DeepLab model for semantic segmentation on two major datasets: CityScapes and CamVid.

  • Performance Gains: Tuning the generator to the target domain improved global IoU by 2.28 points for CityScapes and 3.14 points for CamVid compared to models trained on untuned synthetic data.
  • Efficiency: Our analysis suggests that this unsupervised tuning process provides a performance boost roughly equivalent to having 9% of the real-world dataset manually labeled, representing a significant reduction in human effort.
  • Statistical Alignment: We measured the Kullback–Leibler (KL) divergence between the synthetic and real data distributions. Tuning reduced the KL divergence significantly (e.g., from 0.57 to 0.44 for CityScapes), confirming that the adversarial loop successfully matched the statistical "fingerprint" of the target domain.

Conclusion

Adversarially tuned scene generation offers a scalable, unsupervised path to bridging the reality gap in computer vision. By leveraging the structured nature of 3D graphics engines, we can generate high-fidelity training data that is statistically aligned with specific real-world environments. Future work will explore evolving the 3D assets themselves and extending the framework to dynamic video sequences for autonomous driving applications.

Summary updated

Abstract

Generalization performance of trained computer vision (CV) systems that use computer graphics (CG) generated data is not yet effective due to the concept of domain-shift between virtual and real data. Although simulated data augmented with a few real-world samples has been shown to mitigate domain shift and improve transferability of trained models, guiding or bootstrapping the virtual data generation with the distributions learnt from target real world domain is desired, especially in the fields where annotating even few real images is laborious (such as semantic labeling, optical flow, and intrinsic images etc.). In order to address this problem in an unsupervised manner, our work combines recent advances in CG, which aims at generating stochastic scene layouts using large collections of 3D object models, and generative adversarial training, which aims at training generative models by measuring discrepancy between generated and real data in terms of their separability in the space of a deep discriminatively-trained classifier. Our method uses iterative estimation of the posterior density of prior distributions for a generative graphical model. This is done within a rejection sampling framework. Initially, we assume uniform distributions as priors over parameters of a scene described by a generative graphical model. As iterations proceed the uniform prior distributions are updated sequentially to distributions that are closer to the unknown distributions of target data. We demonstrate the utility of adversarially tuned scene generation on two real world benchmark datasets (CityScapes and CamVid) for traffic scene semantic labeling with a deep convolutional net (DeepLab). We obtained performance improvements by 2.28 and 3.14 points on the IoU metric between the DeepLab models trained on simulated sets prepared from the scene generation models before and after tuning to CityScapes and CamVid respectively.
BibTeX
@inproceedings{veeravasarapu2017adversarially,
  author = {V. S. R. Veeravasarapu and Constantin A. Rothkopf and Visvanathan Ramesh},
  title = {{Adversarially Tuned Scene Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  url = {https://openreview.net/forum?id=B1VcoCWO-H},
}
Figure