Abstract
DepthFM is a novel generative monocular depth estimation model that replaces slow diffusion processes with Flow Matching. By modeling a direct, straight-line trajectory between image and depth distributions, it achieves high-fidelity, sharp depth maps in as little as a single inference step, significantly outperforming previous generative methods in speed and data efficiency.
Introduction
Monocular depth estimation—predicting 3D distance from a single 2D image—is a cornerstone of computer vision. However, current methods face a persistent trade-off between sharpness and speed. Discriminative models (e.g., Depth Anything) are fast but often produce "blurry" artifacts around object boundaries because they tend to predict the statistical mean of possible depths. Conversely, generative models (e.g., diffusion-based Marigold) produce beautifully sharp details but are computationally expensive, requiring many iterative steps to reach a clean depth map from random noise.
Methodology
DepthFM introduces the first application of Flow Matching (FM) to the depth estimation task. Instead of denoising Gaussian noise over a curved trajectory, DepthFM learns a "vector field" that transports the latent representation of an image directly to its corresponding depth latent. These trajectories are much straighter, allowing for accurate results with far fewer function evaluations (NFEs).
The model operates in the compressed latent space of a pre-trained Stable Diffusion 2.1 autoencoder. It utilizes Dual Knowledge Transfer:
- Image Prior: Fine-tuning a pre-trained SD2.1 model to leverage its intrinsic knowledge of scene geometry.
- Depth Prior (Distillation): Using a powerful discriminative model (Metric3D v2) as a "teacher" to generate pseudo-labels for an unlabeled real-world dataset (Unsplash).
Additionally, controlled noise augmentation during training enhances robustness and enables the model to estimate uncertainty by measuring the variance across multiple samples.
Experiments and Key Results
DepthFM was trained primarily on synthetic data (Hypersim and Virtual KITTI) augmented with pseudo-labeled real-world images. It was evaluated zero-shot on standard benchmarks including NYUv2, KITTI, ETH3D, ScanNet, and DIODE.
Key performance highlights include:
- Inference Speed: DepthFM achieves a $\delta 1$ accuracy of 95.0% on NYUv2 in just 1 step, significantly faster than diffusion-based alternatives.
- Edge Precision: On the high-resolution Middlebury dataset, DepthFM outperformed state-of-the-art discriminative models in edge precision (33.54% vs 31.67%), indicating much sharper object boundaries.
- Zero-Shot Performance: Despite minimal training data, the model remains highly competitive with foundation models trained on millions of images.
- Depth Completion: The model is versatile, outperforming specialized completion models like CompletionFormer when provided with sparse LIDAR points.
Discussion and Conclusion
The core innovation of DepthFM is the realization that the transport from an image to its depth map is more naturally modeled as a straight line in latent space. This allows the model to capture the "best of both worlds"—the sharp, high-frequency details of generative models with inference efficiency closer to discriminative ones. While the model currently predicts affine-invariant depth and relies on a teacher model for pseudo-labeling, it sets a new benchmark for efficient generative depth estimation. Future research will explore more complex couplings to further straighten flow trajectories.
Summary updated