A painting style classification method based on composition feature assistance

Through the multi-level feature fusion dual network structure assisted by composition features, combined with the attention mechanism and hybrid pooling, the problem of taking into account both global and local features when the painting classification model extracts and fuses features is solved, and the intelligent style of the painting is realized. Classification and efficient prediction.

CN115147663BActive Publication Date: 2024-10-22SHANGHAI INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210892616.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2024-10-22
Estimated Expiration
2042-07-27

Smart Images

  • Figure CN115147663B_ABST
    Figure CN115147663B_ABST
Patent Text Reader

Abstract

The present invention relates to the fields of digital image processing and computer vision, and in particular to a method for classifying the style of paintings assisted by composition features. The method for classifying the style of paintings classifies and labels sample image data, and divides the style categories; constructs a multi-level feature fusion dual network structure system assisted by composition features; and establishes a style feature classifier, thereby realizing the style classification prediction of paintings. The present invention can obtain predictions that meet the artistic style classification without the need for real-time manual style judgment and labeling of paintings. In addition, the classification method used in the present invention has the advantages of fast prediction speed and strong execution feasibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of digital image processing and computer vision, and in particular to a painting style classification method based on the assistance of composition features. Background Art

[0002] The development and widespread application of digital technology have enabled more paintings to be digitized. Faced with the huge digital image resources, it is far from enough to rely solely on artists to classify them. How to effectively classify paintings so that researchers or the public can better understand the paintings has become an urgent problem to be solved. However, traditional image classification methods do not take the relevant characteristics of painting art styles into consideration. Deep network structures have shown great potential in various visual recognition fields. Deep learning is linked to the classification of paintings. By targeting the brushstroke characteristics of authors of different styles, the color information of the paintings, the image composition and other aspects, a convolutional neural network model is designed to classify them.

[0003] The style classification of paintings belongs to attribute classification. The same attribute classification also includes information such as subject matter and age. As a basic research content of studying paintings, the attribute classification of paintings has laid a certain foundation for the subsequent understanding and aesthetic evaluation of paintings. At present, some phased results have been achieved in the field of computer-aided painting classification. The more significant results are in the direction of image style transfer. On the basis of human aesthetics, the style evaluation standards of paintings are summarized and summarized, and data is trained and learned to improve the accuracy of style recognition. As a multi-disciplinary subject of machine learning, art and psychology, it is full of huge challenges.

[0004] Most of the current painting classification models rely on the final highly semantic image information features, while shallow image features suffer from feature loss. The feature pyramid structure that fuses multiple layers of features is a typical feature fusion model, which has achieved good results in the fields of target detection and saliency detection. However, for the classification of paintings, it is impossible to take into account both global features and local details, especially for the special texture, color, composition and other features of the image style. Most deep learning training networks use a single network architecture to extract features, or mainly extract and train features for a certain feature, such as brushstroke features. However, there are fewer methods for analyzing composition style features, and the composition and position information are lost in the features extracted by deep learning; in terms of the feature fusion method, the simple fusion method will lead to feature redundancy and fail to highlight the main features. Summary of the invention

[0005] In order to solve the above technical problems, the purpose of the present invention is to provide a painting style classification method based on the assistance of composition features, specifically, the steps include:

[0006] Classify and annotate sample image data and divide them into style categories;

[0007] Construct a multi-level feature fusion dual network structure system assisted by composition features;

[0008] Build a style feature classifier;

[0009] Upload the painting image to the style feature classifier and classify the image according to the existing style classification labels.

[0010] Furthermore, a multi-level feature fusion dual network structure system assisted by composition features is constructed, and the steps include:

[0011] Preprocess the sample image;

[0012] The processed sample images are input into the dual network structure system for learning and training;

[0013] Feature fusion is performed by adaptively adjusting weights.

[0014] Furthermore, the sample image is preprocessed, the steps include:

[0015] Performing significant feature detection processing on the sample image to obtain a sample image feature map with significant features;

[0016] The sample image and the salient feature image are scaled and cropped to the same proportion.

[0017] Furthermore, the dual network structure system includes a non-structural feature extraction network structure and a composition feature extraction network structure.

[0018] Furthermore, the non-structural feature extraction network structure is specifically used to extract shallow detail features and deep semantic features of the sample image, and the steps include:

[0019] Obtain semantic feature information of sample images through deep neural networks;

[0020] Introduce deep-level semantic attention feature maps into shallow-level features to obtain shallow-level feature information with low redundancy;

[0021] The multi-scale feature maps corresponding to the mixed layers are fused layer by layer through a special convolution method;

[0022] Obtain non-structural feature information of the sample image.

[0023] Furthermore, the composition feature extraction network structure is based on the saliency feature map, and obtains feature information of different partitions through a mixed pooling mode, which is specifically used for composition feature extraction of sample images. The steps include:

[0024] The salient feature map of the sample image is passed through a lightweight network structure to nonlinearly map the sample image information;

