Papers
Topics
Authors
Recent
Search
2000 character limit reached

Marigold-Based Defocus Blur Depth Estimation

Updated 2 June 2026
  • The Marigold-based Defocus Blur Approach is a zero-shot method for metric depth estimation that combines a pre-trained diffusion model with defocus blur cues at inference.
  • It employs dual-aperture image acquisition and a differentiable blur forward model, leveraging thin-lens physics to accurately estimate absolute depth.
  • Experimental results show improved RMSE and depth precision over state-of-the-art methods, particularly in out-of-distribution and low-texture scenarios.

The Marigold-based Defocus Blur Approach is a zero-shot, training-free method for metric monocular depth estimation that augments a pre-trained diffusion model, Marigold, with defocus blur cues at inference time. By leveraging the optical physics of depth-dependent defocus and a differentiable blur forward model, this approach enables inference-time optimization for absolute depth, outperforming state-of-the-art monocular metric depth estimation (MMDE) systems in generalization to out-of-distribution scenes (Talegaonkar et al., 23 May 2025).

1. Defocus Blur Image-Formation Physics

The method operationalizes the thin-lens model, quantifying defocus using the Circle-of-Confusion (CoC), which models the diameter of the blur disk for a point at distance dd:

c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}

where ff is focal length, FF is focus distance, NN is F-stop, and ss is the pixel size. The point-spread function (PSF) for defocus is parameterized as a spatially varying disc with linear rim fall-off, allowing differentiable rendering of the blurred image:

xblur(i,j)=∬xAIF(u,v) h(i−u,j−v∣dm[u,v]) du dvx_{\mathrm{blur}}(i,j) = \iint x_{\text{AIF}}(u,v)\, h(i-u,j-v \mid \mathbf d^{\mathrm m}[u,v])\, du\, dv

where xAIFx_\text{AIF} is the all-in-focus radiance, dm\mathbf d^{\mathrm m} is the metric depth map, and hh is the normalized disc-PSF at each location.

2. Dual-Aperture Image Acquisition and Preprocessing

Inference requires acquisition of two raw images from a fixed viewpoint with known optical parameters:

  • A high-aperture (c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}0) all-in-focus image (c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}1)
  • A lower-aperture (c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}2) defocused blurred image (c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}3)

An exposure compensation factor ensures energy constancy between images:

c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}4

where c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}5 denotes exposure times. This preprocessing aligns the linear radiance scales of both images, necessary for accurate forward modeling.

3. Inference-Time Optimization Framework

The pipeline formulates metric depth estimation as a constrained optimization task over latent variables:

  • Marigold-LCM denoiser c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}6 operates on a noise latent c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}7 and AIF-encoded latent c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}8, producing a depth latent c(d)=f2N∣d−F∣d(F−f)sc(d) = \frac{f^2}{N} \frac{|d-F|}{d(F-f)s}9.
  • The decoded depth ff0 is affinely mapped to metric depth:

ff1

with affine scale ff2 and offset ff3 determined through unconstrained optimization variables ff4, ff5, and scene bounds ff6, ff7.

The loss function penalizes the ff8 norm between the captured blurred image and the model-predicted blur given the current metric depth, all-in-focus image, and camera parameters:

ff9

Optimization proceeds over FF0 subject to the norm constraint FF1, consistent with the sampling from standard normal for FF2-dimensional latents.

4. Integration into the Marigold Pipeline

The inference-time algorithm is initialized by sampling FF3 with FF4 (implying FF5). For FF6 iterations:

  1. Compute FF7
  2. Decode FF8
  3. Affinely convert to metric depth
  4. Forward-blur image synthesis FF9
  5. Evaluate loss and gradients
  6. Update NN0 using Adam or SGD
  7. Renormalize NN1 to maintain NN2

Convergence is by fixed iteration count or saturation of NN3. All modules (Marigold-LCM inference, depth decoding, metric mapping, forward blur) are differentiable, enabling unified backpropagation.

5. Approximations and Regularization

The blur forward model utilizes a disc-PSF with linear rim fall-off, eschewing full diffraction simulation for computational efficiency. Single-step latent-consistency sampling is used for Marigold-LCM in place of typical diffusion with 20–50 steps. Sigmoid parameterization for mapping ensures well-behaved depth scales. Latent renormalization enforces a "Gaussian-annulus" prior, with known scene bounds NN4 constraining metric depth range.

6. Experimental Evaluation and Results

Experiments are conducted on a custom real dataset acquired with a Canon 5D Mark II (50mm lens) and Intel RealSense D435 for depth ground truth, capturing seven indoor scenes across various F-stops (AIF at NN5, blur at NN6). Focus is fixed at 0.8m; RealSense provides depth in [0.3, 3.8] m. Standard metrics—RMSE, AbsRel, log10 error, and accuracy thresholds NN7—are employed [bhat2023zoedepth].

Comparison with zero-shot MMDE baselines (MLPro, UniDepth, Metric3D) demonstrates strong performance:

Method RMSE (m) Rel log10 NN8
Marigold+Disc-PSF 0.273 0.125 0.052 0.879
MLPro 0.468 0.246 0.105 0.597
UniDepth 0.644 0.376 0.157 0.259
Metric3D 0.459 0.295 0.106 0.650
Gaussian-PSF ablation 0.528 — — —

Ablation studies indicate:

  • Fixing the latent NN9 and optimizing only affine parameters yields degraded RMSE (0.297)
  • The ss0 blur achieves best results; too little or too much blur is suboptimal
  • Method displays low sensitivity to initialization (std. dev. ss1 0.02)
  • Single Marigold-LCM step is sufficient; additional steps yield marginal gains

Synthetic plane tests ("Texture-Plane" toy) verify that the approach robustly recovers flat depth in the presence of ambiguous texture seen to challenge conventional methods (RMSE ss2 0.01).

7. Qualitative Outcomes and Broader Implications

Qualitative results on both synthetic and real scenes reveal accurate recovery of both relative and absolute metric scale, with sharper boundaries and correct geometric ordering where prior methods frequently fail on scale or relative depth. The integration of defocus cues at inference reliably disambiguates depth in repetitive or low-texture regions. A plausible implication is that depth-from-blur provides significant complementary signals to deep-learning-based priors when upgraded with physical-camera information.

By posing metric depth estimation as a differentiable inverse problem utilizing both the strong diffusion prior of Marigold and explicit depth-varying blur cues, the framework achieves state-of-the-art results in zero-shot depth estimation under out-of-distribution conditions (Talegaonkar et al., 23 May 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Marigold-based Defocus Blur Approach.