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.45, ONNX Runtime 1.27.1 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.45, ONNX Runtime 1.27.1 | 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:
- 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® X2 Elite | 8.375 ms | 2 - 2 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® X Elite | 19.953 ms | 175 - 175 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 13.224 ms | 0 - 548 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 29.344 ms | 1 - 1066 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 21.348 ms | 0 - 4 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 19.297 ms | 0 - 195 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® QCS8450 | 29.344 ms | 1 - 1066 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 22.606 ms | 1 - 4 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 19.953 ms | 175 - 175 MB | NPU |
| Swin-Base | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 9.91 ms | 0 - 401 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Elite Mobile | 9.91 ms | 0 - 401 MB | NPU |
| Swin-Base | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 8.179 ms | 1 - 423 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® X2 Elite | 7.001 ms | 1 - 1 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® X Elite | 16.263 ms | 92 - 92 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.468 ms | 0 - 537 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 20.772 ms | 0 - 536 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 58.018 ms | 0 - 3 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 14.352 ms | 0 - 4 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.395 ms | 0 - 99 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® QCS8450 | 20.772 ms | 0 - 536 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 16.13 ms | 0 - 3 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 16.263 ms | 92 - 92 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 107.798 ms | 0 - 690 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 17.738 ms | 0 - 620 MB | NPU |
| Swin-Base | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 8.144 ms | 0 - 417 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 8.144 ms | 0 - 417 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.538 ms | 0 - 431 MB | NPU |
| Swin-Base | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 17.738 ms | 0 - 620 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® X2 Elite | 8.443 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® X Elite | 19.307 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 12.414 ms | 0 - 515 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 28.86 ms | 0 - 502 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 20.32 ms | 1 - 4 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 53.605 ms | 1 - 363 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 18.378 ms | 1 - 419 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8775P | 21.415 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8650P | 21.415 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8255P | 21.415 ms | 1 - 362 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® QCS8450 | 28.86 ms | 0 - 502 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 21.549 ms | 3 - 5 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 19.307 ms | 1 - 1 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 9.29 ms | 1 - 367 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA7255P | 53.605 ms | 1 - 363 MB | NPU |
| Swin-Base | QNN_DLC | float | Qualcomm® SA8295P | 27.595 ms | 1 - 353 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 9.29 ms | 1 - 367 MB | NPU |
| Swin-Base | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.549 ms | 0 - 385 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 8.513 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® X Elite | 20.547 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 12.763 ms | 0 - 508 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 17.37 ms | 0 - 3 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 35.41 ms | 0 - 412 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 19.157 ms | 0 - 2 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8775P | 19.602 ms | 0 - 412 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8650P | 19.602 ms | 0 - 412 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA8255P | 19.602 ms | 0 - 412 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 24.464 ms | 0 - 2 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 20.547 ms | 0 - 0 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 123.253 ms | 0 - 934 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 21.646 ms | 0 - 603 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 9.537 ms | 0 - 404 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Qualcomm® SA7255P | 35.41 ms | 0 - 412 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 9.537 ms | 0 - 404 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 7.608 ms | 0 - 423 MB | NPU |
| Swin-Base | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 21.646 ms | 0 - 603 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 12.73 ms | 0 - 1052 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 28.87 ms | 0 - 512 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 20.923 ms | 0 - 179 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 53.494 ms | 0 - 709 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 18.814 ms | 0 - 4 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8775P | 21.931 ms | 0 - 375 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8650P | 21.931 ms | 0 - 375 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8255P | 21.931 ms | 0 - 375 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® QCS8450 | 28.87 ms | 0 - 512 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 27.028 ms | 0 - 178 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 9.644 ms | 0 - 378 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA7255P | 53.494 ms | 0 - 709 MB | NPU |
| Swin-Base | TFLITE | float | Qualcomm® SA8295P | 28.394 ms | 0 - 371 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Elite Mobile | 9.644 ms | 0 - 378 MB | NPU |
| Swin-Base | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.942 ms | 0 - 399 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.
