TL;DR
TextFormer is a query-based Transformer architecture that treats scene text spotting as a unified multi-task problem, eliminating the need for traditional Region-of-Interest (RoI) operations and complex post-processing. By combining a novel global feature aggregation module with a "mixed supervision" training strategy that leverages weakly labeled data, it sets new performance benchmarks, particularly on challenging bilingual and arbitrarily shaped text datasets.
What Problem Does This Paper Address?
Scene text spotting—the combined task of detecting and recognizing text in natural images—has traditionally been approached in two ways, both with significant drawbacks:
- Top-down methods: These use a two-stage pipeline where a detector finds text regions, and a recognizer transcribes them. They rely on Region-of-Interest (RoI) operations (like RoI Pooling or Align) to crop features. This creates a bottleneck: if the detection is slightly off, the recognition fails. Furthermore, RoI operations struggle with highly curved or irregularly shaped text.
- Bottom-up methods: These detect individual characters and group them. While they avoid RoI issues, they require expensive character-level annotations and involve complex, error-prone post-processing to assemble words.
The authors of TextFormer aim to break these dependencies by creating a truly end-to-end system that shares deep semantic features across detection and recognition without the limitations of local cropping.
Methods
TextFormer adopts a Transformer encoder-decoder architecture, similar to DETR, but tailored for text.
- Query-based Decoding: The model uses a set of learnable "text queries." Each query is responsible for probing the image features to find a potential text instance. The decoder outputs $N$ text embeddings that represent these instances.
- Multi-task Heads: These embeddings are fed into three parallel branches: Classification (is this text?), Segmentation (where exactly is the text mask?), and Recognition (what does it say?).
- Adaptive Global aGgregation (AGG) Module: This is the core innovation for recognition. Instead of cropping a local patch, the AGG module uses an attention mask to aggregate global semantic features along horizontal and vertical orientations. This transforms 2D spatial features into 1D sequential features suitable for a Transformer-based recognition head, effectively handling arbitrarily shaped text without needing spatial rectification.
- Mixed Supervision: Recognizing that recognition requires far more data than detection, the authors propose a training scheme that mixes full annotations (masks + transcriptions), text annotations (transcriptions only), and weak annotations (single transcriptions of "text-of-interest" per image). This allows the model to learn from massive, partially labeled datasets like LSVT.
Datasets
The model was pre-trained on large synthetic datasets (SynthText 150k, SynChinese 130k) and public real-world datasets. Evaluation was conducted on:
- ICDAR 2015: A standard benchmark for multi-oriented English text.
- Total-Text: A dataset focused on arbitrarily shaped (curved) text.
- ReCTS & TDA-ReCTS: Bilingual (Chinese/English) benchmarks. TDA-ReCTS is specifically designed to test "ambiguous" text spotting, such as vertical lines or large character spacing.
- LSVT: Used primarily for its large volume of weakly annotated data to boost recognition performance.
Key Insights and Ideas
- Deep Feature Sharing: Unlike two-stage models that only share shallow backbone features, TextFormer shares high-level semantic features. This allows the recognition loss to act as a strong signal that helps the segmentation branch refine its masks.
- Global vs. Local: By using the AGG module to look at global features rather than local RoI crops, the model is more robust to occlusions. If a character is partially blocked, the model can often infer it from the surrounding global context.
- Efficiency of Weak Labels: The paper demonstrates that you don't need perfect masks for every training image. Training on images where you only know what the text says (but not exactly where it is) significantly improves the final end-to-end performance.
Key Results
TextFormer achieves state-of-the-art (SOTA) results across multiple benchmarks:
- TDA-ReCTS: It outperformed the previous SOTA by a massive 13.2% in terms of 1-NED (Normalized Edit Distance), proving its strength in handling ambiguous layouts.
- ICDAR 2015: Achieved an E2E "Strong" lexicon score of 84.5%, surpassing competitive models like ABINet++.
- Total-Text: Reached 77.9% E2E accuracy without a lexicon, demonstrating excellent handling of curved text.
- Ablation Study: The authors found that multi-task modeling improved detection F-measure by 2.6% compared to a standalone detector, confirming that learning to read actually helps the model learn to see text boundaries better.
Limitations and Future Work
- Data Dependency: Like most Transformer-based models, TextFormer's performance is heavily dependent on the scale and quality of the training data.
- Future Directions: The authors suggest exploring self-supervised learning to further reduce the reliance on expensive human-labeled data, potentially allowing the model to learn from the vast amount of unlabeled imagery available on the web.
Summary updated