apocaliss92 commited on
Commit
2774701
·
verified ·
1 Parent(s): 1f57eba

fix: reduced YOLO26 CoreML replaced in place; drop the -static copies

Browse files

The static (batch 1) YOLO26 @320/@256 CoreML packages already live at their original paths. The -static copies are removed, and source/ carries the recipe that exports them static under the original names.

Files changed (26) hide show
  1. objectDetection/yolo26/coreml/camstack-yolo26l-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  2. objectDetection/yolo26/coreml/camstack-yolo26l-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  3. objectDetection/yolo26/coreml/camstack-yolo26l-256-static.mlpackage/Manifest.json +0 -18
  4. objectDetection/yolo26/coreml/camstack-yolo26l-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  5. objectDetection/yolo26/coreml/camstack-yolo26l-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  6. objectDetection/yolo26/coreml/camstack-yolo26l-320-static.mlpackage/Manifest.json +0 -18
  7. objectDetection/yolo26/coreml/camstack-yolo26m-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  8. objectDetection/yolo26/coreml/camstack-yolo26m-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  9. objectDetection/yolo26/coreml/camstack-yolo26m-256-static.mlpackage/Manifest.json +0 -18
  10. objectDetection/yolo26/coreml/camstack-yolo26m-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  11. objectDetection/yolo26/coreml/camstack-yolo26m-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  12. objectDetection/yolo26/coreml/camstack-yolo26m-320-static.mlpackage/Manifest.json +0 -18
  13. objectDetection/yolo26/coreml/camstack-yolo26n-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  14. objectDetection/yolo26/coreml/camstack-yolo26n-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  15. objectDetection/yolo26/coreml/camstack-yolo26n-256-static.mlpackage/Manifest.json +0 -18
  16. objectDetection/yolo26/coreml/camstack-yolo26n-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  17. objectDetection/yolo26/coreml/camstack-yolo26n-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  18. objectDetection/yolo26/coreml/camstack-yolo26n-320-static.mlpackage/Manifest.json +0 -18
  19. objectDetection/yolo26/coreml/camstack-yolo26s-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  20. objectDetection/yolo26/coreml/camstack-yolo26s-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  21. objectDetection/yolo26/coreml/camstack-yolo26s-256-static.mlpackage/Manifest.json +0 -18
  22. objectDetection/yolo26/coreml/camstack-yolo26s-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -3
  23. objectDetection/yolo26/coreml/camstack-yolo26s-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -3
  24. objectDetection/yolo26/coreml/camstack-yolo26s-320-static.mlpackage/Manifest.json +0 -18
  25. source/README.md +4 -4
  26. source/build-camstack-models.py +30 -25
