depthpro2-l / README.md
multimodalart's picture
multimodalart HF Staff
Upload README.md with huggingface_hub
d6492b4 verified
|
Raw History Blame Contribute Delete
2.29 kB
metadata
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 β€” the L variant (334M parameters) of Apple's Depth Pro 2 (paper Β· code). 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 β€” 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 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). The app code follows the repository's code license.