Generating Handwritten Chinese Characters Using CycleGAN

Bo Chang, Bo Chang 0002, Qiong Zhang, Shenyi Pan, Lili Meng

Abstract

Generating personalized handwritten Chinese fonts is a labor-intensive process due to the vast character set. This paper presents a novel approach using a DenseNet CycleGAN framework to synthesize high-quality handwritten characters from printed fonts using unpaired training data. By integrating DenseNet blocks into the generator and employing new evaluation metrics for content and style, the method achieves high readability and stylistic consistency, even for complex calligraphic styles.

Introduction

The creation of digital fonts for logographic languages like Chinese presents a significant challenge. While English requires only 26 characters, a functional Chinese font necessitates at least 3,000 common characters. Traditional generative models often require paired data, where users must provide handwritten samples for every character in the target set—an impractical requirement for most. This paper addresses the data scarcity problem by leveraging CycleGAN for unpaired image-to-image translation.

Methodology

Unpaired Translation with CycleGAN

Unlike standard GANs that require direct one-to-one mapping between source and target images, CycleGAN learns to translate between two domains (e.g., "Printed Font" and "Handwritten Style") using unpaired datasets.

Comparison of paired (a) and unpaired (b) training data paradigms.

The model utilizes a cycle consistency loss: if a printed character is converted to a handwritten style and then back to a printed font, the final output should match the original input. This mechanism allows the model to capture the general stylistic distribution of a handwriting sample without needing specific character-level correspondences.

DenseNet Architecture

To improve the preservation of complex stroke details, the authors replace the standard ResNet blocks in the CycleGAN generator with DenseNet blocks.

The generator architecture featuring a Transfer Module with dense connections.

In a DenseNet, each layer is connected to every other layer in a feed-forward fashion. This architecture ensures that feature maps from earlier layers are preserved and reused throughout the network, which helps the model avoid common issues like missing or distorted strokes in complex Chinese characters.

Evaluation Metrics

The authors propose two objective metrics to evaluate the generated outputs:

  • Content Accuracy: Using a pre-trained Chinese character recognizer (HCCR-GoogLeNet), the model measures how well the generated character can be "read" by an AI, serving as a proxy for human readability.
  • Style Discrepancy: By calculating the statistical difference between the generated style and the target style using Gram matrices, the authors quantify stylistic fidelity.

Key Results

The proposed DenseNet CycleGAN demonstrated superior performance in both readability and style. Key findings include:

  • High Readability: Content accuracy exceeded 80% when the model was trained on at least 10% of the target style data.
  • Architectural Efficiency: The DenseNet-5 model produced cleaner results with fewer artifacts compared to ResNet-based alternatives.
  • Calligraphic Synthesis: The model successfully mimicked the semi-cursive style of Wang Xizhi’s Lantingji Xu, generating aesthetically pleasing characters that were not present in the training set.

Conclusion

This work demonstrates that DenseNet-based CycleGANs can effectively synthesize complex handwritten Chinese characters from unpaired data. By focusing on global style rather than local stroke decomposition, the model captures the "spirit" of individual handwriting. Future research will explore refining the generator to handle the fluid stroke merging characteristic of highly cursive scripts.

Summary updated

BibTeX
@inproceedings{chang2018generating,
  author = {Bo Chang and Bo Chang and Qiong Zhang and Shenyi Pan and Lili Meng},
  title = {{Generating Handwritten Chinese Characters Using CycleGAN}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2018},
  doi = {10.1109/wacv.2018.00028},
}
Figure