Depth Estimation
Core ML
Depth Pro
visionos
apple-silicon
amlr
computer-vision
512x512
ane-optimized
import depth_pro
# Load model and preprocessing transform
model, transform = depth_pro.create_model_and_transforms()
model.eval()
# Load and preprocess an image.
image, _, f_px = depth_pro.load_rgb("example.png")
image = transform(image)
# Run inference.
prediction = model.infer(image, f_px=f_px)
# Results: 1. Depth in meters
depth = prediction["depth"]
# Results: 2. Focal length in pixels
focallength_px = prediction["focallength_px"]DepthPro CoreML (512x512 Real-Time)
This repository contains the Fast (512x512) version of the DepthPro model, specifically optimized for the Apple Neural Engine (ANE).
DepthPro is a state-of-the-art monocular depth estimation model. This 512px version is designed for Real-Time Previews and high-speed video conversion on Apple Vision Pro and Apple Silicon Macs.
π Key Features
- ANE Accelerated: Leveraging the Apple Neural Engine for ultra-low power and high-speed inference.
- Real-Time Performance: Ideal for interactive parameter tuning (Max Disparity, Convergence Plane).
- VisionOS Ready: Fully compatible with Apple Vision Pro via the
DepthProPipeline.
π Performance & Requirements
| Metric | Specification |
|---|---|
| Input Resolution | 512 x 512 pixels |
| Compute Units | All (Optimized for ANE) |
| Average Latency | < 1.0s per frame (on M2/M3 chips) |
| Target Use Case | Real-time 3D Preview / Quick Video Conversion |
This model is the best choice for the initial phase of your 3D conversion workflow, allowing for near-instant feedback while adjusting 3D rendering parameters.
π¦ Repository Contents
The repository contains the following core components:
DepthPro_transform.mlpackage: Image preprocessing.DepthPro_encoder.mlpackage: Feature extraction (ANE Optimized).DepthPro_decoder.mlpackage: Multiresolution fusion.DepthPro_depth.mlpackage: Final depth output.
π Usage with Swift Transformers
You can download and cache this model dynamically using swift-transformers:
let hub = Hub()
let modelDir = try await hub.snapshot(repoId: "aarondevstack/DepthPro-512x512-coreml")
// Load models from the downloaded directory
- Downloads last month
- 195
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support
# Download checkpoint pip install huggingface-hub huggingface-cli download --local-dir checkpoints aarondevstack/DepthPro-512x512-coreml