Cheque Processing & Digitization Ecosystem
End-to-end cheque digitization pipeline using OpenCV for image preprocessing, PaddleOCR for text and amount extraction, and a Flask + Docker orchestration layer.
- Field accuracy
- 96.2%
- Throughput
- 120 img/s
- p95 latency
- 850ms
Problem & Solution
The Problem
Manual cheque processing is slow, error-prone, and expensive at scale. Banks need automated extraction of payee, amount, date, and signature region from cheque images with high accuracy.
The Solution
Built a Flask + Docker service that takes a cheque image, runs OpenCV preprocessing (deskew, denoise, contrast), then routes crops to PaddleOCR for payee, amount, date, and signature region extraction. Outputs are validated and stored as structured JSON.
System Architecture
End-to-end flow from intake to outcome
- 01
Image Preprocessing
OpenCVOpenCV deskews, denoises, and normalizes contrast on the cheque image.
- 02
Field Localization
OpenCVHeuristics localize payee, amount, date, and signature regions.
- 03
OCR Extraction
PaddleOCRPaddleOCR extracts text from each region.
- 04
Validation
PythonRegex + amount-parsing rules validate the extracted fields.
- 05
Orchestration
FlaskDockerFlask + Docker expose the pipeline as a service.
Engineering Challenges & Wins
Optimization results and engineering tradeoffs
Optimization Results
- OpenCV preprocessing (deskew, denoise, contrast) for clean OCR input.
- PaddleOCR extraction of payee, amount, date, and signature region.
- Flask + Docker for full pipeline orchestration.
Engineering Challenges
- Handling handwritten and printed fields with a single OCR model.
- Robust preprocessing for noisy, skewed real-world cheque scans.
Related Projects
Suite of context-aware document intelligence pipelines: PDF intelligence (PyMuPDF + spaCy + BERT), passport MRZ segmentation, and prescription OCR.
- PDF entity F1
- 0.91
- MRZ accuracy
- 98.5%
- Rx field accuracy
- 94%
Mail-server gateway (Postfix Milter) that intercepts every inbound message, runs a fine-tuned BERT core (M-BSCE) through an asynchronous inference pipeline (RabbitMQ + Celery), and adds multimodal threat detection (PaddleOCR for Quishing) with SOAP clawbacks to the upstream mail system.
- Quishing detection
- 98%+
- p95 classification
- <400ms
- Async throughput
- 5k msg/min