KeighBee HF staff commited on
Commit
0b779b4
·
1 Parent(s): 8269962

added model and updated readme

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .DS_Store
DepthProNormalizedInverseDepth.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:794639528f72e24d41d07298c45adb9768700d356db323a5387b9fb8a1f24ef3
3
+ size 740951
DepthProNormalizedInverseDepth.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:93de544fafed202ba499c56a993287de7d348f1db020a414cd8ad10ffeb46390
3
+ size 1293014720
DepthProNormalizedInverseDepth.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "D68C7C3D-B3E5-40E0-989F-39606AADAF9F": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "F3E2A258-D9AC-4E97-806F-4AF906F5220D": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "D68C7C3D-B3E5-40E0-989F-39606AADAF9F"
18
+ }
README.md CHANGED
@@ -1,3 +1,57 @@
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 [DepthProNormalizedInverseDepth.mlpackage](DepthProNormalizedInverseDepth.mlpackage)(1290 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
+ # 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
+
28
+ ### Outputs
29
+
30
+ - `normalizedInverseDepth` 1536x1536 monochrome image ($[1 \times 1 \times 1536 \times 1536]$ ImageType).
31
+
32
+ # Download
33
+
34
+ Install `huggingface-cli`
35
+
36
+ ```bash
37
+ brew install huggingface-cli
38
+ ```
39
+
40
+ To download:
41
+
42
+ ```bash
43
+ huggingface-cli download \
44
+ --local-dir models --local-dir-use-symlinks False \
45
+ coreml-projects/DepthPro-coreml-normalized-inverse-depth \
46
+ --include "DepthProNormalizedInverseDepth.mlpackage/*""
47
+ ```
48
+
49
+ To download everything, skip the `--include` argument.
50
+
51
+ # Conversion Tutorial
52
+
53
+ 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 `DepthProNormalizedInverseDepth.mlpackage` and other models.
54
+
55
+ # Swift Integration
56
+
57
+ The [`huggingface/coreml-examples`](https://github.com/huggingface/coreml-examples/blob/main/DepthProSample/README.md) repository contains sample Swift code for `DepthProNormalizedInverseDepth.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.