Auto-Correct OCR: a novel method for enhancing character recognition accuracy through error correction
摘要
Optical character recognition (OCR) systems deployed in industrial manufacturing environments face the dual challenges of high generalization requirements and extremely low tolerance for recognition errors. To address these issues, this paper proposes the Auto-Correct OCR framework, which comprises a training-free base recognition module and a domain-adaptive post-processing module termed structure-aware correction (SAC). Unlike conventional approaches that rely on extensive retraining, the framework introduces a hierarchical architecture that decouples structure learning from correction rule learning. For fixed-length strings, SAC employs a two-stage design: a structure learner that captures stable position-level character-type constraints, followed by a correction rule learner that applies position-independent classifiers with sample weighting for selective correction. For variable-length strings, SAC incorporates a dual-encoder Transformer architecture that fuses OCR features with product name semantics via cross-attention, enabling structure-aware character correction. Extensive experiments on brewery and automotive parts datasets demonstrate the effectiveness of the proposed approach. For fixed-length inventory codes, cross-temporal validation achieves an exact match rate exceeding 99%. For variable-length specification strings, SAC improves character accuracy from 97.23% to 99.63% and exact match rate from 84.14% to 96.58%. By leveraging structural priors, the framework delivers high accuracy and reliability under limited hardware resources, offering strong potential for rapid deployment in industrial manufacturing applications.