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

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

Abstract

Scene Text Recognition (STR) remains a significant challenge due to the variability of fonts, complex backgrounds, and geometric distortions found in natural environments. This paper introduces Class-Aware Mask-guided feature refinement (CAM), a framework designed to enhance feature representation by aligning real-world text features with clean, class-specific canonical glyph prototypes. By utilizing a ConvNeXt V2 backbone and a novel mask-guided alignment module, CAM achieves state-of-the-art performance across multiple benchmarks, including a 4.1% average improvement on challenging datasets and significant gains in occluded and artistic text recognition.

Introduction

Reading text in the wild is a fundamental task in computer vision, yet it is plagued by environmental noise, artistic font styles, and perspective distortions. Traditional methods often struggle to distinguish between similar characters (e.g., '0' and 'O') when visual quality is poor. While previous research has explored class-agnostic masks to localize text, these approaches often fail to provide the fine-grained supervision necessary to decouple character content from stylistic noise.

The proposed Class-Aware Mask-guided feature refinement (CAM) addresses these issues by supervising the model to generate "canonical" masks—standardized, clean versions of characters. This approach forces the feature extractor to focus on the invariant structural properties of characters rather than the transient noise of their environment.

The CAM Framework

The CAM architecture consists of three primary innovations designed to improve the robustness and efficiency of STR.

1. ConvNeXt V2 Backbone

While many modern SOTA models rely on Vision Transformers (ViT), CAM utilizes ConvNeXt V2. This choice provides a modern, purely convolutional backbone that matches the performance of ViT-based architectures while maintaining a lower computational footprint and higher efficiency for real-time applications.

2. Discriminative Canonical Glyph Segmentation

The core of the CAM method is the prediction of class-aware masks. Unlike binary masks that merely identify text regions, this module predicts "clean" glyphs in a standard font for each character. By training the model to reconstruct these canonical forms from messy inputs, the encoder learns features that are inherently resistant to font variations and background clutter.

3. Mask-guided Feature Alignment and Fusion

A significant challenge in using canonical masks is the spatial mismatch between the distorted input image (e.g., curved or tilted text) and the rigid, upright canonical prototypes. To bridge this gap, CAM employs a feature alignment module using deformable sampling points. This module learns spatial offsets to "warp" the features, ensuring that the messy input and the clean prototypes are perfectly aligned before being fused through multi-head attention. This alignment is critical for effective feature refinement.

Experimental Evaluation

The model was rigorously tested across several benchmarks, including standard datasets (IIIT, SVT, IC13, IC15, COCO, and SVTP) and specialized datasets for curved (CUTE, CTW, TT), occluded (WOST, HOST), and artistic (WordArt) text.

Performance Highlights

  • Challenging Datasets: CAM-Tiny demonstrated a 4.1% average performance gain over previous state-of-the-art methods on difficult benchmarks.
  • Robustness to Occlusion: On the COCO dataset, which features significant occlusion and low-quality imagery, the model achieved a 7.5% improvement. This suggests that the canonical mask supervision effectively helps the model "fill in the blanks" for missing character parts.
  • Efficiency: The "CAM-Nano" variant, with only 23 million parameters, achieved better average performance on standard benchmarks than many models twice its size.
  • Cross-Language Generalization: The method was successfully applied to Chinese text recognition, surpassing previous SOTA models like TransOCR by up to 6.56% on specific subsets.

Key Insights

The success of CAM highlights two major insights in STR research. First, class-awareness provides a much stronger supervisory signal than simple text localization. By focusing on the underlying character rather than the artistic flair of a font, the model becomes more robust to style noise. Second, visual representation still has significant room for improvement. Despite being a language-free model, CAM outperforms many language-aware models, suggesting that high-quality visual features can often compensate for a lack of linguistic context.

Conclusion and Future Work

CAM represents a significant step forward in robust scene text recognition. By leveraging canonical glyphs and deformable alignment, it effectively handles distortions and occlusions that baffle traditional models. However, limitations remain in cases of extreme blur or total occlusion where visual information is entirely absent. Future work may involve integrating language priors to resolve remaining ambiguities and further improving the initial rectification stages to handle extreme geometric distortions.

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