Spaces:
Running on Zero
Running on Zero
File size: 2,290 Bytes
1ba3207 3c00c1c 1ba3207 3c00c1c 1ba3207 3c00c1c 1ba3207 3c00c1c d6492b4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
title: Depth Pro 2 L
emoji: π
colorFrom: red
colorTo: green
sdk: gradio
sdk_version: 6.32.0
app_file: app.py
python_version: "3.12"
short_description: Metric monocular depth from a photo or a video, in meters
startup_duration_timeout: 30m
pinned: false
license: other
license_name: apple-amlr
---
# Depth Pro 2 L β metric monocular depth
Gradio demo for [apple/DepthPro2-L](https://huggingface.co/apple/DepthPro2-L) β the L variant
(334M parameters) of Apple's Depth Pro 2 ([paper](https://arxiv.org/abs/2611.26603) Β·
[code](https://github.com/apple-aiml-research/ml-depth-pro-2)). It predicts sharp **metric depth
in meters** for every pixel of a single photo, and temporally steady depth across the frames of
a video. The focal length is taken from the photo's EXIF when present, otherwise estimated by the
companion model [apple/DepthPro2-focal](https://huggingface.co/apple/DepthPro2-focal) β so the
result is in meters either way.
## What you get
- **Photo tab** β a Turbo colorized depth map (dark blue = infinitely far, e.g. sky), plus
optional downloads: a 16-bit inverse-depth PNG (white = near, black = far) and an NPZ with
depth in meters and the focal length in pixels. Rendering matches the official CLI 1:1.
- **Video tab** β the first 64 frames of the upload, processed together in overlapping clips
(`window=16, overlap=4`, buffered mode, per the model card), shown side by side with the source.
Inputs are downscaled to at most 1536 px (photos) / 960 px (videos) before inference to bound
VRAM β the card reports ~21.7 GiB peak for a 1080p 32-frame clip on a B200; ZeroGPU's 48 GB
slice fits this comfortably.
## Example assets
`assets/example.jpg` and `assets/example.mp4` are Apple's own demo assets from the
[ml-depth-pro-2](https://github.com/apple-aiml-research/ml-depth-pro-2) repository (its license
permits redistribution with this notice). The example photo carries no EXIF focal length, so
clicking it exercises the focal estimator.
## License
The model weights are released under the **Apple ML Research license β research /
non-commercial scientific and academic use only** (see the
[model card](https://huggingface.co/apple/DepthPro2-L)). The app code follows the repository's
code license.
<!-- build 2: wiring fixes -->
|