added model to repo and updated readme
Browse files
DepthPro.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:926dd96539fba643ea4cdbbea4f963a632d55da3a176a618586c6cd68a9d24c5
|
3 |
+
size 958432
|
DepthPro.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8de676bd5dbc417085aa69f0e6264ab636d78c2af4015564c88ee4d14452447e
|
3 |
+
size 1901556288
|
DepthPro.mlpackage/Manifest.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"fileFormatVersion": "1.0.0",
|
3 |
+
"itemInfoEntries": {
|
4 |
+
"AC1EC00F-4FDB-4C21-AC73-24E898C5A404": {
|
5 |
+
"author": "com.apple.CoreML",
|
6 |
+
"description": "CoreML Model Specification",
|
7 |
+
"name": "model.mlmodel",
|
8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
9 |
+
},
|
10 |
+
"FDFAD834-C7CC-4D46-B59F-CDBB05817123": {
|
11 |
+
"author": "com.apple.CoreML",
|
12 |
+
"description": "CoreML Model Weights",
|
13 |
+
"name": "weights",
|
14 |
+
"path": "com.apple.CoreML/weights"
|
15 |
+
}
|
16 |
+
},
|
17 |
+
"rootModelIdentifier": "AC1EC00F-4FDB-4C21-AC73-24E898C5A404"
|
18 |
+
}
|
README.md
CHANGED
@@ -1,3 +1,56 @@
|
|
1 |
---
|
|
|
|
|
|
|
2 |
license: apple-ascl
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
tags:
|
3 |
+
- depth-estimation
|
4 |
+
library_name: coreml
|
5 |
license: apple-ascl
|
6 |
+
base_model:
|
7 |
+
- apple/DepthPro
|
8 |
---
|
9 |
+
|
10 |
+
This repo contains [DepthPro.mlpackage](DepthPro.mlpackage)(1900 MB).
|
11 |
+
|
12 |
+
# DepthPro CoreML Models
|
13 |
+
|
14 |
+
DepthPro is a monocular depth estimation model. This means that it is trained to predict depth on a single image.
|
15 |
+
|
16 |
+
[DepthPro paper](https://arxiv.org/pdf/2410.02073)
|
17 |
+
|
18 |
+
[DepthPro original repo](https://huggingface.co/apple/DepthPro)
|
19 |
+
|
20 |
+
# Model Inputs and Outputs
|
21 |
+
|
22 |
+
### Inputs
|
23 |
+
|
24 |
+
- `image`: $1536 \times 1536$ 3 color image ($[1 \times 3 \times 1536 \times 1536]$ ImageType).
|
25 |
+
- `originalWidth`: A scalar containing the original width of the image before resizing ($[1 \times 1 \times 1 \times 1]$ TensorType).
|
26 |
+
|
27 |
+
### Outputs
|
28 |
+
|
29 |
+
- `depthMeters`: $1536 \times 1536$ 1 channel tensor containing depth in meters ($[1 \times 1 \times 1536 \times 1536]$ Tensor).
|
30 |
+
|
31 |
+
# Download
|
32 |
+
|
33 |
+
Install `huggingface-cli`
|
34 |
+
|
35 |
+
```bash
|
36 |
+
brew install huggingface-cli
|
37 |
+
```
|
38 |
+
|
39 |
+
To download:
|
40 |
+
|
41 |
+
```bash
|
42 |
+
huggingface-cli download \
|
43 |
+
--local-dir models --local-dir-use-symlinks False \
|
44 |
+
coreml-projects/DepthPro-coreml \
|
45 |
+
--include "DepthPro.mlpackage/*""
|
46 |
+
```
|
47 |
+
|
48 |
+
To download everything, skip the `--include` argument.
|
49 |
+
|
50 |
+
# Conversion Tutorial
|
51 |
+
|
52 |
+
The [`huggingface/coreml-examples`](https://github.com/huggingface/coreml-examples/blob/main/tutorials/DepthPro/depth_pro_coreml_guide.ipynb) repository contains sample conversion code for `DepthPro.mlpackage` and other models.
|
53 |
+
|
54 |
+
# Swift Integration
|
55 |
+
|
56 |
+
The [`huggingface/coreml-examples`](https://github.com/huggingface/coreml-examples/blob/main/DepthProSample/README.md) repository contains sample Swift code for `DepthPro.mlpackage` and other models. See [the instructions there](https://github.com/huggingface/coreml-examples/tree/main/DepthProSample) to build the demo app, which shows how to use the model in your own Swift apps.
|