# Research on Colour Matching in Art Design Based on Neural Network Mathematics Models

Authors: Xuanhan Zhang
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Colour, an art term, is an important formal element that can influence our changing feelings, and colour matching has a very important place in art. Colour is an important artistic language in the study of art, and colour is also a more attractive representation of our real world. In this paper, we fine-tune an existing mathematics model to analyze the effect of hue, luminance, saturation, and contrast on the emotion classification of art paintings and achieve an accuracy improvement of 3.4% over the current state of the art on the public dataset Twitter image dataset. Finally, we propose a pretraining strategy for a related task that significantly improves the sentiment classification task of paintings and analyze the experimental results through visual structures.


---

## Body

## 1. Introduction

For example, in prehistoric societies, our common ancestors learned to paint simple murals in caves, which were a record of our ancestors’ daily lives and spiritual beliefs [1]. These murals, therefore, allow us to study our ancestors’ behavior, daily life, and spirituality to a certain extent, and they also reflect the ability of humans to record their lives and express their emotions through painting, already in primitive societies [2].The colour red symbolizes the festive atmosphere, but some people can also associate it with blood, which makes people feel fearful and uneasy; also, when some people see yellow, they can associate it with autumn, the golden waves of wheat, and the harvest season, which makes people feel incomparably comfortable and peaceful, but some people can associate it with the dying of everything and the slaughter atmosphere, which makes people feel infinite melancholy and desolate; then, there is black, which some people think is serious and solemn, as well as mysterious and pure, making people feel a solemn atmosphere, while some people think of black as the embodiment of evil and darkness [3].Therefore, due to the differences in people’s experiences and states of mind, colours have different effects on people’s psychological feelings and associations with their thoughts. The impact of colour on people’s psychological states and behaviour is thus significant. Psychological research has shown that people with a stable emotional state are less affected by colour, while people with a less stable emotional state, such as those who are emotionally aroused or depressed, are more influenced by colour. After tens of thousands of years of evolution, many branches of human beings have emerged, and in our present society, different ethnic groups have different perceptions of colour and preferences for colour; for example, Chinese prefer red, which symbolizes redness, while the Irish prefer fresh green. It is therefore helpful to understand the perceptions and preferences of different people [4].With the development of the Internet era, multimedia social networks are also widely used by more and more people, such as Facebook, Flickr, Twitter, and Sina Weibo. More and more people are used to recording their daily lives and sharing them through social media, including text, audio, images, and videos. On the one hand, text-based sentiment analysis [5] and audio-based sentiment analysis [6] are advanced, but image-based sentiment analysis [7] and video-based sentiment analysis [8] have not yet attracted the attention of most researchers. On the other hand, the development of image sentiment computing cannot be achieved without the support of psychology, art, computer vision, pattern recognition, artificial intelligence, and other fields. On the other hand, the development of image emotion computing cannot be achieved without the joint support of psychology, art, computer vision, pattern recognition, artificial intelligence, and other fields, and the challenges brought by cross-disciplinary approaches also make image emotion analysis very challenging; furthermore, there is a lack of systematic emotion semantic research on paintings and artworks. It is in response to this growing need for image emotion computation that this paper analyses and discusses the artistic emotions of paintings, based on a dataset of prints, paintings, recovers, watercolors, and gouaches.


## 2. Related Work

Although image- and video-based sentiment analysis is relatively rare compared to text and audio-based sentiment analysis, it has attracted the attention of some researchers. The study in [9] proposed a colour image sentiment classification method based on fuzzy similarity, using colour as the main feature. The study in [10] proposed a mid-level feature that includes the level of detail, dynamism, low depth of field, and trichromacy composition of an image as its emotion classification. The study in [11] used emotion histogram features around each point of interest and emotion-packed features to classify images. Other researchers have combined artistic element features with image emotion analysis. The study in [12] constructing six artistic element-based features for image emotion classification: symmetry, emphasis, harmony, hierarchy, motion, rhythm, and proportion. With the rapid development of computing power in computer hardware, deep learning has been widely used in various fields and its learned features are highly representable, and some researchers have made good progress in using deep learning for image emotion computation, avoiding the artificial extraction of features. In [13], binary classifications of image sentiment were performed. The study in [14] classified image emotions into eight categories: amusement, anger, awe, satisfaction, disgust, irritation, fear, and sadness. However, in general, there is a lack of systematic semantic research on emotion in paintings and artworks.In recent years, deep learning methods based on convolutional neural networks have achieved significant success in many areas and are widely used in various fields. In the field of computer vision, the effect is immediate compared to manual feature extraction, such as classification problems [15], object detection [16], and semantic segmentation of images [17]. This eliminates the limitations of manually extracted features, especially since image data containing multidimensional information can be directly input to the network, which also effectively avoids the complexity of feature extraction during learning and data reconstruction during classification. In addition, neurons on the same mapping surface of the same feature layer have the same weight value.In this paper, we use a convolutional neural network as an experimental model to analyze and discuss the artistic emotions of paintings. In line with the sentiment classification of [18], this paper classifies art images into positive and negative emotions and uses a migration learning strategy of fine-tuning to solve the problem of overfitting when the dataset is not large enough.In order to make the model have better generalization ability, appropriate dataset expansion is often used to enhance the learning ability of the model [19]. In this paper, we analyze several common dataset expansion methods to improve the network performance in image emotion problems, including cropping, flipping, and image hue, brightness, saturation, and contrast and then select a reasonable combination for oversampling and apply it to the experiments in this paper to avoid blindly modifying the data arbitrarily by intuition. To validate the performance of this model, we compared it to the current state-of-the-art method [20] on the public dataset Twitter image dataset and achieved a 3.4% performance improvement.


