ON THIS PAGE

The Classification of Painting Art Styles in Art Teaching Based on Machine Learning from the Perspective of Affective Semantic Analysis

Qingtao Dong1
1College of Art and Design, Huanghuai University, Zhumadian 463000, China.

Abstract

To address the problems of accuracy and efficiency in the classification algorithm of painting art in art teaching, we propose a machine learning-based classification algorithm for painting art in art teaching from the perspective of sentiment semantic analysis. Seven representative art painting styles of western comics, drawing, oil painting, watercolor painting, and domestic branding painting, ink painting and mural painting are selected as the research objects, and the images are pre-processed by denoising and normalization. Subsequently, the style characteristics of the paintings are identified, and the color, chunk, and contour entropies of the pictures are acquired, respectively. These results are then integrated to create a machine learning model of various painting styles. To create the classification model of art painting style, the extracted color, chunk, and contour entropies are merged and trained using a Support Vector Machine (SVM) in art instruction. The approach achieves 94% painting classification accuracy and has the advantages of reduced feature dimensions, fast operation time, and scale invariance.

1. Introduction

raditional culture is the spiritual source of a nation, and painting is one of the forms of expression of traditional cultural heritage. Mankind’s knowledge and understanding of the world, as well as his perception and emotion of real life, are expressed through the form of painting. From ancient times to the present, human civilization has progressed continuously and accumulated a huge amount of painting resources, such as Eastern landscape paintings, Western oil paintings, Dunhuang frescoes [1], and so on. These painting images are not only an effective carrier for passing down human civilization, but also an important force for human development and progress in the course of history. Modern society is in a period of rapid development, and smart mobile devices have been closely related to people’s lives, and at the same time, digital painting images are gradually integrated into people’s lives, and can be enjoyed anytime and anywhere through the Internet and electronic devices, which also makes it more convenient for researchers to explore them at a deeper level [2].

Due to the huge amount of digital painting image resources that exist, it is impossible to process them directly. Therefore, the effective management of paintings is imperative. Initially, manual painting classification requires manual extraction of features, which on the one hand is too big for the researcher, resulting in a waste of manpower and time, and on the other hand can lead to a decrease in classification accuracy due to manual errors in extracting the wrong features [3]. Therefore, there is a great trend to use computer technology to extract features from painting images as well as to classify them. Researchers have used classification algorithms to study the style, authorship, and dynasties of painting images by extracting features such as color, texture, white space, and emotional semantics [4]. However, there are relatively few research works on classification of paintings based on affective semantic features. An excellent painting is made up of countless emotional semantic superimpositions; thus, emotional semantic features are crucial for the study of painting images [5].

In this paper, we propose a classification model of painting images based on sentiment semantic features to classify painting images, which not only facilitates people to choose their desired style of works [6], but also allows to obtain labels for more datasets, which provides convenience for subsequent researchers to extract sentiment semantic features. It is also possible to classify more datasets in a detailed way, such as dynasty, author, style, and sentiment. Thus, the research in this paper enriches the application of affective semantic features on the classification of drawing images and promotes the development of drawing images [7]. In this paper, the representative painting styles of western comics, drawing, oil painting, watercolor painting, and domestic branding, ink painting, and mural painting are selected as the research objects to classify for seven different paintings and obtain the final classification recognition results [8]. Figure 1 shows the images of different painting styles.

Figure 1: Example of style painting

2. Proposed Methods

As shown in Figure 2, the image feature extraction part is to extract objective underlying features such as (color texture shape, etc.) from the image, and the features are extracted mainly using computer vision and digital image processing techniques to obtain objective visual content features directly from the image, and the algorithms they correspond to are becoming increasingly mature. In the process of studying the emotional semantics of images, the feature extraction part of images is very heavy, and it is necessary to construct or select psychological and physiological models in combination with human physiological and psychological characteristics to find features, and to describe them using appropriate ways in order to play a positive role in the extraction of emotional semantics.

Figure 2: Basic framework of emotion semantic extraction

First, the edges were filtered and closed by morphological manipulation. Finally, the top six emotional semantic sub-images of the formed painting images in terms of density are used as the input features needed for classification. The flowchart of the emotion-semantic feature extraction method proposed in this chapter is shown in Figure 3.

Figure 3: Flowchart of extracting sentiment semantic features

A. Methods of extracting sentiment semantic features in this paper

1) Sobel operator edge detection method

Edge detection is one of the common methods for processing image edges. It is independent of the image content and acts mainly on the edges. Thus, in our model, we choose the edge as the first place if it contains the number of pixels between two thresholds (200 and 900).

