Models About & Code

Standalone App & PWA

Install Global Script OCR Workbench from its dedicated origin as an offline multilingual OCR PWA with OS image/* file_handlers support and zero camera, microphone, or geolocation permissions.

Open scripts.webai.show ↗

Honest cache note: browsers isolate Cache Storage per origin, so scripts.webai.show stores its own ONNX weights (PP-LCNet 6.8 MB + LightOnOCR-2-1B 713.2 MB mixed q4/q4f16). Staying on webai.show shares cached weights across the site.

Multilingual Transit Sign & Receipt · 860×640 Test rotation: 0° CW · Press Auto-Deskew AI
Raw Scan 0° CW

Multilingual document scan ready for PP-LCNet orientation classification.

Drop or paste (Ctrl/Cmd+V) any sideways invoice, multilingual street sign, receipt, or bilingual scan. All pixels remain strictly on-device.

Stage 1 · PP-LCNet Orientation Probabilities

Awaiting PP-LCNet

Rotate the page to 90°, 180°, or 270°, then run PP-LCNet (6.8 MB CPU WASM) to predict orientation probabilities and auto-straighten before OCR.

Loaded Multilingual Transit Sign & Receipt. Run Auto-Deskew & Extract locally on-device.

Multilingual Document Exports

UTF-8 · BiDi Safe · OWASP JSON

Run Auto-Deskew & Extract (or enter text in Raw Markdown) to unlock .md, .txt, and OWASP-safe .json exports.

Extracted Multi-Script Document

Awaiting live OCR

Compare against PP-OCRv5 Mobile (21.5 MB CPU WASM) on the deskewed scan without leaving your device.

Local AI Engine

100% Apache-2.0 pipeline: PP-LCNet orientation classifier (6.8 MB CPU WASM) + LightOnOCR-2-1B (713.2 MB mixed q4/q4f16 WebGPU) + optional PP-OCRv5 Mobile (21.5 MB CPU WASM).

Stage 1 · PP-LCNet Document Orientation (6.8 MB fp32 · Apache-2.0)

PaddlePaddle/PP-LCNet_x1_0_doc_ori_onnx · onnxruntime-web@1.21.0 CPU WASM · x [1,3,224,224] → 0° / 90° / 180° / 270°

Stage 2 · LightOnOCR-2-1B Global OCR (713.2 MB q4/q4f16 · Apache-2.0)

onnx-community/LightOnOCR-2-1B-ONNX · local @huggingface/transformers@4.3.2 override · WebGPU Pixtral ViT (q4) + Qwen3 decoder (q4f16)

Optional CPU Fallback · PP-OCRv5 Mobile Multilingual OCR (21.5 MB fp32 · Apache-2.0)

PaddlePaddle/PP-OCRv5_mobile_det_onnx + rec (18,383-char dictionary) · reused ../../models/pp-ocrv5-mobile/worker.js (onnxruntime-web@1.21.0 CPU WASM) · Keeps CPU-only browsers genuinely runnable alongside PP-LCNet Auto-Deskew.

Stage 1 · PP-LCNet Not loaded (6.8 MB)
Stage 2 · LightOnOCR-2-1B Not loaded (713.2 MB)
CPU Fallback · PP-OCRv5 Optional · Standby (21.5 MB)
Detected Runtime Checking…

How Global Script OCR Workbench Works

Real-world scans arrive sideways, inverted, and packed with mixed writing systems. This workbench chains a tiny 6.8 MB CPU orientation classifier with a 1B WebGPU vision-language OCR model so pages are straightened locally before a single character is decoded.

1. PP-LCNet Doc Orientation (6.8 MB · Apache-2.0)

PaddlePaddle/PP-LCNet_x1_0_doc_ori_onnx runs on onnxruntime-web@1.21.0 CPU WASM in ~11 ms per page. Following its official inference.yml (short-side 256 resize, 224×224 center crop, ImageNet BGR normalization), it emits 4-class probabilities over 0° / 90° / 180° / 270° and applies the exact inverse clockwise rotation (360 - angle) % 360 before OCR.

2. LightOnOCR-2-1B (713.2 MB q4/q4f16 · Apache-2.0)

onnx-community/LightOnOCR-2-1B-ONNX (model_type: lighton_ocr) pairs a Pixtral vision encoder (q4 fp32 activations to prevent Metal fp16 attention overflow) with a Qwen3 decoder (q4f16) via an isolated local @huggingface/transformers@4.3.2 worker on WebGPU, streaming structured Markdown, semantic HTML tables, Latin, CJK, Arabic RTL, Cyrillic, Devanagari, and math at ~50 tok/s locally.

3. Honest WebGPU Gate, CPU Fallback & License Audit

On browsers without WebGPU, LightOnOCR-2-1B gates honestly while PP-LCNet Auto-Deskew pairs with PP-OCRv5 Mobile (21.5 MB, Apache-2.0) in CPU WebAssembly. llamaindex/OCRia-nano-1 was audited and omitted due to its Modified OpenRAIL-M Attachment A commercial cap (>$2M revenue/funding and competing-service restriction), keeping this workbench 100% Apache-2.0.

Show the code — Stage 1 PP-LCNet 224×224 BGR preprocessing & 4-angle orientation worker
Show the code — Stage 2 LightOnOCR-2-1B WebGPU worker (local @huggingface/transformers@4.3.2)
Show the code — analyzeTextScripts() Unicode script & RTL BiDi directionality detector
Show the code — parseOcrDocument() semantic Markdown, HTML-table & BiDi block parser
Show the code — renderParsedDocumentToNode() pure-DOM RTL-safe dir="auto" renderer
Show the code — StageWorkerClient FIFO request queue & streaming token lifecycle

Multilingual Markdown Export (.md)

UTF-8 Markdown with orientation provenance and semantic tables.