Abstract
Single-view depth estimation suffers from the problem that a network trained on images from one camera does not generalize to images taken with a different camera model. Thus, changing the camera model requires collecting an entirely new training dataset. In this work, we propose a new type of convolution that can take the camera parameters into account, thus allowing neural networks to learn calibration-aware patterns. Experiments confirm that this improves the generalization capabilities of depth prediction networks considerably, and clearly outperforms the state of the art when the train and test images are acquired with different cameras.
Introduction
Single-view depth estimation—predicting a 3D depth map from a single 2D RGB image—is a cornerstone of modern computer vision. However, standard deep learning models for this task suffer from a significant "hidden" overfitting problem: they are extremely sensitive to the geometry of the camera used for training. For instance, a model trained on wide-angle Kinect images often fails when applied to narrower field-of-view smartphone photos. This occurs because networks learn a fixed mapping between pixel sizes and distances, necessitating new datasets for every new camera model. The authors propose that the solution lies not in more data, but in making the network architecture itself camera-aware.
Methods: CAM-Convs
The core contribution is CAM-Convs (Camera-Aware Convolutions). Instead of performing standard convolutions on RGB features alone, the authors concatenate several "camera-aware" channels to the input of each convolution layer.
As illustrated in the figure above, these channels include:
- Centered Coordinates (cc): Two channels ($cc_x, cc_y$) representing pixel distance from the camera's principal point, situating each pixel relative to the lens.
- Field of View Maps (fov): Two channels encoding horizontal and vertical angles for each pixel based on focal length ($f$), providing geometric context for scale.
- Normalized Coordinates (nc): Standardized pixel coordinates (from -1 to 1) to handle varying image resolutions.
These maps are resized and injected throughout an encoder-decoder (U-Net) architecture, including skip connections, allowing filters to adapt dynamically to camera parameters.
Datasets
The method was evaluated across diverse benchmarks to test its robustness:
- 2D-3D Semantics Dataset: Used for controlled experiments with varying virtual camera intrinsics.
- KITTI & ScanNet: Standard outdoor and indoor benchmarks.
- MegaDepth: A massive dataset of internet photos with diverse intrinsics.
- NYUv2: Used primarily for testing zero-shot generalization across datasets.
Key Insights and Results
A primary finding is that while standard networks perform best when training and testing cameras match, CAM-Convs often exceed this "same-camera" baseline. By learning underlying geometry rather than memorizing sensor biases, the network becomes more robust. Notably, a network trained on two sensor sizes can generalize to a third, unseen size without performance loss.
Quantitative results support these observations:
- Generalization: On the 2D-3D Semantics test, CAM-Convs achieved an Abs. Rel. error of 0.175, outperforming the standard U-Net (0.189).
- Unseen Hardware: When tested on a completely new camera model, the CAM-Conv model's error remained stable (0.177), whereas the standard model's error spiked to 0.369—a 50% degradation.
- Cross-Dataset Success: A CAM-Conv model trained on mixed datasets (excluding NYUv2) outperformed the state-of-the-art Laina model on the NYUv2 benchmark, even though the latter was trained specifically on NYUv2.
Conclusion
CAM-Convs demonstrate that providing explicit geometric context—focal length and principal point—allows depth estimation networks to generalize across hardware. While this requires camera intrinsics at inference time (often available in EXIF data), the performance gains are substantial. Future work may extend this "calibration-aware" approach to tasks like 6D object pose estimation or optical flow, where camera geometry is equally critical.
Summary updated