Painting scoring network based on multi-scale features and fusion attention mechanism

Through a painting scoring network based on multi-scale features and a fusion attention mechanism, the problems of insufficient objectivity and high calculation costs of the existing scoring methods are solved, and fast, comprehensive and accurate ratings of art works are achieved, which is suitable for resource-constrained environment.

CN118968236APending Publication Date: 2024-11-15GUANGDONG UNIV OF TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410851352.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing method of scoring art works has problems such as insufficient objective fairness, high calculation and storage costs, and insufficient precision in ratings, especially in the absence of educational resources, which is difficult to provide timely and effective feedback.

Method used

The painting scoring network based on multi-scale features and fusion attention mechanism is adopted, and the painting is fully analyzed and evaluated through image embedding layer, multi-scale feature extraction network, feature matching module, attention mechanism module and full-connection network. Regression models of multiple aesthetic dimension features are automatically scored.

Benefits of technology

It improves the speed, comprehensiveness and objectivity of the score, reduces the number of model parameters, improves the speed of reasoning and generalization capabilities, making the score more suitable for resource-constrained environments, and provides timely and accurate feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968236A_ABST
    Figure CN118968236A_ABST
Patent Text Reader

Abstract

The invention provides a painting scoring network based on multi-scale features and a fusion attention mechanism. The painting scoring network sequentially comprises an image embedding layer, a multi-scale feature extraction network, a feature matching module, an attention mechanism module, a full-connection network and an output layer from an input end to an output end, the multi-scale feature extraction network is used for performing multi-scale feature extraction on an input original painting; the feature matching module is used for performing global feature and local feature matching on the multi-scale features and the original image; the attention mechanism module is used for weighting the global features and the local features; and the full-connection network is used for regression prediction to obtain the score of each dimension of the painting. The method gives consideration to the reasoning speed and the prediction accuracy, enables the model parameters to be fewer and the training speed to be higher by using the depth separable convolution, is more suitable for being deployed in a mobile device with limited resources, and enables the students to obtain the painting quality through model calculation and trained weight parameters at the rear end after the students upload the painting at the front end. And the score of each dimension of the work is fed back timely and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a painting scoring network based on multi-scale features and a fusion attention mechanism. Background Art

[0002] In art education, the traditional large-class collective teaching method is difficult to meet the learning needs of each student [1]. In addition to guiding painting, teachers need to spend a lot of time and energy correcting students' homework, but due to the lack of teacher resources, students' works often do not receive timely and effective feedback.

[0003] Against the backdrop of the rapid development of artificial intelligence technology, many studies have gradually emerged that combine artificial intelligence to improve the shortcomings of traditional art education. Among them, many scholars have begun to explore the possibility of combining artificial intelligence with art education. More in-depth research includes the use of machine learning and deep learning technologies to automatically score artworks. These models build and train deep learning models to automatically extract image features such as color, composition, and depth of field, and combine relevant aesthetic scoring standards to quickly and accurately score students' works, and provide detailed feedback and suggestions to help students better understand their performance and improve the quality of their works.

[0004] However, the existing scoring methods still have many limitations:

[0005] 1) The traditional way of scoring art works relies on manual scoring. However, due to the scarcity of educational resources, it is difficult for students to get timely teaching feedback. In addition, since manual scoring has strong subjective will, the objectivity and fairness of the painting scoring process cannot be guaranteed.

[0006] 2) The scoring method based on large-scale deep learning pre-trained networks usually uses general data sets, which lacks generalization in extracting data features of artworks. In addition, large-scale pre-trained networks have huge parameters, resulting in high computational and storage costs during training and inference.

[0007] 3) Existing scoring methods often use classification to divide works into different levels and grades, and then give specific scores. However, this may have vague boundaries, making it difficult to accurately classify the works, and the scoring is not precise and objective. Summary of the invention

