Investigation into color designs of product packaging through visual evaluations using machine learning methods

. For a commodity, in addition to its quality, its external package is also very essential. This paper brie ﬂ y introduced the intelligent support vector machine (SVM) algorithm for color design of paper packaging. The features were extracted from photos of packages using scale-invariant feature transform (SIFT), and the intelligent algorithm was trained and tested using photos of paper packaging for ceramic products collected at the ceramic crafts market as a sample set. Two paper package schemes designed in this study were used for further test. The SVM algorithm was compared with the back-propagation (BP) algorithm and the convolutional neural network (CNN) algorithm. The results showed that the three intelligent algorithms could evaluate the color design of paper packages, but the SVM algorithm was more accurate than the BP and CNN algorithms in evaluating the imagery of color design, both for the samples collected in the craft market and for the paper packaging scheme designed in this paper.


Introduction
With the development of the economy, people's material standard of living has improved by leaps and bounds, and the industrialized production mode has greatly increased the types of commodities. The increase in the variety of goods has enriched consumers' shopping choices, and it has made the competition between different brands of the same type of goods more intense [1]. Packaging is the external decoration of goods, and excellent packaging can enhance the attractiveness and sales of goods [2]. Ceramics, the specialty of Jingdezhen, is taken as an example. There are various materials that can be used for ceramic product packaging, among which paper is widely used because of the advantages it possesses. For ceramics, paper packages have the advantages of low cost, convenient modeling and processing, simple pattern printing, etc. In particular, the pattern design of paper packages can further enhance the ornamental and collection values of ceramics. In the pattern of paper packages, although line modeling is very important, people usually pay attention to the color design of the pattern first. Different pattern color designs will give different imagery representations, and these imagery representations will form combinations with ceramic crafts to enhance the ornamental value [3]; therefore, it is very important to evaluate the color design for packaging of ceramic products. An accurate color design evaluation can guide the color design for packaging better. Shen et al. [4] proposed a method to measure color harmony and verified the effectiveness of the method through experiments. To reduce the dependence on designer's experience or other professional knowledge in product color design and obtain a color scheme meeting users' perceptual needs, Yuan et al. [5] proposed a method based on perceptual engineering (KE) and interactive genetic algorithm (IGA). The example analysis results showed that the scheme could obtain a satisfactory color scheme. Kawakami et al. [6] studied the automatic color arrangement method based on Gaussian distribution histogram matching. The experimental results showed that the visual perception of the image processed by the color arrangement method significantly improved. This paper briefly introduced the intelligent support vector machine (SVM) algorithm used for evaluating colors of paper packaging. The SVM algorithm used scale-invariant feature transform (SIFT) as the image recognition feature. The SVM algorithm was tested on the photos of paper packages for ceramic products collected from the ceramic commodity market and the photos of paper packaging designed in this study and compared with the back-propagation (BP) algorithm and the convolutional neural network (CNN) algorithm to verify the effectiveness of the SIFT-based SVM algorithm in evaluating the color design of paper packages. The final results verified that the SIFT-based SVM algorithm could effectively evaluate the color design of paper packaging for ceramic products. This study identified the design of packages with the SVM algorithm instead of the manual recognition method, which improves the evaluation efficiency of packaging design and provides a more effective guidance for packaging design.

Color evaluation of paper packaging
When the ceramic handicraft itself has appreciation values, although it can also attract consumers, adding an excellent package can further enhance its value [7]. The types of materials that can be used for commodity packaging include plastics, metals, and even ores. Paper has the advantages of low cost, easy processing, and simple printing; therefore, it has been more widely used in commodity packaging. Paper packaging has a wide range of choices in appearance design because of the simple printing and texture features of paper. Package pattern is the decoration of commodity packages, and the excellence of package patterns not only depends on the shape of the patterns but also depends on the color design of the patterns and the whole package.
When consumers choose goods, they usually observe the appearance of the goods through vision firstly. Compared with the lines of the packaging pattern, it is easier to notice colors with larger areas. Different colors will bring people different emotional feelings, and the color design of the pattern in the package will convey the emotion to consumers. On the one hand, excellent color design for packaging can directly attract the attention of consumers; on the other hand, the imagery conveyed by the color design can also foil ceramic crafts [8]. Therefore, for commodity packaging, color design for packaging is also an important part. An accurate evaluation of color design in different preferences of consumers can provide an effective reference direction for color design and enhance the attractiveness of commodity packaging to consumers.

