Before pasting a customer ticket, invoice, or incident screenshot into chat or a bug tracker,
let two chained local neural networks read every line and black out private customer data
strictly inside your browser tab — then export a permanently pixel-redacted PNG.
The Engineering Question
Can we chain PP-OCRv5 Mobile (21.5 MB ONNX WASM) with
DeBERTa-v3 PII (143 MB q8 WASM, 60 PII categories) and use PP-OCRv5's
per-character CTC timesteps to mask only the sensitive value inside each text line
— keeping field labels legible while never sending a single pixel to a server?
</> Show the code — CTC sub-box projection & redaction geometry</> Show the code — Two-worker local orchestration & PNG export
Findings & Honest Trade-Offs
Sub-Line Redaction via CTC Timesteps
Instead of blacking out an entire OCR line like Contact Email: elena.vance@…,
we project DeBERTa's character offsets through PP-OCRv5's CTC peak timesteps
(chars[i].t / timeSteps), masking only the private value while preserving
the surrounding field label.
Pixel-Destructive PNG Export
Exporting flattens the canvas onto a fresh 2D buffer and overwrites the masked pixels
before encoding a PNG. Unlike PDF overlay boxes or CSS blurs, the underlying characters
no longer exist in the exported image bytes.
Shared Cache, Zero Duplicate Weights
This showcase imports the exact same workers and Cache Storage keys as
PP-OCRv5 Mobile and
DeBERTa PII Redaction. If you have
already visited either demo, it auto-initialises from disk with zero re-download.
Best-Effort First Pass — Verify Before Sharing
Low-resolution screenshots, stylized fonts, or unusual account formats can cause OCR
typos or missed NER spans. Always inspect the audit table (or switch to
Inspect Boxes) before sharing sensitive screenshots externally.