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:
- 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.61 ms | 17 - 17 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® X Elite | 8.388 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 5.99 ms | 18 - 249 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 16.658 ms | 17 - 241 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 13.198 ms | 15 - 19 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.228 ms | 0 - 25 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® QCS8450 | 16.658 ms | 17 - 241 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 11.974 ms | 15 - 18 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.388 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 4.71 ms | 12 - 215 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Mobile | 4.71 ms | 12 - 215 MB | NPU |
| FastSam-S | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.643 ms | 3 - 213 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X2 Elite | 3.131 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® X Elite | 7.011 ms | 10 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 4.373 ms | 8 - 264 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 11.698 ms | 9 - 267 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 27.98 ms | 8 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 6.455 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.657 ms | 0 - 14 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® QCS8450 | 11.698 ms | 9 - 267 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 7.039 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 7.011 ms | 10 - 10 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 70.828 ms | 0 - 257 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 9.12 ms | 8 - 229 MB | NPU |
| FastSam-S | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 3.28 ms | 1 - 217 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 3.28 ms | 1 - 217 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 2.687 ms | 1 - 223 MB | NPU |
| FastSam-S | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 9.12 ms | 8 - 229 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X2 Elite | 4.588 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X Elite | 8.386 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 5.861 ms | 5 - 218 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 15.955 ms | 5 - 212 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 12.88 ms | 5 - 16 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 39.191 ms | 0 - 186 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.794 ms | 5 - 14 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8775P | 11.597 ms | 1 - 183 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8650P | 11.597 ms | 1 - 183 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8255P | 11.597 ms | 1 - 183 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® QCS8450 | 15.955 ms | 5 - 212 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 11.816 ms | 5 - 15 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.386 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 4.477 ms | 5 - 195 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA7255P | 39.191 ms | 0 - 186 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8295P | 13.769 ms | 0 - 178 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 4.477 ms | 5 - 195 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.253 ms | 5 - 197 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 2.859 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X Elite | 5.97 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 3.787 ms | 2 - 236 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Gen 1 Mobile | 8.28 ms | 2 - 233 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 24.029 ms | 1 - 7 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 5.564 ms | 2 - 9 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 13.386 ms | 0 - 193 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 5.474 ms | 2 - 4 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8775P | 5.996 ms | 1 - 196 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8650P | 5.996 ms | 1 - 196 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8255P | 5.996 ms | 1 - 196 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® QCS8450 | 8.28 ms | 2 - 233 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 6.989 ms | 2 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 5.97 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 65.108 ms | 2 - 203 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 7.608 ms | 2 - 196 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 2.66 ms | 0 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA7255P | 13.386 ms | 0 - 193 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8295P | 7.895 ms | 0 - 191 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 2.66 ms | 0 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 2.107 ms | 2 - 204 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 7.608 ms | 2 - 196 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 5.164 ms | 4 - 118 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 14.071 ms | 6 - 235 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 11.963 ms | 4 - 40 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 37.787 ms | 4 - 86 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 6.973 ms | 4 - 7 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8775P | 10.736 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8650P | 10.736 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8255P | 10.736 ms | 4 - 90 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® QCS8450 | 14.071 ms | 6 - 235 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 10.46 ms | 4 - 39 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 3.941 ms | 3 - 101 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA7255P | 37.787 ms | 4 - 86 MB | NPU |
| FastSam-S | TFLITE | float | Qualcomm® SA8295P | 13.077 ms | 4 - 195 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Mobile | 3.941 ms | 3 - 101 MB | NPU |
| FastSam-S | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 3.12 ms | 0 - 89 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.
