FastSam-X: Optimized for Qualcomm Devices
The Fast Segment Anything Model (FastSAM) is a novel, real-time CNN-based solution for the Segment Anything task. This task is designed to segment any object within an image based on various possible user interaction prompts. The model performs competitively despite significantly reduced computation, making it a practical choice for a variety of vision tasks.
This is based on the implementation of FastSam-X 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 FastSam-X 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 FastSam-X on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.semantic_segmentation
Model Stats:
- Model checkpoint: fastsam-x.pt
- Inference latency: RealTime
- Input resolution: 640x640
- Number of parameters: 72.2M
- Model size (float): 276 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| FastSam-X | ONNX | float | Snapdragon® X2 Elite | 24.41 ms | 17 - 17 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® X Elite | 47.023 ms | 139 - 139 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 36.186 ms | 2 - 320 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 97.029 ms | 17 - 415 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 48.161 ms | 0 - 169 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS8450 | 97.029 ms | 17 - 415 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 72.529 ms | 12 - 19 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 47.023 ms | 139 - 139 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 27.533 ms | 13 - 244 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Mobile | 27.533 ms | 13 - 244 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 19.891 ms | 12 - 266 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X2 Elite | 15.635 ms | 9 - 9 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X Elite | 33.634 ms | 72 - 72 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 24.748 ms | 0 - 453 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 58.179 ms | 1 - 455 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 183.988 ms | 6 - 11 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 34.28 ms | 0 - 81 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® QCS8450 | 58.179 ms | 1 - 455 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 33.613 ms | 6 - 11 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 33.634 ms | 72 - 72 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 19.989 ms | 6 - 364 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 19.989 ms | 6 - 364 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 12.897 ms | 6 - 370 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X2 Elite | 23.182 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X Elite | 44.046 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 32.837 ms | 5 - 302 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 92.096 ms | 2 - 384 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8275 | 279.847 ms | 0 - 215 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 43.111 ms | 5 - 7 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8775P | 68.48 ms | 1 - 214 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8650P | 68.48 ms | 1 - 214 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8255P | 68.48 ms | 1 - 214 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8450 | 92.096 ms | 2 - 384 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 71.034 ms | 5 - 15 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 44.046 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 25.399 ms | 5 - 225 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA7255P | 279.847 ms | 0 - 215 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8295P | 77.696 ms | 0 - 298 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 25.399 ms | 5 - 225 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 17.976 ms | 5 - 238 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 15.167 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X Elite | 31.422 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 22.331 ms | 2 - 421 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 50.538 ms | 2 - 416 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 179.392 ms | 3 - 10 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8275 | 86.274 ms | 0 - 319 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 31.238 ms | 3 - 5 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8775P | 28.463 ms | 1 - 323 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8650P | 28.463 ms | 1 - 323 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8255P | 28.463 ms | 1 - 323 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 50.538 ms | 2 - 416 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 28.79 ms | 2 - 8 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 31.422 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 690.956 ms | 3 - 480 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 53.458 ms | 2 - 398 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 18.568 ms | 2 - 331 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA7255P | 86.274 ms | 0 - 319 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8295P | 45.085 ms | 0 - 318 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 18.568 ms | 2 - 331 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 12.009 ms | 2 - 333 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 53.458 ms | 2 - 398 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 32.398 ms | 4 - 418 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 95.151 ms | 5 - 506 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ QCS8275 | 279.375 ms | 5 - 257 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 43.623 ms | 5 - 8 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8775P | 67.958 ms | 5 - 257 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8650P | 67.958 ms | 5 - 257 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8255P | 67.958 ms | 5 - 257 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS8450 | 95.151 ms | 5 - 506 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 68.418 ms | 3 - 156 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 25.634 ms | 3 - 260 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA7255P | 279.375 ms | 5 - 257 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8295P | 77.128 ms | 5 - 337 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Mobile | 25.634 ms | 3 - 260 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 17.447 ms | 2 - 266 MB | NPU |
License
- The license for the original implementation of FastSam-X 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.