## 3. Methods and Experiments

### 3.1. Fine-Tuning MXNet Models for Colour Design

As one of the major contributors to unlocking the value of data, convolutional neural network models can only be trained with data, and fine-tuning is a strategy that not only solves the problem of not having a large dataset but also reduces the training time of neural networks and largely solves the problem of overfitting when the dataset is small. Fine-tuning not only makes it possible to use deep learning on small datasets but also often achieves good results [21]. On the one hand, unlike ordinary images, ethnic paintings, as a branch of art painting, are inherently limited in number; on the other hand, the annotation of images requires a certain level of artistic skills in order to understand and interpret the emotions of the images more precisely, making the process of collecting data extremely difficult. Therefore, with the limited amount of data, we use a pretrained convolutional neural network, VGG16 [22] as the experimental model to classify the sentiment of ethnic minority art paintings.The experiments were conducted using the deep learning framework MXNet, using the pretrained model VGG16 from ILSVRC2012 as the basic structure, removing the last fully connected layer containing 1000 neurons from the original network and adding a fully connected layer containing 2 neurons as the result of sentiment prediction, so as to adapt the binary classification task of image sentiment.


### 3.2. Oversampling to Improve Model Generalisation

In order to make full use of the collected data to train the convolutional neural network model and to make the model more robust, the original image is modified to expand the dataset to train the model. In the literature [23], a method is proposed to expand the dataset to enhance the generalisation ability of the network after learning, such as flipping or cropping. To verify the impact of this approach on the performance of the model for the ethnic painting image task, we trained the convolutional neural network with several common expanded datasets, including image cropping and flipping, as well as image hue, brightness, saturation, and contrast. In general, cropping and flipping make the objects of interest appear in different locations, thus making the model less dependent on the location of the objects and adjusting factors such as colour to reduce the sensitivity of the model to colour. The crop option makes a random crop that retains at least 70% of the original image, while the height and width are scaled to [0.75, 1.25].Flipping is done by flipping each image left and right with a probability of 0.5, not up and down, because we are not generally interested in upside-down images in real life, let alone trying to understand the emotional aspects of upside-down images. On the four dimensions of hue, brightness, saturation, and contrast of the painting, each dimension was randomly incremented by −50% to 50%, as shown in Figure1. The dataset of ethnic art paintings was expanded in each of the above ways, the fine-tuned MX Net model was retained, and the combination of the ways that improved the performance of the model was selected to analyze the specific improvement of the model performance by the effective ways of data expansion.Figure 1
Example of the oversampling method.Finally, the validity of this model was verified by experimenting and analyzing it on a publicly available dataset, the Twitter image dataset. In order to analyze the differences between different data expansion methods for the sentiment classification of art paintings and the sentiment classification of ordinary images, similar experiments and analyses were conducted on the ordinary image sentiment classification task with the above six different data expansion methods and effective combinations.


### 3.3. Pretraining Strategies for Relevant Tasks