objectDetection/yolo26/coreml/camstack-yolo26l-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:02f5ae97813609775257d143cb52d6793c1f4b09b42a40fbf51cb1cb0be4a3eb
3
- size 299148
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26l-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:87968708ab7ee99aac97d1d6644f6b70149b7b2c38b3f2c3c64326c3cc2333e2
3
- size 49644224
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26l-256-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "5895DE69-3315-4497-B0A3-D859F316080A": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Specification",
7
- "name": "model.mlmodel",
8
- "path": "com.apple.CoreML/model.mlmodel"
9
- },
10
- "F53DC23C-6846-4D09-AAA2-81D6879083D9": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Weights",
13
- "name": "weights",
14
- "path": "com.apple.CoreML/weights"
15
- }
16
- },
17
- "rootModelIdentifier": "5895DE69-3315-4497-B0A3-D859F316080A"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26l-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2f82c9ccea64dfc5b4767de73e3c2c686beefb62b262b25d0edd3ee83ca8924a
3
- size 299148
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26l-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f0a136258aa69978f5647e07ac4019a4f8c8745dc6d6500c8e3a2876d041f9e5
3
- size 49648808
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26l-320-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "7FC1F646-B8BF-439F-AAB7-3207FEC3456D": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Specification",
7
- "name": "model.mlmodel",
8
- "path": "com.apple.CoreML/model.mlmodel"
9
- },
10
- "E4B6FCB6-9D2D-4F31-A976-5122A8EF09BB": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Weights",
13
- "name": "weights",
14
- "path": "com.apple.CoreML/weights"
15
- }
16
- },
17
- "rootModelIdentifier": "7FC1F646-B8BF-439F-AAB7-3207FEC3456D"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26m-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:fc578a8384cb0675e9c0c4bc98f031f0044c865b0d7bfa49ada8f5ecaa3bc733
3
- size 208229
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26m-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bf1ac4cb5f2a3749815a36dde6d6e57ce0662a005ccefd435283d4e38c21298d
3
- size 40844736
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26m-256-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "2662EBF2-2892-45FD-A11C-62C3B40A3514": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Weights",
7
- "name": "weights",
8
- "path": "com.apple.CoreML/weights"
9
- },
10
- "91A07807-3E27-40B7-B6DF-62ADDE744D44": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Specification",
13
- "name": "model.mlmodel",
14
- "path": "com.apple.CoreML/model.mlmodel"
15
- }
16
- },
17
- "rootModelIdentifier": "91A07807-3E27-40B7-B6DF-62ADDE744D44"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26m-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e223f44cfe18383e7198b4e51282a9c37394ba09ef9ecc33ee4433018bd51f51
3
- size 208229
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26m-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4cf582bf1b14fb7abf87f61a1cf198ad2626fedec32873224bc6f2411e6680b7
3
- size 40849320
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26m-320-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "104C5E70-62B7-4B34-926E-87703E5D70A3": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Specification",
7
- "name": "model.mlmodel",
8
- "path": "com.apple.CoreML/model.mlmodel"
9
- },
10
- "F8212E6D-5E66-4579-A642-1AF789609EAC": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Weights",
13
- "name": "weights",
14
- "path": "com.apple.CoreML/weights"
15
- }
16
- },
17
- "rootModelIdentifier": "104C5E70-62B7-4B34-926E-87703E5D70A3"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26n-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2788e9a64ba3a17c012d3635586fc219713fe0638325cb3cfdb98c9d601781cd
3
- size 191309
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26n-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1c0565e40b4e04194561df09de4c007ccedd4d5d784adf2341f3af7c97f42cb9
3
- size 4839872
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26n-256-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "163A2A21-0CCA-4A9A-9D6E-C1C123336717": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Specification",
7
- "name": "model.mlmodel",
8
- "path": "com.apple.CoreML/model.mlmodel"
9
- },
10
- "8A7D641C-B2D6-4853-B36F-2411B9D1C5F4": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Weights",
13
- "name": "weights",
14
- "path": "com.apple.CoreML/weights"
15
- }
16
- },
17
- "rootModelIdentifier": "163A2A21-0CCA-4A9A-9D6E-C1C123336717"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26n-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:fcea962ec3c4e64b6cac2d1091afc509410b038073ff6b2dd10bc2d8692cffa1
3
- size 191309
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26n-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b30bb5ced9c127f0a813c7740c451a1766226dde43e277e01eb9d298d44f17cd
3
- size 4844456
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26n-320-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "217243A3-19B4-443D-9A19-AFC04B242EC5": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Specification",
7
- "name": "model.mlmodel",
8
- "path": "com.apple.CoreML/model.mlmodel"
9
- },
10
- "88D7654C-681B-4A86-A09E-BA2DB5EB400A": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Weights",
13
- "name": "weights",
14
- "path": "com.apple.CoreML/weights"
15
- }
16
- },
17
- "rootModelIdentifier": "217243A3-19B4-443D-9A19-AFC04B242EC5"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26s-256-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4d6c22cf8ece8715ab5f38008898fdfcbe8e5824eb36f3dbeca07e7b691e27ad
3
- size 191599
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26s-256-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e4f3ba3ba99d9a068c4e064fd74427b8a2b56c5e1f56f56979886a493068fbd0
3
- size 19013504
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26s-256-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "7917F056-346C-41CC-AED2-62E1F1814D66": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Specification",
7
- "name": "model.mlmodel",
8
- "path": "com.apple.CoreML/model.mlmodel"
9
- },
10
- "D533AC42-AD00-473B-A175-6997A81D0E63": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Weights",
13
- "name": "weights",
14
- "path": "com.apple.CoreML/weights"
15
- }
16
- },
17
- "rootModelIdentifier": "7917F056-346C-41CC-AED2-62E1F1814D66"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26s-320-static.mlpackage/Data/com.apple.CoreML/model.mlmodel DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:23795a70ef6e16be2c88272c765987e40107ea02f560f5feb41170241b705a24
3
- size 191599
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26s-320-static.mlpackage/Data/com.apple.CoreML/weights/weight.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:156d8db8d1f2b9d6bc23ce2e123889d6ad79a5ce866dfccc35c0d869df79db64
3
- size 19018088
 
 
 
 
objectDetection/yolo26/coreml/camstack-yolo26s-320-static.mlpackage/Manifest.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "fileFormatVersion": "1.0.0",
3
- "itemInfoEntries": {
4
- "80ED118A-E065-4F91-BA0B-AE2C528205F9": {
5
- "author": "com.apple.CoreML",
6
- "description": "CoreML Model Weights",
7
- "name": "weights",
8
- "path": "com.apple.CoreML/weights"
9
- },
10
- "B2385BFD-F5F3-4159-B714-A3B9EC09B22B": {
11
- "author": "com.apple.CoreML",
12
- "description": "CoreML Model Specification",
13
- "name": "model.mlmodel",
14
- "path": "com.apple.CoreML/model.mlmodel"
15
- }
16
- },
17
- "rootModelIdentifier": "B2385BFD-F5F3-4159-B714-A3B9EC09B22B"
18
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
source/README.md CHANGED
@@ -39,7 +39,7 @@ What the recipes encode (the hosted files record each of these):
39
  | Folder | Files | ONNX | CoreML | OpenVINO IR |
