DepthMaster: Taming Diffusion Models for Monocular Depth Estimation

Ziyang Song, Zerong Wang, Bo Li, Hao Zhang, Ruijie Zhu, Li Liu, Peng-Tao Jiang, Tianzhu Zhang

TL;DR

DepthMaster bridges the gap between generative image priors and perceptual depth estimation by "taming" a single-step Stable Diffusion model. By introducing a training-only Feature Alignment module and a frequency-domain Fourier Enhancement module, it eliminates texture overfitting and blurry outputs. The result is a highly efficient, single-forward-pass model that achieves state-of-the-art zero-shot depth estimation with exceptional detail preservation.

What Problem Does This Paper Address?

Monocular depth estimation (MDE)—predicting a 3D depth map from a single 2D RGB image—is crucial for autonomous driving, robotics, and virtual reality. Recently, researchers have repurposed pre-trained latent diffusion models (like Stable Diffusion) for MDE because their massive pre-training gives them incredible zero-shot generalization capabilities.

However, standard diffusion-based MDE methods (e.g., Marigold) rely on an iterative denoising process, making them painfully slow for real-time applications. To fix this, recent works proposed "single-step" deterministic models that output a depth map in a single forward pass. But this speedup introduces two major flaws:

  1. Texture Overfitting: Diffusion models are trained to synthesize realistic images, meaning their features are highly sensitive to superficial textures (like shadows or patterns). Directly applying these features to a perceptual task causes the model to mistake texture changes for depth changes.
  2. Blurry Outputs: In multi-step diffusion, global structure is resolved early, and fine details are added in later steps. Compressing this into a single step forces the model to learn both simultaneously, often resulting in blurry boundaries and lost details.
Challenges in single-step diffusion models: texture overfitting and blurry outputs.

Methods

DepthMaster addresses these challenges using a single-step deterministic paradigm built on Stable Diffusion v2, enhanced by two novel modules and a two-stage training curriculum.

The overall framework of DepthMaster, highlighting the Feature Alignment (FA) and Fourier Enhancement (FE) modules.
  • Deterministic Single-Step Paradigm: Instead of iterative denoising, the image is encoded into latent space, fed into the U-Net, and directly converted to a depth latent at timestep $t=1$. The model is trained to predict square-root disparity, which provides a more uniform distribution across the depth range.
  • Feature Alignment (FA) Module: To prevent the U-Net from overfitting to superficial textures, the authors introduce a pre-trained external semantic encoder (DINOv2). During training, the intermediate features of the U-Net are aligned with DINOv2's high-level semantic features using a Multi-Layer Perceptron (MLP) and a Kullback-Leibler (KL) divergence loss. This "injects" structural context into the generative features. Crucially, this module is discarded at inference time, adding zero computational overhead.
  • Fourier Enhancement (FE) Module: To recover fine-grained details without multi-step refinement, the FE module splits the U-Net's bottleneck features into a spatial pass (for global structure) and a frequency pass. The frequency pass uses a 2D Fast Fourier Transform (FFT), a convolutional modulator to balance low- and high-frequency bands, and an inverse FFT (iFFT) to sharpen edges.
  • Two-Stage Training Strategy:
    • Stage 1 (Structure Learning): The model optimizes global scene structure in the latent space using the Feature Alignment module.
  • Stage 2 (Detail Refinement): The model integrates the Fourier Enhancement module and applies pixel-level supervision alongside a Weighted Multi-directional Gradient Loss (a modified Huber loss) to sharpen object boundaries.

Datasets

The model was trained on a 9:1 mix of two synthetic datasets:

  • Hypersim: A high-fidelity indoor dataset (~54k samples) with rich textures and geometry.
  • Virtual KITTI: A synthetic outdoor dataset (~20k samples) simulating various road, weather, and lighting conditions.

For zero-shot evaluation, the authors tested DepthMaster on 5 diverse, real-world datasets without any fine-tuning: NYUv2 (indoor), ScanNet (indoor), KITTI (outdoor), ETH3D (mixed), and DIODE (mixed).

Key Insights and Ideas

  • Generative vs. Perceptual Mismatch: The paper highlights that generative features aren't automatically good at dense prediction. Forcing a generative network to align its internal representations with a purely discriminative, self-supervised model (DINOv2) acts as an effective regularizer against "pseudo-textures."
  • Frequency Domain as a Multi-Step Proxy: Instead of using multiple denoising steps to refine details, the same effect can be achieved in a single step by explicitly modulating high- and low-frequency components in the frequency domain via FFT.
  • Deep Alignment Matters: Ablation studies revealed that aligning features at the U-Net's middle block yields the best results. Shallow layers capture local details that conflict with DINOv2's global perception, whereas the deeper bottleneck matches it perfectly.

Key Results

DepthMaster achieves state-of-the-art zero-shot performance among diffusion-based methods while matching the speed of the fastest single-step models.

  • Accuracy & Generalization: On the KITTI dataset, DepthMaster achieved an Absolute Relative error (AbsRel) of 8.2, outperforming the multi-step Marigold (9.9) and the single-step Lotus (9.3).
  • Inference Speed: It maintains an inference time of 0.42 seconds per image, identical to other single-step models, but represents a 30x speedup over Marigold (12.91s).
  • Qualitative Sharpness: As shown in the qualitative comparisons, DepthMaster successfully captures complex, thin structures (like tree branches and chair legs) that other single-step models completely blur out, while ignoring distracting surface textures.
Qualitative results on in-the-wild examples demonstrating sharp details and correct structure.

Limitations and Future Work

The primary limitation of DepthMaster is its large parameter size, inherited from the Stable Diffusion U-Net backbone. This high memory footprint makes it difficult to deploy directly on edge devices or mobile platforms. The authors note that their future work will focus on compressing the model through network pruning and knowledge distillation techniques to reduce computational costs without sacrificing depth accuracy.

Summary updated

BibTeX
@article{song2026depthmaster,
  author = {Ziyang Song and Zerong Wang and Bo Li and Hao Zhang and Ruijie Zhu and Li Liu and Peng-Tao Jiang and Tianzhu Zhang},
  title = {{DepthMaster: Taming Diffusion Models for Monocular Depth Estimation}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2026},
  doi = {10.1109/tcsvt.2026.3681436},
}
Figure