Although fine-tuning is a very effective method of migration learning, without restarting training and generally with fast convergence, it is often necessary to retain the parameters of the other layers when internalizing the weights and biases of the fine-tuned model, except for the last layer which is replaced by a different visual task, and thus, it may cause the convolutional neural network to bring in some of the learned experience that is not relevant to the task, As a result, the convolutional neural network may bring in some of the experiences learned that are not relevant to the task and eventually interfere with the model’s performance. This paper deals with the problem of colour design for ethnic minority art paintings, which is more challenging than ordinary photographs. Firstly, art-style pictures are often more abstract and the viewer needs to have a certain background to accurately control them, resulting in a high degree of ambiguity in the data labels. Secondly, ethnic style paintings have more complex emotions and more specific descriptions than ordinary images, thus posing higher demands on CNN, which makes the task of colour design for art paintings more challenging [24].We try to mimic human learning behaviour, where the difficulty of learning knowledge should be from simple to complex and from shallow to deep. Therefore, we propose a new pretraining strategy for related tasks, which allows the model to be adapted to relatively easier but related tasks before being used for the more challenging recognition problems to be tackled. We pretrain the trained MXNet on a relatively easy-to-learn image sentiment classification problem and then apply the model to the sentiment classification problem of ethnic paintings, in order to simulate the human learning process from shallow to deep and to avoid excessive interference from existing learning experience. Because ILSVRC2012 is a large dataset, a network trained on it will inevitably retain a large number of features associated with it, which will have an impact on new computer vision tasks, such as the category of lizards in ILSVRC2012, which range from very beautiful and colourful lizards to pockmarked and vomit-inducing lizards, for both image colour design tasks. There are clearly different answers to the image colour design task and the classification problem on ILSVRC2012.Figure2 shows the specific framework of the pretraining strategy for the task in question. The pretrained VGG16 is first fine-tuned by replacing the last layer of the network with a fully connected layer of only two neurons, allowing the model to be trained on the Twitter image dataset to learn features that are more useful for the image sentiment classification problem while reducing the interference of existing learning experience on the classification results. This model is then used for the colour design task of painting.Figure 2
VGG16 model with the pretraining strategy for the relevant task.


### 3.4. Visualisation of Predictive Tasks

In order to visualize the learning of the model, we change the structure of the fine-tuned MXNet model in order to visualize the learning of the model and provide a more intuitive interpretation of the experimental results. The idea of replacing the fully connected layer with a convolutional layer, as proposed in the literature [25], not only improves computational efficiency but also has a wider practical application because in both types of layers, the neurons perform the same functional form of dot product operation and the only difference between the two is that the neurons in the convolutional layer are only connected to a local region of the input data and the neurons share parameters, so the transformation between the two is possible. In this way, the first 13 convolutional layers are retained, and Flatten and the fully connected network after the process are replaced by three convolutional layers: Conv14 with 4096 channels and 7 × 7 kernels; Conv15 with 4096 channels and 1 × 1 kernels; and Conv16 with 2 channels and 1 × 1 kernels. The dropout with 0.5 probability is kept constant between the convolutional layers, and a nonlinear function ReLU (rectiﬁed linear unit) is used as the activation function, while the loss function is a Softmax cross-entropy loss. Finally, simply adjusting the input of the network to 448 × 448 results in a prediction block of size 8 × 8, whose prediction value reflects the network’s prediction of its result, which is scaled up to the original image size using neighborhood interpolation to represent the sentiment prediction for image regionalization as shown in Figure 3.Figure 3
The last three fully connected layers of the network are replaced by three convolutional layers: Conv14 with 4096 channels, convolutional kernel 7 × 7; Conv15 with 4096 channels, convolutional kernel 1 × 1; Conv16 with 2 channels, convolutional kernel 1 × 1. The two channels of the last convolutional layer are used for the prediction of two types of sentiment.


## 3.1. Fine-Tuning MXNet Models for Colour Design

As one of the major contributors to unlocking the value of data, convolutional neural network models can only be trained with data, and fine-tuning is a strategy that not only solves the problem of not having a large dataset but also reduces the training time of neural networks and largely solves the problem of overfitting when the dataset is small. Fine-tuning not only makes it possible to use deep learning on small datasets but also often achieves good results [21]. On the one hand, unlike ordinary images, ethnic paintings, as a branch of art painting, are inherently limited in number; on the other hand, the annotation of images requires a certain level of artistic skills in order to understand and interpret the emotions of the images more precisely, making the process of collecting data extremely difficult. Therefore, with the limited amount of data, we use a pretrained convolutional neural network, VGG16 [22] as the experimental model to classify the sentiment of ethnic minority art paintings.The experiments were conducted using the deep learning framework MXNet, using the pretrained model VGG16 from ILSVRC2012 as the basic structure, removing the last fully connected layer containing 1000 neurons from the original network and adding a fully connected layer containing 2 neurons as the result of sentiment prediction, so as to adapt the binary classification task of image sentiment.


## 3.2. Oversampling to Improve Model Generalisation

