* Design of tourism package with paper and the detection and recognition of surface defects – taking the paper package of red wine as an example

In the tourism industry, the sales of local specialties is an important part, and the package design and integrity of the specialties are very important. This paper first introduced the support vector machine (SVM) algorithm that was used for detecting defects on the surface of paper packages. Then, the design of red wind packages was briefly described, and the simulation experiment was carried out on SVM algorithm using red wine packages with different degrees of surface defects. Proper parameters were tested using the k-fold cross-validation method. The results demonstrated that the properties of paper improved the value of packages and the SVM algorithm had better accuracy than artificial recognition in recognizing different degrees of defects on the surface of packages. In conclusion, this paper describes the application of paper in packages and provides an effective method for the defection of defects on the surface of packages. This study provides an effective references to the improvement of package values and the enhancement of package integrity.


Introduction
When using paper for packaging, not only the natural texture of paper can be used as decoration to enhance the ornamental value of the product packages, but also the writability of paper enables the paper package to print different text patterns on the outer layer to enhance the added value or attractiveness of the product [1]. Although paper has the above advantages, it also has corresponding disadvantages in practical application. For example, the raw material of paper is wood, and waste water will be produced during the production process. In addition, the paper package is relatively easy to be damaged. Once the surface of the package is damaged, it will affect the beauty and reduce the value, and the sealing of the package will be affected seriously, thus speeding up the inferior quality of the products; therefore, it is necessary to detect the surface defects of packages and repair the defects in time. Zhou et al. [2] proposed a surface defect detection framework that combined entropy rate superpixel circle detection, frequency tuned saliency detection, and defect detection based on the wavelet transform and multi-scale filtering algorithm. The experimental results showed that the framework could reduce the influence of texture and improve the robustness of positioning error compared with many traditional methods. Xiao et al. [3] proposed an image pyramid convolution neural network (IPCNN) model to detect surface defects in images and verified the effectiveness of the method in the experiment of comparing with other defect detection methods. He and Liu [4] proposed a general industrial defect detection framework based on regression and classification and verified the detection precision and efficiency of the method through experiments. Zheng et al. [5] introduced a new loss function calculation method while expanding the complex data by following the hybrid matching rule and proposed a convolution neural network based on a residual structure to achieve accurate defect detection. The simulation results showed that the method had good performance. Aiming at the limitation of defect samples in production, Liu et al. [6] proposed a generative adversarial network-based general defect sample simulation method. The experimental results showed that the method could significantly improve the performance of the deep learning when applied to surface defect detection. The literatures mentioned above all provide corresponding schemes for surface defect detection and test and verify these schemes, which provides effective references for surface detection. In this paper, the paper package that was used for improving the sales of products in the tourism industry was briefly introduced. Then, the surface defects of packages were detected by the support vector machine (SVM) algorithm, and the simulation experiment was carried out on the algorithm. The final results showed that the SVM algorithm could identify the surface defects of packages more accurately and quickly than artificial recognition. This paper supplements the surface defect detection methods of tourism packages and provides an effective reference for the integrity of tourism packages. The innovation of this paper is quickly detecting the surface damage of paper packages with the SVM algorithm to quickly test the integrity of commodity packages and improve the quality detection efficiency of paper packages as much as possible. The overall structure of this article is as follows. The introduction reviewed some relevant literature to introduce paper packages and package surface damage detection methods. The second chapter briefly describes the application of paper in tourism packaging. The third chapter describes the algorithm that was used for detecting the surface defects of paper packages. The fourth chapter shows an analysis of the structural design by taking the red wine paper packages as an example and a test on the surface damage detection algorithm. The last chapter summarizes the analysis results of the fourth chapter.

