StereoGAN: Bridging Synthetic-to-Real Domain Gap by Joint Optimization of Domain Translation and Stereo Matching

Rui Liu, Chengxi Yang, Wenxiu Sun, Xiaogang Wang, Hongsheng Li

Abstract

Large-scale synthetic datasets are beneficial to stereo matching but usually introduce known domain bias. Although unsupervised image-to-image translation networks represented by CycleGAN show great potential in dealing with domain gap, it is non-trivial to generalize this method to stereo matching due to the problem of pixel distortion and stereo mismatch after translation. In this paper, we propose an end-to-end training framework with domain translation and stereo matching networks to tackle this challenge. First, joint optimization between domain translation and stereo matching networks in our end-to-end framework makes the former facilitate the latter one to the maximum extent. Second, this framework introduces two novel losses, i.e., bidirectional multi-scale feature re-projection loss and correlation consistency loss, to help translate all synthetic stereo images into realistic ones as well as maintain epipolar constraints. The effective combination of above two contributions leads to impressive stereo-consistent translation and disparity estimation accuracy. In addition, a mode seeking regularization term is added to endow the synthetic-to-real translation results with higher fine-grained diversity. Extensive experiments demonstrate the effectiveness of the proposed framework on bridging the synthetic-to-real domain gap on stereo matching.

Introduction

Deep learning models for stereo matching—the process of calculating depth from two offset images—require vast amounts of labeled data. While synthetic datasets provide perfect ground-truth depth labels, models trained on them often struggle with real-world images due to the "domain gap."

Existing solutions like CycleGAN attempt to bridge this gap by translating synthetic images to look more realistic. However, they often fail to respect epipolar constraints. A standard translation network might shift pixels in the left image differently than in the right, breaking the geometric relationship required for depth calculation. This leads to "pixel distortion" and "stereo mismatch," rendering the translated images ineffective for high-precision training.

Comparison of synthetic-to-real translation between CycleGAN and the proposed StereoGAN. Note the distortions in the CycleGAN output highlighted by the red circles compared to the consistency in the Proposed method.

Methodology

StereoGAN addresses these issues by integrating domain translation and stereo matching into a single, jointly optimized pipeline. The framework introduces three core innovations to maintain geometric integrity:

  1. Bidirectional Multi-scale Feature Re-projection Loss ($L_{fx}, L_{fy}$): Instead of comparing final pixels, the model uses known disparity to "warp" right-side feature maps to match the left. Consistent translation ensures these features align across multiple scales.
  2. Correlation Consistency Loss ($L_{corr}$): This ensures that the correlation patterns—used by stereo networks to find matching points—remain consistent between the original synthetic images and their translated realistic counterparts.
  3. Mode Seeking Regularization ($L_{ms}$): This term encourages the generator to produce diverse variations, simulating real-world imperfections like lighting shifts or sensor noise, which makes the matching network more robust.

The framework utilizes CycleGAN as the translation backbone and DispNet (or GwcNet) for stereo matching, training them in tandem so that translation specifically serves the matching task.

Experimental Setup

The authors evaluated StereoGAN using a synthetic-to-real transfer setup. Synthetic source data included Driving (from SceneFlow) and Synthia-SF (urban scenes). Real-world target benchmarks included the KITTI 2012 & 2015 datasets and Cityscapes for urban street scenes.

Results and Discussion

StereoGAN significantly outperformed previous unsupervised adaptation methods across several metrics:

  • Accuracy: On the Driving-to-KITTI2015 task, StereoGAN achieved a D1-all error of 25.18%, a substantial improvement over the 52.65% inference baseline and the 31.23% achieved by CycleGAN alone.
  • Error Reduction: The End-Point Error (EPE) dropped from 9.35 pixels (baseline) to 2.58 pixels.
  • Generalization: The model demonstrated strong "zero-shot" performance on Cityscapes, nearly halving error rates compared to non-adapted models.

Key insights from the study suggest that joint optimization is superior to two-stage processes because the translation network learns to prioritize the textures and edges most critical for stereo matching. Furthermore, prioritizing geometry over style prevents the "hallucination" of objects that typically confuses depth sensors.

Conclusion

While StereoGAN successfully bridges the visual style gap, challenges remain regarding camera intrinsics (focal length, sensor size) and disparity distribution differences between synthetic and real datasets. Future research is needed to generalize these models across varying camera hardware configurations.

Summary updated

BibTeX
@inproceedings{liu2020stereogan,
  author = {Rui Liu and Chengxi Yang and Wenxiu Sun and Xiaogang Wang and Hongsheng Li},
  title = {{StereoGAN: Bridging Synthetic-to-Real Domain Gap by Joint Optimization of Domain Translation and Stereo Matching}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  url = {https://openreview.net/forum?id=CLYLuK9ioKH},
}
Figure