In order to make full use of the collected data to train the convolutional neural network model and to make the model more robust, the original image is modified to expand the dataset to train the model. In the literature [23], a method is proposed to expand the dataset to enhance the generalisation ability of the network after learning, such as flipping or cropping. To verify the impact of this approach on the performance of the model for the ethnic painting image task, we trained the convolutional neural network with several common expanded datasets, including image cropping and flipping, as well as image hue, brightness, saturation, and contrast. In general, cropping and flipping make the objects of interest appear in different locations, thus making the model less dependent on the location of the objects and adjusting factors such as colour to reduce the sensitivity of the model to colour. The crop option makes a random crop that retains at least 70% of the original image, while the height and width are scaled to [0.75, 1.25].Flipping is done by flipping each image left and right with a probability of 0.5, not up and down, because we are not generally interested in upside-down images in real life, let alone trying to understand the emotional aspects of upside-down images. On the four dimensions of hue, brightness, saturation, and contrast of the painting, each dimension was randomly incremented by −50% to 50%, as shown in Figure1. The dataset of ethnic art paintings was expanded in each of the above ways, the fine-tuned MX Net model was retained, and the combination of the ways that improved the performance of the model was selected to analyze the specific improvement of the model performance by the effective ways of data expansion.Figure 1
Example of the oversampling method.Finally, the validity of this model was verified by experimenting and analyzing it on a publicly available dataset, the Twitter image dataset. In order to analyze the differences between different data expansion methods for the sentiment classification of art paintings and the sentiment classification of ordinary images, similar experiments and analyses were conducted on the ordinary image sentiment classification task with the above six different data expansion methods and effective combinations.


## 3.3. Pretraining Strategies for Relevant Tasks

Although fine-tuning is a very effective method of migration learning, without restarting training and generally with fast convergence, it is often necessary to retain the parameters of the other layers when internalizing the weights and biases of the fine-tuned model, except for the last layer which is replaced by a different visual task, and thus, it may cause the convolutional neural network to bring in some of the learned experience that is not relevant to the task, As a result, the convolutional neural network may bring in some of the experiences learned that are not relevant to the task and eventually interfere with the model’s performance. This paper deals with the problem of colour design for ethnic minority art paintings, which is more challenging than ordinary photographs. Firstly, art-style pictures are often more abstract and the viewer needs to have a certain background to accurately control them, resulting in a high degree of ambiguity in the data labels. Secondly, ethnic style paintings have more complex emotions and more specific descriptions than ordinary images, thus posing higher demands on CNN, which makes the task of colour design for art paintings more challenging [24].We try to mimic human learning behaviour, where the difficulty of learning knowledge should be from simple to complex and from shallow to deep. Therefore, we propose a new pretraining strategy for related tasks, which allows the model to be adapted to relatively easier but related tasks before being used for the more challenging recognition problems to be tackled. We pretrain the trained MXNet on a relatively easy-to-learn image sentiment classification problem and then apply the model to the sentiment classification problem of ethnic paintings, in order to simulate the human learning process from shallow to deep and to avoid excessive interference from existing learning experience. Because ILSVRC2012 is a large dataset, a network trained on it will inevitably retain a large number of features associated with it, which will have an impact on new computer vision tasks, such as the category of lizards in ILSVRC2012, which range from very beautiful and colourful lizards to pockmarked and vomit-inducing lizards, for both image colour design tasks. There are clearly different answers to the image colour design task and the classification problem on ILSVRC2012.Figure2 shows the specific framework of the pretraining strategy for the task in question. The pretrained VGG16 is first fine-tuned by replacing the last layer of the network with a fully connected layer of only two neurons, allowing the model to be trained on the Twitter image dataset to learn features that are more useful for the image sentiment classification problem while reducing the interference of existing learning experience on the classification results. This model is then used for the colour design task of painting.Figure 2
VGG16 model with the pretraining strategy for the relevant task.


## 3.4. Visualisation of Predictive Tasks

In order to visualize the learning of the model, we change the structure of the fine-tuned MXNet model in order to visualize the learning of the model and provide a more intuitive interpretation of the experimental results. The idea of replacing the fully connected layer with a convolutional layer, as proposed in the literature [25], not only improves computational efficiency but also has a wider practical application because in both types of layers, the neurons perform the same functional form of dot product operation and the only difference between the two is that the neurons in the convolutional layer are only connected to a local region of the input data and the neurons share parameters, so the transformation between the two is possible. In this way, the first 13 convolutional layers are retained, and Flatten and the fully connected network after the process are replaced by three convolutional layers: Conv14 with 4096 channels and 7 × 7 kernels; Conv15 with 4096 channels and 1 × 1 kernels; and Conv16 with 2 channels and 1 × 1 kernels. The dropout with 0.5 probability is kept constant between the convolutional layers, and a nonlinear function ReLU (rectiﬁed linear unit) is used as the activation function, while the loss function is a Softmax cross-entropy loss. Finally, simply adjusting the input of the network to 448 × 448 results in a prediction block of size 8 × 8, whose prediction value reflects the network’s prediction of its result, which is scaled up to the original image size using neighborhood interpolation to represent the sentiment prediction for image regionalization as shown in Figure 3.Figure 3
The last three fully connected layers of the network are replaced by three convolutional layers: Conv14 with 4096 channels, convolutional kernel 7 × 7; Conv15 with 4096 channels, convolutional kernel 1 × 1; Conv16 with 2 channels, convolutional kernel 1 × 1. The two channels of the last convolutional layer are used for the prediction of two types of sentiment.


