Instructions to use nativ-community/DepthPro2-S with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nativ-community/DepthPro2-S with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download nativ-community/DepthPro2-S --local-dir DepthPro2-S
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 1,543 Bytes
afe5619 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
license: other
license_name: apple-amlr
license_link: LICENSE
base_model:
- apple/DepthPro2-S
- apple/DepthPro2-focal
library_name: mlx-vlm
pipeline_tag: depth-estimation
tags:
- mlx
- metric-depth
- monocular-depth
- video-depth
---
# DepthPro2-S
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
```sh
pip install mlx-vlm
```
```python
from mlx_vlm import load
from mlx_vlm.models.depth_pro_2.generate import DepthPro2Predictor, read_image
model, processor = load("nativ-community/DepthPro2-S")
predictor = DepthPro2Predictor(model, processor)
result = predictor.infer(read_image("photo.jpg"))
depth_m = result["depth"]
focal_px = result["focallength_px"]
```
See the [model documentation](https://github.com/Neywa-Labs/mlx-vlm/blob/main/mlx_vlm/models/depth_pro_2/README.md)
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](LICENSE).
See the [original model family](https://huggingface.co/apple/DepthPro2) for
architecture, evaluation, and citation information.
|