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® X2 Elite 4.587 ms 17 - 17 MB NPU
FastSam-S ONNX float Snapdragon® X Elite 8.522 ms 21 - 21 MB NPU
FastSam-S ONNX float Snapdragon® 8 Gen 3 Mobile 6.004 ms 18 - 249 MB NPU
FastSam-S ONNX float Snapdragon® 8 Gen 1 Mobile 16.632 ms 17 - 238 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ IQ-8275 13.173 ms 15 - 19 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ QCS8550 (Proxy) 8.161 ms 0 - 25 MB NPU
FastSam-S ONNX float Qualcomm® QCS8450 16.632 ms 17 - 238 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ IQ-9075 11.988 ms 15 - 18 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ IQ-X7181 8.522 ms 21 - 21 MB NPU
FastSam-S ONNX float Qualcomm® Dragonwing™ Q-8750 4.686 ms 12 - 213 MB NPU
FastSam-S ONNX float Snapdragon® 8 Elite Mobile 4.686 ms 12 - 213 MB NPU
FastSam-S ONNX float Snapdragon® 8 Elite Gen 5 Mobile 3.641 ms 3 - 212 MB NPU
FastSam-S ONNX w8a16 Snapdragon® X2 Elite 3.132 ms 9 - 9 MB NPU
FastSam-S ONNX w8a16 Snapdragon® X Elite 6.996 ms 10 - 10 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 4.381 ms 8 - 264 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Gen 1 Mobile 11.327 ms 8 - 266 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ QCS6490 28.223 ms 8 - 10 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ IQ-8275 6.444 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.327 ms 8 - 266 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ IQ-9075 7.028 ms 8 - 10 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ IQ-X7181 6.996 ms 10 - 10 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ Q-6690 71.034 ms 8 - 266 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ Q-7790 9.229 ms 8 - 228 MB NPU
FastSam-S ONNX w8a16 Qualcomm® Dragonwing™ Q-8750 3.285 ms 1 - 217 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Elite Mobile 3.285 ms 1 - 217 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 2.697 ms 1 - 226 MB NPU
FastSam-S ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 9.229 ms 8 - 228 MB NPU
FastSam-S QNN_DLC float Snapdragon® X2 Elite 4.514 ms 5 - 5 MB NPU
FastSam-S QNN_DLC float Snapdragon® X Elite 8.483 ms 5 - 5 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Gen 3 Mobile 5.871 ms 5 - 215 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Gen 1 Mobile 16.119 ms 5 - 212 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ IQ-8275 12.806 ms 5 - 16 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ IQ-8275 39.184 ms 1 - 187 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ QCS8550 (Proxy) 7.726 ms 5 - 7 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8775P 11.578 ms 0 - 180 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8650P 11.578 ms 0 - 180 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8255P 11.578 ms 0 - 180 MB NPU
FastSam-S QNN_DLC float Qualcomm® QCS8450 16.119 ms 5 - 212 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ IQ-9075 11.387 ms 5 - 15 MB NPU
FastSam-S QNN_DLC float Qualcomm® Dragonwing™ IQ-X7181 8.483 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.184 ms 1 - 187 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8295P 13.787 ms 0 - 178 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.259 ms 5 - 197 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® X2 Elite 2.837 ms 2 - 2 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® X Elite 6.087 ms 2 - 2 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Gen 3 Mobile 3.772 ms 2 - 234 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Gen 1 Mobile 8.208 ms 2 - 233 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ QCS6490 23.998 ms 2 - 8 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ IQ-8275 5.559 ms 1 - 8 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ IQ-8275 13.388 ms 0 - 193 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ QCS8550 (Proxy) 5.493 ms 2 - 177 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8775P 5.995 ms 1 - 197 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8650P 5.995 ms 1 - 197 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8255P 5.995 ms 1 - 197 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® QCS8450 8.208 ms 2 - 233 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ IQ-9075 5.756 ms 3 - 9 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ IQ-X7181 6.087 ms 2 - 2 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ Q-6690 65.977 ms 2 - 203 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ Q-7790 7.591 ms 0 - 196 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® Dragonwing™ Q-8750 2.659 ms 2 - 200 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA7255P 13.388 ms 0 - 193 MB NPU
FastSam-S QNN_DLC w8a16 Qualcomm® SA8295P 7.954 ms 0 - 191 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Elite Mobile 2.659 ms 2 - 200 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 8 Elite Gen 5 Mobile 2.108 ms 2 - 204 MB NPU
FastSam-S QNN_DLC w8a16 Snapdragon® 7 Gen 4 Mobile 7.591 ms 0 - 196 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Gen 3 Mobile 5.17 ms 4 - 118 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Gen 1 Mobile 14.048 ms 5 - 234 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ IQ-8275 11.96 ms 4 - 40 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ IQ-8275 37.807 ms 4 - 86 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ QCS8550 (Proxy) 6.927 ms 4 - 7 MB NPU
FastSam-S TFLITE float Qualcomm® SA8775P 10.729 ms 0 - 86 MB NPU
FastSam-S TFLITE float Qualcomm® SA8650P 10.729 ms 0 - 86 MB NPU
FastSam-S TFLITE float Qualcomm® SA8255P 10.729 ms 0 - 86 MB NPU
FastSam-S TFLITE float Qualcomm® QCS8450 14.048 ms 5 - 234 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ IQ-9075 10.443 ms 4 - 39 MB NPU
FastSam-S TFLITE float Qualcomm® Dragonwing™ Q-8750 3.945 ms 0 - 97 MB NPU
FastSam-S TFLITE float Qualcomm® SA7255P 37.807 ms 4 - 86 MB NPU
FastSam-S TFLITE float Qualcomm® SA8295P 13.075 ms 4 - 195 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite Mobile 3.945 ms 0 - 97 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 3.122 ms 0 - 90 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