--- license: other tags: - image-segmentation - mask-generation - sam - sam2 - segment-anything - onnx - jetson - promptable-segmentation --- # SAM 2.1 Hiera-Large — ONNX (encoder + decoder) Meta Segment Anything Model 2.1 (Hiera-Large, ~224 M params) exported as two ONNX subgraphs: image encoder (1024x1024 RGB → multi-scale embeddings) and prompt+mask decoder (re-queriable per click/box). Verified end-to-end on Jetson Orin Nano FP16 TRT: encoder 371 ms/run, decoder 8.2 ms/run. This is a private mirror prepared for the **robot_perception_scoring** project ([github.com/JSBAICenter/Nvidia_Edge_work_arounds](https://github.com/JSBAICenter/Nvidia_Edge_work_arounds), branch `orin_yolo`). It bundles the original source weights together with an ONNX export and a TensorRT FP16 engine built on a Jetson Orin Nano (8 GB). ## Files in this repo | Role | Filename | Size | SHA-256 | |---|---|---|---| | `encoder_onnx` | `sam2.1_hiera_large_encoder.onnx` | 812.9 MB | `0062225519ac4a9b…` | | `decoder_onnx` | `sam2.1_hiera_large_decoder.onnx` | 27.8 MB | `5c2fb75ebe9b3073…` | ## How to load - **encoder_onnx:** `onnxruntime.InferenceSession` — input `image (1,3,1024,1024) f32`, outputs `image_embed`, `high_res_feats_0/1` - **decoder_onnx:** `onnxruntime.InferenceSession` — feed encoder outputs + `point_coords (1,N,2) f32` (1024-space px) + `point_labels (1,N) int32` + zeroed `mask_input`/`has_mask_input` The `.engine` artifact is **hardware-specific** to Jetson Orin Nano (Ampere `sm_87`, TensorRT 10.3, CUDA 12.6, FP16). It will not load on other Jetson families, other TensorRT versions, or x86 GPUs. Other users should rebuild from the `.onnx` via `python -m tools.build_engines` in the linked GitHub repo. ## Build environment - **JetPack tegra release:** # R36 (release), REVISION: 4.7, GCID: 42132812, BOARD: generic, EABI: aarch64, DATE: Thu Sep 18 22:54:44 UTC 2025 - **CUDA:** Cuda compilation tools, release 12.6, V12.6.68 - **TensorRT:** 10.3.0 ## Attribution Original weights: `sam2.1_hiera_large.pt` from https://dl.fbaipublicfiles.com/segment_anything_2/092824/ (facebookresearch/sam2). Exported via the wrappers in `image/sam2/export_sam2.py` (opset 17, torch.onnx.export). ## License Apache 2.0, per facebookresearch/sam2. No additional restrictions imposed by this mirror.