40
  | --- | --- | --- | --- | --- |
41
  | `objectDetection/yolo26` | `camstack-yolo26{n,s,m,l,x}` @640 | static, opset 17 | static, batch 1 | FP16 as `<stem>.xml` and `<stem>-fp16.xml`; INT8 `<stem>-int8.xml` (128 images) |
42
- | `objectDetection/yolo26` | `camstack-yolo26{n,s,m,l}-{320,256}` | dynamic axes, opset 17 | static, batch 1, FP16, as `<stem>-static.mlpackage` and `<stem>.mlpackage` | FP32 `<stem>.xml`; INT8 `<stem>-int8.xml` (128 images) |
43
  | `objectDetection/yolov9` | `camstack-yolov9{t,s,m,c}-{320,640}` | static, opset 13 | static, batch 1 | FP16 `<stem>-fp16.xml`; INT8 `<stem>-int8.xml` (300 images) |
44
  | `segmentation/yolo26-seg` | `camstack-yolo26{n,s,m}-seg` @640 | static, opset 17 | static, batch 1 | FP16 `<stem>.xml` |
45
 
@@ -54,9 +54,9 @@ use coremltools 8.3 with PyTorch 2.5.1, the macOS pins in `requirements.txt`.
54
  The @320 and @256 CoreML packages were batch-flexible (1..16) until
55
  2026-10-07. That package aborts any process that loads it on macOS 26.2, on
56
  every compute unit, because Core ML's `gather_nd` shape pass fails on a
57
- flexible batch. They are now exported with a static batch of 1. The same
58
- package is published as `<stem>-static.mlpackage` (the name the catalog uses)
59
- and under the old `<stem>.mlpackage` name.
60
 
61
  ### INT8 calibration
62
 
 
39
  | Folder | Files | ONNX | CoreML | OpenVINO IR |
40
  | --- | --- | --- | --- | --- |
41
  | `objectDetection/yolo26` | `camstack-yolo26{n,s,m,l,x}` @640 | static, opset 17 | static, batch 1 | FP16 as `<stem>.xml` and `<stem>-fp16.xml`; INT8 `<stem>-int8.xml` (128 images) |
42
+ | `objectDetection/yolo26` | `camstack-yolo26{n,s,m,l}-{320,256}` | dynamic axes, opset 17 | static, batch 1, FP16 | FP32 `<stem>.xml`; INT8 `<stem>-int8.xml` (128 images) |
43
  | `objectDetection/yolov9` | `camstack-yolov9{t,s,m,c}-{320,640}` | static, opset 13 | static, batch 1 | FP16 `<stem>-fp16.xml`; INT8 `<stem>-int8.xml` (300 images) |
44
  | `segmentation/yolo26-seg` | `camstack-yolo26{n,s,m}-seg` @640 | static, opset 17 | static, batch 1 | FP16 `<stem>.xml` |
45
 
 
54
  The @320 and @256 CoreML packages were batch-flexible (1..16) until
55
  2026-10-07. That package aborts any process that loads it on macOS 26.2, on
