
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.503 ms | 13 - 247 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 25.681 ms | 47 - 272 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® X2 Elite | 23.781 ms | 17 - 17 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® X Elite | 44.805 ms | 140 - 140 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 | 84.464 ms | 18 - 410 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 81.621 ms | 12 - 21 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 43.647 ms | 0 - 158 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® QCS8450 | 84.464 ms | 18 - 410 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 70.081 ms | 12 - 20 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 44.805 ms | 140 - 140 MB | NPU |
| FastSam-X | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 25.681 ms | 47 - 272 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 16.236 ms | 17 - 246 MB | NPU |
| FastSam-X | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 16.593 ms | 0 - 228 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 13.8 ms | 7 - 359 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 19.117 ms | 51 - 395 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X2 Elite | 14.729 ms | 3 - 3 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® X Elite | 30.944 ms | 67 - 67 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 | 43.903 ms | 8 - 448 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 153.107 ms | 8 - 11 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 30.284 ms | 8 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 30.385 ms | 0 - 81 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® QCS8450 | 43.903 ms | 8 - 448 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 29.611 ms | 8 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 30.944 ms | 67 - 67 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 586.485 ms | 5 - 489 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 50.322 ms | 9 - 417 MB | NPU |
| FastSam-X | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 19.117 ms | 51 - 395 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 50.322 ms | 9 - 417 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 8.816 ms | 8 - 357 MB | NPU |
| FastSam-X | ONNX | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 10.184 ms | 8 - 328 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 20.196 ms | 6 - 454 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 29.683 ms | 51 - 487 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 24.884 ms | 3 - 3 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 48.409 ms | 126 - 126 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.899 ms | 8 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 47.539 ms | 0 - 160 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 45.306 ms | 8 - 12 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 48.409 ms | 126 - 126 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 1004.896 ms | 3 - 565 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 90.224 ms | 9 - 489 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 29.683 ms | 51 - 487 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 90.224 ms | 9 - 489 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 14.963 ms | 8 - 454 MB | NPU |
| FastSam-X | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 6 Mobile | 15.652 ms | 8 - 427 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 17.392 ms | 0 - 217 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 24.967 ms | 46 - 259 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X2 Elite | 22.943 ms | 0 - 0 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® X Elite | 43.453 ms | 0 - 0 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 | 77.439 ms | 0 - 372 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 79.281 ms | 0 - 7 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 41.459 ms | 0 - 2 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® QCS8450 | 77.439 ms | 0 - 372 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 68.881 ms | 2 - 9 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 43.453 ms | 0 - 0 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 24.967 ms | 46 - 259 MB | NPU |
| FastSam-X | QNN_DLC | float | Qualcomm® SA8295P | 75.483 ms | 0 - 288 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 15.486 ms | 0 - 215 MB | NPU |
| FastSam-X | QNN_DLC | float | Snapdragon® 8 Elite Gen 6 Mobile | 15.524 ms | 0 - 218 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 11.723 ms | 2 - 323 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 17.073 ms | 43 - 359 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 13.909 ms | 7 - 7 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® X Elite | 29.8 ms | 7 - 7 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.108 ms | 2 - 407 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 148.297 ms | 7 - 13 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 29.366 ms | 5 - 12 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 29.387 ms | 5 - 15 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.108 ms | 2 - 407 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 29.8 ms | 7 - 7 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 618.576 ms | 3 - 465 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 50.935 ms | 2 - 392 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 17.073 ms | 43 - 359 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Qualcomm® SA8295P | 44.357 ms | 0 - 310 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 50.935 ms | 2 - 392 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 8.802 ms | 2 - 329 MB | NPU |
| FastSam-X | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 8.763 ms | 2 - 296 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 28.951 ms | 43 - 456 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 46.992 ms | 7 - 7 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 | 47.876 ms | 5 - 12 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 46.093 ms | 5 - 520 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.826 ms | 5 - 12 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 46.992 ms | 7 - 7 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 1040.763 ms | 3 - 538 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 84.355 ms | 2 - 455 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 28.951 ms | 43 - 456 MB | NPU |
| FastSam-X | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 84.355 ms | 2 - 455 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 17.382 ms | 4 - 260 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 24.537 ms | 29 - 276 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 | 82.176 ms | 5 - 499 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 80.03 ms | 4 - 159 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 41.702 ms | 4 - 8 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 | 82.176 ms | 5 - 499 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 68.428 ms | 4 - 158 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 24.537 ms | 29 - 276 MB | NPU |
| FastSam-X | TFLITE | float | Qualcomm® SA8295P | 74.367 ms | 5 - 325 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 15.405 ms | 3 - 251 MB | NPU |
| FastSam-X | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 15.857 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.