Papers › PrimeDepth: Efficient Monocular Depth Estimation with a Stable Diffusion Preimage

PrimeDepth: Efficient Monocular Depth Estimation with a Stable Diffusion Preimage

13 Sep 2024arXiv:2409.09144archive 2025-07-28

Denis Zavadski, Damjan Kalšan, Carsten Rother

This work addresses the task of zero-shot monocular depth estimation. A recent advance in this field has been the idea of utilising Text-to-Image foundation models, such as Stable Diffusion. Foundation models provide a rich and generic image representation, and therefore, little training data is required to reformulate them as a depth estimation model that predicts highly-detailed depth maps and has good generalisation capabilities. However, the realisation of this idea has so far led to approaches which are, unfortunately, highly inefficient at test-time due to the underlying iterative denoising process. In this work, we propose a different realisation of this idea and present PrimeDepth, a method that is highly efficient at test time while keeping, or even enhancing, the positive aspects of diffusion-based approaches. Our key idea is to extract from Stable Diffusion a rich, but frozen, image representation by running a single denoising step. This representation, we term preimage, is then fed into a refiner network with an architectural inductive bias, before entering the downstream task. We validate experimentally that PrimeDepth is two orders of magnitude faster than the leading diffusion-based method, Marigold, while being more robust for challenging scenarios and quantitatively marginally superior. Thereby, we reduce the gap to the currently leading data-driven approach, Depth Anything, which is still quantitatively superior, but predicts less detailed depth maps and requires 20 times more labelled data. Due to the complementary nature of our approach, even a simple averaging between PrimeDepth and Depth Anything predictions can improve upon both methods and sets a new state-of-the-art in zero-shot monocular depth estimation. In future, data-driven approaches may also benefit from integrating our preimage.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2409.09144")

Code

Syntology Ran 13 of 15 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · violated contract; 2 ran · our draft was wrong; 2 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

vislearn/PrimeDepth officialmentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 13 ran; 2 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
3ran · violated contract
2ran · our draft was wrong
2ran · fixture could not drive it
4ran
2unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from vislearn/PrimeDepth. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

default vislearn/PrimeDepth/ldm/modules/attention.py official repository ran · violated contract MIT (permissive) · 424012cb37b31172 · report
disabled_train vislearn/PrimeDepth/ldm/models/diffusion/ddpm.py official repository ran · violated contract MIT (permissive) · 4cb732f513d69dfd · report
exists vislearn/PrimeDepth/ldm/modules/attention.py official repository ran · violated contract MIT (permissive) · aa5486a3650902d8 · report
get_timestep_embedding vislearn/PrimeDepth/ldm/modules/diffusionmodules/model.py official repository ran · fixture could not drive it fingerprinted MIT (permissive) · cb49209c125de1b4 · report
isimage vislearn/PrimeDepth/ldm/util.py official repository ran MIT (permissive) · b1368330cf0f5642 · report
ismap vislearn/PrimeDepth/ldm/util.py official repository ran MIT (permissive) · d72762b700feee6f · report
make_beta_schedule vislearn/PrimeDepth/ldm/modules/diffusionmodules/util.py official repository ran · honoured contract MIT (permissive) · 3bd7e0cdbd131fdb · report
make_ddim_sampling_parameters vislearn/PrimeDepth/ldm/modules/diffusionmodules/util.py official repository ran · fixture could not drive it MIT (permissive) · 3ee640131c9d4362 · report
make_ddim_timesteps vislearn/PrimeDepth/ldm/modules/diffusionmodules/util.py official repository ran · honoured contract MIT (permissive) · 0ea4e960ea54514c · report
nonlinearity vislearn/PrimeDepth/ldm/modules/diffusionmodules/model.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 3137073275f8c21a · report
normal_kl vislearn/PrimeDepth/ldm/modules/distributions/distributions.py official repository ran fingerprinted MIT (permissive) · 17eb0a31c91b671c · report
normalization vislearn/PrimeDepth/ldm/modules/diffusionmodules/labeller.py official repository ran MIT (permissive) · 9c98c9b6c537a134 · report
uniq vislearn/PrimeDepth/ldm/modules/attention.py official repository ran · our draft was wrong MIT (permissive) · 9a299fe5ae09e407 · report
find_denominator vislearn/PrimeDepth/ldm/modules/diffusionmodules/labeller.py official repository unverified MIT (permissive) · 4f8734a02fc01ca2 · report
log_txt_as_img vislearn/PrimeDepth/ldm/util.py official repository unverified MIT (permissive) · 6b4c1a8ce5fb7282 · report

Tasks

Depth EstimationMonocular Depth EstimationScene UnderstandingZero-shot Generalization

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Monocular Depth Estimation ETH3D PrimeDepth Delta < 1.25 0.967 #3 of 10 Archive leaderboard report
Monocular Depth Estimation ETH3D PrimeDepth absolute relative error 0.068 #3 of 10 Archive leaderboard report
Monocular Depth Estimation KITTI Eigen split PrimeDepth + Depth Anything Delta < 1.25 0.953 #44 of 79 Archive leaderboard report
Monocular Depth Estimation KITTI Eigen split PrimeDepth + Depth Anything absolute relative error 0.073 #44 of 79 Archive leaderboard report
Monocular Depth Estimation KITTI Eigen split PrimeDepth Delta < 1.25 0.937 #46 of 79 Archive leaderboard report
Monocular Depth Estimation KITTI Eigen split PrimeDepth absolute relative error 0.079 #46 of 79 Archive leaderboard report
Monocular Depth Estimation NYU-Depth V2 PrimeDepth + Depth Anything Delta < 1.25 0.977 #5 of 85 Archive leaderboard report
Monocular Depth Estimation NYU-Depth V2 PrimeDepth + Depth Anything absolute relative error 0.046 #5 of 85 Archive leaderboard report
Monocular Depth Estimation NYU-Depth V2 PrimeDepth Delta < 1.25 0.966 #13 of 85 Archive leaderboard report
Monocular Depth Estimation NYU-Depth V2 PrimeDepth absolute relative error 0.058 #13 of 85 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Dense ConnectionsDiffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections