# Application of Improved Boosting Algorithm for Art Image Classification

Authors: Yue Wu
Journal: Scientific Programming
 (2021)

---

## Abstract

In the field of computer science, data mining is a hot topic. It is a mathematical method for identifying patterns in enormous amounts of data. Image mining is an important data mining technique involving a variety of fields. In image mining, art image organization is an interesting research field worthy of attention. The classification of art images into several predetermined sets is referred to as art image categorization. Image preprocessing, feature extraction, object identification, object categorization, object segmentation, object classification, and a variety of other approaches are all part of it. The purpose of this paper is to suggest an improved boosting algorithm that employs a specific method of traditional and simple, yet weak classifiers to create a complex, accurate, and strong classifier image as well as a realistic image. This paper investigated the characteristics of cartoon images, realistic images, painting images, and photo images, created color variance histogram features, and used them for classification. To execute classification experiments, this paper uses an image database of 10471 images, which are randomly distributed into two portions that are used as training data and test data, respectively. The training dataset contains 6971 images, while the test dataset contains 3478 images. The investigational results show that the planned algorithm has a classification accuracy of approximately 97%. The method proposed in this paper can be used as the basis of automatic large-scale image classification and has strong practicability.


---

## Body

## 1. Introduction

Art image classification is one of the most significant research topics with great significance in which a great deal of information is available to people with the help of advancements in computer technology [1, 2], multimedia technology [3], and network technology [4]. In the United States, it took thirty-eight years for broadcasting users to reach 50 million, thirteen years for TV, and only four years for dial-up Internet to reach 50 million. Major corporations, banks, commercial departments, and scientific research departments have amassed vast amounts of data and information. The traditional statistical analysis makes it difficult to obtain the inherent relationship and implicit information of data attributes because of so much data gathered together. As a result, data mining has emerged as a new technology in the computer field. Data mining is the procedure of determining the relationship between models and data in huge amounts of data using various analysis tools, and these models and relationships can make predictions. Data mining [4] can reveal the connection and potential relationship between them. Image classification is a classic problem of concern in image dispensation via data mining. The purpose of image classification is to use characteristics to determine the categories of source images.There are several approaches to solving this problem, including the AdaBoost algorithm, K-nearest neighbor (KNN), artificial neural network (NN), and support vector machine (SVM). In 1989, Schapire proposed the boosting algorithm [5]. The name given to this improved boosting algorithm is adaptive boosting (AdaBoost) algorithm, which solved many practical problems in the early boosting algorithm. Boosting algorithms have been used in many fields in recent years, including text mining, multiclass classifications [6], and multilabel situations [7] and natural language understanding. Further, it can be used when combined with other methods such as neural networks [8], decision trees [9], and other algorithms. The boosting algorithm can be used for text classification in text mining [10]. The AdaBoost [11] extended algorithm is used which can handle multiclass [11] and multilabel situations [10]. Furthermore, the boosting algorithm is used in image classification retrieval [12], natural language understanding [13], and speech recognition [14]. The basic idea behind the boosting algorithm is to build a complex and accurate strong classifier using a specific method of some simple, less accurate weak classifiers. The goal of the so-called weak learner is to find a weak classifier for training samples that fit a specific distribution, and its accuracy is only slightly better than random guessing, i.e., greater than 50%. This is always available because the classifier can be reversed if the accuracy falls below 50%. Through repeated iterations, the boosting algorithm generates a weak classifier. The main contributions of the proposed study are listed below:(i)
First, the related work is investigated in the domain of image classification and it is found that 92% is the highest accuracy that is achieved during image classification.(ii)
Second, the most efficient classification algorithm is selected, i.e., SVM, and combined with boosting algorithm.(iii)
Third, from the combination of SVM and boosting algorithm, an improved AdaBoost algorithm is designed.(iv)
Fourth, the algorithm is improved to classify art images and real images.(v)
Finally, from the experimental work, accuracy of above 97% is achieved, which is much better than other researchers’ works.The rest of the paper is organized as follows. Section2 represents related research work. Section 3 depicts the improved boosting algorithm in art image classification. Section 4 gives simulation results and experimental analysis. Section 5 concludes the paper.


## 2. Related Work