Among them, the Sobel operator is an algorithm for edge detection based on the first-order gradient operation, which uses the convolution kernels \(G_{X}\) and \(G_{Y}\) to convolve in the \(X\) and \(Y\) directions of the image, respectively, in the process of extracting sentiment semantic features. The results computed from the convolution in \(X\) and \(Y\) directions are algebraically weighted and summed to obtain the edge results for the whole image. The convolution kernel \(G_{X} ,G_{Y}\) is shown in Eq. (1). \[\label{GrindEQ__1_} \begin{cases} G_{X} =\left[\begin{array}{ccc} {-1} & {0} & {+1} \\ {-2} & {0} & {+2} \\ {-1} & {0} & {+1} \end{array}\right],\\ G_{Y} =\left[\begin{array}{ccc} {-1} & {-2} & {-1} \\ {0} & {0} & {0} \\ {+1} & {+2} & {+1} \end{array}\right] .\end{cases}\tag{1}\] The Sobel operator matrix has the following form: \[\label{GrindEQ__2_} \begin{cases} G_{x} =f_{x} (x,y)=\left[\begin{array}{ccc} {-1} & {0} & {1} \\ {-2} & {0} & {2} \\ {-1} & {0} & {1} \end{array}\right],\\ {\rm G}_{y} =f_{y} (x,y)=\left[\begin{array}{ccc} {-1} & {-2} & {-1} \\ {0} & {0} & {0} \\ {1} & {2} & {1} \end{array}\right] .\end{cases}\tag{2}\] The drawing image performs the edge operation method, which is essentially a gradient change in the gray value of a pixel point, and the location of the gradient change is the edge location of a certain region. In this case, the magnitude of the gray value that has changed is the combined gray value. The gray value size of the point is calculated by the following Eq. (3). \[\label{GrindEQ__3_} G=\sqrt{G_{x}^{2} +G_{y}^{2} } .\tag{3}\] In the process of extracting the emotional semantic features, the painting images are firstly converted into grayscale images, and the edge detection Sobel operator is used to perform the operation through a 3*3 filter.

2) Morphological operation

We have to select representative sentiment semantic features as the input for classification, because too sparse sentiment semantics will interfere with the classification results. Therefore, the steps,

  • Step 1; The painting image after morphological operation is segmented into 2000 small blocks.

  • Step 2: Then the gradient similarity value of adjacent regions of each two sub-painting images is calculated using greedy strategy, and the two closest sub-painting images are merged.

  • Step 3: The density size of each region is ranked.

  • Step 4: Finally, the sentiment semantic features with the top six densities are selected.

The top six emotional semantic features with density extracted according to the above algorithm are used as the most representative emotional semantics of this painting image, and we call it selectable emotional semantics. As shown in Figure 4, the process of extracting selectable sentiment semantics is shown.

Figure 4: Selection of emotional semantic sub-images

Figure 5 shows the block diagram of the system implementation.

Figure 5: Diagram of system implementation

B. Classification model based on sentiment semantic features

With the expansion of data set, CNN has been widely used in various fields of image processing, such as target recognition, classification and tracking. Therefore, based on the above mapping data set, we establish a convolution neural network classification model based on emotional semantic features.

1) CNN

This study uses morphological manipulation, segmentation, and extraction of the image after edge detection, and then uses the 64×64 image size as the CNN’s input for learning and training. Figure 6 depicts the architecture, and its structure is as follows:

  1. Create six 60 × 60 mappings in the C1 layer in order to extract edge characteristics from the original picture pixels.

  2. Each mapping in the S1 layer is lowered with a subsampling rate of 2, which aids in the extraction of important edge characteristics while lowering the model’s parameters.

  3. The second convolution layer in the C2 layer creates 12 mappings with a size of 26 x 26 in order to identify basic form features from edge features.

  4. By creating fully connected layers, 2028 dimensional vectors are obtained in one layer of the S2 layer. In the output layer, 1014-dimensional features are finally obtained.

Figure 6: CNN model
2) SVM

The essential idea of SVM is to transform the nonlinear problem in classification into a linear problem and finally get the optimal solution. SVMs maximize the distance between two types of images in a dataset and the hyperplane. Its diagram is shown in Figure 7.

Figure 7: SVM model

For the test painting images, it is assumed that their affective semantic features are described as ,which is classified as a positive sample if and a negative sample if the opposite is true. In the algorithm of SVM for classification, we used generic values as parameters. The final decision of whether the test image belongs to good painting image or bad painting image is made by SVM.

3. Experiments

The experimental flow is shown in Figure 8,

  • In step 1, from seven genres such as painting and sketch, 100 paintings are randomly displayed as simulation samples to extract color entropy, block entropy and contour entropy respectively.

  • In step 2, the entropy obtained is merged into [mxn] (m) to display the training samples, and N to display the characteristics of the samples), and the corresponding tag set is set.

  • In step 3, as the training kit using the characteristic matrix, select the radial basis function kernel function, use libsvm to train and train the training kit, and get the pattern classification in art training.

  • In step 4, seven image styles such as patterns and patterns are selected as test samples, and the recognizable vectors of the images are obtained according to steps 1 and 2. The recognizable vectors are input into step 3 after the classifier is well trained for recognition, and the recognition results and recognition accuracy are obtained.

  • In step 5, set any label on the image to be recognized, and input it into the style to draw the classifier to obtain the sorting results.

