Optical character recognition remains critical infrastructure for document digitization, yet state-of-the-art performance is often restricted to well-resourced institutions by prohibitive computational barriers. End-to-end transformer architectures achieve strong accuracy but demand hundreds of GPU hours for domain adaptation, limiting accessibility for practitioners and digital humanities scholars. We present a modular detection-and-correction framework that achieves near-SOTA accuracy with single-GPU training. Our approach decouples lightweight visual character detection (domain-agnostic) from domain-specific linguistic correction using pretrained sequence models including T5, ByT5, and BART. By training the correctors entirely on synthetic noise, we enable annotation-free domain adaptation without requiring labeled target images. Evaluating across modern clean handwriting, cursive script, and historical documents, we identify a critical "Pareto frontier" in architecture selection: T5-Base excels on modern text with standard vocabulary, whereas ByT5-Base dominates on historical documents by reconstructing archaic spellings at the byte level. Our results demonstrate that this decoupled paradigm matches end-to-end transformer accuracy while reducing compute by approximately 95%, establishing a viable, resource-efficient alternative to monolithic OCR architectures.
Figures & tables
Fig. 1 : The Domain Gap. We evaluate across a difficulty spectrum. While token-based models (T5) excel on (a), they struggle with the archaic vocabulary and noise in (c), necessitating the byte-level reconstruction of ByT5.
Fig. 2 : Decoupled detection-and-correction architecture. A detection-based visual module localizes and classifies characters in parallel and is pretrained on large-scale synthetic data, followed by lightweight domain adaptation using weak supervision (CTC loss). A pretrained language model corrector is fine-tuned to repair residual recognition errors and capture domain-specific linguistic patterns. Decoupling visual detection from linguistic correction enables efficient adaptation across writing styles and document domains.
Dataset
Domain
Vocabulary
Visual Noise
CVL
Modern
Standard
Low
IAM
Modern
Standard
High (cursive)
GW
Historical
Archaic
High (degradation)
TABLE I : Dataset characteristics across three handwriting domains.
Method
Architecture
Params
Training Data
Adaptation Cost
W. Acc (%)
CER (%)
MGP-STR †
Multi-Granularity ViT
148M
100M+ Synthetic
100+ GPU hrs
82.30
—
T5-Base (Ours)
Linguistic Adapter
220M
1.5M Synthetic
3 + 0.5 GPU hrs
78.10
1.90
BART-Base (Ours)
Linguistic Adapter
140M
1.5M Synthetic
3 + 0.5 GPU hrs
77.82
1.95
ByT5-Base (Ours)
Linguistic Adapter
582M
1.5M Synthetic
3 + 1.0 GPU hrs
76.45
1.98
TrOCR-Base ‡
End-to-End Transform.
334M
684M Synth Lines
200+ GPU hrs
74.50
3.42
Detector Baseline
Object Detector Only
40M
1M Synthetic
3 GPU hrs
72.84
3.71
TABLE II : CVL (Modern Clean Handwriting) Results.
Method
Architecture
Params
Training Data
Adaptation Cost
CER (%)
DTrOCR †
Decoder-Only Transform.
300M
2B+ Synthetic Lines
> 500 GPU hrs
2.38
TrOCR-Large ‡
End-to-End Transform.
558M
684M Synthetic Lines
300+ GPU hrs
2.89
TrOCR-Base ‡
End-to-End Transform.
334M
684M Synthetic Lines
200+ GPU hrs
3.42
BART-Base (Ours)
Linguistic Adapter
140M
1.5M Synthetic
3 + 0.5 GPU hrs
5.18
T5-Base (Ours)
Linguistic Adapter
220M
1.5M Synthetic
3 + 0.5 GPU hrs
5.40
ByT5-Base (Ours)
Linguistic Adapter
582M
1.5M Synthetic
3 + 1.0 GPU hrs
6.35
TABLE III : IAM (Modern Cursive Handwriting) Results.
Method
Architecture
Evaluation
CER (%)
WER (%)
Kumari et al. (2022)
CNN + BGRU + CTC
Supervised
4.88
14.56
BART-Base
Linguistic Adapter
Annotation-Free
5.20
13.80
ByT5-Base
Byte-Level Adapter
Annotation-Free
5.35
14.20
T5-Base
Token-Level Adapter
Annotation-Free
5.86
15.10
Detector Baseline (Ours)
DINO-DETR Visual
Supervised
3.70
11.20
TABLE IV : George Washington (Historical Handwriting) Results.
Category
Input (Detector Output)
T5 Prediction
Mechanism / Error Type
Success (English)
olider cultivatet plands
older cultivated plants
Phonetic Repair (Fixes multi-token noise)
plys on a qunte
plays on a quote
Contextual Disambiguation (plys → plays)
by Heinz Zamek
by Heinz Zemanek
Knowledge Prior (Restores Named Entity)
Failure (German)
deines Dienstes frey
deines Dienstes frei
Modernization Bias (Archaic y→i )
Zum Augenblicke
Zum Augenblick
Grammatical Flattening (Dative → Nom.)
Todtenglocke schallen
Zeit für mich schallen
Semantic Hallucination (Context Leakage)
TABLE V : Qualitative Error Analysis (CVL Dataset).