A method for generating a Chinese calligraphy font image based on regional structure consistency

By constructing a region structure consistency model based on generative adversarial networks, the problems of blurred font structure and loss of details in the generation of Chinese calligraphy font images are solved, achieving high-quality calligraphy font image generation and improving generation efficiency and effect.

CN116597034BActive Publication Date: 2026-11-06HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310556749.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2026-11-06
Estimated Expiration
2043-05-17

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively preserve the correct font structure in the generation of Chinese calligraphy font images, resulting in blurry, disordered, and detail-loss problems in the generated Chinese calligraphy font images.

Method used

A region structure consistency model based on generative adversarial networks is adopted. By combining an encoder-decoder structure generator and a PatchGAN discriminator with a region structure consistency network, a calligraphy font image generation network is constructed. Realistic calligraphy font images are generated by utilizing the region structure consistency constraints of different styles of the same Chinese character.

Benefits of technology

It effectively preserves the skeletal structure and stroke details of Chinese characters, improving the quality and efficiency of calligraphy font image generation. It can learn the style of the target calligraphy font better, and the generated images outperform existing models in terms of subjective visual perception and objective SSIM evaluation value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116597034B_ABST
    Figure CN116597034B_ABST
Patent Text Reader

Abstract

The application discloses a Chinese character calligraphy font image generation method based on region structure consistency. The method is as follows: 1. Obtain a basic font image and a target font real image. The basic font image contains Chinese characters that need to be generated into the target font. 2. Based on the encoder-decoder structure, a generator for generating a target font simulation image from the input basic font image is constructed. 3. A discriminator for discriminating the target font simulation image and the target font real image is constructed. The discriminator evaluates and scores each independent region of the input image data. 4. A region structure consistency network for font skeleton structure constraint is constructed. 5. Network training. 6. Generate the target font of the required Chinese character. The application sets a region structure consistency module in the calligraphy font image generation network, effectively constrains the skeleton structure of the Chinese character in the generation process, makes the font structure of the generated target font simulation image clear, and can effectively restore the stroke details.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of deep learning, specifically relating to a method for generating Chinese calligraphy font images based on region structure consistency. Background Technology

[0002] Chinese characters, passed down for millennia, are a linguistic symbol embodying social wisdom and cultural aesthetics, and the only written form that has continued uninterrupted from ancient times to the present. They are the remnant of Chinese civilization, carrying the nation's culture, recording the lifestyles and customs of generations of Chinese people, providing historical records and ensuring the transmission of scholarship. The composition of Chinese characters embodies the great wisdom and rich culture of the Chinese nation; they can be written vertically or horizontally, and the art of calligraphy formed from them is a treasure of China's splendid culture. Traditional Chinese calligraphy is a cultural art built upon Chinese characters, a written symbol for recording the Chinese language. Throughout history, through the development and changes in character shapes, structures, and strokes, it has gradually acquired its own specific aesthetic significance, unmatched by any other writing system in the world. In today's era of widespread internet use and its gradual penetration into daily life, the use of handwriting has decreased, leading to a decline in the writing skills of the Chinese people. Whether it's the design of printed fonts used in computers or the inheritance and development of traditional calligraphy with both soft and hard pens, the internet age presents entirely new challenges.

[0003] Taking standard-style calligraphy font images as input and outputting font images in the style of famous calligraphers is essentially an image conversion task. It involves adding appearance and style features from the target domain dataset while preserving the structural features of the input image data. Currently, there are two main categories of methods for generating calligraphy font images. The first method involves decomposing Chinese characters into strokes to build a stroke library, and then using these strokes to construct new calligraphy characters. This method simply concatenates the segmented strokes to form a calligraphy font, but it ignores the overall structure of the font and heavily relies on the extraction of individual strokes. When the font's feature structure is too complex, stroke extraction techniques cannot achieve good results, requiring manual extraction, which significantly increases the workload. The second method utilizes deep learning to achieve image conversion between standard-style fonts and famous calligraphers' fonts. Currently, the most mainstream approach is to use generative adversarial networks (GANs) to accomplish this task.

