Swin-Base: Optimized for Qualcomm Devices
SwinBase 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-Base 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.42, ONNX Runtime 1.24.3 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | 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-Base 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-Base 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: 88.8M
- Model size (float): 339 MB
- Model size (w8a16): 90.2 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Swin-Base | ONNX | float | Snapdragon® 8 Elite Mobile | 9.783 ms | 0 - 511 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® X2 Elite | 8.376 ms | 175 - 175 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® X Elite | 19.682 ms | 174 - 174 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® X Elite | 19.682 ms | 174 - 174 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 13.052 ms | 1 - 608 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® QCS8550 (Proxy) | 18.905 ms | 0 - 196 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® QCS9075 | 24.452 ms | 0 - 4 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.783 ms | 0 - 511 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.969 ms | 0 - 448 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 8.785 ms | 0 - 424 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® X2 Elite | 7.518 ms | 92 - 92 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® X Elite | 17.605 ms | 91 - 91 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® X Elite | 17.605 ms | 91 - 91 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 11.385 ms | 0 - 554 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® QCS6490 | 1114.666 ms | 62 - 92 MB | CPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 16.751 ms | 0 - 112 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® QCS9075 | 20.874 ms | 0 - 3 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® QCM6690 | 627.859 ms | 129 - 151 MB | CPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 8.785 ms | 0 - 424 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 592.566 ms | 129 - 151 MB | CPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 592.566 ms | 129 - 151 MB | CPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.47 ms | 0 - 382 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 9.436 ms | 1 - 367 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® X2 Elite | 8.502 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® X Elite | 19.192 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® X Elite | 19.192 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 12.479 ms | 1 - 516 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 53.592 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 18.311 ms | 1 - 3 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8775P | 21.395 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8775P | 21.395 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8775P | 21.395 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® QCS9075 | 23.163 ms | 1 - 3 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 29.14 ms | 0 - 505 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA7255P | 53.592 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8295P | 27.604 ms | 1 - 353 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.436 ms | 1 - 367 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 7.551 ms | 0 - 417 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 9.55 ms | 0 - 403 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 8.499 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® X Elite | 20.301 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® X Elite | 20.301 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 12.711 ms | 0 - 505 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 35.258 ms | 0 - 411 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 19.096 ms | 0 - 2 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8775P | 19.527 ms | 0 - 410 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8775P | 19.527 ms | 0 - 410 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8775P | 19.527 ms | 0 - 410 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 22.729 ms | 0 - 2 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 119.37 ms | 0 - 914 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA7255P | 35.258 ms | 0 - 411 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 9.55 ms | 0 - 403 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 21.566 ms | 0 - 588 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 21.566 ms | 0 - 588 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.881 ms | 0 - 393 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Elite Mobile | 9.681 ms | 0 - 379 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 12.779 ms | 0 - 1043 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 53.453 ms | 0 - 709 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 18.916 ms | 0 - 4 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8775P | 21.917 ms | 0 - 375 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8775P | 21.917 ms | 0 - 375 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8775P | 21.917 ms | 0 - 375 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® QCS9075 | 23.89 ms | 0 - 178 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 29.021 ms | 0 - 509 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA7255P | 53.453 ms | 0 - 709 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8295P | 28.384 ms | 0 - 371 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.681 ms | 0 - 379 MB | NPU |
License
- The license for the original implementation of Swin-Base 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.
