FastSAM-X ONNX image segmentation model
1 min readupdated
This model is a large version of FastSAM (Fast Segment Anything) in ONNX format, optimized to run via ONNX Runtime. It enables fast object detection and isolation in images without requiring heavy frameworks. The weight set and graph come from a Qualcomm AI Hub release and are fully ready to work. The model will be useful for developers and engineers who need fast segmentation for inference across various devices.
Key features
- ONNX format for easy execution via ONNX Runtime
- Large version of the FastSAM-X architecture
- Split graph (138 KB) and weights (289 MB)
- Detailed specification of input and output tensors in the card
What you can do
- Integrate the model into a computer vision pipeline using ONNX Runtime
- Perform image segmentation with a fixed 640x640 resolution
- Extract object masks and bounding boxes for further analysis
Example
import numpy as np
import onnxruntime as ort
from PIL import Image
session = ort.InferenceSession("fastsam_x.onnx", providers=["CPUExecutionProvider"])
image = Image.open("screenshot.png").convert("RGB").resize((640, 640))
x = np.asarray(image, dtype=np.float32).transpose(2, 0, 1)[None] / 255.0
boxes, scores, mask_coeffs, mask_protos = session.run(None, {"image": x})
Read more
DetailsInput data: RGB image 1x3x640x640 (float32, values 0-1)
Output data: box candidates, confidence scores, coefficients, and mask prototypes
License: GNU Affero General Public License v3.0
Source files: Qualcomm AI Hub (qai-hub-models v0.53.1)










Comments