Image classification is a well-known concern in image handling. The aim of image classification is to use the features of the input image to predict the categories. For this, the authors in [15] focused on remote sensing picture categorization using the expectation-maximization algorithm. Their proposed method is primarily intended to increase the organization accuracy of the EM technique, which currently has 83.8% accuracy in remotely detected image organization. Furthermore, the authors of [13] focused on terrestrial cover image organization by the C4.5 method. The primary goal of this effort is to improve the performance of image organization of urban terrestrial cover maps. The C4.5 technique operates in the following way. Every node corresponds to a value range of the characteristic. Each node ties a range of values of the characteristic. Each node’s root defines the approximate attribute value. More information is required to describe the data. Through the pruning process, the C4.5 technique automatically removes preventable nodes. In image classification, this technique achieves an accuracy of 84%. Comparably, in [16], the authors debated on an introduction to classification and regression tree (CART). They explained how to improve the organization correctness of AVIRIS and Landsat digital pictures. The decision tree organization is a nonparametric shape recognition technique. Their proposed CART comprises the identification and building design of a decision tree that is based on training model data for accurate classification. This consists of a root node that can exist in the organization and regression tree. The root node is further subdivided into two subnodes. A subnode may have a grand subnode. This procedure was terminated when no additional splits were likely due to absence of data. In a remote sensed digital image, this method has a classification accuracy of 92.9%.The authors of [17] defined feature selection using a genetic algorithm and other organization algorithms such as KNN, NN, and MLPNN to categorize the lung picture dataset. This system was tested with lung images and produced acceptable results in the image classification of lung diseases. The genetic algorithm uses the population search method to move from one set of points to another in a single iteration. The GA method consists of three steps: crossover, mutation, and selection. In lung image datasets, this method has a classification accuracy of 90%. In addition, the authors of [18] concentrated on improving classification performance in color retinal images by employing the K-means technique. The K-means classification algorithm is the best example of a general hard organization algorithm. This method is being tested on hundred pictures received from different clusters' centers. All of the pictures are detectable on the optic disk. This study displays that using a color retinal image improves classification accuracy, whereas the authors of [19] suggested a technique called chaos genetic algorithm to improve the accuracy of remote sensing pictures. The CGA technique was used in the optimization process for remote sensing image organization. The GA approach uses a chaos genetic algorithm to optimize problems. In the early stages of the method, this system estimates the optimal population. Image classification accuracy can be improved with remote sensing technology. In image organization, this technique can be distributed into supervised approaches and unsupervised approaches.The researchers of [20] conducted an analytical technique for image junk organization using an artificial neural network in their work. It is a useful technique in image organization for locating and resolving feature extraction issues. Backpropagation neural network (BPNN) is used in this activity. The artificial neural network can be distributed into 3 layers: input layer, hidden layer, and output layer. The neurons are linked together to form these layers. During the training phase, each neuron automatically adjusts the weights. The classification success is affected by comparing the actual results to the goal value. By using spam images, this technique achieves 93% accuracy in image organization. The authors of [21] discovered a decent organization technique that could attain high classification accuracy when dealing with remote sensing picture classification. ELM is a feed-forward neural network technique. In remote sensing image classification, it is possible to elucidate the training set problem. The extreme learning machine is made up of 3 layers: an input layer, a hidden layer, and an output layer. Using remote sensing image organization, this planned technique achieves roughly 90% accuracy in image classification.In this regard, the authors of [22] proposed a method for classifying hyperspectral images using the random forest (RF) algorithm. The classification job is completed using both unlabeled and labeled data. Recently, the RF classifier technique for image classification was suggested. This method is an ensemble classification technique that employs a group of classifiers. For classification, this classifier employs a large number of separate decision trees. In image classification, the decision tree technique achieved an overall accuracy of 73.58%, while the semisupervised random forest method accomplished an accuracy of 82.63%. The authors in [23] described data clustering algorithm for image organization in Landsat pictures. Artificial neural network and fuzzy intervention are used in the data clustering method. It completes the training data in a short period. This method is used to determine the image classification accuracy in Landsat images. In image organization, this technique has an accuracy of 88.64%. Eventually, the authors of [24] focused on improving the accuracy of pecan defect organization by employing the AdaBoost algorithm. The AdaBoost method outperforms other methods in terms of classification accuracy. This research suggests that the AdaBoost classifier is appropriate for real-time applications. This technique can also be used for fresh agriculture classification jobs. The AdaBoost classifier method works well in poor marking and accurately in pecan defect organization. In the classification of pecan defect images, their method achieved 92.2% accuracy.Inspired from the work of above scholars, this research work focuses on the improved boosting algorithm in art image classification by adapting the AdaBoost technique to improve the accuracy of image classification. The experimental results show that the proposed algorithm significantly improves conventional traditional image classification accuracy while also reducing testing computational time. This method has image classification accuracy above 97%.


## 3. Improved Boosting Algorithm in Art Image Classification

