yolos-tiny-CoreAI / README.md
grabbou's picture
Add YOLOS-tiny exported with apple/coreai-models
b6ecc99 verified
|
Raw History Blame Contribute Delete
1.48 kB
metadata
license: apache-2.0
base_model: hustvl/yolos-tiny
pipeline_tag: object-detection
library_name: coreai
tags:
  - coreai
  - ios
  - object-detection
  - react-native

YOLOS-tiny for Core AI

hustvl/yolos-tiny (6.5M parameters, COCO classes) exported to Apple Core AI, unmodified, with the apple/coreai-models recipe. It runs on iOS 27 and macOS 27 with the ObjectDetector from the CoreAIObjectDetection product of coreai-models.

Files

yolos-tiny.aimodel/ is the exported model, float32, static shape (23 MB).

Use

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(
  'object-detection',
  { id: 'yolos-tiny', sourceType: 'file', sourceUri: yolosModelPath },
  { imageUri },
  { threshold: 0.7 }
)

In Swift:

let detector = try await ObjectDetector(resourcesAt: "yolos-tiny.aimodel")
let detections = try await detector.detect(image: cgImage)

Export

From apple/coreai-models at 09ff139, with coreai-core 1.0.0b3:

cd models/yolo
uv run export.py --model hustvl/yolos-tiny

License

Apache-2.0, as the original model. YOLOS is by Y. Fang et al., You Only Look at One Sequence.