PP-OCRv6 tiny text detection
pp-ocrv6-tiny-det@2ba1506c fp32 vetted · active onnxruntime-web ≥ 1.17.0 wasmwebgpu
Downloads 1.7 MB once from models.skillsafe.ai, then stays cached for every
SkillSafe app that uses it. Inference runs on your device; nothing you enter is uploaded to load it. Licensed
Apache-2.0 · source Hugging Face PaddlePaddle/PP-OCRv6_tiny_det_onnx at 2ba1506c0380.
See it working
Public apps that declare this model. Open one and the download you see is this file.
- OCR Lab — PP-OCRv6 text recognition in your browserOpen app
Read text out of a screenshot with Baidu's PP-OCRv6 detection and recognition models running entirely in your browser through onnxruntime-web — the image is never uploaded. The 6 MB ONNX package is fetched once from SkillSafe's shared model registry and cached in your browser after the first load, so there is nothing to bring and nothing to configure. Per-line confidence, bounding boxes, a diagnostics panel and text/CSV/JSON/Markdown export are all free and local, and work signed out; an optional metered pass repairs reading order, corrects flagged character confusions and extracts structured fields, cross-checked against what the recogniser actually produced so it cannot quietly invent an invoice total. You can also supply your own fine-tuned ONNX package if you have one. Models are PP-OCRv6 from PaddlePaddle/PaddleOCR (Apache-2.0), served unmodified with their NOTICE and licence; the browser-side pipeline follows the approach popularised by the PaddleOCR community write-ups, with the detection channel count, BGR normalisation and already-softmaxed recognition head re-derived from the published packages.
Files
Every 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 | |
|---|---|---|---|---|
inference.onnx | onnx | 1.7 MB | 193bab7a04fc…fb19f8 |
Signature
Graph inputs and outputs read from the ONNX bytes at vetting — these are the tensor names your session.run() call feeds and reads. Symbolic dimensions are shown by name.
Inputs
xfloat32 [DynamicDimension.0, 3, DynamicDimension.1, DynamicDimension.2]
Outputs
fetch_name_0float32 [ConvTranspose_459_o0__d0, 1, ConvTranspose_459_o0__d2, ConvTranspose_459_o0__d3]
How to use it
Three steps: declare the model on your release, load it through the SDK (verified and cached), hand the bytes to the runtime. The examples below are generated from this entry, so ids, paths and tensor names are exact.
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 1.7 MB · runs on your device" and /models.txt carries the attribution.
{
"models": [
{
"id": "pp-ocrv6-tiny-det",
"revision": "2ba1506c"
}
]
} 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("pp-ocrv6-tiny-det@2ba1506c", "inference.onnx", {
onProgress: (p) => (bar.style.width = Math.round(p.ratio * 100) + "%"),
}); // ArrayBuffer — SHA-256 verified, cached
// Later visits: await ss.models.status("pp-ocrv6-tiny-det@2ba1506c") → { cached: [...], missing: [] }
// Background prefetch on a landing page: ss.models.warm("pp-ocrv6-tiny-det@2ba1506c") 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("pp-ocrv6-tiny-det@2ba1506c", "inference.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 = {
"x": new ort.Tensor("float32", new Float32Array(n), [/* DynamicDimension.0 */ 1, 3, /* DynamicDimension.1 */ 1, /* DynamicDimension.2 */ 1]),
};
const out = await session.run(feeds);
const fetch_name_0 = out["fetch_name_0"].data; // float32 [ConvTranspose_459_o0__d0, 1, ConvTranspose_459_o0__d2, ConvTranspose_459_o0__d3] 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/pp-ocrv6-tiny-det@2ba1506c/inference.onnx curl -sSL -o inference.onnx "https://models.skillsafe.ai/pp-ocrv6-tiny-det@2ba1506c/inference.onnx"
shasum -a 256 inference.onnx # 193bab7a04fca699a6c82e6abb5b81bdb28177f0abd4062552b04908dafb19f8 Licence & attribution
Apache-2.0 · licence text · notice
PP-OCRv6 tiny detection model from PaddleOCR (PaddlePaddle), ONNX export published on Hugging Face. Licensed under the Apache License 2.0.
Apps that declare this model get this text in their generated /models.txt, so a licence that requires a notice always carries one.