[0004] The core idea of ​​Generative Adversarial Networks (GANs) originates from Nash equilibrium in game theory, reflected in the continuous optimization process of the generator and discriminator. The generator aims to study the distribution of real data, producing fake images to induce the discriminator to make incorrect judgments. The discriminator's task is to correctly distinguish whether the input data is real or derived from the generator. Through this game-like confrontation, the discriminator eventually struggles to differentiate between real images and fake images generated by the generator, at which point the generator can produce indistinguishable fake images. With the rise of GANs, the technical routes in the field of generation have also begun to develop in multiple directions. Currently, the main applications of GANs are image generation and data augmentation. Due to the limited number and simple structure of English characters, coupled with the earlier development of deep learning abroad compared to China, early generative adversarial network (GAN) models for font image generation were mostly limited to generating the 26 English letters or simple words. It wasn't until the last five years that research on Chinese calligraphy font image generation models based on GANs gradually began in China, effectively improving the generation quality and efficiency of calligraphy font images. However, current image conversion GAN models often struggle to preserve the correct font structure when applied to Chinese calligraphy font image datasets. To address this bottleneck, this invention proposes a Chinese calligraphy font image generation model based on region structure consistency, PSCGAN, which is based on GANs. Summary of the Invention

[0005] The purpose of this invention is to address the scarcity of calligraphy font image data and the lack of a universal method for generating such data, as well as the problems of blurred and disordered complex font structures and loss of detailed font structures when existing font generation methods are applied to Chinese calligraphy font image datasets. This invention provides a method for generating Chinese calligraphy font images based on region structure consistency.

[0006] A method for generating Chinese calligraphy font images based on region structure consistency includes the following steps:

[0007] Step (1): Obtain the base font image X and the target font real image R. The base font image X contains the Chinese characters that need to be used to generate the target font.

[0008] Step (2): Based on the encoder-decoder architecture, construct a generator for generating the target font simulation image F from the input base font image X.

[0009] Step (3): Construct a discriminator to distinguish between the simulated target font image F and the real target font image R. The discriminator evaluates and scores each independent region of the input image data.

[0010] Step (4): Construct a region structure consistency network for font skeleton structure constraints.

[0011] 4.1 After the base font image X generates the target font simulation image F through the generator, images X and F are simultaneously sent to the region structure consistency module. Regions are selected from each image to obtain multiple local images of both images X and F. Each local image of image X is paired with one of the local images of image F to form multiple image pairs. In one image pair, the relative positions of the two local images within their corresponding complete images are the same. In the remaining image pairs, the relative positions of the two local images within their corresponding complete images are all different.

[0012] 4.2 Each of the two local images of the same image pair is passed through three convolutional blocks in the encoder used by the generator, followed by a fully connected layer and normalization processing to obtain the corresponding unit feature vectors. Each image pair forms a vector pair consisting of two unit feature vectors.

[0013] 4.3 For each image pair, the inner product of the two corresponding unit feature vectors is calculated to obtain the similarity between the two local images in the image pair.

[0014] Step (5): The generator and discriminator form a generative adversarial network (GAN); the GAN and the region structure consistency network form a calligraphy font image generation network. The calligraphy font image generation network is trained. The training objective of the region structure consistency network is to adjust the encoder parameters, increase the inner product of feature vectors obtained from image pairs with consistent relative positions, and decrease the inner product of feature vectors obtained from image pairs with dissimilar relative positions.

[0015] Step (6): Input the basic font image corresponding to the Chinese character to be generated into the calligraphy font image generation network; the calligraphy font image generation network generates the corresponding target font image.

[0016] Preferably, the generator's operation in step (2) is as follows:

[0017] 2.1 Extracting features from the font image using an encoder. The encoder consists of three convolutional blocks, each containing a convolutional layer, an instance normalization layer, and an activation function. The base font image X obtained in step (1) is used as the input to the encoder, and after passing through the three convolutional blocks, the font image feature map T is obtained.

[0018] 2.2 The encoder and decoder are connected by a residual module consisting of nine cascaded residual blocks; the font image feature map T is input into the residual module to obtain the basic font image feature code S.

[0019] 2.3 The decoder contains two deconvolution blocks, each consisting of a deconvolution layer, an instance normalization layer, and an activation function. The base font image feature encoding S is input into the decoder, and after passing through the two deconvolution blocks, the target font simulation image F is obtained.

[0020] Preferably, the size of the font image feature map T is 16×16×256.

[0021] Preferably, the size of the target font simulation image F is 64×64×3.

[0022] Preferably, the discriminator operates as follows in step (3):

[0023] 3.1 The target font simulation image F generated by the generator is mixed and shuffled with the target font real image R and then input into the discriminator.

