feat(coreml): add the fp16 build, pinned to CPU_AND_GPU
Browse filesfp16 is correct on device only with both the CPU and the Neural Engine excluded. Measured at an iOS17 deployment target on an iPhone 16, against the fp32 build's 0.863: all 0.421, cpu_only 0.411, cpu_and_ne 0.422, cpu_and_gpu 0.862.
With CPU_AND_GPU it matches fp32 to 0.0008 confidence, 0.23 px box and 0.17 px landmark, and runs at 144.0 ms against 165.1 ms with a 263 MB peak against 389 MB, at half the download.
config.json makes fp16 the default variant; fp32 stays available and is unchanged.
Exported from export-scripts MR !18.
- preview/coreml/config.json +45 -1
preview/coreml/config.json
CHANGED
|
@@ -8,11 +8,55 @@
|
|
| 8 |
"backend": "coreml",
|
| 9 |
"license": "apache-2.0",
|
| 10 |
"variants": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
{
|
| 12 |
"file": "rfdetr_keypoint_preview_coreml_fp32.pte",
|
| 13 |
"precision": "fp32",
|
| 14 |
"quantized": false,
|
| 15 |
-
"default":
|
| 16 |
"methods": {
|
| 17 |
"forward": {
|
| 18 |
"inputs": [
|
|
|
|
| 8 |
"backend": "coreml",
|
| 9 |
"license": "apache-2.0",
|
| 10 |
"variants": [
|
| 11 |
+
{
|
| 12 |
+
"file": "rfdetr_keypoint_preview_coreml_fp16.pte",
|
| 13 |
+
"precision": "fp16",
|
| 14 |
+
"quantized": false,
|
| 15 |
+
"default": true,
|
| 16 |
+
"methods": {
|
| 17 |
+
"forward": {
|
| 18 |
+
"inputs": [
|
| 19 |
+
{
|
| 20 |
+
"shape": [
|
| 21 |
+
1,
|
| 22 |
+
3,
|
| 23 |
+
576,
|
| 24 |
+
576
|
| 25 |
+
],
|
| 26 |
+
"dtype": "float32"
|
| 27 |
+
}
|
| 28 |
+
],
|
| 29 |
+
"outputs": [
|
| 30 |
+
{
|
| 31 |
+
"shape": [
|
| 32 |
+
100,
|
| 33 |
+
4
|
| 34 |
+
],
|
| 35 |
+
"dtype": "float32"
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"shape": [
|
| 39 |
+
100
|
| 40 |
+
],
|
| 41 |
+
"dtype": "float32"
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"shape": [
|
| 45 |
+
100,
|
| 46 |
+
17,
|
| 47 |
+
3
|
| 48 |
+
],
|
| 49 |
+
"dtype": "float32"
|
| 50 |
+
}
|
| 51 |
+
]
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
},
|
| 55 |
{
|
| 56 |
"file": "rfdetr_keypoint_preview_coreml_fp32.pte",
|
| 57 |
"precision": "fp32",
|
| 58 |
"quantized": false,
|
| 59 |
+
"default": false,
|
| 60 |
"methods": {
|
| 61 |
"forward": {
|
| 62 |
"inputs": [
|