Image Segmentation
PyTorch
android

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.751 ms 0 - 189 MB NPU
FastSam-S ONNX float Snapdragon® 8 Elite For Galaxy Mobile 4.747 ms 0 - 183 MB NPU
FastSam-S ONNX float Snapdragon® X2 Elite 4.607 ms 17 - 17 MB NPU
FastSam-S ONNX float Snapdragon® X Elite 8.74 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 15.152 ms 17 - 235 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ IQ-8275 13.476 ms 15 - 19 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ QCS8550 (Proxy) 8.414 ms 0 - 25 MB NPU
FastSam-S ONNX float Qualcomm® QCS8450 15.152 ms 17 - 235 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ IQ-9075 12.498 ms 16 - 20 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ IQ-X7181 8.74 ms 21 - 21 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ Q-8750 4.747 ms 0 - 183 MB NPU
FastSam-S ONNX float Snapdragon® 8 Elite Extreme Gen 6 Mobile 3.119 ms 5 - 192 MB NPU
FastSam-S ONNX float Snapdragon® 8 Elite Gen 6 Mobile 3.574 ms 5 - 188 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 2.607 ms 6 - 223 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Elite For Galaxy Mobile 3.348 ms 22 - 232 MB NPU
FastSam-S ONNX w8a16 Snapdragon® X2 Elite 3.064 ms 3 - 3 MB NPU
FastSam-S ONNX w8a16 Snapdragon® X Elite 6.98 ms 6 - 6 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.375 ms 8 - 260 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ QCS6490 22.71 ms 3 - 11 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ IQ-8275 6.215 ms 3 - 12 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 6.643 ms 0 - 166 MB NPU
FastSam-S ONNX w8a16 Qualcomm® QCS8450 9.375 ms 8 - 260 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ IQ-9075 6.717 ms 3 - 12 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ IQ-X7181 6.98 ms 6 - 6 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ Q-6690 72.478 ms 9 - 224 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ Q-7790 8.484 ms 8 - 219 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ Q-8750 3.348 ms 22 - 232 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 8.484 ms 8 - 219 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Elite Extreme Gen 6 Mobile 1.806 ms 2 - 106 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Elite Gen 6 Mobile 2.162 ms 2 - 98 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 3.633 ms 5 - 227 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Snapdragon® 8 Elite For Galaxy Mobile 4.755 ms 0 - 218 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Snapdragon® X2 Elite 4.349 ms 3 - 3 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Snapdragon® X Elite 8.886 ms 17 - 17 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.181 ms 3 - 12 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 8.519 ms 0 - 206 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Qualcomm® Dragonwing™ IQ-9075 8.497 ms 3 - 12 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Qualcomm® Dragonwing™ IQ-X7181 8.886 ms 17 - 17 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Qualcomm® Dragonwing™ Q-6690 119.316 ms 8 - 240 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Qualcomm® Dragonwing™ Q-7790 13.089 ms 8 - 230 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Qualcomm® Dragonwing™ Q-8750 4.755 ms 0 - 218 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Snapdragon® 7 Gen 4 Mobile 13.089 ms 8 - 230 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Snapdragon® 8 Elite Extreme Gen 6 Mobile 2.623 ms 2 - 110 MB NPU
FastSam-S ONNX w8a16_mixed_int16 Snapdragon® 8 Elite Gen 6 Mobile 3.893 ms 2 - 212 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 3.065 ms 0 - 69 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 4.257 ms 41 - 109 MB NPU
FastSam-S QNN_DLC float Snapdragon® X2 Elite 4.385 ms 0 - 0 MB NPU
FastSam-S QNN_DLC float Snapdragon® X Elite 7.611 ms 0 - 0 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.396 ms 0 - 204 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ IQ-8275 11.996 ms 0 - 7 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ QCS8550 (Proxy) 6.974 ms 0 - 2 MB NPU
FastSam-S QNN_DLC float Qualcomm® QCS8450 13.396 ms 0 - 204 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ IQ-9075 10.376 ms 2 - 9 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ IQ-X7181 7.611 ms 0 - 0 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ Q-8750 4.257 ms 41 - 109 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8295P 12.937 ms 0 - 178 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Elite Extreme Gen 6 Mobile 2.716 ms 0 - 70 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Elite Gen 6 Mobile 3.011 ms 0 - 68 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 2.085 ms 5 - 202 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Elite For Galaxy Mobile 2.713 ms 18 - 212 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® X2 Elite 2.797 ms 7 - 7 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® X Elite 5.923 ms 7 - 7 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.481 ms 2 - 231 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ QCS6490 19.541 ms 5 - 11 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ IQ-8275 5.169 ms 5 - 12 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 5.354 ms 5 - 12 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8775P 5.842 ms 0 - 190 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8650P 5.842 ms 0 - 190 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8255P 5.842 ms 0 - 190 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® QCS8450 7.481 ms 2 - 231 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ IQ-9075 5.458 ms 7 - 14 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ IQ-X7181 5.923 ms 7 - 7 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ Q-6690 57.084 ms 2 - 200 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ Q-7790 7.855 ms 2 - 193 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ Q-8750 2.713 ms 18 - 212 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8295P 7.645 ms 0 - 192 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 7 Gen 4 Mobile 7.855 ms 2 - 193 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Elite Extreme Gen 6 Mobile 1.46 ms 2 - 84 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Elite Gen 6 Mobile 1.62 ms 2 - 188 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 3.12 ms 5 - 205 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Snapdragon® 8 Elite For Galaxy Mobile 4.137 ms 9 - 208 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Snapdragon® X2 Elite 4.283 ms 7 - 7 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Snapdragon® X Elite 8.089 ms 7 - 7 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.17 ms 5 - 12 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 7.384 ms 2 - 9 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® SA8650P 7.632 ms 0 - 194 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® SA8255P 7.632 ms 0 - 194 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® Dragonwing™ IQ-9075 7.237 ms 7 - 13 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® Dragonwing™ IQ-X7181 8.089 ms 7 - 7 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® Dragonwing™ Q-6690 107.935 ms 0 - 215 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® Dragonwing™ Q-7790 11.744 ms 2 - 205 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Qualcomm® Dragonwing™ Q-8750 4.137 ms 9 - 208 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Snapdragon® 7 Gen 4 Mobile 11.744 ms 2 - 205 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Snapdragon® 8 Elite Extreme Gen 6 Mobile 2.326 ms 2 - 92 MB NPU
FastSam-S QNN_DLC w8a16_mixed_int16 Snapdragon® 8 Elite Gen 6 Mobile 2.558 ms 2 - 192 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 3.08 ms 0 - 76 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 4.086 ms 0 - 80 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.412 ms 4 - 229 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ IQ-8275 12.059 ms 4 - 40 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ QCS8550 (Proxy) 6.963 ms 4 - 8 MB NPU
FastSam-S TFLITE float Qualcomm® SA8775P 62.518 ms 5 - 32 MB GPU
FastSam-S TFLITE float Qualcomm® SA8650P 62.518 ms 5 - 32 MB GPU
FastSam-S TFLITE float Qualcomm® SA8255P 62.518 ms 5 - 32 MB GPU
FastSam-S TFLITE float Qualcomm® QCS8450 13.412 ms 4 - 229 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ IQ-9075 10.248 ms 4 - 39 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ Q-8750 4.086 ms 0 - 80 MB NPU
FastSam-S TFLITE float Qualcomm® SA7255P 147.583 ms 4 - 31 MB GPU
FastSam-S TFLITE float Qualcomm® SA8295P 13.046 ms 0 - 192 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite Extreme Gen 6 Mobile 2.741 ms 0 - 79 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite Gen 6 Mobile 2.983 ms 0 - 79 MB NPU

License

  • The license for the original implementation of FastSam-S can be found here.

References

Community

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for qualcomm/FastSam-S