# Deep Neural Network Model-Assisted Reconstruction and Optimization of Chinese Characters in Product Packaging Graphic Patterns and Visual Styling Design

Authors: Danjun Zhu; Gangtian Liu
Journal: Scientific Programming
 (2022)

---

## Abstract

Chinese character fonts not only carry the long history of Chinese civilization, but also burst out modern design art elements with distinctive Chinese characteristics. This article first analyzes the origin and writing form of several ancient Chinese characters and draws out the influence of the historical evolution of ancient Chinese characters on Chinese culture. In the basic theoretical structure of font design, traditional art elements and modern font design are integrated, and specific design cases are analyzed. A Chinese character packaging quality detection method combining machine vision and a lightweight convolutional neural network is proposed. First, the method based on threshold segmentation and affine transformation in machine vision is used to perform threshold processing on the image to be tested, and the Chinese character region is tilted and cropped; then, the network structure of the classification algorithm is designed according to the requirements of image features and defect recognition. The field images are produced, a dataset of Chinese character packaging defects is established, and then the proposed Chinese character packaging defect recognition network is verified and deployed to test the accuracy and detection speed of the algorithm deployed on the Jetson Nano embedded platform. Combined with theoretical research and case analysis, the design of packaging design series is practiced with the idea of combining Chinese character art design and classical culture.


---

## Body

## 1. Introduction

The birth of the written word symbolizes the progress of human society, and the culture of Chinese characters, which has undergone millennia of baptism, is the only ancient script that has survived and is still in use today [1, 2]. The study of the visual arts of Chinese characters has gradually become an important part of the design and is widely used in modern graphic design, such as poster design, packaging decoration and product description, book layout design, and media advertising communication. Packaging plays an increasingly important role in modern design trends, and more and more industries require product packaging design. For example, material products and other series of physical packaging belong to the traditional packaging design category, whereas film and media, advertising, and corporate image belong to the new modern packaging [3, 4]. Regardless of the modern and traditional packaging, all put words in the first place of design, and Chinese characters are an important member of font design. The design of Chinese characters in packaging design not only expresses the excellent Chinese civilization, but is also an outstanding representative of modern Chinese design. Through the study of the artistic expression of Chinese characters, it is possible to gain a deep understanding of the ideology and aesthetic flavour of Chinese civilization, to lay a good foundation for modern type design, to further explore the relationship between tradition and modernity, to promote a better breakthrough in the international development environment of modern art design of Chinese characters, and thus to better express the national spirit and Chinese style of packaging design. National cultural values and traditional art forms are the artistic sources of Chinese character font design. Especially in packaging design, the Chinese character art form, with the modern design concept as the medium of packaging materials, conveys the connotation of Chinese character culture from the perspective of visual art, which has very important research significance and artistic value [5–7].Chinese characters contain the long cultural history of our country and at the same time have a rich cultural heritage. It is not only a character, a language, but also a spirit, a heritage. Chinese characters have a wide variety of expressions, whether they are pictographs or morphological characters, and they have a unique charm that is much loved by Chinese children and even by people from overseas. Because of their plasticity, Chinese characters can have a strong visual effect in terms of shape, size, font, and meaning, conveying a message or even an aesthetic effect [8]. This feature of Chinese characters was discovered and explored by businessmen, so Chinese fonts began to appear in the design of product packaging, and this new form soon came to be noticed and loved by the public, and many businesses began to compete to imitate it, in order to give full play to the promotional role of Chinese fonts and to express the efficacy of the product vividly. Here we look at the linguistic expression of Chinese fonts in product packaging, and see the visual effect it plays [9].The application of Chinese character font epigraphic decoration design in product packaging, from the text pen shape: the structure of Chinese characters is actually complex, different Chinese characters are composed of different strokes that make up the shape of the text, which is often referred to as the text pen shape. The brush shape is a type of Chinese character decoration and is used more often in product packaging [10].The structural shape of the characters: different characters have different artistic shapes and are suitable for different product packaging designs. And some Chinese characters have a vivid image, which can give a good visual impact to a certain extent. We have just analyzed the characters from the perspective of strokes, and now we are talking about how to do a good job of decorating the characters from the point of view of the overall shape and the overall structure of the characters. Some Chinese characters have fewer strokes and the overall structure is simple and easy to understand, giving people a sense of simplicity and generosity. Such a Chinese character structure is combined with some novel and fun patterns, and then the text is processed through computer technology to enrich the image. Of course, different products have different packaging concepts and there is a great deal to be said for the choice of Chinese characters, which is something that packaging professionals should be aware of when they are working on the packaging [11, 12].This article proposes a method for detecting the quality of Chinese character packaging by combining machine vision and lightweight convolutional neural networks. Firstly, a method based on threshold segmentation and affine transformation in machine vision is used for shareholding, skew correction, and cropping of the Chinese character region of the image to be measured; then, the network structure of the classification algorithm is designed according to the image characteristics and defect recognition requirements; finally, the production site images are collected to build a Chinese character packaging defect dataset, after which the proposed Chinese character packaging defect recognition network is validated and tested for the accuracy and speed of the algorithm deployed on the Jetson Nano embedded platform [13]. The accuracy and detection speed of the algorithm deployed on the Jetson Nano embedded platform was tested. Combining theoretical research and case studies, the design of the packaging design series is practiced with the idea of integrating Chinese character art design and classical culture. To sum up, we have a certain understanding of the visual language effect of Chinese character font design in product packaging. From the appearance, imagery, and overall calligraphy structure of Chinese characters, we explore how to integrate Chinese character fonts into packaging design, which can not only promote product promotion and the effect of sales, but also to meet people’s aesthetic psychology. By analyzing the application of Chinese fonts in packaging design, the development of Chinese packaging is promoted.


