AXERA-TECH/MobileSAM
By AXERA-TECH · ↓ 4 · ♥ 0 · Updated 2026-01-30
What's in this repo
This page lists the files in AXERA-TECH/MobileSAM, including mobile_sam_decoder_slim.onnx, mobile_sam_encoder.onnx.
- 2 ONNX models (.onnx files)
- 41 files, including 17 .jpg, 8 .pyc, 6 .py, 4 .axmodel, 2 .onnx, 1 .md
- Repository size ~105 MB
- Last updated 2026-01-30
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/mobile_sam_decoder_slim.onnx | 19.6 MB | Download |
| onnx/mobile_sam_encoder.onnx | 26.7 MB | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
MobileSAM
基于MobileSAM的图像分割Pipeline,支持多种输入提示(框、点、掩码),支持650N/620E系列平台的模型推理。
支持芯片:
- AX650N
- AX620E
- AX630C
支持硬件
原始模型请参考
性能对比
- 输入图片大小 1024x1024
| Chip | Models | Latency (ms) | CMM Usage (MiB) |
|---|---|---|---|
| 650N | mobile_sam_encoder | 49.495 | 48.334 |
| 630C | mobile_sam_encoder | 520.044 | 63.231 |
| 650N | mobile_sam_decoder | 9.930 | 16.703 |
| 630C | mobile_sam_decoder | 36.382 | 14.970 |
模型转换
- 模型转换工具链Pulsar2
- 转换文档Model Convert
环境准备
- NPU Python API: pyaxengine
安装需要的python库
pip install -r requirements.txt
运行
cd python_ax
python3 main.py -i ../images/test.jpg -c 650
output:

Model info
onnx
SAM
MobileSAM
Segmentation
image-segmentation
en
base_model:qualcomm/MobileSam
base_model:quantized:qualcomm/MobileSam
license:afl-3.0
region:us
↓ 4
♥ 0
Created: 2026-01-30
Updated: 2026-01-30
View on Hugging FaceFiles (41)
.gitattributes
README.md
ax_model/mobile_sam_decoder_620E.axmodel
ax_model/mobile_sam_decoder_650.axmodel
ax_model/mobile_sam_encoder_620E.axmodel
ax_model/mobile_sam_encoder_650.axmodel
config.json
images/box_mask_box_0.jpg
images/box_mask_box_1.jpg
images/box_mask_box_2.jpg
images/box_mask_box_3.jpg
images/box_mask_ovlap_box_0.jpg
images/box_mask_ovlap_box_1.jpg
images/box_mask_ovlap_box_2.jpg
images/box_mask_ovlap_box_3.jpg
images/car.jpg
images/point_mask_ovlap_point_0.jpg
images/point_mask_ovlap_point_1.jpg
images/point_mask_ovlap_point_2.jpg
images/point_mask_point_0.jpg
images/point_mask_point_1.jpg
images/point_mask_point_2.jpg
images/test.jpg
images/truck.jpg
onnx/mobile_sam_decoder_slim.onnx
19.6 MB
ONNX
onnx/mobile_sam_encoder.onnx
26.7 MB
ONNX
python_ax/__pycache__/sam_decoder.cpython-312.pyc
python_ax/__pycache__/sam_decoder.cpython-313.pyc
python_ax/__pycache__/sam_encoder.cpython-312.pyc
python_ax/__pycache__/sam_encoder.cpython-313.pyc
python_ax/main.py
python_ax/sam_decoder.py
python_ax/sam_encoder.py
python_onnx/__pycache__/sam_decoder.cpython-312.pyc
python_onnx/__pycache__/sam_decoder.cpython-313.pyc
python_onnx/__pycache__/sam_encoder.cpython-312.pyc
python_onnx/__pycache__/sam_encoder.cpython-313.pyc
python_onnx/main.py
python_onnx/sam_decoder.py
python_onnx/sam_encoder.py
requirements.txt