[0008] In view of the shortcomings of the prior art, the present invention provides a painting scoring network based on multi-scale features and fused attention mechanism. By combining the multi-head attention mechanism and the deep learning network, it can realize the comprehensive analysis and evaluation of the paintings, and adopts the regression model that integrates the features of multiple aesthetic dimensions for automatic scoring, making the scoring process faster, more comprehensive and more objective.

[0009] The technical solution of the present invention is: a painting scoring network based on multi-scale features and fusion attention mechanism, which includes an image embedding layer, a multi-scale feature extraction network, a feature matching module, an attention mechanism module, a fully connected network, and an output layer from the input end to the output end;

[0010] The multi-scale feature extraction network is used to extract multiple features from the input original painting;

[0011] The feature matching module is used to perform global feature and local feature matching between the multi-scale features and the original image;

[0012] The attention mechanism module weights the global features and the local features through the global attention mechanism and the local attention mechanism respectively;

[0013] The fully connected network is used for regression prediction to obtain scores for each dimension of the painting and output them through the output layer.

[0014] Preferably, the original paintings include paintings of four categories, the four categories of painting data are respectively portrait sketch, still life sketch, color still life and quick sketch, and each painting data has corresponding scoring scores and final scores in four dimensions.

[0015] Preferably, the scoring scores of the four dimensions are respectively the composition scoring score, the structure and proportion scoring score, the detail depth and local portrayal scoring score, and the expression means and techniques to achieve details scoring score.

[0016] Preferably, the image embedding layer is used to perform mapping processing on the original image before multi-scale feature extraction in order to perform feature extraction.

[0017] Preferably, the multi-scale feature extraction network includes a feature extraction layer composed of convolution kernels of three scales: 3×3, 5×5, and 7×7; a 5×5 standard convolution is split into two 3×3 convolution operations, and a 7×7 standard convolution is decomposed into three 3×3 convolution operations by using convolution decomposition, and the expressions are respectively:

[0018] Y1=conv(X)+B1;

[0019] Y2=conv(conv(X)+B1)+B2;

[0020] Y3=conv(conv(conv(X)+B1)+B2)+B3;

[0021] In the formula, Y1, Y2, and Y3 are the feature maps extracted by convolution kernels of three scales, 3×3, 5×5, and 7×7, respectively. Conv represents 3×3 ordinary convolution, and B i is the bias term of each layer.

[0022] Preferably, the multi-scale feature extraction network performs feature splicing on the channel dimension for the feature maps Y1, Y2, and Y3 extracted by convolution kernels of different sizes; and then uses depthwise separable convolution to further extract deep features while reducing the number of channels; wherein the depthwise separable convolution is divided into two steps: depthwise convolution and pointwise convolution; first, an independent convolution operation is performed on each channel in the depth direction to achieve feature extraction for each input channel; then pointwise convolution is performed, and a 1×1 convolution kernel is used to perform a convolution operation on the output of the depthwise convolution, and the features of different channels are fused to obtain the final output feature map.

[0023] Preferably, the feature matching module includes a global matcher and a local matcher. The global matcher is used for overall feature matching and alignment, and searches for matching feature points on the entire feature map. The local matcher is used for local feature matching and alignment, and searches for matching feature points or feature descriptors in a local area.

[0024] Preferably, the global matcher performs maximum pooling and average pooling operations on the input original image, respectively, and then fuses the global feature information obtained by the maximum pooling and average pooling operations, and reshapes the fused feature map as the query value, i.e., x;

[0025] The feature map extracted by the multi-scale feature extraction network is reshaped as the key and value x0, and then the multi-head attention mechanism is used to calculate the attention weight between x and x0, and then the weighted features are fused to finally obtain the feature map after global feature matching; the attention weight between x and x0 is calculated as follows:

[0026]

[0027] In the formula, Q is the query value, K is the key value, and V is the value. These are the values ​​obtained by processing the input image matrix with different weight matrices. k is the dimension of the key value, Softmax is the activation function, the matrix is ​​normalized to get the attention weight matrix, and T is the transpose operation of the matrix;

