Download README.md from qualcomm/FastSam-S: direct link, hf CLI and curl.
- Browser
- Download file 12.5 kB
-
https://huggingface.co/qualcomm/FastSam-S/resolve/main/README.md
- Command line
-
hf download hf://qualcomm/FastSam-S/README.md
-
curl -L -o README.md https://huggingface.co/qualcomm/FastSam-S/resolve/main/README.md
library_name: pytorch
license: agpl-3.0
tags:
- android
pipeline_tag: image-segmentation
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.615 ms | 1 - 222 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 4.743 ms | 6 - 223 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.39 ms | 9 - 9 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® X Elite | 9.034 ms | 21 - 21 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.433 ms | 8 - 12 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 8.608 ms | 0 - 24 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-9075 | 8.734 ms | 8 - 11 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 9.034 ms | 21 - 21 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 117.619 ms | 8 - 240 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 12.964 ms | 8 - 231 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 4.743 ms | 6 - 223 MB | NPU |
| FastSam-S | ONNX | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 12.964 ms | 8 - 231 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.285 ms | 5 - 178 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 4.32 ms | 5 - 176 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X2 Elite | 4.5 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Snapdragon® X Elite | 8.084 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.67 ms | 4 - 209 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 12.668 ms | 5 - 17 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.534 ms | 5 - 7 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® QCS8450 | 13.67 ms | 4 - 209 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 11.204 ms | 7 - 18 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 8.084 ms | 5 - 5 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 4.32 ms | 5 - 176 MB | NPU |
| FastSam-S | QNN_DLC | float | Qualcomm® SA8295P | 13.982 ms | 0 - 172 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 2.063 ms | 2 - 197 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 2.645 ms | 0 - 192 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 3.086 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® X Elite | 5.949 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.568 ms | 2 - 228 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 18.694 ms | 4 - 11 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 5.423 ms | 1 - 8 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 5.365 ms | 2 - 4 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.568 ms | 2 - 228 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 5.635 ms | 0 - 7 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 5.949 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 61.46 ms | 2 - 198 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 7.87 ms | 2 - 190 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 2.645 ms | 0 - 192 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Qualcomm® SA8295P | 7.615 ms | 2 - 189 MB | NPU |
| FastSam-S | QNN_DLC | w8a16 | Snapdragon® 7 Gen 4 Mobile | 7.87 ms | 2 - 190 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 3.055 ms | 2 - 202 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 8 Elite For Galaxy Mobile | 4.041 ms | 2 - 199 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X2 Elite | 4.246 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® X Elite | 8.017 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.425 ms | 2 - 10 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 7.336 ms | 2 - 4 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.454 ms | 2 - 9 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ IQ-X7181 | 8.017 ms | 2 - 2 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-6690 | 112.22 ms | 2 - 213 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-7790 | 11.549 ms | 2 - 203 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Qualcomm® Dragonwing™ Q-8750 | 4.041 ms | 2 - 199 MB | NPU |
| FastSam-S | QNN_DLC | w8a16_mixed_int16 | Snapdragon® 7 Gen 4 Mobile | 11.549 ms | 2 - 203 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.