56
  every compute unit, because Core ML's `gather_nd` shape pass fails on a
57
+ flexible batch. They are now exported with a static batch of 1 and were
58
+ replaced in place, under the same names. The script refuses a batch-flexible
59
+ CoreML recipe for a YOLO26 checkpoint.
60
 
61
  ### INT8 calibration
62
 
source/build-camstack-models.py CHANGED
@@ -134,22 +134,6 @@ class Recipe:
134
  openvino: tuple[OpenvinoOutput, ...] = ()
135
  calib_samples: int = 0
136
  note: str = ''
137
- # The CoreML package's stem when it differs from `name`. A package that had
138
- # to be re-exported in an incompatible way gets a NEW file name, because a
139
- # node keeps any package already on disk under the old one forever.
140
- coreml_name: Optional[str] = None
141
- # Earlier stems the SAME package is also published under, so a release
142
- # whose catalog still names them downloads the working package too.
143
- coreml_aliases: tuple[str, ...] = ()
144
-
145
- @property
146
- def coreml_stem(self) -> str:
147
- return self.coreml_name or self.name
148
-
149
- def coreml_paths(self) -> list[str]:
150
- """Every mirror path of the CoreML package: its own, then its aliases."""
151
- return [f'{self.folder}/coreml/{stem}.mlpackage/'
152
- for stem in (self.coreml_stem, *self.coreml_aliases)]
153
 
154
  def outputs(self) -> list[str]:
155
  """Mirror paths this recipe produces (an .mlpackage is a directory)."""
@@ -157,7 +141,7 @@ class Recipe:
157
  if self.onnx is not None:
158
  out.append(f'{self.folder}/onnx/{self.name}.onnx')
159
  if self.coreml is not None:
160
- out.extend(self.coreml_paths())
161
  for ov in self.openvino:
162
  stem = f'{self.folder}/openvino/{self.name}{ov.suffix}'
163
  out.extend([f'{stem}.xml', f'{stem}.bin'])
@@ -200,9 +184,9 @@ def _yolo26_reduced(tier: str, res: int) -> Recipe:
200
  unallocated pointer in `gather_nd` when the input batch is a range. YOLO26's
201
  NMS-free head is the only hosted graph with a `gather_nd`, which is why the
202
  one other batch-flexible package (bird-classifier) never hit it, and why the
203
- static @640 YOLO26 packages load. The static export loads
204
- and runs on every compute unit, so it is published under a new stem
205
- (`-static`) and under the old one.
206
  """
207
  return Recipe(
208
  name=f'camstack-yolo26{tier}-{res}', folder='objectDetection/yolo26', imgsz=res,
@@ -211,8 +195,6 @@ def _yolo26_reduced(tier: str, res: int) -> Recipe:
211
  coreml=CoremlExport(dynamic=False, batch=1, half=True),
212
  openvino=(OpenvinoOutput('', 'fp32'), OpenvinoOutput('-int8', 'int8')),
213
  calib_samples=128,
214
- coreml_name=f'camstack-yolo26{tier}-{res}-static',
215
- coreml_aliases=(f'camstack-yolo26{tier}-{res}',),
216
  )
217
 
218
 
@@ -245,6 +227,23 @@ RECIPES: tuple[Recipe, ...] = (
245
  *(_yolo26_seg(t) for t in 'nsm'),
246
  )
247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  FAMILIES = {
249
  'yolo26': 'objectDetection/yolo26',
250
  'yolov9': 'objectDetection/yolov9',
@@ -383,9 +382,7 @@ def build_coreml(recipe: Recipe, out: Path, verify: bool) -> Path:
383
  checkpoint_path(recipe), format='coreml', imgsz=recipe.imgsz,
384
  dynamic=c.dynamic, batch=c.batch, half=c.half, nms=False,
385
  )
386
- dest = place(src, out / recipe.folder / 'coreml' / f'{recipe.coreml_stem}.mlpackage')
387
- for alias in recipe.coreml_aliases:
388
- place(dest, out / recipe.folder / 'coreml' / f'{alias}.mlpackage')
389
  if verify and c.dynamic:
390
  verify_coreml_batch(dest, recipe.imgsz)
391
  return dest
@@ -578,12 +575,20 @@ def select(args: argparse.Namespace) -> list[Recipe]:
578
 
579
  def main(argv: list[str]) -> int:
580
  args = parse_args(argv)
 
 
 
 
581
  if args.list:
582
  list_recipes()
583
  return 0
584
  if args.check_hosted:
585
  return check_hosted()
586
  recipes = select(args)
 
 
 
 
587
  if not recipes:
588
  print('Nothing selected: pass --all, --family, --variant or --model (see --help).')
589
  return 2
 
134
  openvino: tuple[OpenvinoOutput, ...] = ()
135
  calib_samples: int = 0
136
  note: str = ''
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  def outputs(self) -> list[str]:
139
  """Mirror paths this recipe produces (an .mlpackage is a directory)."""
 
141
  if self.onnx is not None:
142
  out.append(f'{self.folder}/onnx/{self.name}.onnx')
143
  if self.coreml is not None:
144
+ out.append(f'{self.folder}/coreml/{self.name}.mlpackage/')
145
  for ov in self.openvino:
146
  stem = f'{self.folder}/openvino/{self.name}{ov.suffix}'
147
  out.extend([f'{stem}.xml', f'{stem}.bin'])
 
184
  unallocated pointer in `gather_nd` when the input batch is a range. YOLO26's
185
  NMS-free head is the only hosted graph with a `gather_nd`, which is why the
186
  one other batch-flexible package (bird-classifier) never hit it, and why the
187
+ static @640 YOLO26 packages load. The static export loads and runs on every
188
+ compute unit and replaced the flexible one in place (D742);
189
+ `check_recipes` keeps a YOLO26 CoreML export from going flexible again.
190
  """