[0028] First, the weight coefficient is obtained according to the dot product of Q and K, and then it is scaled by dividing it by the square root dk to avoid the dot product result being too large, and then the weight coefficient is multiplied by V and the weighted sum is calculated;

[0029] In the multi-head attention mechanism, assuming there are h heads, the input needs to be linearly transformed h times, and h attention operations are performed respectively. Finally, the results of the h heads are weighted and merged, that is:

[0030] MutiHead(Q,K,V)=Concat(head1,…,head h )W O

[0031]

[0032] In the formula, MutiHead represents the multi-head attention mechanism, Concat is the attention weight of concatenating multiple heads, and head h is the hth attention head, W O is the output transformation matrix, which is the weight matrix used to merge and transform the outputs of multiple attention heads in multi-head attention. i Q is the transformation matrix of the Q value of the i-th head, is the transformation matrix of the K value of the i-th head, is the transformation matrix of the V value of the ith head.

[0033] Preferably, the local matcher first randomly crops or randomly rotates the input original image, splices the obtained sub-image features in the channel dimension, and then extracts the local feature information through a depthwise separable convolution operation to obtain a feature map x that integrates the local information;

[0034] The feature map extracted by the multi-scale feature extraction network is reshaped and adjusted as the key and value input of the multi-head attention mechanism. The multi-head attention mechanism is used to focus on the local features of different scales and positions of the image and perform weighted integration to achieve local feature matching.

[0035] Preferably, the input of the global attention mechanism is a global feature map that has undergone global matching. The xq, xk, and xv obtained after adjustment by the reshaping function Reshape are used as the input of the multi-head attention mechanism MHA. A weighted feature map xa is obtained through the multi-head attention mechanism MHA, and then the weighted feature map xa is added to xq and normalized LayNorm to further integrate information from different heads; subsequently, the deep image features obtained by the normalized LayNorm operation are subjected to a fully connected Dense operation and the tensor xf obtained by normalizing the weights obtained through the attention mechanism, i.e., xa+xq, are weightedly fused, and the weighted global feature representation is obtained after global average pooling GAP.

[0036] Preferably, the local attention mechanism integrates the channel attention mechanism and the spatial attention mechanism; the channel attention mechanism and the spatial attention mechanism are used to process the local feature map of the local match, namely:

[0037] The channel attention mechanism reduces the spatial dimension of the local feature map of the local match to 1 through global average pooling GAP; then obtains the feature attention weight xc on the channel through full connection Dense and reshape transformation Reshape operation;

[0038] The spatial attention mechanism uses deep separable convolution DSC to process the local feature map of local matching to learn spatial features; obtain the spatial feature attention weight xs, and then use matrix multiplication MUL to multiply the channel feature attention weight xc with the spatial feature attention weight xs to obtain a local attention weight matrix; then add the local attention weight matrix to the original input to obtain a weighted feature representation.

[0039] Preferably, the expression for regression prediction by the fully connected network is:

[0040] Score 1,2 =Prediction(GlobalFeature(xg))

[0041] Score 3,4 =Prediction(LocalFeature(xl))

[0042] OverallScore=Prediction(Concat(Score1,Score2,Score3,Score4))

[0043] In the formula, xg is the feature map obtained by the global matcher, xl is the feature map obtained by the local matcher, Prediction(·) represents regression prediction through a fully connected network, GlobalFeature(·) and LocalFeature(·) represent the global feature map weighted by global feature matching and the local feature map weighted by local feature matching, respectively, Concat(·) represents the concatenation and fusion of the output four-dimensional features, and then the full connection calculation is performed to obtain the final image score OverallScore; Score 1,2 Represents the scores on two global dimensions, namely the overall composition score and the structural proportion score. 3,4 Represents the scores on two local dimensions, namely the detail local score and the performance skill score.

[0044] The beneficial effects of the present invention are:

[0045] 1. The present invention processes image features of different scales in parallel and uses an attention mechanism to weight image features, so that the network pays attention to more useful global and local features, and outputs scores of different dimensions after passing through independent fully connected networks of each branch. Each branch focuses on learning features of a specific dimension, which can improve the flexibility and generalization ability of the model;

