TL;DR
The authors introduce oCLIP, a weakly supervised vision-language pre-training method tailored specifically for scene text detection and spotting. By utilizing a character-aware text encoder and a specialized visual-textual decoder, oCLIP learns robust visual text representations from partial text transcriptions without needing expensive bounding box annotations.
What Problem Does This Paper Address?
Standard Vision-Language Pre-training (VLP) models like CLIP excel at learning joint representations from image-caption pairs. However, adapting them to Optical Character Recognition (OCR) tasks usually fails due to two major constraints:
- Instance-level vs. Sentence-level text: Standard VLP assumes sequential, sentence-level text. OCR images contain multiple independent text instances (e.g., street signs, product labels) that are completely unrelated to each other.
- Data Annotation Bottleneck: Acquiring fully annotated scene text data (bounding boxes paired with exact transcriptions) is incredibly expensive and time-consuming.
The authors address this by designing a pre-training framework that can leverage weakly supervised data—images containing partial text transcriptions but absolutely no bounding boxes.
Methods
The oCLIP framework consists of three main components:
- Image Encoder: A ResNet-50 backbone followed by a multi-head attention layer to extract visual feature embeddings from the input image.
- Character-Aware Text Encoder (CAE): Instead of processing the entire image's text as a single sequence, the CAE embeds text at the character sequence level per instance. It applies positional encodings only within each text instance, intentionally ignoring cross-instance relationships.
- Visual-Textual Decoder (VTD): A stack of 6 decoder layers where text instance embeddings serve as queries ($Q$) and image embeddings serve as keys ($K$) and values ($V$). Crucially, it omits self-attention among text instances, allowing the model to train effectively on partial annotations without being confused by unlabelled text.
Training Objectives
The network is optimized using a dual loss function: a masked character prediction loss (predicting randomly masked characters within an instance using visual and textual context) and a batch-level contrastive loss to align the visual and textual feature spaces.
Datasets
The model was validated using several prominent scene text benchmarks:
- SynthText: Used to evaluate pre-training performance under varying proportions of text annotations (25%, 50%, 75%, 100%).
- ICDAR2019-LSVT: Contains 400,000 weakly annotated images (transcriptions only, no bounding boxes) used for pre-training, and 30,000 fully annotated images for fine-tuning.
- Total-Text & CTW1500: Used for evaluating scene text detection and spotting performance on curved/arbitrary-shaped text.
- ICDAR2015: Used for standard evaluation of incidental scene text.
- Web Images: The authors scraped 40 million web images, using off-the-shelf OCR models to automatically generate weak annotations for large-scale pre-training.
Key Insights and Ideas
- Character-Awareness Beats Tokenization for OCR: Standard language models group characters into subword tokens, which causes the vision model to focus only on dominant parts of a word. Character-level encoding forces the image encoder to attend uniformly to all character regions within a text instance.
- Dropping Self-Attention Enables Weak Supervision: By removing self-attention from the visual-textual decoder, text instances are processed independently. This means the presence of unannotated text in an image doesn't degrade the learning process for the annotated text instances, unlocking the use of massive, cheaply acquired datasets.
Key Results
- Downstream Boosts: Transferring oCLIP pre-trained weights to standard architectures yielded significant performance jumps. Fine-tuning on ICDAR2019-LSVT showed an F-score improvement of +2.5% for text detection (PSENet) and +4.8% for text spotting (Mask TextSpotter-v3).
- Robustness to Partial Data: Pre-training with only 25% of the text instances annotated in SynthText achieved an F-score of 84.8% on Total-Text, nearly matching the 85.5% F-score achieved using 100% of the annotations.
- Outperforming Prior Pre-training: On Total-Text and CTW1500, oCLIP outperformed existing pre-training methods like STKM by +3.3% and +1.3% in F-score, respectively.
Limitations and Future Work
While the paper does not explicitly detail limitations, a few inherent challenges are apparent:
- The automatic web data acquisition pipeline relies heavily on the quality of the initial off-the-shelf detector and recognizer models to filter out low-confidence text.
- The evaluation focuses primarily on English and Chinese scripts; scaling to highly multilingual or complex script environments remains an open area for exploration.
Summary updated