The traditional decision tree algorithm is replaced in this article by AdaBoost as the main framework and the linear SVM as the meta-classifier. Based on the similarity of different matrices, the HOG feature extraction can obtain the image’s pixel matrix dispersal and determine whether the goal belongs to the same category. Given the possibility of overfitting due to the lack of data, a stochastic gradient descent (SGD) algorithm is used to enhance the objective purpose while avoiding local optimization [25]. The classifier model used in this paper is depicted in Figure 1, which shows how an SVM classifier has been used to assign test images regarding the distribution of the original training data (called training data-1). The AdaBoost and SVM system concentrates on selecting the features of AdaBoost. AdaBoost derives a fresh training set, training data-2, from the original training set by reducing noise and uncertainty. The SVM classifier is then used to classify the test images after it has been trained on training data-2. Following AdaBoost implementation, the AdaBoost system alone employs the final learner model. The last learner model is a new classifier that can directly predict the final test images.Figure 1
Flowchart of improved boosting algorithm.


### 3.1. Classification Target

Image classification can be done in a variety of ways [4]. The majority of classifiers, such as maximum likelihood, minimum distance, neural network, decision tree, and support vector machine, make a final decision about land cover class and require a trained model. Clustering-based algorithms, such as K-mean, KNN, or ISODATA, on the other hand, are unsupervised classifiers, whereas fuzzy-set classifiers are soft classifications that provide more information and possibly a more effective solution. Furthermore, knowledge-based classification, which employs expert knowledge and rules or generates rules from observed data, is gaining popularity. Currently, there has been a lot of attention in combining multiple classifiers. For classification tasks, some researchers combined the NN classifier [11], the SVM classifier [6], or the AdaBoost classifier. The goal of this research work is to combine the AdaBoost algorithm and the support vector machine (SVM) for image classification.The amount of image data available on the Internet is enormous [9]. When using image search engines to retrieve images, the photos “captured” from the Internet are automatically classified to filter out irrelevant images, improving retrieval efficiency. Many researchers have studied the classification of indoor and outdoor images, urban landscapes, and other landscape pictures. The classification of web images is a multiclassification problem. Usually, the best way to solve a multiclassification problem is to divide it into several two-classification problems. Therefore, the research steps of this paper are to first classify the images found in the WEB image database as cartoons and real images and then classify them as painter's pictures and digital images.


### 3.2. Feature Extraction

Image feature extraction is a significant step in image classification [11]. Because the image lacks obvious features, the image’s features must first be obtained before continuing to content-based image classification. Color and shape features, statistical feature of pixels, and transform coefficient features are some of the features used for image classification [6–8]. Furthermore, some researchers have used algebraic features for image recognition and classification. The result of image feature extraction is frequently a vector or a set of vectors. In this study, k feature vectors are used as image extraction tools. In this step, low-level image color features, edge direction, and so on are extracted. To reflect the spatial characteristics of the object, it is divided into N × N blocks, the color, edge, and other image characteristics are extracted from each subblock, and the characteristics of each subblock are strung to form the overall image characteristics. Here, N = 5, resulting in a total of 5 × 5 = 25 subblocks as shown in Figure 2.Figure 2
Feature extraction.


### 3.3. SVM for Classification

To account for the ultimate nonlinearity of the problem, the support vector machine (SVM) approach depends on a linear separation in a high-dimensional feature space where the data have been previously mapped [20]. Assume that the training set is represented in the following equation:(1)X=xit=lRRl,where l is the number of training vectors, the base R stands for the real line and the power R is the number of modalities and is labeled with 2 class targets:(2)Y=yit=ll,where(3)yi∈−1,+1Φ:RR⟶F.This converts the data into a feature spaceF, and Vapnik showed that maximizing the smallest distance in F between (X) and the separating hyperplane H (w, b) reduces the probability of generalization, as shown by(4)Hw,b=f∈F|w,fF+b=0.The other kernel in the Gaussian kernel is defined as(5)Kx,y=exp−x−y22σ2,where x and y are feature vectors in the input space and are scale parameters. The Gaussian kernel has two hyperparameters that control its performance: C and the scale parameter.


### 3.4. Boosting Algorithm

