https://github.com/compvis/depth-fm

[AAAI 2025] DepthFM: Fast Monocular Depth Estimation with Flow Matching

https://github.com/compvis/depth-fm

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

depth-estimation diffusion-model flow-matching stochastic-interpolants

Keywords from Contributors

diffusion-models stable-diffusion super-resolution
Last synced: 5 months ago · JSON representation

Repository

[AAAI 2025] DepthFM: Fast Monocular Depth Estimation with Flow Matching

Basic Info
  • Host: GitHub
  • Owner: CompVis
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage: https://depthfm.github.io/
  • Size: 4.56 MB
Statistics
  • Stars: 566
  • Watchers: 14
  • Forks: 40
  • Open Issues: 20
  • Releases: 0
Topics
depth-estimation diffusion-model flow-matching stochastic-interpolants
Created almost 2 years ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

DepthFM: Fast Monocular Depth Estimation with Flow Matching

Ming Gui* · Johannes Schusterbauer* · Ulrich Prestel · Pingchuan Ma

Dmytro Kotovenko · Olga Grebenkova · Stefan A. Baumann · Vincent Tao Hu · Björn Ommer

CompVis Group @ LMU Munich

AAAI 2025 Oral

* equal contribution

Website Paper

Cover

📻 Overview

We present DepthFM, a state-of-the-art, versatile, and fast monocular depth estimation model. DepthFM is efficient and can synthesize realistic depth maps within a single inference step. Beyond conventional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting and depth conditional synthesis.

With our work we demonstrate the successful transfer of strong image priors from a foundation image synthesis diffusion model (Stable Diffusion v2-1) to a flow matching model. Instead of starting from noise, we directly map from input image to depth map.

🛠️ Setup

This setup was tested with Ubuntu 22.04.4 LTS, CUDA Version: 12.4, and Python 3.10.12.

First, clone the github repo...

bash git clone git@github.com:CompVis/depth-fm.git cd depth-fm

Then download the weights via

bash wget https://ommer-lab.com/files/depthfm/depthfm-v1.ckpt -P checkpoints/

Now you have either the option to setup a virtual environment and install all required packages with pip

bash pip install -r requirements.txt

or if you prefer to use conda create the conda environment via

bash conda env create -f environment.yml

Now you should be able to listen to DepthFM! 📻 🎶

🚀 Usage

You can either use the notebook inference.ipynb or just run the python script inference.py as follows

bash python inference.py \ --num_steps 2 \ --ensemble_size 4 \ --img assets/dog.png \ --ckpt checkpoints/depthfm-v1.ckpt

The argument --num_steps allows you to set the number of function evaluations. We find that our model already gives very good results with as few as one or two steps. Ensembling also improves performance, so you can set it via the --ensemble_size argument. Currently, the inference code only supports a batch size of one for ensembling.

📈 Results

Our quantitative analysis shows that despite being substantially more efficient, our DepthFM performs on-par or even outperforms the current state-of-the-art generative depth estimator Marigold zero-shot on a range of benchmark datasets. Below you can find a quantitative comparison of DepthFM against other affine-invariant depth estimators on several benchmarks.

Results

Trend

Star History Chart

🎓 Citation

Please cite our paper:

bibtex @misc{gui2024depthfm, 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} }

Owner

  • Name: CompVis - Computer Vision and Learning LMU Munich
  • Login: CompVis
  • Kind: organization
  • Email: assist.mvl@lrz.uni-muenchen.de
  • Location: Germany

Computer Vision and Learning research group at Ludwig Maximilian University of Munich (formerly Computer Vision Group at Heidelberg University)

GitHub Events

Total
  • Issues event: 11
  • Watch event: 229
  • Issue comment event: 13
  • Push event: 4
  • Fork event: 17
Last Year
  • Issues event: 11
  • Watch event: 229
  • Issue comment event: 13
  • Push event: 4
  • Fork event: 17

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 16
  • Total Committers: 4
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.688
Past Year
  • Commits: 6
  • Committers: 3
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
Hacker 17082006 t****k@g****m 5
Johannes Fischer j****r@o****m 5
Tao Hu d****o 3
Ming Gui m****i@l****e 3
Committer Domains (Top 20 + Academic)
lmu.de: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 34
  • Total pull requests: 2
  • Average time to close issues: 8 days
  • Average time to close pull requests: 1 day
  • Total issue authors: 29
  • Total pull request authors: 2
  • Average comments per issue: 1.56
  • Average comments per pull request: 0.5
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 12
  • Pull requests: 0
  • Average time to close issues: about 1 month
  • Average time to close pull requests: N/A
  • Issue authors: 12
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • gituser123456789000 (4)
  • TouqeerAhmad (2)
  • zuoym15 (1)
  • Lioely (1)
  • mikebilly (1)
  • ronly2460 (1)
  • belalhmedan90 (1)
  • pisces365 (1)
  • ssssholmes (1)
  • yeyuanzheng177 (1)
  • water221 (1)
  • ahmet-f-gumustas (1)
  • adeelmhr (1)
  • liukeyu1996 (1)
  • al3dv2 (1)
Pull Request Authors
  • hi-jaxon (2)
  • Fannovel16 (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

environment.yml pypi
  • einops ==0.7.0
  • torchdiffeq ==0.2.3
  • transformers ==4.35.0
  • xformers ==0.0.22.post7
requirements.txt pypi
  • accelerate >=0.22.0
  • diffusers >=0.20.1
  • diffusers ==0.26.3
  • einops *
  • matplotlib *
  • numpy *
  • omegaconf *
  • torch >=2.1.0
  • torchdiffeq >=0.2.3
  • xformers *