Depth Anything with Any Prior

Zehan Wang, Siyu Chen, Lihe Yang, Jialei Wang, Ziang Zhang, Hengshuang Zhao, Zhou Zhao

TL;DR

Prior Depth Anything is a unified framework that transforms any incomplete metric depth data—such as sparse LiDAR points, low-resolution sensor maps, or noisy SfM points—into dense, high-fidelity metric depth maps. By combining the "geometric common sense" of monocular depth foundation models with precise but patchy physical measurements, it achieves state-of-the-art zero-shot performance across depth completion, super-resolution, and inpainting tasks.

Concept Overview

What Problem Does This Paper Address?

In the world of computer vision, we have two primary ways to understand depth, and both are flawed:

  1. Monocular Depth Estimation (MDE) Models: Modern "foundation" models (like Depth Anything v2) are incredible at understanding the relative structure of a scene. They know where edges are and which objects are in front of others. However, they struggle with metric accuracy; they cannot reliably tell you if a wall is 2.5 meters or 3.0 meters away.
  2. Depth Sensors & Measurements: Technologies like LiDAR, Time-of-Flight (ToF) cameras, or Structure from Motion (SfM) provide highly accurate metric distances. Unfortunately, this data is often "patchy"—it might be very sparse (LiDAR), low-resolution (mobile sensors), or contain large holes (stereo matching failures).

Existing research usually treats these as separate problems: "depth completion" for sparse points or "super-resolution" for low-res maps. Prior Depth Anything addresses the lack of a unified, robust framework that can ingest any kind of incomplete metric prior and produce a dense, accurate, and detailed metric depth map.

Methods

The authors propose a two-stage, coarse-to-fine pipeline to progressively integrate these two complementary depth sources:

Pipeline Architecture

1. Coarse Metric Alignment (Explicit Fusion)

The goal of the first stage is to "pre-fill" the gaps in the metric prior.

  • First, the system uses a frozen MDE model to generate a complete but relative depth map (the "geometry template").
  • It then aligns the sparse metric points to this template using a distance-aware weighted least squares approach. By looking at the $k$-nearest metric points for every missing pixel, it calculates the optimal scale and shift to transform the relative prediction into a metric one.
  • This creates a "pre-filled" dense map that already has the right scale but might still contain noise or misalignments from the original sensor data.

2. Fine Structure Refinement (Implicit Fusion)

To clean up the "pre-filled" map, the authors develop a conditioned MDE model.

  • They take a pre-trained Depth Anything v2 model and add parallel "condition convolutional layers" (initialized to zero so they don't break the base model's knowledge).
  • This model takes three inputs: the original RGB image, the pre-filled metric prior, and the initial relative prediction.
  • The network learns to implicitly merge these sources, using the RGB image to sharpen edges and the metric prior to anchor the absolute distances, effectively "rectifying" any noise introduced by the sensors.

Datasets

  • Training: The model was trained on synthetic datasets (Hypersim and vKITTI) because real-world depth "ground truth" often has blurred edges or missing values that can degrade training quality.
  • Evaluation: To prove generalization, the authors tested the model in a zero-shot manner (no fine-tuning) across 7 diverse real-world datasets: NYUv2, ScanNet, ETH-3D, DIODE, KITTI, ARKitScenes, and RGB-D-D.

Key Insights and Ideas

  • The Power of Pre-filling: Instead of asking a neural network to imagine depth from a few sparse dots, "pre-filling" the prior using a relative depth model narrows the domain gap. This makes it much easier for the model to generalize across different types of sensors.
  • Inheriting Foundation Knowledge: By using zero-initialized condition layers, the model "natively inherits" the massive spatial reasoning capabilities of the base MDE model. It only has to learn how to adjust that knowledge based on the new metric evidence.
  • Test-Time Flexibility: Because the first stage uses a "frozen" model, users can swap it out. Want more speed? Use a small ViT-S model. Need maximum precision? Swap in a ViT-G model without retraining the refinement stage.

Key Results

  • All-Rounder Performance: The model matches or beats task-specific state-of-the-art models (like Omni-DC for completion or PromptDA for super-resolution) across almost all benchmarks, despite being a single unified model.
  • Robustness to "Mixed Priors": In real-world scenarios where you might have a low-res map that is also missing chunks of data, Prior Depth Anything significantly outperformed competitors. On the NYUv2 dataset with mixed priors, it achieved an Absolute Relative Error (AbsRel) of 2.01, compared to 2.86 for the next best model (Omni-DC).
  • Qualitative Superiority: Visual results show much sharper boundaries and fewer artifacts around thin structures (like chair legs or table edges) compared to previous methods.

Limitations and Future Work

  • Resolution Constraints: The model is currently trained at a resolution of 518x518. While it generalizes well, it doesn't yet natively handle the 4K resolutions some modern sensors provide.
  • Backbone Scaling: The current "best" version uses a ViT-B backbone. The authors note that moving to larger backbones (ViT-L or ViT-G) is a clear path for even higher accuracy.
  • Sensor Noise: While the refinement stage handles typical sensor noise well, extremely "dirty" or outlier-heavy priors still present a challenge for the initial coarse alignment stage.

Summary updated

BibTeX
@inproceedings{wang2026depth,
  author = {Zehan Wang and Siyu Chen and Lihe Yang and Jialei Wang and Ziang Zhang and Hengshuang Zhao and Zhou Zhao},
  title = {{Depth Anything with Any Prior}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=IROtFft9Q4},
}
Figure