Figure 8: Flow chart of the experiment

A. Accuracy and completeness

All experiments in this paper were conducted in Windows 7, 32-bit operating system, based on 2.3 GHz AMD Turion II CPU, 4 G memory, and programmed in Matlab2016. In this paper, experiments are conducted for seven different painting arts in art teaching: cartooning, drawing, oil painting, watercolor painting, branding, ink painting, and mural painting, and the proposed method is mainly validated by accuracy and completeness. The experimental training set consists of 100 paintings of each style selected from the dataset, and the test set consists of 100 paintings of each style randomly selected from the remaining dataset. And the results are shown in Figure 9.

Figure 9: The accuracy of different paintings

Table 1 shows the classification accuracy. From the experimental results, we can see that the classification accuracy of oil painting, mural painting and watercolor painting is relatively high, while the classification accuracy of cartoon and ink painting is relatively low, among the 350 selected test images, there are 309 correctly classified, and the average classification accuracy is 88.28%. The style of cartoons and oil paintings are distinctive and easier to distinguish than other styles, so the recognition accuracy is high. It is also a difficult point to classify and identify style paintings.

Table 1: Classification accuracy rate
Painting
species
Number of
classification
results
Number of correct
classifications
Classification
accuracy (%)
Cartoon 48 40 83.32
Sketch 50 44 88.00
Oil Painting 50 48 92.14
Painting in
water colors
48 45 93.63
Pyrography 51 45 88.47
Chinese brush
painting
55 44 79.62
Mural 46 46 95.75

Table 2 shows the completion rates. The completion rates of branding and oil painting are relatively high, reaching more than 90%, which is due to the high recognition accuracy of branding and oil painting, and they are not easily misidentified as other paintings, so the completion rates are high. The search rate of cartoons is relatively low, only 80%, because the recognition accuracy of cartoons is low, and they are easily classified as other types of paintings, so the search rate is low. The search completion rate is affected by the classification accuracy, and the improvement of the accuracy rate is beneficial to the improvement of the search completion rate.

Table 2: Classification rate
Painting species Number of correct
classifications
Number of error
classifications
Recall
rate (%)
Cartoon 40 10 82
Sketch 45 5 86
Oil Painting 46 4 95
Painting in
water colors
44 5 87
Pyrography 45 5 91
Chinese brush
painting
44 8 88
Mural 45 4 92

B. Comparative analysis

The literature [7] designed a system for classifying five types of painting arts in art teaching, including photography, Chinese painting, watercolor painting, sketching, and oil painting. The system finally achieves the classification of 5 types of paintings with different art styles by setting multiple classes of SVM classifiers and classifying them layer by layer, and each class of SVM classifiers adopts the specified image features to achieve their respective classification functions.

Figure 10: The accuracy of painting samples

Figure 11 shows the multiclass binomial tree classification system in the literature [7], which uses a 3-layer 4-class SVM classifier to progressively achieve classification of 5 classes of art style paintings, and each classifier uses different features to achieve classification of the specified style paintings from top to bottom layer by layer, and its overall classification accuracy is 85.56%. The classification accuracy of the algorithm in this paper for art painting styles is 88.28%, and the accuracy is improved. In addition, both the literature [7] and this paper use SVM classifier for classification, including 2 processes of training and classification. The literature [7] performs at least 3 SVM calculations on samples through a hierarchical approach, which is time-consuming, and the SVM is used to train and classify the data set 1 time, which reduces the computing time and accelerates the computational process when the number of samples is large, which improves the efficiency of classification calculation.

Figure 11: SVM multiclass binomial tree classification for different art style classification [7]

After ensuring the accuracy of the algorithm, we further analyzed the satisfaction of teachers with the system. The specific results are shown in Figure 12. It can be seen that the vast majority of teachers agree with the application of the algorithm, and the largest proportion of teachers aged 35 to 39 is 44%.

Figure 12: Teachers’ satisfaction with the method

C. Scale invariance

Image entropy is an image feature with statistical properties that describes the spatial distribution characteristics of pixels, whether the image is scaled down or scaled up, it does not affect the distribution characteristics of image pixel points.

