mlboydaisuke commited on
Commit
03ea1b5
Β·
verified Β·
1 Parent(s): e45bbbd

gen-cards: regenerate Use-it block

Browse files
Files changed (1) hide show
  1. README.md +13 -8
README.md CHANGED
@@ -33,6 +33,8 @@ the answer to [apple/coreai-models#14](https://github.com/apple/coreai-models/is
33
  <!-- gen-cards:use-it begin id=rf-detr (managed by scripts/gen-cards β€” edit cards.json / QuickStart.swift, not this block) -->
34
  ## Use it
35
 
 
 
36
  ⚑ **One line** β€” this model is the default behind the kit's task op
37
  (`import CoreAIOps`; no session, no model plumbing, downloads on first use):
38
 
@@ -40,21 +42,24 @@ the answer to [apple/coreai-models#14](https://github.com/apple/coreai-models/is
40
  let boxes = try await CoreAI.detect(inImageAt: url)
41
  ```
42
 
43
- Every op, one shape β€” [Cookbook](https://github.com/john-rocky/coreai-kit/blob/main/docs/COOKBOOK.md).
44
 
45
- ▢️ **Run it (source)** β€” the [DetectCamera runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/DetectCamera)
46
  (real-time object detection on the zero-copy camera path):
47
 
48
  ```bash
49
- git clone https://github.com/john-rocky/coreai-kit
50
- open coreai-kit/Examples/DetectCamera/DetectCamera.xcodeproj
 
51
  # β†’ Run, then pick "Nano" in the model picker
52
 
53
  # agents / headless (macOS):
54
  cd coreai-kit/Examples/DetectCamera
55
- swift run detect-cli --model rf-detr --image Resources/gate_image.jpg
56
  ```
57
 
 
 
58
  πŸ’» **Build with it** β€” complete; the glue is kit API, copy-paste runs:
59
 
60
  ```swift
@@ -66,7 +71,7 @@ let detections = try await detector.detect(in: image.cgImage)
66
  // detections: [Detection] β€” label, score, normalized box (top-left origin)
67
  ```
68
 
69
- The take-home is [`Examples/DetectCamera/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/DetectCamera/Sources/QuickStart.swift)
70
  β€” this exact code as one typed function, no UI; the CLI is an argument shell over it, and
71
  the GUI runs the same detector per camera frame on a zero-copy pixel-buffer fast path.
72
  Real time? Use `detect(in: CVPixelBuffer)` β€” vImage scales the frame with no CGImage
@@ -74,10 +79,10 @@ round-trip; `CameraFeed` (kit API) streams the buffers.
74
 
75
  **Integration checklist**
76
 
77
- - SPM: `https://github.com/john-rocky/coreai-kit` β†’ product **CoreAIKitVision**
78
  - Info.plist: `NSCameraUsageDescription` β€” only for the live camera; the snippet needs none
79
  - Entitlements: none needed
80
- - First run downloads the model β€” 0.1 GB (Mac) / 0.1 GB (iPhone) β€” then it loads from the
81
  local cache (Application Support; progress via the `downloadProgress` callback)
82
  - Measure in Release β€” Debug is ~3Γ— slower on per-token host work
83
  <!-- gen-cards:use-it end -->
 
33
  <!-- gen-cards:use-it begin id=rf-detr (managed by scripts/gen-cards β€” edit cards.json / QuickStart.swift, not this block) -->
34
  ## Use it
35
 
36
+ **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.
37
+
38
  ⚑ **One line** β€” this model is the default behind the kit's task op
39
  (`import CoreAIOps`; no session, no model plumbing, downloads on first use):
40
 
 
42
  let boxes = try await CoreAI.detect(inImageAt: url)
43
  ```
44
 
45
+ Every op, one shape β€” [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.7.1/docs/COOKBOOK.md).
46
 
47
+ ▢️ **Run it (source)** β€” the [DetectCamera runner](https://github.com/john-rocky/coreai-kit/tree/0.7.1/Examples/DetectCamera)
48
  (real-time object detection on the zero-copy camera path):
49
 
50
  ```bash
51
+ git clone --branch 0.7.1 --depth 1 https://github.com/john-rocky/coreai-kit
52
+ export DEVELOPER_DIR=/Applications/Xcode-27.0.0-RC.app/Contents/Developer
53
+ open -a /Applications/Xcode-27.0.0-RC.app coreai-kit/Examples/DetectCamera/DetectCamera.xcodeproj
54
  # β†’ Run, then pick "Nano" in the model picker
55
 
56
  # agents / headless (macOS):
57
  cd coreai-kit/Examples/DetectCamera
58
+ swift run -c release detect-cli --model rf-detr --image Resources/gate_image.jpg
59
  ```
60
 
61
+ Use Xcode build **27A266a** from the release's `.xcode-pin`; adjust the app path if your installation is named differently.
62
+
63
  πŸ’» **Build with it** β€” complete; the glue is kit API, copy-paste runs:
64
 
65
  ```swift
 
71
  // detections: [Detection] β€” label, score, normalized box (top-left origin)
72
  ```
73
 
74
+ 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)
75
  β€” this exact code as one typed function, no UI; the CLI is an argument shell over it, and
76
  the GUI runs the same detector per camera frame on a zero-copy pixel-buffer fast path.
77
  Real time? Use `detect(in: CVPixelBuffer)` β€” vImage scales the frame with no CGImage
 
79
 
80
  **Integration checklist**
81
 
82
+ - SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.7.1**) β†’ product **CoreAIKitVision**
83
  - Info.plist: `NSCameraUsageDescription` β€” only for the live camera; the snippet needs none
84
  - Entitlements: none needed
85
+ - First run downloads the model β€” ~103 MB (Mac) / ~103 MB (iPhone) β€” then it loads from the
86
  local cache (Application Support; progress via the `downloadProgress` callback)
87
  - Measure in Release β€” Debug is ~3Γ— slower on per-token host work
88
  <!-- gen-cards:use-it end -->