Evaluation of paper packaging based on SVM
The color design of paper packages does not follow the fixed formula law like science. Although there will be relevant restrictions in the design process to ensure that the design scheme will not go wild, it still depends on the designers' perceptual knowledge of the pattern color, and evaluations of designers and consumers on the design scheme is also based on the perceptual knowledge; as a result, the evaluation feedback of color design schemes is fuzzy and perceptual, which is not conducive to the optimization of package color design. With the development of computer technology, intelligent algorithms have been applied to evaluating color design, which is fuzzy and perceptual.
As the scheme of color design for paper packaging is not a mass product, the number of schemes to be evaluated is generally not too many, i.e., it is a small-sample recognition; therefore, this study selected SVM [9], which is more suitable for small-sample classification, to evaluate the color design scheme of packaging. The classification principle of SVM for a sample set is as follows. The hyperplane of the space where the sample is divided is searched in the vector space where the coordinate axis is the characteristic quantity of the sample. The dimension of the vector space depends on the number of coordinate axes, and the number of coordinate axes depends on the number of feature types used for judging sample types.
In this study, the design scheme of paper packaging for ceramic products was evaluated by SVM. The training and use process after training are shown in Figure 1.
○ 1 Photos of paper packages for ceramic products are collected as a sample set of the color design scheme. In the sample set, every photo of paper packaging has a label. The label content is the imagery representation of color design conveyed to consumers through visual communication, i.e., the visual feeling of packaging color to consumers, such as cold and warm, light and dark, dynamic and static, sense of technology, etc.
○ 2 Color features are extracted from the photos of paper packaging. The SIFT feature is selected in this study [10]. The descriptor of this feature is invariant in illumination, rotation, scale, etc., which means that the same feature can be obtained in the face of the same package under different illuminations, shooting angles, and shooting distances, which reduces the shooting requirements of the package color design to be evaluated and makes the evaluation model more universal. The steps of SIFT feature extraction are as follows. Firstly, the image is convoluted by a twodimensional Gaussian function with variable scale to obtain the corresponding scale space; then, a Gaussian difference pyramid is constructed using the DoG operator [11]. The formula of the DoG operator is: Dðx; y; sÞ ¼ ðGðx; y; ksÞ À Gðx; y; sÞÞ Â Iðx; yÞ; ð1Þ where D(x, y, s) is the DoG operator whose scale factor is s, G(x, y, s) and G(x, y, ks) are the Gaussian filter function whose scale factor is s and the Gaussian filter function at the adjacent scale, and I(x, y) is the original image. The local extremum point of an image in every scale in the Gaussian difference pyramid constructed by the DoG operator is searched. The selection criterion of the local extremum point is that the point should be larger or smaller than all points in the same scale and adjacent scale image. Taking the extremum point in every layer of an image in the pyramid as the center, the appropriate neighborhood is selected, and the pixel gradient within the neighborhood of every extremum point is calculated and counted, including gradient value, gradient modulus value, and gradient direction. The corresponding calculation formulas are: See equation (2) below.
where gradI(x, y) is the gradient of pixels, m(x, y) is the modulus corresponding to the pixel gradient, u(x, y) is the direction corresponding to the pixel gradient, and L(x, y) is the grayscale of the pixel. After calculating the gradient in the neighborhood of the extremum point according to equation (2), the pixel gradient is grouped and accumulated every 10°to construct a gradient histogram; finally, the histogram corresponding to the main direction of each extremum point and the histogram of the direction greater than 80% of the gradient peak value in the main direction is combined into a SIFT feature. ○ 3 The extracted SIFT features of the samples are divided into a training sample set and a test sample set, and the SVM classification function is trained and fit by the training samples. The SVM classification function is: where a i is the Lagrange coefficient, x i is the feature vector of sample i, y i is the category label of sample i, K(x i , x) is the kernel function [12], which is used for mapping the feature vector to the high-dimensional space to reduce the nonlinear degree of sample feature distribution, and b is the bias term. ○ 4 After SVM training, the SVM model is tested with the test training set, and the classification results are output.

Case analysis 3.1 Experimental environment
In this study, the color design evaluation algorithm of paper packaging for ceramic products based on SVM was simulated using MATLAB software [13]. The experiment was carried out by a server in a laboratory. The configurations of the server were Core i7 processor, 32G memory, and Windows 7 operating system.

Experimental data
The main purpose of this paper is to build an algorithm that can objectively evaluate the color design of paper packaging of ceramic products from the perspective of visual communication through machine vision. In this study, the SIFT feature of an image was selected as the basis for judging the quality of color design, and the color design was evaluated according to SIFT. As a machine learning algorithm, the SVM algorithm needed corresponding training before evaluating the color design of paper packages. To train the SVM algorithm, it needed to collect enough training samples.
Several paper packages for ceramic products were photographed at the Jingdezhen ceramic crafts market. Each kind of package were photographed from multiple angles to ensure the diversity of training samples. Every angle of the photo was rotated, symmetrical, and tilted, respectively. Three hundred photos of paper packages for ceramic products were collected, and 1800 photos were obtained after transformation. In addition to the sample photos collected from the handicraft market for training and testing, the color design scheme of paper packages for ceramic products designed in this study was also included, as shown in Figure 2; Figure 2 is also part of the sample set. The design scheme of paper packaging for ceramic products designed in this study was mainly used to further verify the intelligent evaluation effect of the SVM algorithm on the color design of paper packaging.

