KeighBee HF staff commited on
Commit
bdad0b1
·
1 Parent(s): 1ab7a2f

added model and updated readme

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .DS_Store
DepthProNormalizedInverseDepthPruned10QuantizedLinear.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f440771caf0ed7f6d6fed0e70175daec4e7497ca043c5690571c51572a770237
3
+ size 928152
DepthProNormalizedInverseDepthPruned10QuantizedLinear.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:a3623851f51cb4c74098586509eafe46e0a016b6b56c034e5207bbaf7703494d
3
+ size 744074880
DepthProNormalizedInverseDepthPruned10QuantizedLinear.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "BC32E3B0-E1A4-4669-8E5E-1CB071C5D228": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "C1F003FB-AF34-4652-AC32-571859E7D861": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "BC32E3B0-E1A4-4669-8E5E-1CB071C5D228"
18
+ }
README.md CHANGED
@@ -1,3 +1,59 @@
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 [DepthProNormalizedInverseDepthPruned10QuantizedLinear.mlpackage](DepthProNormalizedInverseDepthPruned10QuantizedLinear.mlpackage)(745 MB).
11
+
12
+ `Normaized Inverse Depth` means that the model will output values between $[0,1]$ where 1 is the closest pixel to the camera, and 0 is the furthest pixel from the camera.
13
+
14
+ This model was first pruned to 10% sparsity, then the weights were linearly quantized.
15
+
16
+ # DepthPro CoreML Models
17
+
18
+ DepthPro is a monocular depth estimation model. This means that it is trained to predict depth on a single image.
19
+
20
+ [DepthPro paper](https://arxiv.org/pdf/2410.02073)
21
+
22
+ [DepthPro original repo](https://huggingface.co/apple/DepthPro)
23
+
24
+ # Model Inputs and Outputs
25
+
26
+ ### Inputs
27
+
28
+ - `image`: $1536 \times 1536$ 3 color image ($[1 \times 3 \times 1536 \times 1536]$ ImageType).
29
+
30
+ ### Outputs
31
+
32
+ - `normalizedInverseDepth` 1536x1536 monochrome image ($[1 \times 1 \times 1536 \times 1536]$ ImageType).
33
+
34
+ # Download
35
+
36
+ Install `huggingface-cli`
37
+
38
+ ```bash
39
+ brew install huggingface-cli
40
+ ```
41
+
42
+ To download:
43
+
44
+ ```bash
45
+ huggingface-cli download \
46
+ --local-dir models --local-dir-use-symlinks False \
47
+ coreml-projects/DepthPro-coreml-normalized-inverse-depth-pruned-10-quantized-linear \
48
+ --include "DepthProNormalizedInverseDepthPruned10QuantizedLinear.mlpackage/*""
49
+ ```
50
+
51
+ To download everything, skip the `--include` argument.
52
+
53
+ # Conversion Tutorial
54
+
55
+ 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 `DepthProNormalizedInverseDepthPruned10QuantizedLinear.mlpackage` and other models.
56
+
57
+ # Swift Integration
58
+
59
+ The [`huggingface/coreml-examples`](https://github.com/huggingface/coreml-examples/blob/main/DepthProSample/README.md) repository contains sample Swift code for `DepthProNormalizedInverseDepthPruned10QuantizedLinear.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.