[0025] Determine the composition method and its corresponding pooling method, extract features by partition, and obtain the composition information of the sample image.

[0026] Furthermore, composition methods include central composition, symmetrical composition, rule of thirds and diagonal composition.

[0027] Furthermore, feature fusion is performed by adaptively adjusting weights, and the steps include:

[0028] Extract two types of features from sample images through a dual network structure system;

[0029] The maximum, minimum and average values ​​of the features are transformed nonlinearly to generate the weight values ​​of the corresponding hierarchical feature graphs for feature fusion;

[0030] Perform adaptive fusion of mixed features.

[0031] Furthermore, the two types of features include semantic features and compositional features.

[0032] Furthermore, a style feature classifier is established, specifically by using a special mapping to establish the fused features.

[0033] After adopting the above technical solution, compared with the prior art, the present invention is beneficial in that: there is no need for real-time manual style judgment and marking of paintings, which is conducive to reducing human resource costs. It can realize intelligent classification prediction of the artistic style of paintings, and has the characteristics of fast prediction speed and strong execution feasibility, which is conducive to related researchers and the general public to better understand paintings. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 Flowchart for classifying painting styles. DETAILED DESCRIPTION

[0035] The present invention is further described in detail below through examples and drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Those skilled in the art should understand that the details and forms of the technical solutions of the present invention can be modified or replaced without departing from the structural ideas and scope of use of the present invention, but these modifications and replacements are within the protection scope of the present invention.

[0036] The present invention provides a method for classifying painting styles based on the assistance of composition features. Figure 1As shown, this embodiment divides special style categories by classifying and labeling sample data. Then, the salient attention image of the sample image is extracted, and a multi-scale mixed pooling method is adopted to extract different position information, so as to obtain the composition feature information of the painting. And for the different levels of features of the painting, the attention mechanism is used to obtain image features with low redundancy, and the multi-level features are fused by global average pooling, so that the features have rich fine-grainedness and strong semantics. Finally, for the image semantic features and composition features, an adaptive fusion method is adopted to achieve the purpose of dynamically adjusting the feature fusion weights. The fused features are specially mapped to obtain a classifier model, thereby realizing the style classification prediction of the painting.

[0037] This embodiment consists of two parts in the data preprocessing stage: data set division and sample image preprocessing. For the data set division and annotation stage, the pictures of the data set are obtained from the painting website, which are paintings of five writers: Vincent Willem vanGogh, Camille Pissarro, Paulus Pontius, Ilya Repin, and Ivan I.Shishkin. The painting styles of the five writers are quite different and representative of the style. There are 580 samples of each category. For the sample image preprocessing part, the sample image is resized and the significant features are extracted. First, the sample image is transformed into a size of 256*256. Secondly, the image is transformed into a saliency feature map. First, the sample image is subjected to Fourier transform and 3*3 average filter convolution to obtain the image spectrum information and average amplitude-frequency response information, which are denoted as L(f) and A(f) respectively. The difference between the spectrum information and the average amplitude-frequency response information is the spectrum residual value. The difference is subjected to inverse Fourier transform and denoted as N(f). The formula is shown below. Finally, the saliency feature map in the spatial domain is obtained through Gaussian blur transform.

[0038] I=N{L(f(x,y))-A(f(x,y))}

[0039] This embodiment is aimed at the extraction of non-structural style features. Resnet50 is selected as the backbone network. The Skip_1-Skip_4 feature layers extracted from the backbone network Stage2-Stage5, that is, the four feature maps f_i (i∈{1,2,3,4}), are 56×56 pixels, 28×28 pixels, 14×14 pixels, and 7×7 pixels in size, respectively. The feature maps f_i (i∈{1,2,3,4}) are subjected to maximum pooling and average pooling respectively, and the pooled feature maps are concatenated and input into the convolution layer with a convolution kernel size of 7×7, and the number of feature map channels is reduced to 1, thereby obtaining the spatial attention feature map f corresponding to the single-level feature map.sam _i(i∈{1,2,3,4}). In order to introduce the attention features of deep semantics into the shallow feature map, the spatial attention feature map f with a size of 7×7 pixels is sam _4, through the deconvolution method and using bilinear difference to upsample the feature map, a feature map f with a size of 14×14 pixels is obtained up _4, similarly, we can get the feature map f sam _3,f sam _2 Feature map f after upsampling up _3, size is 28×28, feature map f up _2, the size is 56 × 56. Then, the upsampled feature map f up _i(i∈{2,3,4}), respectively add the spatial attention feature map of the same size in the corresponding shallow feature f sam _i(i∈{1,2,3}), thus obtaining the attention feature map f with mixed deep semantic information fusion _i(i∈{1,2,3}).

[0040]

