NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Mask TextSpotter: An End-to-End Trainable Neural Network for Spotting Text with Arbitrary Shapes

Minghui Liao, Pengyuan Lyu, Minghang He, Cong Yao, Wenhao Wu, Xiang Bai · DOI

TL;DR

This paper introduces Mask TextSpotter, a novel end-to-end trainable neural network for simultaneously detecting and recognizing text in natural images, even when the text is arbitrarily shaped (e.g., curved). By leveraging semantic segmentation for both tasks and incorporating a spatial attention module, Mask TextSpotter achieves state-of-the-art performance across various challenging datasets.

What Problem Does This Paper Address?

Reading text in natural images, known as scene text spotting, is crucial for many applications like image retrieval and accessibility. This task is typically broken down into two sub-problems: text detection (finding where the text is) and text recognition (identifying the characters). While previous methods have made progress, they often treat these as separate steps or use pipelines that aren't fully end-to-end trainable, leading to suboptimal performance. A significant challenge is handling text with arbitrary shapes, such as curved text, which many existing methods struggle with. This paper aims to unify text detection and recognition into a single, smooth, end-to-end trainable system that can robustly handle text of any shape.

Methods

The core of Mask TextSpotter is inspired by Mask R-CNN, a popular object detection and segmentation framework. However, it's adapted for text spotting.

  • Instance Segmentation for Detection: Instead of just drawing bounding boxes, Mask TextSpotter uses instance segmentation to generate precise masks for each text instance. This allows it to accurately detect text with arbitrary shapes, including curved text.
  • 2D Semantic Segmentation for Recognition: Unlike traditional sequence-to-sequence models that process text linearly, Mask TextSpotter's recognition module operates in a 2D space. It uses character segmentation and a novel Spatial Attention Module (SAM).
  • Spatial Attention Module (SAM): This module is key to handling arbitrary shapes. It allows the model to globally process the 2D feature map of a text region, effectively capturing the spatial relationships between characters without needing explicit character-level annotations for training. This makes the recognition more robust to irregular text layouts.
  • End-to-End Trainability: The entire network, from text proposal generation to final recognition, is trained jointly. This allows the detection and recognition components to learn from each other, improving overall performance.

Datasets

The authors trained and evaluated Mask TextSpotter on a variety of datasets:

  • Training: SynthText (large-scale synthetic dataset), Synth90k (synthetic dataset for recognition).
  • Evaluation:
    • English Datasets: ICDAR2013 (horizontal text), ICDAR2015 (oriented text), COCO-Text (general scene text), Total-Text (curved text).
  • Multi-language Dataset: MLT (multi-lingual scene text).
  • Standalone Recognition Evaluation: IIIT5k-Words, SVT, ICDAR2003, ICDAR2013, ICDAR2015, SVT-Perspective, CUTE80.

Key Insights and Ideas

  • 2D Representation is Key for Arbitrary Shapes: Treating text recognition as a 2D spatial problem, rather than a 1D sequence, is crucial for effectively handling curved and irregularly shaped text.
  • Semantic Segmentation for Both Tasks: Unifying text detection and recognition through semantic segmentation provides a powerful and flexible framework.
  • SAM Reduces Annotation Burden: The Spatial Attention Module (SAM) significantly reduces the need for expensive character-level annotations, relying instead on word-level information, making training more practical.
  • Complementarity of Modules: The character segmentation module (local prediction) and the SAM (global view) are complementary, and their integration leads to improved performance.
  • End-to-End Training Benefits Both Tasks: Jointly training the detection and recognition components allows them to mutually benefit, leading to better results than separate training.

Key Results

  • State-of-the-Art Performance: Mask TextSpotter achieved state-of-the-art results on multiple benchmarks for text detection, word spotting, and end-to-end text recognition, including datasets with horizontal, oriented, and curved text.
  • Arbitrary Shape Handling: The method demonstrated superior performance on curved text datasets like Total-Text, outperforming previous methods like TextBoxes.
  • Improved Recognition: The standalone recognition module also showed significant improvements over existing methods, particularly on irregular text. For example, on CUTE80, it outperformed ASTER by 8.3%.
  • Efficiency: While not the fastest, the method's speed was comparable to other advanced approaches, with a detection speed of around 3.8 FPS at a resolution of 720x1280.

Limitations and Future Work

  • Speed: The authors acknowledge that their method is not the fastest and suggest exploring ways to improve efficiency, such as replacing the detection stage with a more elegant method.
  • Failure Cases: Some failure cases were observed due to extreme illumination conditions and false positive detections that were also wrongly recognized.
  • Future Work: The primary future direction mentioned is to improve the efficiency of Mask TextSpotter, particularly by optimizing the detection component.

Summary updated

BibTeX
@inproceedings{liao2018mask,
  author = {Minghui Liao and Pengyuan Lyu and Minghang He and Cong Yao and Wenhao Wu and Xiang Bai},
  title = {{Mask TextSpotter: An End-to-End Trainable Neural Network for Spotting Text with Arbitrary Shapes}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01264-9\_5},
}
Figure