Enhanced sequence-to-sequence contrastive learning for text recognition using hybrid instance mapping and transformer-based encoding
摘要
Text recognition plays a vital role in computer vision, enabling applications such as document digitization, identity verification, and assistive technologies. While deep learning models have significantly advanced this field, they often rely on large-scale annotated datasets, which are costly and labor-intensive to acquire. To address this limitation, self-supervised contrastive learning frameworks like Sequence-to-Sequence Contrastive Learning (SeqCLR) framework have emerged, enabling feature learning from unlabeled data. However, SeqCLR faces key challenges, including rigid instance mapping strategies, limited sequence modeling capabilities due to Bidirectional Long Short-Term Memory (BiLSTM) dependence, and uniform contrastive loss constraints that fail to capture hierarchical textual structures. This study introduces an Enhanced Hybrid Contrastive Learning Model (EHCLM) that overcomes these shortcomings through three primary innovations: (1) a dynamic hybrid instance mapping strategy tailored to input text structures, (2) the integration of a Transformer-based encoder to capture long-range dependencies more effectively, and (3) an adaptive contrastive loss with hierarchical supervision and temperature scaling. Experimental evaluations on standard datasets such as IAM, RIMES, IIT5K, and IC13 demonstrate that EHCLM achieves superior performance in word accuracy and error rates compared to existing state-of-the-art methods. These results affirm EHCLM as a robust, self-supervised framework for both handwritten and scene text recognition.