Boosting is based on a machine learning structure. Kearns and Valiant are the first to transform the PAC module’s weak learning algorithm, which is only somewhat improved than random guessing, into a strong and accurate learning algorithm, but these algorithms have practical difficulties [23]. Freund and Schapire suggested the AdaBoost algorithm in 1995 to address the practical shortcomings of many early boosting algorithms [16]. The AdaBoost algorithm is a member of the boosting family of algorithms. In this paper, a technique based on dividing the overall classification error into several parts is suggested, inspired by the improved efficiency of the AdaBoost algorithm. The AdaBoost algorithm is used to improve accuracy over the minority class while sacrificing accuracy over the majority class. Algorithm 1 depicts the steps of the proposed AdaBoost algorithm.Algorithm 1:Improved AdaBoost algorithm.
(1)
Given: (x1, y1),…, (xm, ym)(2)
Xiε X, yi ε Y = {−1, +1}(3)
Initial samples: D1 (i) = 1/m(4)
Iteration T times,t = 1,…,T(5)
Weak classifier learning according to Di(6)
Find the best weak classifier in a weak classifier(7)
Ht: X  ⟶ {−1, +1}(8)
Eliminate classification errors and update sample distribution(9)
Dt+li=Dtiexp−atythxi/Zt(10)
Strongest output classifier:(11)
Hx=sign∑t+1TαthxiThe proposed AdaBoost algorithm takes as input the training samplea, and x_i belongs to the sample space X, while y_i belongs to the label space Y. For two-classification problems, Y = {−1, +1}. In a series of iterations, i.e., t = (1,…,T), the AdaBoost algorithm repeatedly calls the weak classifier learning algorithm for training. During multiple iterative training, a weak classifier is obtained each time the algorithm runs, as well as the weight of the corresponding weak classifier, and the distribution weight of the sample is also updated accordingly. When the algorithm is initialized, all sample weights can be set to the same value. After each cycle, calculate the classification error and then calculate the new weight of the sample. The error calculation can be seen in the following equation:(6)εt=Pri−Dihxi≠yi=∑hxi≠yiDti.When the weak classifierh is obtained, AdaBoost selects the parameter a to represent the weight of h. For h of binary classification, αt is generally set as(7)αt=12ln1−εtεt.Whent is obtained, use the formula in Figure 2 to recalculate Dt to obtain the updated sample weight. In the tth iteration, the weight of the training sample xi is marked as Dti. In each iteration, the weight of the incorrectly classified sample increases, and the weight of the correctly classified sample decreases. In this way, the weak learner can focus on training the samples that are difficult to classify. Each iteration of the algorithm obtains a binary weak classifier as follows:(8)ht:X⟶−1,+1,and the last strong classifier H is a weighted linear mixture of T weak classifiers with the weight αt as the coefficient.Boosting algorithm has distinct advantages when compared to other machine learning algorithms [2]. The boosting algorithm works by combining weak classifiers to create a strong classifier. Boosting, as shown in Figure 3, selects the best weak classifier for data classification in turn. It is likely to resolve very complex classification problems by combining simple weak classifiers. If the weak classifier used in the learning process is only based on one dimension in the feature, the boosting training process can also be viewed as a feature selection process.Figure 3
Classification-boosting algorithm.


## 3.1. Classification Target

Image classification can be done in a variety of ways [4]. The majority of classifiers, such as maximum likelihood, minimum distance, neural network, decision tree, and support vector machine, make a final decision about land cover class and require a trained model. Clustering-based algorithms, such as K-mean, KNN, or ISODATA, on the other hand, are unsupervised classifiers, whereas fuzzy-set classifiers are soft classifications that provide more information and possibly a more effective solution. Furthermore, knowledge-based classification, which employs expert knowledge and rules or generates rules from observed data, is gaining popularity. Currently, there has been a lot of attention in combining multiple classifiers. For classification tasks, some researchers combined the NN classifier [11], the SVM classifier [6], or the AdaBoost classifier. The goal of this research work is to combine the AdaBoost algorithm and the support vector machine (SVM) for image classification.The amount of image data available on the Internet is enormous [9]. When using image search engines to retrieve images, the photos “captured” from the Internet are automatically classified to filter out irrelevant images, improving retrieval efficiency. Many researchers have studied the classification of indoor and outdoor images, urban landscapes, and other landscape pictures. The classification of web images is a multiclassification problem. Usually, the best way to solve a multiclassification problem is to divide it into several two-classification problems. Therefore, the research steps of this paper are to first classify the images found in the WEB image database as cartoons and real images and then classify them as painter's pictures and digital images.


## 3.2. Feature Extraction

