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.37, ONNX Runtime 1.23.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | Download |
| ONNX | w8a8 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.42 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.42 | Download |
| QNN_DLC | w8a8 | Universal | QAIRT 2.42 | Download |
| TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | Download |
| TFLITE | w8a8 | Universal | QAIRT 2.42, 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® X Elite | 112.756 ms | 33 - 33 MB | NPU |
| Segformer-Base | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 84.305 ms | 24 - 201 MB | NPU |
| Segformer-Base | ONNX | float | Qualcomm® QCS8550 (Proxy) | 108.769 ms | 19 - 28 MB | NPU |
| Segformer-Base | ONNX | float | Qualcomm® QCS9075 | 120.239 ms | 23 - 26 MB | NPU |
| Segformer-Base | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 74.648 ms | 21 - 160 MB | NPU |
| Segformer-Base | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 73.716 ms | 27 - 175 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® X Elite | 51.865 ms | 131 - 131 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 49.215 ms | 90 - 271 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCS6490 | 841.672 ms | 379 - 385 MB | CPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 61.921 ms | 83 - 87 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCS9075 | 68.104 ms | 89 - 92 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Qualcomm® QCM6690 | 574.842 ms | 324 - 334 MB | CPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 45.505 ms | 90 - 228 MB | NPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 412.489 ms | 323 - 333 MB | CPU |
| Segformer-Base | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 39.672 ms | 90 - 227 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 8 Gen 3 Mobile | 42.463 ms | 58 - 219 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCS6490 | 352.803 ms | 200 - 207 MB | CPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCS8550 (Proxy) | 51.706 ms | 54 - 59 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCS9075 | 56.372 ms | 58 - 61 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Qualcomm® QCM6690 | 214.217 ms | 203 - 213 MB | CPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 39.85 ms | 57 - 181 MB | NPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 7 Gen 4 Mobile | 191.097 ms | 201 - 211 MB | CPU |
| Segformer-Base | ONNX | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 34.78 ms | 58 - 187 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® X Elite | 114.563 ms | 3 - 3 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 83.817 ms | 2 - 228 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 214.645 ms | 1 - 183 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 110.097 ms | 3 - 5 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® SA8775P | 472.472 ms | 1 - 189 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS9075 | 113.605 ms | 3 - 17 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 121.904 ms | 2 - 225 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® SA7255P | 214.645 ms | 1 - 183 MB | NPU |
| Segformer-Base | QNN_DLC | float | Qualcomm® SA8295P | 122.206 ms | 3 - 181 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 75.008 ms | 3 - 197 MB | NPU |
| Segformer-Base | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 74.055 ms | 3 - 195 MB | NPU |
| Segformer-Base | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 83.556 ms | 9 - 241 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 172.201 ms | 10 - 39 MB | GPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 110.21 ms | 9 - 12 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® SA8775P | 110.706 ms | 0 - 193 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS9075 | 114.107 ms | 8 - 30 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 122.524 ms | 9 - 235 MB | NPU |
| Segformer-Base | TFLITE | float | Qualcomm® SA7255P | 172.201 ms | 10 - 39 MB | GPU |
| Segformer-Base | TFLITE | float | Qualcomm® SA8295P | 122.282 ms | 10 - 198 MB | NPU |
| Segformer-Base | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 74.86 ms | 9 - 198 MB | NPU |
| Segformer-Base | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 74.212 ms | 14 - 213 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Snapdragon® 8 Gen 3 Mobile | 10.304 ms | 1 - 214 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS6490 | 134.981 ms | 13 - 48 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS8275 (Proxy) | 170.87 ms | 15 - 45 MB | GPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS8550 (Proxy) | 14.171 ms | 2 - 5 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® SA8775P | 14.948 ms | 2 - 180 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS9075 | 12.574 ms | 2 - 12 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCM6690 | 148.583 ms | 13 - 190 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® QCS8450 (Proxy) | 18.904 ms | 2 - 213 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® SA7255P | 170.87 ms | 15 - 45 MB | GPU |
| Segformer-Base | TFLITE | w8a8 | Qualcomm® SA8295P | 17.819 ms | 2 - 184 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Snapdragon® 8 Elite For Galaxy Mobile | 7.856 ms | 2 - 173 MB | NPU |
| Segformer-Base | TFLITE | w8a8 | Snapdragon® 8 Elite Gen 5 Mobile | 7.214 ms | 2 - 188 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.
