DepthMaster: Unified Monocular Depth Estimation for Perspective and Panoramic Images

Pengfei Wang, Shihao Wang, Liyi Chen, Zhiyuan Ma, Guowen Zhang, Lei Zhang

TL;DR

Computer vision models are remarkably good at guessing 3D depth from standard flat photos, yet they completely fall apart when handed warped, $360^\circ$ panoramic images. DepthMaster solves this by slicing panoramas into slightly overlapping standard views and teaching a pure, unmodified Vision Transformer to stitch them seamlessly using a clever mathematical loss rather than clunky custom layers. The result? A single unified model that beats both generalist and specialist models across both camera types—while using a fraction of the panoramic training data.

What Problem Does This Paper Address?

Look at a single 2D photograph, and your brain effortlessly reconstructs a 3D world with real-world distances (metric depth). Teaching AI to do this—monocular depth estimation—has exploded in capability thanks to massive datasets of standard pinhole-camera photos.

However, try feeding a $360^\circ$ panorama into one of these state-of-the-art models, and the geometry breaks. Unwrapping a sphere onto a flat rectangle (equirectangular projection, or ERP) stretches the poles like a Mercator world map. This creates a frustrating catch-22 for researchers:

  1. Geometric Clash: Standard cameras project light in straight lines; panoramas curve it. One network struggles to speak both geometric languages.
  2. Data Starvation: High-quality, annotated panoramic datasets are scarce compared to the millions of standard perspective images available.

Previously, researchers built specialized panoramic networks with custom architectural operators (like cube convolutions) to handle spherical distortion and boundary seams. Unfortunately, modifying the network architecture means you sever compatibility with standard foundation models—locking yourself out of the rich 3D intuition learned from millions of normal photos.

Figure 1: DepthMaster enables high-fidelity zero-shot metric depth estimation. We visualize the 3D point clouds reconstructed from diverse inputs. While specialist models—such as UniDepth [50] for perspective images and Depth Any Panoramas (DAP) [41] for panoramas—often struggle with global geometric structures or local fine details, our unified DepthMaster produces superior 3D structures and sharper details across both camera types. We provide more interactive visualizations on our project page: https://polyu-vclab.github.io/DepthMaster-page.

Methods

DepthMaster's core philosophy is backbone purity: instead of changing the neural network to fit distorted data, change the data to fit a standard network.

  • 95° Overlapping Cubemaps (New Twist on Projection): Rather than feeding raw panoramas into the model, DepthMaster unfolds each $360^\circ$ image into six flat "cubemap" faces—like the sides of a die. Standard $90^\circ$ faces leave harsh seams at the edges. Expanding each face by just $2.5^\circ$ on all sides (to a $95^\circ$ field-of-view) creates a thin overlapping border without introducing noticeable wide-angle distortion. Standard perspective photos simply enter the pipeline as a single patch ($N=1$), while panoramas enter as six ($N=6$).
  • Standard Backbone + Virtual Camera Conditioning: The model uses a standard DINOv2 Vision Transformer, swapping in alternating intra-patch and cross-patch global attention in its later layers (which naturally collapses to regular self-attention for single perspective photos). For panoramic patches, the known orientations and focal lengths of the six virtual cameras are fed in as extra tokens. Standard photos require zero camera metadata.
  • Correspondence Consistency Loss (CCL) (Novel): Instead of writing custom code to blend patch borders, the authors introduce CCL during training. Using exact homography math, they find pairs of pixels in those $2.5^\circ$ overlap zones looking at the exact same direction in space. Crucially, they force the high-level internal Transformer features—rather than the final 3D points—to match via bilinear interpolation, avoiding "flying pixel" artifacts at object edges.
  • Decoupled Global Scale: Dense heads predict relative 3D shapes and surface normals, while a separate head predicts real-world metric scale. For panoramas, pooling the CLS tokens across all six faces ensures the entire $360^\circ$ room shares one consistent scale without boundary drift.

Datasets

No new benchmarks are introduced; instead, the authors highlight extreme data efficiency across existing ones:

  • Training (15 datasets): 14 standard perspective datasets paired with just 1 panoramic dataset (Structured3D, ~35K panoramic samples). Real-world depth labels are pre-cleaned to remove flying pixels and noise.
  • Zero-Shot Evaluation (13 unseen datasets):
  • 3 Panoramic: Stanford2D3D, Matterport3D, and PanoSUNCG.
  • 10 Perspective: NYUv2, KITTI, ETH3D, iBims-1, GSO, Sintel, DDAD, DIODE, Spring, and HAMMER.

