How vivek1918/document_verification_system works
Project type and purpose
• This is a specialized, production-grade document verification pipeline (an open-source tool + microservice) designed for KYC.
• It ingests scanned documents, runs OCR, extracts structured fields, normalizes them, applies cross-document rules, logs metrics, and exposes functionality via a REST API and CLI.
File structure
• Top-level:
• api/ (FastAPI endpoints)
• run_pipeline.py & evaluate.py (CLI entrypoints)
• verifier/ (core pipeline modules)
• tests/ (unit tests)
• ocr_outputs/ (sample outputs for Mistral & enhanced)
• config.yml & requirements.txt (configuration/dependencies)
• verifier/ is subdivided into:
• ocr/ (Tesseract, EasyOCR, Mistral, preproc)
• extract/ (regex, LLM, Gemini, GROQ)
• normalize/ (cleaners, normalizers)
• verify/ (cross-document rules)
• io/ (storage abstraction)
• utils/ (logging)
README for additional insights
• Dual OCR engine strategy (Tesseract primary, EasyOCR fallback)
• Optional LLM integration (Gemini API or HF models)
• Seven verification rules across 3 doc types
• GPU support, comprehensive logging/metrics
• FastAPI + CLI interfaces
Essential architectural elements
• Cover every pipeline stage as a separate component
• Extensibility: add new extractor by plugging into the Extractor layer
• Config.yml at the center or top to indicate centralized configuration