← Back to case studies
Automated Document ID Validation with CNN + LLM Pipeline
Delivered in
3 months
Processing time
manual review
→
automated
Integration
REST API, no UI change
A confidential client required automated validation of identity documents to replace a costly and slow manual review process for customer registration.
What changed
Before
Intake
Uploaded document
Review
Manual check
per document
After
Classify
ResNet-18
document type
Read
PaddleOCR
text extraction
Validate
Llama
field-level checks
Integrate
FastAPI
REST into onboarding
Three models in a line — classify, read, validate — behind one API the client's onboarding flow calls.
What we built
The client needed to automate the validation of identity documents submitted during customer registration. Existing manual review created bottlenecks, inconsistencies, and compliance risks. The solution needed to classify document types, extract data, cross-validate fields, and expose results via a REST API.
Key Features
CNN image classification using ResNet18 transfer learning (PyTorch) to identify document type.
OCR data extraction with PaddleOCR for reliable text capture across varied document formats.
LLM-powered structured model extraction via Ollama + Llama 3.1 for converting raw OCR output to structured records.
Cross-validation prompting to verify extracted fields against business rules.
REST API delivery via FastAPI for seamless integration into the client registration workflow.
Containerized pipeline (Docker) for consistent deployment across environments.
Results
Manual document review replaced by an automated pipeline delivered in 3 months.
Significant reduction in processing time per document compared to manual review.
Consistent accuracy across document types through CNN classification and LLM validation layers.
REST API integration allowed the client to embed validation directly into their onboarding flow.
Stack
Engagement: 3 months · Product Engineering, AI Infrastructure & MLOps