WeCromCL: Weakly Supervised Cross-Modality Contrastive Learning for Transcription-Only Supervised Text Spotting

Jingjing Wu, Zhengyao Fang, Pengyuan Lyu, Chengquan Zhang, Fanglin Chen, Guangming Lu, Wenjie Pei

Abstract

WeCromCL is a novel framework designed for "transcription-only" text spotting, enabling the detection and recognition of text in images using only text labels for training. By bypassing the need for expensive bounding box or polygon annotations, WeCromCL addresses the high cost of data labeling in scene text spotting. The method utilizes "atomistic" contrastive learning to align character-level features with specific image regions, automatically generating pseudo-labels (anchor points) to train high-performance text spotters.

Introduction: The Localization Gap in Scene Text Spotting

Scene text spotting—the task of simultaneously detecting and recognizing text in natural images—typically relies on large-scale datasets with precise geometric annotations like polygons. Creating these labels is labor-intensive and costly. The research community has sought "transcription-only supervision," where models learn from images paired only with the text they contain.

The primary challenge is the "localization gap": without spatial labels, how does a model learn to associate a text string like "COFFEE" with its corresponding pixels? Previous weakly supervised methods often struggled with slow convergence and high computational overhead because they lacked an explicit mechanism to bridge the gap between abstract text sequences and spatial image features.

Comparison of supervision paradigms: (a) TCM uses polygons, (b) oCLIP/VLPT uses holistic text matching, and (c) WeCromCL uses atomistic contrastive learning.

Methodology

The WeCromCL framework decomposes the problem into a two-stage pipeline: Weakly Supervised Anchor Detection and Anchor-Guided Text Spotting.

Stage 1: Weakly Supervised Anchor Detection (WeCromCL)

The core of the approach is learning to identify a single "anchor point" for every transcription in the training set.

  • Atomistic Contrastive Learning: Unlike holistic models (e.g., CLIP) that match entire images to captions, WeCromCL performs "atomistic" matching. It enforces appearance consistency between specific words and local image regions.
  • Character-Wise Text Encoder: Standard sub-word tokenization is replaced with a character-level encoder with positional embeddings. This allows the model to capture the visual "shape" of words, which is critical for spatial alignment.
  • Cross-Modality Cross-Attention: Text features serve as queries to probe image features, producing an activation map (heatmap). The peak of this map identifies the anchor point for a given word.
  • Negative-Sample Mining: A robust mining scheme forces the model to distinguish correct transcriptions from distractors, improving localization accuracy.
The two-stage WeCromCL pipeline, illustrating anchor detection via activation maps and subsequent text spotting.

Stage 2: Anchor-Guided Text Spotting

The anchor points generated in Stage 1 serve as pseudo-labels. These points are used to train a standard text spotter (such as SPTS or an adapted SRSTS) that requires only single-point supervision per word.

Key Insights

  • Transcription as a Visual Anchor: Consistent visual patterns for specific words across diverse images allow transcriptions to act as cluster centers. Optimization naturally drives activation maps toward these consistent pixel clusters.
  • Character-level Granularity: For OCR-related tasks, character-by-character encoding is superior to token-level encoding for learning the fine-grained visual-semantic correlations necessary for pinpointing text.
  • Soft Modeling: Using "soft" activation maps rather than binary masks ensures smoother gradient flow during backpropagation, facilitating the optimization of the weakly supervised task.

Experimental Results

WeCromCL establishes a new state-of-the-art for transcription-only supervised text spotting across several benchmarks:

  • Accuracy: On ICDAR 2015, it outperformed the previous best method (TOSS) by 9.2% and NPTS by 16.4% using a generic lexicon.
  • Geometry Robustness: On the Total-Text dataset, which features curved text, it surpassed NPTS by 6.5% in the "None" lexicon category.
  • Pseudo-label Quality: Ablation studies confirmed that the character-wise encoder is significantly more effective at finding accurate anchor points than token-wise encoders (e.g., 90.5% vs 78.6% F-measure on ICDAR 2013).

Conclusion and Future Work

WeCromCL effectively bridges the localization gap in weakly supervised text spotting through atomistic contrastive learning. While it achieves impressive results, the method currently depends on high-resolution inputs to resolve small text instances and involves a two-stage training process. Future research may focus on end-to-end integration to streamline the pipeline and improve efficiency.

Summary updated

BibTeX
@inproceedings{wu2024wecromcl,
  author = {Jingjing Wu and Zhengyao Fang and Pengyuan Lyu and Chengquan Zhang and Fanglin Chen and Guangming Lu and Wenjie Pei},
  title = {{WeCromCL: Weakly Supervised Cross-Modality Contrastive Learning for Transcription-Only Supervised Text Spotting}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72751-1\_17},
}
Figure