apple/DepthPro2-coreml
Depth Pro 2 CoreML Models Sharp, temporally consistent metric depth from a single camera, for photos and videos. These are the Core ML packages (.mlpackage) of the torch models on the Depth Pro 2 page(https://huggingface.co/apple/DepthPro2). Models |...
Depth Pro 2 CoreML Models
Sharp, temporally consistent metric depth from a single camera, for photos and videos. These are
the Core ML packages (.mlpackage) of the torch models on the Depth Pro 2 page.
Models
| Model | Package | Size |
|---|---|---|
| S | depthpro2-s_w4.mlpackage | 51 MB |
| B | depthpro2-b_w4.mlpackage | 188 MB |
| L | depthpro2-l_w4.mlpackage | 891 MB |
| H+ | depthpro2-h_w4.mlpackage | 1.6 GB |
| Field of view | depthpro2-fov_512x896.mlpackage | 91 MB |
Larger models give sharper, steadier depth; smaller ones run faster. On a laptop, start with S.
- Window.
w4is a temporal window of 4 frames. The model takes one frame at a time and keeps the earlier ones in its state, so create a new state for each new video. - Sizes. Each depth package has one function per input size, named
res_<W>x<H>:res_854x480(default),res_640x360,res_896x512,res_1138x640andres_1280x720. - Field of view. The field-of-view package has a single size, 896x512, for 16:9 frames. It estimates the focal length of cameras that don't report it.
- Memory. It grows quickly with the size: S needs about 1.5 GB at 854x480 and 5 GB at 1280x720; L about 4 GB and 18 GB. On a Mac with 16 GB, use S or B, or keep to the default size.
Requires Apple silicon and macOS 15 or later.
Try it
Clone the GitHub repository, put a depth package (and the field-of-view package, for cameras without a known focal length) next to each other, and run the Mac demo on it:
./demo/run.sh depthpro2-s_w4.mlpackage
To build a package at your own size -s HxW and window -w, see the demo's README:
uv run --extra coreml python -m demo.export stream -m depthpro2-s -w 4 -s 480x854
Use in Swift
import CoreML
let compiled = try MLModel.compileModel(at: URL(filePath: "depthpro2-s_w4.mlpackage"))
let config = MLModelConfiguration()
config.computeUnits = .cpuAndGPU
config.functionName = "res_854x480" // omit for the default size
let model = try MLModel(contentsOf: compiled, configuration: config)
let state = model.makeState() // a new state starts a new video
// frame: float16 MLMultiArray (1, 3, 480, 854), RGB in [0, 1]
let input = try MLDictionaryFeatureProvider(dictionary: ["frame": MLFeatureValue(multiArray: frame)])
let output = try model.prediction(from: input, using: state)
let inverseDepth = output.featureValue(for: "inverse_depth")!.multiArrayValue! // (1, 480, 854)
inverse_depth is normalized by the focal length: depth in meters is f_px / (W * inverse_depth), with f_px the focal length in pixels of the H×W frame. The demo's Preprocess.swift shows how to prepare camera frames.
Videos and the torch models are on the Depth Pro 2 page.
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},
}
Similar Projects
Discover other similar projects and AI models.
Depth Pro 2: Sharp and Temporally Consistent Metric Monocular Depth 🚀 Try the Interactive Demo → -- Depth Pro 2 estimates metric depth for every pixel from an ordinary camera: a single photo, a whole video, or a live feed, at the input's full resolu...
Depth Anything 3: DA3NESTED-GIANT-LARGE !Project Page(https://img.shields.io/badge/ProjectPage-DepthAnything3-green)(https://depth-anything-3.github.io) !Paper(https://img.shields.io/badge/arXiv-DepthAnything3-red)(https://arxiv.org/abs/) !Demo(http...
Depth Anything 3: DA3METRIC-LARGE !Project Page(https://img.shields.io/badge/ProjectPage-DepthAnything3-green)(https://depth-anything-3.github.io) !Paper(https://img.shields.io/badge/arXiv-DepthAnything3-red)(https://arxiv.org/abs/) !Demo(https://im...
Depth Anything 3: DA3-LARGE !Project Page(https://img.shields.io/badge/ProjectPage-DepthAnything3-green)(https://depth-anything-3.github.io) !Paper(https://img.shields.io/badge/arXiv-DepthAnything3-red)(https://arxiv.org/abs/) !Demo(https://img.shie...
Depth Pro 2: Sharp and Temporally Consistent Metric Monocular Depth
Depth Pro: Sharp Monocular Metric Depth in Less Than a Second !Depth Pro Demo Image(https://github.com/apple/ml-depth-pro/raw/main/data/depth-pro-teaser.jpg) We present a foundation model for zero-shot metric monocular depth estimation. Our model, D...
Depth-Anything-V2-Large Introduction Depth Anything V2 is trained from 595K synthetic labeled images and 62M+ real unlabeled images, providing the most capable monocular depth estimation (MDE) model with the following features: - more fine-grained d...
Model Details: DPT-Large (also known as MiDaS 3.0) Dense Prediction Transformer (DPT) model trained on 1.4 million images for monocular depth estimation. It was introduced in the paper Vision Transformers for Dense Prediction(https://arxiv.org/abs/2...
Model Details: DPT-Hybrid (also known as MiDaS 3.0) Dense Prediction Transformer (DPT) model trained on 1.4 million images for monocular depth estimation. It was introduced in the paper Vision Transformers for Dense Prediction(https://arxiv.org/abs/...