Image feature extraction is a significant step in image classification [11]. Because the image lacks obvious features, the image’s features must first be obtained before continuing to content-based image classification. Color and shape features, statistical feature of pixels, and transform coefficient features are some of the features used for image classification [6–8]. Furthermore, some researchers have used algebraic features for image recognition and classification. The result of image feature extraction is frequently a vector or a set of vectors. In this study, k feature vectors are used as image extraction tools. In this step, low-level image color features, edge direction, and so on are extracted. To reflect the spatial characteristics of the object, it is divided into N × N blocks, the color, edge, and other image characteristics are extracted from each subblock, and the characteristics of each subblock are strung to form the overall image characteristics. Here, N = 5, resulting in a total of 5 × 5 = 25 subblocks as shown in Figure 2.Figure 2
Feature extraction.


## 3.3. SVM for Classification

To account for the ultimate nonlinearity of the problem, the support vector machine (SVM) approach depends on a linear separation in a high-dimensional feature space where the data have been previously mapped [20]. Assume that the training set is represented in the following equation:(1)X=xit=lRRl,where l is the number of training vectors, the base R stands for the real line and the power R is the number of modalities and is labeled with 2 class targets:(2)Y=yit=ll,where(3)yi∈−1,+1Φ:RR⟶F.This converts the data into a feature spaceF, and Vapnik showed that maximizing the smallest distance in F between (X) and the separating hyperplane H (w, b) reduces the probability of generalization, as shown by(4)Hw,b=f∈F|w,fF+b=0.The other kernel in the Gaussian kernel is defined as(5)Kx,y=exp−x−y22σ2,where x and y are feature vectors in the input space and are scale parameters. The Gaussian kernel has two hyperparameters that control its performance: C and the scale parameter.


## 3.4. Boosting Algorithm

Boosting is based on a machine learning structure. Kearns and Valiant are the first to transform the PAC module’s weak learning algorithm, which is only somewhat improved than random guessing, into a strong and accurate learning algorithm, but these algorithms have practical difficulties [23]. Freund and Schapire suggested the AdaBoost algorithm in 1995 to address the practical shortcomings of many early boosting algorithms [16]. The AdaBoost algorithm is a member of the boosting family of algorithms. In this paper, a technique based on dividing the overall classification error into several parts is suggested, inspired by the improved efficiency of the AdaBoost algorithm. The AdaBoost algorithm is used to improve accuracy over the minority class while sacrificing accuracy over the majority class. Algorithm 1 depicts the steps of the proposed AdaBoost algorithm.Algorithm 1:Improved AdaBoost algorithm.
(1)
Given: (x1, y1),…, (xm, ym)(2)
Xiε X, yi ε Y = {−1, +1}(3)
Initial samples: D1 (i) = 1/m(4)
Iteration T times,t = 1,…,T(5)
Weak classifier learning according to Di(6)
Find the best weak classifier in a weak classifier(7)
Ht: X  ⟶ {−1, +1}(8)
Eliminate classification errors and update sample distribution(9)
Dt+li=Dtiexp−atythxi/Zt(10)
Strongest output classifier:(11)
Hx=sign∑t+1TαthxiThe proposed AdaBoost algorithm takes as input the training samplea, and x_i belongs to the sample space X, while y_i belongs to the label space Y. For two-classification problems, Y = {−1, +1}. In a series of iterations, i.e., t = (1,…,T), the AdaBoost algorithm repeatedly calls the weak classifier learning algorithm for training. During multiple iterative training, a weak classifier is obtained each time the algorithm runs, as well as the weight of the corresponding weak classifier, and the distribution weight of the sample is also updated accordingly. When the algorithm is initialized, all sample weights can be set to the same value. After each cycle, calculate the classification error and then calculate the new weight of the sample. The error calculation can be seen in the following equation:(6)εt=Pri−Dihxi≠yi=∑hxi≠yiDti.When the weak classifierh is obtained, AdaBoost selects the parameter a to represent the weight of h. For h of binary classification, αt is generally set as(7)αt=12ln1−εtεt.Whent is obtained, use the formula in Figure 2 to recalculate Dt to obtain the updated sample weight. In the tth iteration, the weight of the training sample xi is marked as Dti. In each iteration, the weight of the incorrectly classified sample increases, and the weight of the correctly classified sample decreases. In this way, the weak learner can focus on training the samples that are difficult to classify. Each iteration of the algorithm obtains a binary weak classifier as follows:(8)ht:X⟶−1,+1,and the last strong classifier H is a weighted linear mixture of T weak classifiers with the weight αt as the coefficient.Boosting algorithm has distinct advantages when compared to other machine learning algorithms [2]. The boosting algorithm works by combining weak classifiers to create a strong classifier. Boosting, as shown in Figure 3, selects the best weak classifier for data classification in turn. It is likely to resolve very complex classification problems by combining simple weak classifiers. If the weak classifier used in the learning process is only based on one dimension in the feature, the boosting training process can also be viewed as a feature selection process.Figure 3
Classification-boosting algorithm.


