Abstract
Scene text recognition traditionally relies on collapsing 2D image features into 1D sequences, which often fails for curved or irregularly shaped text. This paper introduces 2D-CTC, an extension of the Connectionist Temporal Classification (CTC) loss that preserves the height dimension to handle 2D text distributions naturally. The resulting fully-convolutional model achieves state-of-the-art accuracy on irregular text benchmarks while operating 3-4 times faster than standard attention-based decoders.
Introduction
In real-world scenarios, text frequently appears in non-linear formats—curving around logos, slanting on storefronts, or distorting due to perspective. Traditional scene text recognition (STR) methods typically treat text as a 1D sequence, similar to speech recognition.
The two dominant paradigms are vanilla CTC and attention-based decoders. Vanilla CTC requires collapsing 2D feature maps into 1D probability distributions, often via height-wise pooling. This process destroys spatial information and leads to confusion when characters are stacked or curved. Attention-based decoders address spatial issues by learning to focus on specific image regions per character. However, their recursive nature makes them slow and difficult to parallelize. 2D-CTC aims to combine the spatial awareness of attention with the efficiency of CTC.
Methodology
The proposed 2D-CTC extends the vanilla CTC formulation by incorporating a second dimension (height) into the path search space. The model utilizes a fully convolutional base (PSPNet) to extract 2D features and outputs two 2D maps: a probability distribution map and a path transition map (predicting movement up, down, or straight).
Unlike 1D CTC, which finds an optimal path through time (left-to-right), 2D-CTC identifies the optimal path through both time and height. This is achieved via a 2D dynamic programming algorithm that remains computationally efficient. Notably, 2D-CTC is trained end-to-end using only word-level labels, avoiding the need for expensive character-level annotations.
Key Insights and Results
A key advantage of 2D-CTC is its ability to implicitly localize characters. The path transition maps naturally trace the curves of irregular text, acting as weakly supervised character detectors. Furthermore, the model can "step around" background noise or clutter by routing its path through the height dimension.
The model was evaluated on several benchmarks, including IIIT5k, SVT, and irregular text datasets like CUTE80 and Total-Text. 2D-CTC consistently outperformed vanilla CTC by 2.7% to 5.4%. On the CUTE80 dataset, it achieved 81.3% accuracy. In terms of efficiency, 2D-CTC reaches 36.22 FPS on a GPU, significantly faster than attention-based models like ASTER (11.35 FPS).
Conclusion
2D-CTC effectively bridges the gap between high-speed CTC models and spatially-aware attention models. While it lacks the explicit language modeling of recursive decoders, its efficiency and accuracy on irregular text make it a powerful tool for real-time STR. Future work may explore hybrid models that combine 2D spatial alignment with attention-based sequence context.
Summary updated