Instructions to use apple/DepthPro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Depth Pro
How to use apple/DepthPro with Depth Pro:
# Download checkpoint pip install huggingface-hub huggingface-cli download --local-dir checkpoints apple/DepthPro
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"] - Notebooks
- Google Colab
- Kaggle
| { | |
| "bomFormat": "CycloneDX", | |
| "specVersion": "1.6", | |
| "serialNumber": "urn:uuid:bcb2a4df-4be3-48cd-b560-b0d9a503a494", | |
| "version": 1, | |
| "metadata": { | |
| "timestamp": "2025-06-05T09:39:05.492488+00:00", | |
| "component": { | |
| "type": "machine-learning-model", | |
| "bom-ref": "apple/DepthPro-015a7be4-637d-5ddd-babc-e928436824cb", | |
| "name": "apple/DepthPro", | |
| "externalReferences": [ | |
| { | |
| "url": "https://huggingface.co/apple/DepthPro", | |
| "type": "documentation" | |
| } | |
| ], | |
| "modelCard": { | |
| "modelParameters": { | |
| "task": "depth-estimation" | |
| }, | |
| "properties": [ | |
| { | |
| "name": "library_name", | |
| "value": "depth-pro" | |
| } | |
| ] | |
| }, | |
| "authors": [ | |
| { | |
| "name": "apple" | |
| } | |
| ], | |
| "licenses": [ | |
| { | |
| "license": { | |
| "name": "apple-amlr" | |
| } | |
| } | |
| ], | |
| "tags": [ | |
| "depth-pro", | |
| "depth-estimation", | |
| "arxiv:2410.02073", | |
| "license:apple-amlr", | |
| "region:us" | |
| ] | |
| } | |
| } | |
| } |