[0024] 3.2 The input data is passed through three fully convolutional blocks in sequence to obtain the matrix feature map P after convolution mapping.

[0025] 3.3 After evaluating and scoring each pixel of the matrix feature map P, the arithmetic mean is taken as the comprehensive score of the matrix feature map P.

[0026] Preferably, the discriminator uses PatchGAN as its base network.

[0027] Preferably, the size of the region that the model discriminator distinguishes in step (3) is 16×16.

[0028] Preferably, during generator training, the discriminator parameters are fixed while the generator parameters are adjusted to achieve a higher score from the generated target font simulation image F in the discriminator. During discriminator training, the generator parameters are fixed while the discriminator parameters are adjusted to improve the accuracy of the discriminator's output score.

[0029] Preferably, the base font used is sans-serif.

[0030] The effective effects of this invention are as follows:

[0031] 1. This invention sets up a region structure consistency module in the calligraphy font image generation network. It utilizes the characteristic that the stroke structure in regions with consistent relative positions in different styles of the same Chinese character should be consistent. During the generation process, the skeleton structure of the Chinese character is effectively constrained, so that the generated target font simulation image has a clear font structure and can effectively restore the stroke details.

[0032] 2. Based on the generative adversarial network structure, this invention can realize the conversion from basic font image to target font image, effectively complete the missing Chinese characters in the target font, and effectively improve the efficiency of computer font generation.

[0033] 3. In the process of converting standard style font images to target calligraphic style font images, this invention can essentially preserve the skeletal structure of the font and learn the style of the target calligraphic font quite well, including brushstrokes and stroke direction. Even for font structures that are not present in standard sans-serif character images and are relatively detailed, the model designed in this invention can still learn them accurately, surpassing previous font image generation models in both subjective visual perception and objective SSIM evaluation. Attached Figure Description

[0034] Figure 1 This is the overall flowchart of the present invention;

[0035] Figure 2 This is a framework diagram of the calligraphy font image generation network used in this invention;

[0036] Figure 3 This is a network structure diagram of the regional structure consistency module in this invention;

[0037] Figure 4 The discriminator of this invention generates a comparison chart of different region sizes (the region size in the first row is 8×8, the region size in the second row is 16×16, and the region size in the third row is 32×32).

[0038] Figure 5 A detailed structural comparison diagram of the simulated target font image and the real target font image generated by this invention (the leftmost part is the standard black font image, the middle part is the calligraphy font image generated by the model, and the rightmost part is the real target font image R);

[0039] Figure 6 This is a comparison chart showing the effects of the present invention and existing models in generating Liu Gongquan's calligraphy font images. (Column a shows standard boldface and real Liu Gongquan calligraphy font images; column b shows Liu Gongquan calligraphy font images generated by the Pix2Pix model; column c shows Liu Gongquan calligraphy font images generated by the CycleGAN model; column d shows Liu Gongquan calligraphy font images generated by the zi2zi model; column d shows Liu Gongquan calligraphy font images generated by the PSCGAN model proposed in this invention).

[0040] Figure 7 The image shows a comparison of the effects of the present invention and existing models in generating Yan Zhenqing's calligraphy font images (column a) shows standard sans-serif and real Yan Zhenqing calligraphy font images, column b) shows Yan Zhenqing calligraphy font images generated by the Pix2Pix model, column c) shows Yan Zhenqing calligraphy font images generated by the CycleGAN model, column d) shows Yan Zhenqing calligraphy font images generated by the zi2zi model, and column d) shows Yan Zhenqing calligraphy font images generated by the PSCGAN model proposed in this invention. Detailed Implementation

[0041] The present invention will be further analyzed below with reference to specific embodiments.

[0042] like Figure 1 and 2 As shown, a method for generating Chinese calligraphy font images based on region structure consistency is presented. This method converts standard sans-serif font images into font images of the target calligraphic style, and can generate famous calligraphic fonts in batches using a trained model. The calligraphy font image generation network employed includes a generative adversarial network (GAN) structure and a region structure consistency module. The GAN structure comprises a generator based on an encoder-decoder architecture and a discriminator based on PatchGAN. The region structure consistency module is used to strengthen the constraint on the font skeleton structure of the calligraphy font image. The calligraphy font image generation network can achieve the conversion of font images from standard sans-serif style to the target calligraphic style.