## 4. Experimental Results and Discussion

### 4.1. Experimental Work and Results

This part of the paper describes the experiments that were carried out and the simulation results that were obtained because of those experiments. Several simulation experiments were carried out on art image classification using an improved AdaBoost algorithm. To assess the efficacy and standardization of image classification, in this section, high-quality, standard, open, and universal image datasets are used. These datasets consist of 10471 images to conduct classification experiments, and these images are randomly categorized into 2 parts, which are used as training data and test data, respectively. The training data consist of 6971 images, while the test data consist of 3478 images. Table1 depicts the image dataset. An art image classification model was developed for using it in the real world. Note that all experiments were carried out on a laptop (Intel Core-i5, 11th generation, having a processor of 2.7 GHz, RAM of 32 GB, and Windows 7 OS).Table 1
Summary of image data.
NameImage categoryNo. of training imagesNo. of testing imagesCartoons—27351412Photorealistic imagePaintings815408Photos33211665Figure4 illustrates the summary of images selected for the experimental work. These images were of two kinds, i.e., cartoons images and photorealistic images. The photorealistic images consisted of painting images and simple photos. To achieve better accuracy, these images were divided into two sets: one is the training set while other is the test set. A total of 4147 cartoon images were taken and divided into training set and test set. The training set consists of 2735 cartoon images while test set consists of 1412 cartoon images. Besides, the painting images of photorealistic images were divided into training and testing sets (i.e., training set = 815 painting images and test set = 408). Similarly, the photo category of photorealistic images is also divided into training and testing sets (i.e., training set = 3321 painting images and test set = 1665).Figure 4
Summary of image data.These images come from several websites. The cartoon images and Chinese traditional paintings were downloaded fromhttp://www.sucaiw.com, and world famous paintings were downloaded from http://www.liuzhong.xm.fj.cn/xkzyk/jxzyk/art. Similarly, the natural images were downloaded from http://wang.ist.psu.edu/image. Cartoon images include cartoon icons, cartoon paintings, etc., as shown in Figure 5; paintings are composed of world famous paintings and Chinese traditional paintings, as shown in Figure 6; photos are composed of natural scenery, world famous paintings, Chinese traditional paintings, characters, and animals, plants, buildings, etc., as shown in Figure 7.Figure 5
Cartoon image.Figure 6
Natural scenery in real word.Figure 7
Traditional paintings.It can be seen from the test results that the first basic combination of image features has the highest test accuracy rate of 91.8%. After adding the color moments of the RGB and HSV color spaces, the composition is the second feature combination. The experimental result is that the highest test accuracy is 94.1%, and the test accuracy is improved by more than 2% compared with the first group of experiments. In paintings and photographs, the feature of color brightness is also very useful for classification. The third feature combination adds a color histogram in the RGB space based on the second feature combination. At the beginning, the accuracy rate has been improved, and the highest accuracy rate is 92.5%, but there is a phenomenon of overfitting. Also, the accuracy rate dropped quickly. The fourth feature combination (6 feature combinations) adds a new feature on the basis of the previous combinations, that is, the color variance histogram in the RGB space. The result is the best, and the highest test accuracy is reached (97.0%), which is 5.2% higher than the first feature combination. Finally, a set of experiments was conducted. Based on the first feature combination, only adding the color variance histogram in the RGB space, the highest test accuracy reached 95.8%, which is higher than the test accuracy of the first feature combination (4%). Table2 describes the relevant data of the node with the highest test accuracy in the experimental results of cartoon image.Table 2
Picture classification prediction.
Feature combinationNumber of weak classifiersTP (%)FN (%)FP (%)TN (%)122093.16.912.687.4234096.44.6128835093.56.513.186.943009827.592.5540097.12.91189Figure8 explains the classification prediction of the system based on the obtained confusion matrix:(9)confusion matrix=44.355.612.2947.75.Figure 8
Picture classification.The accuracy of the improved AdaBoost algorithm was calculated using this confusion matrix. Accuracy is the percentage of correct predictions based on the test data. It can be calculated by dividing the number of correct predictions by the total number of predictions, as shown in the following equation:(10)accuracy=TP+TNTP+FP+TN+FN.The accuracy obtained is listed in Table3. The table shows that the lowest accuracy rate of 50 weak classifiers was achieved during feature combination 3, which was 92.5%, but the highest accuracy rate was reached for 300 weak classifiers during feature combination 4, which was 98. So, the proposed algorithm achieved above 97% accuracy by average.Table 3
Picture classification prediction accuracy.
Feature combinationNumber of weak classifiersAccuracy (%)TP (%)FN (%)FP (%)TN (%)122092.793.16.912.687.4234095.196.44.6128835092.593.56.513.186.94300989827.592.5540094.697.12.91189Figure9 describes the accuracy of the proposed improved AdaBoost algorithm for various values obtained in confusion matrix by performing multiple experiments.Figure 9
Accuracy of picture classification.