191
  return Recipe(
192
  name=f'camstack-yolo26{tier}-{res}', folder='objectDetection/yolo26', imgsz=res,
 
195
  coreml=CoremlExport(dynamic=False, batch=1, half=True),
196
  openvino=(OpenvinoOutput('', 'fp32'), OpenvinoOutput('-int8', 'int8')),
197
  calib_samples=128,
 
 
198
  )
199
 
200
 
 
227
  *(_yolo26_seg(t) for t in 'nsm'),
228
  )
229
 
230
+ # Checkpoints whose graph carries YOLO26's NMS-free head (`topk` + `gather_nd`).
231
+ # Core ML aborts the process that loads such a graph with a batch-flexible input
232
+ # (macOS 26.2, every compute unit; D742), so their CoreML export is static.
233
+ GATHER_ND_CHECKPOINT_PREFIX = 'yolo26'
234
+
235
+
236
+ def check_recipes(recipes: tuple[Recipe, ...]) -> list[str]:
237
+ """Recipes whose CoreML export Core ML cannot load; empty when all is well."""
238
+ return [
239
+ f'{r.name}: CoreML export must be static (dynamic=False, batch=1) — a '
240
+ f'batch-flexible {r.checkpoint} package aborts the process that loads it (D742)'
241
+ for r in recipes
242
+ if r.coreml is not None and r.coreml.dynamic
243
+ and r.checkpoint.startswith(GATHER_ND_CHECKPOINT_PREFIX)
244
+ ]
245
+
246
+
247
  FAMILIES = {
248
  'yolo26': 'objectDetection/yolo26',
249
  'yolov9': 'objectDetection/yolov9',
 
382
  checkpoint_path(recipe), format='coreml', imgsz=recipe.imgsz,
383
  dynamic=c.dynamic, batch=c.batch, half=c.half, nms=False,
384
  )
385
+ dest = place(src, out / recipe.folder / 'coreml' / f'{recipe.name}.mlpackage')
 
 
386
  if verify and c.dynamic:
387
  verify_coreml_batch(dest, recipe.imgsz)
388
  return dest
 
575
 
576
  def main(argv: list[str]) -> int:
577
  args = parse_args(argv)
578
+ bad = check_recipes(RECIPES)
579
+ if bad:
580
+ print('\n'.join(bad))
581
+ return 2
582
  if args.list:
583
  list_recipes()
584
  return 0
585
  if args.check_hosted:
586
  return check_hosted()
587
  recipes = select(args)
588
+ bad = check_recipes(tuple(recipes)) # an ad-hoc --model yolo26* --dynamic too
589
+ if bad:
590
+ print('\n'.join(bad))
591
+ return 2
592
  if not recipes:
593
  print('Nothing selected: pass --all, --family, --variant or --model (see --help).')
594
  return 2