Innovative design of traditional calligraphy costume patterns based on deep learning

With the global homogenization of today’s costume design, a new design phenomenon is derived, that is, the globalization of regional ethnic traditional costume. Chinese traditional style has become one of the global fashion trends. In order to digitally inherit the traditional costume culture and innovate and upgrade the design process in the costume industry, this paper takes the traditional calligraphy costume patterns as the research object and proposes an innovative design method based on deep learning Generative Adversarial Network. This study analyzes the artistic characteristics and cultural genes of traditional calligraphic costume patterns, establishes a Generative Adversarial Network model containing discrimination and generation modules, and optimizes the design of the model for the characteristics of traditional costume patterns, such as small samples, multiple specifications, and emphasis on meaning rather than form. Through comparative experiment, subjective evaluation and design application, the advanced and practical value of the model are verified. This research aims to provide new ideas and methods for the inheritance and innovation of traditional culture in costume arts.


Introduction
As a unique form of artistic expression of Chinese characters in China and the areas radiated by Chinese culture, calligraphy has rich and profound artistic and cultural connotation, which is an important part of Chinese traditional culture. With rich artistic expression and profound cultural connotation, traditional calligraphy patterns are widely used in the design of clothing and textiles. Under the current globalization of regional traditional ethnic costumes, Chinese traditional costume patterns represented by calligraphy costume patterns have become popular all over the world.
With the popularity of traditional costume patterns in the world, the related creation and design methods are facing higher requirements in many aspects. At the same time, the digital intelligent design method has received extensive research and application. The artificial intelligence technology represented by deep learning provides new methods and technical support for the inheritance and innovation of numerous traditional culture topics. Taking Chinese traditional calligraphy costume patterns as the object, this paper constructs a Generative Adversarial Network innovation design model based on deep learning technology, and optimizes the design according to the characteristics of traditional culture patterns.

Calligraphy costume patterns
As a unique form of artistic expression in China and the area radiated by Chinese culture, calligraphy has a long history. Throughout the history of world art, there have been many calligraphers. The artistic patterns of traditional calligraphy elements contain rich and profound cultural connotations. Through the mixing of water and ink in different proportions, a variety of rich ink colors are formed, which can present a kind of "vibrant and vivid" painting sense combined with different layouts of blank space. Because of its varied and rich technique performance, traditional calligraphy patterns are very suitable as costume patterns applied to a variety of fabrics.

Application of deep learning in innovative design
In recent years, the research progress of deep learning in the direction of image vision has put forward many new methods for innovative art design.In 2016, Google developed Auto Draw, a smart drawing tool, which uses deep learning technology to train the machine to make it have the functions of sketch recognition, rapid database matching and smooth curve pattern generation. In 2017, Alibaba developed Lu Ban, an artificial intelligence design software that can quickly generate product promotion posters that satisfy different users' browsing hobbies through deep learning technology. In addition, the trademark design system trained by Logo Joy through deep learning technology can quickly generate trademarks according to the trademark name, preferred color and design style provided by users.
In the field of deep learning research, Generative Adversarial Network has been widely applied and researched since it was proposed by Goodfellow in 2014 due to its lower training difficulty, higher training efficiency, unsupervised training mode and wider applicability [1] . In recent years, Generative Adversarial Network has also been applied and studied in digital pattern design. Steven Szu-Chi CHEN et al. proposed a Guangcai porcelain pattern generation system based on conditional Generative Adversarial Network, which can generate new composite images of Guangcai porcelain style according to the creative mask or abstract porcelain elements provided by users [2] . Qin Jingyan et al. proposed a cloisonne pattern generation method based on Generative Adversarial Network, which realized the cloisonne style migration of common patterns through unpaired data sets [3] .
Although deep learning and Generative Adversarial Network has been widely used in many directions, it is rare to apply this theory to the study of digital generation of traditional costume patterns. This paper explores the application of deep learning technology in the innovative design of traditional costume patterns by taking traditional calligraphy costume patterns as the research object.

Model Construction
Based on the deep learning Generative Adversarial Network, this paper constructs a neural network model trunk structure composed of generation module and discrimination module. The generation module plays the role of costume pattern designer in the model. The discrimination module plays the role of design critic in the model.

Model optimization
Among the many research subjects of deep learning image processing, compared with most physical images, traditional cultural patterns are characterized by fewer training samples, complex sample 3 specifications, and emphasis on meaning rather than form. Therefore, it is difficult to research machine training on it, which needs to optimize the design of the model according to its characteristics. This paper adds training sample automatic amplification and standardization preprocessing modules on the basis of the model architecture, and uses Batch Normalization, Leaky ReLu, Wasserstein Loss, RMSProp and other algorithms to optimize the performance of the model to make it more suitable for the traditional calligraphy costume patterns.
3.2.1. Training sample automatic preprocessing module. In the existing research, mature deep learning image applications are mostly used for face recognition, traffic target positioning, etc. Since the training samples are mainly physical photos, a larger number of training samples can be collected. However, since traditional cultural patterns are mostly artistic creations, problems such as small number of training samples and inconsistent image specifications are inevitable. In response to this, a pattern self-amplification standardized preprocessing module is added to the torso architecture of the model. In more detail, the module can conduct automatic quantity amplification and standardized pretreatment within an appropriate range for the input training set image, which greatly improves the trainability of small samples of the overall model and reduces the workload of artificial image pretreatment before training.

Batch Normalization.
In order to solve the problems of slow convergence and gradient disappearance that may occur during training of the neural network, the Batch Normalization mechanism is used in the optimization design of models, which normalizes hidden neurons by pulling them back from an abnormal distribution to a more standard normal distribution [4] . The addition of the Batch Normalization mechanism has resulted in a variety of benefits. For example, the effective improvement of training speed and model accuracy greatly accelerates the convergence process. With the help of classification effect, the model can prevent overfitting to a great extent. With the simplification of the parameter adjustment process, the requirements of initialization are reduced, and the upper limit of learning rate is increased.

