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.45, ONNX Runtime 1.25.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.45, ONNX Runtime 1.25.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.45 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.45 | Download |
| TFLITE | float | Universal | QAIRT 2.45 | 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:
- Model checkpoint: Imagenet
- Input resolution: 224x224
- Number of parameters: 50.4M
- Model size (float): 193 MB
- Model size (w8a16): 52.5 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Swin-Small | ONNX | float | Snapdragon® X2 Elite | 6.809 ms | 2 - 2 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 16.21 ms | 100 - 100 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 10.208 ms | 1 - 426 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 23.988 ms | 0 - 410 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.588 ms | 0 - 515 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8450 | 23.988 ms | 0 - 410 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 17.885 ms | 0 - 4 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.421 ms | 0 - 619 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Mobile | 7.837 ms | 1 - 606 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 7.837 ms | 1 - 606 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 16.21 ms | 100 - 100 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 5.981 ms | 1 - 1 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 13.83 ms | 54 - 54 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 8.711 ms | 0 - 529 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 13.129 ms | 0 - 61 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 14.21 ms | 0 - 3 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 14.115 ms | 0 - 390 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 5.649 ms | 0 - 453 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 56.972 ms | 0 - 575 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 6.976 ms | 0 - 441 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 14.115 ms | 0 - 390 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 6.976 ms | 0 - 441 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 13.83 ms | 54 - 54 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 7.084 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 16.45 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.965 ms | 1 - 408 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 23.979 ms | 0 - 397 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8275 | 37.922 ms | 1 - 275 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.359 ms | 1 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8775P | 17.398 ms | 1 - 593 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8650P | 17.398 ms | 1 - 593 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8255P | 17.398 ms | 1 - 593 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 | 23.979 ms | 0 - 397 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 22.492 ms | 1 - 3 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.239 ms | 0 - 602 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA7255P | 37.922 ms | 1 - 275 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 7.601 ms | 1 - 587 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 22.631 ms | 1 - 269 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 7.601 ms | 1 - 587 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 16.45 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 7.239 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.275 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.759 ms | 0 - 872 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8275 | 29.266 ms | 0 - 636 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 16.231 ms | 0 - 272 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8775P | 16.726 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8650P | 16.726 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA8255P | 16.726 ms | 0 - 638 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 23.292 ms | 0 - 2 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 17.046 ms | 0 - 652 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.464 ms | 0 - 640 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 72.958 ms | 0 - 751 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA7255P | 29.266 ms | 0 - 636 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 8.073 ms | 0 - 621 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 17.046 ms | 0 - 652 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 8.073 ms | 0 - 621 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 17.275 ms | 0 - 0 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 10.154 ms | 0 - 430 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 23.37 ms | 0 - 411 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8275 | 37.406 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.431 ms | 0 - 3 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 17.475 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8650P | 17.475 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8255P | 17.475 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8450 | 23.37 ms | 0 - 411 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 17.648 ms | 0 - 104 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.605 ms | 6 - 328 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA7255P | 37.406 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Mobile | 7.841 ms | 0 - 304 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8295P | 22.95 ms | 0 - 297 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 7.841 ms | 0 - 304 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.