Key Insights and Ideas

  • Loss functions can replace custom architectures: Prior methods altered convolutional kernels to fix cubemap seams, inadvertently lobotomizing pre-trained weights. Using a soft feature-level loss (CCL) achieves seamless $360^\circ$ stitching while leaving the standard Transformer untouched.
  • Perspective data supercharges panoramic vision: When the authors trained a "Panoramic-Only" version of DepthMaster, its panoramic error jumped significantly (AbsRel degraded from $6.31$ to $8.28$). Training on normal flat photos actively makes the model better at $360^\circ$ rooms because the canonical perspective patches allow direct cross-domain knowledge transfer.
  • Less data, better priors: Because it unlocks perspective foundation priors, DepthMaster beats leading panoramic model DAP using 35K panoramic training images versus DAP's 1.9 million.

Key Results

Evaluated zero-shot with a single set of weights, DepthMaster sets a new state of the art across both domains:

  • Panoramic Dominance: Across the three panoramic benchmarks, DepthMaster cuts metric depth Absolute Relative error (AbsRel) to 7.25 (compared to 11.79 for specialist DAP and 21.86 for unified model UniK3D) and reaches 94.86% $\delta_1$ accuracy. Remarkably, its zero-shot score on Matterport3D ($5.79$ affine-invariant AbsRel) beats UniK3D ($8.14$), which was explicitly trained on Matterport3D.
  • Perspective Mastery: Across 10 perspective benchmarks, DepthMaster achieves the best overall average rank (1.31), beating powerhouse perspective specialists like MoGe 2 (2.22) and Depth Pro (5.50), despite using roughly one-fourth the training data of recent unified models.
  • Faster and Lighter: On an A100 GPU (FP16) outputting $1024 \times 2048$ panoramas, DepthMaster runs in 178 ms using 4.58 GB of peak VRAM—faster and leaner than UniK3D (279 ms, 5.15 GB) and DAP (218 ms, 6.50 GB).

Limitations and Future Work

  • Uncalibrated Fisheye Lenses: DepthMaster is built for standard pinhole and $360^\circ$ ERP images. While fisheye images with known camera intrinsics can be mapped onto a sphere and resampled into cubemaps, uncalibrated "in-the-wild" fisheye photos cannot be processed directly.
  • Abstract Art & Out-of-Distribution Inputs: Like virtually all current depth models, DepthMaster stumbles on highly abstract, non-photorealistic imagery such as traditional ink wash paintings.
  • Next Steps: The authors plan to expand their canonicalization pipeline to handle arbitrary uncalibrated camera distortions and use style-transfer data synthesis to make depth perception robust to artistic domains.

Summary updated

Abstract

While monocular depth estimation has achieved significant progress, achieving generalized metric depth estimation for both narrow field-of-view (FoV) perspectives and $360^\circ$ panoramas remains an unsolved challenge. Existing methods are often tailored to specific camera types and struggle to produce accurate metric depth that generalizes across diverse settings. This limitation stems from two key challenges: the inherent geometric discrepancy between perspective and panoramic cameras, and the scarcity of panoramic training data with metric annotations. In this work, we introduce \textbf{DepthMaster}, a unified metric depth estimation framework. Rather than employing specialized networks to learn spherical distortions, we reformulate the problem by decomposing panoramic images into overlapping perspective patches. Crucially, distinct from prior projection-based methods that rely on ad-hoc architectural modifications to handle boundaries, we introduce a novel Correspondence Consistency Loss (CCL) and inject virtual projection cameras as geometric priors, allowing us to seamlessly stitch the patches while avoiding specialized operators and keeping the backbone largely compatible with standard Transformer designs. This strategy also resolves the geometric differences by unifying all inputs into a canonical perspective representation, and effectively circumvents data scarcity by directly unlocking powerful metric priors from vast perspective datasets. Trained on a mixed dataset that contains only one panorama dataset, DepthMaster achieves state-of-the-art zero-shot performance on 13 diverse datasets, outperforming \textbf{not only universal methods but also leading specialist models in both perspective and panoramic domains}. Project page: https://polyu-vclab.github.io/DepthMaster-page
BibTeX
@inproceedings{wang2026depthmaster,
  author = {Pengfei Wang and Shihao Wang and Liyi Chen and Zhiyuan Ma and Guowen Zhang and Lei Zhang},
  title = {{DepthMaster: Unified Monocular Depth Estimation for Perspective and Panoramic Images}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=o6YcOXGpEx},
}
Figure