Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -8,7 +8,7 @@ tags:
|
|
| 8 |
- image-classification
|
| 9 |
- head-pose-estimation
|
| 10 |
---
|
| 11 |
-
# sixdrepnet_headpose — ExecuTorch
|
| 12 |
|
| 13 |
- **Source**: thohemp/6DRepNet + osanseviero/6DRepNet_300W_LP_AFLW2000 weights
|
| 14 |
- **License**: MIT
|
|
@@ -19,14 +19,22 @@ tags:
|
|
| 19 |
|
| 20 |
All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.
|
| 21 |
|
| 22 |
-
|
|
| 23 |
|-----------|------|-----------|------------------------------------|------------------|
|
| 24 |
| fp32 | `sixdrepnet_headpose_xnnpack_fp32.pte` | 157.3 | 1.000000 | 7.6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
\*Mac arm64, single process, median of 10 — a reference point for relative cost
|
| 27 |
only, not a device number (torch eager fp32 on the same machine: 16.3 ms).
|
| 28 |
|
| 29 |
-
###
|
| 30 |
|
| 31 |
- **fp16 is not shipped**: it comes out at 100% of the fp32 file (157.3 MB vs 157.3 MB), so it buys nothing. XNNPACK serializes convolution weights as fp32 no matter what dtype the graph carries, so on a conv-heavy model fp16 saves no disk and only adds cast operations. Reach for int8 here, not fp16.
|
| 32 |
- **int8 is not shipped**: worst-output corr 0.815 against fp32 eager, below the 0.95 bar for this precision. The file converts and runs; the numbers do not hold up, so it is left out rather than shipped with a warning.
|
|
@@ -44,7 +52,7 @@ XNNPACK delegate coverage (fp32): 100.0% (59/59 ops)
|
|
| 44 |
|
| 45 |
## Conversion
|
| 46 |
|
| 47 |
-
torch.export -> to_edge_transform_and_lower(
|
| 48 |
(conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))
|
| 49 |
|
| 50 |
**Notes (int8)**: int8 is measured but not shipped. Correlation is a weak read on a six-element output, so the check that matters is the angle between the fp32 and int8 rotations: median 46.5 deg over ten faces, worst 104 deg. That is the known failure mode of re-parameterized RepVGG under post-training quantization — its fused branches leave weight ranges too wide for an int8 grid — and it needs quantization-aware training rather than anything on the export side.
|
|
|
|
| 8 |
- image-classification
|
| 9 |
- head-pose-estimation
|
| 10 |
---
|
| 11 |
+
# sixdrepnet_headpose — ExecuTorch
|
| 12 |
|
| 13 |
- **Source**: thohemp/6DRepNet + osanseviero/6DRepNet_300W_LP_AFLW2000 weights
|
| 14 |
- **License**: MIT
|
|
|
|
| 19 |
|
| 20 |
All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.
|
| 21 |
|
| 22 |
+
| build | file | size (MB) | parity vs fp32 eager (worst corr) | Mac median (ms)* |
|
| 23 |
|-----------|------|-----------|------------------------------------|------------------|
|
| 24 |
| fp32 | `sixdrepnet_headpose_xnnpack_fp32.pte` | 157.3 | 1.000000 | 7.6 |
|
| 25 |
+
| Core ML (fp16, iOS) | `sixdrepnet_headpose_coreml_all.pte` | 78.8 | 0.999991 | 1.5 |
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
The Core ML build is the same graph lowered to Apple's Neural Engine instead of
|
| 29 |
+
XNNPACK, which is CPU-only. On an iPhone 17 Pro, Depth-Anything-V2-Small runs
|
| 30 |
+
500.8 ms through XNNPACK and 42.7 ms through Core ML, at half the file size. It
|
| 31 |
+
computes in fp16 and is iOS-only; the XNNPACK files stay the portable option and
|
| 32 |
+
are what runs on Android.
|
| 33 |
|
| 34 |
\*Mac arm64, single process, median of 10 — a reference point for relative cost
|
| 35 |
only, not a device number (torch eager fp32 on the same machine: 16.3 ms).
|
| 36 |
|
| 37 |
+
### Builds that did not earn a slot
|
| 38 |
|
| 39 |
- **fp16 is not shipped**: it comes out at 100% of the fp32 file (157.3 MB vs 157.3 MB), so it buys nothing. XNNPACK serializes convolution weights as fp32 no matter what dtype the graph carries, so on a conv-heavy model fp16 saves no disk and only adds cast operations. Reach for int8 here, not fp16.
|
| 40 |
- **int8 is not shipped**: worst-output corr 0.815 against fp32 eager, below the 0.95 bar for this precision. The file converts and runs; the numbers do not hold up, so it is left out rather than shipped with a warning.
|
|
|
|
| 52 |
|
| 53 |
## Conversion
|
| 54 |
|
| 55 |
+
torch.export -> to_edge_transform_and_lower(partitioner) -> .pte
|
| 56 |
(conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))
|
| 57 |
|
| 58 |
**Notes (int8)**: int8 is measured but not shipped. Correlation is a weak read on a six-element output, so the check that matters is the angle between the fp32 and int8 rotations: median 46.5 deg over ten faces, worst 104 deg. That is the known failure mode of re-parameterized RepVGG under post-training quantization — its fused branches leave weight ranges too wide for an int8 grid — and it needs quantization-aware training rather than anything on the export side.
|