Application of paper in tourism packages
When traveling, different tourist attractions not only have beautiful scenery, but also local characteristic products. Or in other words, what supports tourism is not only the scenery that can be visited, but also the local subsidiary industries [7]. For example, when tourists come to a tourist attraction, they usually buy some local products in the local shops as souvenirs or gifts. These products are one of the subsidiary industries supporting the tourism industry. The sales promotion of local specialty products can promote the development of tourism, and the quality of product packages can directly affect the sales volume, especially the packages of characteristic products in the tourism industry. The reason is that tourists usually visit the scenic spots for the first time and do not know much about the local characteristic products and the outer package of the products is more direct. An attractive package can greatly enhance tourists' purchasing desire [8].
The above package for tourism products is generally known as tourism packages. This kind of packing is usually more attractive in appearance. The target group of tourism packages is generally tourists who come to scenic spots. Sellers generally hope that tourists can buy more specialty products as much as possible. Tourists also hope that the products can be light enough in addition to cheap goods to not affect the tour or return journey. Therefore, tourism packages will generally develop to lightweight [9]. Compared with plastic, paper has the same guarantee in portability, has plasticity not weaker than plastic, and is easier to degrade. Also, paper packages have natural and social attributes. The natural attributes of paper packages include the protection function of preventing product damage, the convenience function of reducing the difficulty of transportation, the distinguishing function of distinguishing different products, and the promotion function of enhancing the attractiveness of products [10]. The social attributes of paper packages include the cultural attribute of satisfying consumers' pleasant psychology, the decorative attribute of improving the beauty of the environment, and the public attribute of promoting social, spiritual benefits.
After the application of paper in tourism packages, tourism packages reflect their natural and social attributes with the help of paper properties to attract tourists to buy. Although paper tourism packages can enhance the added value of products with its natural and social attributes, its shortcomings will also affect the value of products. One of the important points is that the paper package is relatively easy to be damaged. Once the surface of the paper package is damaged, it will affect the beauty and reduce the added value. If the paper package is used to seal the perishable products, the damage of the package means that the product is more likely to deteriorate. For paper tourism packages, the surface damage of packages is a major defect affecting the quality and attractiveness of packages. To ensure the integrity and attractiveness of the surface of paper tourism packages, it is necessary to detect the surface defects quickly.
There are many methods to detect the defects on the package surface. In this study, the SVM algorithm was selected to detect the package surface. The SVM algorithm is a machine learning algorithm mainly used for classification in machine learning. Its basic principle is to search the hyperplane in the vector space used for classification, segment the samples in the space through the hyperplane, and make each sample far away from the plane as far as possible. The SVM algorithm uses a training sample set for classification training, i.e., fitting the hyperplane. The basic steps of fitting the hyperplane are as follows. First, the features of samples are extracted; second, to make the features of samples as linear as possible in the vector space, the kernel function maps the features of samples in high dimension, and then the hyperplane is fitted gradually by using the features of samples.
The advantage of classifying with the SVM algorithm lies in its simple principle and fast classification. When the samples that need to be classified have their coordinates in the vector space, the SVM algorithm can be directly used for training and testing. However, the classification object of the SVM algorithm in this study is the package with surface defects, which belongs to image recognition, and the image itself does not have the coordinates that can be directly referenced by the vector space of the SVM algorithm. Thus, it is necessary to extract the feature vector of an image before recognizing the image with the SVM algorithm. The feature vector reflects the characteristics of an image, and its quality will directly affect the classification performance of the SVM algorithm. In this study, histogram of oriented gradient (HOG) feature was selected as the recognition feature of images. Its basic principle is that the gradient of pixels or the directional density of edge in an image can describe the appearance and shape of edge effectively. The advantage of using the HOG feature as the recognition feature is that the feature has good invariance when facing the images from different angles of the same recognition object.
In this study, the surface defects of packages are recognized by a SVM algorithm [11]. The main process is shown in Figure 1. Whether training the SVM algorithm or using the SVM algorithm, the feature extraction of package surface images is needed in surface defect recognition. In this study, the HOG features [12] are used for recognition and classification. The specific process is as follows: (1) The image of a package is captured by a camera and then preprocessed, including graying.
(2) HOG features were extracted from the preprocessed image. The specific extraction method is as follows.
The gradient value, gradient intensity, and gradient direction of pixels in the image are calculated, and then the image is divided by taking 4 × 4 pixels as a cell. The HOG of every cell is calculated. The cells are combined as a block to obtain the HOG of the block. Then all blocks are processed by normalization using the deviation standardization method and combined in order to obtain the HOG feature vector of the whole image. (3) After feature extraction of the image, in the training stage of the recognition model, the extracted features are constructed as the training set and then input into SVM. Appropriate kernel function and penalty parameters are selected to calculate the decision function. The calculation formula of the decision function is: where a is the set of a i , a i is the Lagrangian coefficient [13], l is the sample size, K x x , i j ( ) is the kernel function [14], C is the penalty parameter, y i is the classification result, and x i is the sample data.
(4) After the training, the HOG features are extracted from the surface image of the tourism package to be detected according to (1) and (2) and input into the trained SVM algorithm for recognition.

