Neural Ray Surfaces for Self-Supervised Learning of Depth and Ego-motion

Igor Vasiljevic, Vitor Guizilini, Rares Ambrus, Sudeep Pillai, Wolfram Burgard, Greg Shakhnarovich, Adrien Gaidon

Abstract

Self-supervised learning (SSL) of depth and ego-motion has traditionally relied on the rigid pinhole camera model, limiting its applicability to standard lenses and requiring precise calibration. We present Neural Ray Surfaces (NRS), a novel approach that treats camera geometry as a learnable, differentiable component of the neural network. By representing the camera as a collection of vectors (rays) and introducing a differentiable projection mechanism, NRS enables self-supervised 3D vision across diverse optical systems—including fisheye, catadioptric, and underwater cameras—without prior geometric knowledge.

Introduction

In the field of self-supervised 3D vision, the standard paradigm involves learning depth and motion by reprojecting pixels between video frames. This process requires a mathematical mapping of the camera, known as a camera model. For years, the pinhole model has served as the industry standard due to its simplicity. However, this model fails to account for the complex distortions found in fisheye lenses, catadioptric (mirror-based) systems, and refractive underwater environments.

Currently, deploying AI on these non-standard sensors requires tedious manual calibration. Even minor inaccuracies in calibration or the presence of "black box" distortions (such as a dashcam mounted behind a curved windshield) can cause standard models to fail. Neural Ray Surfaces (NRS) address this by allowing the model to learn the camera's geometry directly from raw video data.

Methodology

1. Generic Ray Model

NRS moves away from fixed focal lengths and simple distortion parameters. Instead, it adopts a generic ray model inspired by classical optics, representing the camera as a collection of vectors—one for every pixel. This flexibility allows the model to describe virtually any imaging system.

2. Differentiable Projection via Softmax Approximation

A primary technical challenge in learning camera geometry is making the projection step—mapping a 3D point back to a 2D pixel—differentiable. Traditional discrete searches are not compatible with gradient-based optimization. The authors overcome this by using a Softmax Approximation with temperature annealing. This allows the network to "search" for the correct pixel in a continuous, differentiable manner, enabling end-to-end training.

3. Residual Learning and Stability

Learning a complex camera model from scratch can be numerically unstable. To ensure robust convergence, NRS utilizes residual learning. The model begins with a "default" pinhole template and learns a residual ray surface to correct for specific lens distortions. This prior provides a stable starting point while allowing the network to adapt to highly non-linear geometries.

4. End-to-End Self-Supervised Learning

The NRS module is integrated into standard SSL pipelines (such as Monodepth2 or PackNet). By minimizing photometric error—the difference between a target frame and a frame synthesized from adjacent views—the system is forced to solve for both the 3D structure of the scene and the specific geometry of the lens simultaneously.

Experimental Evaluation

The effectiveness of NRS was evaluated across several challenging datasets:

  • Multi-FOV (Synthetic): In tests involving fisheye and catadioptric views, NRS reduced depth error by 51% compared to standard pinhole models. Specifically, the Absolute Relative (Abs Rel) error dropped from 0.441 to 0.225.
  • OmniCam (Real-world): On 360° mirror-based camera footage, NRS achieved an Absolute Trajectory Error (ATE) of 0.035, whereas the pinhole-based framework produced a significantly higher error of 0.408.
  • KITTI (Standard Pinhole): As a sanity check, NRS was tested on standard dashcam footage. It matched or slightly outperformed existing state-of-the-art "in the wild" models, demonstrating that the flexible model carries no performance penalty when applied to standard cameras.
  • Underwater and DashCam: NRS successfully produced meaningful 3D point clouds from underwater cave footage (where refraction typically causes models to diverge) and low-quality fisheye video recorded behind curved windshields.

Discussion and Insights

The core insight of NRS is that explicit lens calibration is unnecessary if the AI is tasked with frame reconstruction. The geometric consistency required to minimize photometric error naturally forces the network to discover the underlying lens geometry. This universal applicability means the same architecture can be deployed on drones, submarines, or autonomous vehicles without code modifications for different sensors.

Limitations

Despite its versatility, NRS currently operates under the "central camera assumption," meaning it assumes all light rays intersect at a single point. It does not yet account for non-central systems. Additionally, like most SSL depth models, it can be affected by dynamic objects that violate the static scene assumption. Future work may extend NRS to multi-camera rigs, potentially learning a single, unified 360° ray surface across multiple overlapping sensors.

Conclusion

Neural Ray Surfaces represent a significant step toward truly autonomous 3D perception. By treating camera geometry as a learnable parameter, NRS removes the barrier of manual calibration and opens the door for self-supervised learning on any optical device, regardless of its complexity or environment.

Summary updated

BibTeX
@inproceedings{vasiljevic2020neural,
  author = {Igor Vasiljevic and Vitor Guizilini and Rares Ambrus and Sudeep Pillai and Wolfram Burgard and Greg Shakhnarovich and Adrien Gaidon},
  title = {{Neural Ray Surfaces for Self-Supervised Learning of Depth and Ego-motion}},
  booktitle = {3DV},
  year = {2020},
  doi = {10.1109/3dv50981.2020.00010},
}
Figure