## 4. Experimental Results and Analysis

In this section, the experimental descriptions in the previous section are implemented and the results are analysed and discussed. For ease of observation, the optimal results are highlighted in bold in the table.


### 4.1. Fine-Tuning the Performance of the Model on the Painting Dataset

In this paper, the dataset is obtained by scanning the paintings in the experimental environment and the tagging system selects different categories of taggers for each person according to their age, education, gender, and artistic ability. The image sentiment with the highest probability is selected. In the end, 1566 ethnic art paintings were collected, including heavy colour paintings, prints, oil paintings, and watercolours and gouaches, including 1149 positive and 417 negative emotions. An example of a painting image dataset is shown in Figure4.Figure 4
Example of a painting image dataset.MXNet was used as the experimental framework for this paper, and the pretrained model VGG16 on ILSVRC2012 was fine-tuned to suit the binary classification task of ethnic painting sentiment, replacing the original fully connected layer of 1000 neurons with a fully connected layer of 2 neurons to represent the output of positive and negative sentiment. All parameters except the last layer were initialized to those pretrained on ILSVRC2012, and the parameters of the replaced last layer were initialized using a delayed MXNet framework, with weights initialized to a uniform distribution of [−0.07, 0.07] and biases initialized to 0. The initial learning rate was set to 0.001, with a reduction of 10 times. To fully utilize the dataset, a 5-fold cross-validation was used to divide the dataset into a training set and a validation set, and the model was trained using stochastic gradient descent, with the mean value after 5 experiments as the final result (Table1, row 2).Table 1
Performance of the fine-tuned model VGG on the ethnic painting dataset.
ModelThe ethnic painting image datasetFine-tuning VGG16 (without oversampling)0.701 + 0.02Fine-tuning VGG16 (with oversampling)0.723 + 0.013


### 4.2. Effect of the Oversampling Method on Model Performance

This section compares the impact of expanding the dataset by cropping, flipping, and changing the hue, brightness, saturation, and contrast of the images on the performance of the model in the image sentiment classification task. To improve the generalization ability of the model, the dataset was changed in different ways as described in [26] and the changed data were fed back to the network to increase the learning ability of the model, which was oversampled as described in Section 3.2.Table2 shows that the combination of crop + flip, luminance, and saturation can effectively improve the performance of the convolutional neural network model, not only in terms of accuracy but also in terms of standard deviation. Changing the luminance is the most obvious way to improve the performance of the network, while changing the hue and contrast has a negative effect on the performance of the model, which is in line with our perception. Changing the hue means changing the colour, which is often an intuitive psychological cue; e.g., red represents enthusiasm, happiness, and excitement, while its neighbour, purple, represents magic and weirdness. This is in line with the findings of [27], where increasing or decreasing the contrast of an image affects the model’s attention. Finally, we used a combination of crop + flip to fine-tune MXNet by oversampling with a maximum of 50% increase or decrease in brightness and saturation, and the results are shown in the last row of Table 3. To verify that the model follows this principle for the sentiment classification task of ordinary images, we experimented on the public dataset, the Twitter image dataset. The dataset consists of ordinary images, annotated by five people on the Amazon human annotation platform, with three datasets of 3-agree, 4-agree, and 5-agree images, containing 1269, 1115, and 882 images, respectively. In the image tagging process, for an image to be tagged, if 3 out of 5 people give the same tag, the image will be collected in 3-agree, if 4 out of 5 people give the same tag, the image will be collected in 3-agree and 4-agree, and if 5 people give the same tag, the image will be collected in 3-agree, 4-agree, and 5-agree at the same time. To ensure the accuracy of the data labeling, we conducted experiments on the 5-agree dataset only, using the crop + flip oversampling method as the baseline, based on which the brightness, hue, saturation, and contrast of the original image were randomly increased or decreased by 0∼50%.Table 2
Performance of several oversampling methods on the ethnic painting dataset.
Oversampling modeThe ethnic painting image datasetBaseline0.712 + 0.02Gutting + flipping0.709 + 0.014Brightness0.714 + 0.029Hue0.701 + 0.037Saturation0.711 + 0.011Contrast0.693 + 0.041Table 3
Performance of several oversampling methods on the Twitter image dataset.
Oversampling mode5-agreeBaseline0.865 + 0.02Brightness0.874 + 0.013Hue0.848 + 0.031Saturation0.867 + 0.017Contrast0.87 + 0.025It was found that, apart from changing the hue of the image, all the other ways of expanding the data improved the performance of the model for the image colour design task, while the brightness remained the most effective way as in the case of painting colour design, and changing the saturation of the image did not improve the performance of the model significantly for the ordinary image colour design task [28]. This demonstrates that the sentiment classification task for painted images is similar to that for ordinary images but does not replicate the same training strategy as the ordinary image classification problem [29]. In order to verify the effectiveness of this method of expanding the dataset, the original image was cropped and flipped and the brightness, saturation, and contrast of the original image were changed and tested on a Twitter image dataset, both of which were divided into a training set and a test set using a 5-fold cross-validation method and compared with the results of the current state-of-the-art methods [13, 14]. The experimental results are shown in Table 4.Table 4
Average classification performance and standard deviation on the Twitter image dataset.
Model3-agree4-agree5-agreeBaseline CNN from [13]0.6870.7140.783Paper [14] (without oversampling)——0.839± 0.029Paper [14] (with oversampling)——0.844± 0.026Ours (without oversampling)0.762 + 0.0320.814 + 0.0280.858 + 0.029Ours (with oversampling)0.784 + 0.0210.834 + 0.0170.878 + 0.013The data in Table4 show that the model outperforms the previous two levels, and when effective oversampling is applied, the model is further improved on the image sentiment classification task, achieving 3.4% improvement over the current state-of-the-art method. Longitudinally, the standard deviation of the model decreases further for both weakly labelled data on the 3-agree and strongly labelled data on the 5-agree, indicating that the stability of the model is further improved, and this pattern is also observed for the painting art image dataset. The experimental results show that although some oversampling approaches have proven to be very effective in many convolutional neural network models, different oversampling strategies are needed for different computer vision tasks [30].