### 4.2. Discussion

Using the extracted feature and the boosting algorithm, training was conducted on the image training set and then the image test set was tested. According to the above analysis, the following feature combinations were designed to verify the color variance proposed. The histogram and the CM of the HSV color space distinguish the color brightness. The following is the combination of features proposed in this study. Like previous research, the two features of CM LUV and EDH were combined as a reference for experimental data, namely, CM LUV + EDH, with 475 dimensional features. CM of the other two color spaces were added to compare with the first experiment, namely, CM LUV + CM RGB + CM HSV + EDH, with 775 dimensional features. There are five features combined together, namely, three color space CM, one EDH, and one RGB color space histogram, that is, LUV CM + RGB CM + HSVCM + EDH + HSTRGB, with a total of 2375 dimensional features. Put the RGB space color variance histogram to see the impact of this feature on image classification. A total of 6 features have been combined, namely, LUV CM + RGB CM + HSVCM + EDH + HSTRGB + VHSTRGB, with a total of 3975 dimensional features.Cartoon images and photorealistic images are classified and learned on the training set, and the trained classifier is used to classify the test data. The test data here are all the same. The classification accuracy rate on the test data is shown in Figure10.Figure 10
Classification results of cartoons.As shown in Figure10, the vertical axis Y represents the accuracy of test classification (%), from 60% to 100%. The horizontal axis shows that the boosting algorithm was used, and the number of weak classifiers selected ranges from 20 to 400.


## 4.1. Experimental Work and Results

This part of the paper describes the experiments that were carried out and the simulation results that were obtained because of those experiments. Several simulation experiments were carried out on art image classification using an improved AdaBoost algorithm. To assess the efficacy and standardization of image classification, in this section, high-quality, standard, open, and universal image datasets are used. These datasets consist of 10471 images to conduct classification experiments, and these images are randomly categorized into 2 parts, which are used as training data and test data, respectively. The training data consist of 6971 images, while the test data consist of 3478 images. Table1 depicts the image dataset. An art image classification model was developed for using it in the real world. Note that all experiments were carried out on a laptop (Intel Core-i5, 11th generation, having a processor of 2.7 GHz, RAM of 32 GB, and Windows 7 OS).Table 1
Summary of image data.
NameImage categoryNo. of training imagesNo. of testing imagesCartoons—27351412Photorealistic imagePaintings815408Photos33211665Figure4 illustrates the summary of images selected for the experimental work. These images were of two kinds, i.e., cartoons images and photorealistic images. The photorealistic images consisted of painting images and simple photos. To achieve better accuracy, these images were divided into two sets: one is the training set while other is the test set. A total of 4147 cartoon images were taken and divided into training set and test set. The training set consists of 2735 cartoon images while test set consists of 1412 cartoon images. Besides, the painting images of photorealistic images were divided into training and testing sets (i.e., training set = 815 painting images and test set = 408). Similarly, the photo category of photorealistic images is also divided into training and testing sets (i.e., training set = 3321 painting images and test set = 1665).Figure 4
Summary of image data.These images come from several websites. The cartoon images and Chinese traditional paintings were downloaded fromhttp://www.sucaiw.com, and world famous paintings were downloaded from http://www.liuzhong.xm.fj.cn/xkzyk/jxzyk/art. Similarly, the natural images were downloaded from http://wang.ist.psu.edu/image. Cartoon images include cartoon icons, cartoon paintings, etc., as shown in Figure 5; paintings are composed of world famous paintings and Chinese traditional paintings, as shown in Figure 6; photos are composed of natural scenery, world famous paintings, Chinese traditional paintings, characters, and animals, plants, buildings, etc., as shown in Figure 7.Figure 5
Cartoon image.Figure 6
Natural scenery in real word.Figure 7
Traditional paintings.It can be seen from the test results that the first basic combination of image features has the highest test accuracy rate of 91.8%. After adding the color moments of the RGB and HSV color spaces, the composition is the second feature combination. The experimental result is that the highest test accuracy is 94.1%, and the test accuracy is improved by more than 2% compared with the first group of experiments. In paintings and photographs, the feature of color brightness is also very useful for classification. The third feature combination adds a color histogram in the RGB space based on the second feature combination. At the beginning, the accuracy rate has been improved, and the highest accuracy rate is 92.5%, but there is a phenomenon of overfitting. Also, the accuracy rate dropped quickly. The fourth feature combination (6 feature combinations) adds a new feature on the basis of the previous combinations, that is, the color variance histogram in the RGB space. The result is the best, and the highest test accuracy is reached (97.0%), which is 5.2% higher than the first feature combination. Finally, a set of experiments was conducted. Based on the first feature combination, only adding the color variance histogram in the RGB space, the highest test accuracy reached 95.8%, which is higher than the test accuracy of the first feature combination (4%). Table2 describes the relevant data of the node with the highest test accuracy in the experimental results of cartoon image.Table 2
Picture classification prediction.
Feature combinationNumber of weak classifiersTP (%)FN (%)FP (%)TN (%)122093.16.912.687.4234096.44.6128835093.56.513.186.943009827.592.5540097.12.91189Figure8 explains the classification prediction of the system based on the obtained confusion matrix:(9)confusion matrix=44.355.612.2947.75.Figure 8
Picture classification.The accuracy of the improved AdaBoost algorithm was calculated using this confusion matrix. Accuracy is the percentage of correct predictions based on the test data. It can be calculated by dividing the number of correct predictions by the total number of predictions, as shown in the following equation:(10)accuracy=TP+TNTP+FP+TN+FN.The accuracy obtained is listed in Table3. The table shows that the lowest accuracy rate of 50 weak classifiers was achieved during feature combination 3, which was 92.5%, but the highest accuracy rate was reached for 300 weak classifiers during feature combination 4, which was 98. So, the proposed algorithm achieved above 97% accuracy by average.Table 3
Picture classification prediction accuracy.
Feature combinationNumber of weak classifiersAccuracy (%)TP (%)FN (%)FP (%)TN (%)122092.793.16.912.687.4234095.196.44.6128835092.593.56.513.186.94300989827.592.5540094.697.12.91189Figure9 describes the accuracy of the proposed improved AdaBoost algorithm for various values obtained in confusion matrix by performing multiple experiments.Figure 9
Accuracy of picture classification.


