Jasmine: Harnessing Diffusion Prior for Self-supervised Depth Estimation

JiYuan Wang, Chunyu Lin, cheng guan, Lang Nie, Jing He, Haodong Li, Kang Liao, Yao Zhao

Overview

Jasmine is the first framework to successfully bring Stable Diffusion’s (SD) powerful visual priors into the realm of self-supervised monocular depth estimation. By introducing a novel image reconstruction surrogate task and a specialized Scale-Shift GRU, Jasmine achieves state-of-the-art accuracy and exceptional zero-shot generalization across diverse environments—all without requiring a single ground-truth depth label.

Qualitative comparison showing Jasmine's superior detail preservation and generalization across multiple scenes compared to previous methods.

The Challenge: Fragile Priors and Noisy Gradients

Estimating 3D depth from a single 2D image is a cornerstone of computer vision, but it traditionally relies on expensive LiDAR-based ground truth labels. Self-supervised methods bypass this by using video sequences: they treat depth as an intermediate step to "warp" one video frame into another, using the resulting reconstruction error (photometric loss) as a training signal.

However, this geometric approach has a critical blind spot. In areas with occlusions, texture-less regions (like a blank wall), or changing illumination, the photometric loss produces noisy, "garbage" gradients. While generative models like Stable Diffusion possess an incredible internal understanding of object shapes and scene layouts (visual priors), these priors are fragile. Attempting to train SD using these noisy self-supervised signals quickly corrupts the model's latent space, destroying the very priors researchers aim to harness.

The Jasmine Framework

To bridge the gap between generative diffusion models and geometric self-supervision, the authors propose three key innovations:

The Jasmine architecture featuring Mix-batch Image Reconstruction and the Scale-Shift GRU to preserve diffusion priors and align depth distributions.
  1. Mix-batch Image Reconstruction (MIR): To prevent SD's latent space from being corrupted by noisy depth gradients, Jasmine introduces a "surrogate task." During training, the model alternates between predicting depth and simply reconstructing the input images. Because image reconstruction aligns with SD's original design, this task acts as an "anchor," preserving the model's fine-grained structural knowledge even when depth-related gradients are messy.
  2. Scale-Shift GRU (SSG): There is a mathematical mismatch between diffusion models and geometric pipelines. SD produces depth maps that are Scale-and-Shift Invariant (SSI), meaning the absolute values are arbitrary. Conversely, self-supervised geometry requires Scale-Invariant (SI) depth (where the shift is zero) to converge. The SSG iteratively aligns these two distributions and uses a "reset gate" to filter out anomalous gradients caused by training artifacts.
  3. Steady Finetuning Protocol: Training a model as large as SD with indirect self-supervision is notoriously unstable. Jasmine uses a pre-trained self-supervised "teacher" model (like MonoViT) to provide stable pseudo-labels in the early stages of training, gradually phasing them out as the model learns to rely on its own geometric reasoning.

Datasets and Evaluation

Jasmine was primarily trained on the KITTI dataset (real-world driving scenes), utilizing Hypersim (a photorealistic synthetic indoor dataset) for the MIR surrogate task to provide high-quality image reconstruction targets.

For evaluation, the model was tested on KITTI (Eigen split) for in-domain performance. To assess "zero-shot" generalization—testing on data the model never saw during training—the authors evaluated Jasmine on DrivingStereo (which includes rainy, foggy, and cloudy conditions), Cityscapes, ETH3D, and Virtual KITTI.

Key Insights

  • The Image is its Own Best Supervisor: A surprising insight from the paper is that the best way to protect a depth model's internal knowledge isn't through better depth labels, but better image reconstruction. By forcing the model to remain a competent image generator, it retains the sharp edges and object boundaries inherent in the SD prior.
  • Decoupling Color from Structure: By using a photometric loss for the image reconstruction task rather than a simple pixel-wise latent loss, the model learns to prioritize structural consistency over perfect color fidelity, aligning perfectly with the goals of depth estimation.
  • Gradient Filtering via Recurrence: The GRU isn't just for refinement; its "reset gate" mechanism is crucial for blocking bad gradients originating from occluded regions, preventing them from propagating back and ruining the model's weights.

Key Results

  • State-of-the-Art Performance: Jasmine outperformed all previous self-supervised monocular methods on the KITTI benchmark, achieving an impressive AbsRel of 0.090.
  • Unprecedented Generalization: In zero-shot tests on the DrivingStereo dataset, Jasmine significantly outperformed existing models, including those explicitly trained with weather-augmentation data. It handled complex scenarios like reflections on wet roads and thin structures (e.g., tree branches) far better than previous methods.
  • Detail Preservation: Qualitatively, Jasmine produces significantly sharper depth maps. While standard methods often blur pedestrians or thin poles into the background, Jasmine maintains distinct, high-frequency boundaries.

Limitations and Future Work

While highly effective, Jasmine is more computationally expensive than lightweight CNN-based models. Despite using "single-step denoising" to speed up inference, it requires roughly 172ms per image on an RTX 4090, compared to ~30ms for older architectures.

However, the potential for scaling is massive. The current model was trained on only tens of thousands of frames. Scaling this framework to millions of ubiquitous video frames could lead to a breakthrough for 3D scene understanding. Furthermore, this "unsupervised SD fine-tuning" paradigm could eventually be extended beyond depth to tasks like stereo matching, depth completion, and super-resolution.

Summary updated

BibTeX
@inproceedings{wang2025jasmine,
  author = {JiYuan Wang and Chunyu Lin and cheng guan and Lang Nie and Jing He and Haodong Li and Kang Liao and Yao Zhao},
  title = {{Jasmine: Harnessing Diffusion Prior for Self-supervised Depth Estimation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=M4Laq0Y5WG},
}
Figure