# Subdivision of Artistic Objectives of Oil Painting Creation under the Evaluation of Deep Learning Model

Authors: Meishuang Wu
Journal: Journal of Sensors
 (2022)

---

## Abstract

In order to fully segment and classify the artistic objectives of painting and realise the needs of automatic classification and retrieval of painting by computer, this paper proposes to establish convolution neural network with dual core compression activation module and deep separation convolution. The DKSE module is constructed based on the structural features of SKNet. SKNet extracts the overall image and detail features, SENet enhances the channel features. Using DKSE module and depth separable convolution, a convolution neural network is established to classify paintings. DKSE module can effectively improve the classification performance of the model, fully extract the overall and local detail features of oil painting images, and provide better classification accuracy than the traditional network model.


---

## Body

## 1. Introduction

In recent years, with the rapid development of the digitisation of oil paintings, how to establish and manage digital libraries and digital museums of oil paintings? It has become a hot research issue at present, and the processing technology of the images of written oil paintings is the key to this research problem. How to discover the digital laws behind these paintings and how to effectively analyse, identify, and classify the authors and artistic styles of oil paintings are increasingly becoming hot research issues [1].There is a large body of literature on the use of computer technology to analyse and study art paintings, but the following problems still exist in the study of oil paintings:(1)
The existing results in art painting mainly simulate natural images in oil and pastel painting or analyse art styles for western paintings such as oil painting [2]. As a unique art form, Chinese painting has a very different mood and flavour compared to other art styles (such as oil painting, cartoon, and chalk painting), so some of the existing research on Western painting cannot be directly applied to the analysis of oil painting(2)
At present, there are only a few studies on oil painting, but the main ones are as follows: [3] extracted the overall and local features and proposed the entropy balance (fusion) algorithm to classify the authors of Chinese paintings. [4] studied the different depth information features of paintings at different scales and frequency bands in the wavelet domain in order to classify paintings. [5] designed a related algorithm to classify the paintings of Shen Zhou, Tang Yin, Zhang Daqian, and other Chinese painting artists. The algorithm first extracts wavelet features from the paintings and designs a Mixtures of Hidden Markov Models (MHMM) to classify the painters for the study. [6] proposed an algorithm for classifying Chinese oil paintings into two categories, namely, Chinese painting and brushwork, by first extracting the underlying features such as colour and texture and then using a support vector machine for classification. [7] proposed the adaptive selection of composite features and the optimisation of the description of ink painting styles. It also described the style of Chinese painting by extracting multiple underlying heterogeneous visual features and made classification predictions for Chinese painting authors. [8] proposed a colour conversion algorithm to convert photographs into Chinese ink paintings. Most of the current work on Chinese paintings has focused on content-based image analysis and retrieval (content-based image analysis), but the following problems exist
(1)
There are limitations to the adaptability of any image content features. For example, the stroke of a horse is certainly different from the stroke of a leaf [9], and it would be blinding to analyse the direction and force distribution of the stroke without considering the conditions under which each stroke is produced(2)
Existing content-based studies consider all the information in the painting, which makes the focus of the study more fragmented and susceptible to interference from noisy information [10]In response to the above problems, this paper defines the artistic objects in Chinese painting as “artistic objects,” such as flowers, birds, figures, and trees in Chinese painting, which are relatively stable units used by painters to express artistic forms and emotions and are the carriers of artistic style features in paintings. In turn, this paper proposes a framework for the interactive segmentation and identification of the main artistic objects in Chinese painting, in order to digitally quantify and analyse the artistic objects and extract the high-level semantic information that best reflects the artist’s artistic style [11].Firstly, a simple linear iterative clustering (SLIC) algorithm is proposed to segment the superpixel grid based on the degree of difference in colour and position between pixels; secondly, a maximum similarity region fusion algorithm (MSRMAO) is proposed to segment the art targets interactively, i.e., to segment the whole painting into a series of art targets, such as horses and figures, in order to extract the relatively Finally, a support vector machine based fusion algorithm is proposed to learn and recognise the extracted art targets, thus realising the analysis and recognition of artistic style of painting based on art targets.


## 2. Convolutional Neural Network-Based Classification of Writing Oil Paintings

### 2.1. DKSE Modules

