Edge-aware transformer architecture for boundary-precise and real-time scene text segmentation
摘要
Scene text segmentation in natural images remains challenging because text instances often appear curved, irregular, multi-oriented, and embedded in cluttered backgrounds. Accurate boundary localization is particularly important for reliable text-region extraction, while heavy architectures may limit real-time applicability. This study aims to develop a compact boundary-aware framework for real-time scene text segmentation and localization. To this end, an edge-aware transformer architecture is proposed based on a U-Net-like encoder-decoder structure. The model combines convolutional local feature extraction with a transformer bottleneck for global-context modeling and uses dual output heads to predict both text-region segmentation masks and edge masks. Polygon annotations from the Total-Text dataset are converted into rasterized segmentation and boundary masks, and the model is optimized using a composite loss that combines region-level and boundary-level supervision. On the Total-Text validation set, the proposed model achieved a Dice Score of 0.6176, an IoU of 0.4472, a pixel accuracy of 93.57%, and an AUC of 0.89. Boundary-sensitive evaluation further confirmed the benefit of edge supervision, with a Boundary F1 score of 0.58. The model also maintained real-time performance, achieving an average inference time of 5.84 ms per image and a throughput of 171.3 FPS under the evaluated setting. These results indicate that the proposed edge-aware transformer provides an effective accuracy-efficiency trade-off for boundary-aware scene text segmentation and localization.