[0041] Finally, the feature map f fusion _i(i∈{1,2,3}) and Skip_1-Ski p_3 are mapped to the output feature map f_i(i∈{1,2,3}) to obtain the final spatial attention feature map FP_i(i∈1,2,3}). The features extracted from the level Skip_4 and its corresponding spatial attention feature map f sam _4 is multiplied and the original feature map information is added to obtain the feature map FP_4 with spatial attention. This method transfers the attention area in the deep semantic features to the adjacent shallow features in the opposite direction of feature extraction in the form of an attention feature map, assisting the shallow feature layer to discriminate the information-rich part of the image, extracting important features more efficiently and achieving the goal of removing potential noise in the image.

[0042] The multi-layer feature maps after attention mechanism processing have the problem of different sizes. The sizes of multi-layer feature maps are unified through global average pooling, and the multi-layer feature maps are fused through channel feature cascade concatenation to finally obtain a 7*7*3840 feature map group.

[0043] This embodiment aims at the structural features of the sample image. In order to reduce the amount of feature parameters, a three-layer simple convolutional network is used to realize the composition feature extraction of the significant feature map of the sample image. The first two groups of convolution operations of Resnet are selected to obtain a feature map size of 56*56*256. And according to the image composition characteristics, the image is divided into three major composition categories: central composition, third composition, and diagonal composition, which correspond to five different pooling sizes, and the corresponding pooling areas are divided according to the composition rules. Among them, the central composition is divided into two areas, namely the central area and the edge area, and the edge length and the center length are divided according to the ratio of 2:1; the third composition is divided into two forms, horizontal composition and vertical composition, and both composition methods divide the image into three areas, and the ratio of the length of the divided area is 1:1:1; the diagonal composition method is divided into forward diagonal composition and reverse diagonal composition, and both compositions divide the image into two areas along the diagonal. Channel cascade is performed by performing a feature vector obtained by performing a regional average pooling operation on the significant feature image.

[0044] This embodiment is aimed at the deep semantic features F of non-structural images. atts And the composition feature F comp The upper and lower branch features are fused by adaptively assigning weights, so that the model can fuse features according to the feature distribution of the sample image. First, initialize the weights and dynamically normalize the weights to obtain the parameter α 1 , α 2 . Thus, the effect of each part of the features on the final classification effect is adaptively adjusted, and the proportion of features with greater influencing factors is strengthened. The specific fusion formula is as follows:

[0045] F=α 1 *F atts +α 2 *F comp

[0046] (w i is the feature weight factor)

[0047] The fused features are classified through nonlinear mapping, and the result with the highest category probability is determined as the specific style category of the painting.

[0048] During the training process of the entire model, 100 epochs were trained with a batch size of 8 to ensure the convergence of the model. At the same time, the SGD optimizer was used with a momentum of 0.9. During training, the learning rate warm-up and learning rate decay strategies were adopted.

[0049] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for classifying painting styles based on composition features, characterized in that the steps include: Classify and annotate sample image data and divide them into style categories; Construct a multi-level feature fusion dual network structure system assisted by composition features; Build a style feature classifier; Upload the painting image to the style feature classifier and classify the image according to the existing style classification labels; Wherein, the dual network structure system includes a non-structural feature extraction network structure and a composition feature extraction network structure; The non-structural feature extraction network structure is specifically used to extract shallow detail features and deep semantic features of sample images, and the steps include: Obtain semantic feature information of sample images through deep neural networks; Introduce deep-level semantic attention feature maps into shallow-level features to obtain shallow-level feature information with low redundancy; The multi-scale feature maps corresponding to the mixed layers are fused layer by layer through a special convolution method; Obtain non-structural feature information of the sample image; The composition feature extraction network structure is specifically used for extracting composition features of sample images, and the steps include: The salient feature map of the sample image is passed through a lightweight network structure to nonlinearly map the sample image information; Determine the composition method and its corresponding pooling method, extract features by partition, and obtain the composition information of the sample image.

2. The method for classifying painting styles according to claim 1, characterized in that: The steps of constructing a multi-level feature fusion dual network structure system assisted by composition features include: Preprocess the sample image; The processed sample images are input into the dual network structure system for learning and training; Feature fusion is performed by adaptively adjusting weights.

3. The method for classifying painting styles according to claim 2, characterized in that: The step of preprocessing the sample image comprises: Performing significant feature detection processing on the sample image to obtain a sample image feature map with significant features; The sample image and the salient feature image are scaled and cropped to the same proportion.

4. The method for classifying painting styles according to claim 1, characterized in that: The composition methods include central composition method, symmetrical composition method, thirds composition method and diagonal composition method.

5. The method for classifying painting styles according to claim 2, characterized in that: The step of performing feature fusion by adaptively adjusting weights includes: Extract two types of features from sample images through a dual network structure system; The maximum, minimum and average values ​​of the features are transformed nonlinearly to generate the weight values ​​of the corresponding hierarchical feature graphs for feature fusion; Perform adaptive fusion of mixed features.

6. The method for classifying painting styles according to claim 5, characterized in that: The two types of features include semantic features and compositional features.

7. The method for classifying painting styles according to claim 1, characterized in that: The said establishing of the style feature classifier specifically involves establishing the fused features through special mapping.