# Generating Structurally Complete Stylish Chinese Font Based on Semi-Supervised Model
## 1 Introduction  
Stylish Chinese fonts have become a popular means of expressing individuality, attracting significant attention from users. However, considering the extensive character repertoire in Chinese, designing each character by hand poses a significant challenge for designers. Recently, there has been increased interest in the generation of stylish Chinese fonts, making it an intriguing research area. The fundamental methods of Chinese character generation primarily involve reconstruction techniques based on the structural features of characters [1]. These methods initially analyze the font's skeleton structure to extract stroke and radical information, which is then utilized to compose new Chinese characters. However, the diverse stroke types and intricate structure of Chinese characters often necessitate manual extraction, a labor-intensive and time-consuming process. Consequently, the practical application of these methods is severely limited. With the advancements in deep learning [2, 3], generative adversarial networks (GANs) [4] and their variants have become the most commonly employed approaches [5]. These methods facilitate the integration of feature extraction and generation processes, enabling end-to-end training for Chinese font generation. Among these techniques, CycleGAN [6] is a widely used approach in Chinese character generation, as it leverages unpaired training data. Nevertheless, CycleGAN often encounters challenges such as mode collapse and structural distortions in Chinese characters. To address this,StrokeGAN [7] incorporates explicit stroke feature information during the training phase of Chinese font generation. By utilizing stroke information, StrokeGAN captures the mode details of Chinese characters and preserves their integrity, effectively mitigating mode collapse. However, the distinctive characteristics of Chinese character images, coupled with their inherent structural complexity and substantial similarities, often result in a higher incidence of structural omissions during the model's generation process, as illustrated in Figure 1.  
We propose a semi-supervised model that incorporates a small amount of paired data to achieve a supervised-like effect that is typically accomplished by conventional GANs. Stroke encoding (SE) is utilized as additional conditional information for generating Chinese characters, effectively addressing the issue of generating structurally incomplete characters in CycleGAN. Unlike natural images, Chinese character images exhibit a high degree of structural complexity. Minor alterations in stroke positions can have a substantial impact on the overall structure of Chinese characters. As a result, by utilizing a limited number of paired datasets to acquire structural information from all character images, the model can effectively discern their distinctions. Furthermore, we introduce an attention module, building upon the self-attention network [8], that has been enhanced to highlight the interplay between strokes, as well as the interdependence between strokes and the overall structure. To guide the model in accurately capturing stroke and structure information from these character images, we incorporate two additional loss functions. This paper makes the following contributions:  
* This paper proposes a semi-supervised method for generating Chinese characters with a more complete structure. Stroke encoding is employed to capture fine-grained details, while a small quantity of paired data is integrated to offer supervised information regarding the overall structural characteristics of Chinese characters. This enables the model to effectively capture the structural intricacies of Chinese characters. To assist the model in accurately capturing stroke and structure information from these character images, we incorporate two additional loss functions. * This paper involves the introduction of an attention module in the generator model.