Case analysis 4.1 Instance object
In this study, the package of red wine was taken as the analysis subject. Tourists buy red wine in tourist sites usually for gifts; therefore, the package of red wine is very important. The schematic diagram of the red wine package designed in this study is shown in Figure 2. The package was made of paper, and the direction of design is the reduction, portability, and innovation. The length, width, and height of the package were 11, 12, and 38 cm, respectively. The raw material of the package was 350 g of white cardboard and polypropylene film. The supporting property of white cardboard can just meet the structural requirement of supporting products. Moreover, after printing the pattern on the surface of white cardboard, a layer of polypropylene film will be coated to protect the printed pattern and improve the gloss of the package. As shown in Table 1, after market research, it is found that most of the red wine package on the market is paper package, and the package is luxurious, but it is not conducive to display the red wine in the package. After the red wine is taken out, the package is often abandoned. Luxury packages not only increase the weight of goods, but also cause wastes. In this study, the design direction of red wine packages was the reduction, portability, and innovation. The reduction was to simplify the complex structure as much as possible and maintain the original function to improve the environmental protection degree. The portability was to make the red wine more convenient in the transportation process. The innovation was to make the package of red wine display, give consumers a new look, and reduce the possibility of being discarded.
In this study, the structure of the designed red wine package adopted the bottom support type. The corners of the outer package formed right angles to fix the product, which facilitates display. Also, the hollow structure was designed to combine the outer package with the supporting structure: the corners of the outer package formed a bracket to support the product. In this study, the folding structure was adopted in the design, which saved many materials and complex structure. The top cover of the package used the slot structure to save the step of adhesion. Then the folded edges and corners could protect the wine bottle in all directions. The standard size and hollow structure allowed the product design to be displayed and sold at the counter.

Analysis method
Package surface defect detection: Taking the red wine package as the subject, different degrees of surface damage were added to the package. The damage degree was into level 0, the surface was complete, without damage; level 1, the surface had slight damage, which could not be clearly seen from a distance; level 2, the surface damage was relatively serious, which could not be seen from a distance, but can be seen at a short distance; level 3, surface damage was more serious, and slight cracks or holes have appeared; level 4, the surface of the package was obviously torn, and the holes are obvious; level 5, the package was completely damaged, and the red wine in the package was exposed. The above division of damages was obtained after experts' discussions.
For the package images in the subsequent experiment, the damage degree was divided into level 0-5 as described above. Then, 200 images were collected for each level of damage, and the collected images were transformed by operations such as rotation, symmetry, tilt, and scaling to expand to 1,000 images for each damage level. There were 6,000 images in the package image set for the experiment. Then, 70% of the images were randomly selected from each damage level to form the training set. There were 4,200 images in the training set, and the remaining images were used as the testing set. There were 1,800 images in the testing set. The input of the SVM algorithm used in this study was image features obtained through HOG extraction, and the output was the judgment for damages. Fitting step by step was used in solving the Table 1: Comparison between the traditional red wine package and the package designed in this study

Traditional red wine package
Red wine package designed in this study

Material
Mainly paper Mainly paper Structure The relatively common paper box structure The structure is designed as the bottom support type, and the central hollow structure is used for displaying the red wine inside the package Pattern The background color of the main body is red, and the brand logo is painted The background color of the main body is black. In addition to the brand text, it also adds complicated patterns hyperplane decision function in the vector space in the training of the SVM algorithm. In the fitting process, the main purpose was to keep the sample closest to the hyperplane as far away from the hyperplane as possible.
The performance of the SVM algorithm in detecting the integrity of package images mainly depended on the kernel function and penalty parameters used for mapping the high-dimensional space. To ensure the accuracy of the SVM algorithm in detecting the integrity of red wine paper package, the kernel function and penalty parameters were selected by the k-fold cross-validation method. The choice of the kernel function included sigmoid, tanh, and relu, and the range of penalty parameter was 0-2.
After cross-validation, the optimal kernel function and penalty parameters were selected for formal test, and the formal test was conducted using the training set and testing set. The SVM algorithm was also compared with the artificial recognition method. Artificial recognition meant that the red wine package inspection personnel classified the damages of the images in the testing set without the assistance of algorithms.
In addition to the red wine package inspection personnel, back propagation (BP) neural network was also used as a contrast. BP neural network is one of the neural network algorithms, which can effectively fit the nonlinear laws in big data. When the surface damage of paper packages was determined by the BP neural network, HOG was also used as the input data of the BP algorithm, and the final output data was the evaluation of package damage degree. The related parameters of the BP algorithm are as follows: the initial weight was randomly generated in (−1, 1); the activation function was sigmoid; the learning rate was set as 0.1.

