Image Segmentation
sam2
ONNX
TensorRT

SAM 2.1 Small, image mode, ONNX

Encoder plus prompt decoder. No video. truck.jpg only, 1200Γ—1800. Do not quote the tiny 16-image means as Small.

Encoder input image float32 1Γ—3Γ—1024Γ—1024, stretch, ImageNet mean/std on 0–1
Decoder point or box. x = x_px / width * 1024. Labels 0, 1, 2, 3
Outputs masks logits (threshold 0), scores [1, 3]
Files onnx/encoder_{fp32,fp16}.onnx, onnx/decoder_{fp32,fp16}.onnx

FP32 IoU 1.0. FP16 point 0.99994, box 0.99987. Point area 638,200. Small FP16 keep-list is empty (I/O FP32).

from huggingface_hub import hf_hub_download
import onnxruntime as ort

enc = hf_hub_download("christianengel/SAM2.1-Small-Image-ONNX", "onnx/encoder_fp16.onnx")
session = ort.InferenceSession(enc, providers=["CPUExecutionProvider"])
jetson/build_tensorrt.sh encoder_fp16.onnx 1024 1024

No Small encoder time. Jetson Orin was not available. Ravi et al., https://arxiv.org/abs/2408.00714.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for christianengel/SAM2.1-Small-Image-ONNX

Quantized
(5)
this model

Collection including christianengel/SAM2.1-Small-Image-ONNX

Paper for christianengel/SAM2.1-Small-Image-ONNX