qaihm-bot commited on
Commit
cd8d87f
·
verified ·
1 Parent(s): 444dfe8

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

MNASNet05_float.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6efd4d37c97f3bb60f24dfa1c0bf240ca63477cbea7e8b0ac114f67ee698e6e5
3
- size 8960268
 
 
 
 
MNASNet05_float.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2df97f7e4eb51264b0c37a07ba7bdc9045708d4b3ac019ae130d050538fa8360
3
- size 8189909
 
 
 
 
MNASNet05_float.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c4c8e0b276aad5d19b8ce6e925278f4980e9afc3aafc001419f6c7c462db3f91
3
- size 8857036
 
 
 
 
MNASNet05_w8a16.dlc DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:5644ab3712963c907275139229e255206979a7636f8bbae05ff7acbeba689537
3
- size 2953076
 
 
 
 
MNASNet05_w8a16.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b7957feb575a2d3fd6cc65e7eb1ffa1948192620bc055797533ef33921a5354a
3
- size 4444072
 
 
 
 
README.md CHANGED
@@ -11,267 +11,117 @@ pipeline_tag: image-classification
11
 
12
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mnasnet05/web-assets/model_demo.png)
13
 
14
- # MNASNet05: Optimized for Mobile Deployment
15
- ## Imagenet classifier and general purpose backbone
16
-
17
 
18
  MNASNet05 is a machine learning model that can classify images from the Imagenet dataset. It can also be used as a backbone in building more complex models for specific use cases.
19
 