[0046] 2. The present invention takes into account both the speed of inference and the accuracy of prediction. The use of depthwise separable convolution reduces the number of model parameters and increases the training speed. It is more suitable for deployment in mobile devices with limited resources. After students upload their paintings on the front end, the back end uses the model to infer and train the weight parameters, and timely and accurately feedback the scores of each dimension of the works.

[0047] 3. In the present invention, one branch is used for global feature extraction and attention calculation, and the other branch is used for local feature extraction and attention calculation. Finally, the features of the two branches are fused to obtain the final scoring result. This fusion method can improve the performance of the scoring network, making it more suitable for art evaluation tasks of different types and styles. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of the method of the present invention;

[0049] Figure 2 Various types of paintings images collected for the present invention;

[0050] Figure 3 It is a framework diagram of the scoring network model of the present invention;

[0051] Figure 4 Schematic diagram of the depth-wise separable convolution operation of the present invention;

[0052] Figure 5 A flowchart of global feature matching of the present invention;

[0053] Figure 6 It is a flowchart of local feature matching of the present invention;

[0054] Figure 7 A flowchart for weighting the global attention mechanism of the present invention;

[0055] Figure 8 The figure is a training flow chart of the scoring network model of the present invention. DETAILED DESCRIPTION

[0057] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings:

[0058] Example 1

[0059] like Figure 1 As shown, this embodiment provides a painting scoring network based on multi-scale features and fusion attention mechanism, which includes an image embedding layer, a multi-scale feature extraction network, a feature matching module, an attention mechanism module, a fully connected network, and an output layer from the input end to the output end.

[0060] The multi-scale feature extraction network is used to extract multiple features from the input original painting; the feature matching module is used to match the multi-scale features with the original image in terms of global features and local features.

[0061] The attention mechanism module weights global features and local features through global attention mechanism and local attention mechanism respectively.

[0062] The fully connected network is used for regression prediction to obtain scores for each dimension of the painting and output them through the output layer.

[0063] As a preferred embodiment of the present invention, the original paintings include four categories of paintings, and the four categories of painting data are respectively sketch portrait, sketch still life, color still life and sketch quick sketch. In the present embodiment, each category collects no less than 10,000 paintings; and each painting data has five scores given by professional art teachers; including scoring scores and final scores of four dimensions, among which the composition scoring score accounts for 15%, the structure and proportion scoring score accounts for 30%, the detail depth and local portrayal scoring score accounts for 30%, and the expression means and techniques to achieve details scoring score accounts for 25%. In the present embodiment, the size of each painting is uniformly adjusted to 365×256×3, and the light and dark grayscale are uniformly processed, for example Figure 2 shown.

[0064] In this embodiment, before performing multi-scale feature extraction, the original image is mapped through an image embedding layer to perform feature extraction.

[0065] As a preferred embodiment of the present invention, the multi-scale feature extraction network includes a feature extraction layer composed of convolution kernels of three scales: 3×3, 5×5, and 7×7; a 5×5 standard convolution is split into two 3×3 convolution operations, and a 7×7 standard convolution is decomposed into three 3×3 convolution operations by using convolution decomposition, and the expressions are respectively:

[0066] Y1=conv(X)+B1;

[0067] Y2 = Conv(conv(X)+B1)+B2;

[0068] Y3=conv(conv(conv(X)+B1)+B2)+B3;

[0069] In the formula, Y1, Y2, and Y3 are the feature maps extracted by convolution kernels of three scales, 3×3, 5×5, and 7×7, respectively. Conv represents 3×3 ordinary convolution, and B i is the bias term of each layer.

[0070] Then, feature maps Y1, Y2, and Y3 extracted by convolution kernels of different sizes are concatenated in the channel dimension; and depthwise separable convolution is used to further extract deep features while reducing the number of channels; wherein the depthwise separable convolution is divided into two steps: depthwise convolution and pointwise convolution; Figure 3 As shown in the figure, first, an independent convolution operation is performed on each channel in the depth direction to realize the feature extraction of each input channel; then point-by-point convolution is performed, and a 1×1 convolution kernel is used to convolve the output of the depth convolution to fuse the features of different channels and obtain the final output feature map.

