Overview
What was built
Built as an internal tool at Varnion for extracting structured data (NIK, name, birth date, NPWP number, etc.) from photos of Indonesian ID cards and tax registration documents. The pipeline runs YOLOv8 to detect and crop individual field regions, then EasyOCR to extract text from each crop. When OCR confidence drops below threshold, a Gemini 2.0 Flash fallback corrects the reading — and every correction is automatically saved to an active-learning dataset, so the system keeps improving over time and is designed to eventually graduate to a fully offline, self-hosted Ollama model running on the Jetson hardware itself. A synthetic data generator (100% fake, no real personal data) and an auto-labeling tool round out the training pipeline.
- extraction accuracy
- 98%
- document types supported
- 2
Key features
What it does
- YOLOv8 Field Detection (NIK, Nama, NPWP, etc.)
- EasyOCR Text Extraction per Field
- LLM Fallback for Low-Confidence Results (Gemini → Ollama)
- Active Learning: Auto-saves Hard Cases for Retraining
- Synthetic Data Generator (Privacy-safe, No Real PII)
- Multi-target Deployment: CPU Server & NVIDIA Jetson Edge GPU
Challenges
Problems solved
Challenge 1
Designing a graceful LLM fallback that silently returns the original OCR result when Gemini fails or hits quota, instead of erroring out to the user.
Challenge 2
Building a self-learning data flywheel — hard-to-read crops and LLM-corrected labels auto-saved for future fine-tuning of a fully offline Ollama model on Jetson.
