Class-Aware Mask-guided feature refinement for scene text recognition

Mingkun Yang, Biao Yang, Minghui Liao, Yingying Zhu, Xiang Bai

TL;DR

The researchers propose CAM (Class-Aware Mask-guided feature refinement), a novel scene text recognition framework that uses "canonical" (standard font) character masks to guide feature learning. By aligning messy, real-world text features with clean, class-specific glyph prototypes, the model achieves state-of-the-art results—including a 4.1% average performance gain on challenging datasets—while maintaining a smaller model footprint.

What Problem Does This Paper Address?

Scene Text Recognition (STR) is the task of reading text in natural images (like street signs or product labels). While deep learning has made huge strides, "in-the-wild" text remains a nightmare for algorithms due to:

  • Complex backgrounds: Text blended into textures.
  • Diverse fonts: Artistic or rare styles that don't look like training data.
  • Distortions: Perspective shifts and curved layouts.
  • Occlusions: Letters partially blocked by other objects.

Previous attempts to solve this often used "class-agnostic" masks (simply identifying where any text is). The authors argue this is insufficient because it doesn't help the model distinguish between similar-looking characters (like 'o' and '0') in noisy environments.

Methods

The CAM framework introduces three major components to the standard recognition pipeline:

  1. ConvNeXt V2 Backbone: Instead of the computationally heavy Vision Transformers (ViT) popular in recent SOTA models, the authors use ConvNeXt V2. This provides a modern, efficient CNN-based feature extractor that competes with ViT performance at a lower cost.
  2. Discriminative Canonical Glyph Segmentation: This module predicts a "clean" version of the text. Using the messy input, it generates a class-aware mask (e.g., a mask specifically for the letter 'A' in a standard font). This forces the encoder to learn features that are invariant to font style and background noise.
  3. Mask-guided Feature Alignment and Fusion: This is the "bridge." Because the input image is often distorted (curved or tilted) while the canonical mask is straight, they cannot be fused directly. The authors use deformable sampling points to learn offsets, effectively "warping" the features so the messy input and the clean prototype align perfectly before being fused via multi-head attention.

Datasets

The model was rigorously tested across several benchmarks:

  • Training: SynthText (~8M images) and Synth90k (~9M images) for English; a comprehensive Chinese dataset [44] for cross-language validation.
  • Standard Benchmarks: IIIT, SVT, IC13, IC15, COCO, and SVTP.
  • Challenging Benchmarks: CUTE, CTW, and TT (curved text); WOST and HOST (occluded text); and WordArt (artistic styles).

Key Insights and Ideas

  • Class-Awareness Matters: Moving from "is this text?" to "is this a standard-font 'B'?" provides much stronger supervision. It helps the model ignore "style noise" (the artistic flair of a font) and focus on the "content" (the underlying character).
  • The Alignment Necessity: You can't just "add" clean features to messy ones. If a word is curved in the image but straight in the mask, pixel-level fusion fails. The use of deformable offsets to align these features is the "aha moment" that makes the fusion effective.
  • Visuals over Language: Interestingly, CAM (a language-free model) outperforms several "language-aware" models. This suggests that there is still significant room to improve the visual representation of text before needing to rely on linguistic context or "spell-check" style decoders.

Key Results

  • Superiority on Tough Data: On six challenging datasets (including occluded and artistic text), CAM-Tiny outperformed the previous best method by an average of 4.1%.
  • Efficiency: The "CAM-Nano" variant (23M parameters) achieved better average performance on standard benchmarks than many models twice its size.
  • Robustness to Occlusion: The model showed a massive 7.5% gain on the COCO dataset, which is notorious for low-quality and occluded text, proving that the canonical mask helps the model "fill in the blanks."
  • Cross-Language Success: The method translated well to Chinese text, surpassing previous SOTA models (like TransOCR) by up to 6.56% on certain subsets.

Limitations and Future Work

Despite its strengths, the authors identify a few "failure modes":

  • Extreme Distortion: If the initial rectification (straightening) fails completely, the alignment module can't recover.
  • Severe Blur and Occlusion: If the visual information is almost entirely gone, the model still struggles (see Figure 8 in the paper).
  • Lack of Language Priors: While CAM is visually powerful, it doesn't use a language model. The authors suggest that incorporating language priors (knowing that "q" is usually followed by "u") would be a logical next step to handle the most ambiguous cases.

Summary updated

BibTeX
@article{yang2024class,
  author = {Mingkun Yang and Biao Yang and Minghui Liao and Yingying Zhu and Xiang Bai},
  title = {{Class-Aware Mask-guided feature refinement for scene text recognition}},
  journal = {Pattern Recognition},
  year = {2024},
  url = {https://openreview.net/forum?id=0zekRbXrnB},
}
Figure