Downloads · 30 days
267
7% of all-time downloads
apple/coreml-depth-anything-small
coreml-depth-anything-small is a depth estimation model from apple. Use it for the depth estimation task on the model card, and read the license before you ship it in a product. It is set up for coreml. The card lists the license as apache-2.0.
Depth Anything model was introduced in the paper Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data by Lihe Yang et al. and first released in this repository.
Downloads · 30 days
267
7% of all-time downloads
All-time downloads
3.6K
Public
Repo size
2.3 GB
Likes
39
Public
Click a slice to open those files.
.bin286 MB · 99%
From the Hugging Face model README
Depth Anything model was introduced in the paper Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data by Lihe Yang et al. and first released in this repository.
Depth Anything leverages the DPT architecture with a DINOv2 backbone.
The model is trained on ~62 million images, obtaining state-of-the-art results for both relative and absolute depth estimation.
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/depth_anything_overview.jpg" alt="drawing" width="600"/>
<small> Depth Anything overview. Taken from the <a href="https://arxiv.org/abs/2401.10891">original paper</a>.</small>
| Variant | Parameters | Size (MB) | Weight precision | Act. precision | abs-rel error | abs-rel reference |
|---|---|---|---|---|---|---|
| small-original (PyTorch) | 24.8M | 99.2 | Float32 | Float32 | ||
| DepthAnythingSmallF32 | 24.8M | 99.0 | Float32 | Float32 | 0.0073 | small-original |
| DepthAnythingSmallF16 | 24.8M | 45.8 | Float16 | Float16 | 0.0077 | small-original |
The following results use the small-float16 variant.
| Device | OS | Inference time (ms) | Dominant compute unit |
|---|---|---|---|
| iPhone 12 Pro Max | 18.0 | 31.10 | Neural Engine |
| iPhone 15 Pro Max | 17.4 | 33.90 | Neural Engine |
| MacBook Pro (M1 Max) | 15.0 | 32.80 | Neural Engine |
| MacBook Pro (M3 Max) | 15.0 | 24.58 | Neural Engine |
Install huggingface-cli
brew install huggingface-cli
To download one of the .mlpackage folders to the models directory:
huggingface-cli download \
--local-dir models --local-dir-use-symlinks False \
apple/coreml-depth-anything-small \
--include "DepthAnythingSmallF16.mlpackage/*"
To download everything, skip the --include argument.
The huggingface/coreml-examples repository contains sample Swift code for coreml-depth-anything-small and other models. See the instructions there to build the demo app, which shows how to use the model in your own Swift apps.