
- model payload (16.6 → 5.6 MB)
- −66 %
- genuine vs impostor cosine
- 0.85 / −0.01
- live vs replay liveness probability
- 0.998 vs 0.06
- three models on 2 vCPUs
- ~48 ms
A complete identity-verification suite that runs on ONNX Runtime Web and Tesseract WASM with zero inference APIs: the images never leave the device, and INT8 quantisation cut the model payload by two thirds.
Problem
KYC normally means uploading a passport and a selfie to someone else’s server. The challenge was to run detection, embedding, liveness, OCR and forgery analysis client-side on low-bandwidth devices without losing the decision margins that make the verdict trustworthy.
Approach
- 01
UltraFace RFB-320 finds faces, MobileFaceNet produces embeddings compared by cosine similarity; MiniFASNetV2 with 3-crop test-time augmentation scores passive liveness.
- 02
Tesseract 5 LSTM extracts document fields; Error Level Analysis, two-stage copy-move detection and JPEG metadata checks produce a tamper score.
- 03
A weighted trust score (0.35 face · 0.25 liveness · 0.25 tamper · 0.15 OCR completeness) sits under hard-fail rules, producing a verdict and a downloadable JSON audit report.
- 04
Static INT8 (QDQ) quantisation shipped for detection and embeddings; liveness deliberately stayed FP32 after measurement showed INT8 broke spoof separation — documented, not hidden. Everything is vendored; Playwright E2E asserts the genuine and tampered flows.
Results
- model payload (16.6 → 5.6 MB)
- −66 %
- genuine vs impostor cosine
- 0.85 / −0.01
- live vs replay liveness probability
- 0.998 vs 0.06
- three models on 2 vCPUs
- ~48 ms
- Created
- 26 Jul 2026
- Commits
- 5
- Default branch
- main
- License
- MIT
Stack
- ONNX Runtime Web
- WASM
- Tesseract 5
- Python (quantisation + eval)
- Vanilla JS
- Playwright