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.781 ms | 212 - 212 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® X Elite | 16.243 ms | 148 - 148 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 10.25 ms | 1 - 411 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 23.937 ms | 1 - 402 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8550 (Proxy) | 15.556 ms | 0 - 115 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8450 | 23.937 ms | 1 - 402 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Mobile | 7.835 ms | 1 - 606 MB | NPU |
| Swin-Small | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.386 ms | 1 - 616 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS9075 | 19.721 ms | 1 - 46 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS8750 | 7.835 ms | 1 - 606 MB | NPU |
| Swin-Small | ONNX | float | Qualcomm® QCS7181 | 16.243 ms | 148 - 148 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X2 Elite | 5.986 ms | 212 - 212 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® X Elite | 13.857 ms | 149 - 149 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 8.708 ms | 0 - 520 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 13.154 ms | 0 - 116 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS9075 | 15.981 ms | 0 - 45 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 5.637 ms | 0 - 449 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 6.918 ms | 0 - 441 MB | NPU |
| Swin-Small | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 13.947 ms | 0 - 387 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCM6690 | 65.285 ms | 0 - 555 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS7790 | 13.947 ms | 0 - 387 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS8750 | 6.918 ms | 0 - 441 MB | NPU |
| Swin-Small | ONNX | w8a16 | Qualcomm® QCS7181 | 13.857 ms | 149 - 149 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X2 Elite | 7.149 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® X Elite | 16.31 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 9.904 ms | 0 - 406 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 23.976 ms | 0 - 398 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8275 | 37.947 ms | 1 - 275 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 15.357 ms | 1 - 308 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8450 | 23.976 ms | 0 - 398 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 7.596 ms | 1 - 588 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA8295P | 22.669 ms | 1 - 270 MB | NPU |
| Swin-Small | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.227 ms | 0 - 600 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® SA7255P | 37.947 ms | 1 - 275 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS9075 | 19.524 ms | 3 - 5 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS8750 | 7.596 ms | 1 - 588 MB | NPU |
| Swin-Small | QNN_DLC | float | Qualcomm® QCS7181 | 16.31 ms | 1 - 1 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 7.623 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® X Elite | 17.398 ms | 0 - 0 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.731 ms | 0 - 868 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8275 | 29.302 ms | 0 - 636 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 16.21 ms | 0 - 268 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 18.882 ms | 2 - 4 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.458 ms | 0 - 640 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 8.08 ms | 0 - 622 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 17.063 ms | 0 - 652 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCM6690 | 69.138 ms | 0 - 751 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® SA7255P | 29.302 ms | 0 - 636 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS7790 | 17.063 ms | 0 - 652 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS8750 | 8.08 ms | 0 - 622 MB | NPU |
| Swin-Small | QNN_DLC | w8a16 | Qualcomm® QCS7181 | 17.398 ms | 0 - 0 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 10.144 ms | 0 - 429 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 23.361 ms | 0 - 410 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8275 | 37.401 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 15.448 ms | 0 - 3 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8775P | 70.422 ms | 0 - 33 MB | GPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8650P | 70.422 ms | 0 - 33 MB | GPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8255P | 70.422 ms | 0 - 33 MB | GPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8450 | 23.361 ms | 0 - 410 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Mobile | 7.84 ms | 0 - 304 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA8295P | 22.978 ms | 0 - 297 MB | NPU |
| Swin-Small | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.579 ms | 0 - 322 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® SA7255P | 37.401 ms | 0 - 306 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS9075 | 20.015 ms | 0 - 104 MB | NPU |
| Swin-Small | TFLITE | float | Qualcomm® QCS8750 | 7.84 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.