## 2. Related Works

The study of Chinese fonts in packaging design, first of all, should cut into the subject from the perspective of philology, the process of development and evolution of Chinese fonts in the textual dimension is the mainstream academic argument of current textual research, by knowing the origin of civilization and the development of philology, to establish a theoretical basis for subsequent design practice [14].Domestic research into the basic theory of packaging design is currently at a rapid stage of development, where the combination of theoretical literature and excellent design practice work has led to packaging having the role of an industry vane in the discipline of graphic design. Firstly, regarding the current status of the basic theory of packaging design, [15] makes a clear study of the relationship between packaging development and economic culture and provides a detailed overview of the essential functions of packaging, integrating the study of new materials and new design concepts into innovative design practice. In [16], the principles of visual communication design are systematically and clearly outlined, from conceptual theory to physiological activity, and sublimated through the study of visual perception into a perceptual account of visual art. In [17], a series of theories of packaging design is elaborated, including a complete theoretical study of the functional nature, cultural values, market positioning, design elements, and printing and manufacturing.With the development of modern thinking of fashion and nationalism, packaging design is more dependent on the decoration of visual art design based on theoretical research, breaking through the traditional packaging forms and rules of design, which is the goal of the pursuit of market value. In [18], the visual language of packaging design such as text, colour, and graphics is studied separately to pursue a more suitable visual symbol design for the product, which is applied to design practice according to theoretical research. In [19], the chronological evolution of packaging design is systematically studied, from the mid-19th century to the 1980s, a period of about 150 years of packaging design cases, with Europe and the United States as the main objects of study, revealing the history of economic culture and packaging design processes in developed Western countries or regions, allowing an intuitive understanding of the evolution and development of advanced design concepts abroad. It has a certain reference value for the innovation of modern packaging art and design forms in China. Reference [20] describes the rise of Japanese design after World War II and analyzes, from the perspective of reason and sensibility, the different senses of modern design for society, human beings, and nature, which is useful for the study of packaging design and consumer psychological appeal.The packaging of Chinese characters is the final step in the process of testing the quality of Chinese characters before they are used as packaging to go to market. Compared to manual inspection, machine vision has great advantages in terms of speed and accuracy. Reference [21] used Blob Analysis on a smart camera to detect missing bottles and breaks in the packaging of specific colour Chinese characters; [22] used Speeded Up Robust Feature (SURF) with a support vector machine (SVM) to detect defects.


## 3. The Imagery of Chinese Fonts

The connotations of Chinese characters are rich and varied, and in addition to the use of representational decoration of Chinese characters as we have described earlier, the imagery of Chinese fonts can also be applied to the design of product packaging. What is the imagery of Chinese characters? The imagery of Chinese characters refers to the unique connotation of Chinese characters, combining this connotation with the essential features and practical functions of the product, enriching the expression of Chinese characters by implying meaning in form [23]. The imagery of Chinese characters can be divided into the morphological expression of the characters and the meaning of the characters. The morphological expression means finding the commonalities between the characters and the product and combining them with the meaning of the words in a comprehensive graphic art, which will produce unexpected design effects. The meaning of the word is to find the appearance or properties of the product and design the world by incorporating creative elements into the word, which can sometimes achieve a very good mood.Whether we are talking about representations or imagery, in the end, it comes back to the calligraphic script and stylistic structure of the Chinese characters. The content of the text is important, as it introduces the product name, but if we focus on the content and structure of the art, the effect of the packaging will be doubled. The requirements for packaging are getting higher and higher, and the forms of packaging are becoming more and more diverse, with a series of new forms of expression such as images being discovered all the time. To continue to play the role of Chinese fonts in packaging design, we need to give more thought to the artistic and decorative quality of Chinese characters [24].To sum up, we have a certain understanding of the visual language effect of Chinese character font design in product packaging, from the appearance, imagery, and overall calligraphic structure of Chinese characters to explore how to integrate Chinese fonts in packaging design, both to play the effect of product promotion and sales and to meet people’s aesthetic psychology. Through the analysis of the use of Chinese fonts in packaging design, we will promote the development of Chinese packaging.


