Instructions to use nrl-ai/samexporter-onnx-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sam2
How to use nrl-ai/samexporter-onnx-models with sam2:
# Use SAM2 with images import torch from sam2.sam2_image_predictor import SAM2ImagePredictor predictor = SAM2ImagePredictor.from_pretrained("nrl-ai/samexporter-onnx-models") with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): predictor.set_image(<your_image>) masks, _, _ = predictor.predict(<input_prompts>)# Use SAM2 with videos import torch from sam2.sam2_video_predictor import SAM2VideoPredictor predictor = SAM2VideoPredictor.from_pretrained("nrl-ai/samexporter-onnx-models") with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): state = predictor.init_state(<your_video>) # add new prompts and instantly get the output on the same frame frame_idx, object_ids, masks = predictor.add_new_points(state, <your_prompts>) # propagate the prompts to get masklets throughout the video for frame_idx, object_ids, masks in predictor.propagate_in_video(state): ... - Notebooks
- Google Colab
- Kaggle
|
Download PROVENANCE.md from nrl-ai/samexporter-onnx-models: direct link, hf CLI and curl.
- Browser
- Download file 1.74 kB
-
https://huggingface.co/nrl-ai/samexporter-onnx-models/resolve/main/PROVENANCE.md
- Command line
-
hf download hf://nrl-ai/samexporter-onnx-models/PROVENANCE.md
-
curl -L -o PROVENANCE.md https://huggingface.co/nrl-ai/samexporter-onnx-models/resolve/main/PROVENANCE.md
1.74 kB
Artifact provenance
Generated and checked through 2026-08-31 with ONNX opset 18.
| Directory | Upstream model/source revision | Export path |
|---|---|---|
sam_vit_b/ |
checkpoint sam_vit_b_01ec64.pth SHA-256 ec2df627...c912; facebookresearch/segment-anything dca509fe793f601edb92606367a655c15ac00fdf |
SAMExporter encoder with embedded preprocessing; single-mask decoder |
mobile_sam/ |
checkpoint SHA-256 6dbb9052...6c2f; ChaoningZhang/MobileSAM f706ad9c4eb7f219c00d9050e46328518ffb65d2 |
SAMExporter TinyViT encoder with embedded preprocessing; single-mask decoder |
efficient_sam_ti/ |
yunyangx/EfficientSAM 1cf49585c39567bfc49e991ab8eb31f491ad4877; code yformer/EfficientSAM d525f622e6f640acf5a0fc37c7ca1f243da5bde0 |
Official upstream ONNX files, unmodified |
efficient_sam_s/ |
yunyangx/EfficientSAM artifact revision d53228e3f6dee607309453f54a22c40c2a10204c; code yformer/EfficientSAM d525f622e6f640acf5a0fc37c7ca1f243da5bde0 |
Official upstream ONNX files, unmodified; real AnyLearning in-process and authenticated-server validation |
sam2_1_hiera_tiny/ |
checkpoint sam2.1_hiera_tiny.pt SHA-256 7402e0d8...be69; facebookresearch/sam2 2b90b9f5ceec907a1c18123530e92e794ad901a4 |
SAMExporter split image encoder and dynamic-prompt decoder |
sam3/ |
facebook/sam3 revision 3c879f39826c281e95690f02c7821c4de09afae7; checkpoint SHA-256 9999e234...c9e; facebookresearch/sam3 660a5e9e1b8b4c02c0ad97229b88a09a6e4ff5b7 |
SAMExporter image encoder, language encoder, and raw-head decoder with eight padded geometric prompt slots |
The shortened digests above are identifiers for readability; use the complete
artifact digests in CHECKSUMS.sha256 for verification.