Rotation-invariant scene text extraction using transformer networks
摘要
Scene text recognition (STR) in natural images remains challenging due to variations in orientation, curvature, illumination, and background complexity. Conventional Optical Character Recognition (OCR) systems, which assume clean, well-structured text, struggle to generalize to such real-world conditions. This work presents a transformer-based, two-phase framework for robust scene text extraction that addresses geometric distortions and arbitrary text orientations. The proposed method integrates a ResNet50-based detection module with a Vision Transformer (ViT) recognition model combined with a Connectionist Temporal Classification (CTC) decoder, enabling accurate word-level prediction without relying on character-level annotations. In the first phase, text regions are localized using an enhanced contour-based detection mechanism that incorporates boundary refinement and a Local Context Map (LCM) to improve discrimination between text and background clutter. In the second phase, detected regions are processed by a ViT encoder that models long-range dependencies, followed by CTC decoding to generate variable-length text sequences efficiently. The framework is evaluated on multiple public benchmarks, including ICDAR15 and SCUT-CTW1500, demonstrating strong robustness to rotation, curvature, and complex backgrounds. Comparative experiments show competitive recognition performance and notably high recall in detection, despite using only word-level supervision. The findings underscore the effectiveness of transformer architectures in unconstrained STR and highlight the potential of the proposed system for real-time applications such as signage interpretation, autonomous navigation, and assistive technologies.