[Paper Review] Rethinking Text Line Recognition Models
This paper proposes a novel text line recognition model combining a Self-Attention encoder with a Connectionless Temporal Classification (CTC) decoder, enhanced with an external language model, which achieves state-of-the-art accuracy and superior efficiency on diverse text types. The architecture outperforms Transformer-based models in both accuracy and latency, particularly on long text lines, and is robust to variable input lengths without performance degradation.
In this paper, we study the problem of text line recognition. Unlike most approaches targeting specific domains such as scene-text or handwritten documents, we investigate the general problem of developing a universal architecture that can extract text from any image, regardless of source or input modality. We consider two decoder families (Connectionist Temporal Classification and Transformer) and three encoder modules (Bidirectional LSTMs, Self-Attention, and GRCLs), and conduct extensive experiments to compare their accuracy and performance on widely used public datasets of scene and handwritten text. We find that a combination that so far has received little attention in the literature, namely a Self-Attention encoder coupled with the CTC decoder, when compounded with an external language model and trained on both public and internal data, outperforms all the others in accuracy and computational complexity. Unlike the more common Transformer-based models, this architecture can handle inputs of arbitrary length, a requirement for universal line recognition. Using an internal dataset collected from multiple sources, we also expose the limitations of current public datasets in evaluating the accuracy of line recognizers, as the relatively narrow image width and sequence length distributions do not allow to observe the quality degradation of the Transformer approach when applied to the transcription of long lines.
Motivation & Objective
- To develop a universal text line recognition system capable of handling arbitrary-length text lines from diverse sources, including scene text, handwriting, and printed documents.
- To evaluate and compare multiple encoder-decoder architectures—specifically, BiLSTM, Self-Attention, and GRCL encoders with CTC, CTC+LM, and Transformer decoders—on a broad distribution of text line lengths.
- To address the limitations of public datasets in evaluating long-line recognition performance and to identify model architectures that generalize well across variable input lengths.
- To investigate the impact of image resizing and chunking on model performance and efficiency, especially for long input images.
- To determine the optimal architecture for low-latency, high-accuracy, and scalable universal text line recognition in real-world deployment scenarios.
Proposed method
- The authors train and compare nine model configurations by pairing three encoders—Bidirectional LSTM, Self-Attention, and GRCL—with three decoders: CTC, CTC with external language model (LM), and Transformer.
- They use a large internal dataset with diverse text line lengths (up to 1000+ characters) and 675 symbol classes, covering Latin script and special characters, to train and evaluate models.
- For long input images, the method applies image chunking to maintain performance without shrinking or distorting the input, enabling efficient processing of arbitrarily long lines.
- The CTC decoder is used with a separate language model to improve sequence-level predictions, especially for long or ambiguous sequences.
- The models are evaluated on public datasets (ICDAR, RIMES, KIT-IT, SynthText) and internal benchmarks, with ablation studies on data composition and image preprocessing.
- Image resizing to a fixed maximum width M is used for TPU training with Transformer decoders, and the impact on performance is analyzed across different M values.
Experimental results
Research questions
- RQ1Which encoder-decoder combination achieves the highest accuracy and efficiency for universal text line recognition across diverse text types and lengths?
- RQ2How does the performance of CTC and Transformer decoders compare when processing long text lines, especially when input width exceeds model training limits?
- RQ3To what extent does using an external language model improve recognition accuracy, particularly when combined with Self-Attention and CTC architectures?
- RQ4How do image resizing and chunking strategies affect model performance and inference efficiency on long input images?
- RQ5Why do public datasets fail to expose performance degradation in Transformer-based models on long text lines, and how can this be mitigated?
Key findings
- The Self-Attention encoder with CTC decoding and an external language model achieves the highest recognition accuracy across all evaluated datasets and outperforms Transformer-based models in both accuracy and latency.
- The CTC-based model maintains consistent performance regardless of input image width, while Transformer-based models suffer from significant accuracy degradation when input lines exceed the maximum training width M.
- Image resizing to a fixed width M during training causes performance degradation for longer lines, especially with Transformer decoders, whereas CTC models are insensitive to input width due to their sequential nature.
- Image chunking enables CTC-based models to process arbitrarily long text lines efficiently without performance loss, making them ideal for universal recognition systems.
- Training on a combination of public and internal data significantly improves performance, especially for handwritten datasets like RIMES, where internal data alone yields better results than public data alone.
- The Self-Attention/CTC+LM model achieves competitive performance on public benchmarks even when trained on synthetic and public data only, demonstrating strong generalization and low computational complexity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.