MobileSam: Optimized for Qualcomm Devices

Transformer based encoder-decoder where prompts specify what to segment in an image thereby allowing segmentation without the need for additional training. The image encoder generates embeddings and the lightweight decoder operates on the embeddings for point and mask based image segmentation.

This is based on the implementation of MobileSam 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.1 Download
QNN_DLC float Universal QAIRT 2.43 Download
TFLITE float Universal QAIRT 2.43, TFLite 2.17.0 Download

For more device-specific assets and performance metrics, visit MobileSam 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 MobileSam on GitHub for usage instructions.

Model Details

Model Type: Model_use_case.semantic_segmentation

Model Stats:

  • Model checkpoint: vit_t
  • Input resolution: 720p (720x1280)
  • Number of parameters (SAMEncoder): 6.95M
  • Model size (SAMEncoder) (float): 26.6 MB
  • Number of parameters (SAMDecoder): 6.16M
  • Model size (SAMDecoder) (float): 23.7 MB

Performance Summary

Model Runtime Precision Chipset Inference Time (ms) Peak Memory Range (MB) Primary Compute Unit
MobileSAMDecoder ONNX float Snapdragon® X2 Elite 2.953 ms 11 - 11 MB NPU
MobileSAMDecoder ONNX float Snapdragon® X Elite 7.521 ms 11 - 11 MB NPU
MobileSAMDecoder ONNX float Snapdragon® 8 Gen 3 Mobile 4.892 ms 4 - 270 MB NPU
MobileSAMDecoder ONNX float Qualcomm® QCS8550 (Proxy) 6.988 ms 0 - 15 MB NPU
MobileSAMDecoder ONNX float Snapdragon® 8 Elite For Galaxy Mobile 3.641 ms 1 - 223 MB NPU
MobileSAMDecoder ONNX float Snapdragon® 8 Elite Gen 5 Mobile 2.886 ms 0 - 232 MB NPU
MobileSAMDecoder QNN_DLC float Snapdragon® X2 Elite 2.609 ms 4 - 4 MB NPU
MobileSAMDecoder QNN_DLC float Snapdragon® X Elite 5.309 ms 4 - 4 MB NPU
MobileSAMDecoder QNN_DLC float Snapdragon® 8 Gen 3 Mobile 3.364 ms 4 - 230 MB NPU
MobileSAMDecoder QNN_DLC float Qualcomm® QCS8275 (Proxy) 11.701 ms 0 - 199 MB NPU
MobileSAMDecoder QNN_DLC float Qualcomm® QCS8550 (Proxy) 4.844 ms 4 - 5 MB NPU
MobileSAMDecoder QNN_DLC float Qualcomm® SA8775P 5.875 ms 0 - 200 MB NPU
MobileSAMDecoder QNN_DLC float Qualcomm® QCS8450 (Proxy) 8.445 ms 0 - 220 MB NPU
MobileSAMDecoder QNN_DLC float Qualcomm® SA7255P 11.701 ms 0 - 199 MB NPU
MobileSAMDecoder QNN_DLC float Qualcomm® SA8295P 7.169 ms 0 - 193 MB NPU
MobileSAMDecoder QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 2.593 ms 0 - 200 MB NPU
MobileSAMDecoder QNN_DLC float Snapdragon® 8 Elite Gen 5 Mobile 2.151 ms 2 - 201 MB NPU
MobileSAMDecoder TFLITE float Snapdragon® 8 Gen 3 Mobile 3.877 ms 0 - 235 MB NPU
MobileSAMDecoder TFLITE float Qualcomm® QCS8275 (Proxy) 13.033 ms 0 - 202 MB NPU
MobileSAMDecoder TFLITE float Qualcomm® QCS8550 (Proxy) 5.605 ms 0 - 18 MB NPU
MobileSAMDecoder TFLITE float Qualcomm® SA8775P 6.698 ms 0 - 203 MB NPU
MobileSAMDecoder TFLITE float Qualcomm® QCS8450 (Proxy) 9.541 ms 0 - 225 MB NPU
MobileSAMDecoder TFLITE float Qualcomm® SA7255P 13.033 ms 0 - 202 MB NPU
MobileSAMDecoder TFLITE float Qualcomm® SA8295P 8.047 ms 0 - 201 MB NPU
MobileSAMDecoder TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 2.958 ms 0 - 207 MB NPU
MobileSAMDecoder TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 2.352 ms 0 - 207 MB NPU
MobileSAMEncoder ONNX float Snapdragon® X2 Elite 94.358 ms 14 - 14 MB NPU
MobileSAMEncoder ONNX float Snapdragon® X Elite 173.085 ms 12 - 12 MB NPU
MobileSAMEncoder ONNX float Snapdragon® 8 Gen 3 Mobile 125.467 ms 20 - 3025 MB NPU
MobileSAMEncoder ONNX float Qualcomm® QCS8550 (Proxy) 175.267 ms 12 - 32 MB NPU
MobileSAMEncoder ONNX float Snapdragon® 8 Elite For Galaxy Mobile 100.697 ms 9 - 1389 MB NPU
MobileSAMEncoder ONNX float Snapdragon® 8 Elite Gen 5 Mobile 88.418 ms 20 - 1523 MB NPU
MobileSAMEncoder QNN_DLC float Snapdragon® X2 Elite 51.746 ms 12 - 12 MB NPU
MobileSAMEncoder QNN_DLC float Snapdragon® X Elite 100.135 ms 12 - 12 MB NPU
MobileSAMEncoder QNN_DLC float Snapdragon® 8 Gen 3 Mobile 66.42 ms 12 - 1635 MB NPU
MobileSAMEncoder QNN_DLC float Qualcomm® QCS8275 (Proxy) 209.122 ms 0 - 1209 MB NPU
MobileSAMEncoder QNN_DLC float Qualcomm® QCS8550 (Proxy) 96.617 ms 12 - 16 MB NPU
MobileSAMEncoder QNN_DLC float Qualcomm® SA8775P 103.074 ms 0 - 1209 MB NPU
MobileSAMEncoder QNN_DLC float Qualcomm® QCS8450 (Proxy) 470.205 ms 12 - 1731 MB NPU
MobileSAMEncoder QNN_DLC float Qualcomm® SA7255P 209.122 ms 0 - 1209 MB NPU
MobileSAMEncoder QNN_DLC float Qualcomm® SA8295P 474.048 ms 0 - 1249 MB NPU
MobileSAMEncoder QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 49.865 ms 12 - 1217 MB NPU
MobileSAMEncoder QNN_DLC float Snapdragon® 8 Elite Gen 5 Mobile 48.392 ms 8 - 1319 MB NPU
MobileSAMEncoder TFLITE float Snapdragon® 8 Gen 3 Mobile 126.457 ms 0 - 1496 MB NPU
MobileSAMEncoder TFLITE float Qualcomm® QCS8275 (Proxy) 295.258 ms 4 - 1269 MB NPU
MobileSAMEncoder TFLITE float Qualcomm® QCS8550 (Proxy) 176.603 ms 0 - 3 MB NPU
MobileSAMEncoder TFLITE float Qualcomm® SA8775P 179.751 ms 0 - 1265 MB NPU
MobileSAMEncoder TFLITE float Qualcomm® QCS8450 (Proxy) 590.208 ms 0 - 3175 MB NPU
MobileSAMEncoder TFLITE float Qualcomm® SA7255P 295.258 ms 4 - 1269 MB NPU
MobileSAMEncoder TFLITE float Qualcomm® SA8295P 502.789 ms 0 - 1888 MB NPU
MobileSAMEncoder TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 97.396 ms 4 - 1267 MB NPU
MobileSAMEncoder TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 78.068 ms 4 - 1348 MB NPU

License

  • The license for the original implementation of MobileSam 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

Model tree for qualcomm/MobileSam

Quantizations
1 model

Paper for qualcomm/MobileSam