### 4.3. Analysis of the Results of Pretraining Strategies for Relevant Tasks

In order to keep the pretrained convolutional neural network model from bringing too much learning experience into solving new complex problems, we first trained the fine-tuned MXNet model on a Twitter image dataset, and after the previous analysis, instead of dividing the dataset in a 5-fold cross-validation manner, we used the entire dataset as the training dataset, replacing the last layer of the network with a fully connected layer containing only two neurons. For the final comparison of the experimental results, two sets of experiments were conducted, with the first set expanding the dataset without oversampling and the second set expanding the dataset for oversampling by cropping, flipping, and changing the image brightness, saturation, and contrast in increments of up to 50%, in line with the optimal model in Section4.2. The model was trained using stochastic gradient descent, introducing the momentum method, internalizing the momentum parameter to 0.9, and setting the initial learning rate to 0.01, which changed to 0.1 every 10 times for a total of 50 training rounds. The model was then applied to the ethnic painting colour design task, using 5-fold cross-validation to divide the ethnic painting dataset into a training set and a test set, with no data expansion for group 1 and an oversampling of the dataset by cropping, flipping, and changing the brightness and saturation of the images in increments of up to 50% for group 2. The parameters of both experiments were kept constant; the batch size was set to 64, the model was trained using stochastic gradient descent, the momentum parameter was initialized to 0.9, the initial learning rate was set to 0.01 and it was changed to 0.1 every 15 times, and the mean value of the 5-fold cross-validation result was used as the result of the current experiment. The mean value of the 5-fold cross-validation results was taken as the final result of the model, and the results are shown in Table 5.Table 5
Results of pretraining strategies for relevant tasks.
ModelWithout oversamplingWith oversamplingFine-tuning MXNet0.701 + 0.020.723 + 0.013PS CNN0.736 + 0.0170.753 + 0.013The experimental data show that this strategy improves the performance of the model more than expanding the dataset to train the model by oversampling. It is worth noting that this strategy works well in combination with oversampling to improve the performance of convolutional neural networks on specific tasks, and the size of the standard deviation shows that the improvement is more stable for image sentiment classification tasks.


### 4.4. Visualisation Analysis

Using a trained VGG16-based FCN, we set the input to a 448 × 448 image, and after passing it through the network, we obtained an 8 × 8 prediction block, where the number of channels in the output represents the positive and negative sentiment prediction results. The prediction result on the interval [0, 1] was mapped to the interval [0, 255], and the negative sentiment prediction was assigned to the R channel in RGB, the positive sentiment prediction was assigned to the G channel in RGB, and the B channel was initialized to 0. This block was then interpolated to the same size as the original image using proximity interpolation, and the original image and the prediction result were fused with equal weights. Some of the results are shown in Figure5.Figure 5
Selected results using VGG16-based FCN, row 1 is the original plot, row 2 is the generated prediction plot, and finally the true labels green represents positive prediction results and red represents negative prediction results. The stronger the colour, the higher the prediction probability of the network.


## 4.1. Fine-Tuning the Performance of the Model on the Painting Dataset

