External link

You're about to leave this site

This link opens a separate website:

rekokit.com

AI & Data Products

OCR KTP & NPWP API

Role
AI/ML Engineer
Duration
Dec 2025 - Jan 2026
Client
PT Varnion Technology Semesta
cover.jpg
OCR KTP & NPWP API

AI-powered OCR REST API for Indonesian identity documents (KTP & NPWP), designed to run on NVIDIA Jetson edge devices as well as standard CPU servers. YOLOv8 detects field regions, EasyOCR extracts the text, and a Gemini-powered fallback with an active-learning data flywheel keeps improving accuracy toward a fully offline, self-hosted model.

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.

Next project

Varnion Track

Enterprise Tools

View case study→