[0043] The generator consists of a cascaded encoder and decoder; the encoder consists of three consecutive convolutional blocks. Each convolutional block includes a convolutional layer, an instance normalization layer, and an activation function. The decoder consists of two consecutive deconvolutional blocks; each deconvolutional block includes a deconvolutional layer, an instance normalization layer, and an activation function. The discriminator consists of three consecutive fully convolutional blocks.

[0044] like Figure 3 As shown, the input to the region structure consistency network consists of image pairs composed of local images cropped from the base font image and the target font image. The image pairs first pass through an encoder structure shared with the generator, and then three fully connected layers and one normalization layer are connected in series after the encoder to finally obtain the corresponding unit feature vector pairs, and the inner product of the vector pairs is calculated.

[0045] This method for generating Chinese calligraphy font images based on region structure consistency includes the following steps:

[0046] Step (1): Preprocess the complete base font file to obtain the base font image X. Acquire the target font real image R. The target font real image R does not contain all Chinese characters; the Chinese characters not contained in the target font real image R need to be generated based on the base font image X.

[0047] In this step, based on an open-source TTF format font file, a Canvas is created using Python. The size of the text area under the current font is obtained, and the font size is automatically adjusted to prevent the calligraphy font image from exceeding the canvas boundaries and causing incomplete image display. Finally, a grayscale image of the calligraphy font is drawn on this canvas, obtaining the standard sans-serif style font image data and the font image data of famous calligraphers, all with a uniform size of 64×64×3. Drawing images based on TTF is a mature existing technology and will not be explained in detail. In this embodiment, the base font is a sans-serif font.

[0048] Step (2): Generation of simulated Chinese calligraphy font images.

[0049] A generator structure is designed based on an encoder-decoder architecture to extract and reconstruct features from Chinese calligraphy font images:

[0050] 2.1 The features of the font image are extracted by the encoder, which contains three convolutional blocks. Each convolutional block includes a convolutional layer, an instance normalization layer, and an activation function. The basic font image X obtained in step (1) is used as the input of the encoder. After passing through the three convolutional blocks, a font image feature map T with a size of 16×16×256 is obtained.

[0051] 2.2 The encoder and decoder are connected by a residual module consisting of nine cascaded residual blocks; the font image feature map T is input into the residual module to obtain the basic font image feature code S.

[0052] 2.3 The decoder is used to generate the target style calligraphy font image. The decoder contains two deconvolution blocks, each of which includes a deconvolution layer, an instance normalization layer, and an activation function. The basic font image feature encoding S is input into the decoder, and after passing through the two deconvolution blocks, a target font simulation image F with a size of 64×64×3 is obtained.

[0053] Step (3): Discrimination between the target font simulation image F and the target font real image R obtained in step (1).

[0054] This invention uses PatchGAN as the base network to construct the discriminator structure, and evaluates and scores each independent region (i.e., patch) of the image data input to the discriminator, thereby more effectively confirming the quality of each region of the image data. Figure 4 Generate a comparison chart of results when different region sizes are selected for the discriminator; Figure 4In the diagram, the region size corresponding to the first row is 8×8, the region size corresponding to the second row is 16×16, and the region size corresponding to the third row is 32×32. Clearly, 16×16 produces the best generation result; therefore, the region size for the model discriminator is 16×16.

[0055] 3.1 Mix and shuffle the target font simulation image F generated in step 2.3 with the target font real image R, and then randomly input the mixture into the discriminator.

[0056] 3.2 The input data is passed through three fully convolutional blocks in sequence. Instead of concatenating fully connected layers after the full convolution, the matrix feature map P mapped by the convolution is retained.

[0057] 3.3 Each pixel of the matrix feature map P is evaluated and scored, that is, each pixel represents a part of the evaluation value of the original image. Finally, the arithmetic mean is taken to fully consider the influence between different regions of the image and obtain the comprehensive score of the matrix feature map P.

[0058] Step (4): Construct the font skeleton structure constraints of the target font

[0059] This embodiment designs a region structure consistency module to constrain the font skeleton structure. Its core idea is that in different font images of the same Chinese character, the skeleton structure of the font should be similar in regions with the same relative position; while the skeleton structure of the font should be different in regions with different relative positions.

[0060] 4.1 After the base font image X generates the target font simulation image F through the generator, images X and F are simultaneously sent to the region structure consistency module. Regions are selected from each image to obtain multiple local images of both images X and F. Each local image of image X is paired with one of the local images of image F to form multiple image pairs. In this embodiment, a total of five image pairs are generated. In one image pair, the relative positions of the two local images in the complete image are consistent. In the other four image pairs, the relative positions of the two local images in the complete image are inconsistent.

