Skip to main content
Back

Apple Releases Depth Pro 2 to Measure Real-World Distances From Any Camera

Apple's new monocular depth model predicts metric depth in meters for photos, videos, and live camera feeds at full input resolution.

Pro

  • Apple released Depth Pro 2, metric monocular depth for photos, video, and live feeds.
  • Output is depth in meters at full input resolution with sharp edges.
  • Four model sizes from 24M (97 MB) to 872M parameters (3.5 GB H+).
  • Multi-view transformer alternates within-frame and across-frame attention for temporal consistency.
  • Ships with Core ML export and a Mac demo app for Apple silicon.
  • Weights are research-only; runs on CUDA, MPS, or CPU via a uv-based CLI.

Apple’s machine learning research group has released Depth Pro 2, a monocular model that estimates scene depth from a single RGB camera. The same architecture handles photographs, prerecorded video, and live camera feeds at the input’s full resolution, preserving object boundaries while reducing frame-to-frame flicker.

Depth Pro 2 assigns each pixel an estimated distance in meters when given or able to estimate the camera’s focal length. Metric output can remove a separate scale-calibration stage from 3D reconstruction, augmented reality, robotics, and visual-effects pipelines. Relative-depth systems generally require additional processing before their predictions correspond to real-world distances.

Four sizes, three compute back ends

Apple published inference code, Hugging Face weights, pre-exported Core ML models, and a minimal Mac camera demo. The release omits training and evaluation code.

Model Parameters Checkpoint size Suggested use
S 24 million 97 MB Laptops and constrained hardware
B 97 million 386 MB Midrange deployments
L 334 million 1.3 GB Higher-capacity inference
H+ 872 million 3.5 GB Default checkpoint

All four variants share a field-of-view estimator. Inference supports CUDA on NVIDIA GPUs, Metal Performance Shaders on Apple silicon, and a CPU fallback. Checkpoint size reflects stored weights rather than peak RAM or VRAM use.

  • Core ML: Pre-exported variants support native Apple-platform integration.
  • Camera demo: The repository includes a minimal Mac application for live input.
  • Weights license: Use is restricted to non-commercial research and academic work.

Attention crosses frame boundaries

Depth Pro 2 uses a multi-view transformer to encode one or more frames jointly. After the first third of its transformer blocks, the network alternates attention within each frame with attention across frames. This design lets nearby frames contribute temporal context before the model predicts depth.

A DPT dense-prediction decoder collects tokens from several transformer blocks and reshapes them into feature maps spanning one thirty-second to one quarter of the input resolution. It then produces an inverse-depth map for each frame. Inverse depth gives larger values to nearby surfaces, while the public API returns conventional depth estimates.

Buffered clips and live streams

Video inference provides two modes with different latency and context behavior:

Mode Frame context Behavior
Buffered 16-frame clips with a 4-frame overlap Processes overlapping clips to maintain stable depth at clip boundaries. Each new clip advances by 12 frames.
Unbuffered Current frame plus the previous 15 frames Produces a prediction as each frame arrives, making it suitable for camera feeds.

Unbuffered mode removes the need to wait for future frames, although throughput still depends on checkpoint size, input resolution, and hardware.

Benchmarks focus on edges and flicker

Apple reports on its benchmark page that Depth Pro 2 outperforms earlier single-frame and multi-frame methods on Boundary F1 and Jitter, averaged across the Sintel and Spring datasets. Boundary F1 measures how closely depth discontinuities follow object edges. Jitter measures unwanted variation between adjacent frames.

The joint attention mechanism provides a plausible source of the reported gains because each prediction incorporates spatial detail and neighboring-frame evidence. Independent reproduction requires additional evaluation infrastructure because the release contains inference code but no evaluation suite.

Run it from the CLI or Python

The repository exposes image and video prediction through a uv-managed command-line interface:

uv run depth-pro-2 predict -i assets/example.jpg -o out/
uv run depth-pro-2 predict -i assets/example.mp4 -o out/

The Python API loads an image and its focal-length metadata, applies the model transform, and returns the depth array:

from depth_pro_2 import create_model_and_transforms, load_rgb

model, transform = create_model_and_transforms("depthpro2-h")
image, f_px = load_rgb("assets/example.jpg")
depth = model.infer(transform(image), f_px=f_px)["depth"]

Focal length controls every meter

Metric scale depends directly on focal length. Photos often store a 35 mm equivalent focal length in EXIF metadata. When that value is unavailable, Depth Pro 2 estimates the field of view and derives the required focal length.

Video receives one focal-length value for all frames, calculated as the median estimate from the first temporal window. A changing zoom or incorrect calibration can therefore bias the entire sequence. A focal length that is 10% too long places predicted surfaces approximately 10% too far away.

Sky, memory, and resolution

  • Sky depth: Sky pixels may produce infinite depth or finite values of several kilometers, particularly with smaller checkpoints. Point-cloud pipelines should mask or clamp those pixels.
  • Memory use: Peak memory grows with frame dimensions and temporal-window length. Longer videos mainly increase processing time. Reducing the window is the first option when inference exceeds available memory, followed by selecting a smaller checkpoint.
  • Input scaling: Downsampling can soften boundaries and shift metric scale. Full-resolution inference provides the intended edge quality.
  • Calibration errors: Missing, stale, or incorrect EXIF data can introduce a consistent scale error without producing an explicit failure.

Pipeline fit and license boundary

Depth Pro 2 targets applications that need dense geometry from a single camera. Structure-from-motion pipelines depend on camera movement and sufficient image texture, while relative-depth models such as Depth Anything need an additional scale-estimation stage for measurements in meters.

Workflow Relevant capability
Visual effects Stable video depth and 16-bit PNG output for tools including Nuke and Blender
Augmented reality Metric scene geometry from a single RGB camera
Robotics research Dense distance estimates when calibrated depth sensors are unavailable
3D reconstruction Per-frame depth for point clouds, geometry initialization, and novel-view synthesis

The weights license limits the current release to non-commercial research and academic use. Commercial production deployments fall outside those terms, while researchers can use the model as an inference baseline or as a preprocessing component in permitted projects.