Swin-Small: Optimized for Qualcomm Devices
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.
This is based on the implementation of Swin-Small found here. This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the Qualcomm® AI Hub Models library to export with custom configurations. More details on model performance across various devices, can be found here.
Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up to run these models on a hosted Qualcomm® device.
Getting Started
There are two ways to deploy this model on your device:
Option 1: Download Pre-Exported Models
Below are pre-exported model assets ready for deployment.
| Runtime | Precision | Chipset | SDK Versions | Download |
|---|---|---|---|---|
| ONNX | float | Universal | QAIRT 2.50, ONNX Runtime 1.30.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.50, ONNX Runtime 1.30.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.50 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.50 | Download |
| TFLITE | float | Universal | QAIRT 2.50 | Download |
For more device-specific assets and performance metrics, visit Swin-Small on Qualcomm® AI Hub.
Option 2: Export with Custom Configurations
Use the Qualcomm® AI Hub Models Python library to compile and export the model with your own:
- Custom weights (e.g., fine-tuned checkpoints)
- Custom input shapes
- Target device and runtime configurations
This option is ideal if you need to customize the model beyond the default configuration provided here.
See our repository for Swin-Small on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.image_classification
Model Stats:
- Input resolution: 224x224
- Model checkpoint: Imagenet
- Model size (float): 193 MB
- Model size (w8a16): 52.5 MB
- Number of parameters: 50.4M
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 6.403 ms | 1 - 301 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.81 ms | 1 - 287 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X2 Elite | 6.651 ms | 2 - 2 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 15.929 ms | 100 - 100 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 10.146 ms | 0 - 419 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 23.752 ms | 1 - 411 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 15.582 ms | 0 - 5 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.353 ms | 0 - 114 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8450 | 23.752 ms | 1 - 411 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 17.561 ms | 0 - 4 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 15.929 ms | 100 - 100 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 7.81 ms | 1 - 287 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 5.314 ms | 0 - 341 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 6.758 ms | 0 - 328 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 5.501 ms | 1 - 1 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 13.946 ms | 54 - 54 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 8.952 ms | 0 - 443 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 16.634 ms | 0 - 443 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 29.267 ms | 0 - 4 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 11.808 ms | 0 - 5 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 13.306 ms | 0 - 59 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8450 | 16.634 ms | 0 - 443 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 14.188 ms | 0 - 4 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 13.946 ms | 54 - 54 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 58.288 ms | 0 - 536 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 14.493 ms | 0 - 374 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 6.758 ms | 0 - 328 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 14.493 ms | 0 - 374 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 6.082 ms | 0 - 284 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.489 ms | 1 - 272 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 6.779 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 15.804 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.9 ms | 0 - 404 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 23.668 ms | 0 - 391 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 15.319 ms | 1 - 4 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 14.98 ms | 1 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 16.916 ms | 1 - 269 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8650P | 16.916 ms | 1 - 269 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8255P | 16.916 ms | 1 - 269 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 | 23.668 ms | 0 - 391 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 17.325 ms | 1 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 15.804 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 7.489 ms | 1 - 272 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA7255P | 37.283 ms | 1 - 269 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 22.087 ms | 1 - 264 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 6.036 ms | 0 - 317 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 7.823 ms | 0 - 307 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 6.597 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.088 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.807 ms | 0 - 409 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 14.289 ms | 0 - 4 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 16.13 ms | 0 - 242 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8650P | 16.763 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8255P | 16.763 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 16.875 ms | 2 - 5 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 17.088 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 74.064 ms | 0 - 525 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 17.129 ms | 0 - 351 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 7.823 ms | 0 - 307 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA7255P | 29.287 ms | 0 - 326 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 17.129 ms | 0 - 351 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 6.706 ms | 0 - 312 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 7.858 ms | 0 - 293 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 10.19 ms | 0 - 420 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 23.266 ms | 0 - 408 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 15.373 ms | 0 - 105 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.438 ms | 0 - 4 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 17.395 ms | 0 - 293 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8650P | 17.395 ms | 0 - 293 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8255P | 17.395 ms | 0 - 293 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8450 | 23.266 ms | 0 - 408 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 17.37 ms | 0 - 104 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 7.858 ms | 0 - 293 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA7255P | 36.861 ms | 0 - 292 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8295P | 22.673 ms | 0 - 286 MB | NPU |
License
- The license for the original implementation of Swin-Small can be found here.
References
Community
- Join our AI Hub Slack community to collaborate, post questions and learn more about on-device AI.
- For questions or feedback please reach out to us.
