The classification of Chinese calligraphy styles is an important research topic in the field of calligraphy art,which mainly classifies the subtle differences between different calligraphy styles.At present,most studies focus on the classification of five basic fonts.However,there are differences between font classification and style classification.Font refers to a broad classification of characters,while style is closely related to specific calligraphers,and there are very small differences between them for the same character of the same font written by different calligraphers.It is difficult for traditional classification algorithms to achieve the expected classification effect in this subject,and the development of deep convolutional neural networks in recent years has brought new opportunities for calligraphy style classification.Therefore,this paper focuses on the relevant technologies of deep convolutional networks to complete the classification of Chinese calligraphy styles.This paper proposes a model for the classification of Chinese calligraphy styles,whose main body is a convolution neural network with three stream and shared weights.The input of the model is a triplet of images,including a sample to be queried,a positive sample of the same calligraphy style of the sample to be queried,and a negative sample of different calligraphy styles of the sample to be queried.For each stream of the input sample image,convolutional neural network is used for feature extraction.In order to further refine the obtained feature information.In this paper,the convolutional neural network part is connected with PSA(Pyramid Squeeze Attention)attention module,which provides multi-scale channel attention information,and then the Gram matrix is added to the attention module.By analyzing the correlation between features,the representation of style information is reconstructed.Finally,triplet loss and cross entropy loss are respectively used to optimize the network.Triplet loss guides the feature network to improve its ability to capture small style differences by making the feature distance of samples of different categories become larger and the feature distance of samples of the same category become smaller.Cross entropy loss improves the classification ability of the network by combining category labels.The two are integrated and complementary by weighted method.In this paper,a large number of experiments are carried out on the two calligraphy style data sets.The introduction of PSA attention module and Gram matrix improves the accuracy of the network on the two data sets,demonstrating the role of both in optimizing the characterization of characteristic information.Secondly,the experimental data of the same network under the three-stream and single-stream structure show that the two loss functions of the three-stream structure can provide the guidance of network parameter optimization in many aspects.Finally,the traditional method and the convolutional neural network-based method are selected for comparative experiments.The accuracy of the model in this paper is 99.37% and97.91%,respectively,showing superior classification performance than other methods,and directly reflecting the superiority of the proposed method in dealing with the classification of Chinese calligraphy styles. |