Intelligent Exam Scanner
Embedded scanner extracting structured data from imperfect paper documents.
- Extracting structured information from physical documents at scale is slow by hand, and real scans vary far more in quality than curated datasets suggest.
- Built the full pipeline at KTH: geometric correction and adaptive thresholding, region detection, and CNN-based text recognition with per-field confidence, running on embedded hardware.
- Completed in 2020 as a research internship. Measurements are not published.
Introduction
A computer vision system built during a research internship at KTH Royal Institute of Technology in Stockholm, which automatically extracts information from scanned documents using image preprocessing and trained text-recognition models, running on embedded hardware.
Context and problem
Extracting structured information from physical documents at scale is a recurring administrative problem. Doing it manually is slow and error-prone; doing it with a general-purpose cloud service was not appropriate for the constraints of this setting.
The interesting difficulty was not recognition accuracy in the abstract but the variability of real scans: skew, uneven lighting, imperfect paper alignment, and handwriting quality.
- Scan quality varies far more than curated datasets suggest
- Layout is semi-structured, not fixed
- Embedded target limits available compute
Objectives
- Automatically locate the regions of a document that contain information of interest
- Recognise the text in those regions reliably enough to be useful
- Run the whole pipeline on embedded hardware
- Handle imperfect scans without manual pre-processing
Constraints
- Limited compute and memory on the embedded target
- No dependence on network connectivity
- Input quality outside the system's control
- Recognition errors must be detectable, since silent errors are worse than refusals
Architecture
Document Capture
Scanned image input
Image Preprocessing
Deskew, denoise, normalise contrast
Region Detection
Locate fields of interest
Text Recognition
CNN-based character and word recognition
Structured Output
Extracted fields with confidence
Data and model pipeline
- Geometric correction applied before anything else, since downstream stages assume aligned input
- Adaptive thresholding to handle uneven illumination across the page
- Region segmentation to isolate the fields carrying information
- Convolutional recognition models trained on the relevant character set
- Confidence retained per field so low-certainty extractions can be flagged
Optimization
- Preprocessing tuned to remove the failure modes actually observed, rather than generically
- Model sized for the embedded target from the start rather than compressed afterwards
- Recognition applied only to detected regions instead of the whole page
Deployment
- Deployed as an embedded computer vision system
- Operates without network connectivity
- Developed and evaluated in a university research context
Reliability
- Per-field confidence so uncertain results are surfaced rather than silently accepted
- Graceful handling of documents that fail region detection
- Preprocessing validated against the range of scan quality observed in practice
Benchmark methodology
Evaluation used a held-out set of real scans spanning the observed range of quality, with character-level and field-level accuracy reported separately — field-level accuracy is what determines whether the system is usable, and it is always lower.
Results
This work was carried out in 2020 in a university research context. Measurements are not published here.
Benchmarking in progress. Results will be published with the hardware, model, runtime and measurement conditions that produced them.
Trade-offs
Embedded deployment
- Gains: no connectivity requirement, data stays local
- Costs: model capacity bounded by the target hardware
Heavy preprocessing
- Gains: markedly improves recognition on poor scans
- Costs: adds latency and its own failure modes
Lessons learned
- Preprocessing quality determined the outcome more than model choice did.
- Real input is far more variable than any curated training set; the evaluation set has to reflect that or the numbers are fiction.
- Field-level accuracy, not character-level accuracy, is the metric that decides whether such a system is usable.
- Reporting confidence is what makes an imperfect recognition system safe to deploy.
Future improvements
- Modern sequence-based recognition architectures in place of per-character models
- Layout analysis able to handle a wider range of document structures
Technology stack
Vision
- Python
- OpenCV
- CNN-based text recognition
Target
- Embedded system deployment
Python · OpenCV · CNNs · Text Recognition · Image Processing · Embedded Systems