Views
No views yet
.aimodel segmenter bundle from Apple's official
coreai-models export recipe — unmodified, with
the exact environment, hashes, and measured performance published.cat, the red car) and it returns instance masks, boxes, and
per-instance scores — open-vocabulary, no fixed class list. It runs on the stock Core AI
runtime via Apple's CoreAIImageSegmenter (no engine patch).1# from an apple/coreai-models checkout (gated model — accept the SAM license + hf auth login first)
2uv run models/sam3/export.py --dtype float16.aimodel is a build artifact, not a pure function of the recipe — the toolchain and OS
lowering matter, and the source checkpoint is gated. This is the exact, hash-stamped
bundle behind the published numbers, so you can drop it in and reproduce them without a
conversion environment or accepting the upstream license just to get the converted graph.metadata.json schema 0.2 + the .aimodel + a CLIP tokenizer/):sam3_float16.aimodel/ main.mlirb + main.hash + metadata.json
tokenizer/ tokenizer.json + tokenizer_config.json
metadata.json kind: segmenter, assets.main → sam3_float16.aimodel| File | Contents | SHA-256 |
|---|---|---|
sam3_float16.aimodel/main.mlirb | float16 weights + graph (~1.5 GB) | be9484b4c5fa75f9011668c481e27de253e1db55fcde39a1ba0cab8698706620 |
sam3_float16.aimodel/main.hash | graph hash | 9f631da3be044ad5de56a1d29af88394e7e725e3cf52f50ac556dcce9cdd568c |
image-segmenter CLI, M4 Max, the COCO two-cats image (640×480, resized
to 1008×1008 internally), text prompt cat:| Metric | Value |
|---|---|
| Inference (warm, incl. pre/post-processing) | 0.55 s |
| Output | 2 high-confidence instance masks for "cat" (scores 0.97 and 0.96); spurious queries fall below the 0.5 threshold |
--dtype float32.coreai-core 1.0.0b1 · coreai-torch 0.4.0 · transformers 5.xmodels/sam3/export.py (unmodified upstream)1# CLI (from an apple/coreai-models checkout)
2swift run -c release image-segmenter \
3 --model <downloaded-bundle-dir> --prompt "cat" --image cats.jpg1import CoreAIImageSegmenter
2let segmenter = try await ImageSegmenter(resourcesAt: "<bundle-dir>")
3let result = try await segmenter.segment(image: cgImage, prompt: "cat")
4// result.segments: [Segment] — each has .mask, .box, .scorexcrun coreai-build compile <ir>.aimodel --platform iOS --architecture h18p
(h18p = iPhone 17 Pro), then point metadata.json assets.main at the .aimodelc.LICENSE and the
upstream model card). This bundle is a format
conversion of those weights and inherits that license; review it before use.official/ for the
other unmodified official-recipe conversions).