NeRF-Supervised Deep Stereo

Fabio Tosi, Alessio Tonioni, Daniele De Gregorio, Matteo Poggi

Abstract

Deep learning has revolutionized stereo matching, yet these networks remain constrained by the need for massive, densely annotated datasets. Collecting real-world ground truth typically requires expensive LiDAR hardware, while synthetic data often fails to generalize due to domain shift. We present a framework that leverages Neural Radiance Fields (NeRF) to generate high-quality, "pseudo-ground-truth" stereo training data from simple handheld camera sequences. By using NeRF as a data factory, we train deep stereo networks that significantly outperform existing self-supervised methods and generalize better to new environments than models trained on synthetic data.

Introduction

Stereo matching—the process of estimating depth by comparing two slightly offset images—is a fundamental task in computer vision. While deep learning models like RAFT-Stereo have set new benchmarks, their performance is heavily dependent on the quality and quantity of training data. Existing self-supervised methods attempt to bridge the data gap using photometric consistency (matching pixels by color), but these approaches frequently fail at occlusions and struggle to resolve fine geometric details.

Figure 1: Overview of the NeRF-Supervised framework, showing input images, NeRF-generated depth maps, and qualitative comparisons on thin structures.

This paper introduces the NeRF-Supervised (NS) learning framework. Instead of relying on raw image-to-image matching, we utilize the photorealistic rendering and geometric consistency of NeRF to provide a superior supervisory signal. This approach allows a standard smartphone to act as a data factory, producing high-resolution training triplets without the need for specialized depth sensors.

Methodology

The NeRF-Supervised framework proceeds in three distinct phases:

  1. Data Collection: Short video sequences of static scenes are captured using a standard smartphone. Camera poses are determined using standard Structure-from-Motion (SfM) tools like COLMAP.
  2. NeRF as a Data Factory: A NeRF model is trained for each captured scene. Once optimized, the NeRF can render "virtual" stereo triplets (Left, Center, Right) and corresponding proxy depth maps from arbitrary viewpoints.
  3. NeRF-Supervised Training: A stereo network is trained using a specialized loss function. This includes a Triplet Photometric Loss, which utilizes the third view to provide supervision for pixels occluded in a standard two-view pair, and a Rendered Disparity Loss. To ensure the network does not learn NeRF-specific artifacts, an Ambient Occlusion (AO) mask is employed to filter out low-confidence regions.

Key Results and Evaluation

The proposed method was evaluated for "zero-shot" generalization on standard benchmarks including KITTI, Middlebury, and ETH3D. The results demonstrate that NeRF is a significantly better teacher than raw pixels or synthetic environments.

  • Performance Gains: On the challenging Middlebury dataset, NeRF-supervised models showed a 30-40% improvement over previous state-of-the-art self-supervised methods.
  • Generalization: Models trained with this method often outperformed those trained on massive synthetic datasets (e.g., SceneFlow) when tested on real-world data, suggesting that "real-but-noisy" NeRF data is more valuable than "perfect-but-fake" synthetic data.
  • Geometric Detail: Qualitatively, the disparity maps produced are significantly sharper. The framework successfully captures thin structures, such as chair legs or mesh patterns, which are typically blurred by other self-supervised techniques.
Figure 5: Comparison of disparity estimation on a fine mesh structure. Our NeRF-supervised approach (left) preserves sharp details compared to photometric and other self-supervised baselines.

Discussion and Future Work

The primary advantage of NeRF-supervised learning is the democratization of high-quality data. Because NeRF reconstructs the 3D volume of a scene, it provides a geometrically consistent signal that helps the stereo network understand depth discontinuities and sharp edges. The use of stereo triplets effectively "solves" the occlusion problem that plagues standard self-supervision.

Currently, the method is limited to static scenes, as it relies on standard NeRF formulations. Future work may extend this "NeRF-as-supervisor" paradigm to dynamic scenes or other vision tasks such as optical flow and multi-view stereo, potentially redefining the landscape of unsupervised learning in computer vision.

Summary updated

BibTeX
@inproceedings{tosi2023nerf,
  author = {Fabio Tosi and Alessio Tonioni and Daniele De Gregorio and Matteo Poggi},
  title = {{NeRF-Supervised Deep Stereo}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  doi = {10.1109/cvpr52729.2023.00089},
}
Figure