qaihm-bot commited on
Commit
aac0a3d
·
verified ·
1 Parent(s): b5d8f55

See https://github.com/quic/ai-hub-models/releases/v0.45.0 for changelog.

.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Depth-Anything-V3_float.dlc filter=lfs diff=lfs merge=lfs -text
Depth-Anything-V3_float.dlc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8337ec0558863c3e6803c98113c26bd218896dea614a2ef6a760678803f0e95
3
+ size 142418988
Depth-Anything-V3_float.onnx.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9bc66535365621def3a085cbd03582747270e6387e0d83fc9848e3018dda06dd
3
+ size 93593873
Depth-Anything-V3_float.tflite ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c3ce28f2fd23ab3f6c19a67b4d92eddc1e38722e9cc378dc7c7845ac2e5e32b
3
+ size 143671568
LICENSE ADDED
@@ -0,0 +1 @@
 
 
1
+ The license of the original trained model can be found at https://github.com/ByteDance-Seed/Depth-Anything-3/blob/main/LICENSE.
README.md ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ license: other
4
+ tags:
5
+ - android
6
+ pipeline_tag: depth-estimation
7
+
8
+ ---
9
+
10
+ ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/depth_anything_v3/web-assets/model_demo.png)
11
+
12
+ # Depth-Anything-V3: Optimized for Mobile Deployment
13
+ ## Deep Convolutional Neural Network model for depth estimation
14
+
15
+
16
+ Depth Anything 3 (DA3), a model that predicts spatially consistent geometry from arbitrary visual inputs, with or without known camera poses.
17
+
18
+ This model is an implementation of Depth-Anything-V3 found [here](https://github.com/ByteDance-Seed/Depth-Anything-3).
19
+
20
+
21
+ This repository provides scripts to run Depth-Anything-V3 on Qualcomm® devices.
22
+ More details on model performance across various devices, can be found
23
+ [here](https://aihub.qualcomm.com/models/depth_anything_v3).
24
+
25
+
26
+
27
+ ### Model Details
28
+
29
+ - **Model Type:** Model_use_case.depth_estimation
30
+ - **Model Stats:**
31
+ - Model checkpoint: da3-small
32
+ - Input resolution: 518x518
33
+ - Number of parameters: 24.7M
34
+ - Model size (float): 94.3 MB
35
+
36
+ | Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
37
+ |---|---|---|---|---|---|---|---|---|
38
+ | Depth-Anything-V3 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 165.567 ms | 0 - 467 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
39
+ | Depth-Anything-V3 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 176.427 ms | 0 - 506 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
40
+ | Depth-Anything-V3 | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 111.872 ms | 1 - 631 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
41
+ | Depth-Anything-V3 | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 127.54 ms | 3 - 666 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
42
+ | Depth-Anything-V3 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 67.649 ms | 0 - 11 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
43
+ | Depth-Anything-V3 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 74.638 ms | 3 - 575 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
44
+ | Depth-Anything-V3 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 89.491 ms | 0 - 96 MB | NPU | [Depth-Anything-V3.onnx.zip](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.onnx.zip) |
45
+ | Depth-Anything-V3 | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 74.651 ms | 1 - 469 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
46
+ | Depth-Anything-V3 | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 81.311 ms | 2 - 509 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
47
+ | Depth-Anything-V3 | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 165.567 ms | 0 - 467 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
48
+ | Depth-Anything-V3 | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 176.427 ms | 0 - 506 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
49
+ | Depth-Anything-V3 | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 112.338 ms | 1 - 460 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
50
+ | Depth-Anything-V3 | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 125.264 ms | 1 - 462 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
51
+ | Depth-Anything-V3 | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 74.651 ms | 1 - 469 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
52
+ | Depth-Anything-V3 | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 81.311 ms | 2 - 509 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
53
+ | Depth-Anything-V3 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 48.524 ms | 1 - 618 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
54
+ | Depth-Anything-V3 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 54.208 ms | 3 - 689 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
55
+ | Depth-Anything-V3 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 69.342 ms | 0 - 861 MB | NPU | [Depth-Anything-V3.onnx.zip](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.onnx.zip) |
56
+ | Depth-Anything-V3 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 38.044 ms | 0 - 477 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
57
+ | Depth-Anything-V3 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 39.381 ms | 0 - 510 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
58
+ | Depth-Anything-V3 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 51.232 ms | 2 - 698 MB | NPU | [Depth-Anything-V3.onnx.zip](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.onnx.zip) |
59
+ | Depth-Anything-V3 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 26.915 ms | 1 - 517 MB | NPU | [Depth-Anything-V3.tflite](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.tflite) |
60
+ | Depth-Anything-V3 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 31.607 ms | 3 - 532 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
61
+ | Depth-Anything-V3 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 45.786 ms | 1 - 686 MB | NPU | [Depth-Anything-V3.onnx.zip](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.onnx.zip) |
62
+ | Depth-Anything-V3 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 76.926 ms | 3 - 3 MB | NPU | [Depth-Anything-V3.dlc](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.dlc) |
63
+ | Depth-Anything-V3 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 81.022 ms | 83 - 83 MB | NPU | [Depth-Anything-V3.onnx.zip](https://huggingface.co/qualcomm/Depth-Anything-V3/blob/main/Depth-Anything-V3.onnx.zip) |
64
+
65
+
66
+
67
+
68
+ ## Installation
69
+
70
+
71
+ Install the package via pip:
72
+ ```bash
73
+ # NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
74
+ pip install "qai-hub-models[depth-anything-v3]"
75
+ ```
76
+
77
+
78
+ ## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted device
79
+
80
+ Sign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with your
81
+ Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
82
+
83
+ With this API token, you can configure your client to run models on the cloud
84
+ hosted devices.
85
+ ```bash
86
+ qai-hub configure --api_token API_TOKEN
87
+ ```
88
+ Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.
89
+
90
+
91
+
92
+ ## Demo off target
93
+
94
+ The package contains a simple end-to-end demo that downloads pre-trained
95
+ weights and runs this model on a sample input.
96
+
97
+ ```bash
98
+ python -m qai_hub_models.models.depth_anything_v3.demo
99
+ ```
100
+
101
+ The above demo runs a reference implementation of pre-processing, model
102
+ inference, and post processing.
103
+
104
+ **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
105
+ environment, please add the following to your cell (instead of the above).
106
+ ```
107
+ %run -m qai_hub_models.models.depth_anything_v3.demo
108
+ ```
109
+
110
+
111
+ ### Run model on a cloud-hosted device
112
+
113
+ In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
114
+ device. This script does the following:
115
+ * Performance check on-device on a cloud-hosted device
116
+ * Downloads compiled assets that can be deployed on-device for Android.
117
+ * Accuracy check between PyTorch and on-device outputs.
118
+
119
+ ```bash
120
+ python -m qai_hub_models.models.depth_anything_v3.export
121
+ ```
122
+
123
+
124
+
125
+ ## How does this work?
126
+
127
+ This [export script](https://aihub.qualcomm.com/models/depth_anything_v3/qai_hub_models/models/Depth-Anything-V3/export.py)
128
+ leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
129
+ on-device. Lets go through each step below in detail:
130
+
131
+ Step 1: **Compile model for on-device deployment**
132
+
133
+ To compile a PyTorch model for on-device deployment, we first trace the model
134
+ in memory using the `jit.trace` and then call the `submit_compile_job` API.
135
+
136
+ ```python
137
+ import torch
138
+
139
+ import qai_hub as hub
140
+ from qai_hub_models.models.depth_anything_v3 import Model
141
+
142
+ # Load the model
143
+ torch_model = Model.from_pretrained()
144
+
145
+ # Device
146
+ device = hub.Device("Samsung Galaxy S25")
147
+
148
+ # Trace model
149
+ input_shape = torch_model.get_input_spec()
150
+ sample_inputs = torch_model.sample_inputs()
151
+
152
+ pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
153
+
154
+ # Compile model on a specific device
155
+ compile_job = hub.submit_compile_job(
156
+ model=pt_model,
157
+ device=device,
158
+ input_specs=torch_model.get_input_spec(),
159
+ )
160
+
161
+ # Get target model to run on-device
162
+ target_model = compile_job.get_target_model()
163
+
164
+ ```
165
+
166
+
167
+ Step 2: **Performance profiling on cloud-hosted device**
168
+
169
+ After compiling models from step 1. Models can be profiled model on-device using the
170
+ `target_model`. Note that this scripts runs the model on a device automatically
171
+ provisioned in the cloud. Once the job is submitted, you can navigate to a
172
+ provided job URL to view a variety of on-device performance metrics.
173
+ ```python
174
+ profile_job = hub.submit_profile_job(
175
+ model=target_model,
176
+ device=device,
177
+ )
178
+
179
+ ```
180
+
181
+ Step 3: **Verify on-device accuracy**
182
+
183
+ To verify the accuracy of the model on-device, you can run on-device inference
184
+ on sample input data on the same cloud hosted device.
185
+ ```python
186
+ input_data = torch_model.sample_inputs()
187
+ inference_job = hub.submit_inference_job(
188
+ model=target_model,
189
+ device=device,
190
+ inputs=input_data,
191
+ )
192
+ on_device_output = inference_job.download_output_data()
193
+
194
+ ```
195
+ With the output of the model, you can compute like PSNR, relative errors or
196
+ spot check the output with expected output.
197
+
198
+ **Note**: This on-device profiling and inference requires access to Qualcomm®
199
+ AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).
200
+
201
+
202
+
203
+ ## Run demo on a cloud-hosted device
204
+
205
+ You can also run the demo on-device.
206
+
207
+ ```bash
208
+ python -m qai_hub_models.models.depth_anything_v3.demo --eval-mode on-device
209
+ ```
210
+
211
+ **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
212
+ environment, please add the following to your cell (instead of the above).
213
+ ```
214
+ %run -m qai_hub_models.models.depth_anything_v3.demo -- --eval-mode on-device
215
+ ```
216
+
217
+
218
+ ## Deploying compiled model to Android
219
+
220
+
221
+ The models can be deployed using multiple runtimes:
222
+ - TensorFlow Lite (`.tflite` export): [This
223
+ tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
224
+ guide to deploy the .tflite model in an Android application.
225
+
226
+
227
+ - QNN (`.so` export ): This [sample
228
+ app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
229
+ provides instructions on how to use the `.so` shared library in an Android application.
230
+
231
+
232
+ ## View on Qualcomm® AI Hub
233
+ Get more details on Depth-Anything-V3's performance across various devices [here](https://aihub.qualcomm.com/models/depth_anything_v3).
234
+ Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
235
+
236
+
237
+ ## License
238
+ * The license for the original implementation of Depth-Anything-V3 can be found
239
+ [here](https://github.com/ByteDance-Seed/Depth-Anything-3/blob/main/LICENSE).
240
+
241
+
242
+
243
+ ## References
244
+ * [Depth Anything 3: Recovering the visual space from any views](https://arxiv.org/abs/2511.10647)
245
+ * [Source Model Implementation](https://github.com/ByteDance-Seed/Depth-Anything-3)
246
+
247
+
248
+
249
+ ## Community
250
+ * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
251
+ * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
252
+
253
+
tool-versions.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ tool_versions:
2
+ onnx:
3
+ qairt: 2.37.1.250807093845_124904
4
+ onnx_runtime: 1.23.0