SRFormer: Empowering Regression-Based Text Detection Transformer with Segmentation

Qingwen Bu, Sungrae Park, Minsoo Khang, Yichuan Cheng · DOI

Abstract

SRFormer is a novel text detection framework that integrates the robustness of segmentation with the efficiency of regression within a unified DEtection TRansformer (DETR) architecture. By employing early-stage segmentation to provide positional priors and enhance queries, SRFormer achieves state-of-the-art performance on curved and irregular text benchmarks while maintaining high data efficiency and streamlined inference.

Introduction

Scene text detection is a critical task in computer vision, traditionally split into segmentation-based and regression-based approaches. Segmentation-based methods excel at handling diverse fonts and irregular shapes but suffer from computationally expensive post-processing. Conversely, regression-based methods offer end-to-end efficiency but often lack the pixel-level sensitivity required for low-contrast or highly curved text. SRFormer addresses this dichotomy by leveraging segmentation as an internal guide to bootstrap a high-precision regression model, effectively capturing the "best of both worlds."

Methodology

SRFormer is built upon the DETR architecture, introducing a unique "separated decoder chunk" strategy to balance segmentation's guidance with regression's speed.

The SRFormer architecture featuring the separated decoder chunks and Mask-informed Query Enhancement (MQE).

Separated Decoder Chunks

The transformer decoder is divided into two distinct stages:

  1. Segmentation & Regression Chunk: In the initial layers, the model simultaneously predicts binary masks and polygon coordinates. This dual supervision provides the network with strong spatial grounding early in the inference process.
  2. Regression-only Chunk: In later layers, the segmentation branch is discarded to minimize computational overhead. The model focuses exclusively on refining the polygon coordinates based on the features established in the first stage.

Mask-informed Query Enhancement (MQE)

A core innovation of SRFormer is the MQE module. It utilizes predicted segmentation masks as soft Regions of Interest (ROIs) to pool specific features from the encoder. These features are used to enhance and diversify the transformer queries, allowing the model to focus more accurately on text-rich areas. Additionally, the "center of gravity" of the predicted mask serves as a regression prior, providing a more accurate anchor point for coordinate refinement than standard learned queries.

Experimental Results

The model was rigorously evaluated on major arbitrary-shaped text benchmarks, including TotalText, CTW1500, and ICDAR19-ArT.

Performance and Efficiency

SRFormer achieved state-of-the-art (SoTA) F1-scores across all benchmarks: 90.0% on TotalText, 89.8% on CTW1500, and 79.3% on ICDAR19-ArT. Notably, the inclusion of segmentation supervision significantly improved data efficiency. When trained on only 10% of the TotalText dataset, SRFormer's initial layer F1-score surpassed the leading regression-only competitor, DPText-DETR, by 26.96%. Despite the added segmentation head, the model remains efficient, maintaining speeds between 7.9 and 9.7 FPS by dropping the segmentation branch in later layers.

Qualitative Analysis

Qualitative comparisons demonstrate SRFormer's superior ability to handle complex text geometries and low-contrast environments. Unlike pure regression models that may fail to capture the full extent of a curved word, SRFormer's segmentation-guided approach ensures precise boundary detection.

Qualitative comparison of SRFormer against DPText and DBNet, highlighting its precision in detecting curved and multi-oriented text.

Conclusion

SRFormer demonstrates that segmentation and regression are not mutually exclusive but rather complementary. By utilizing segmentation as an early-stage prior, the model achieves superior accuracy and data efficiency without sacrificing the inference speed of regression-based detectors. Future work may explore the application of this hybrid architecture to broader instance detection tasks beyond scene text.

Summary updated

BibTeX
@inproceedings{bu2024srformer,
  author = {Qingwen Bu and Sungrae Park and Minsoo Khang and Yichuan Cheng},
  title = {{SRFormer: Empowering Regression-Based Text Detection Transformer with Segmentation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i2.27844},
}
Figure