YuNet face detection (OpenCV Zoo, dynamic input)
Face detection model for onnxruntime-web. Runs on WASM or WebGPU —
224 KB downloaded once from models.skillsafe.ai, then cached for every SkillSafe app that
uses it. Inference happens on your device; nothing you enter is uploaded to load it, and it never costs a credit.
Weights from Hugging Face · skillsafe-ai/yunet, pinned at ec8d1017224d — also loadable straight from Hugging Face outside SkillSafe (how).
Details
yunet@2026mayec8d1017224d980f30c8f69685a5851ad22f0117Files
Each file is served at an immutable URL; the canonical form is the SHA-256 itself. Tokenizer and config JSON are not here by design — they ship in your app bundle.
| Path | Format | Size | SHA-256 | |
|---|---|---|---|---|
face_detection_yunet_2026may.onnx | onnx | 224 KB | ebafce4e3c11…22f0f0 |
Signature
Graph inputs and outputs read from the ONNX bytes at vetting — the tensor names your session.run() call feeds and reads. Symbolic dimensions are shown by name.
Inputs
inputfloat32 [1, 3, height, width]
Outputs
cls_8float32 [1, anchors, 1]cls_16float32 [1, anchors, 1]cls_32float32 [1, anchors, 1]obj_8float32 [1, anchors, 1]obj_16float32 [1, anchors, 1]obj_32float32 [1, anchors, 1]bbox_8float32 [1, anchors, 4]bbox_16float32 [1, anchors, 4]bbox_32float32 [1, anchors, 4]kps_8float32 [1, anchors, 10]kps_16float32 [1, anchors, 10]kps_32float32 [1, anchors, 10]
Use it in an app declaration · SDK loader · onnxruntime-web · URLs · Hugging Face — generated from this entry
Add to the body of POST /v1/apps/{slug}/releases (or a release session). An unknown or withdrawn model is refused with a 400 naming it; the app page then shows "downloads 224 KB · runs on your device" and /models.txt carries the attribution.
{
"models": [
{
"id": "yunet",
"revision": "2026may"
}
]
} Streams with progress, verifies the SHA-256 against the catalogue, keeps a durable copy in the app's Cache API and reports whether the bytes came from cache or the network.
<script src="/sdk.js"></script> <!-- vendored from https://skillsafe.ai/apps-sdk/v1.js -->
const ss = SkillSafe.init({ slug: "your-app" });
const caps = await ss.models.capabilities(); // { webgpu, wasm, wasmSimd, storage }
const bytes = await ss.models.load("yunet@2026may", "face_detection_yunet_2026may.onnx", {
onProgress: (p) => (bar.style.width = Math.round(p.ratio * 100) + "%"),
}); // ArrayBuffer — SHA-256 verified, cached
// Later visits: await ss.models.status("yunet@2026may") → { cached: [...], missing: [] }
// Background prefetch on a landing page: ss.models.warm("yunet@2026may") The runtime itself ships in your bundle as a vetted {path, sha256} reference — only the weights come from the registry. Pass the bytes in; do not re-fetch by URL.
// onnxruntime-web 1.17.0 ships in your bundle as a vetted {path, sha256} reference —
// dist/ort.wasm.bundle.min.mjs + dist/ort-wasm-simd-threaded.wasm (or the .jsep pair for WebGPU).
import * as ort from "./ort.wasm.bundle.min.mjs";
ort.env.wasm.wasmPaths = { wasm: "/ort-wasm-simd-threaded.wasm" }; // object form, never a prefix string
ort.env.wasm.numThreads = 1; // app hosts have no COOP/COEP
const bytes = await ss.models.load("yunet@2026may", "face_detection_yunet_2026may.onnx", { onProgress });
const session = await ort.InferenceSession.create(new Uint8Array(bytes), {
executionProviders: ["wasm", "webgpu"],
});
// Feeds are named after the graph inputs (read from the file, see the signature above):
const feeds = {
"input": new ort.Tensor("float32", new Float32Array(n), [1, 3, /* height */ 1, /* width */ 1]),
};
const out = await session.run(feeds);
const cls_8 = out["cls_8"].data; // float32 [1, anchors, 1]
const cls_16 = out["cls_16"].data; // float32 [1, anchors, 1]
const cls_32 = out["cls_32"].data; // float32 [1, anchors, 1]
const obj_8 = out["obj_8"].data; // float32 [1, anchors, 1]
const obj_16 = out["obj_16"].data; // float32 [1, anchors, 1]
const obj_32 = out["obj_32"].data; // float32 [1, anchors, 1]
const bbox_8 = out["bbox_8"].data; // float32 [1, anchors, 4]
const bbox_16 = out["bbox_16"].data; // float32 [1, anchors, 4]
const bbox_32 = out["bbox_32"].data; // float32 [1, anchors, 4]
const kps_8 = out["kps_8"].data; // float32 [1, anchors, 10]
const kps_16 = out["kps_16"].data; // float32 [1, anchors, 10]
const kps_32 = out["kps_32"].data; // float32 [1, anchors, 10] Immutable, credential-free, Access-Control-Allow-Origin: *, range requests honoured. The host refuses requests carrying a foreign Origin; a plain curl is fine.
https://models.skillsafe.ai/yunet@2026may/face_detection_yunet_2026may.onnx curl -sSL -o face_detection_yunet_2026may.onnx "https://models.skillsafe.ai/yunet@2026may/face_detection_yunet_2026may.onnx"
shasum -a 256 face_detection_yunet_2026may.onnx # ebafce4e3c118d6554634be5c27ab333b4c047a9a8c3faf1d7cf93101c22f0f0 SkillSafe's copy on Hugging Face — the same bytes (the SHA-256 on each file page matches the hash above), plus manifest.json with the upstream commit, recipe and toolchain, the parity reference tensors and a model card. Use it directly for your own site or notebook. A SkillSafe app must load from the registry: its CSP allows models.skillsafe.ai only, and that copy is what the SDK verifies, the browser shares across apps and the app page discloses. SkillSafe keeps hosting its own copies and the API either way.
// Outside SkillSafe apps only: app hosts allow connect-src models.skillsafe.ai, not huggingface.co.
// Same bytes as the registry copy — the SHA-256 on the Hugging Face file page is ebafce4e3c118d65…
const res = await fetch("https://huggingface.co/skillsafe-ai/yunet/resolve/ec8d1017224d980f30c8f69685a5851ad22f0117/face_detection_yunet_2026may.onnx");
const bytes = new Uint8Array(await res.arrayBuffer());
const session = await ort.InferenceSession.create(bytes, { executionProviders: ["wasm", "webgpu"] }); https://huggingface.co/skillsafe-ai/yunet/resolve/ec8d1017224d980f30c8f69685a5851ad22f0117/face_detection_yunet_2026may.onnx Evaluation
onnx.checker + onnxruntime CPU smoke run with zero-filled inputs at the declared shapes; per-file SHA-256 pinned to the source — imported as published upstream, then checked. Evaluated Sep 22, 2026.
Runs under onnxruntime
Zero-filled inputs at the declared shapes, CPU execution provider on the converter host; the check is that the graph loads, runs, and emits the declared output shapes.
face_detection_yunet_2026may.onnx: input[1,3,320,320] → cls_8[1,1600,1], cls_16[1,400,1], cls_32[1,100,1], obj_8[1,1600,1], obj_16[1,400,1], obj_32[1,100,1], bbox_8[1,1600,4], bbox_16[1,400,4], bbox_32[1,100,4], kps_8[1,1600,10], kps_16[1,400,10], kps_32[1,100,10] 1.5 ms
Toolchain: python 3.12.13 · platform Darwin 25.6.0 arm64 · torch 2.10.0 · onnx 1.23.0 · onnxruntime 1.30.0. Recipe models/recipes/yunet.yaml (cf27be4dcf7f). Full manifest.json
Licence & attribution
MIT · licence text · notice
YuNet: Copyright (c) 2020 Shiqi Yu. MIT License. Distributed via OpenCV Zoo (Apache-2.0). https://github.com/opencv/opencv_zoo/tree/main/models/face_detection_yunet
Apps that declare this model get this text in their generated /models.txt, so a licence that requires a notice always carries one.
Every file here was approved by exact SHA-256 after a structural audit of the graph, fetched from a content-pinned source, and is served credential-free at an immutable URL. The SDK re-verifies the hash on your device before it caches or returns anything. Missing a variant? Request it — or read how the registry works.