Work04AI & computer vision

VeriLens

On-device KYC: face match, passive liveness, OCR and tamper forensics — 100 % in the browser.

Role
Solo — design, engineering, deployment
Language
Python 51.8% · JavaScript 32.2%
Timeline
Jul 2026 → Jul 2026
Last push
7 weeks ago · 5 commits
VeriLens — screenshot of the live product
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

  1. 01

    UltraFace RFB-320 finds faces, MobileFaceNet produces embeddings compared by cosine similarity; MiniFASNetV2 with 3-crop test-time augmentation scores passive liveness.

  2. 02

    Tesseract 5 LSTM extracts document fields; Error Level Analysis, two-stage copy-move detection and JPEG metadata checks produce a tamper score.

  3. 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.

  4. 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

From the notes