Towards Unified Multi-granularity Text Detection with Interactive Attention
Xingyu Wan, Chengquan Zhang, Pengyuan Lyu, Sen Fan, Zihan Ni, Kun Yao, Errui Ding, Jingdong Wang
TL;DR
This work presents Detect Any Text (DAT), a unifiedTransformer-based framework that jointly handles word, line, paragraph, and page text detection, overcoming the need for separate models. It introduces an interactive across-granularity attention mechanism that propagates information across granularities and uses mixed-granularity training to leverage datasets with incomplete annotations. A prompt-based segmentation module further refines localization of arbitrarily-shaped text and document pages. Empirically, DAT achieves state-of-the-art results across scene text detection, document layout analysis, and page segmentation benchmarks while maintaining competitive efficiency, highlighting its practical value for end-to-end text understanding in diverse real-world scenarios.
Abstract
Existing OCR engines or document image analysis systems typically rely on training separate models for text detection in varying scenarios and granularities, leading to significant computational complexity and resource demands. In this paper, we introduce "Detect Any Text" (DAT), an advanced paradigm that seamlessly unifies scene text detection, layout analysis, and document page detection into a cohesive, end-to-end model. This design enables DAT to efficiently manage text instances at different granularities, including *word*, *line*, *paragraph* and *page*. A pivotal innovation in DAT is the across-granularity interactive attention module, which significantly enhances the representation learning of text instances at varying granularities by correlating structural information across different text queries. As a result, it enables the model to achieve mutually beneficial detection performances across multiple text granularities. Additionally, a prompt-based segmentation module refines detection outcomes for texts of arbitrary curvature and complex layouts, thereby improving DAT's accuracy and expanding its real-world applicability. Experimental results demonstrate that DAT achieves state-of-the-art performances across a variety of text-related benchmarks, including multi-oriented/arbitrarily-shaped scene text detection, document layout analysis and page detection tasks.
