This is the transformers version of DepthPro, a foundation model for zero-shot metric monocular depth estimation, designed to generate high-resolution depth maps with remarkable sharpness and fine-grained details. For the checkpoint compatible with the original codebase, please check
this repo
.
DepthPro is a foundation model for zero-shot metric monocular depth estimation, designed to generate high-resolution depth maps with remarkable sharpness and fine-grained details. It employs a multi-scale Vision Transformer (ViT)-based architecture, where images are downsampled, divided into patches, and processed using a shared Dinov2 encoder. The extracted patch-level features are merged, upsampled, and refined using a DPT-like fusion stage, enabling precise depth estimation.
The abstract from the paper is the following:
We present a foundation model for zero-shot metric monocular depth estimation. Our model, Depth Pro, synthesizes high-resolution depth maps with unparalleled sharpness and high-frequency details. The predictions are metric, with absolute scale, without relying on the availability of metadata such as camera intrinsics. And the model is fast, producing a 2.25-megapixel depth map in 0.3 seconds on a standard GPU. These characteristics are enabled by a number of technical contributions, including an efficient multi-scale vision transformer for dense prediction, a training protocol that combines real and synthetic datasets to achieve high metric accuracy alongside fine boundary tracing, dedicated evaluation metrics for boundary accuracy in estimated depth maps, and state-of-the-art focal length estimation from a single image. Extensive experiments analyze specific design choices and demonstrate that Depth Pro outperforms prior work along multiple dimensions.
This is the model card of a 🤗
transformers
model that has been pushed on the Hub.
Developed by:
Aleksei Bochkovskii, Amaël Delaunoy, Hugo Germain, Marcel Santos, Yichao Zhou, Stephan R. Richter, Vladlen Koltun.
The DepthPro model was trained on the following datasets:
Preprocessing
Images go through the following preprocessing steps:
rescaled by
1/225.
normalized with
mean=[0.5, 0.5, 0.5]
and
std=[0.5, 0.5, 0.5]
resized to
1536x1536
pixels
Training Hyperparameters
Evaluation
Model Architecture and Objective
The
DepthProForDepthEstimation
model uses a
DepthProEncoder
, for encoding the input image and a
FeatureFusionStage
for fusing the output features from encoder.
The
DepthProEncoder
further uses two encoders:
patch_encoder
Input image is scaled with multiple ratios, as specified in the
scaled_images_ratios
configuration.
Each scaled image is split into smaller
patches
of size
patch_size
with overlapping areas determined by
scaled_images_overlap_ratios
.
These patches are processed by the
patch_encoder
image_encoder
Input image is also rescaled to
patch_size
and processed by the
image_encoder
Both these encoders can be configured via
patch_model_config
and
image_model_config
respectively, both of which are separate
Dinov2Model
by default.
Outputs from both encoders (
last_hidden_state
) and selected intermediate states (
hidden_states
) from
patch_encoder
are fused by a
DPT
-based
FeatureFusionStage
for depth estimation.
The network is supplemented with a focal length estimation head. A small convolutional head ingests frozen features from the depth estimation network and task-specific features from a separate ViT image encoder to predict the horizontal angular field-of-view.
Citation
BibTeX:
@misc{bochkovskii2024depthprosharpmonocular,
title={Depth Pro: Sharp Monocular Metric Depth in Less Than a Second},
author={Aleksei Bochkovskii and Amaël Delaunoy and Hugo Germain and Marcel Santos and Yichao Zhou and Stephan R. Richter and Vladlen Koltun},
year={2024},
eprint={2410.02073},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2410.02073},
}
DepthPro-hf huggingface.co is an AI model on huggingface.co that provides DepthPro-hf's model effect (), which can be used instantly with this apple DepthPro-hf model. huggingface.co supports a free trial of the DepthPro-hf model, and also provides paid use of the DepthPro-hf. Support call DepthPro-hf model through api, including Node.js, Python, http.
DepthPro-hf huggingface.co is an online trial and call api platform, which integrates DepthPro-hf's modeling effects, including api services, and provides a free online trial of DepthPro-hf, you can try DepthPro-hf online for free by clicking the link below.
apple DepthPro-hf online free url in huggingface.co:
DepthPro-hf is an open source model from GitHub that offers a free installation service, and any user can find DepthPro-hf on GitHub to install. At the same time, huggingface.co provides the effect of DepthPro-hf install, users can directly use DepthPro-hf installed effect in huggingface.co for debugging and trial. It also supports api for free installation.