Analysis results
To ensure the accuracy of the SVM algorithm in the detection of red wine paper package, the k-fold crossvalidation method was applied for preliminary test, and the results are shown in Figure 3. It was seen from Figure 3 that no matter what kind of kernel function was used in the SVM algorithm, the recognition rate first increased and then decreased with the increase of the penalty parameter. When the penalty parameter was 1, the recognition rate of the SVM algorithm under the three kernel functions was the highest, and the penalty parameter was set as 1 in the formal test. The comparison of the recognition rate under the same penalty parameter suggested that the SVM algorithm with sigmoid as the kernel function had the highest recognition rate, followed by the SVM algorithm that used the tanh kernel function and the SVM algorithm that used the relu kernel function; therefore, sigmoid was chosen as the kernel function in the formal test.
The application of paper in the red wine package was analyzed above. For the tourism package, its appearance will directly affect tourists' judgment of commodity value. The better the appearance is, the higher the attraction to tourists is. In the appearance performance, the integrity of the package surface is a very important factor for tourism packages. Once the package is damaged, and the damage is relatively obvious, not only the attractiveness will be reduced, but also its value will be reduced. Therefore, it is necessary to detect the surface of tourism packages, but the efficiency of manual detection is low. This study proposed to extract the image features of package surface defects and then judged the degree of package damages according to the features. The experimental results of the two methods are shown in Table 2. The average recognition rates of the artificial recognition method, the BP algorithm, and the SVM algorithm for package defects were 91.4, 94.5, and 98.5%, respectively. Then comparing the recognition rates for different damage degrees, it was found that the recognition rate of the SVM algorithm for different damage degrees was quite stable, which almost maintained above 98%; while the artificial recognition method was relatively unstable, it only maintained a high recognition rate in recognizing level 0, 4, 5 damages and maintained a low recognition rate in recognizing level 1-3 damages, especially level 1 damage. The BP algorithm was slightly superior to the artificial recognition method in the aspect of stability in detecting different levels of damages; its accuracy in recognizing level 1 and 2 damages was low, and its accuracy in recognizing the other degrees of damages was above 96%. The reason for the above results is discussed in the following. Level 0 damage was easy to identify by manual means. Level 4 and 5 damages were visible to the naked eye unless the damage was not obvious due to factors such as angle and light when shooting the image. Factors such as angle and light were also reasons why the serious package defects could not be 100% identified by the artificial recognition method. Level 1 and 2 damages, which were mild, were difficult to judge; once the image was affected by illumination and other factors, the damage would be covered up and difficult to identify, so that the accuracy of the artificial recognition was low. In the SVM algorithm, the features in the image were extracted by HOG. HOG features could effectively divide the boundary of the package surface; thus, the SVM algorithm could recognize the surface damage through boundary division.

Conclusion
This paper briefly introduced the application of paper in tourism packages and the SVM algorithm used for detecting the surface defects of packages. Then, taking the red wine package as the subject, the application analysis of paper was carried out, and the detection of surface defects with different damage degrees was carried out. The SVM algorithm was compared with the BP algorithm and the artificial recognition method. The results showed that: (1) the paper package designed in this study was processed by reduction compared to the traditional paper package; the structure was simplified as much as possible on the premise of ensuring the original function, and the bottom support structure was folded out by taking advantages of the features of paper, i.e., easy to fold and process, and the hollow treatment made the package and red wine together form an ornamental appearance; (2) when recognizing package surface defects, the SVM algorithm was more stable for different degrees of damages as its average recognition rate was higher and its recognition time was shorter. Taking red wine paper packages as an example, this study analyzed the paper package and tested the effectiveness of the package surface damage detection algorithm, which provides an effective reference for the design and integrity inspection of tourism paper packages. However, the study has some defects: only the red wine package was taken as the paper tourism package analysis subject, and the package surface damage detection method was only compared with the BP algorithm and the artificial recognition method, and the detection algorithm mainly aimed at the red wine package surface damage. The future research direction is to expand the analysis of paper packages to other types of commodity packages and expand the training of the surface damage detection algorithm to make it more widely used in the detection of package damages.

Conflict of interest:
Author states no conflict of interest.