CurrentSky · Alicante, Spain
Multi-Layered AI Document Verification System
Catching high-quality, AI-generated forgeries that plain OCR can’t — from MRZ logic to pixel-level tampering.

At a glance
Fraud, caught in depth
A full pipeline for automated identity-document authentication — built on the Spanish DNI as a model, blending classic validation with digital forensics. It took 1st place at the FacePhi Challenge 2026.
The event
First place in Alicante
The FacePhi Challenge 2026 is an on-site hackathon in Alicante, Spain, run by FacePhi — a biometric identity-verification company headquartered in the city. Builders were challenged to fight document fraud head-on.
Among the competing teams, CurrentSky’s multi-layered forensic system took 1st place.
The problem
OCR alone isn’t enough
In an era of rising digital fraud and high-quality AI-generated forgeries, reading the text off a document tells you nothing about whether it’s real.
This project delivers comprehensive, automated identity-document authentication — using the Spanish DNI as a model — by combining classic validation algorithms with advanced digital forensic methods across three independent layers.

How it works
Three layers of defense
01
Structural & geographic verification
- ISO region validationIssuing state and nationality codes match the ISO 3166-1 “ESP” standard.
- MRZ & ICAO analysisFull validation of the Machine Readable Zone against international format standards.
- CAN format integrityVerification of the 6-digit Card Access Number on the front of the ID.




02
Logical data integrity
- Visual-MRZ synchronizationCross-referencing data between the visual zone and the MRZ — support number, nationality, birth date, expiry.
- Mathematical logic (Module 23)Verifying the DNI control letter using the official Spanish Ministry of the Interior algorithm.
- Temporal logic & renewalComputing the holder’s age so the validity period (5, 10 years, or permanent) matches Spanish law.
03
Digital forensics & manipulation analysis
- ELA — error level analysisDetecting digital tampering by re-saving images and analysing pixel-level changes, e.g. photos swapped in design software.
- FFT — frequency analysisFast Fourier Transform detects screen grids — flagging photos of a screen or AI-generated images.
- Texture verificationMeasuring spatial sharpness and micro-textures to separate natural photos from overly-uniform fakes.
- EXIF metadata analysisSpotting traces of editing software, stripped metadata, or hardware mismatches between front and back.



Beyond the layers
Key features
Ensemble OCR strategy
A triple-filter approach (balanced, sharpness, contrast) maximises resolution and accuracy even in poor lighting or blur.
Specimen trap
Internal checksum logic identifies and blocks common online templates and “specimen” documents.
Orchestrator & final scoring
An intelligent engine weights every module’s result into a final fraud verdict with a calculated confidence level.
1st Place · FacePhi Challenge 2026 ✦ MRZ & ICAO Validation ✦ Error Level Analysis ✦ Fourier Forensics ✦ Module 23 DNI Logic ✦ Open Source
1st Place · FacePhi Challenge 2026 ✦ MRZ & ICAO Validation ✦ Error Level Analysis ✦ Fourier Forensics ✦ Module 23 DNI Logic ✦ Open Source
1st Place · FacePhi Challenge 2026 ✦ MRZ & ICAO Validation ✦ Error Level Analysis ✦ Fourier Forensics ✦ Module 23 DNI Logic ✦ Open Source
Open source
This project is open source
Read the full code — every check, forensic module, and the final-scoring orchestrator — on GitHub.