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® X2 Elite | 4.561 ms | 17 - 17 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® X Elite | 8.469 ms | 20 - 20 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 5.983 ms | 17 - 246 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 16.649 ms | 17 - 239 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 13.231 ms | 15 - 19 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.193 ms | 0 - 26 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® QCS8450 | 16.649 ms | 17 - 239 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 11.971 ms | 15 - 18 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.469 ms | 20 - 20 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 4.682 ms | 13 - 214 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Mobile | 4.682 ms | 13 - 214 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.645 ms | 3 - 212 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X2 Elite | 3.138 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X Elite | 7.096 ms | 10 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 4.383 ms | 8 - 264 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 11.616 ms | 0 - 256 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 28.302 ms | 8 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 6.446 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.654 ms | 0 - 15 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® QCS8450 | 11.616 ms | 0 - 256 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 7.056 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 7.096 ms | 10 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 70.156 ms | 8 - 266 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 9.135 ms | 8 - 229 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 3.298 ms | 0 - 217 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 3.298 ms | 0 - 217 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 2.686 ms | 0 - 223 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 9.135 ms | 8 - 229 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.434 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 9.069 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 5.807 ms | 8 - 270 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 8.411 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.6 ms | 0 - 24 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 8.773 ms | 8 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 9.069 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 108.165 ms | 10 - 269 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 13.022 ms | 8 - 234 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 4.769 ms | 6 - 226 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Mobile | 4.769 ms | 6 - 226 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 3.635 ms | 2 - 230 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 13.022 ms | 8 - 234 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X2 Elite | 4.595 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X Elite | 8.443 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 5.841 ms | 0 - 211 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 16.156 ms | 5 - 212 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 12.875 ms | 5 - 16 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.705 ms | 5 - 11 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8775P | 11.593 ms | 1 - 182 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8650P | 11.593 ms | 1 - 182 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8255P | 11.593 ms | 1 - 182 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® QCS8450 | 16.156 ms | 5 - 212 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 11.56 ms | 5 - 15 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.443 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 4.457 ms | 5 - 195 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA7255P | 39.219 ms | 0 - 186 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8295P | 13.764 ms | 0 - 178 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 4.457 ms | 5 - 195 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.257 ms | 4 - 195 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 2.883 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X Elite | 6.126 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 3.784 ms | 2 - 233 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 8.478 ms | 2 - 234 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 23.707 ms | 2 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 5.57 ms | 1 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 5.476 ms | 2 - 4 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8775P | 5.994 ms | 1 - 195 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 | 8.478 ms | 2 - 234 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 5.784 ms | 2 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 6.126 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 65.604 ms | 2 - 203 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 7.64 ms | 2 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 2.666 ms | 0 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA7255P | 13.396 ms | 1 - 194 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8295P | 7.918 ms | 0 - 192 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 2.666 ms | 0 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 2.106 ms | 2 - 205 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 7.64 ms | 2 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.284 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 8.173 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Gen 3 Mobile | 5.199 ms | 2 - 242 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-8275 | 7.451 ms | 0 - 7 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.408 ms | 2 - 4 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8775P | 7.678 ms | 1 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8650P | 7.678 ms | 1 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA8255P | 7.678 ms | 1 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 7.426 ms | 0 - 6 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 8.173 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 112.443 ms | 2 - 219 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 10.827 ms | 2 - 211 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 4.16 ms | 2 - 202 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® SA7255P | 20.652 ms | 2 - 199 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Mobile | 4.16 ms | 2 - 202 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 Mobile | 3.114 ms | 2 - 207 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 10.827 ms | 2 - 211 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 5.174 ms | 0 - 113 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 14.125 ms | 4 - 233 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 11.943 ms | 4 - 40 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.972 ms | 0 - 3 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8775P | 10.703 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8650P | 10.703 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8255P | 10.703 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® QCS8450 | 14.125 ms | 4 - 233 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 10.473 ms | 4 - 39 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 3.959 ms | 3 - 100 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA7255P | 37.806 ms | 4 - 86 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8295P | 13.042 ms | 4 - 195 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Mobile | 3.959 ms | 3 - 100 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.121 ms | 0 - 90 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.
