qaihm-bot commited on
Commit
355835d
·
verified ·
1 Parent(s): 8c20ca0

See https://github.com/qualcomm/ai-hub-models/releases/v0.51.0 for changelog.

README.md CHANGED
@@ -11,240 +11,118 @@ pipeline_tag: image-classification
11
 
12
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/web-assets/model_demo.png)
13
 
14
- # Swin-Small: Optimized for Mobile Deployment
15
- ## Imagenet classifier and general purpose backbone
16
-
17
 
18
  SwinSmall 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 Swin-Small found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/swin_transformer.py).
21
-
22
-
23
- This repository provides scripts to run Swin-Small on Qualcomm® devices.
24
- More details on model performance across various devices, can be found
25
- [here](https://aihub.qualcomm.com/models/swin_small).
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: 50.4M
36
- - Model size (float): 193 MB
37
- - Model size (w8a16): 52.5 MB
38
-
39
- | Model | Precision | Device | Chipset | Target Runtime | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit | Target Model
40
- |---|---|---|---|---|---|---|---|---|
41
- | Swin-Small | float | QCS8275 (Proxy) | Qualcomm® QCS8275 (Proxy) | TFLITE | 41.037 ms | 0 - 425 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
42
- | Swin-Small | float | QCS8450 (Proxy) | Qualcomm® QCS8450 (Proxy) | TFLITE | 25.56 ms | 0 - 524 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
43
- | Swin-Small | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | TFLITE | 17.621 ms | 0 - 5 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
44
- | Swin-Small | float | QCS8550 (Proxy) | Qualcomm® QCS8550 (Proxy) | ONNX | 15.658 ms | 0 - 114 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.onnx.zip) |
45
- | Swin-Small | float | QCS9075 (Proxy) | Qualcomm® QCS9075 (Proxy) | TFLITE | 19.695 ms | 0 - 684 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
46
- | Swin-Small | float | SA7255P ADP | Qualcomm® SA7255P | TFLITE | 41.037 ms | 0 - 425 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
47
- | Swin-Small | float | SA8295P ADP | Qualcomm® SA8295P | TFLITE | 25.348 ms | 0 - 415 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
48
- | Swin-Small | float | SA8775P ADP | Qualcomm® SA8775P | TFLITE | 19.695 ms | 0 - 684 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
49
- | Swin-Small | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | TFLITE | 11.735 ms | 0 - 545 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
50
- | Swin-Small | float | Samsung Galaxy S24 | Snapdragon® 8 Gen 3 Mobile | ONNX | 10.045 ms | 1 - 979 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.onnx.zip) |
51
- | Swin-Small | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | TFLITE | 9.047 ms | 0 - 408 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
52
- | Swin-Small | float | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 7.723 ms | 1 - 656 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.onnx.zip) |
53
- | Swin-Small | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | TFLITE | 7.231 ms | 0 - 427 MB | NPU | [Swin-Small.tflite](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.tflite) |
54
- | Swin-Small | float | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 6.516 ms | 1 - 639 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.onnx.zip) |
55
- | Swin-Small | float | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 15.982 ms | 100 - 100 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small.onnx.zip) |
56
- | Swin-Small | w8a16 | Dragonwing Q-6690 MTP | Qualcomm® QCM6690 | ONNX | 385.414 ms | 86 - 107 MB | CPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small_w8a16.onnx.zip) |
57
- | Swin-Small | w8a16 | Dragonwing RB3 Gen 2 Vision Kit | Qualcomm® QCS6490 | ONNX | 737.745 ms | 104 - 124 MB | CPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small_w8a16.onnx.zip) |
58
- | Swin-Small | w8a16 | Samsung Galaxy S25 | Snapdragon® 8 Elite For Galaxy Mobile | ONNX | 121.925 ms | 36 - 297 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small_w8a16.onnx.zip) |
59
- | Swin-Small | w8a16 | Snapdragon 7 Gen 4 QRD | Snapdragon® 7 Gen 4 Mobile | ONNX | 357.335 ms | 88 - 108 MB | CPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small_w8a16.onnx.zip) |
60
- | Swin-Small | w8a16 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | ONNX | 123.35 ms | 46 - 311 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small_w8a16.onnx.zip) |
61
- | Swin-Small | w8a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | ONNX | 124.694 ms | 65 - 65 MB | NPU | [Swin-Small.onnx.zip](https://huggingface.co/qualcomm/Swin-Small/blob/main/Swin-Small_w8a16.onnx.zip) |
62
-
63
-
64
-
65
-
66
- ## Installation
67
-
68
-
69
- Install the package via pip:
70
- ```bash
71
- pip install qai-hub-models
72
- ```
73
-
74
-
75
- ## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted device
76
-
77
- Sign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with your
78
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
79
-
80
- With this API token, you can configure your client to run models on the cloud
81
- hosted devices.
82
- ```bash
83
- qai-hub configure --api_token API_TOKEN
84
- ```
85
- Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.
86
-
87
-
88
-
89
- ## Demo off target
90
-
91
- The package contains a simple end-to-end demo that downloads pre-trained
92
- weights and runs this model on a sample input.
93
-
94
- ```bash
95
- python -m qai_hub_models.models.swin_small.demo
96
- ```
97
-
98
- The above demo runs a reference implementation of pre-processing, model
99
- inference, and post processing.
100
-
101
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
102
- environment, please add the following to your cell (instead of the above).
103
- ```
104
- %run -m qai_hub_models.models.swin_small.demo
105
- ```
106
-
107
-
108
- ### Run model on a cloud-hosted device
109
-
110
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
111
- device. This script does the following:
112
- * Performance check on-device on a cloud-hosted device
113
- * Downloads compiled assets that can be deployed on-device for Android.
114
- * Accuracy check between PyTorch and on-device outputs.
115
-
116
- ```bash
117
- python -m qai_hub_models.models.swin_small.export
118
- ```
119
-
120
-
121
-
122
- ## How does this work?
123
-
124
- This [export script](https://aihub.qualcomm.com/models/swin_small/qai_hub_models/models/Swin-Small/export.py)
125
- leverages [Qualcomm® AI Hub](https://aihub.qualcomm.com/) to optimize, validate, and deploy this model
126
- on-device. Lets go through each step below in detail:
127
-
128
- Step 1: **Compile model for on-device deployment**
129
-
130
- To compile a PyTorch model for on-device deployment, we first trace the model
131
- in memory using the `jit.trace` and then call the `submit_compile_job` API.
132
-
133
- ```python
134
- import torch
135
-
136
- import qai_hub as hub
137
- from qai_hub_models.models.swin_small import Model
138
-
139
- # Load the model
140
- torch_model = Model.from_pretrained()
141
-
142
- # Device
143
- device = hub.Device("Samsung Galaxy S25")
144
-
145
- # Trace model
146
- input_shape = torch_model.get_input_spec()
147
- sample_inputs = torch_model.sample_inputs()
148
-
149
- pt_model = torch.jit.trace(torch_model, [torch.tensor(data[0]) for _, data in sample_inputs.items()])
150
-
151
- # Compile model on a specific device
152
- compile_job = hub.submit_compile_job(
153
- model=pt_model,
154
- device=device,
155
- input_specs=torch_model.get_input_spec(),
156
- )
157
-
158
- # Get target model to run on-device
159
- target_model = compile_job.get_target_model()
160
-
161
- ```
162
-
163
-
164
- Step 2: **Performance profiling on cloud-hosted device**
165
-
166
- After compiling models from step 1. Models can be profiled model on-device using the
167
- `target_model`. Note that this scripts runs the model on a device automatically
168
- provisioned in the cloud. Once the job is submitted, you can navigate to a
169
- provided job URL to view a variety of on-device performance metrics.
170
- ```python
171
- profile_job = hub.submit_profile_job(
172
- model=target_model,
173
- device=device,
174
- )
175
-
176
- ```
177
-
178
- Step 3: **Verify on-device accuracy**
179
-
180
- To verify the accuracy of the model on-device, you can run on-device inference
181
- on sample input data on the same cloud hosted device.
182
- ```python
183
- input_data = torch_model.sample_inputs()
184
- inference_job = hub.submit_inference_job(
185
- model=target_model,
186
- device=device,
187
- inputs=input_data,
188
- )
189
- on_device_output = inference_job.download_output_data()
190
-
191
- ```
192
- With the output of the model, you can compute like PSNR, relative errors or
193
- spot check the output with expected output.
194
-
195
- **Note**: This on-device profiling and inference requires access to Qualcomm®
196
- AI Hub Workbench. [Sign up for access](https://myaccount.qualcomm.com/signup).
197
-
198
-
199
-
200
- ## Run demo on a cloud-hosted device
201
-
202
- You can also run the demo on-device.
203
-
204
- ```bash
205
- python -m qai_hub_models.models.swin_small.demo --eval-mode on-device
206
- ```
207
-
208
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
209
- environment, please add the following to your cell (instead of the above).
210
- ```
211
- %run -m qai_hub_models.models.swin_small.demo -- --eval-mode on-device
212
- ```
213
-
214
-
215
- ## Deploying compiled model to Android
216
-
217
-
218
- The models can be deployed using multiple runtimes:
219
- - TensorFlow Lite (`.tflite` export): [This
220
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
221
- guide to deploy the .tflite model in an Android application.
222
-
223
-
224
- - QNN (`.so` export ): This [sample
225
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
226
- provides instructions on how to use the `.so` shared library in an Android application.
227
-
228
-
229
- ## View on Qualcomm® AI Hub
230
- Get more details on Swin-Small's performance across various devices [here](https://aihub.qualcomm.com/models/swin_small).
231
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
232
-
233
 
234
  ## License
235
  * The license for the original implementation of Swin-Small can be found
236
  [here](https://github.com/pytorch/vision/blob/main/LICENSE).
237
 
238
-
239
-
240
  ## References
241
  * [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030)
242
  * [Source Model Implementation](https://github.com/pytorch/vision/blob/main/torchvision/models/swin_transformer.py)
243
 
244
-
245
-
246
  ## Community
247
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
248
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
249
-
250
-
 
11
 
12
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/web-assets/model_demo.png)
13
 
14
+ # Swin-Small: Optimized for Qualcomm Devices
 
 
15
 
16
  SwinSmall 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 Swin-Small found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/swin_transformer.py).
19
+ This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/swin_small) 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.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-onnx-float.zip)
33
+ | ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-onnx-w8a16.zip)
34
+ | QNN_DLC | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-qnn_dlc-float.zip)
35
+ | QNN_DLC | w8a16 | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-qnn_dlc-w8a16.zip)
36
+ | TFLITE | float | Universal | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-tflite-float.zip)
37
+
38
+ For more device-specific assets and performance metrics, visit **[Swin-Small on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/swin_small)**.
39
+
40
+
41
+ ### Option 2: Export with Custom Configurations
42
+
43
+ Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/swin_small) 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 [Swin-Small on GitHub](https://github.com/qualcomm/ai-hub-models/blob/main/src/qai_hub_models/models/swin_small) 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: 50.4M
60
+ - Model size (float): 193 MB
61
+ - Model size (w8a16): 52.5 MB
62
+
63
+ ## Performance Summary
64
+ | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
65
+ |---|---|---|---|---|---|---
66
+ | Swin-Small | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.215 ms | 1 - 406 MB | NPU
67
+ | Swin-Small | ONNX | float | Snapdragon® X2 Elite | 8.033 ms | 109 - 109 MB | NPU
68
+ | Swin-Small | ONNX | float | Snapdragon® X Elite | 19.461 ms | 108 - 108 MB | NPU
69
+ | Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 12.427 ms | 0 - 527 MB | NPU
70
+ | Swin-Small | ONNX | float | Qualcomm® QCS8550 (Proxy) | 18.509 ms | 0 - 123 MB | NPU
71
+ | Swin-Small | ONNX | float | Qualcomm® QCS9075 | 22.286 ms | 0 - 4 MB | NPU
72
+ | Swin-Small | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.952 ms | 1 - 361 MB | NPU
73
+ | Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 5.998 ms | 0 - 400 MB | NPU
74
+ | Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 6.446 ms | 59 - 59 MB | NPU
75
+ | Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 14.759 ms | 64 - 64 MB | NPU
76
+ | Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 9.412 ms | 0 - 573 MB | NPU
77
+ | Swin-Small | ONNX | w8a16 | Qualcomm® QCS6490 | 801.98 ms | 99 - 113 MB | CPU
78
+ | Swin-Small | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 14.084 ms | 0 - 7 MB | NPU
79
+ | Swin-Small | ONNX | w8a16 | Qualcomm® QCS9075 | 18.095 ms | 0 - 3 MB | NPU
80
+ | Swin-Small | ONNX | w8a16 | Qualcomm® QCM6690 | 385.253 ms | 81 - 99 MB | CPU
81
+ | Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 7.502 ms | 0 - 474 MB | NPU
82
+ | Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 360.716 ms | 107 - 128 MB | CPU
83
+ | Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.47 ms | 0 - 606 MB | NPU
84
+ | Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 7.232 ms | 1 - 1 MB | NPU
85
+ | Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 16.783 ms | 1 - 1 MB | NPU
86
+ | Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 10.518 ms | 0 - 976 MB | NPU
87
+ | Swin-Small | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 39.187 ms | 1 - 631 MB | NPU
88
+ | Swin-Small | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 16.15 ms | 1 - 387 MB | NPU
89
+ | Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 18.046 ms | 1 - 626 MB | NPU
90
+ | Swin-Small | QNN_DLC | float | Qualcomm® QCS9075 | 20.327 ms | 1 - 3 MB | NPU
91
+ | Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 25.298 ms | 0 - 409 MB | NPU
92
+ | Swin-Small | QNN_DLC | float | Qualcomm® SA7255P | 39.187 ms | 1 - 631 MB | NPU
93
+ | Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 23.36 ms | 1 - 599 MB | NPU
94
+ | Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.956 ms | 1 - 621 MB | NPU
95
+ | Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.495 ms | 0 - 655 MB | NPU
96
+ | Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 7.364 ms | 0 - 0 MB | NPU
97
+ | Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.596 ms | 0 - 0 MB | NPU
98
+ | Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.856 ms | 0 - 883 MB | NPU
99
+ | Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 29.028 ms | 0 - 651 MB | NPU
100
+ | Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 16.51 ms | 0 - 3 MB | NPU
101
+ | Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8775P | 16.767 ms | 0 - 656 MB | NPU
102
+ | Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 19.739 ms | 0 - 2 MB | NPU
103
+ | Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 78.03 ms | 0 - 619 MB | NPU
104
+ | Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA7255P | 29.028 ms | 0 - 651 MB | NPU
105
+ | Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 8.302 ms | 0 - 642 MB | NPU
106
+ | Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 17.296 ms | 0 - 685 MB | NPU
107
+ | Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.102 ms | 0 - 320 MB | NPU
108
+ | Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 11.638 ms | 0 - 449 MB | NPU
109
+ | Swin-Small | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 41.087 ms | 0 - 317 MB | NPU
110
+ | Swin-Small | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 17.623 ms | 0 - 4 MB | NPU
111
+ | Swin-Small | TFLITE | float | Qualcomm® SA8775P | 19.653 ms | 0 - 316 MB | NPU
112
+ | Swin-Small | TFLITE | float | Qualcomm® QCS9075 | 22.581 ms | 0 - 104 MB | NPU
113
+ | Swin-Small | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 25.957 ms | 0 - 428 MB | NPU
114
+ | Swin-Small | TFLITE | float | Qualcomm® SA7255P | 41.087 ms | 0 - 317 MB | NPU
115
+ | Swin-Small | TFLITE | float | Qualcomm® SA8295P | 25.431 ms | 0 - 310 MB | NPU
116
+ | Swin-Small | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.893 ms | 0 - 309 MB | NPU
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
  ## License
119
  * The license for the original implementation of Swin-Small can be found
120
  [here](https://github.com/pytorch/vision/blob/main/LICENSE).
121
 
 
 
122
  ## References
123
  * [Swin Transformer: Hierarchical Vision Transformer using Shifted Windows](https://arxiv.org/abs/2103.14030)
124
  * [Source Model Implementation](https://github.com/pytorch/vision/blob/main/torchvision/models/swin_transformer.py)
125
 
 
 
126
  ## Community
127
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
128
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
 
 
Swin-Small_float.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9f32cdc875c4d16a7c6a75a0089bc8c41d9fd67e11c834babfc5c61da1f7daf1
3
- size 184754660
 
 
 
 
Swin-Small_float.tflite DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:dce0b87871de6b083471e5b6bd1a4fee089384762da87dc0cb7d97b38ecab631
3
- size 202028544
 
 
 
 
Swin-Small_w8a16.onnx.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:047081617919d2d6c4656092815f2c01215b8cd6efd99289af037da8658595f7
3
- size 171081106
 
 
 
 
release_assets.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "0.51.0",
3
+ "precisions": {
4
+ "float": {
5
+ "universal_assets": {
6
+ "tflite": {
7
+ "tool_versions": {
8
+ "qairt": "2.45.0.260326154327",
9
+ "litert": "1.4.2"
10
+ },
11
+ "download_url": "https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-tflite-float.zip"
12
+ },
13
+ "qnn_dlc": {
14
+ "tool_versions": {
15
+ "qairt": "2.45.0.260326154327"
16
+ },
17
+ "download_url": "https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-qnn_dlc-float.zip"
18
+ },
19
+ "onnx": {
20
+ "tool_versions": {
21
+ "qairt": "2.42.0.251225135753_193295",
22
+ "onnx_runtime": "1.24.3"
23
+ },
24
+ "download_url": "https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-onnx-float.zip"
25
+ }
26
+ }
27
+ },
28
+ "w8a16": {
29
+ "universal_assets": {
30
+ "qnn_dlc": {
31
+ "tool_versions": {
32
+ "qairt": "2.45.0.260326154327"
33
+ },
34
+ "download_url": "https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-qnn_dlc-w8a16.zip"
35
+ },
36
+ "onnx": {
37
+ "tool_versions": {
38
+ "qairt": "2.42.0.251225135753_193295",
39
+ "onnx_runtime": "1.24.3"
40
+ },
41
+ "download_url": "https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/swin_small/releases/v0.51.0/swin_small-onnx-w8a16.zip"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
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