[0061] 4.2 After passing each of the two local images of the same image pair through three convolutional blocks in the encoder, and then through a fully connected layer and normalization processing, the corresponding unit feature vectors are obtained. Thus, each of the five image pairs forms a vector pair consisting of two unit feature vectors.

[0062] 4.3 For each image pair, calculate the inner product of the two unit feature vectors obtained in step 4.2 to obtain the similarity between the two local images in the image pair; obviously, the training objective is: image pairs with consistent relative positions in the complete image will have a larger inner product; while image pairs with inconsistent relative positions in the complete image will have a smaller inner product.

[0063] Figure 5 This is a detailed structure comparison diagram of the target font simulated image F generated by the generator and the real target font image R, where the rightmost part is the real target font image R, the middle part is the calligraphy font image generated by the model, and the leftmost column is the standard boldface character image. In the boldface style, the hook at the bottom right corner is omitted, while the resulting font image generated by the model well restores the hook in the horizontal-fold-hook stroke of the Chinese character "固", which reflects the effective constraint on the calligraphy skeleton structure.

[0064] Step (5): Training of the calligraphy font image generation network. The training of the generative adversarial network is a process of continuously iteratively updating the parameters of the generator network, the discriminator network and each module, so as to finally generate realistic calligraphy font image data. During the training process, the Adam optimizer is used in conjunction with the loss function to achieve the purpose of optimizing the network parameters of the model. The model needs to perform two layers of cyclic training. The first layer is the manually set total number of training epochs. If it is found in the early stage of training that the model is not trained correctly as expected, the training can be ended directly by terminating the outermost loop. The number of inner loop iterations is determined by calculation based on the total number of image data and the batch size of each batch processing. The specific training process is as follows:

[0065] 5.1 Training and updating the parameters of the generator. In the process of generating the target font simulated image F in step 2.3, the parameters of the discriminator are fixed, and the parameters of the generator are adjusted so that the target font simulated image F obtains a high evaluation value in the discriminator.

[0066] 5.2 Training and updating the parameters of the discriminator. In the process of evaluating and scoring the real data and the simulated data in step 3.3, the parameters of the generator are fixed, and the parameters of the discriminator are adjusted so that the discriminator gives a high evaluation value to the real data and a low evaluation value to the simulated data.

[0067] 5.3 Training and updating the parameters of the regional structure consistency module. In step 4.3, the parameters of the encoder are adjusted to maximize the inner product of feature vectors between the same regions and minimize the inner product of feature vectors between different regions as much as possible.

[0068] 5.4 The training from step 5.1 to step 5.3 is cycled to continuously update the model parameters until a Nash equilibrium state is reached, after which the model parameters are no longer updated.

[0069] Step (6): Input the base font image of any Chinese character into the trained calligraphy font image generation network; the calligraphy font image generation network generates the target font image corresponding to the Chinese character. In this way, the target font lacking some Chinese characters can be completed to form a complete font library.

[0070] Figure 6A comparison of the image generation effects of Liu Gongquan's calligraphy fonts among different models is shown in Table 1. Column a represents the standard boldface and real Liu Gongquan calligraphy font images; column b represents the Liu Gongquan calligraphy font images generated by the Pix2Pix model; column c represents the Liu Gongquan calligraphy font images generated by the CycleGAN model; column d represents the Liu Gongquan calligraphy font images generated by the zi2zi model; and column e represents the Liu Gongquan calligraphy font images generated by the proposed model PSCGAN. Visually, the PSCGAN model's generation results are significantly better than the other three models. Analysis using the objective SSIM evaluation index also shows that the PSCGAN model exhibits better generation results. The SSIM evaluation results are shown in Table 1.

[0071] Table 1. SSIM Evaluation Results of Liu Gongquan's Calligraphic Chinese Character Font Images

[0072]

[0073]

[0074] Figure 7 This table compares the image generation results of Yan Zhenqing's calligraphy fonts from different models. Column a shows the standard boldface and real Yan Zhenqing calligraphy font images; column b shows the Yan Zhenqing calligraphy font images generated by the Pix2Pix model; column c shows the Yan Zhenqing calligraphy font images generated by the CycleGAN model; column d shows the Yan Zhenqing calligraphy font images generated by the zi2zi model; and column 3 shows the Yan Zhenqing calligraphy font images generated by the model proposed in this invention. Visually, the PSCGAN model's generation results are significantly better than the other three models. Analysis using the objective SSIM evaluation index also shows that the PSCGAN model exhibits better generation results. The SSIM evaluation results are shown in Table 2. This also demonstrates that the PSCGAN model has the ability to be applied to the generation of images with various calligraphy styles.

