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
Due to licensing restrictions, we cannot distribute pre-exported model assets for this model. 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
See our repository for FastSam-X on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.semantic_segmentation
Model Stats:
- Inference latency: RealTime
- Input resolution: 640x640
- Model checkpoint: fastsam-x.pt
- Model size (float): 276 MB
- Number of parameters: 72.2M
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| FastSam-X | ONNX | float | Snapdragon® X2 Elite | 24.633 ms | 16 - 16 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® X Elite | 47.179 ms | 139 - 139 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 36.194 ms | 18 - 335 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 91.418 ms | 17 - 416 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 84.536 ms | 5 - 13 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 47.831 ms | 1 - 224 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS8450 | 91.418 ms | 17 - 416 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 72.135 ms | 10 - 17 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 47.179 ms | 139 - 139 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 27.475 ms | 13 - 247 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Mobile | 27.475 ms | 13 - 247 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 20.018 ms | 12 - 264 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X2 Elite | 15.575 ms | 9 - 9 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X Elite | 33.622 ms | 72 - 72 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 24.975 ms | 2 - 455 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 54.109 ms | 9 - 462 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 184.1 ms | 6 - 11 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 33.877 ms | 6 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 34.148 ms | 0 - 393 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® QCS8450 | 54.109 ms | 9 - 462 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 31.191 ms | 6 - 11 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 33.622 ms | 72 - 72 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 674.421 ms | 0 - 546 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 61.312 ms | 8 - 432 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 19.787 ms | 6 - 364 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 19.787 ms | 6 - 364 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 12.897 ms | 6 - 370 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 61.312 ms | 8 - 432 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 26.749 ms | 9 - 9 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 51.177 ms | 126 - 126 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 38.293 ms | 0 - 537 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 52.553 ms | 6 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 51.127 ms | 0 - 128 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 48.109 ms | 6 - 11 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 51.177 ms | 126 - 126 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 1081.347 ms | 3 - 637 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 87.959 ms | 9 - 496 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 32.177 ms | 6 - 453 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Mobile | 32.177 ms | 6 - 453 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 20.534 ms | 6 - 458 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 87.959 ms | 9 - 496 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X2 Elite | 23.162 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X Elite | 44.002 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 32.755 ms | 4 - 300 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 92.695 ms | 5 - 388 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 80.225 ms | 5 - 16 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 42.981 ms | 5 - 410 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8775P | 68.478 ms | 1 - 215 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8650P | 68.478 ms | 1 - 215 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8255P | 68.478 ms | 1 - 215 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8450 | 92.695 ms | 5 - 388 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 69.007 ms | 7 - 17 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 44.002 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 25.469 ms | 5 - 228 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA7255P | 279.834 ms | 3 - 217 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8295P | 77.699 ms | 0 - 298 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 25.469 ms | 5 - 228 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 17.959 ms | 5 - 237 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 15.22 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X Elite | 31.305 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 22.384 ms | 2 - 420 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 52.541 ms | 2 - 417 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 179.183 ms | 4 - 10 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 31.044 ms | 2 - 9 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 30.973 ms | 3 - 4 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8775P | 28.441 ms | 0 - 321 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8650P | 28.441 ms | 0 - 321 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8255P | 28.441 ms | 0 - 321 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 52.541 ms | 2 - 417 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 28.678 ms | 4 - 10 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 31.305 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 688.251 ms | 3 - 480 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 54.148 ms | 2 - 399 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 18.511 ms | 2 - 330 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA7255P | 86.257 ms | 2 - 320 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8295P | 45.084 ms | 0 - 318 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 18.511 ms | 2 - 330 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 12.21 ms | 2 - 332 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 54.148 ms | 2 - 399 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 26.484 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 48.16 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 35.611 ms | 2 - 511 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 47.971 ms | 2 - 9 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 46.548 ms | 2 - 5 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8775P | 43.739 ms | 1 - 411 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8650P | 43.739 ms | 1 - 411 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8255P | 43.739 ms | 1 - 411 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 44.377 ms | 1 - 7 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 48.16 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 1053.648 ms | 3 - 564 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 90.692 ms | 2 - 464 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 32.224 ms | 2 - 424 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA7255P | 148.818 ms | 2 - 410 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Mobile | 32.224 ms | 2 - 424 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 20.999 ms | 2 - 423 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 90.692 ms | 2 - 464 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 32.549 ms | 4 - 421 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 91.267 ms | 5 - 505 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 80.216 ms | 4 - 159 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 42.363 ms | 4 - 9 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8775P | 67.975 ms | 5 - 258 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8650P | 67.975 ms | 5 - 258 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8255P | 67.975 ms | 5 - 258 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS8450 | 91.267 ms | 5 - 505 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 68.642 ms | 4 - 158 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 25.519 ms | 4 - 261 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA7255P | 279.371 ms | 5 - 258 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8295P | 77.152 ms | 5 - 335 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Mobile | 25.519 ms | 4 - 261 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 17.578 ms | 0 - 262 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.