## 4. Programme of This Article

In order to meet the detection task of this article and to achieve low-cost deployment and improve production efficiency in a production environment, this article combines traditional image processing methods and designs a Chinese character packaging defect detection algorithm with reference to the Mobile Net series network structure. The first step is image acquisition, followed by preprocessing (threshold segmentation, tilt correction, ROI cropping) and recognition by the classification network, and finally the results are outputted. First, the original image captured by the industrial camera is preprocessed, including threshold segmentation, position correction, and region of interest (ROI) cropping [25], to obtain a single Chinese character region image; then the single Chinese character region images are fed into the packaging defect classification network in turn; finally, the category of each Chinese character region image is outputted (see Figure 1).Figure 1
Flow of Chinese character packaging quality detection algorithm.


## 5. Image Preprocessing

The colour image was first grey-headed, that is each pixel in the image had equal component values in all three RGB channels. After grey-scale processing, the original image was cropped according to ROI based on the external trigger used by the camera and the relatively stable region of the Chinese character blister pallets in the image to reduce computational effort, and the region of interest imagef (x, y) was obtained, as shown in Figure 2(a). The blister tray in the grey-scale image is close to the grey value of a part of the block in the background, and direct use of global shareholding cannot effectively separate out the tray. Figure 2(b) shows the result of the direct use of the maximum inter-class difference method (Otsu). Observing the ROI image shows that the edge distinction of the blister tray box background is obvious, so the edge information can be used to assist Otsu in shareholding [26].Figure 2
Image threshold process.In this article, the ROI image is first smoothed using a Gaussian filter, then the image edges are calculated using the Laplace operator [27], and then the Laplace image is thresholded using 99% of the absolute value of the Laplace image to specify a threshold non-negative T to obtain a sparse set of pixels gtx,y, and the process can be expressed as:(1)gtx,y=1,Rx,y≥T,0,where R (x, y) is the response of the filter template at the centre of its coverage area. The ROI image f (x, y) is then multiplied by gtx,y to obtain gx,y:(2)gx,y=fx,y×gtx,y.Based on the histogram of non-zero pixels, the ROI image was minimized using the Otsu method [28], and the results are shown in Figure 2(c). Although a part of the interference region with similar grey scale is also segmented, the addition of edge information makes the blister tray and the interference region in the fruit segmented into mutually independent regions, and the threshold result is subjected to the connected domain operation, and then the regional area filtering is performed to obtain the complete blister tray segmentation image I (x, y), as shown in Figure 2(d).


### 5.1. Chinese Character Packaging Defect Recognition Network

In this study, we use the Mobile Net series of networks as the basis for improvement. In the Chinese character packaging defect detection task, the image content of the Chinese character region after cropping and segmentation is relatively single, and there are few image categories, so there is no need for an overly deep network to extract features, and hence we can appropriately reduce the number of network layers and use continuous down sampling. The original MobileNetv2 network uses global average pooling after the last layer of convolution, but since the network in this article is a rectangular image input, the last layer of convolution produces a rectangular feature map, so the pooling layer is changed to adaptive average pooling [13].The specific structure of the network is shown in Figure3: two fully convolutional (FC) layers, five convolutional blocks, an adaptive average pooling layer, a fully connected lawyer, and a Softmax classification function.Figure 3
Defect classification network structure.The first layer is a full convolutional layer with 32 3 × 3 convolutional kernels, Stride = 2, and the output is 32 × 28 × 112 feature maps; the second to sixth layers are five convolutional blocks (Blocks) in turn, and the internal expansion multiplier of the Blocks is 6, where Block1 ∼ Block4 are set with a sliding step of 2 and successive down sampling, and the output feature map is 2 × 7 × 160; the seventh layer is a full convolutional layer with 512 1 × 1 convolutional kernels, which is used for feature dimensioning; the eighth layer is an adaptive averaging pooling layer, which keeps the number of feature map channels unchanged and changes the feature map size to 1 × 1; the ninth layer is a fully connected full convolutional layer, which is used for feature dimensioning. ×The ninth layer is a fully connected layer, followed by a Softmax layer for classification. The batch normalization layer [14] is added after each network layer except the average pooling layer to speed up the training and improve the generalization ability of the model, and the ReLU6 activation function [15] is used after the batch normalization layer, and the dropout layer [16] is used after the fully connected layer to prevent the network from overfitting during training.


## 5.1. Chinese Character Packaging Defect Recognition Network

