Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: coreml
|
| 4 |
+
pipeline_tag: depth-estimation
|
| 5 |
+
base_model: depth-anything/DA3-SMALL
|
| 6 |
+
base_model_relation: quantized
|
| 7 |
+
tags:
|
| 8 |
+
- coreml
|
| 9 |
+
- core-ml
|
| 10 |
+
- ios
|
| 11 |
+
- macos
|
| 12 |
+
- apple
|
| 13 |
+
- on-device
|
| 14 |
+
- monocular-depth
|
| 15 |
+
- dinov2
|
| 16 |
+
- arxiv:2511.10647
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# Depth Anything 3 Small (504×504) — Core ML
|
| 20 |
+
|
| 21 |
+
*ByteDance-Seed, ICLR 2026 oral*
|
| 22 |
+
|
| 23 |
+
Relative monocular depth from a single image. DA3 Main Series, Small (0.08B params, DINOv2 ViT-S/14 + DualDPT head). First public Core ML conversion of Depth Anything 3.
|
| 24 |
+
|
| 25 |
+
Core ML conversion of [ByteDance-Seed/Depth-Anything-3](https://github.com/ByteDance-Seed/Depth-Anything-3) for on-device inference on iPhone, iPad and Mac. Converted with `coremltools`; the packages are stateless, so all sequencing and buffering lives in your Swift code.
|
| 26 |
+
|
| 27 |
+
| | |
|
| 28 |
+
|---|---|
|
| 29 |
+
| Task | depth estimation |
|
| 30 |
+
| Upstream | [ByteDance-Seed/Depth-Anything-3](https://github.com/ByteDance-Seed/Depth-Anything-3) |
|
| 31 |
+
| Packages | 1 |
|
| 32 |
+
| Download size | 44 MB |
|
| 33 |
+
| Minimum iOS | 17.0 |
|
| 34 |
+
| Peak RAM | ~300 MB |
|
| 35 |
+
|
| 36 |
+
## Files
|
| 37 |
+
|
| 38 |
+
| File | Size | Compute units | SHA-256 |
|
| 39 |
+
|---|---:|---|---|
|
| 40 |
+
| `DepthAnythingV3_small_504.mlpackage.zip` | 44 MB | `all` | `c10f8afa01fdc1d2…` |
|
| 41 |
+
| **Total** | **44 MB** | | |
|
| 42 |
+
|
| 43 |
+
`compute_units` is not a suggestion -- it is the configuration the conversion was verified against. Moving a package to a different compute unit can silently change the numerics (FP16 attention overflow) or crash on the GPU.
|
| 44 |
+
|
| 45 |
+
## Download
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
hf download mlboydaisuke/coreml-zoo --include "depth_anything_v3/*" --local-dir ./depth_anything_v3_small_504
|
| 49 |
+
unzip './depth_anything_v3_small_504/depth_anything_v3/*.zip' -d ./depth_anything_v3_small_504
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Use in Swift
|
| 53 |
+
|
| 54 |
+
```swift
|
| 55 |
+
import CoreML
|
| 56 |
+
|
| 57 |
+
let config = MLModelConfiguration()
|
| 58 |
+
config.computeUnits = .all // as converted — see the table above
|
| 59 |
+
|
| 60 |
+
// Unzip the .mlpackage, drop it into your Xcode target and Xcode compiles it
|
| 61 |
+
// at build time:
|
| 62 |
+
let model = try DepthAnythingV3_small_504(configuration: config)
|
| 63 |
+
|
| 64 |
+
// ...or compile a downloaded .mlpackage at runtime:
|
| 65 |
+
let compiled = try await MLModel.compileModel(at: mlpackageURL)
|
| 66 |
+
let model = try MLModel(contentsOf: compiled, configuration: config)
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Demo
|
| 70 |
+
|
| 71 |
+
- **Models Zoo** — this model is downloadable and runnable inside the [Models Zoo app](https://apps.apple.com/app/id6762083207) on the App Store, no build required.
|
| 72 |
+
|
| 73 |
+
## Conversion
|
| 74 |
+
|
| 75 |
+
- Script: [`convert_depth_anything_v3.py`](https://github.com/john-rocky/CoreML-Models/blob/master/conversion_scripts/convert_depth_anything_v3.py)
|
| 76 |
+
- Pitfalls hit during conversion (FP16 overflow, ANE buffer limits, stride handling): [`docs/coreml_conversion_notes.md`](https://github.com/john-rocky/CoreML-Models/blob/master/docs/coreml_conversion_notes.md)
|
| 77 |
+
- Model index: [CoreML-Models](https://github.com/john-rocky/CoreML-Models)
|
| 78 |
+
|
| 79 |
+
## License
|
| 80 |
+
|
| 81 |
+
The conversion inherits the upstream license: **Apache-2.0**.
|
| 82 |
+
|
| 83 |
+
## Credits
|
| 84 |
+
|
| 85 |
+
- Upstream authors: [ByteDance-Seed/Depth-Anything-3](https://github.com/ByteDance-Seed/Depth-Anything-3), 2025
|
| 86 |
+
- Core ML conversion: john-rocky (Daisuke Majima)
|