[0071] As a preferred embodiment of the present invention, the feature matching module includes a global matcher and a local matcher. The global matcher is used for overall feature matching and alignment, and searches for matching feature points on the entire feature map. The local matcher is used for local feature matching and alignment, and searches for matching feature points or feature descriptors in a local area.

[0072] As preferred in this embodiment, Figure 4 As shown, the global matcher performs maximum pooling and average pooling operations on the input original image, and then fuses the global feature information obtained by the maximum pooling and average pooling operations, and reshapes the fused feature map as the query value x;

[0073] The feature map extracted by the multi-scale feature extraction network is reshaped as the key and value x0, and then the multi-head attention mechanism is used to calculate the attention weight between x and x0, and then the weighted features are fused to finally obtain the feature map after global feature matching; the attention weight between x and x0 is calculated as follows:

[0074]

[0075] In the formula, Q is the query value, K is the key value, and V is the value. These are the values ​​obtained by processing the input image matrix with different weight matrices. k is the dimension of key, Softmax is the activation function, the matrix is ​​normalized to get the attention weight matrix, and T is the transpose operation of the matrix.

[0076] First, the weight coefficient is obtained according to the dot product of Q and K, and then it is scaled by dividing it by the square root dk to avoid the dot product result being too large, and then the weight coefficient is multiplied by V and the weighted sum is calculated;

[0077] In the multi-head attention mechanism, assuming there are h heads, the input needs to be linearly transformed h times, and h attention operations are performed respectively. Finally, the results of the h heads are weighted and merged, that is:

[0078] MutiHead(Q,K,V)=Concat(head1,…,head h )W O

[0079]

[0080] In the formula, MutiHead represents the multi-head attention operation, Concat is the attention weight of concatenating multiple heads, and head h is the hth attention head, W O is the output transformation matrix, which is the weight matrix used to merge and transform the outputs of multiple attention heads in multi-head attention. i Q is the transformation matrix of the Q value of the i-th head, is the transformation matrix of the K value of the i-th head, is the transformation matrix of the K fingers of the i-th head.

[0081] As preferred in this embodiment, Figure 5 As shown, the local matcher first randomly crops or randomly rotates the input original image, splices the obtained sub-image features in the channel dimension, and then extracts the local feature information through a depth-separable convolution operation to obtain a feature map x that integrates the local information;

[0082] The feature map extracted by the multi-scale feature extraction network is reshaped and adjusted as the key and value input of the multi-head attention mechanism. The multi-head attention mechanism is used to focus on the local features of different scales and positions of the image and perform weighted integration to achieve local feature matching.

[0083] As preferred in this embodiment, Figure 6As shown, the input of the global attention mechanism is the global feature map after global matching. The xq, xk, and xv obtained after adjustment by the reshaping function Reshape are used as the input of the multi-head attention mechanism MHA. A weighted feature map xa is obtained through the multi-head attention mechanism MHA, and then the weighted feature map xa is added with xq and normalized LayNorm to further integrate the information of different heads; subsequently, the deep image features obtained by the normalized LayNorm operation are subjected to the fully connected Dense operation and the tensor xf obtained by normalizing the weights xa+xq obtained through the attention mechanism are weightedly fused, and the weighted global feature representation is obtained after global average pooling GAP.

[0084] As preferred in this embodiment, Figure 7 As shown, the local attention mechanism integrates the channel attention mechanism and the spatial attention mechanism; the channel attention mechanism and the spatial attention mechanism are used to process the local feature map of the local match, namely:

[0085] The channel attention mechanism reduces the spatial dimension of the local feature map of the local match to 1 through global average pooling GAP; then obtains the feature attention weight xc on the channel through full connection Dese and reshape transformation Reshape operation;

