gen-cards: regenerate Use-it block
Browse files
README.md
CHANGED
|
@@ -34,6 +34,8 @@ needs no NMS, YOLOX is the classic `score = obj · cls` + **per-class NMS** pipe
|
|
| 34 |
<!-- gen-cards:use-it begin id=yolox-s (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
| 35 |
## Use it
|
| 36 |
|
|
|
|
|
|
|
| 37 |
⚡ **One line** — run the kit's task op on this model
|
| 38 |
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 39 |
|
|
@@ -41,21 +43,24 @@ needs no NMS, YOLOX is the classic `score = obj · cls` + **per-class NMS** pipe
|
|
| 41 |
let boxes = try await CoreAI.detect(inImageAt: url, options: .model("yolox-s"))
|
| 42 |
```
|
| 43 |
|
| 44 |
-
Every op, one shape — [Cookbook](https://github.com/john-rocky/coreai-kit/blob/
|
| 45 |
|
| 46 |
-
▶️ **Run it (source)** — the [DetectCamera runner](https://github.com/john-rocky/coreai-kit/tree/
|
| 47 |
(real-time object detection on the zero-copy camera path):
|
| 48 |
|
| 49 |
```bash
|
| 50 |
-
git clone https://github.com/john-rocky/coreai-kit
|
| 51 |
-
|
|
|
|
| 52 |
# → Run, then pick "YOLOX" in the model picker
|
| 53 |
|
| 54 |
# agents / headless (macOS):
|
| 55 |
cd coreai-kit/Examples/DetectCamera
|
| 56 |
-
swift run detect-cli --model yolox-s --image Resources/gate_image.jpg
|
| 57 |
```
|
| 58 |
|
|
|
|
|
|
|
| 59 |
💻 **Build with it** — complete; the glue is kit API, copy-paste runs:
|
| 60 |
|
| 61 |
```swift
|
|
@@ -67,7 +72,7 @@ let detections = try await detector.detect(in: image.cgImage)
|
|
| 67 |
// detections: [Detection] — label, score, normalized box (top-left origin)
|
| 68 |
```
|
| 69 |
|
| 70 |
-
The take-home is [`Examples/DetectCamera/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/
|
| 71 |
— this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 72 |
the GUI runs the same detector per camera frame on a zero-copy pixel-buffer fast path.
|
| 73 |
YOLOX is a dense detector — `KitDetector` runs the obj·cls threshold + per-class NMS
|
|
@@ -75,10 +80,10 @@ host-side; the DETR family needs none. Same `detect(in:)` either way.
|
|
| 75 |
|
| 76 |
**Integration checklist**
|
| 77 |
|
| 78 |
-
- SPM: `https://github.com/john-rocky/coreai-kit` → product **CoreAIKitVision**
|
| 79 |
- Info.plist: `NSCameraUsageDescription` — only for the live camera; the snippet needs none
|
| 80 |
- Entitlements: none needed
|
| 81 |
-
- First run downloads the model —
|
| 82 |
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 83 |
- Measure in Release — Debug is ~3× slower on per-token host work
|
| 84 |
<!-- gen-cards:use-it end -->
|
|
|
|
| 34 |
<!-- gen-cards:use-it begin id=yolox-s (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
| 35 |
## Use it
|
| 36 |
|
| 37 |
+
**New to Core AI? [Start with CoreAIKit 0.7.1](https://github.com/john-rocky/coreai-kit#readme).** Follow its requirements and first-run steps for `qwen3-0.6b`, then open the same release's [ChatDemo](https://github.com/john-rocky/coreai-kit/tree/0.7.1/Examples/ChatDemo). The README records the tested OS/SDK and download size; model and device coverage is stated per example.
|
| 38 |
+
|
| 39 |
⚡ **One line** — run the kit's task op on this model
|
| 40 |
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 41 |
|
|
|
|
| 43 |
let boxes = try await CoreAI.detect(inImageAt: url, options: .model("yolox-s"))
|
| 44 |
```
|
| 45 |
|
| 46 |
+
Every op, one shape — [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.7.1/docs/COOKBOOK.md).
|
| 47 |
|
| 48 |
+
▶️ **Run it (source)** — the [DetectCamera runner](https://github.com/john-rocky/coreai-kit/tree/0.7.1/Examples/DetectCamera)
|
| 49 |
(real-time object detection on the zero-copy camera path):
|
| 50 |
|
| 51 |
```bash
|
| 52 |
+
git clone --branch 0.7.1 --depth 1 https://github.com/john-rocky/coreai-kit
|
| 53 |
+
export DEVELOPER_DIR=/Applications/Xcode-27.0.0-RC.app/Contents/Developer
|
| 54 |
+
open -a /Applications/Xcode-27.0.0-RC.app coreai-kit/Examples/DetectCamera/DetectCamera.xcodeproj
|
| 55 |
# → Run, then pick "YOLOX" in the model picker
|
| 56 |
|
| 57 |
# agents / headless (macOS):
|
| 58 |
cd coreai-kit/Examples/DetectCamera
|
| 59 |
+
swift run -c release detect-cli --model yolox-s --image Resources/gate_image.jpg
|
| 60 |
```
|
| 61 |
|
| 62 |
+
Use Xcode build **27A266a** from the release's `.xcode-pin`; adjust the app path if your installation is named differently.
|
| 63 |
+
|
| 64 |
💻 **Build with it** — complete; the glue is kit API, copy-paste runs:
|
| 65 |
|
| 66 |
```swift
|
|
|
|
| 72 |
// detections: [Detection] — label, score, normalized box (top-left origin)
|
| 73 |
```
|
| 74 |
|
| 75 |
+
The take-home is [`Examples/DetectCamera/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/0.7.1/Examples/DetectCamera/Sources/QuickStart.swift)
|
| 76 |
— this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 77 |
the GUI runs the same detector per camera frame on a zero-copy pixel-buffer fast path.
|
| 78 |
YOLOX is a dense detector — `KitDetector` runs the obj·cls threshold + per-class NMS
|
|
|
|
| 80 |
|
| 81 |
**Integration checklist**
|
| 82 |
|
| 83 |
+
- SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.7.1**) → product **CoreAIKitVision**
|
| 84 |
- Info.plist: `NSCameraUsageDescription` — only for the live camera; the snippet needs none
|
| 85 |
- Entitlements: none needed
|
| 86 |
+
- First run downloads the model — ~36 MB (Mac) / ~36 MB (iPhone) — then it loads from the
|
| 87 |
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 88 |
- Measure in Release — Debug is ~3× slower on per-token host work
|
| 89 |
<!-- gen-cards:use-it end -->
|