In this paper, the same painting art in art teaching is tested at different scales, and painting art in art teaching such as branding, oil painting and drawing are selected for testing. Figure 13 shows the image examples with image scales of 512×512, 256×256 and 128×128 respectively, and the algorithm is trained and tested by calculating color entropy, chunk entropy and contour entropy for the images. The RBF kernel function is selected, and the experimental parameters are chosen as =4 and =0.125. After experimenting with the input 3 images of different scales, the experimental results obtained are , and the three contour entropies are 2.4, 1.7, and 2.1, respectively. has scale invariance, which provides a general computational method of different scales and extends the application area.

Figure 13: Images at different scales

4. Conclusion

In this paper, we propose a machine learning-based classification algorithm for painting art in art teaching. The algorithm takes seven kinds of representative painting art in art teaching: cartoons, drawings, oil paintings, watercolor paintings, branding paintings, ink paintings and murals as objects, and uses neural networks and machine learning algorithms to train, test and classify different painting art in art teaching. In the experimental process, we use accurate and accurate algorithms to classify the paintings. The experimental results show that the algorithm can effectively classify the painting art in the process of art teaching, and has the advantages of fast operation speed and constant scale.

References

  1. Baymetov, B. B., & Ibrahimova, I. (2021). Technologies for using fine arts in developing students’ artistic imagination. Asian Journal of Multidimensional Research, 10(4), 544-551.

  2. Zhong, S. H., Huang, X., & Xiao, Z. (2020). Fine-art painting classification via two-channel dual path networks. International Journal of Machine Learning and Cybernetics, 11(1), 137-152.

  3. Santos, I., Castro, L., Rodriguez-Fernandez, N., Torrente-Patino, A., & Carballal, A. (2021). Artificial neural networks and deep learning in the visual arts: A review. Neural Computing and Applications, 33(1), 121-157.

  4. Alsubari, S. N., Deshmukh, S. N., Alqarni, A. A., Alsharif, N., H., T. (2022). Data Analytics for the Identification of Fake Reviews Using Supervised Learning. CMC-Computers, Materials & Continua, 70(2), 3189–3204.

  5. Scalera, L., Seriani, S., Gasparetto, A., & Gallina, P. (2019). Watercolour robotic painting: a novel automatic system for artistic rendering. Journal of Intelligent & Robotic Systems, 95(3), 871-886.

  6. Chen, S. (2020). Exploration of artistic creation of Chinese ink style painting based on deep learning framework and CNN model. Soft Computing, 24(11), 7873-7884.

  7. Xiu, D., He, L., Killikelly, C., & Maercker, A. (2020). Prolonged grief disorder and positive affect improved by Chinese brush painting group in bereaved parents: A pilot study. Journal of Social Work in End-of-Life & Palliative Care, 16(2), 116-132.

  8. Jiang, W., Wang, X., Ren, J., Li, S., Sun, M., Wang, Z., & Jin, J. S. (2021). MTFFNet: a Multi-task Feature Fusion Framework for Chinese Painting Classification. Cognitive Computation, 13(5), 1287-1296.

  9. Zhang, C., Li, M., & Wu, D. (2022). Federated multidomain learning with graph ensemble autoencoder GMM for emotion recognition. IEEE Transactions on Intelligent Transportation Systems, 24(7), 7631-7641.

  10. Xu, J. (2023). Optimizing English Education in the Information Era: A Multimodal Approach Based on BOPPPS Teaching Model. Journal of Combinatorial Mathematics and Combinatorial Computing, 118, 33-48.

  11. Dong, Q., & Liu, X. Optimization Practice of University Innovation and Entrepreneurship Education Based on the Perspective of OBE. Journal of Combinatorial Mathematics and Combinatorial Computing, 118, 181-189.

Related Articles
Cansu Aykut Kolay1, İsmail Hakkı Mirici2
1Hacettepe University Graduate School of Educational Sciences, Ankara, Turkey.
2Hacettepe University, Faculty of Education, Ankara, Turkey.
Shatha M. AlHosian1
1College of Business Adminisrtation, King Saud University, Saudi Arabia.
Mustafa N. Mnati1, Ahmed Salih Al-Khaleefa2, Mohammed Ahmed Jubair3, Rasha Abed Hussein4
1Department of electrical engineering, Faculty of Engineering, University of Misan, Misan, Iraq.
2Department of Physics, Faculty of Education, University of Misan, Misan, Iraq.
3Department of Computer Technical Engineering, College of Information Technology, Imam Ja’afar Al-Sadiq University, Iraq.
4Department Of Dentistry, Almanara University for Medical Science, Iraq.
Samirah Dunakhir, Mukhammad Idrus1
1Faculty of Economics and Business, Universitas Negeri Makassar, Indonesia.

Citation

Qingtao Dong. The Classification of Painting Art Styles in Art Teaching Based on Machine Learning from the Perspective of Affective Semantic Analysis[J], Archives Des Sciences, Volume 74 , Issue S1, 2024. -. DOI: https://doi.org/10.62227/as/74s115.