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.714 ms | 3 - 198 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 4.642 ms | 13 - 198 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® X2 Elite | 4.584 ms | 17 - 17 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® X Elite | 8.449 ms | 21 - 21 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.728 ms | 17 - 232 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 13.393 ms | 15 - 19 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.086 ms | 0 - 25 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® QCS8450 | 14.728 ms | 17 - 232 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 11.908 ms | 15 - 18 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.449 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 4.642 ms | 13 - 198 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 2.63 ms | 1 - 220 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 3.25 ms | 0 - 213 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X2 Elite | 3.059 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X Elite | 7.044 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.12 ms | 8 - 258 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 22.148 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 6.464 ms | 8 - 12 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.727 ms | 0 - 14 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® QCS8450 | 9.12 ms | 8 - 258 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 6.957 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 7.044 ms | 11 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 73.236 ms | 0 - 216 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 8.767 ms | 8 - 220 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 3.25 ms | 0 - 213 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 8.767 ms | 8 - 220 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.553 ms | 6 - 226 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 4.667 ms | 6 - 222 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.293 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 8.999 ms | 20 - 20 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 5.725 ms | 8 - 264 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 8.306 ms | 8 - 12 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.555 ms | 0 - 24 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 8.656 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 8.999 ms | 20 - 20 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 115.569 ms | 0 - 229 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 12.604 ms | 8 - 231 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 4.667 ms | 6 - 222 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 12.604 ms | 8 - 231 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.287 ms | 5 - 180 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 4.318 ms | 0 - 173 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X2 Elite | 4.639 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X Elite | 8.125 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 5.694 ms | 5 - 209 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 13.729 ms | 5 - 207 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 12.65 ms | 5 - 17 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.549 ms | 5 - 6 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® QCS8450 | 13.729 ms | 5 - 207 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 11.192 ms | 5 - 16 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.125 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 4.318 ms | 0 - 173 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8295P | 13.954 ms | 0 - 173 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 2.089 ms | 2 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 2.659 ms | 0 - 192 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 2.852 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X Elite | 5.951 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 3.695 ms | 2 - 229 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 7.775 ms | 2 - 227 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 18.506 ms | 1 - 7 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 5.421 ms | 2 - 10 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 5.365 ms | 2 - 14 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8650P | 5.994 ms | 1 - 195 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8255P | 5.994 ms | 1 - 195 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 7.775 ms | 2 - 227 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 5.617 ms | 1 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 5.951 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 63.52 ms | 2 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 7.681 ms | 0 - 188 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 2.659 ms | 0 - 192 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8295P | 7.602 ms | 0 - 186 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 7.681 ms | 0 - 188 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.015 ms | 2 - 202 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 3.931 ms | 2 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.171 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 8.003 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 5.168 ms | 2 - 237 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 7.336 ms | 2 - 10 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.271 ms | 2 - 127 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8775P | 7.563 ms | 0 - 193 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8650P | 7.563 ms | 0 - 193 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8255P | 7.563 ms | 0 - 193 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 7.336 ms | 1 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 8.003 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 104.082 ms | 2 - 212 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 11.466 ms | 2 - 206 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 3.931 ms | 2 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 11.466 ms | 2 - 206 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.088 ms | 0 - 76 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 3.917 ms | 4 - 86 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.209 ms | 4 - 226 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 11.828 ms | 4 - 40 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.906 ms | 4 - 6 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8775P | 63.062 ms | 5 - 36 MB | GPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8650P | 63.062 ms | 5 - 36 MB | GPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8255P | 63.062 ms | 5 - 36 MB | GPU |
| FastSam-S | TFLITE | float | Qualcomm® QCS8450 | 13.209 ms | 4 - 226 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 10.447 ms | 4 - 39 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 3.917 ms | 4 - 86 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA7255P | 147.705 ms | 5 - 32 MB | GPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8295P | 12.896 ms | 4 - 189 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.