In this paper, the dataset is obtained by scanning the paintings in the experimental environment and the tagging system selects different categories of taggers for each person according to their age, education, gender, and artistic ability. The image sentiment with the highest probability is selected. In the end, 1566 ethnic art paintings were collected, including heavy colour paintings, prints, oil paintings, and watercolours and gouaches, including 1149 positive and 417 negative emotions. An example of a painting image dataset is shown in Figure4.Figure 4
Example of a painting image dataset.MXNet was used as the experimental framework for this paper, and the pretrained model VGG16 on ILSVRC2012 was fine-tuned to suit the binary classification task of ethnic painting sentiment, replacing the original fully connected layer of 1000 neurons with a fully connected layer of 2 neurons to represent the output of positive and negative sentiment. All parameters except the last layer were initialized to those pretrained on ILSVRC2012, and the parameters of the replaced last layer were initialized using a delayed MXNet framework, with weights initialized to a uniform distribution of [−0.07, 0.07] and biases initialized to 0. The initial learning rate was set to 0.001, with a reduction of 10 times. To fully utilize the dataset, a 5-fold cross-validation was used to divide the dataset into a training set and a validation set, and the model was trained using stochastic gradient descent, with the mean value after 5 experiments as the final result (Table1, row 2).Table 1
Performance of the fine-tuned model VGG on the ethnic painting dataset.
ModelThe ethnic painting image datasetFine-tuning VGG16 (without oversampling)0.701 + 0.02Fine-tuning VGG16 (with oversampling)0.723 + 0.013


## 4.2. Effect of the Oversampling Method on Model Performance

This section compares the impact of expanding the dataset by cropping, flipping, and changing the hue, brightness, saturation, and contrast of the images on the performance of the model in the image sentiment classification task. To improve the generalization ability of the model, the dataset was changed in different ways as described in [26] and the changed data were fed back to the network to increase the learning ability of the model, which was oversampled as described in Section 3.2.Table2 shows that the combination of crop + flip, luminance, and saturation can effectively improve the performance of the convolutional neural network model, not only in terms of accuracy but also in terms of standard deviation. Changing the luminance is the most obvious way to improve the performance of the network, while changing the hue and contrast has a negative effect on the performance of the model, which is in line with our perception. Changing the hue means changing the colour, which is often an intuitive psychological cue; e.g., red represents enthusiasm, happiness, and excitement, while its neighbour, purple, represents magic and weirdness. This is in line with the findings of [27], where increasing or decreasing the contrast of an image affects the model’s attention. Finally, we used a combination of crop + flip to fine-tune MXNet by oversampling with a maximum of 50% increase or decrease in brightness and saturation, and the results are shown in the last row of Table 3. To verify that the model follows this principle for the sentiment classification task of ordinary images, we experimented on the public dataset, the Twitter image dataset. The dataset consists of ordinary images, annotated by five people on the Amazon human annotation platform, with three datasets of 3-agree, 4-agree, and 5-agree images, containing 1269, 1115, and 882 images, respectively. In the image tagging process, for an image to be tagged, if 3 out of 5 people give the same tag, the image will be collected in 3-agree, if 4 out of 5 people give the same tag, the image will be collected in 3-agree and 4-agree, and if 5 people give the same tag, the image will be collected in 3-agree, 4-agree, and 5-agree at the same time. To ensure the accuracy of the data labeling, we conducted experiments on the 5-agree dataset only, using the crop + flip oversampling method as the baseline, based on which the brightness, hue, saturation, and contrast of the original image were randomly increased or decreased by 0∼50%.Table 2
Performance of several oversampling methods on the ethnic painting dataset.
Oversampling modeThe ethnic painting image datasetBaseline0.712 + 0.02Gutting + flipping0.709 + 0.014Brightness0.714 + 0.029Hue0.701 + 0.037Saturation0.711 + 0.011Contrast0.693 + 0.041Table 3
Performance of several oversampling methods on the Twitter image dataset.
Oversampling mode5-agreeBaseline0.865 + 0.02Brightness0.874 + 0.013Hue0.848 + 0.031Saturation0.867 + 0.017Contrast0.87 + 0.025It was found that, apart from changing the hue of the image, all the other ways of expanding the data improved the performance of the model for the image colour design task, while the brightness remained the most effective way as in the case of painting colour design, and changing the saturation of the image did not improve the performance of the model significantly for the ordinary image colour design task [28]. This demonstrates that the sentiment classification task for painted images is similar to that for ordinary images but does not replicate the same training strategy as the ordinary image classification problem [29]. In order to verify the effectiveness of this method of expanding the dataset, the original image was cropped and flipped and the brightness, saturation, and contrast of the original image were changed and tested on a Twitter image dataset, both of which were divided into a training set and a test set using a 5-fold cross-validation method and compared with the results of the current state-of-the-art methods [13, 14]. The experimental results are shown in Table 4.Table 4
Average classification performance and standard deviation on the Twitter image dataset.
Model3-agree4-agree5-agreeBaseline CNN from [13]0.6870.7140.783Paper [14] (without oversampling)——0.839± 0.029Paper [14] (with oversampling)——0.844± 0.026Ours (without oversampling)0.762 + 0.0320.814 + 0.0280.858 + 0.029Ours (with oversampling)0.784 + 0.0210.834 + 0.0170.878 + 0.013The data in Table4 show that the model outperforms the previous two levels, and when effective oversampling is applied, the model is further improved on the image sentiment classification task, achieving 3.4% improvement over the current state-of-the-art method. Longitudinally, the standard deviation of the model decreases further for both weakly labelled data on the 3-agree and strongly labelled data on the 5-agree, indicating that the stability of the model is further improved, and this pattern is also observed for the painting art image dataset. The experimental results show that although some oversampling approaches have proven to be very effective in many convolutional neural network models, different oversampling strategies are needed for different computer vision tasks [30].