[0075] Table 2. SSIM Evaluation Results of Yan Zhenqing's Calligraphy Character Font Images

[0076]

Claims

1. A method for generating Chinese calligraphy font images based on region structure consistency, characterized in that: Includes the following steps: Step (1): Obtain the base font image X and the target font real image R; the base font image X contains the Chinese characters that need to be used to generate the target font; Step (2): Based on the encoder-decoder architecture, construct a generator for generating the target font simulation image F from the input base font image X; Step (3): Construct a discriminator to distinguish between the simulated image F of the target font and the real image R of the target font; the discriminator evaluates and scores each independent region of the input image data; Step (4): Construct a region structure consistency network for font skeleton structure constraints; 4.1 After the base font image X generates the target font simulation image F through the generator, both images X and F are simultaneously sent to the region structure consistency module. Regions are selected in each image to obtain multiple local images of images X and F respectively. Each local image of image X and image F is paired one by one to form multiple image pairs. In one image pair, the relative positions of the two local images in their corresponding complete images are consistent. In the other image pairs, the relative positions of the two local images in their corresponding complete images are different. 4.2 After passing each of the two local images of the same image pair through three convolutional blocks in the encoder used by the generator, and then through a fully connected layer and normalization processing, the corresponding unit feature vectors are obtained respectively; each image pair forms a vector pair consisting of two unit feature vectors. 4.3 For each image pair, the inner product of the two corresponding unit feature vectors is calculated to obtain the similarity between the two local images in the image pair; Step (5): The generator and discriminator form a generative adversarial network; a calligraphy font image generation network consisting of a generative adversarial network and a region structure consistency network; The network for generating calligraphy font images is trained; the training objective of the region structure consistency network is to adjust the encoder parameters, increase the dot product of feature vectors obtained from image pairs with consistent relative positions, and decrease the dot product of feature vectors obtained from image pairs with different relative positions. Step (6): Input the basic font image corresponding to the Chinese character to be generated into the calligraphy font image generation network; The calligraphy font image generation network generates the corresponding target font image.

2. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: The generator's operation in step (2) is as follows: 2.1 Extract features of the font image through the encoder; the encoder includes three convolutional blocks, each of which includes a convolutional layer, an instance normalization layer and an activation function; the base font image X obtained in step (1) is used as the input of the encoder, and after passing through the three convolutional blocks in sequence, the font image feature map T is obtained; 2.2 The encoder and decoder are connected by a residual module consisting of nine cascaded residual blocks; the font image feature map T is input into the residual module to obtain the basic font image feature code S; 2.3 The decoder contains two deconvolution blocks, each of which includes a deconvolution layer, an instance normalization layer, and an activation function. The basic font image feature encoding S is input into the decoder and passes through the two deconvolution blocks in sequence to obtain the target font simulation image F.

3. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: The size of the font image feature map T is 16×16×256.

4. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: The size of the target font simulation image F is 64×64×3.

5. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: The discriminator's operation in step (3) is as follows: 3.1 The simulated target font image F generated by the generator is mixed and shuffled with the real target font image R, and then input into the discriminator; 3.2 The input data is sequentially passed through three fully convolutional blocks to obtain the matrix feature map P after convolution mapping; 3.3 After evaluating and scoring each pixel of the matrix feature map P, the arithmetic mean is taken as the comprehensive score of the matrix feature map P.

6. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: The discriminator uses PatchGAN as its base network.

7. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: In step (3), the discriminator distinguishes regions of size 16×16.

8. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: During generator training, the discriminator parameters are fixed while the generator parameters are adjusted to give the generated target font simulation image F a higher score in the discriminator. During discriminator training, the generator parameters are fixed while the discriminator parameters are adjusted to improve the accuracy of the discriminator's output score.

9. The method for generating Chinese calligraphy font images based on region structure consistency according to claim 1, characterized in that: The base font used is sans-serif.

Citation Information

Patent Citations

  • Method for guiding Chinese character font generation based on structure

    CN110533737A

  • Calligraphy word stock automatic restoration method and system based on style migration

    CN110570481A