In this study, we use the Mobile Net series of networks as the basis for improvement. In the Chinese character packaging defect detection task, the image content of the Chinese character region after cropping and segmentation is relatively single, and there are few image categories, so there is no need for an overly deep network to extract features, and hence we can appropriately reduce the number of network layers and use continuous down sampling. The original MobileNetv2 network uses global average pooling after the last layer of convolution, but since the network in this article is a rectangular image input, the last layer of convolution produces a rectangular feature map, so the pooling layer is changed to adaptive average pooling [13].The specific structure of the network is shown in Figure3: two fully convolutional (FC) layers, five convolutional blocks, an adaptive average pooling layer, a fully connected lawyer, and a Softmax classification function.Figure 3
Defect classification network structure.The first layer is a full convolutional layer with 32 3 × 3 convolutional kernels, Stride = 2, and the output is 32 × 28 × 112 feature maps; the second to sixth layers are five convolutional blocks (Blocks) in turn, and the internal expansion multiplier of the Blocks is 6, where Block1 ∼ Block4 are set with a sliding step of 2 and successive down sampling, and the output feature map is 2 × 7 × 160; the seventh layer is a full convolutional layer with 512 1 × 1 convolutional kernels, which is used for feature dimensioning; the eighth layer is an adaptive averaging pooling layer, which keeps the number of feature map channels unchanged and changes the feature map size to 1 × 1; the ninth layer is a fully connected full convolutional layer, which is used for feature dimensioning. ×The ninth layer is a fully connected layer, followed by a Softmax layer for classification. The batch normalization layer [14] is added after each network layer except the average pooling layer to speed up the training and improve the generalization ability of the model, and the ReLU6 activation function [15] is used after the batch normalization layer, and the dropout layer [16] is used after the fully connected layer to prevent the network from overfitting during training.


## 6. Case Studies

### 6.1. Visual Art Application of Chinese Characters in Packaging Design

With the continuous enrichment of technological design tools, the functional and stylistic design of packaging has significantly improved. On the basis of the design of elements such as text, colour, graphics, function, and shape, the research continues to address the artistic expression of Chinese characters in packaging design. The artistic value of Chinese characters in packaging design is studied from a psychological perspective, and the artistic expression of Chinese characters in packaging design is analyzed in terms of imagery, digitization, visualization, and the value demanded in contemporary social development.The visual language of imagery in Chinese characters in packaging design is an exploration of abstract traditional cultural forms, a unique artistic expression of Chinese characters that can be applied to packaging design to enhance the overall aesthetic effect of the product’s taste, mainly through the brushwork of calligraphy. The visual culture of calligraphy is the main source of inspiration for Chinese character elements in packaging design. The hieroglyphic strokes of calligraphy and the structure of the cloth and white contribute to the imaginative expression of the Chinese characters in a more classical Chinese context, which, combined with the postmodern classical design trend, has a positive impact on the artistic expression of Chinese characters in packaging design. The packaging design of “One Mountain, One Immortal” (Figure4), designed by Hello Ocean Branding Studio, combines the character “mountain” with the shape of the product and the elegant classical aesthetic mood of the product, reflecting the beauty of the Chinese character imagery to the fullest (Figure 5). Moutai Town Wine’s 2019 Year of the Hexi theme packaging uses calligraphic imagery to enhance the overall effect of the packaging.Figure 4
The imaginative representation of Chinese characters in the packaging design of “One Mountain, One Immortal.”Figure 5
Imaginative representation of Chinese characters in Moutai town wine packaging design.Another trend in the artistic performance of Chinese characters in modern packaging design lies in following the pace of social economy, pursuing the power of science and technology, adding a more modern visual feel to the Chinese character font design, enabling consumers to quickly accept the design principles, conforming to the modern design atmosphere of consumers’ personal lives, constantly strengthening the visual impact of science and technology, bringing the Chinese character elements of packaging design not only to inherit the tradition, but also to find the theme of Chinese characters in the modern environment. For example, Figure6 is a display of the packaging design for Good Night Technology Sleeping Drink. The design combines the product’s technological health theme with modern technological elements around the Good Night font. The design echoes the theme of the packaging design, which is a modern and minimalist aesthetic that makes consumers feel comfortable and healthy.Figure 6
Digital representation of the Chinese character technology in the packaging design of the “Good Night Technology” Sleeping Drink.As shown in Figure7, the application of Chinese characters in product packaging is based on the pictorial nature of Chinese characters, combining the beauty of the foot form and graphic design to show the specific image of the main idea to be expressed in the product packaging. The Chinese characters for the theme “Craftsmanship,” the use of a labyrinth design and the shape of the Chinese gossip culture, express the main idea clearly, show the strong corporate culture of the product, and enhance the publicity of the product’s high quality of hand brewing to win the trust of consumers.Figure 7
The “artisanal creation” packaging design of snowflake beer in Chinese characters.


