Introduction
Training deep neural networks for autonomous driving tasks, such as monocular depth estimation or semantic segmentation, requires massive amounts of pixel-perfect labeled data. While synthetic environments (e.g., simulators or video games) can generate infinite labeled data, models trained on them often fail in the real world due to domain shift. This "reality gap" occurs because a model might learn features specific to synthetic textures and lighting that do not generalize to real-world conditions.
Existing Unsupervised Domain Adaptation (UDA) methods attempt to align these domains, but they often struggle to preserve the underlying geometry and structural details of the scene during translation. The authors propose Domain-Agnostic Contrastive Learning (DACL) to create a representation where the model perceives the same "content" regardless of whether the "style" is synthetic or real.
Methodology: The DACL Framework
The authors propose a multi-stage pipeline designed to decouple style from content and learn invariant features. This approach ensures that the structural integrity of the scene is maintained across domain boundaries.
Stage 1: Bidirectional Style Transfer
Using a GAN-based architecture (similar to CycleGAN), the system learns to map images from the Source domain ($\mathcal{S}$, synthetic) to the Target domain ($\mathcal{T}$, real) and vice versa. This stage employs adversarial loss, cycle-consistency loss, and identity reconstruction loss. The goal is to ensure that while the visual style changes (e.g., from synthetic to real), the content—such as the positions of cars, roads, and trees—remains structurally consistent.
Stage 2: Contrastive Representation Learning
This is the core innovation of the paper. Inspired by momentum-based contrastive learning (MoCo), the model is trained to recognize that a synthetic image $I_{\mathcal{S}}$ and its stylized-as-real counterpart $I_{\mathcal{S}\to\mathcal{T}}$ represent the same scene.
- Positive Pairs: A synthetic image and its translated "fake-real" version are treated as a positive pair in the embedding space.
- Negative Pairs: Other random images from the dataset serve as negatives.
- Objective: The contrastive loss forces the feature extractor $f_{\mathcal{T}}$ to map positive pairs to nearly identical coordinates in a low-dimensional latent space $\mathcal{Z}$. This teaches the model to ignore domain-specific "noise" and focus on universal structural features.
Task-specific Finetuning
Following pre-training, the domain-agnostic encoder is finetuned on specific downstream tasks like depth prediction or semantic segmentation. This step utilizes the ground-truth labels available in the synthetic source domain to optimize task-specific decoders.
Experimental Results
The DACL framework was evaluated on standard benchmarks including Virtual KITTI (vKITTI) for the source domain and KITTI for the real-world target domain, as well as Cityscapes and GTA5.
- Monocular Depth Estimation: When integrated with the GASDA baseline, DACL improved the Absolute Relative (Abs Rel) error from 0.149 to 0.118, representing a nearly 20% performance gain. Qualitative results showed significantly sharper object boundaries around complex structures like guardrails and vehicles compared to previous blurry depth maps.
- Semantic Segmentation: In the vKITTI $\to$ KITTI task, DACL achieved a mean Intersection-over-Union (mIoU) of 30.9, outperforming standard adversarial methods like GRL (28.2) and CycleGAN (26.1).
Conclusion
DACL demonstrates that contrastive learning can be effectively repurposed for domain adaptation by defining positive pairs across the synthetic-real boundary. By decoupling style from content, the framework enables autonomous driving models to learn robust, geometry-preserving features that generalize well to the real world. While the multi-stage training process is computationally intensive and performance on rare categories (like poles) remains a challenge, this domain-agnostic approach offers a promising path for bridging the reality gap in safety-critical vision tasks.
Summary updated