Experimental methods
(1) Sample pretreatment of paper package color design.
When machine learning algorithms such as the SVM algorithm are trained, the training samples need to have result labels to be judged by the algorithm. In this study, the purpose of using the SVM algorithm is to quickly and objectively evaluate the color design scheme; therefore, gradIðx; yÞ ¼ ∂I ∂x ; ∂I ∂y mðx; yÞ ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi ðLðx þ 1; yÞ À Lðx À 1; yÞÞ 2 þ ðLðx; y þ 1Þ À Lðx; y À 1ÞÞ 2 q uðx; yÞ ¼ tan À1 ⌈ Lðx; y þ 1Þ À Lðx; y À 1Þ Lðx þ 1; yÞ À Lðx À 1; yÞ ⌉ the sample set needed to have the evaluation tag corresponding to the scheme. However, when the paper package was photographed to collect the color design samples, the evaluation labels would not be obtained simultaneously; thus, the samples needed to be manually marked. This paper evaluated the samples in the form of a questionnaire. The questionnaire was distributed to 100 randomly selected volunteers. The average age of the volunteers was 20 ± 1 years, and the 50 males and 50 females all engaged in industries related to package design. The main content of the questionnaire is shown in Table 1. Table 1 shows that the imagery evaluation of the color design of each paper packaging for ceramic products, and there were six aspects. Every aspect of evaluation included positive and negative imageries. The imagery bias of the color design was measured by the Likert scale [14]; the larger the number was, the closer the positive imagery was. The final statistical evaluation result was that the average value of the Likert scale was used when the sample was given six aspects of imagery evaluation labels. As the evaluation of the design of paper packaging is relatively subjective, the questionnaire was used. To make the evaluation as objective as possible, the evaluation results of the 100 randomly selected volunteers were recorded. The Likert scale was used as the scoring mode because it is a common method for evaluating imagery tendency and has been verified reliable by most users. The six imageries shown in Table 1 were the first six imageries that were paid more attention to in another questionnaire.
(2) Training and testing of the SVM algorithm for evaluating the color design of paper packaging.
The collected and expanded samples were divided into a training set and a test set, in which the training set accounted for 60% of the total samples and the test set accounted for 40% of the total samples. The SVM algorithm was trained by the training set, and the related parameters of the SVM algorithm are as follows. The kernel function and penalty parameter were selected by the K-fold cross-validation method, and the sigmoid function was selected as the kernel function, and the penalty parameter was 1.
In addition to training the SVM algorithm and testing it with the test set, the BP neural network algorithm was used for comparison. The BP neural network algorithm is a traditional neural network algorithm, which fits the nonlinear law by projecting feature data in a highdimensional space with a nonlinear activation function. The basic working principle of the BP neural network algorithm is to input the extracted SIFT image features in the input layer, perform forward calculation on the image features through the activation function in the hidden layer, and get the calculation result in the output layer. If it is in the training stage, the hyperparameters in the hidden layer are adjusted reversely according to the error between  the calculated results obtained in the output layer and the actual results. After training, the hyperparameters are fixed, the image features to be detected are input in the input layer, and the recognition result is obtained by forward calculation. The relevant parameters of the BP neural network algorithm are as follows: the initial weight was generated randomly between (-1,1), the activation function was sigmoid, and the learning rate was set as 0.1. In addition to using the BP neural network for comparison, this study also used the more commonly used CNN algorithm in image recognition for comparison. The basic principle of the CNN algorithm for image recognition is to use convolution kernels in the convolution layer to convolve the image to obtain image convolution features, pool and compress the convolution features in the pooling layer to reduce the calculation amount, repeat the convolution and pooling operations on the compressed convolution feature image, and classify the image in the fully connected layer to obtain the recognition result. If it was in the training process, the hyperparameters in the convolutional layer would be adjusted reversely according to the error between the calculated result and the actual result. After training, the hyperparameters were fixed, the image to be recognized was input into the algorithm, and the recognition result was obtained after convolution, pooling, and full connection operations. The basic parameters of the CNN algorithm are as follows: the size of the input image in the input layer was 500 Â 500 pixels, 12 convolution kernels with a size of 2 Â 2 were used in the convolutional layer, the activation function used in the convolution calculation was the sigmoid function, meanpooling was used in the pooling layer, the size of the pooling box was 3 Â 3, the fully connected layer used the softmax function, and the output layer had six nodes.
The SVM, BP, and CNN algorithms were trained by the training set and tested by the test set. Finally, to further verify the practical application effect of the SVM algorithm in evaluating the color design of paper packaging for ceramic products, it was tested by the two design schemes designed in this study. The consistency between the algorithm evaluation result and the actual evaluation result was evaluated using the Kappa value when the performance of the algorithms was tested using the test set. The calculation of the Kappa value was based on the confusion matrix, which can be used for measuring classification accuracy. The calculation formula is: where p o is the proportion of the number of samples correctly classified in the total number of samples, p e is the proportion of the sum of the product of the real number of every class of samples and the predicted number of every class of samples in the square of the total number of samples, a C is the real number of class C samples, b C is the predicted number of class C samples, and n is the total number of samples. The calculated Kappa value was between À1 and 1; however, the Kappa value is usually between 0 and 1 in the process of actual use, 0-0.20 for extremely low consistency, 0.21-0.40 for general consistency, 0.41-0.60 for moderate consistency, 0.61-0.80 for high consistency, and 0.81-1 for complete consistency.