The dual core compression activation (DKSE) module combines the features of the SE module and the SK module to better enhance the overall style and local detail of the extracted paintings and consists of four submodules, split, squeeze, excitation, and scale, as shown in Figure1, with the expression
(1)V=∑i=1NUi·FexFsqFgpU,Figure 1
DKSE module.whereU is the fused feature map on the DKSE module branch, Fgp− is the global average pooling (GAP) operation, Fsq− is the channel compression process, Fex− is the channel feature activation operation, N is the number of DKSE module branches, and N=2 in this paper.
(1)
Submodule Split. For an intermediate Eigenmap x∈RH′×W′×C′, a convolutional mapping uses two convolutional kernels of different sizes, i.e.,
(2)F1:X⟶U1∈RH×W×C,F2:X⟶U2∈RH×W×C,where H′, W′, and C′ denote the height, width, and number of channels of the feature map X, respectively. F1 and F2 are the mapping processes processed by convolutional kernel convolution mapping, batch normalization (BN), and ReLU excitation function, respectively. H, W, and C denote the height, width, and number of channels of the feature map after and operations, respectively. W and C denote the height, width, and number of channels of the feature map after operations F1 and F2, respectively. Convolution filters w=w1,w2,⋯,wc,⋯,wC, where wc denotes the parameters of the cth filter. The convolution mapping formula for each filter on the ith branch for the intermediate feature map X is
(3)uic′=wic×X=∑k=1c′wick×Xk+bic,uic=δuic′,i=1,⋯,N,where c′ denotes the number of channels in the filter and feature map, bic denotes bias, ℵ. denotes batch normalisation, δX′=max0,X′ is the ReLU function operation, and X′=ℵuic′,Ui=ui1,ui2,⋯,uiC.(2)
After the split operation, two new feature mapsU1 and U2 are obtained, and the feature information of the two feature maps is fused by summing the corresponding elements, i.e.
(4)U=U1+U2.The fused feature mapU combines the feature information from U1 and U2 and uses global average pooling to pool the global spatial feature nodes in each feature channel. The global average pooling compresses the feature map U space information into C channel descriptors, generating a statistic S∈RC that describes the feature channel information. The cth element of the statistic S is calculated by compressing the U space information as
(5)Sc=FgpUc=1H×W∑i=1H∑j=1WUci,j.(3)
The submodule excitation is used to enhance the style features extracted from each type of painting and to reduce the information of the less useful features, the channel dimension of the globally averaged pooled feature map is reduced to1/r of the original channel by a 1×1 convolution operation, r is the rate of decline, then after BN processing and ReLU function activation, the number of channels is increased to the original number by a 1×1 convolution operation, and finally, the normalized weights between (0, 1) are obtained through a Sigmoid gate mechanism to obtain the stylistic feature information of each type of written oil painting
(6)Z=FexS=σW2FsqS=σW2δℵW1S.(4)
The weights ofZ, obtained by squeeze and excitation operations, are the image features filtered by the primary features and suppressed by the secondary features, weighted and summed with U1 and U2, respectively
(7)Vc=u1c·Zc+u2c·Zc.


### 2.2. Convolutional Neural Network Structure

A CNN was built using the MobileNetV1 network structure, using depth-separable convolution and the DKSE module, with the first layer using null convolution to extract features from the original painting. Compared with normal convolution, the cavity convolution has a larger perceptual field than normal convolution and can maintain more internal data structure and information of the original painting. The depthwise convolution consists of a depthwise convolution and a pointwise convolution, and the DKSE module embedded in the depthwise convolution is given by(8)YX=Y1.Y2.Y3X,where Y1:RH′×W′×C′⟶RH/s×W′/s×C′ is the depth convolution operation, Y2:RH/5×W/s×C′⟶RH−×W/s×iC′ is the point-by-point convolution operation, Y3:RH′/∗×W′/s×C′⟶RH×W×C is the DKSE module operation, s denotes the depth convolution to reduce the dimensionality of the feature map, and t denotes the point-by-point convolution to process the number of channels of the feature map. Each deep and point-by-point convolution operation is followed by BN and ReLU excitation function processing.


## 2.1. DKSE Modules

