CoreAI models
Collection
4 items • Updated
EfficientSAM ViT-Tiny (10M parameters) exported to Apple Core AI, unmodified, with the apple/coreai-models recipe. It runs on iOS 27 and macOS 27 with the ImageSegmenter from the CoreAISegmentation product of coreai-models.
It segments the object at a point (a click) or in a box, one mask per prompt.
efficient-sam/ is a segmenter bundle: metadata.json and the exported model, float32, static shape, up to two points per prompt (39 MB).
With @react-native-ai/core-ai, download the folder and pass its path:
import { CoreAI } from '@react-native-ai/core-ai'
const result = await CoreAI.runTask(
'segmentation',
{ id: 'efficient-sam', sourceType: 'file', sourceUri: efficientSAMBundlePath },
{ imageUri, data: { box: { x: 10, y: 50, width: 300, height: 400 } } },
{}
)
In Swift:
let segmenter = try await ImageSegmenter(resourcesAt: "efficient-sam")
let response = try await segmenter.segment(image: cgImage, pointQuery: query)
From apple/coreai-models at 09ff139, with coreai-core 1.0.0b3:
cd models/efficient-sam
uv run export.py
Apache-2.0, as the original model. EfficientSAM is by Y. Xiong et al., EfficientSAM: Leveraged Masked Image Pretraining for Efficient Segment Anything.
Base model
yunyangx/EfficientSAM