## 4.3. Analysis of the Results of Pretraining Strategies for Relevant Tasks

In order to keep the pretrained convolutional neural network model from bringing too much learning experience into solving new complex problems, we first trained the fine-tuned MXNet model on a Twitter image dataset, and after the previous analysis, instead of dividing the dataset in a 5-fold cross-validation manner, we used the entire dataset as the training dataset, replacing the last layer of the network with a fully connected layer containing only two neurons. For the final comparison of the experimental results, two sets of experiments were conducted, with the first set expanding the dataset without oversampling and the second set expanding the dataset for oversampling by cropping, flipping, and changing the image brightness, saturation, and contrast in increments of up to 50%, in line with the optimal model in Section4.2. The model was trained using stochastic gradient descent, introducing the momentum method, internalizing the momentum parameter to 0.9, and setting the initial learning rate to 0.01, which changed to 0.1 every 10 times for a total of 50 training rounds. The model was then applied to the ethnic painting colour design task, using 5-fold cross-validation to divide the ethnic painting dataset into a training set and a test set, with no data expansion for group 1 and an oversampling of the dataset by cropping, flipping, and changing the brightness and saturation of the images in increments of up to 50% for group 2. The parameters of both experiments were kept constant; the batch size was set to 64, the model was trained using stochastic gradient descent, the momentum parameter was initialized to 0.9, the initial learning rate was set to 0.01 and it was changed to 0.1 every 15 times, and the mean value of the 5-fold cross-validation result was used as the result of the current experiment. The mean value of the 5-fold cross-validation results was taken as the final result of the model, and the results are shown in Table 5.Table 5
Results of pretraining strategies for relevant tasks.
ModelWithout oversamplingWith oversamplingFine-tuning MXNet0.701 + 0.020.723 + 0.013PS CNN0.736 + 0.0170.753 + 0.013The experimental data show that this strategy improves the performance of the model more than expanding the dataset to train the model by oversampling. It is worth noting that this strategy works well in combination with oversampling to improve the performance of convolutional neural networks on specific tasks, and the size of the standard deviation shows that the improvement is more stable for image sentiment classification tasks.


## 4.4. Visualisation Analysis

Using a trained VGG16-based FCN, we set the input to a 448 × 448 image, and after passing it through the network, we obtained an 8 × 8 prediction block, where the number of channels in the output represents the positive and negative sentiment prediction results. The prediction result on the interval [0, 1] was mapped to the interval [0, 255], and the negative sentiment prediction was assigned to the R channel in RGB, the positive sentiment prediction was assigned to the G channel in RGB, and the B channel was initialized to 0. This block was then interpolated to the same size as the original image using proximity interpolation, and the original image and the prediction result were fused with equal weights. Some of the results are shown in Figure5.Figure 5
Selected results using VGG16-based FCN, row 1 is the original plot, row 2 is the generated prediction plot, and finally the true labels green represents positive prediction results and red represents negative prediction results. The stronger the colour, the higher the prediction probability of the network.


## 5. Conclusions

Colour is an important part of art, and in professional painting, we can strengthen the cultivation of students' color knowledge. However, at present, many art-related majors in schools do not invest much in such basic courses as colour, and the focus is not on colour training, but rather on spending more time on the training of other theories in terms of the importance of colour to art students. Above, only such basic courses can strengthen students’ professionalism, and the importance of practice in art majors and even other majors is quite important. Practice is very important in art and even in other disciplines, and it is only when students fully understand the importance of colour that they are able to produce high-quality work.



---

*Source: 3873213-2022-03-17.xml*