Segformer-Base: Optimized for Qualcomm Devices
Segformer Base is a machine learning model that predicts masks and classes of objects in an image.
This is based on the implementation of Segformer-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.1 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | Download |
| ONNX | w8a8 | Universal | QAIRT 2.42, ONNX Runtime 1.24.1 | Download |
| QNN_DLC | float | Universal | QAIRT 2.43 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.43 | Download |
| QNN_DLC | w8a8 | Universal | QAIRT 2.43 | Download |
| TFLITE | float | Universal | QAIRT 2.43, TFLite 2.17.0 | Download |
| TFLITE | w8a8 | Universal | QAIRT 2.43, TFLite 2.17.0 | Download |
For more device-specific assets and performance metrics, visit Segformer-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 Segformer-Base on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.semantic_segmentation
Model Stats:
- Model checkpoint: nvidia/segformer-b0-finetuned-ade-512-512
- Input resolution: 512x512
- Number of output classes: 150
- Number of parameters: 3.75M
- Model size (float): 14.4 MB
- Model size (w8a16): 4.57 MB
- Model size (w8a8): 3.90 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Segformer-Base | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 73.877 ms | 24 - 220 MB | NPU |
| Segformer-Base | ONNX | float | Snapdragon® X2 Elite | 72.502 ms | 34 - 34 MB | NPU |
| Segformer-Base | ONNX | float | Snapdragon® X Elite | 112.259 ms | 33 - 33 MB | NPU |
| Segformer-Base | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 82.353 ms | 23 - 254 MB | NPU |
| Segformer-Base | ONNX | float | Qualcomm® QCS8550 (Proxy) | 107.751 ms | 19 - 28 MB | NPU |
| Segformer-Base | ONNX | float | Qualcomm® QCS9075 | 114.137 ms | 23 - 26 MB | NPU |
| Segformer-Base | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 74.124 ms | 22 - 213 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 6.805 ms | 14 - 222 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® X2 Elite | 9.176 ms | 17 - 17 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® X Elite | 15.314 ms | 18 - 18 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 10.361 ms | 15 - 250 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCS6490 | 730.684 ms | 379 - 385 MB | CPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 14.847 ms | 9 - 17 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCS9075 | 20.181 ms | 11 - 14 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCM6690 | 351.933 ms | 328 - 338 MB | CPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 8.273 ms | 14 - 217 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 318.644 ms | 315 - 325 MB | CPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 4.592 ms | 13 - 212 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® X2 Elite | 4.582 ms | 4 - 4 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® X Elite | 11.682 ms | 9 - 9 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 7.593 ms | 8 - 231 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCS6490 | 273.777 ms | 194 - 202 MB | CPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 10.979 ms | 5 - 12 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCS9075 | 11.562 ms | 8 - 11 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCM6690 | 174.106 ms | 194 - 205 MB | CPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 5.553 ms | 7 - 202 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 158.066 ms | 196 - 207 MB | CPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 73.91 ms | 3 - 196 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® X2 Elite | 73.263 ms | 3 - 3 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® X Elite | 114.443 ms | 3 - 3 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 83.664 ms | 0 - 227 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 214.711 ms | 0 - 182 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 110.03 ms | 3 - 5 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® SA8775P | 100.866 ms | 0 - 188 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS9075 | 113.333 ms | 3 - 17 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 122.051 ms | 3 - 225 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® SA7255P | 214.711 ms | 0 - 182 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® SA8295P | 122.162 ms | 0 - 184 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 74.95 ms | 0 - 196 MB | NPU |
| Segformer-Base | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 74.245 ms | 15 - 210 MB | NPU |
| Segformer-Base | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 83.311 ms | 9 - 236 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 214.83 ms | 0 - 183 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 109.794 ms | 9 - 12 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® SA8775P | 101.021 ms | 9 - 197 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS9075 | 113.495 ms | 8 - 31 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 121.944 ms | 10 - 237 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® SA7255P | 214.83 ms | 0 - 183 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® SA8295P | 122.201 ms | 9 - 194 MB | NPU |
| Segformer-Base | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 74.823 ms | 8 - 199 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 7.196 ms | 2 - 184 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 10.232 ms | 1 - 212 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS6490 | 134.482 ms | 15 - 50 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 23.113 ms | 2 - 175 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 14.084 ms | 2 - 5 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® SA8775P | 14.43 ms | 2 - 177 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS9075 | 12.606 ms | 2 - 12 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCM6690 | 155.763 ms | 15 - 177 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 18.766 ms | 2 - 213 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® SA7255P | 23.113 ms | 2 - 175 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® SA8295P | 17.891 ms | 2 - 179 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 7.826 ms | 1 - 173 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Snapdragon® 7 Gen 4 Mobile | 46.501 ms | 15 - 175 MB | NPU |
License
- The license for the original implementation of Segformer-Base can be found here.
References
- SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
- Source Model Implementation
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.
