A text detection algorithm for ancient Chinese writing based on Swin transformer and mask R-CNN

The study of ancient Chinese writing has great cultural and historical value. Text annotation is a time-consuming and laborintensive part of ancient writing research. In this paper, we construct a deep learning model for ancient Chinese text detection which combines Swin Transformer and Mask R-CNN. To solve the overlapping detection problem, we propose Text Non-Maximum Suppression (text-NMS) and text-NMS loss. The former is to weed out redundant subtext bounding boxes in the Non-Maximum Suppression process, and the latter further rectifies the detection failure missed by text-NMS in bounding box regression. Experiments on the Chinese Stone Inscription Dataset show that the proposed algorithm can improve the accuracy of ancient text detection. The text-NMS and text-NMS loss algorithm boost the average precision (AP) of Swin-small and Mask R-CNN from 64.4% to 65.8% with few additional hyper-parameter and computational overhead.