
FastSam-S: 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-S 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-S 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-s.pt
- Model size (float): 45.1 MB
- Number of parameters: 11.8M
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.651 ms | 3 - 191 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 4.676 ms | 12 - 195 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® X2 Elite | 4.614 ms | 17 - 17 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® X Elite | 8.582 ms | 20 - 20 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 5.966 ms | 17 - 230 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 14.958 ms | 14 - 233 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 13.416 ms | 15 - 19 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.432 ms | 0 - 26 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® QCS8450 | 14.958 ms | 14 - 233 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 12.434 ms | 15 - 19 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.582 ms | 20 - 20 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 4.676 ms | 12 - 195 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 3.087 ms | 1 - 188 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 3.576 ms | 3 - 185 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 2.621 ms | 2 - 222 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 3.237 ms | 1 - 212 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X2 Elite | 3.049 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X Elite | 7.05 ms | 11 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 4.404 ms | 8 - 259 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 9.553 ms | 8 - 259 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 21.8 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 6.189 ms | 8 - 12 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.706 ms | 0 - 14 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® QCS8450 | 9.553 ms | 8 - 259 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 6.701 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 7.05 ms | 11 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 68.517 ms | 9 - 223 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 8.53 ms | 8 - 221 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 3.237 ms | 1 - 212 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 8.53 ms | 8 - 221 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 1.791 ms | 0 - 105 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 2.145 ms | 0 - 96 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.634 ms | 1 - 221 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 4.722 ms | 6 - 222 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.364 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 9.086 ms | 22 - 22 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 5.82 ms | 8 - 266 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 8.158 ms | 8 - 12 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.612 ms | 0 - 24 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 8.514 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 9.086 ms | 22 - 22 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 118.092 ms | 8 - 238 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 12.927 ms | 8 - 232 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 4.722 ms | 6 - 222 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 12.927 ms | 8 - 232 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 2.619 ms | 0 - 107 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 6 Mobile | 3.878 ms | 8 - 218 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.067 ms | 5 - 74 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 3.964 ms | 5 - 71 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X2 Elite | 4.454 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X Elite | 7.796 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 5.735 ms | 5 - 209 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 13.588 ms | 4 - 208 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 12.235 ms | 5 - 17 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.682 ms | 5 - 6 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8775P | 10.778 ms | 1 - 67 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8650P | 10.778 ms | 1 - 67 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8255P | 10.778 ms | 1 - 67 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® QCS8450 | 13.588 ms | 4 - 208 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 10.358 ms | 7 - 18 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 7.796 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 3.964 ms | 5 - 71 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA7255P | 37.985 ms | 1 - 68 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8295P | 12.972 ms | 1 - 179 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 2.749 ms | 5 - 70 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Gen 6 Mobile | 2.978 ms | 5 - 71 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 2.067 ms | 2 - 202 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 2.637 ms | 2 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 2.862 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X Elite | 6.017 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 3.698 ms | 2 - 230 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 7.655 ms | 2 - 230 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 19.016 ms | 1 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 5.172 ms | 0 - 7 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 5.379 ms | 2 - 102 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8775P | 5.8 ms | 0 - 190 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8650P | 5.8 ms | 0 - 190 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8255P | 5.8 ms | 0 - 190 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 7.655 ms | 2 - 230 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 5.437 ms | 3 - 10 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 6.017 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 64.645 ms | 2 - 199 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 7.829 ms | 2 - 193 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 2.637 ms | 2 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8295P | 7.649 ms | 0 - 192 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 7.829 ms | 2 - 193 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 1.432 ms | 2 - 84 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 6 Mobile | 1.607 ms | 2 - 187 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.098 ms | 2 - 204 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 4.076 ms | 2 - 201 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.227 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 8.051 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 5.121 ms | 2 - 238 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 7.177 ms | 1 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.411 ms | 2 - 4 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8775P | 7.632 ms | 0 - 194 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8650P | 7.632 ms | 0 - 194 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8255P | 7.632 ms | 0 - 194 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 7.212 ms | 1 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 8.051 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 107.487 ms | 2 - 217 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 11.428 ms | 2 - 205 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 4.076 ms | 2 - 201 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 11.428 ms | 2 - 205 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 2.304 ms | 2 - 90 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 6 Mobile | 2.523 ms | 2 - 192 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.079 ms | 0 - 76 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 3.972 ms | 3 - 87 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 5.155 ms | 4 - 114 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 13.296 ms | 4 - 229 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 11.957 ms | 4 - 41 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.975 ms | 4 - 7 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8775P | 10.679 ms | 4 - 81 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8650P | 10.679 ms | 4 - 81 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8255P | 10.679 ms | 4 - 81 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® QCS8450 | 13.296 ms | 4 - 229 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 10.25 ms | 4 - 39 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 3.972 ms | 3 - 87 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA7255P | 37.617 ms | 0 - 76 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8295P | 13.02 ms | 4 - 198 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 2.73 ms | 0 - 80 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 2.988 ms | 0 - 79 MB | NPU |
License
- The license for the original implementation of FastSam-S 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.