OCR Field Extraction
Automated extraction of PAN, Folio numbers from scanned documents using DocTR and custom post-processing.
- Role: Developer
- Timeline: November 2023
- Team: Solo Project
- Technologies: OpenCV, DocTR, Python, Streamlit
- Link: https://field-ocr-extraction-advanced.streamlit.app/
Problem
Financial services require extracting specific fields (PAN, Folio, Account numbers) from scanned documents. Traditional OCR gives raw text - identifying and extracting specific fields requires manual effort.
Solution
Built a specialized OCR pipeline using DocTR for text detection and custom regex/AI post-processing to identify and extract specific financial identifiers with high accuracy.
Impact
- 98% accuracy on PAN extraction
- Processing 100+ documents/minute
- Handles rotated and skewed images
- JSON API for integration
Key features
- Multi-format image support (JPG, PNG, TIFF, PDF)
- PAN number detection and validation
- Folio number extraction
- Account number identification
- Date extraction in multiple formats
- Confidence scoring
- Image preprocessing (deskew, denoise)
- REST API endpoint
Tech stack
- Frontend: Streamlit
- Backend: Python, FastAPI
- Ocr: DocTR, Tesseract (fallback)
- Cv: OpenCV, Pillow, scikit-image
What K Laxman learned
- DocTR vs Tesseract performance tradeoffs
- Image preprocessing for better OCR
- Validation rules for financial identifiers
- Building production OCR APIs
Explore more
- Home — overview, skills and a built-in AI assistant
- Experience — roles at Think360 AI (CAMS), CAMS Mutual Funds and IIT Delhi
- Projects — GenAI, LLM, RAG and full-stack builds
- Education — IIT Delhi, M.Tech & B.Tech Computer Science
- GitHub Activity — open-source contributions
- Contact / Hire me