--- license: other license_name: sam-license license_link: https://github.com/facebookresearch/sam3/blob/660a5e9e1b8b4c02c0ad97229b88a09a6e4ff5b7/LICENSE pipeline_tag: image-segmentation library_name: onnx base_model: facebook/sam3 tags: - onnxruntime - onnx - segment-anything - image-segmentation - open-vocabulary - text-to-segmentation - anylearning authors: - Viet-Anh Nguyen --- # SAM3 ViT-H ONNX graph triplet for AnyLearning This repository contains an ONNX conversion of Meta's SAM3 ViT-H model for text, point, box, and combined-prompt segmentation in AnyLearning inference and its authenticated server. ## License The model weights and converted ONNX artifacts remain subject to Meta's **SAM License**, not Apache-2.0. Read [LICENSE](LICENSE) before downloading, using, or redistributing the model. The exporter/runtime wrapper used for the conversion is MIT-licensed; that code license does not relicense the weights. ## Immutable provenance - Upstream model/code revision: `facebookresearch/sam3@660a5e9e1b8b4c02c0ad97229b88a09a6e4ff5b7` - Exporter revision: `vietanhdev/samexporter@35133ce8670e0d190ac10cc08efba9b9a443fb51` - Archive: `sam3_vit_h.zip` - Archive SHA-256: `1617436f9db7eb9dd69029c2c465d54b316c36c21143f0fde0d1be513f15b7d5` `MANIFEST.json` records every archive member's exact byte size and SHA-256. AnyLearning verifies the three graph files and every referenced external tensor file independently before creating ONNX Runtime sessions. ## Graph contract | Role | Input | Outputs | | --- | --- | --- | | Image encoder | RGB `uint8` CHW `[3,1008,1008]` | six FPN/position feature maps | | Language encoder | CLIP tokens `int64` `[1,32]` | attention mask, memory, embeddings | | Decoder | image/language features and one fixed geometric slot | boxes, scores, native-size masks | The decoder graph in this bundle emits processed boxes, scores, and masks. Its historical `.data` companion is present in the original archive but is not referenced by the decoder graph; AnyLearning does not load it. ## Safe download and extraction Treat model archives as untrusted data. Verify the archive digest, require the exact members and sizes from `MANIFEST.json`, reject links and unexpected paths, and extract each approved member to an explicit destination. Avoid generic archive extraction calls. The graph triplet is several gigabytes. Keep downloads resumable, enforce disk and memory quotas, and use AnyLearning's digest-addressed external-data loader instead of reading all tensor files into Python memory. ## Validation The pinned bundle is tested with real images through both in-process inference and the password-authenticated HTTP server. Retained reports cover text, text-plus-point, and box prompts, deterministic repeated results, load/unload cycles, stage timings, peak RSS, editable polygons, and visual inspection. ## Citation Please cite Meta's canonical SAM3 release for the underlying model and record this repository revision when using this ONNX conversion.