How to use from the
Use from the
MLX library
# Download the model from the Hub
pip install huggingface_hub[hf_xet]

hf download nativ-community/DepthPro2-L --local-dir DepthPro2-L

DepthPro2-L

This MLX derivative of Apple's Depth Pro 2 estimates metric depth from photos, video, and live RGB frames. It includes the shared focal-length estimator. The conversion repacks the convolution kernels for MLX and preserves Apple's float32 weights. It adds an MLX model configuration and bundles the focal estimator with the depth model.

Usage

pip install mlx-vlm
from mlx_vlm import load
from mlx_vlm.models.depth_pro_2.generate import DepthPro2Predictor, read_image

model, processor = load("nativ-community/DepthPro2-L")
predictor = DepthPro2Predictor(model, processor)
result = predictor.infer(read_image("photo.jpg"))
depth_m = result["depth"]
focal_px = result["focallength_px"]

See the model documentation for video and live streams.

License

Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.

The weights and this MLX derivative are for non-commercial scientific research and academic development. The full agreement is included in LICENSE. See the original model family for architecture, evaluation, and citation information.

Downloads last month
-
Safetensors
Model size
0.4B params
Tensor type
F32
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for nativ-community/DepthPro2-L

Finetuned
(1)
this model