DepthPro2 / README.md
akhaliq's picture
akhaliq HF Staff
Pin gradio to 6.32.0
6ecf21a verified
|
Raw History Blame Contribute Delete
2.18 kB
metadata
title: DepthPro2
emoji: 📷
colorFrom: blue
colorTo: pink
sdk: gradio
sdk_version: 6.32.0
python_version: '3.12'
app_file: app.py
pinned: false
license: other
license_name: apple-amlr
short_description: Metric monocular depth from photos and videos
startup_duration_timeout: 1h

Depth Pro 2 — metric monocular depth demo

Gradio demo for apple/DepthPro2 (code): metric depth for every pixel from a single photo or a whole video, sharp at object edges and steady from frame to frame. Uses the DepthPro2-H weights (872M parameters) with the focal length taken from the photo's EXIF when present.

The app follows the model card's quick start: weights created with create_model_and_transforms(..., precision=torch.bfloat16), model.infer(...) for images and model.infer_video(...) over frames decoded with PyAV. The focal length comes from the photo's EXIF when present, otherwise the bundled focal estimator estimates it. The app is written for ZeroGPU (@spaces.GPU-decorated functions, weights moved to CUDA inside the call); on plain CPU hardware it still runs, just slowly.