Upload 6DRepNet-HeadPose-OpenVINO: ONNX, OpenVINO IR, Intel NPU blob, card and manifest
Browse files- .gitattributes +1 -0
- 6drepnet.onnx +3 -0
- README.md +101 -0
- manifest.json +39 -0
- npu/6drepnet.blob +3 -0
- openvino/6drepnet.bin +3 -0
- openvino/6drepnet.xml +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
npu/6drepnet.blob filter=lfs diff=lfs merge=lfs -text
|
6drepnet.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a0ede49b22803e4e6bacbd3549dbde4e4892217022ef63462a974dd452417ea
|
| 3 |
+
size 157356537
|
README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: litert-community/6DRepNet-HeadPose-LiteRT
|
| 4 |
+
base_model_relation: quantized
|
| 5 |
+
library_name: openvino
|
| 6 |
+
pipeline_tag: image-classification
|
| 7 |
+
tags:
|
| 8 |
+
- openvino
|
| 9 |
+
- onnx
|
| 10 |
+
- intel-npu
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# 6DRepNet-HeadPose-OpenVINO
|
| 14 |
+
|
| 15 |
+
6DRepNet-HeadPose for Intel NPUs, GPUs and CPUs: 6drepnet from [litert-community/6DRepNet-HeadPose-LiteRT](https://huggingface.co/litert-community/6DRepNet-HeadPose-LiteRT/tree/6a7d8fe0ca042d1524e3912d3371a61d0af45528) as ONNX (tf2onnx 1.17.0, opset 17), OpenVINO IR with fp32 weights, and a precompiled Intel NPU blob. On the NPU of a Core Ultra 9 386H the blob runs in 3.15 ms per run, numpy input to numpy output.
|
| 16 |
+
|
| 17 |
+
Scripts, raw records, and the same table for all 52 graphs of LiteRT-Models: https://github.com/john-rocky/windows-zoo
|
| 18 |
+
|
| 19 |
+
## Files
|
| 20 |
+
|
| 21 |
+
| file | bytes | sha256 |
|
| 22 |
+
|---|---|---|
|
| 23 |
+
| `6drepnet.onnx` | 157,356,537 | `7a0ede49b22803e4e6bacbd3549dbde4e4892217022ef63462a974dd452417ea` |
|
| 24 |
+
| `openvino/6drepnet.xml` | 295,037 | `2bdc41ebbf65c31529f005aa2503d2ec34155b3dfd31a108a6bc62cbbb082362` |
|
| 25 |
+
| `openvino/6drepnet.bin` | 157,293,720 | `d3c69f2b93f72e79044fb61b8f1ebae7bb3d03c3a2c171c3ae4d9c45ea676c50` |
|
| 26 |
+
| `npu/6drepnet.blob` | 79,569,025 | `8e31e4cc1fa04d8548894c8e45ba6f00e5c4aa6911f5d8ab37080473c55469ef` |
|
| 27 |
+
|
| 28 |
+
The NPU blob was compiled with OpenVINO 2026.4.1, Intel NPU driver 32.0.100.4841 (OpenVINO reports NPU_DRIVER_VERSION 1004841, NPU_COMPILER_VERSION 524292). If `import_model` refuses a blob on another driver or OpenVINO version, compile the IR instead (the commented line in the snippet).
|
| 29 |
+
|
| 30 |
+
## How it was measured
|
| 31 |
+
|
| 32 |
+
MSI Stealth 16 AI+ (Core Ultra 9 386H, RTX 5080 Laptop GPU at a 95 W power limit, Windows 11 build 26200.9711, on AC power), 2026-11-07. On the laptop, each row is one process: load, one run, 5 warmup runs, then the median of 30 timed runs (2 warmup + 10 timed runs when the first run takes more than 3 s), numpy input to numpy output, every runtime at its default settings, one process at a time, each started after the CPU, the RTX and the Intel GPU had gone idle (the thresholds are in METHOD.md of the GitHub repo). Output check: each output against the CPU output in fp32 on the same input (ONNX Runtime's CPU EP); PASS = cosine ≥ 0.99, no NaN or Inf, and top-1 agreement ≥ 0.99 for class scores. The Snapdragon rows are Qualcomm AI Hub profile jobs of the same ONNX files (their own timer).
|
| 33 |
+
|
| 34 |
+
## Speed and output check
|
| 35 |
+
|
| 36 |
+
| processor | runtime | file | ms | load s | output check |
|
| 37 |
+
|---|---|---|---|---|---|
|
| 38 |
+
| Intel AI Boost NPU | OpenVINO 2026.4.1 | `npu/` blob (`import_model`) | 3.15 | 0.05 | PASS (cos ≥ 0.9999) |
|
| 39 |
+
| Intel AI Boost NPU | ONNX Runtime 1.31.1 + OpenVINO EP 1.8.1 | `.onnx`, compiled when the session loads | 3.27 | 2.23 | PASS (cos ≥ 0.9999) |
|
| 40 |
+
| Intel Graphics (iGPU) | ONNX Runtime 1.31.1 + OpenVINO EP 1.8.1 | `.onnx` | 3.22 | 1.24 | PASS (cos ≥ 0.9999) |
|
| 41 |
+
| RTX 5080 Laptop (95 W limit) | ONNX Runtime 1.31.1, CUDA EP | fp16 copy of the `.onnx` (not in this repo) | 2.94 | 1.06 | PASS (cos ≥ 0.9999) |
|
| 42 |
+
| RTX 5080 Laptop (95 W limit) | ONNX Runtime 1.31.1, CUDA EP | `.onnx` | 4.30 | 1.26 | PASS (cos ≥ 0.9999) |
|
| 43 |
+
| Core Ultra 9 386H CPU | ONNX Runtime 1.31.1, CPU EP | `.onnx` | 16.89 | 0.28 | reference |
|
| 44 |
+
| Snapdragon X2 Elite NPU | Qualcomm AI Hub, precompiled QNN ONNX | `.onnx` compiled by AI Hub | 1.27 | 0.37 | not compared (AI Hub profile job, 2026-10-30) |
|
| 45 |
+
| Snapdragon X2 Elite NPU | Qualcomm AI Hub, ONNX Runtime QNN EP | `.onnx`, compiled when it loads | 1.26 | 1.57 | not compared (AI Hub profile job, 2026-10-30) |
|
| 46 |
+
| Galaxy S26 NPU | Qualcomm AI Hub, precompiled QNN ONNX | `.onnx` compiled by AI Hub | 1.30 | 0.20 | not compared (AI Hub profile job, 2026-10-30) |
|
| 47 |
+
|
| 48 |
+
The ONNX file against the source `.tflite` (LiteRT interpreter on the CPU, the same input): PASS, cosine ≥ 0.9999 for every output.
|
| 49 |
+
|
| 50 |
+
## Run it on the Intel NPU
|
| 51 |
+
|
| 52 |
+
Download this repo, then run the snippets from its folder:
|
| 53 |
+
|
| 54 |
+
```sh
|
| 55 |
+
pip install huggingface_hub
|
| 56 |
+
hf download mlboydaisuke/6DRepNet-HeadPose-OpenVINO --local-dir 6DRepNet-HeadPose-OpenVINO
|
| 57 |
+
cd 6DRepNet-HeadPose-OpenVINO
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
OpenVINO (`pip install openvino==2026.4.1`):
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
import numpy as np
|
| 64 |
+
import openvino as ov
|
| 65 |
+
|
| 66 |
+
core = ov.Core()
|
| 67 |
+
if "NPU" not in core.available_devices:
|
| 68 |
+
raise SystemExit(f"no Intel NPU visible to OpenVINO: {core.available_devices}")
|
| 69 |
+
with open("npu/6drepnet.blob", "rb") as f:
|
| 70 |
+
compiled = core.import_model(f.read(), "NPU") # precompiled: no compile at load
|
| 71 |
+
# or compile the IR on this machine: compiled = core.compile_model("openvino/6drepnet.xml", "NPU")
|
| 72 |
+
# replace the zeros with your preprocessed input (float32, the shapes printed by compiled.inputs)
|
| 73 |
+
feeds = {i.get_any_name(): np.zeros(list(i.shape), np.float32) for i in compiled.inputs}
|
| 74 |
+
outputs = compiled(feeds)
|
| 75 |
+
print({o.get_any_name(): outputs[o].shape for o in compiled.outputs})
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
ONNX Runtime with the OpenVINO EP (`pip install onnxruntime==1.31.1 onnxruntime-ep-openvino==1.8.1`):
|
| 79 |
+
|
| 80 |
+
```python
|
| 81 |
+
import numpy as np
|
| 82 |
+
import onnxruntime as ort
|
| 83 |
+
import onnxruntime_ep_openvino as ov_ep
|
| 84 |
+
|
| 85 |
+
ort.register_execution_provider_library(ov_ep.get_ep_name(), ov_ep.get_library_path())
|
| 86 |
+
npu = [d for d in ort.get_ep_devices()
|
| 87 |
+
if d.ep_name == ov_ep.get_ep_name() and d.ep_metadata.get("ov_device") == "NPU"]
|
| 88 |
+
if not npu:
|
| 89 |
+
raise SystemExit("no Intel NPU visible to the OpenVINO EP")
|
| 90 |
+
so = ort.SessionOptions()
|
| 91 |
+
so.add_provider_for_devices(npu, {})
|
| 92 |
+
sess = ort.InferenceSession("6drepnet.onnx", sess_options=so) # compiles for the NPU here
|
| 93 |
+
# replace the zeros with your preprocessed input (float32)
|
| 94 |
+
feeds = {i.name: np.zeros(i.shape, np.float32) for i in sess.get_inputs()}
|
| 95 |
+
outputs = sess.run(None, feeds)
|
| 96 |
+
print([o.shape for o in outputs])
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## Licence
|
| 100 |
+
|
| 101 |
+
MIT, the licence of [litert-community/6DRepNet-HeadPose-LiteRT](https://huggingface.co/litert-community/6DRepNet-HeadPose-LiteRT).
|
manifest.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_repo": "litert-community/6DRepNet-HeadPose-LiteRT",
|
| 3 |
+
"source_revision": "6a7d8fe0ca042d1524e3912d3371a61d0af45528",
|
| 4 |
+
"graphs": {
|
| 5 |
+
"6drepnet": {
|
| 6 |
+
"from": "6drepnet",
|
| 7 |
+
"ir": {
|
| 8 |
+
"openvino": "2026.4.1-22982-e213a147257-releases/2026/4",
|
| 9 |
+
"compress_to_fp16": false
|
| 10 |
+
},
|
| 11 |
+
"blob_compiled_with": {
|
| 12 |
+
"openvino": "2026.4.1-22982-e213a147257-releases/2026/4",
|
| 13 |
+
"FULL_DEVICE_NAME": "Intel(R) AI Boost",
|
| 14 |
+
"NPU_DRIVER_VERSION": "1004841",
|
| 15 |
+
"NPU_COMPILER_VERSION": "524292",
|
| 16 |
+
"NPU_COMPILER_TYPE": "CompilerType.PREFER_PLUGIN",
|
| 17 |
+
"INFERENCE_PRECISION_HINT": "<Type: 'float16'>"
|
| 18 |
+
},
|
| 19 |
+
"files": {
|
| 20 |
+
"6drepnet.onnx": {
|
| 21 |
+
"bytes": 157356537,
|
| 22 |
+
"sha256": "7a0ede49b22803e4e6bacbd3549dbde4e4892217022ef63462a974dd452417ea"
|
| 23 |
+
},
|
| 24 |
+
"openvino/6drepnet.xml": {
|
| 25 |
+
"bytes": 295037,
|
| 26 |
+
"sha256": "2bdc41ebbf65c31529f005aa2503d2ec34155b3dfd31a108a6bc62cbbb082362"
|
| 27 |
+
},
|
| 28 |
+
"openvino/6drepnet.bin": {
|
| 29 |
+
"bytes": 157293720,
|
| 30 |
+
"sha256": "d3c69f2b93f72e79044fb61b8f1ebae7bb3d03c3a2c171c3ae4d9c45ea676c50"
|
| 31 |
+
},
|
| 32 |
+
"npu/6drepnet.blob": {
|
| 33 |
+
"bytes": 79569025,
|
| 34 |
+
"sha256": "8e31e4cc1fa04d8548894c8e45ba6f00e5c4aa6911f5d8ab37080473c55469ef"
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
}
|
npu/6drepnet.blob
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e31e4cc1fa04d8548894c8e45ba6f00e5c4aa6911f5d8ab37080473c55469ef
|
| 3 |
+
size 79569025
|
openvino/6drepnet.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3c69f2b93f72e79044fb61b8f1ebae7bb3d03c3a2c171c3ae4d9c45ea676c50
|
| 3 |
+
size 157293720
|
openvino/6drepnet.xml
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|