Structured Domain Randomization: Bridging the Reality Gap by Context-Aware Synthetic Data

Aayush Prakash, Shaad Boochoon, Mark Brophy, David Acuna, Eric Cameracci, Gavriel State, Omer Shapira, Stan Birchfield

TL;DR

Structured Domain Randomization (SDR) bridges the "reality gap" in computer vision by generating synthetic training data that respects the natural structure of a scene. By placing objects like cars and pedestrians in contextually appropriate locations (e.g., cars on roads) rather than randomly scattering them, SDR enables neural networks to detect small and occluded objects that standard domain randomization often misses.

What Problem Does This Paper Address?

Deep learning models for computer vision are data-hungry, but labeling real-world images is expensive and slow. Synthetic data is a tempting alternative, but it suffers from the reality gap: models trained on "fake" data often fail in the real world.

Existing solutions fall into two camps:

  1. Photorealistic Simulations: High-fidelity clones of real-world locations. These are expensive to build and often too static, leading to overfitting.
  2. Domain Randomization (DR): Scattering objects randomly against random backgrounds. While this forces the model to learn the object's appearance, it ignores context.

The authors argue that context is vital, especially for "Hard" detection tasks involving small or heavily occluded objects. If a car is only 10 pixels wide, a network needs to know it's sitting on a road to identify it reliably. Standard DR fails here because it might place a car floating in the sky or buried in a tree.

Methods

The authors introduce Structured Domain Randomization (SDR). Unlike standard DR, which uses uniform probability distributions to place objects anywhere, SDR uses a hierarchical, context-aware approach:

  • Scenarios: The system starts by choosing a high-level environment (e.g., "rural 2-lane road" or "urban 6-lane road").
  • Global Parameters: It then determines environmental factors like sun position, weather, and camera angles.
  • Context Splines: This is the "secret sauce." The system generates procedural paths for roads, sidewalks, and medians.
  • Object Placement: Objects are placed relative to these splines. Cars go in lanes, pedestrians go on sidewalks, and houses go on the "side stretch" splines.
  • Randomization: While the structure is fixed, the appearance is still randomized. Textures, colors, lighting, and specific car models vary wildly to ensure the model doesn't just memorize one specific look.

The system was built using Unreal Engine 4 for rendering and Substance for material randomization.

Datasets

The researchers evaluated their approach on several benchmarks:

  • KITTI: The primary real-world target dataset for car detection (categorized into Easy, Moderate, and Hard).
  • Virtual KITTI (VKITTI): A photorealistic synthetic clone of KITTI.
  • Sim 200k: A large-scale synthetic dataset based on GTA V.
  • BDD100K: A massive real-world dataset from a different domain (Berkeley DeepDrive).
  • DR: A baseline dataset generated using standard, non-structured domain randomization.

Key Insights and Ideas

  • Context is a Feature: For difficult detections (occluded or distant objects), the surroundings are just as important as the object itself. SDR allows the network to learn these spatial relationships.
  • Variety Trumps Photorealism: Interestingly, SDR outperformed Sim 200k (GTA-based), even though the latter is more "photorealistic." This suggests that procedural variety in scene geometry is more valuable for generalization than pixel-perfect rendering.
  • The "Reality Gap" is also a "Domain Gap": A model trained on SDR synthetic data actually performed better on KITTI than a model trained on BDD100K (real data from a different city/camera setup). This highlights how specialized synthetic data can be more effective than mismatched real data.
  • Saturation Point: SDR performance saturates relatively quickly (around 10k–25k images), making it a highly efficient data generation strategy.

Key Results

The authors used a Faster R-CNN architecture for all tests. The results on the KITTI benchmark were striking:

  • KITTI Hard Task: SDR achieved 52.2 AP (Average Precision), more than doubling the performance of standard DR (24.0 AP).
  • Outperforming Other Synthetic Data: SDR (52.2 AP) beat both Virtual KITTI (39.9 AP) and Sim 200k (42.1 AP).
  • Boosting Real Data: When real KITTI data was pre-trained with SDR synthetic data, the performance exceeded that of training on real data alone, especially when real labeled samples were scarce.

Limitations and Future Work

While the results are impressive, the paper focuses primarily on a single class: cars. The authors acknowledge that the current implementation is tailored for automotive environments.

Future work includes:

  • Expanding the system to handle multiple object classes (pedestrians, cyclists, etc.) simultaneously.
  • Applying SDR to other tasks like semantic segmentation and instance segmentation, where the "free" labels provided by synthetic engines are even more valuable.
  • Exploring more complex urban structures beyond simple road splines.

Summary updated

BibTeX
@inproceedings{prakash2019structured,
  author = {Aayush Prakash and Shaad Boochoon and Mark Brophy and David Acuna and Eric Cameracci and Gavriel State and Omer Shapira and Stan Birchfield},
  title = {{Structured Domain Randomization: Bridging the Reality Gap by Context-Aware Synthetic Data}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2019},
  url = {https://openreview.net/forum?id=Q9ns5sjJB3iJ},
}
Figure