The dual core compression activation (DKSE) module combines the features of the SE module and the SK module to better enhance the overall style and local detail of the extracted paintings and consists of four submodules, split, squeeze, excitation, and scale, as shown in Figure1, with the expression
(1)V=∑i=1NUi·FexFsqFgpU,Figure 1
DKSE module.whereU is the fused feature map on the DKSE module branch, Fgp− is the global average pooling (GAP) operation, Fsq− is the channel compression process, Fex− is the channel feature activation operation, N is the number of DKSE module branches, and N=2 in this paper.
(1)
Submodule Split. For an intermediate Eigenmap x∈RH′×W′×C′, a convolutional mapping uses two convolutional kernels of different sizes, i.e.,
(2)F1:X⟶U1∈RH×W×C,F2:X⟶U2∈RH×W×C,where H′, W′, and C′ denote the height, width, and number of channels of the feature map X, respectively. F1 and F2 are the mapping processes processed by convolutional kernel convolution mapping, batch normalization (BN), and ReLU excitation function, respectively. H, W, and C denote the height, width, and number of channels of the feature map after and operations, respectively. W and C denote the height, width, and number of channels of the feature map after operations F1 and F2, respectively. Convolution filters w=w1,w2,⋯,wc,⋯,wC, where wc denotes the parameters of the cth filter. The convolution mapping formula for each filter on the ith branch for the intermediate feature map X is
(3)uic′=wic×X=∑k=1c′wick×Xk+bic,uic=δuic′,i=1,⋯,N,where c′ denotes the number of channels in the filter and feature map, bic denotes bias, ℵ. denotes batch normalisation, δX′=max0,X′ is the ReLU function operation, and X′=ℵuic′,Ui=ui1,ui2,⋯,uiC.(2)
After the split operation, two new feature mapsU1 and U2 are obtained, and the feature information of the two feature maps is fused by summing the corresponding elements, i.e.
(4)U=U1+U2.The fused feature mapU combines the feature information from U1 and U2 and uses global average pooling to pool the global spatial feature nodes in each feature channel. The global average pooling compresses the feature map U space information into C channel descriptors, generating a statistic S∈RC that describes the feature channel information. The cth element of the statistic S is calculated by compressing the U space information as
(5)Sc=FgpUc=1H×W∑i=1H∑j=1WUci,j.(3)
The submodule excitation is used to enhance the style features extracted from each type of painting and to reduce the information of the less useful features, the channel dimension of the globally averaged pooled feature map is reduced to1/r of the original channel by a 1×1 convolution operation, r is the rate of decline, then after BN processing and ReLU function activation, the number of channels is increased to the original number by a 1×1 convolution operation, and finally, the normalized weights between (0, 1) are obtained through a Sigmoid gate mechanism to obtain the stylistic feature information of each type of written oil painting
(6)Z=FexS=σW2FsqS=σW2δℵW1S.(4)
The weights ofZ, obtained by squeeze and excitation operations, are the image features filtered by the primary features and suppressed by the secondary features, weighted and summed with U1 and U2, respectively
(7)Vc=u1c·Zc+u2c·Zc.


## 2.2. Convolutional Neural Network Structure

A CNN was built using the MobileNetV1 network structure, using depth-separable convolution and the DKSE module, with the first layer using null convolution to extract features from the original painting. Compared with normal convolution, the cavity convolution has a larger perceptual field than normal convolution and can maintain more internal data structure and information of the original painting. The depthwise convolution consists of a depthwise convolution and a pointwise convolution, and the DKSE module embedded in the depthwise convolution is given by(8)YX=Y1.Y2.Y3X,where Y1:RH′×W′×C′⟶RH/s×W′/s×C′ is the depth convolution operation, Y2:RH/5×W/s×C′⟶RH−×W/s×iC′ is the point-by-point convolution operation, Y3:RH′/∗×W′/s×C′⟶RH×W×C is the DKSE module operation, s denotes the depth convolution to reduce the dimensionality of the feature map, and t denotes the point-by-point convolution to process the number of channels of the feature map. Each deep and point-by-point convolution operation is followed by BN and ReLU excitation function processing.


## 3. Experimental Results

