DepthFM
Flow matching model that maps a single image directly to a depth map.
Depth estimation · 1,777 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Depth estimation
- Parameters
- 949.6M
- Operations
- 1,777
- Framework
- PyTorch
- Recurrent
- No
- Published
- AAAI 2025
- Cited by
- 3 (as of 27 October 2026)
- Authors
- Ming Gui, Johannes Schusterbauer, Ulrich Prestel and others
- Source
- GitHub: CompVis/depth-fm
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16060
- Graph hash
- 17ca8067d8e8a9d91dbc6eb98492deb1132f95ea8b4dcef7c84c5fc658c8da81
- Skeleton hash
- d3cee191dceb8b10aedfad954458ea8998e3a0fc2e789de48490f42a64b87339
- Architecture hash
- 3658aa95daa4f5c62ec3a100f974e80195ff70429959539e347ca7cd6cd2b7c6
- Diagram SHA-256
- 351a8c2c55e6f38bc6a88bd99018edf05bee88a392366c2081771f11e21f2cac
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
DepthFM estimates depth from a single image, and it does so with a generative model that can work in one inference step. It addresses two problems the paper describes: discriminative depth estimators often produce blurry artifacts, while generative ones sample slowly because the path from noise to depth is curved.
The method is flow matching: the model learns a direct transport between the distribution of images and the distribution of depth maps. Rather than starting from noise, it maps from the input image to the depth map. To reduce the need for training data, the authors transferred the image knowledge of a pretrained diffusion model, Stable Diffusion v2-1, into the flow matching model. Training also used synthetic data and image-depth pairs that a discriminative model produced for photographs in the wild.
Because the model is generative, it can also estimate how confident it is in its depth values. The authors call it the first work to explore flow matching in this field and report competitive zero-shot results on standard benchmarks of complex natural scenes.
Key idea. The paper framed monocular depth estimation as a direct flow matching transport from images to depth maps, using knowledge from a pretrained image diffusion model.
- depthfm
- depth estimation
- monocular depth
- flow matching
- depth map
- generative depth
- zero-shot depth
- single-image depth
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{gui2024depthfmfastmonoculardepth,
title={DepthFM: Fast Monocular Depth Estimation with Flow Matching},
author={Ming Gui and Johannes Schusterbauer and Ulrich Prestel and Pingchuan Ma and Dmytro Kotovenko and Olga Grebenkova and Stefan Andreas Baumann and Vincent Tao Hu and Björn Ommer},
year={2024},
eprint={2403.13788},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2403.13788},
}