Skip to content
image-classification → image-to-text (OCR) 2 models · 2 Web Workers · 43.9 MB Total 22.44 MB + 21.5 MB WASM Apache-2.0 + Apache-2.0

Authenticated Document Capture-to-Extraction Gate (43.9 MB Total)

Stage 1: Document Moiré Detector ViT (onnx-community/document-moire-detector-ONNX, 22.44 MB q8 WASM) verifies that a document scan is genuine and free of LCD screen-recapture moiré before Stage 2: PP-OCRv5 Mobile (PaddlePaddle/PP-OCRv5_mobile_det_onnx + rec_onnx, 21.5 MB WASM) extracts oriented text lines. Suspected screen-photos are quarantined at the gate (with an explicit manual override).

1 · Workflow models (43.9 MB total)

Stage 1 · Document Moiré Detector ViT (22.44 MB)

Uses ../worker.js — local 4.3.0 WASM q8 anti-spoofing gate (clean vs moiré).

Stage 2 · PP-OCRv5 Mobile OCR (21.5 MB)

Reuses ../../pp-ocrv5-mobile/worker.js — DBNet text detection + 18,383-char CTC OCR.

2 · Authenticate scan & extract text lines

Initialising two-stage workflow…

No document analysed yet.

Gate verdict–
Clean / Moiré–
Stage 1 (ViT)–
Stage 2 (OCR)–
Lines extracted–
Total ms–
NaN / invalid0

Extracted OCR lines

    See inside the code

    Show the code — moire.js: PpOcrStageClient (reused ../../pp-ocrv5-mobile/worker.js)
    Show the code — worker.js: classifyImage() (Stage 1 anti-spoofing gate)

    References