grabbou commited on
Commit
1e89f2e
·
verified ·
1 Parent(s): e4854fe

Add model card

Browse files
Files changed (1) hide show
  1. README.md +42 -0
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: depth-anything/da3-small
4
+ pipeline_tag: depth-estimation
5
+ library_name: coreai
6
+ tags:
7
+ - core-ai
8
+ - ios
9
+ - depth-estimation
10
+ ---
11
+
12
+ # Depth Anything 3 small for Core AI
13
+
14
+ [`depth-anything/da3-small`](https://huggingface.co/depth-anything/da3-small) (35M parameters) exported to Apple Core AI with the [`apple/coreai-models`](https://github.com/apple/coreai-models/tree/main/models/depth-anything) recipe:
15
+
16
+ ```sh
17
+ uv run models/depth-anything/export.py
18
+ ```
19
+
20
+ | Folder | Contents | Size | Platforms |
21
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- |
22
+ | `da3-small.aimodel` | `main(image)`: `image` is `[1, 2, 3, 224, 224]` float32, two views of RGB normalized with the ImageNet mean and std. Returns `depth` and `depth_conf` (`[1, 2, 224, 224]`), `extrinsics` and `intrinsics` per view | 101 MB | iOS, macOS |
23
+
24
+ Depth is relative: smaller values are nearer. For a single photo, pass it as both views.
25
+
26
+ ## Use
27
+
28
+ With [`@react-native-ai/core-ai`](https://github.com/callstackincubator/ai/tree/main/packages/core-ai), download `da3-small.aimodel` into app storage, then:
29
+
30
+ ```ts
31
+ const { output } = await CoreAI.runTask(
32
+ 'depth',
33
+ { id: 'da3-small', sourceType: 'file', sourceUri: pathToModel },
34
+ { imageUri },
35
+ {}
36
+ )
37
+ // output.image: base64 PNG, nearer is brighter. output.depth: the float32 map
38
+ ```
39
+
40
+ ## License
41
+
42
+ Depth Anything 3 small is Apache-2.0 ([repository](https://github.com/ByteDance-Seed/Depth-Anything-3)). This repository only converts it to Core AI format.