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.25.0 | Download |
| QNN_DLC | float | 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.677 ms | 176 - 176 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® X Elite | 47.169 ms | 144 - 144 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 37.26 ms | 18 - 323 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 95.669 ms | 17 - 405 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS8550 (Proxy) | 46.734 ms | 0 - 158 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS8450 | 95.669 ms | 17 - 405 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Mobile | 27.7 ms | 12 - 242 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 19.596 ms | 13 - 260 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS9075 | 73.66 ms | 12 - 58 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS8750 | 27.7 ms | 12 - 242 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS7181 | 47.169 ms | 144 - 144 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X2 Elite | 23.203 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X Elite | 44.036 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 32.796 ms | 2 - 300 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 91.676 ms | 4 - 385 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8275 | 279.864 ms | 1 - 216 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 43.014 ms | 5 - 7 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8450 | 91.676 ms | 4 - 385 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 25.6 ms | 0 - 223 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8295P | 77.754 ms | 0 - 298 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 17.523 ms | 5 - 237 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA7255P | 279.864 ms | 1 - 216 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS9075 | 71.176 ms | 7 - 17 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8750 | 25.6 ms | 0 - 223 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS7181 | 44.036 ms | 5 - 5 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 32.538 ms | 21 - 436 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 93.102 ms | 5 - 507 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS8275 | 279.412 ms | 5 - 257 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 42.53 ms | 4 - 9 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8775P | 532.533 ms | 5 - 30 MB | GPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8650P | 532.533 ms | 5 - 30 MB | GPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8255P | 532.533 ms | 5 - 30 MB | GPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS8450 | 93.102 ms | 5 - 507 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Mobile | 25.615 ms | 3 - 261 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8295P | 77.163 ms | 5 - 335 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 17.11 ms | 0 - 261 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA7255P | 279.412 ms | 5 - 257 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS9075 | 70.199 ms | 4 - 158 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS8750 | 25.615 ms | 3 - 261 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.
