Abstract
Traditional Optical Character Recognition (OCR) models are typically designed for "close-set" scenarios, where the character classes at inference time match those seen during training. However, real-world applications often encounter "open-set" characters, such as rare Kanji or foreign scripts. This paper introduces the Character-Context Decoupling (CCD) framework, which mitigates the bias introduced by linguistic context. By explicitly separating visual character features from temporal and linguistic information, the proposed OpenCCD model achieves superior generalization to unseen characters.
Introduction
In the field of OCR, models often rely on surrounding text to "guess" ambiguous characters. While beneficial for standard datasets, this linguistic dependency becomes a liability in open-set environments. When a model encounters a novel character, it may "force-fit" it into a known category based on learned language patterns rather than visual evidence. The Open-Set Text Recognition via Character-Context Decoupling framework addresses this by "explaining away" linguistic influence during training, forcing the model to prioritize actual visual features.
The Problem of Contextual Confounding
Standard OCR models suffer from contextual confounding, where the model's prediction is overly influenced by the sequence of characters. For instance, a character visually similar to '0' might be incorrectly identified as 'O' if surrounded by letters. This bias prevents models from accurately recognizing novel symbols that do not conform to the training set's linguistic statistics. The challenge lies in maintaining the benefits of context for sequence ordering while preventing it from polluting the visual representation of individual characters.
The OpenCCD Framework
The authors propose OpenCCD, a network architecture designed to decouple visual features from context through two main components:
- Detached Temporal Attention (DTA): This module predicts word length and character order. To prevent temporal information from biasing visual features, gradients are cut between the DTA and the visual feature extractor.
- Decoupled Context Anchor (DCA): This component models linguistic statistics as a "common cause" of both the image and the label. By using a transformer-based context anchor to "explain away" this bias during training, the visual classifier is forced to rely solely on character shapes (glyphs).
The system utilizes a ResNet-45 backbone with Domain-Specific Batch Normalization (DSBN) to bridge the gap between real-world images and clean font templates used for matching.
Key Insights: Visual Salience
A critical finding of this research is the shift in visual attention. Salience maps reveal that while baseline models often look at neighboring characters to resolve the current one, the OpenCCD framework focuses precisely on the local features of the character being identified.
This decoupling allows the model to act as a "structure-free" matcher. It does not require knowledge of internal character components like strokes or radicals; instead, it only needs a font template (glyph) to recognize a new character, making it highly versatile for diverse scripts.
Experimental Results
The framework was evaluated across open-set, zero-shot, and close-set scenarios:
- Open-Set Performance: On the MLT-2019 Japanese dataset, the model achieved a character accuracy of 65.34%, significantly outperforming the previous state-of-the-art (49.10%).
- Zero-Shot Generalization: The model reached 95.55% accuracy on the HWDB handwritten dataset when trained on only 2,000 character classes.
- Efficiency: The model is optimized for real-world use, achieving 255 FPS on a mobile GPU (RTX 2070 Mobile).
Conclusion and Future Work
By decoupling "what we see" from "what we expect to see," OpenCCD provides a robust path for OCR systems to handle the unpredictable diversity of real-world text. Future work will focus on improving language transfer across vastly different scripts and incorporating rectification modules to handle geometric distortions like curved or skewed text.
Summary updated