GAN-Based Stroke Extraction Model with Attention and Stroke Grouping
摘要
Chinese character stroke segmentation aims to extract all strokes from a Chinese character image. Since strokes can intersect each other, the algorithm tends to divide one single stroke into several segments by the intersection point. Traditional methods extract the strokes based on pre-defined matching rules, which is not effective for complex characters. Deep learning-based methods can automatically learn the stroke segmentation rules through labelled data set. However, many of these methods rely solely on convolutions feature extraction. As convolution focuses more on the local patterns and is weak in capturing distant correlations, the strokes generated by the convolutional neural networks are often incomplete. In addition, the number of strokes among Chinese characters differ greatly, which implicitly unbalances the training data. Model performance varies considerably according to the number of strokes in the character. To address the above issues, this paper proposes a novel stroke segmentation network, namely, SGAN, which is based on generative adversarial networks to directly produce images containing extracted strokes. The strokes are grouped into 7 categories, each of which is generated by an output channel of SGAN. The axial attention and external attention are applied in SGAN in order to capture global features and improve the segmentation accuracy. To enhance the fidelity of generated stroke images, a series of post-processing algorithms are proposed to remove redundancies and missing parts. The effectiveness of the proposed method is verified over mainstream datasets, where SGAN has achieved outstanding performance.