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® 8 Elite Gen 5 For Galaxy Mobile | 18.485 ms | 12 - 245 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 25.822 ms | 12 - 235 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® X2 Elite | 23.78 ms | 17 - 17 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® X Elite | 44.592 ms | 139 - 139 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 33.662 ms | 17 - 323 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 85.432 ms | 17 - 409 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 82.227 ms | 5 - 14 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 43.285 ms | 0 - 158 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS8450 | 85.432 ms | 17 - 409 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 70.675 ms | 10 - 18 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 44.592 ms | 139 - 139 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 25.822 ms | 12 - 235 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 16.07 ms | 1 - 229 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 16.68 ms | 1 - 228 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 13.855 ms | 6 - 359 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 19.407 ms | 6 - 350 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X2 Elite | 14.822 ms | 9 - 9 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X Elite | 31.288 ms | 71 - 71 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 21.375 ms | 2 - 438 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 44.991 ms | 0 - 441 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 152.423 ms | 6 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 30.459 ms | 6 - 13 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 30.201 ms | 0 - 536 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® QCS8450 | 44.991 ms | 0 - 441 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 29.45 ms | 6 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 31.288 ms | 71 - 71 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 594.313 ms | 0 - 487 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 49.991 ms | 8 - 418 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 19.407 ms | 6 - 350 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 49.991 ms | 8 - 418 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 8.796 ms | 8 - 357 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 10.297 ms | 3 - 322 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 19.675 ms | 6 - 447 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 29.807 ms | 6 - 439 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 24.95 ms | 9 - 9 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 48.895 ms | 130 - 130 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 35.43 ms | 0 - 525 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 48.964 ms | 6 - 13 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 47.946 ms | 0 - 160 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 45.094 ms | 6 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 48.895 ms | 130 - 130 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 1012.622 ms | 0 - 553 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 89.043 ms | 9 - 480 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 29.807 ms | 6 - 439 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 89.043 ms | 9 - 480 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 15.064 ms | 8 - 445 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 6 Mobile | 15.576 ms | 8 - 420 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 17.404 ms | 4 - 221 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 24.588 ms | 5 - 216 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X2 Elite | 34.913 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X Elite | 43.151 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 32.45 ms | 5 - 293 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 78.8 ms | 0 - 372 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 79.724 ms | 5 - 17 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 41.356 ms | 5 - 7 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8450 | 78.8 ms | 0 - 372 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 67.315 ms | 5 - 16 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 43.151 ms | 5 - 5 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 24.588 ms | 5 - 216 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA7255P | 278.841 ms | 2 - 216 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 15.511 ms | 5 - 219 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Gen 6 Mobile | 15.529 ms | 5 - 220 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 11.913 ms | 2 - 322 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 17.255 ms | 2 - 319 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 13.906 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X Elite | 30.045 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 20.609 ms | 2 - 407 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 44.224 ms | 2 - 408 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 148.209 ms | 2 - 9 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 28.987 ms | 2 - 10 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 29.751 ms | 2 - 297 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8650P | 26.694 ms | 1 - 307 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8255P | 26.694 ms | 1 - 307 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 44.224 ms | 2 - 408 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 27.305 ms | 2 - 9 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 30.045 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 608.229 ms | 2 - 465 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 50.297 ms | 2 - 392 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 17.255 ms | 2 - 319 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8295P | 44.389 ms | 0 - 309 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 50.297 ms | 2 - 392 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 8.852 ms | 2 - 328 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 8.782 ms | 2 - 295 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 29.412 ms | 2 - 408 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 47.672 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 34.243 ms | 2 - 501 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 48.085 ms | 2 - 10 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 47.106 ms | 2 - 4 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8775P | 43.637 ms | 1 - 397 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8650P | 43.637 ms | 1 - 397 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8255P | 43.637 ms | 1 - 397 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 44.304 ms | 4 - 11 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 47.672 ms | 2 - 2 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 1032.611 ms | 2 - 530 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 84.611 ms | 2 - 444 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 29.412 ms | 2 - 408 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA7255P | 148.067 ms | 1 - 398 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 84.611 ms | 2 - 444 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 16.949 ms | 0 - 256 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 24.591 ms | 3 - 249 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 32.194 ms | 3 - 412 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 81.463 ms | 5 - 499 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 79.753 ms | 4 - 159 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 41.931 ms | 4 - 8 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8775P | 67.363 ms | 5 - 249 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8650P | 67.363 ms | 5 - 249 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8255P | 67.363 ms | 5 - 249 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® QCS8450 | 81.463 ms | 5 - 499 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 24.591 ms | 3 - 249 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8295P | 74.357 ms | 5 - 325 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 15.41 ms | 5 - 254 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 15.462 ms | 4 - 256 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.
