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
There are two ways to deploy this model on your device:
Option 1: Download Pre-Exported Models
Below are pre-exported model assets ready for deployment.
| Runtime | Precision | Chipset | SDK Versions | Download |
|---|---|---|---|---|
| ONNX | float | Universal | QAIRT 2.45, ONNX Runtime 1.27.1 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.45, ONNX Runtime 1.27.1 | Download |
| QNN_DLC | float | Universal | QAIRT 2.45 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.45 | Download |
| TFLITE | float | Universal | QAIRT 2.45 | Download |
For more device-specific assets and performance metrics, visit FastSam-S on Qualcomm® AI Hub.
Option 2: Export with Custom Configurations
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
This option is ideal if you need to customize the model beyond the default configuration provided here.
See our repository for FastSam-S on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.semantic_segmentation
Model Stats:
- Model checkpoint: fastsam-s.pt
- Inference latency: RealTime
- Input resolution: 640x640
- Number of parameters: 11.8M
- Model size (float): 45.1 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| FastSam-S | ONNX | float | Snapdragon® X2 Elite | 4.554 ms | 17 - 17 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® X Elite | 8.527 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 5.997 ms | 17 - 244 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 16.539 ms | 17 - 237 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.194 ms | 0 - 44 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® QCS8450 | 16.539 ms | 17 - 237 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 12.01 ms | 15 - 18 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.527 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 4.692 ms | 13 - 213 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Mobile | 4.692 ms | 13 - 213 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.642 ms | 1 - 208 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X2 Elite | 3.119 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X Elite | 7.08 ms | 10 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 4.404 ms | 8 - 264 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 11.446 ms | 8 - 266 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 28.225 ms | 8 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.675 ms | 0 - 190 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® QCS8450 | 11.446 ms | 8 - 266 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 7.007 ms | 8 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 7.08 ms | 10 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 3.279 ms | 0 - 220 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 3.279 ms | 0 - 220 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 2.69 ms | 0 - 225 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X2 Elite | 4.593 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X Elite | 8.423 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 5.85 ms | 5 - 216 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 16.075 ms | 5 - 213 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8275 | 39.17 ms | 1 - 187 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.706 ms | 5 - 133 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8775P | 11.584 ms | 2 - 184 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8650P | 11.584 ms | 2 - 184 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8255P | 11.584 ms | 2 - 184 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® QCS8450 | 16.075 ms | 5 - 213 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 11.454 ms | 7 - 17 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.423 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 4.488 ms | 5 - 195 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA7255P | 39.17 ms | 1 - 187 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8295P | 13.795 ms | 0 - 177 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 4.488 ms | 5 - 195 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.255 ms | 5 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 2.915 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X Elite | 6.052 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 3.782 ms | 2 - 233 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 8.316 ms | 2 - 233 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 23.921 ms | 2 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8275 | 13.375 ms | 1 - 195 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 5.457 ms | 2 - 4 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8775P | 5.992 ms | 1 - 197 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8650P | 5.992 ms | 1 - 197 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8255P | 5.992 ms | 1 - 197 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 8.316 ms | 2 - 233 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 5.761 ms | 2 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 6.052 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 66.101 ms | 2 - 204 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 7.769 ms | 2 - 195 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 2.675 ms | 2 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA7255P | 13.375 ms | 1 - 195 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8295P | 7.881 ms | 0 - 191 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 2.675 ms | 2 - 200 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 2.11 ms | 2 - 204 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 7.769 ms | 2 - 195 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 5.172 ms | 4 - 117 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 14.211 ms | 0 - 228 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ QCS8275 | 37.805 ms | 4 - 86 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.949 ms | 4 - 6 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8775P | 10.732 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8650P | 10.732 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8255P | 10.732 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® QCS8450 | 14.211 ms | 0 - 228 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 10.413 ms | 4 - 39 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 3.947 ms | 3 - 92 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA7255P | 37.805 ms | 4 - 86 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8295P | 13.094 ms | 4 - 195 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Mobile | 3.947 ms | 3 - 92 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.124 ms | 0 - 96 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.