### 6.2. The Influence of Traditional Visual Art Elements on Packaging Design

Chinese traditional culture in packaging design art design elements, which are a representative of the Chinese national style, traditional visual culture of the people through society, national humanistic feelings, and the development of cultural industries, gradually formed the visual observation of artistic habits of life.First of all, traditional graphics in packaging design are based on folk culture as the inspiration for creativity, with rich and varied styles and auspicious and simple meanings. The traditional elements of the “Fu Lu Shou Xi” and the “Tai Ji Ba Gua” and “Dragon and Phoenix Cloud” patterns are some of the more common visual cultural elements in modern packaging design (Figure8). The visual cultural characteristics expressed in the example of Coca-Cola’s product packaging show the unique creativity of the traditional Chinese visual culture.Figure 8
Coca-cola’s visual culture packaging design.Secondly, the literati’s spiritual sentiment of ink and wash, the creative expression of traditional ink and wash in the artistic practice of packaging design, has a strong Chinese classical aesthetic connotation (Figure9), visual culture packaging design of Taiwan Gaoshan tea, flower, bird, fish and insect ink painting, space extension, and clear meaning.Figure 9
Taiwan high tea visual culture packaging design.Thirdly, handicraft design elements of folk art provide creative inspiration for the traditional cultural and creative design of modern packaging. Folk art is a traditional art and culture passed down in the folklore, which is applied to the creative practice of modern packaging design, reflecting the representative literary style of national folk crafts (Figure10). Also, it is a visual culture packaging designed and created by a new generation of Chinese designers, with a unique visual culture theme, expressing the creative aesthetics of local ethnic elements.Figure 10
Visual culture packaging design for the folklore “zaohuo faces.”Fourthly, the paper-cutting technique breaks through the traditional new creative expression—new paper-cutting. The traditional paper-cutting technique is different from the traditional folk paper-cutting form of carving and uses a smooth and flowing cutting technique to present the beauty of life (Figure11). The new paper-cutting packaging design by Mr Zhao Xigang, the creator of Modern Visual Culture’s “New Paper-cutting,” uses the graphic elements of “New Paper-cutting” to achieve a double harvest of professional art and ideology and culture.Figure 11
Zhao Xigang’s original “new paper cut” visual culture packaging design.


## 6.1. Visual Art Application of Chinese Characters in Packaging Design

With the continuous enrichment of technological design tools, the functional and stylistic design of packaging has significantly improved. On the basis of the design of elements such as text, colour, graphics, function, and shape, the research continues to address the artistic expression of Chinese characters in packaging design. The artistic value of Chinese characters in packaging design is studied from a psychological perspective, and the artistic expression of Chinese characters in packaging design is analyzed in terms of imagery, digitization, visualization, and the value demanded in contemporary social development.The visual language of imagery in Chinese characters in packaging design is an exploration of abstract traditional cultural forms, a unique artistic expression of Chinese characters that can be applied to packaging design to enhance the overall aesthetic effect of the product’s taste, mainly through the brushwork of calligraphy. The visual culture of calligraphy is the main source of inspiration for Chinese character elements in packaging design. The hieroglyphic strokes of calligraphy and the structure of the cloth and white contribute to the imaginative expression of the Chinese characters in a more classical Chinese context, which, combined with the postmodern classical design trend, has a positive impact on the artistic expression of Chinese characters in packaging design. The packaging design of “One Mountain, One Immortal” (Figure4), designed by Hello Ocean Branding Studio, combines the character “mountain” with the shape of the product and the elegant classical aesthetic mood of the product, reflecting the beauty of the Chinese character imagery to the fullest (Figure 5). Moutai Town Wine’s 2019 Year of the Hexi theme packaging uses calligraphic imagery to enhance the overall effect of the packaging.Figure 4
The imaginative representation of Chinese characters in the packaging design of “One Mountain, One Immortal.”Figure 5
Imaginative representation of Chinese characters in Moutai town wine packaging design.Another trend in the artistic performance of Chinese characters in modern packaging design lies in following the pace of social economy, pursuing the power of science and technology, adding a more modern visual feel to the Chinese character font design, enabling consumers to quickly accept the design principles, conforming to the modern design atmosphere of consumers’ personal lives, constantly strengthening the visual impact of science and technology, bringing the Chinese character elements of packaging design not only to inherit the tradition, but also to find the theme of Chinese characters in the modern environment. For example, Figure6 is a display of the packaging design for Good Night Technology Sleeping Drink. The design combines the product’s technological health theme with modern technological elements around the Good Night font. The design echoes the theme of the packaging design, which is a modern and minimalist aesthetic that makes consumers feel comfortable and healthy.Figure 6
Digital representation of the Chinese character technology in the packaging design of the “Good Night Technology” Sleeping Drink.As shown in Figure7, the application of Chinese characters in product packaging is based on the pictorial nature of Chinese characters, combining the beauty of the foot form and graphic design to show the specific image of the main idea to be expressed in the product packaging. The Chinese characters for the theme “Craftsmanship,” the use of a labyrinth design and the shape of the Chinese gossip culture, express the main idea clearly, show the strong corporate culture of the product, and enhance the publicity of the product’s high quality of hand brewing to win the trust of consumers.Figure 7
The “artisanal creation” packaging design of snowflake beer in Chinese characters.


