SRFormer: Text Detection Transformer with Incorporated Segmentation and Regression

Qingwen Bu, Sungrae Park, Minsoo Khang, Yichuan Cheng

Abstract

SRFormer is a novel text detection model that bridges the gap between segmentation and regression-based methods within a unified DEtection TRansformer (DETR) framework. By incorporating segmentation branches into the early stages of the transformer decoder, SRFormer achieves state-of-the-art accuracy on curved and irregular text benchmarks. Crucially, it maintains high training efficiency and data economy, addressing the slow convergence typically associated with DETR-based detectors.

Introduction

Scene text detection has traditionally followed two distinct paradigms: segmentation-based and regression-based methods. Segmentation-based approaches excel at handling irregular shapes and low-contrast backgrounds by working at the pixel level, but they often require computationally expensive post-processing on the CPU to group pixels into instances. Conversely, regression-based methods offer a streamlined, end-to-end pipeline by predicting coordinates directly. However, these models typically demand massive datasets and prolonged training times to learn spatial representations, often struggling with highly curved text.

SRFormer addresses this dichotomy by asking: Why not both? It aims to combine the robustness of segmentation with the simplicity of regression, eliminating the typical computational overhead of hybrid systems.

Methodology

SRFormer is built upon the DEtection TRansformer (DETR) architecture, utilizing a deformable transformer encoder to extract multi-scale features. The core innovation lies in the structured design of its decoder.

The overall architecture of SRFormer, highlighting the split between the Segmentation & Regression Chunk and the Regression-only Chunk.

Hybrid Decoder Chunks

Instead of a uniform stack of decoder layers, SRFormer employs a split architecture:

  1. Segmentation & Regression Chunk: The initial layers perform both segmentation and regression. The segmentation masks generated here provide a "rough draft" or spatial prior for the text instances.
  2. Regression-only Chunk: The subsequent layers focus solely on refining the predicted coordinates into precise polygons, leveraging the priors established in the first chunk.

Mask-informed Query Enhancement (MQE)

The MQE module utilizes the predicted segmentation masks as "soft" Regions of Interest (ROIs). By pooling features from the encoder specifically from areas identified as text, the module enriches instance queries with superior semantic information. Furthermore, the "center of gravity" calculated from these early masks serves as an anchor for the regression head, providing a significant positional head start compared to random initialization.

Experiments and Results

The authors evaluated SRFormer on several challenging benchmarks for arbitrary-shaped text, including TotalText, CTW1500, and ICDAR19-ArT. Pre-training was conducted on broad datasets such as SynthText150k, MLT17, and LSVT.

Performance and Efficiency

SRFormer set new state-of-the-art (SOTA) records across all major benchmarks. On TotalText, it achieved a 90.0% F1-score, outperforming the previous leader, DPText, by 1.3%.

F-score vs. Training Iterations on the TotalText dataset, demonstrating SRFormer's superior convergence speed compared to DPText.

A key finding is the model's exceptional training efficiency. As shown in the convergence plots, SRFormer reaches high performance levels in just 5,000 iterations—a fraction of the time required by its predecessors. This is attributed to the "bootstrap" effect of segmentation; pixel-level supervision provides a denser signal that stabilizes the regression process early on.

Data Economy and Robustness

The model demonstrates superior data efficiency, outperforming DPText by a significant margin (76.9% vs 75.6% F1-score) when trained on only 10% of the TotalText dataset. Additionally, SRFormer showed a +13.18% performance jump in cross-domain scenarios, indicating that the incorporated segmentation helps the model generalize better to novel fonts and environments.

Conclusion

SRFormer successfully unifies segmentation and regression within a transformer framework, proving that segmentation can serve as an effective early-stage guide for coordinate regression. While the MQE module adds a small number of parameters (less than 1M per layer), the gains in convergence speed and accuracy are substantial. Future work may extend this hybrid approach to end-to-end text spotting, where the robust features from the MQE module could significantly enhance recognition performance.

Summary updated

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