Depth Pro 2: Sharp and Temporally Consistent Metric Monocular Depth

GitHub Technical Report Project Page All Sizes

Focal length estimator · 23.5M parameters

How to use

pip install "git+https://github.com/apple-aiml-research/ml-depth-pro-2"

Load it with any size, for photos and videos without a focal length:

import torch
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from depth_pro_2 import DepthPro2
from depth_pro_2.network.fov import FOVEstimator

weights = hf_hub_download("apple/DepthPro2-focal", "model.safetensors")
model = DepthPro2.from_pretrained("apple/DepthPro2-H", precision=torch.bfloat16)
model.fov = FOVEstimator(torch.bfloat16)
model.fov.load_state_dict(load_file(weights))
model = model.to("cuda").eval()

On its own, it estimates the focal length of a photo, or one for the frames of a clip:

from functools import partial

import torch
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from depth_pro_2 import load_rgb
from depth_pro_2.model import to_normalized_tensor
from depth_pro_2.network.fov import FOVEstimator

weights = hf_hub_download("apple/DepthPro2-focal", "model.safetensors")
fov = FOVEstimator()
fov.load_state_dict(load_file(weights))
fov = fov.to("cuda").eval()
transform = partial(to_normalized_tensor, device=torch.device("cuda"))

image, _ = load_rgb("photo.jpg")
with torch.no_grad():
    f_px = fov.focal_length_px(transform(image)[None])  # pixels of the photo; frames (T, 3, H, W)

License

The weights are released under the Apple Machine Learning Research Model license, for research use only: non-commercial scientific research and academic development.

Citation

@article{DepthPro2:2026:arxiv,
  title   = {Depth Pro 2: Sharp and Temporally Consistent Metric Monocular Depth},
  author  = {Peiyun Hu and Marko Mihajlovic and Lyndon Duong and Lahav Lipson and Wei Dong and Ama\"{e}l Delaunoy and Stephan R. Richter and Vladlen Koltun},
  journal = {arXiv preprint arXiv:2611.26603},
  year    = {2026},
  url     = {https://arxiv.org/abs/2611.26603},
}
Downloads last month
42
Safetensors
Model size
23.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Spaces using apple/DepthPro2-focal 2

Paper for apple/DepthPro2-focal