## 6.2. The Influence of Traditional Visual Art Elements on Packaging Design

Chinese traditional culture in packaging design art design elements, which are a representative of the Chinese national style, traditional visual culture of the people through society, national humanistic feelings, and the development of cultural industries, gradually formed the visual observation of artistic habits of life.First of all, traditional graphics in packaging design are based on folk culture as the inspiration for creativity, with rich and varied styles and auspicious and simple meanings. The traditional elements of the “Fu Lu Shou Xi” and the “Tai Ji Ba Gua” and “Dragon and Phoenix Cloud” patterns are some of the more common visual cultural elements in modern packaging design (Figure8). The visual cultural characteristics expressed in the example of Coca-Cola’s product packaging show the unique creativity of the traditional Chinese visual culture.Figure 8
Coca-cola’s visual culture packaging design.Secondly, the literati’s spiritual sentiment of ink and wash, the creative expression of traditional ink and wash in the artistic practice of packaging design, has a strong Chinese classical aesthetic connotation (Figure9), visual culture packaging design of Taiwan Gaoshan tea, flower, bird, fish and insect ink painting, space extension, and clear meaning.Figure 9
Taiwan high tea visual culture packaging design.Thirdly, handicraft design elements of folk art provide creative inspiration for the traditional cultural and creative design of modern packaging. Folk art is a traditional art and culture passed down in the folklore, which is applied to the creative practice of modern packaging design, reflecting the representative literary style of national folk crafts (Figure10). Also, it is a visual culture packaging designed and created by a new generation of Chinese designers, with a unique visual culture theme, expressing the creative aesthetics of local ethnic elements.Figure 10
Visual culture packaging design for the folklore “zaohuo faces.”Fourthly, the paper-cutting technique breaks through the traditional new creative expression—new paper-cutting. The traditional paper-cutting technique is different from the traditional folk paper-cutting form of carving and uses a smooth and flowing cutting technique to present the beauty of life (Figure11). The new paper-cutting packaging design by Mr Zhao Xigang, the creator of Modern Visual Culture’s “New Paper-cutting,” uses the graphic elements of “New Paper-cutting” to achieve a double harvest of professional art and ideology and culture.Figure 11
Zhao Xigang’s original “new paper cut” visual culture packaging design.


## 7. Experiments and Analysis of Results

### 7.1. Preprocessing Algorithms

The preprocessing algorithm was tested using a total of 4,400 original images (five matches) constructed for the dataset. Since the threshold segmentation results determine the accuracy of the subsequent skew correction and ROI cropping, two control groups were set up in this article, using Otsu and global double shareholding as the shareholding methods in the preprocessing algorithm, respectively.The preprocessing algorithm using the global double shareholding method was the fastest with an average time of 8.34 ms and an accuracy of 97.00%. As shown in Table1, the main factor affecting the accuracy was the luminance fluctuation; the preprocessing algorithm using Otsu as the shareholding method had the lowest accuracy of 92.5%. The main factor affecting the accuracy was the difficulty in segmenting the pallet when it was close to a block with a similar grey level. The edge-assisted shareholding has good adaptability, with an accuracy of 100% and an average time of 15 ms for the preprocessing algorithm, which is a better overall performance.Table 1
Performance of preprocessing algorithms under different threshold methods.
Threshold methodROI cutting accuracy (%)Average time (ms)Edge assist100.0015.00Otsu92.5011.12Global double threshold97.008.34


### 7.2. Identifying Networks

