Practical overview
When it fits
Use Samexporter when a project needs prompted segmentation from supported SAM-family models in an ONNX Runtime workflow, or when exporting those models from their original checkpoints.
Who it is for
- Computer-vision developers preparing SAM-family models for ONNX Runtime.
- Teams building self-hosted image-segmentation inference workflows.
Documented uses
- Export supported SAM-family checkpoints to ONNX models.
- Run point- or rectangle-prompted image segmentation with ONNX Runtime.
- Run text-prompted segmentation with SAM 3 using its image, language, and decoder ONNX models.
Requirements & limits
The repository is public and identifies its license as MIT. Installation instructions require Python 3.11 or newer and document a CPU runtime installation.
- Different model families require different ONNX files and may need a different runtime variant; EfficientSAM is explicitly selected with
--sam_variant efficient_sam. - SAM and MobileSAM export workflows begin with checkpoints, while the EfficientSAM guide uses official pre-existing ONNX files.
- SAM 3 uses three ONNX models and adds text prompting; its source export setup has additional NumPy and package requirements.
- The repository's MIT license does not establish the licenses of every upstream model; check the applicable model terms.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run inference with EfficientSAM-Ti ONNX files
Run point- or rectangle-prompted segmentation using the documented EfficientSAM-Ti runtime workflow.
Before you start
- Python 3.11 or newer.
- Samexporter installed with its CPU runtime extra and the documented PyTorch and torchvision versions.
- EfficientSAM-Ti encoder and decoder ONNX files.
- An input image and a prompt JSON file.
Steps
Install PyTorch 2.10.0 and torchvision 0.25.0 using the documented CPU wheel index, then install
samexporter[runtime-cpu].Download the EfficientSAM-Ti encoder and decoder ONNX files to
output_models/efficient_sam/.Run the command below with
--sam_variant efficient_sam, the encoder and decoder paths,--image,--prompt, and--outputarguments.python -m samexporter.inference
Expected outcome
The documented command writes a segmentation result to the specified output path for point or rectangle inference.
Guide limitations
- This workflow uses pre-existing EfficientSAM ONNX files; it does not export a model checkpoint.
- The example depends on the user supplying an image and a prompt JSON file.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- vietanhdev/samexporter · Official homepage title · retained in its source language