The content and style representations can be well separated in the convolutional neural network used in this paper’s algorithm, so that the two representations can be processed independently to produce new perceptually meaningful images [12]. The following is an image of the effect of the oil painting implemented according to the coding, where we combine different representations of the image content with multiple stylistic representations of the oil painting artwork. The effect of combining different images with various oil paintings is shown in Figure 2.Figure 2
Synthesis of images of different contents with stylised sand drawings.An influential factor in image stylisation is the ratio of content to style, i.e.,α/β. Figure 3 shows a composite image of the content image (d) in Figure 4 stylised by choosing 1×10−2, 1×10−4, and 1×10−6 sand drawings, respectively, for α/β. The ratio of content to style αβ decreases sequentially from the three images in Figure 3, i.e., but the content shown is not easily identifiable. A compromise approach is usually used to adjust the ratio between content and style to create a visually more pleasing image.Figure 3
Effect of matching different content feature layers.Figure 4
Graph of the effect of different ratios ofα to β.Another influential factor in image stylisation is the choice of convolutional feature layers. As stated above, style representations are multiscale representations containing multiple layers of neural networks, and the number and location of these layers determine the local scale of style matching, resulting in different visual experiences. Matching style representations to higher layers in the network can keep the local image structure at an increasing scale, leading to a smoother and more sustained visual experience [13]. As a result, stylised images typically match style representations to the highest layer in the network. To analyse the effect of using different layers to match content features, we set the other parameters to the same number (1×10−4) to style the images for transfer, as shown in Figure 3. When matching content on the lower layers of the network, the algorithm matches most of the detailed pixel information in the photo, and the resulting sand painting image looks and feels like a mixture of textures from the artwork on the picture (e.g., Conv1_2); in Figure 4(b) which is Conv3_2, when matching content features on the higher layers of the network, the detailed pixel information of the photo is not so strongly constrained, and the content of the building and with the sand painting textures are blended together (e.g., Conv5_2), and the fine structure of the image such as edges and colours change considerably, accentuating the stylistic features even more.In recent years, there have been two commonly used methods for generating superpixels: algorithms based on graph theory and algorithms based on gradient ascent. The former is a constructed energy function minimisation problem, where the image is constructed as a weighted undirected graph, where the pixel points in the image correspond to graph nodes, the adjacency of two pixels represents an edge of the graph, and the weight of an edge is the degree of difference between neighbouring pixels. The graph is partitioned in such a way that the local similarity of the partitioned subgraphs is maximised, thus generating a super image. Algorithms such as SuperLattice [14], EGS [15], and Ncut [16] are included. The basic idea of the latter is to start from the initial seed points and cluster the pixels using certain criteria at each iteration until a stable state is reached, thus generating super pixels, including MeanShift [17], TurboPixel [18], and SLIC [19, 20] (simple linear iterative clustering). As shown in Figure 5, this algorithm uses a greedy strategy to segment the image using horizontal and vertical paths at a time at the minimum of the boundary cost map to obtain superpixels. This method maintains a regular image topology and produces a regular grid of superpixels with good segmentation accuracy and stability, while the number of superpixels can be artificially specified. However, the superiority of the superpixels produced by this method is highly dependent on the quality of the boundary map of the image [21–23].Figure 5
Different classification effects.As shown in Figure6, the algorithm in this paper is a parameter-free iterative algorithm that converges the centroid to the point of maximum density by means of a probability density function. The method produces regular shaped superpixels that maintain good performance in terms of stability and resilience. However, the method is not fast, has no control over the number of superpixels, and suffers from oversegmentation problems. The level-set method for geometric flow starts by selecting an initial seed point and expands the area of the seed point through a curvature evolution model and a skeletonisation process to obtain grid-like superpixels. The algorithm’s runtime is positively correlated with the image size, it can artificially specify the number of generated superpixels, the superpixels are regular in shape and retain the contour structure of the image, and it improves the undersegmentation problem. However, the shape of the generated superpixels is not controllable and does not allow for fast and high quality image segmentation for large resolution images [24].Figure 6
Clustering effect of different schemes.In summary, for the art target segmentation problem in this paper, we need to construct a regular superpixel grid; SLIC algorithm and MeanShift and TurboPixel can generate regular superpixels, while the quality of SuperLattice segmentation is influenced by the input boundary map, and MeanShift cannot control the number of generated superpixels.


## 4. Conclusions

In this paper, the DKSE module is constructed based on the structural features of SKNet, which extracts the whole image and detail features, and the features of SENet to enhance the channel features. The DKSE module can effectively improve model classification. The DKSE module can effectively improve the classification performance of the model, fully extract the overall and local detail features of the oil painting image, and provide better classification accuracy than the traditional network model.



---

*Source: 6825863-2022-06-09.xml*