[0086] The spatial attention mechanism uses depth-wise convolution Conv, depth-wise separable convolution DSC, and point-wise convolution Conv to process the local matching local feature map to learn spatial features; obtain the spatial feature attention weight xs, and then use matrix multiplication MUL to multiply the channel feature attention weight xc with the spatial feature attention weight xs to obtain the local attention weight matrix; then add the local attention weight matrix to the original input to obtain the weighted feature representation. In this embodiment, the depth-wise convolution Conv performs convolution on each channel of the input, while the point-wise convolution Conv uses a 1x1 convolution kernel to perform ordinary convolution operations to achieve the purpose of fusing channel features.

[0087] As a preferred embodiment of this invention, the expression for regression prediction by the fully connected network is:

[0088] Score 1,2 =Prediction(GlobalFeature(xg))

[0089] Score 3,4 =Prediction(LocalFeature(xl))

[0090] OverallScore=Prediction(Concat(Score1,Score2,Score3,Score4))

[0091] Where xg is the feature map obtained by the global matcher, xl is the feature map obtained by the local matcher, Prediction(·) indicates regression prediction through a fully connected network, GlobalFeature(·) and LocalFeature(·) respectively represent the global feature map weighted by global feature matching and the local feature map weighted by local feature matching, Concat(·) indicates concatenating and fusing the output features of the four dimensions, and then performing full connection calculation to obtain the final image score OverallScore; Socre 1,2 Represents the scores on two global dimensions, namely the overall composition score and the structural proportion score. 3,4 Represents the scores on two local dimensions, namely the detail local score and the performance skill score.

[0092] As a preferred embodiment of this embodiment, this embodiment also uses the painting data of a single category to train the scoring network respectively, such as Figure 8 As shown, the training includes the following steps:

[0093] S11), performing image enhancement processing on the single-category painting data and inputting it into the scoring network model for training;

[0094] S12), during the training process, determine whether there are training weights; if so, load the latest weights, and then proceed to step S13); if there are no training weights, set the initial value of loss to infinity, that is, loss = inf;

[0095] S13) After each training epoch, the average loss value loss on the entire training data set is calculated;

[0096] S14) Determine whether the average loss value loss is less than the minimum loss value lossmin. If so, update the training weights and end the training; if not, return to step S13).

[0097] As a preferred embodiment of the present invention, in step S11), the image enhancement processing includes random rotation, flipping, scaling, cropping, and adding noise and blurring operations.

[0098] In this embodiment, the scoring network model is deployed on an RTX 3090 GPU for training and testing. After 60 epochs, the loss value basically tends to be stable. Secondly, on the test set, the average time for scoring each painting is 0.2s, the error of the predicted score is distributed between 0-5 points, and most of the prediction errors are within 1 point, indicating that the scoring efficiency is improved while ensuring the accuracy.

[0099] At the same time, this embodiment is compared with some existing networks. After training with the same data set, this embodiment shows superior performance after comprehensive average error, running speed, number of parameters and other indicators.

[0100] The above embodiments and descriptions are only for illustrating the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, all of which fall within the scope of the present invention to be protected.

Claims

1. A painting scoring network based on multi-scale features and fusion attention mechanism, characterized in that: From the input end to the output end, it includes the image embedding layer, the multi-scale feature extraction network, the feature matching module, the attention mechanism module, the fully connected network, and the output layer; The multi-scale feature extraction network is used to extract multiple features from the input original painting; The feature matching module is used to perform global feature and local feature matching between the multi-scale features and the original image; The attention mechanism module weights the global features and the local features through the global attention mechanism and the local attention mechanism respectively; The fully connected network is used for regression prediction to obtain scores for each dimension of the painting and output them through the output layer.

2. A painting scoring network based on multi-scale features and fusion attention mechanism according to claim 1, characterized in that: The original painting includes four categories of painting data.

3. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 1, characterized in that: The multi-scale feature extraction network includes a feature extraction layer composed of convolution kernels of three scales: 3×3, 5×5, and 7×7.

4. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 3, characterized in that: The multi-scale feature extraction network performs feature splicing on the channel dimension for the feature maps extracted by convolution kernels of different sizes; then uses depthwise separable convolution to further extract deep features while reducing the number of channels; and obtains the final output feature map.

5. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 1, characterized in that: The feature matching module includes a global matcher and a local matcher. The global matcher is used for overall feature matching and alignment, and searches for matching feature points on the entire feature map. The local matcher is used for local feature matching and alignment, and searches for matching feature points or feature descriptors in a local area.

6. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 5, characterized in that: The global matcher performs maximum pooling and average pooling operations on the input original image respectively, and then fuses the global feature information obtained by the maximum pooling and average pooling operations, reshapes the fused feature map as the query value x; and reshapes the feature map extracted by the multi-scale feature extraction network as the key and value, and then uses the multi-head attention mechanism to calculate the attention weight between the two reshaped feature maps, and then fuses the weighted calculated features, and finally obtains the feature map after global feature matching.

7. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 5, characterized in that: The local matcher first randomly crops or rotates the input original image, splices the obtained sub-image features in the channel dimension, and then obtains a feature map that integrates local information after extracting local feature information through a depthwise separable convolution operation; the feature map extracted by the multi-scale feature extraction network is reshaped and adjusted as the key and value input of the multi-head attention mechanism, and the multi-head attention mechanism is used to focus on the local features of different scales and positions of the image and perform weighted integration, thereby achieving local feature matching.

8. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 1, characterized in that: The input of the global attention mechanism is a global feature map that has undergone global matching. The xq, xk, and xv obtained after adjustment by the reshaping function Reshape are used as the input of the multi-head attention mechanism MHA. A weighted feature map xa is obtained through the multi-head attention mechanism MHA, and then the weighted feature map xa is added to xq and normalized LayNorm to further integrate information from different heads; subsequently, the deep image features obtained by the normalized LayNorm operation are subjected to a fully connected Dense operation and the tensor xf obtained by normalizing the weights obtained through the attention mechanism, i.e., xa+xq, and weighted fusion is performed, and a weighted global feature representation is obtained after global average pooling GAP.

9. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 1, characterized in that: In step S5), the local attention mechanism integrates the channel attention mechanism and the spatial attention mechanism; the local feature map of the local match is processed by the channel attention mechanism and the spatial attention mechanism respectively to obtain the channel feature attention weight xc and the spatial feature attention weight xs, and then the matrix multiplication MUL is used to multiply the channel feature attention weight xc with the spatial feature attention weight xs to obtain the local attention weight matrix; and then the local attention weight matrix is ​​added to the original input to obtain the weighted feature representation.

10. The painting scoring network based on multi-scale features and fusion attention mechanism according to claim 9, characterized in that: The expression for regression prediction of the fully connected network is: Score 1,2 =Prediction(GlobalFeature(xg)) Score 3,4 =Prediction(LocalFeature(xl)) OverallScore=Prediction(Concat(Score1, Score2, Score3, Score4)) In the formula, xg is the feature map obtained by the global matcher, xl is the feature map obtained by the local matcher, Prediction(·) represents regression prediction through a fully connected network, GlobalFeature(·) and LocalFeature(·) represent the global feature map weighted by global feature matching and the local feature map weighted by local feature matching, respectively, Concat(·) represents the concatenation and fusion of the output four-dimensional features, and then the full connection calculation is performed to obtain the final image score OverallScore; Score 1,2 Represents the scores on two global dimensions, namely the overall composition score and the structural proportion score. 3,4 Represents the scores on two local dimensions, namely the detail local score and the performance skill score.

Citation Information

Cited By

  • Image color aesthetics evaluation method based on multi-scale feature fusion

    CN119785159A

  • Aerial image target detection system and method for point labeling

    CN120747625A

  • Multi-parameter fusion art work image display system

    CN121073797A

  • Neural network model-based 3D model scoring method and system, terminal and medium

    CN121168536A