added model and updated readme
Browse files
DepthProPruned10QuantizedLinear.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6b6178bd9b6ac54e40f4e76c0b77320324355d4f69fca91d960e970d1cb6a57
|
3 |
+
size 1220224
|
DepthProPruned10QuantizedLinear.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:30e4ab1cdc4c17ea6805f3ec52977ee550ac0454661c1ca3a6a87fd3376b6ab9
|
3 |
+
size 1094320064
|
DepthProPruned10QuantizedLinear.mlpackage/Manifest.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"fileFormatVersion": "1.0.0",
|
3 |
+
"itemInfoEntries": {
|
4 |
+
"17D82457-95B2-4E3E-81D9-379C2AA8B762": {
|
5 |
+
"author": "com.apple.CoreML",
|
6 |
+
"description": "CoreML Model Weights",
|
7 |
+
"name": "weights",
|
8 |
+
"path": "com.apple.CoreML/weights"
|
9 |
+
},
|
10 |
+
"529C5CB4-3317-465F-B349-B34986B1F777": {
|
11 |
+
"author": "com.apple.CoreML",
|
12 |
+
"description": "CoreML Model Specification",
|
13 |
+
"name": "model.mlmodel",
|
14 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
15 |
+
}
|
16 |
+
},
|
17 |
+
"rootModelIdentifier": "529C5CB4-3317-465F-B349-B34986B1F777"
|
18 |
+
}
|
README.md
CHANGED
@@ -1,3 +1,58 @@
|
|
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 [DepthProPruned10QuantizedLinear.mlpackage](DepthProPruned10QuantizedLinear.mlpackage)(1100 MB).
|
11 |
+
|
12 |
+
This model was first pruned to 10% sparsity, then the weights were linearly quantized.
|
13 |
+
|
14 |
+
# DepthPro CoreML Models
|
15 |
+
|
16 |
+
DepthPro is a monocular depth estimation model. This means that it is trained to predict depth on a single image.
|
17 |
+
|
18 |
+
[DepthPro paper](https://arxiv.org/pdf/2410.02073)
|
19 |
+
|
20 |
+
[DepthPro original repo](https://huggingface.co/apple/DepthPro)
|
21 |
+
|
22 |
+
# Model Inputs and Outputs
|
23 |
+
|
24 |
+
### Inputs
|
25 |
+
|
26 |
+
- `image`: $1536 \times 1536$ 3 color image ($[1 \times 3 \times 1536 \times 1536]$ ImageType).
|
27 |
+
- `originalWidth`: A scalar containing the original width of the image before resizing ($[1 \times 1 \times 1 \times 1]$ TensorType).
|
28 |
+
|
29 |
+
### Outputs
|
30 |
+
|
31 |
+
- `depthMeters`: $1536 \times 1536$ 1 channel tensor containing depth in meters ($[1 \times 1 \times 1536 \times 1536]$ Tensor).
|
32 |
+
|
33 |
+
# Download
|
34 |
+
|
35 |
+
Install `huggingface-cli`
|
36 |
+
|
37 |
+
```bash
|
38 |
+
brew install huggingface-cli
|
39 |
+
```
|
40 |
+
|
41 |
+
To download:
|
42 |
+
|
43 |
+
```bash
|
44 |
+
huggingface-cli download \
|
45 |
+
--local-dir models --local-dir-use-symlinks False \
|
46 |
+
coreml-projects/DepthPro-coreml-pruned-10-quantized-linear \
|
47 |
+
--include "DepthProPruned10QuantizedLinear.mlpackage/*""
|
48 |
+
```
|
49 |
+
|
50 |
+
To download everything, skip the `--include` argument.
|
51 |
+
|
52 |
+
# Conversion Tutorial
|
53 |
+
|
54 |
+
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 `DepthProPruned10QuantizedLinear.mlpackage` and other models.
|
55 |
+
|
56 |
+
# Swift Integration
|
57 |
+
|
58 |
+
The [`huggingface/coreml-examples`](https://github.com/huggingface/coreml-examples/blob/main/DepthProSample/README.md) repository contains sample Swift code for `DepthProPruned10QuantizedLinear.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.
|