Introduction
Optical Character Recognition (OCR) is a cornerstone of document digitization, yet many state-of-the-art engines operate as "black boxes." These proprietary or complex systems do not allow for gradient-based optimization, making it difficult to train preprocessors (image cleaners) to improve their performance on noisy real-world data. Traditionally, training a neural network to mimic these engines—a "differentiable bypass"—requires an exhaustive number of API queries or local computations, leading to prohibitive financial costs and time bottlenecks. This paper introduces budget-aware sample selection methods that significantly reduce the required number of queries while maintaining high cleaning performance.
Methodology
The authors propose a framework using a UNet as an image preprocessor and a CRNN as an approximator to the black-box OCR. To optimize the training process under a limited query budget, two primary strategies were developed:
- Smart Sample Selection: Instead of querying the OCR for every image, the system selects informative samples based on Character Error Rate (CER).
- UniformCER: Samples are picked to represent a broad spectrum of difficulty, from low to high CER.
- TopKCER: Focuses exclusively on the most difficult samples where the model currently fails.
- Dataset Pruning: The researchers found that the easiest 30% of document images (those the OCR handles well without preprocessing) can be discarded entirely without impacting the final quality of the cleaner.
Experimental Setup
The methods were evaluated on two challenging benchmarks:
- POS Dataset: ~90,000 word patches from real-world receipts (Findit, ICDAR SROIE, CORD) characterized by noise and fading.
- VGG Dataset: 60,000 synthetic word images for robustness testing.
The system was tested against three major OCR engines: Tesseract, EasyOCR, and the Google Cloud Vision API.
Key Results
The experiments revealed a law of diminishing returns regarding the query budget. A massive jump in accuracy is observed when moving from a 0% to a 2.5%–4% budget, with only marginal gains thereafter.
As shown in the figure above, the performance achieved with just a 4% query budget is remarkably close to the 100% budget baseline. For instance, with Tesseract, the accuracy improved from 54.51% (noisy) to 80.73% with a 4% budget, nearly matching the 83.36% achieved at full budget. For the Google Vision API, the authors achieved a 4% accuracy boost using only a tiny fraction of the usual queries, reducing experimental costs from an estimated $9,030 USD to just $280 USD—a 32x reduction.
Discussion and Conclusion
This research demonstrates that "hardness" is a powerful proxy for information. By focusing on samples where the OCR engine struggles, models can learn effective cleaning strategies with minimal supervision. Furthermore, the preprocessors exhibited strong transferability; a cleaner trained for one engine often improved performance for others. Future work will explore more granular selection criteria and the application of these techniques to specialized domains like handwritten or historical document recognition.
Summary updated