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.50, ONNX Runtime 1.27.1 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.50, ONNX Runtime 1.27.1 | 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-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:
- Input resolution: 224x224
- Model checkpoint: Imagenet
- Model size (float): 339 MB
- Model size (w8a16): 90.2 MB
- Number of parameters: 88.8M
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Swin-Base | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 7.64 ms | 0 - 398 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.496 ms | 1 - 383 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® X2 Elite | 7.826 ms | 2 - 2 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® X Elite | 19.463 ms | 175 - 175 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 13.021 ms | 0 - 538 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 28.691 ms | 1 - 530 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 20.609 ms | 0 - 5 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 18.857 ms | 0 - 194 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® QCS8450 | 28.691 ms | 1 - 530 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 21.825 ms | 0 - 4 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 19.463 ms | 175 - 175 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 9.496 ms | 1 - 383 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 6.04 ms | 0 - 414 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 8.057 ms | 0 - 402 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® X2 Elite | 6.213 ms | 1 - 1 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® X Elite | 16.078 ms | 91 - 91 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.66 ms | 0 - 542 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 20.508 ms | 0 - 539 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 38.643 ms | 0 - 4 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 14.105 ms | 0 - 5 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.525 ms | 0 - 99 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® QCS8450 | 20.508 ms | 0 - 539 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 16.281 ms | 0 - 4 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 16.078 ms | 91 - 91 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 86.579 ms | 0 - 662 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 17.898 ms | 0 - 606 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 8.057 ms | 0 - 402 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 17.898 ms | 0 - 606 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 7.201 ms | 0 - 368 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.958 ms | 0 - 352 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® X2 Elite | 7.904 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® X Elite | 18.618 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 12.209 ms | 0 - 503 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 27.906 ms | 0 - 493 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 20.082 ms | 1 - 4 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 17.871 ms | 1 - 3 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® QCS8450 | 27.906 ms | 0 - 493 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 20.55 ms | 1 - 3 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 18.618 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 8.958 ms | 0 - 352 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8295P | 26.96 ms | 1 - 343 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 7.132 ms | 0 - 403 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 9.23 ms | 0 - 387 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 8.405 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® X Elite | 20.234 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 12.993 ms | 0 - 513 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 17.572 ms | 0 - 4 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 19.313 ms | 0 - 2 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8650P | 19.574 ms | 0 - 411 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8255P | 19.574 ms | 0 - 411 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 19.512 ms | 0 - 3 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 20.234 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 120.381 ms | 0 - 640 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 21.734 ms | 0 - 589 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 9.23 ms | 0 - 387 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 21.734 ms | 0 - 589 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 7.617 ms | 0 - 388 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 9.299 ms | 0 - 363 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 12.718 ms | 0 - 507 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 28.204 ms | 0 - 494 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 20.179 ms | 0 - 179 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 18.647 ms | 0 - 4 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8775P | 21.49 ms | 0 - 359 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8650P | 21.49 ms | 0 - 359 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8255P | 21.49 ms | 0 - 359 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® QCS8450 | 28.204 ms | 0 - 494 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 21.803 ms | 0 - 178 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 9.299 ms | 0 - 363 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8295P | 27.902 ms | 0 - 350 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.
