Abstract
Scene Text Recognition (STR) remains a challenging task due to environmental factors and stylistic variations. While dictionaries are commonly used as a post-processing step, this paper introduces a novel framework that integrates dictionary knowledge directly into the training and inference phases. By employing a language-based contrastive loss and a visual-language compatibility scoring mechanism, the proposed method achieves significant performance gains. Additionally, the authors introduce VinText, a comprehensive benchmark for Vietnamese scene text recognition.
Introduction
Reading text in natural scenes is complicated by artistic fonts, motion blur, and adverse lighting conditions. Traditional STR pipelines often treat dictionary-based correction as an isolated post-processing step, typically using edit distance to find the closest match to a predicted string. However, this approach suffers from several limitations: it can force incorrect matches for out-of-vocabulary words (the "Dictionary Trap"), it ignores visual evidence when choosing between candidates, and it treats all character substitutions as equally likely, regardless of visual similarity.
Methodology
The proposed dictionary-guided approach treats the lexicon as a source of candidates that are evaluated against visual features.
Candidate Generation and Scoring
Instead of a single prediction, the system generates an initial visual prediction and retrieves the top $k$ most similar words from a dictionary. A compatibility scoring module then evaluates the visual feature map against each candidate. The final output is determined by the highest visual-language compatibility score, rather than simple spelling proximity.
Language-based Contrastive Loss
A key innovation is the introduction of a language-based contrastive loss during training. This loss function encourages the model to maximize the likelihood of the ground truth while minimizing the likelihood of visually similar "distractor" candidates from the dictionary. This process forces the neural network to learn more discriminative visual representations.
Datasets and Benchmarks
The method was evaluated on standard datasets including TotalText (curved text), ICDAR2013, and ICDAR2015. To further test the robustness of the approach, the authors introduced VinText, a new dataset featuring 2,000 images and over 56,000 text instances in Vietnamese. Vietnamese presents a unique challenge due to its extensive use of diacritics and accent symbols, which create many visually similar character pairs.
Results and Analysis
The integration of dictionary guidance yielded consistent improvements across all tested backbones. On the ICDAR2015 dataset, an ABCNet model enhanced with the proposed method improved its F1 score from 36.5% to 57.9% without test-time dictionary use, and to 67.2% with it. On TotalText, the method achieved a state-of-the-art H-mean of 78.5%.
A significant finding is that the dictionary-guided training improves the model's internal representations. Even when a dictionary is not available during inference, models trained with the contrastive loss outperform their baseline counterparts. This suggests that the dictionary acts as an effective "teacher" during the learning process.
Conclusion
By moving dictionary integration from a post-processing "safety net" to a core component of the training and inference loop, this work demonstrates a more synergistic relationship between visual features and linguistic knowledge. While the method currently relies on static lexicons, future research may explore the integration of dynamic language models to further enhance recognition in diverse contexts.
Summary updated