[Paper Review] ZoeDepth: Zero-shot Transfer by Combining Relative and Metric Depth
ZoeDepth combines relative-depth pre-training with metric-depth heads and automatic routing to achieve strong metric-depth performance and unprecedented zero-shot generalization across indoor and outdoor datasets.
This paper tackles the problem of depth estimation from a single image. Existing work either focuses on generalization performance disregarding metric scale, i.e. relative depth estimation, or state-of-the-art results on specific datasets, i.e. metric depth estimation. We propose the first approach that combines both worlds, leading to a model with excellent generalization performance while maintaining metric scale. Our flagship model, ZoeD-M12-NK, is pre-trained on 12 datasets using relative depth and fine-tuned on two datasets using metric depth. We use a lightweight head with a novel bin adjustment design called metric bins module for each domain. During inference, each input image is automatically routed to the appropriate head using a latent classifier. Our framework admits multiple configurations depending on the datasets used for relative depth pre-training and metric fine-tuning. Without pre-training, we can already significantly improve the state of the art (SOTA) on the NYU Depth v2 indoor dataset. Pre-training on twelve datasets and fine-tuning on the NYU Depth v2 indoor dataset, we can further improve SOTA for a total of 21% in terms of relative absolute error (REL). Finally, ZoeD-M12-NK is the first model that can jointly train on multiple datasets (NYU Depth v2 and KITTI) without a significant drop in performance and achieve unprecedented zero-shot generalization performance to eight unseen datasets from both indoor and outdoor domains. The code and pre-trained models are publicly available at https://github.com/isl-org/ZoeDepth .
Motivation & Objective
- Address the limitation of metric-depth models that overfit to single datasets and lack generalization across domains.
- Leverage relative-depth pre-training to improve generalization while preserving metric depth during fine-tuning.
- Develop a lightweight, domain-specific metric-depth head (metric bins module) and an automatic routing mechanism to select the appropriate head at inference.
- Demonstrate improved state-of-the-art performance on NYU Depth v2 and KITTI, and show strong zero-shot generalization to eight unseen datasets.
Proposed method
- Two-stage framework: first pre-train a common encoder-decoder for relative depth (RDE) using MiDaS strategy; then add metric depth heads and fine-tune on metric-depth datasets.
- Introduce metric bins module (MBM) with attractor layers to predict per-pixel depth bin centers and combine them with per-pixel bin probabilities to output metric depth.
- Replace standard bin prediction with a binomial-ordered probability model for depth bins to respect depth order and improve stability.
- Use multi-scale decoder features to refine bin centers via inverse attractor layers, moving bin centers toward learned attractors rather than splitting bins.
- Automatic routing: at inference, route each image to the appropriate metric head via a latent classifier trained on encoder features; supports single-head or multi-head (indoor/outdoor) configurations.
- Train with scale-invariant pixel loss for supervision; do not rely on Chamfer loss due to memory, focusing on pixel-wise scale-invariant losses.
Experimental results
Research questions
- RQ1Can a single model pre-trained on relative depth generalize to metric depth across multiple domains (indoor/outdoor) without sacrificing metric accuracy?
- RQ2Does a lightweight, per-domain metric head (with MBM and attractors) effectively recover metric scale while preserving cross-domain generalization?
- RQ3How does automatic routing to domain-specific heads affect zero-shot generalization to unseen datasets?
Key findings
- ZoeD-X-N, without relative-depth pre-training, already surpasses state-of-the-art on NYU Depth v2 (REL improvement over NeWCRFs by 13.7%).
- ZoeD-M12-N (relative pre-training on 12 datasets + metric fine-tuning on NYU) achieves ~21% REL improvement over prior SOTA on NYU Depth v2.
- ZoeD-M12-NK (multi-domain fine-tuning on NYU and KITTI with routing to indoor/outdoor heads) attains 24.3% overall REL improvement over NeWCRFs and strong zero-shot results across 8 unseen datasets.
- Zero-shot generalization on unseen indoor datasets shows mRIθ up to 46.3% (e.g., DIODE Indoor) and consistently better performance than prior methods.
- Zero-shot generalization on unseen outdoor datasets achieves up to 976.4% mRIθ on DIML Outdoor, with strong results on other datasets like Virtual KITTI 2 and DDAD.
- The approach demonstrates robust multi-domain training without large performance degradation when training across indoor and outdoor datasets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.