Leaky ReLu.
Leaky ReLU was first proposed in 2013 in an acoustic model, which is a variant of ReLU [5] . By assigning a non-zero slope to all negative values, Leaky ReLU not only preserves ReLU's performance of reducing gradient disappearance and accelerating convergence, but also reduces the appearance of silent neurons, thus effectively solving the problem of neurons not learning after Relu enters the negative interval. Therefore, Leaky ReLU is used in this paper to optimize the design of the model.

RMSProp.
The full name of RMSProp is Root Mean Square Prop, a neural network optimization algorithm proposed by Geoffrey E. Hinton. The principle of RMSProp is to correct the swing amplitude by calculating the differential squared weighted average of the gradient, so that the swing amplitude is not too large when the model is optimized and the convergence speed of the loss function is fast. Therefore, this article chose to use RMSProp to optimize the design of the model.

Wasserstein
Loss. The shortcomings of the original loss function of GAN are mainly manifested as two points. One is the tendency for mode collapse, that is, the diversity of generative samples is insufficient. The other is that the instability of the training cannot be converged to some extent. The Wasserstein Loss function is proposed to achieve leapfrog optimization, as shown below. The problem of Generative Adversarial Network training instability was solved completely [6] . The problem of collapse mode is basically resolved to ensure the diversity of generative samples. Therefore, this paper optimizes and upgrades the model constructed in this paper by using the Wasserstein Loss function to replace the original function.
The optimized model is shown in the figure 2. Among them, the discrimination module is trained separately, so its weight is marked as untrainable to ensure that only the weight of the generation

Experimental environment and sample preparation
The experimental platform used in this paper is Ubuntu 16.04 LTS operating system, which has 62.8GB memory, Intel Xeon(R) CPU E5-2637 V4.5@3.5ghz *16 processor, TITAN XP *4/PCIe/SSE2 graphics card, as well as12G *4 video memory. The construction of the model is based on the deep learning framework Keras (the backend compiler is Tensorflow), and is implemented using the programming language Python 3.6.

Training process
After about 12,000 unsupervised learning and training cycles, the output results of the network model gradually evolved from a bunch of noise points into splash-like costume patterns created by machine simulation generation. Figure 3 shows the corresponding output patterns of several time nodes selected in the 12000 training cycles. It can be seen that through continuous learning and training, the generative pattern of the generation module in the process of confrontation with the discrimination module is getting closer and closer to reality. Eventually in about 15 hours, the training basically reaches stability, and the combined weighted loss function approaches zero, as shown in Figure 4.   Compared with the traditional manual costume pattern design method, the method proposed in this paper shows obvious low technical barrier, high efficiency, controllability and sustainability. At the same time, compared with other non-GAN Deep learning models, such as DBM (Deep Boltzmann Machine), VAE (Variational Autoencoders) and NCE (Noise-Contrastive Estimation), the model constructed in this paper has a great improvement in performance, which is related to the advancement of the Generative Adversarial Network itself [7] .
Through the study and experiment of the current popular Generative Adversarial Network model, this paper carries out comparative experiments on the original GAN model, DCGAN model and the model created in this article. In addition to indicators such as convergence time and generation time, this paper also chose IS (Inception Score) and FID (Frechet Inception Distance) as key indicators to score the model performance. IS and FID are widely used to measure the quality and diversity of output images of Generative Adversarial Network. The higher the IS score is, the smaller the FID score is, and the higher the image diversity and quality are [8] . According to the data results of the comparative experiment shown in the table, the model constructed in this paper and the original GAN model and the DCGAN model show better performance in the innovative design of traditional calligraphy costume patterns.

Manual evaluation experiment.
In terms of the subjectivity of artistic creation in the digital generation of costume patterns, in addition to the objective contrast experiment, this paper also sets up an artificial subjective evaluation experiment. The participants included 45 design-related practitioners and 35 non-design-related practitioners of random age with bachelor degree or above, for a total of 90. Without knowing the composition ratio of the two types of patterns, the respondents were asked to identify and classify 50 experimental samples of traditional calligraphy costume patterns. The 50 experimental samples consisted of 25 patterns created by designers and 25 patterns simulated by computer models. The final calculation result of the accuracy of the discrimination results is shown in the table 2. The accuracy rate of the interviewees in judging the pictures is mainly between 40% and 60%, and the proportion of regional people is up to 82.22%.It can be seen that most of the interviewees are unable to distinguish between generative patterns and real patterns. The patterns created by the models created in this article have a high degree of authenticity. results show that the traditional calligraphy costume patterns created by the model in this paper can be well applied to the costume design to present the artistic characteristics and cultural connotation of the "vivid spirit" of traditional Chinese calligraphy. Table 3. Design application of the pattern created by the model.
Pattern designed by the model Design application

Conclusion
As an important form of artistic expression of Chinese characters, the patterns created by calligraphy have rich artistic expression and profound cultural connotation, which is widely popular in the globalization pattern of regional ethnic costumes. The application of deep learning technology to digital inheritance and innovative design has become an urgent research topic. This paper takes the calligraphy clothing pattern as the research object and uses the Generative Adversarial Network to construct a digital innovative design model. After targeted optimization design and unsupervised training and learning, this study achieves the digital innovative design of calligraphy costume patterns well. It has been confirmed by experiments that the model proposed in this paper is more suitable for the innovative design of traditional calligraphy than the traditional creation method and the popular deep learning model, which plays a positive role in the inheritance and innovation of traditional culture in costume art.