## 4.2. Discussion

Using the extracted feature and the boosting algorithm, training was conducted on the image training set and then the image test set was tested. According to the above analysis, the following feature combinations were designed to verify the color variance proposed. The histogram and the CM of the HSV color space distinguish the color brightness. The following is the combination of features proposed in this study. Like previous research, the two features of CM LUV and EDH were combined as a reference for experimental data, namely, CM LUV + EDH, with 475 dimensional features. CM of the other two color spaces were added to compare with the first experiment, namely, CM LUV + CM RGB + CM HSV + EDH, with 775 dimensional features. There are five features combined together, namely, three color space CM, one EDH, and one RGB color space histogram, that is, LUV CM + RGB CM + HSVCM + EDH + HSTRGB, with a total of 2375 dimensional features. Put the RGB space color variance histogram to see the impact of this feature on image classification. A total of 6 features have been combined, namely, LUV CM + RGB CM + HSVCM + EDH + HSTRGB + VHSTRGB, with a total of 3975 dimensional features.Cartoon images and photorealistic images are classified and learned on the training set, and the trained classifier is used to classify the test data. The test data here are all the same. The classification accuracy rate on the test data is shown in Figure10.Figure 10
Classification results of cartoons.As shown in Figure10, the vertical axis Y represents the accuracy of test classification (%), from 60% to 100%. The horizontal axis shows that the boosting algorithm was used, and the number of weak classifiers selected ranges from 20 to 400.


## 5. Conclusion

Through the analysis of various images in the image library, this paper proposes to use the characteristics of the color variance histogram to classify cartoon images/realistic images and to express the variance of the color distribution after quantization in the color space, as a reference feature for classification. Experiments have proved that in image classification, the new feature color space variance histogram proposed in this paper has a good effect on the classification of cartoon images/realistic images and the classification of painting images and photo images, which can improve the classification accuracy. In the process of researching painting images/photographic images, it is found that the brightness of tones is also a very important difference for different types of images. Generally, the paintings are slightly dim. This study uses the color moments of RGB and HSV space to improve the accuracy of image classification. Experiments show that these two features also have an obvious role in distinguishing images.



---

*Source: 3480414-2021-09-06.xml*