Monocular depth estimation—the task of predicting a 3D depth map from a single 2D image—is fundamentally "ill-posed." Because a 2D image is a projection, an object could be large and far away or small and very close; without secondary cues, the absolute scale is mathematically ambiguous.
To solve this, researchers have shifted away from forcing models to predict absolute metric distances. Instead, they focus on scale-invariant and affine-invariant loss functions. These functions prioritize the relative geometric relationships between pixels, allowing models to capture the "shape" of a scene even when the global scale is unknown.
The Ambiguity of Absolute Distance
If you train a neural network to minimize the standard Mean Squared Error (MSE) between a predicted depth map and a ground-truth map, the network often struggles. A small error in the global scale (e.g., predicting the whole scene is 10% further away than it is) results in a massive penalty, even if the internal geometry—the relative distance between a chair and a table—is perfect.
In their foundational work, David Eigen and Rob Fergus addressed this by introducing a scale-invariant loss in Predicting Images using Convolutional Networks: Visual Scene Understanding with Pixel Maps. Rather than penalizing absolute distance errors, their approach penalizes inconsistent relationships between pairs of pixels. If pixel A is twice as far as pixel B in reality, the model is rewarded for maintaining that 2:1 ratio, regardless of whether it thinks the absolute distances are in meters, feet, or an arbitrary unit.
Prioritizing Structure Over Units
The intuition behind this approach is that the structure of a scene is more important for visual understanding than the units of measurement. Several distinct mechanisms have been developed to enforce this structural consistency:
- Pairwise Comparisons: As explored by Dmitry Senushkin and Anna Vorontsova in Towards General Purpose and Geometry Preserving Single-View Depth Estimation, calculating the L1 distance between pairs of pixel depth values allows a model to learn geometric structure while remaining robust to the unknown scale factors inherent in "in-the-wild" datasets.
- Gradient-Based Losses: In the DeMoN architecture, Benjamin Ummenhofer and Eddy Ilg focused on the gradients of depth. By penalizing differences in depth changes rather than absolute values, the model prioritizes local surface orientation and sharp edges.
- Ratio-Based Metrics: To prevent a scene from "collapsing" or expanding infinitely during optimization, Jia-Bin Huang and Johannes Kopf 0001 utilized a scale-invariant ratio loss in Robust Consistent Video Depth Estimation. This ensures that the relative proportions of the scene remain stable across video frames.
Learning from Diverse and Imperfect Data
One of the greatest advantages of scale-invariant objectives is the ability to train on heterogeneous data. Most depth datasets are captured with different sensors (LiDAR, Kinect, Stereo) that have different biases and scales.
Ning-Hsu Wang and Yu-Lun Liu leveraged this in Depth Anywhere by using an affine-invariant loss. This loss accounts for both an unknown scale and a global shift (offset). By ignoring these global discrepancies, they could distill knowledge from perspective-view models into panoramic models using massive amounts of unlabeled data, effectively "aligning" different data sources into a single coherent geometric understanding.
Similarly, Fabio Tosi and Matteo Poggi used scale-and-shift-invariant losses to fine-tune networks on synthetic data generated by diffusion models in Diffusion Models for Monocular Depth Estimation. This allowed the model to learn how depth behaves in challenging conditions (like rain or night) without needing perfectly calibrated metric ground truth for those specific scenarios.
Efficiency and Portability
Focusing on relative relationships also makes models more efficient. Yiran Wang and colleagues demonstrated in Knowledge Distillation for Fast and Accurate Monocular Depth Estimation on Mobile Devices that a small student network can achieve high accuracy by mimicking the relative feature relationships of a larger teacher network. By prioritizing the "depth hierarchy" of a scene, they reduced parameter counts by nearly 95% while maintaining the geometric integrity necessary for mobile AR and navigation applications.
In summary, scale invariance transforms depth estimation from a difficult regression problem (predicting a number) into a structural recognition problem (predicting a shape). By penalizing inconsistent relationships rather than absolute errors, these models achieve the robustness required to operate in the real, uncalibrated world.