20
- This model is an implementation of MNASNet05 found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py).
21
-
22
-
23
- This repository provides scripts to run MNASNet05 on Qualcomm® devices.
24
- More details on model performance across various devices, can be found
25
- [here](https://aihub.qualcomm.com/models/mnasnet05).
26
-
27
-
28
-
29
- ### Model Details
30
-
31
- - **Model Type:** Model_use_case.image_classification
32
- - **Model Stats:**
33
- - Model checkpoint: Imagenet
34
- - Input resolution: 224x224
35
- - Number of parameters: 2.21M
36
- - Model size (float): 8.45 MB
37
- - Model size (w8a16): 2.79 MB
38
-
39
- | Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
40
- |---|---|---|---|---|---|---|---|---|
41
- | MNASNet05 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 2.283 ms | 0 - 123 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
42
- | MNASNet05 | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 2.221 ms | 1 - 122 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
43
- | MNASNet05 | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 1.422 ms | 0 - 146 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
44
- | MNASNet05 | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 1.422 ms | 1 - 152 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
45
- | MNASNet05 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 0.72 ms | 0 - 3 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
46
- | MNASNet05 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 0.723 ms | 1 - 3 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
47
- | MNASNet05 | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 0.667 ms | 0 - 8 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.onnx.zip) |
48
- | MNASNet05 | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 4.348 ms | 0 - 123 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
49
- | MNASNet05 | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 1.06 ms | 1 - 122 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
50
- | MNASNet05 | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 2.283 ms | 0 - 123 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
51
- | MNASNet05 | float | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 2.221 ms | 1 - 122 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
52
- | MNASNet05 | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 1.383 ms | 0 - 130 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
53
- | MNASNet05 | float | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 1.36 ms | 0 - 129 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
54
- | MNASNet05 | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 4.348 ms | 0 - 123 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
55
- | MNASNet05 | float | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 1.06 ms | 1 - 122 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
56
- | MNASNet05 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 0.484 ms | 0 - 145 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
57
- | MNASNet05 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.482 ms | 1 - 145 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
58
- | MNASNet05 | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 0.453 ms | 0 - 120 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.onnx.zip) |
59
- | MNASNet05 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 0.372 ms | 0 - 127 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
60
- | MNASNet05 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.367 ms | 1 - 128 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
61
- | MNASNet05 | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 0.364 ms | 0 - 100 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.onnx.zip) |
62
- | MNASNet05 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 0.289 ms | 0 - 124 MB | NPU | [MNASNet05.tflite](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.tflite) |
63
- | MNASNet05 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.293 ms | 1 - 125 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
64
- | MNASNet05 | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 0.423 ms | 0 - 99 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.onnx.zip) |
65
- | MNASNet05 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 0.876 ms | 1 - 1 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.dlc) |
66
- | MNASNet05 | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.595 ms | 5 - 5 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05.onnx.zip) |
67
- | MNASNet05 | w8a16 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | QNN_DLC | 3.079 ms | 0 - 125 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
68
- | MNASNet05 | w8a16 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | ONNX | 18.944 ms | 8 - 23 MB | CPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
69
- | MNASNet05 | w8a16 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | QNN_DLC | 2.28 ms | 0 - 2 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
70
- | MNASNet05 | w8a16 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | ONNX | 32.26 ms | 8 - 11 MB | CPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
71
- | MNASNet05 | w8a16 | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | QNN_DLC | 1.664 ms | 0 - 120 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
72
- | MNASNet05 | w8a16 | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | QNN_DLC | 0.958 ms | 0 - 139 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
73
- | MNASNet05 | w8a16 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | QNN_DLC | 0.777 ms | 0 - 3 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
74
- | MNASNet05 | w8a16 | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 0.705 ms | 0 - 5 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
75
- | MNASNet05 | w8a16 | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | QNN_DLC | 4.161 ms | 0 - 120 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
76
- | MNASNet05 | w8a16 | SA7255P ADP | Qualcomm® SA7255P | QNN_DLC | 1.664 ms | 0 - 120 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
77
- | MNASNet05 | w8a16 | SA8295P ADP | Qualcomm® SA8295P | QNN_DLC | 1.272 ms | 0 - 126 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
78
- | MNASNet05 | w8a16 | SA8775P ADP | Qualcomm® SA8775P | QNN_DLC | 4.161 ms | 0 - 120 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
79
- | MNASNet05 | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | QNN_DLC | 0.54 ms | 0 - 137 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
80
- | MNASNet05 | w8a16 | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 0.448 ms | 0 - 114 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
81
- | MNASNet05 | w8a16 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | QNN_DLC | 0.361 ms | 0 - 125 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
82
- | MNASNet05 | w8a16 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 0.352 ms | 0 - 99 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
83
- | MNASNet05 | w8a16 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | QNN_DLC | 0.794 ms | 0 - 124 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
84
- | MNASNet05 | w8a16 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | ONNX | 16.85 ms | 9 - 26 MB | CPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
85
- | MNASNet05 | w8a16 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | QNN_DLC | 0.3 ms | 0 - 123 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
86
- | MNASNet05 | w8a16 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 0.326 ms | 0 - 101 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
87
- | MNASNet05 | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN_DLC | 0.92 ms | 0 - 0 MB | NPU | [MNASNet05.dlc](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.dlc) |
88
- | MNASNet05 | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 0.641 ms | 2 - 2 MB | NPU | [MNASNet05.onnx.zip](https://huggingface.co/qualcomm/MNASNet05/blob/main/MNASNet05_w8a16.onnx.zip) |
89
-
90
-
91
-
92
-
93
- ## Installation
94
-
95
-
96
- Install the package via pip:
97
- ```bash
98
- pip install qai-hub-models
99
- ```
100
-
101
-
102
- ## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted device
103
-
104
- Sign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with your
105
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
106
-
107
- With this API token, you can configure your client to run models on the cloud
108
- hosted devices.
109
- ```bash
110
- qai-hub configure --api_token API_TOKEN
111
- ```
112
- Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.
113
-
114
-
115
-
116
- ## Demo off target
117
-
118
- The package contains a simple end-to-end demo that downloads pre-trained
119
- weights and runs this model on a sample input.
120
-
121
- ```bash
122
- python -m qai_hub_models.models.mnasnet05.demo
123
- ```
124
-
125
- The above demo runs a reference implementation of pre-processing, model
126
- inference, and post processing.
127
-
128
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
129
- environment, please add the following to your cell (instead of the above).
130
- ```
131
- %run -m qai_hub_models.models.mnasnet05.demo
132
- ```
133
-
134
-
135
- ### Run model on a cloud-hosted device
136
-
137
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
138
- device. This script does the following:
139
- * Performance check on-device on a cloud-hosted device
140
- * Downloads compiled assets that can be deployed on-device for Android.
141
- * Accuracy check between PyTorch and on-device outputs.
142
-
143
- ```bash
144
- python -m qai_hub_models.models.mnasnet05.export
145
- ```
146
-
147
-
148
-
149
- ## How does this work?
150
-
151
- This [export script](https://aihub.qualcomm.com/models/mnasnet05/qai_hub_models/models/MNASNet05/export.py)
152
- leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
153
- on-device. Lets go through each step below in detail:
154
-
155
- Step 1: **Compile model for on-device deployment**
156
-
157
- To compile a PyTorch model for on-device deployment, we first trace the model
158
- in memory using the `jit.trace` and then call the `submit_compile_job` API.
159
-
160
- ```python
161
- import torch
162
-
163
- import qai_hub as hub
164
- from qai_hub_models.models.mnasnet05 import Model
165
-
166
- # Load the model
167
- torch_model = Model.from_pretrained()
168
-
169
- # Device
170
- device = hub.Device("Samsung Galaxy S25")
171
-
172
- # Trace model
173
- input_shape = torch_model.get_input_spec()
174
- sample_inputs = torch_model.sample_inputs()
175
-
176
- pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
177
-
178
- # Compile model on a specific device
179
- compile_job = hub.submit_compile_job(
180
- model=pt_model,
181
- device=device,
182
- input_specs=torch_model.get_input_spec(),
183
- )
184
-
185
- # Get target model to run on-device
186
- target_model = compile_job.get_target_model()
187
-
188
- ```
189
-
190
-
191
- Step 2: **Performance profiling on cloud-hosted device**
192
-
193
- After compiling models from step 1. Models can be profiled model on-device using the
194
- `target_model`. Note that this scripts runs the model on a device automatically
195
- provisioned in the cloud. Once the job is submitted, you can navigate to a
196
- provided job URL to view a variety of on-device performance metrics.
197
- ```python
198
- profile_job = hub.submit_profile_job(
199
- model=target_model,
200
- device=device,
201
- )
202
-
203
- ```
204
-
205
- Step 3: **Verify on-device accuracy**
206
-
207
- To verify the accuracy of the model on-device, you can run on-device inference
208
- on sample input data on the same cloud hosted device.
209
- ```python
210
- input_data = torch_model.sample_inputs()
211
- inference_job = hub.submit_inference_job(
212
- model=target_model,
213
- device=device,
214
- inputs=input_data,
215
- )
216
- on_device_output = inference_job.download_output_data()
217
-
218
- ```
219
- With the output of the model, you can compute like PSNR, relative errors or
220
- spot check the output with expected output.
221
-
222
- **Note**: This on-device profiling and inference requires access to Qualcomm®
223
- AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).
224
-
225
-
226
-
227
- ## Run demo on a cloud-hosted device
228
-
229
- You can also run the demo on-device.
230
-
231
- ```bash
232
- python -m qai_hub_models.models.mnasnet05.demo --eval-mode on-device
233
- ```
234
-
235
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
236
- environment, please add the following to your cell (instead of the above).
237
- ```
238
- %run -m qai_hub_models.models.mnasnet05.demo -- --eval-mode on-device
239
- ```
240
-
241
-
242
- ## Deploying compiled model to Android
243
-
244
-
245
- The models can be deployed using multiple runtimes:
246
- - TensorFlow Lite (`.tflite` export): [This
247
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
248
- guide to deploy the .tflite model in an Android application.
249
-
250
-
251
- - QNN (`.so` export ): This [sample
252
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
253
- provides instructions on how to use the `.so` shared library in an Android application.
254
-
255
-
256
- ## View on Qualcomm® AI Hub
257
- Get more details on MNASNet05's performance across various devices [here](https://aihub.qualcomm.com/models/mnasnet05).
258
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
259
-
260
 
261
  ## License
262
  * The license for the original implementation of MNASNet05 can be found
263
  [here](https://github.com/pytorch/vision/blob/main/LICENSE).
264
 
265
-
266
-
267
  ## References
268
  * [MnasNet: Platform-Aware Neural Architecture Search for Mobile](https://arxiv.org/abs/1807.11626)
269
  * [Source Model Implementation](https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py)
270
 
271
-
272
-
273
  ## Community
274
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
275
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
276
-
277
-
 
11
 
12
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mnasnet05/web-assets/model_demo.png)
13
 
14
+ # MNASNet05: Optimized for Qualcomm Devices
 
 
15
 
16
  MNASNet05 is a machine learning model that can classify images from the Imagenet dataset. It can also be used as a backbone in building more complex models for specific use cases.
17
 
18
+ This is based on the implementation of MNASNet05 found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py).
19
+ This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/mnasnet05) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
20
+
21
+ Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device.
22
+
23
+ ## Getting Started
24
+ There are two ways to deploy this model on your device:
25
+
26
+ ### Option 1: Download Pre-Exported Models
27
+
28
+ Below are pre-exported model assets ready for deployment.
29
+
30
+ | Runtime | Precision | Chipset | SDK Versions | Download |
31
+ |---|---|---|---|---|
32
+ | ONNX | float | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mnasnet05/releases/v0.46.1/mnasnet05-onnx-float.zip)
33
+ | ONNX | w8a16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mnasnet05/releases/v0.46.1/mnasnet05-onnx-w8a16.zip)
34
+ | QNN_DLC | float | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mnasnet05/releases/v0.46.1/mnasnet05-qnn_dlc-float.zip)
35
+ | QNN_DLC | w8a16 | Universal | QAIRT 2.42 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mnasnet05/releases/v0.46.1/mnasnet05-qnn_dlc-w8a16.zip)
36
+ | TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/mnasnet05/releases/v0.46.1/mnasnet05-tflite-float.zip)
37
+
38
+ For more device-specific assets and performance metrics, visit **[MNASNet05 on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/mnasnet05)**.
39
+
40
+
41
+ ### Option 2: Export with Custom Configurations
42
+
43
+ Use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/mnasnet05) Python library to compile and export the model with your own:
44
+ - Custom weights (e.g., fine-tuned checkpoints)
45
+ - Custom input shapes
46
+ - Target device and runtime configurations
47
+
48
+ This option is ideal if you need to customize the model beyond the default configuration provided here.
49
+
50
+ See our repository for [MNASNet05 on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/mnasnet05) for usage instructions.
51
+
52
+ ## Model Details
53
+
54
+ **Model Type:** Model_use_case.image_classification
55
+
56
+ **Model Stats:**
57
+ - Model checkpoint: Imagenet
58
+ - Input resolution: 224x224
59
+ - Number of parameters: 2.21M
60
+ - Model size (float): 8.45 MB
61
+ - Model size (w8a16): 2.79 MB
62
+
63
+ ## Performance Summary
64
+ | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
65
+ |---|---|---|---|---|---|---
66
+ | MNASNet05 | ONNX | float | Snapdragon® X Elite | 0.617 ms | 5 - 5 MB | NPU
67
+ | MNASNet05 | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 0.493 ms | 0 - 116 MB | NPU
68
+ | MNASNet05 | ONNX | float | Qualcomm® QCS8550 (Proxy) | 0.691 ms | 0 - 12 MB | NPU
69
+ | MNASNet05 | ONNX | float | Qualcomm® QCS9075 | 0.97 ms | 1 - 3 MB | NPU
70
+ | MNASNet05 | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.381 ms | 0 - 99 MB | NPU
71
+ | MNASNet05 | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.317 ms | 1 - 99 MB | NPU
72
+ | MNASNet05 | ONNX | w8a16 | Snapdragon® X Elite | 0.645 ms | 2 - 2 MB | NPU
73
+ | MNASNet05 | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.521 ms | 0 - 111 MB | NPU
74
+ | MNASNet05 | ONNX | w8a16 | Qualcomm® QCS6490 | 29.306 ms | 8 - 11 MB | CPU
75
+ | MNASNet05 | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 0.705 ms | 0 - 44 MB | NPU
76
+ | MNASNet05 | ONNX | w8a16 | Qualcomm® QCS9075 | 0.899 ms | 0 - 3 MB | NPU
77
+ | MNASNet05 | ONNX | w8a16 | Qualcomm® QCM6690 | 18.804 ms | 9 - 16 MB | CPU
78
+ | MNASNet05 | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.368 ms | 0 - 100 MB | NPU
79
+ | MNASNet05 | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 13.001 ms | 9 - 16 MB | CPU
80
+ | MNASNet05 | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.329 ms | 0 - 100 MB | NPU
81
+ | MNASNet05 | QNN_DLC | float | Snapdragon® X Elite | 0.916 ms | 1 - 1 MB | NPU
82
+ | MNASNet05 | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 0.516 ms | 0 - 46 MB | NPU
83
+ | MNASNet05 | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 2.318 ms | 1 - 30 MB | NPU
84
+ | MNASNet05 | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 0.775 ms | 1 - 2 MB | NPU
85
+ | MNASNet05 | QNN_DLC | float | Qualcomm® SA8775P | 1.091 ms | 1 - 31 MB | NPU
86
+ | MNASNet05 | QNN_DLC | float | Qualcomm® QCS9075 | 0.974 ms | 1 - 3 MB | NPU
87
+ | MNASNet05 | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 1.579 ms | 0 - 48 MB | NPU
88
+ | MNASNet05 | QNN_DLC | float | Qualcomm® SA7255P | 2.318 ms | 1 - 30 MB | NPU
89
+ | MNASNet05 | QNN_DLC | float | Qualcomm® SA8295P | 1.416 ms | 0 - 28 MB | NPU
90
+ | MNASNet05 | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.379 ms | 0 - 33 MB | NPU
91
+ | MNASNet05 | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.291 ms | 1 - 33 MB | NPU
92
+ | MNASNet05 | QNN_DLC | w8a16 | Snapdragon® X Elite | 0.924 ms | 0 - 0 MB | NPU
93
+ | MNASNet05 | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 0.53 ms | 0 - 37 MB | NPU
94
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® QCS6490 | 2.225 ms | 2 - 4 MB | NPU
95
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 1.665 ms | 0 - 26 MB | NPU
96
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 0.785 ms | 0 - 2 MB | NPU
97
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® SA8775P | 4.096 ms | 0 - 27 MB | NPU
98
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 0.925 ms | 0 - 2 MB | NPU
99
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 3.052 ms | 0 - 138 MB | NPU
100
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® QCS8450 (Proxy) | 0.958 ms | 0 - 39 MB | NPU
101
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® SA7255P | 1.665 ms | 0 - 26 MB | NPU
102
+ | MNASNet05 | QNN_DLC | w8a16 | Qualcomm® SA8295P | 1.235 ms | 0 - 23 MB | NPU
103
+ | MNASNet05 | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 0.361 ms | 0 - 25 MB | NPU
104
+ | MNASNet05 | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 0.785 ms | 0 - 24 MB | NPU
105
+ | MNASNet05 | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 0.29 ms | 0 - 29 MB | NPU
106
+ | MNASNet05 | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 0.519 ms | 0 - 47 MB | NPU
107
+ | MNASNet05 | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 2.331 ms | 0 - 30 MB | NPU
108
+ | MNASNet05 | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 0.776 ms | 0 - 1 MB | NPU
109
+ | MNASNet05 | TFLITE | float | Qualcomm® SA8775P | 1.107 ms | 0 - 33 MB | NPU
110
+ | MNASNet05 | TFLITE | float | Qualcomm® QCS9075 | 0.978 ms | 0 - 8 MB | NPU
111
+ | MNASNet05 | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 1.581 ms | 0 - 49 MB | NPU
112
+ | MNASNet05 | TFLITE | float | Qualcomm® SA7255P | 2.331 ms | 0 - 30 MB | NPU
113
+ | MNASNet05 | TFLITE | float | Qualcomm® SA8295P | 1.432 ms | 0 - 29 MB | NPU
114
+ | MNASNet05 | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 0.384 ms | 0 - 35 MB | NPU
115
+ | MNASNet05 | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 0.29 ms | 0 - 34 MB | NPU
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
  ## License
118
  * The license for the original implementation of MNASNet05 can be found
119
  [here](https://github.com/pytorch/vision/blob/main/LICENSE).
120
 
 
 
121
  ## References
122
  * [MnasNet: Platform-Aware Neural Architecture Search for Mobile](https://arxiv.org/abs/1807.11626)
123
  * [Source Model Implementation](https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py)
124
 
 
 
125
  ## Community
126
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
127
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
 
 
tool-versions.yaml DELETED
@@ -1,4 +0,0 @@
1
- tool_versions:
2
- onnx:
3
- qairt: 2.37.1.250807093845_124904
4
- onnx_runtime: 1.23.0