Experimental results
In order to test the recognition performance of the SVM algorithm on the imagery of packaging, this study used the BP neural network algorithm and the CNN algorithm to conduct comparative experiments and used the Kappa value to measure the recognition accuracy of the three recognition algorithms. The final results are shown in Figure 3. Firstly, under a single imagery, the Kappa value of the BP neural network algorithm was the lowest, that of the CNN algorithm was higher, and that of the SVM algorithm was the largest. After comparing the Kappa values between different imageries under the same recognition algorithm, it was found that the recognition performance of the three recognition algorithms for different imageries was not much different, i.e., the three recognition algorithms could make an effective judgment when evaluating the six imageries of the package patterns and produced no bias on the recognition of imageries. In general, the SIFT-based SVM algorithm had higher accuracy in imageries recognition and judgment of packaging, followed by the CNN algorithm and the BP neural network algorithm. The photos of the paper packages collected at the ceramic crafts market were used as the sample set to train and test the three intelligent evaluation algorithms, and the final results are as shown above. To further verify the SVM algorithm, two design schemes of paper packaging for ceramic products were also used for testing. The two schemes are shown in Figure 2; the red one on the left was Scheme 1, and the dark one on the right was Scheme 2. The actual evaluation of two paper package design schemes also was obtained by a questionnaire survey, and the average values were taken as the final evaluation. The two schemes were evaluated by the three intelligent evaluation algorithms, and the final results are shown in Table 2. The imagery evaluation results of two intelligent evaluation algorithms in Table 2 were compared with the actual evaluation results. As to Scheme 1, evaluations on imagery 1, 2, and 4 by the BP algorithm were different from the actual ones, evaluations on imagery 3 and 4 by the CNN algorithm was different from the actual evaluations, and the evaluation on imagery 6 by the SVM algorithm was different from the actual one; as to Scheme 2, evaluations on imagery 1, 2, 4, and 5 by the BP algorithm were different from the actual evaluation, evaluations on imagery 3 and 4 by the CNN algorithm were different from the actual evaluations, and only the evaluation on imagery 2 by the SVM algorithm was different from the actual result.

Conclusion
This paper briefly introduced the intelligent SVM algorithm for color design imagery evaluation of paper packaging. The SIFT feature of package photos was extracted. The intelligent algorithm was trained and tested using the sample set, i.e., the photos of paper packaging for ceramic products collected in the ceramic crafts market. The two paper package schemes were used for further test, and the SVM algorithm was also compared with the BP algorithm and the CNN algorithm. The final results are as follows: (1) the SVM algorithm had a higher accuracy than the BP algorithm and the CNN algorithm in evaluating the color imagery of the sample set; (2) in evaluating two design schemes of paper packaging for ceramic products, the results obtained by the SVM algorithm were closer to the actual evaluation results than those obtained by the BP algorithm and the CNN algorithm. The limitation of this paper is that only paper packaging for ceramic products is evaluated by the intelligent algorithm, and the sample set of paper packaging for ceramic products was used for training the intelligent algorithm to make it more suitable for evaluating paper packaging for ceramic products but difficult to make accurate evaluation when facing other packaging. Therefore, the future research direction is to expand the training samples of the intelligent algorithm and make adjustments to the intelligent algorithm so that it can be more generalized to evaluate different packaging color schemes. Table 2. Color imagery evaluation of the two schemes designed in this study by three intelligent algorithms. Color scheme 1 of paper packaging for ceramic products Color scheme 2 of paper packaging for ceramic products (Fig. 2, right) Actual Likert scale