The proposed Chinese character packaging defect classification network (LocalNet) was trained and tested on the above constructed Chinese character packaging defect classification dataset, Nano compact deep learning module, and the Pytorch framework.To compare the performance of this network with that of the reference network, two control groups were set up: one was the original MobileNetv2 with an input size of 224 × 224 × 3, and the other was this network (LocalNet_224) with an input size of 224 × 224 × 3. All three sets of experiments were trained using Stochastic Gradient Descent (SGD) [17], and the learning rate was adjusted using a cosine annealing strategy [18], as shown in Figure 12(a), with an initial learning rate of 0.1, a minimum learning rate of 1 × 10−8, a momentum factor of 0.9, and a weight decay factor of 0.0003. The original MobileNetv2 network converged the fastest with a stable loss of 0.004, Local Net converged the second fastest with a stable loss of 0.005, and LocalNet_224 converged the slowest with a stable loss of 0.035. Validation rates of the original MobileNetv2 and Local Net in Figure 12(c) were both 99.99%. The accuracy of both the original MobileNetv2 and Local Net in Figure 12(c) is 99.99%, and the accuracy of LocalNet_224 is 98.67%. From the experimental data, it can be seen that LocalNet_224 does not perform like MobileNetv2 in terms of training loss convergence and validation accuracy when using the input size of 224 × 224, while the training loss convergence and final training loss of Local Net with the input size of 56 × 224 are slightly lower than that of MobileNetv2. The validation accuracy is the same as that of MobileNetv2 and significantly better than that of LocalNet_224, which verifies the effectiveness of the proposed network structure design.Figure 12
Experimental results. (a) Learning rate adjustment. (b) Loss. (c) Accuracy.
(a)(b)(c)To verify the classification performance of the networks in this article, tests were evaluated on the test set constructed above, and a test control experimental group was also set up, including two lightweight networks—ShufﬂENetv2 [19] and Squeeze Net [20]—and two machine learning methods—Local Binary Pattern (LBP) [21] feature-based SVM and Extreme Learning Machine (ELM) [22]. The control group was pretrained on the training set.Table2 presents the performance comparison of different classification methods, including input size, number of parameters, accuracy, and the average time taken to detect a Chinese character region image using three different hardware conditions: GPU (NVIDIA Tesla V100), CPU (Xeon Gold 6148), and Jetson Nano. As shown in Table 2, in terms of the number of model parameters, the proposed model has 0.50 × 106 parameters, which are the lowest among the listed deep learning models. In terms of detection accuracy, ShuffleNetv2 has the highest accuracy of 99.99%, while the proposed network has 99.94%, with only 0.05 percentage points differences, and the LBP-ELM method has the lowest accuracy. In terms of detection time, the LBP-ELM method was the fastest due to the structural advantage of ELM, with 3.87 ms and 10.25 ms in the CPU environment of the computer and Jetson Nano, respectively; the detection time of the proposed network was the best among the deep learning models in the three hardware types, with 2.31 ms, 7.82 ms, and 11.02 ms, respectively. Although Squeeze Net has a small number of parameters, it still has a large number of conventional convolutional computations and therefore does not show any speed advantage. This shows that the proposed network is the best among the listed methods in terms of the number of parameters, accuracy, and detection speed. When the network is deployed on the Jetson Nano platform, for example, a box of five Chinese characters is preprocessed in 15 ms, and the overall detection time of the algorithm is 70.1 ms, which can reach 14 boxes/s and meet the requirement of real-time detection in the pipeline.Table 2
Comparison of the performance of different classification methods.
Classification methodEnter sizeParameter quantity (106)Accuracy (%)Detection time (ms)GPUCPUJetson NanoSqueeze Net224 × 224 × 31.2597.633.5755.4341.00Shuffle Netv2224 × 224 × 33.5099.997.5130.5021.11Mobile Netv2224 × 224 × 33.5099.976.2031.1520.51LocalNet_224224 × 224 × 30.597.892.2318.1713.45Local Net56 × 224 × 30.599.942.317.8211.02LBP-SVM56 × 224 × 3—91.10—5.5916.03LBP-ELM56 × 224 × 3—87.96—3.8710.25


## 7.1. Preprocessing Algorithms

The preprocessing algorithm was tested using a total of 4,400 original images (five matches) constructed for the dataset. Since the threshold segmentation results determine the accuracy of the subsequent skew correction and ROI cropping, two control groups were set up in this article, using Otsu and global double shareholding as the shareholding methods in the preprocessing algorithm, respectively.The preprocessing algorithm using the global double shareholding method was the fastest with an average time of 8.34 ms and an accuracy of 97.00%. As shown in Table1, the main factor affecting the accuracy was the luminance fluctuation; the preprocessing algorithm using Otsu as the shareholding method had the lowest accuracy of 92.5%. The main factor affecting the accuracy was the difficulty in segmenting the pallet when it was close to a block with a similar grey level. The edge-assisted shareholding has good adaptability, with an accuracy of 100% and an average time of 15 ms for the preprocessing algorithm, which is a better overall performance.Table 1
Performance of preprocessing algorithms under different threshold methods.
Threshold methodROI cutting accuracy (%)Average time (ms)Edge assist100.0015.00Otsu92.5011.12Global double threshold97.008.34


## 7.2. Identifying Networks

