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.42, ONNX Runtime 1.24.3 Download
QNN_DLC float 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® 8 Elite Gen 5 Mobile 3.613 ms 0 - 213 MB NPU
FastSam-S ONNX float Snapdragon® 8 Elite Mobile 4.725 ms 11 - 217 MB NPU
FastSam-S ONNX float Snapdragon® X2 Elite 4.51 ms 21 - 21 MB NPU
FastSam-S ONNX float Snapdragon® X Elite 8.751 ms 20 - 20 MB NPU
FastSam-S ONNX float Snapdragon® X Elite 8.751 ms 20 - 20 MB NPU
FastSam-S ONNX float Snapdragon® 8 Gen 3 Mobile 6.047 ms 16 - 251 MB NPU
FastSam-S ONNX float Qualcomm® QCS8550 (Proxy) 8.215 ms 0 - 27 MB NPU
FastSam-S ONNX float Qualcomm® QCS9075 13.653 ms 12 - 14 MB NPU
FastSam-S ONNX float Snapdragon® 8 Elite For Galaxy Mobile 4.725 ms 11 - 217 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Elite Gen 5 Mobile 3.131 ms 5 - 196 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Elite Mobile 4.477 ms 5 - 196 MB NPU
FastSam-S QNN_DLC float Snapdragon® X2 Elite 4.594 ms 5 - 5 MB NPU
FastSam-S QNN_DLC float Snapdragon® X Elite 8.222 ms 5 - 5 MB NPU
FastSam-S QNN_DLC float Snapdragon® X Elite 8.222 ms 5 - 5 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Gen 3 Mobile 5.845 ms 5 - 218 MB NPU
FastSam-S QNN_DLC float Qualcomm® QCS8275 (Proxy) 39.252 ms 1 - 187 MB NPU
FastSam-S QNN_DLC float Qualcomm® QCS8550 (Proxy) 7.661 ms 5 - 12 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8775P 11.589 ms 0 - 182 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8775P 11.589 ms 0 - 182 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8775P 11.589 ms 0 - 182 MB NPU
FastSam-S QNN_DLC float Qualcomm® QCS9075 10.915 ms 5 - 15 MB NPU
FastSam-S QNN_DLC float Qualcomm® QCS8450 (Proxy) 16.089 ms 4 - 213 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA7255P 39.252 ms 1 - 187 MB NPU
FastSam-S QNN_DLC float Qualcomm® SA8295P 13.773 ms 0 - 178 MB NPU
FastSam-S QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 4.477 ms 5 - 196 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 3.017 ms 0 - 98 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite Mobile 3.938 ms 3 - 102 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Gen 3 Mobile 5.161 ms 0 - 116 MB NPU
FastSam-S TFLITE float Qualcomm® QCS8275 (Proxy) 37.811 ms 4 - 85 MB NPU
FastSam-S TFLITE float Qualcomm® QCS8550 (Proxy) 6.965 ms 4 - 7 MB NPU
FastSam-S TFLITE float Qualcomm® SA8775P 10.745 ms 0 - 85 MB NPU
FastSam-S TFLITE float Qualcomm® SA8775P 10.745 ms 0 - 85 MB NPU
FastSam-S TFLITE float Qualcomm® SA8775P 10.745 ms 0 - 85 MB NPU
FastSam-S TFLITE float Qualcomm® QCS9075 10.669 ms 4 - 39 MB NPU
FastSam-S TFLITE float Qualcomm® QCS8450 (Proxy) 14.121 ms 4 - 234 MB NPU
FastSam-S TFLITE float Qualcomm® SA7255P 37.811 ms 4 - 85 MB NPU
FastSam-S TFLITE float Qualcomm® SA8295P 13.044 ms 4 - 196 MB NPU
FastSam-S TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 3.938 ms 3 - 102 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