e-KYC KTP Extraction & Forensic Anti-Fraud Platform
A local GPU-accelerated (PyTorch CUDA) banking identity verification engine combining OpenCV + EasyOCR (CRAFT + CRNN), MediaPipe 478-landmark EAR/MAR liveness, full 514-regency / 7,285-district Kemendagri NIK forensics, FaceNet 512-D biometrics, Error Level Analysis (ELA), and a persistent FAISS 384-D Hybrid POJK RAG Copilot.
Ask the Sovereign POJK Compliance & RBAC Chatbot
Test role-based access control and POJK compliance guardrails right here. Pick a bank staff role (CS, Analyst, or Director), click any plain-language prompt below, or type your own question to see grounded citations, PII masking, and real-time access blocking in action.
Anda bisa bertanya tentang aturan data nasabah & 9 data error karantina, perbedaan hak akses CS vs Analis vs Direktur, contoh masker NIK/gaji, ambang batas skor fraud (FaceNet & ELA), hingga menguji serangan prompt injection. Pilih tombol ide di bawah atau ketik langsung pertanyaan Anda!
The High Stakes of Digital Identity Fraud
Financial institutions and fintech startups face severe compliance penalties and multi-billion rupiah credit default risks when fraudsters submit fabricated KTP images, stolen national identities, or replayed video selfies.
Legacy OCR tools frequently hallucinate indistinct digits on weathered Indonesian national ID cards, causing legitimate borrowers to be rejected while sophisticated Photoshop edits slip through without forensic examination.
My Contribution
I designed, built, and tested the complete identity verification system — from on-premise EasyOCR CUDA extraction and anti-spoof liveness checks to 512-D FaceNet biometrics, forensic NIK validation, Hybrid POJK RAG, and webhook dispatch.
Anti-Spoof Liveness Detection
Computer Vision Pipeline
Local EasyOCR (CRAFT + CRNN) & RAG
Forensic Engine & Backend
Workflow & Data Flow
From real-time browser camera stream to immutable database ledger and core-banking webhook push, every millisecond is optimized for zero hallucination and mathematical tamper defense.
Dukcapil 16-Digit Forensic NIK Dissector
How the system detects forged national ID numbers without needing direct external database access through algorithmic decomposition of Indonesia's national ID schema:
| Segment | Decoded Field | Forensic Validation Rule |
|---|---|---|
| Digit 1–6 | Administrative Geography | Encodes Province (1-2), Regency/City (3-4), and District (5-6). Cross-referenced against the official Kemendagri spatial gazetteer (38 provinces, 514 regencies, 7,285 districts). |
| Digit 7–8 | Birth Date & Gender Offset | Male dates range from 01–31. Female dates receive a statutory mathematical offset of +40 (41–71). The system decrypts the offset to infer gender and verify exact day of birth. |
| Digit 9–10 | Month of Birth | Validates statutory Gregorian calendar range (01–12). Any value outside this range triggers an immediate automated fraud alert. |
| Digit 11–12 | Year of Birth (YY) | Extracts two-digit birth year, cross-compared with extracted OCR document text to detect altered age or falsified physical documents. |
| Digit 13–16 | Computerized Registration | System serial number generated chronologically by Dukcapil, ensuring unique population identification. |
Key Benchmarks & Reliability
Deterministic verification throughput, biometric precision thresholds, and sub-second multi-layer forensic execution metrics:
AI Compliance Copilot & FAISS Vector RAG
An intelligent Retrieval-Augmented Generation (RAG) assistant grounded in statutory POJK banking regulations, internal fraud SOPs, and live MySQL audit records to provide zero-hallucination compliance verification.
IndexFlatIP store fused with TF-IDF lexical vectors over PDF/Markdown POJK guides.
Engineering Decisions, Data Validation & Access Governance
Architectural trade-offs, strict deterministic validation guardrails, and role-scoped access policies enforcing zero-hallucination compliance.
Data Validation & Deduplication Rules
DD + 40 offset for females), enforces region match against all 38 provinces, 514 regencies/cities, and 7,285 districts, and flags duplicates.
InceptionResnetV1 512-D pass limit (L2 <= 0.85, Cosine >= 0.60) and JPEG ELA check (std <= 12.0) prior to webhook sign-off.
Key Engineering Decisions
ekyc_audit.db) under DB disruption.
Access Control & Data Privacy Governance
| Role / Actor | Authorized Data Scope | Validation / Privacy Enforcement |
|---|---|---|
| Applicant Session | Write-only capture session (KTP upload & 3-stage webcam frames) | Zero access to internal forensic thresholds, cross-applicant records, or compliance ledger |
| Compliance Officer | Read-only inspection of flagged audits, ELA maps, & POJK RAG Copilot | Strict audit logging per review decision; RAG answers restricted to indexed POJK chunks & read-only SQL views |
| Core Banking Webhook | Signed verification payload + tamper-proof ReportLab PDF summary | Authenticated machine-to-machine dispatch storing immutable MySQL 3NF decision hashes |
Multi-Format Compliance Reconciliation & Automated Pytest Proofs
Because institutional banking codebases are confidential, this project is paired with a 100% synthetic open-source verification repository demonstrating CSV/Excel/JSON reconciliation, RapidFuzz deduplication, quarantine logging, PII masking, RBAC, and offline POJK RAG verified by 9/9 passing pytest assertions.
CS_BRANCH, COMPLIANCE_ANALYST, RISK_DIRECTOR) → Sovereign POJK RAG offline.
quarantine_errors.csv.