The proposed Chinese character packaging defect classification network (LocalNet) was trained and tested on the above constructed Chinese character packaging defect classification dataset, Nano compact deep learning module, and the Pytorch framework.To compare the performance of this network with that of the reference network, two control groups were set up: one was the original MobileNetv2 with an input size of 224 × 224 × 3, and the other was this network (LocalNet_224) with an input size of 224 × 224 × 3. All three sets of experiments were trained using Stochastic Gradient Descent (SGD) [17], and the learning rate was adjusted using a cosine annealing strategy [18], as shown in Figure 12(a), with an initial learning rate of 0.1, a minimum learning rate of 1 × 10−8, a momentum factor of 0.9, and a weight decay factor of 0.0003. The original MobileNetv2 network converged the fastest with a stable loss of 0.004, Local Net converged the second fastest with a stable loss of 0.005, and LocalNet_224 converged the slowest with a stable loss of 0.035. Validation rates of the original MobileNetv2 and Local Net in Figure 12(c) were both 99.99%. The accuracy of both the original MobileNetv2 and Local Net in Figure 12(c) is 99.99%, and the accuracy of LocalNet_224 is 98.67%. From the experimental data, it can be seen that LocalNet_224 does not perform like MobileNetv2 in terms of training loss convergence and validation accuracy when using the input size of 224 × 224, while the training loss convergence and final training loss of Local Net with the input size of 56 × 224 are slightly lower than that of MobileNetv2. The validation accuracy is the same as that of MobileNetv2 and significantly better than that of LocalNet_224, which verifies the effectiveness of the proposed network structure design.Figure 12
Experimental results. (a) Learning rate adjustment. (b) Loss. (c) Accuracy.
(a)(b)(c)To verify the classification performance of the networks in this article, tests were evaluated on the test set constructed above, and a test control experimental group was also set up, including two lightweight networks—ShufﬂENetv2 [19] and Squeeze Net [20]—and two machine learning methods—Local Binary Pattern (LBP) [21] feature-based SVM and Extreme Learning Machine (ELM) [22]. The control group was pretrained on the training set.Table2 presents the performance comparison of different classification methods, including input size, number of parameters, accuracy, and the average time taken to detect a Chinese character region image using three different hardware conditions: GPU (NVIDIA Tesla V100), CPU (Xeon Gold 6148), and Jetson Nano. As shown in Table 2, in terms of the number of model parameters, the proposed model has 0.50 × 106 parameters, which are the lowest among the listed deep learning models. In terms of detection accuracy, ShuffleNetv2 has the highest accuracy of 99.99%, while the proposed network has 99.94%, with only 0.05 percentage points differences, and the LBP-ELM method has the lowest accuracy. In terms of detection time, the LBP-ELM method was the fastest due to the structural advantage of ELM, with 3.87 ms and 10.25 ms in the CPU environment of the computer and Jetson Nano, respectively; the detection time of the proposed network was the best among the deep learning models in the three hardware types, with 2.31 ms, 7.82 ms, and 11.02 ms, respectively. Although Squeeze Net has a small number of parameters, it still has a large number of conventional convolutional computations and therefore does not show any speed advantage. This shows that the proposed network is the best among the listed methods in terms of the number of parameters, accuracy, and detection speed. When the network is deployed on the Jetson Nano platform, for example, a box of five Chinese characters is preprocessed in 15 ms, and the overall detection time of the algorithm is 70.1 ms, which can reach 14 boxes/s and meet the requirement of real-time detection in the pipeline.Table 2
Comparison of the performance of different classification methods.
Classification methodEnter sizeParameter quantity (106)Accuracy (%)Detection time (ms)GPUCPUJetson NanoSqueeze Net224 × 224 × 31.2597.633.5755.4341.00Shuffle Netv2224 × 224 × 33.5099.997.5130.5021.11Mobile Netv2224 × 224 × 33.5099.976.2031.1520.51LocalNet_224224 × 224 × 30.597.892.2318.1713.45Local Net56 × 224 × 30.599.942.317.8211.02LBP-SVM56 × 224 × 3—91.10—5.5916.03LBP-ELM56 × 224 × 3—87.96—3.8710.25


## 8. Conclusions

This study presents a Chinese character packaging quality inspection algorithm for a small computing platform (e.g., Jetson Nano), including a preprocessing algorithm for cropping images of Chinese character packaging areas and a recognition network, by analyzing images collected on a Chinese character packaging production line and borrowing ideas from the Mobile Net series of lightweight convolutional neural networks. Through experiments, the proposed preprocessing algorithm can accurately extract the image of the Chinese character packaging area, and the recognition network can achieve an inspection speed of 14 boxes per second on the Jetson Nano platform, which is much faster than the existing manual visual inspection speed of 1 box per second and achieves an accuracy rate of 99.94%. The deployment of this algorithm on a Chinese character packaging line significantly reduces the constraints of inspection speed on production line capacity and provides technical support for the automation upgrade of the packaging line. The next step is to carry out work related to algorithm optimization, model quantification, and hardware platform adaptation to further improve the speed and accuracy of the algorithm to meet the participation requirements.



---

*Source: 1219802-2022-06-23.xml*