Skip to main content

Diff-Writer: A Diffusion Model-Based Stylized Online Handwritten Chinese Character Generator

  • Conference paper
  • First Online:
Neural Information Processing (ICONIP 2023)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1964))

Included in the following conference series:

  • 462 Accesses

Abstract

Online handwritten Chinese character generation is an interesting task which has gained more and more attention in recent years. Most of the previous methods are based on autoregressive models, where the trajectory points of characters are generated sequentially. However, this often makes it difficult to capture the global structure of the handwriting data. In this paper, we propose a novel generative model, named Diff-Writer, which can not only generate the specified Chinese characters in a non-autoregressive manner but also imitate the calligraphy style given a few style reference samples. Specifically, Diff-Writer is based on conditional Denoising Diffusion Probabilistic Models (DDPM) and consists of three modules: character embedding dictionary, style encoder, and an LSTM denoiser. The character embedding dictionary and the style encoder are adopted to model the content information and the style information respectively. The denoiser iteratively generates characters using the content and style codes. Extensive experiments on a popular dataset (CASIA-OLHWDB) show that our model is capable of generating highly realistic and stylized Chinese characters.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 79.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Kingma, D.P., Welling, M.: Auto-encoding variational bayes. In: ICLR (2014)

    Google Scholar 

  2. Goodfellow, I., et al.: Generative adversarial nets. In: NeurIPS (2014)

    Google Scholar 

  3. Xu, P., Hospedales, T.M., Yin, Q., Song, Y.Z., Xiang, T., Wang, L.: Deep learning for free-hand sketch: a survey. TPAMI 45(1), 285–312 (2022)

    Article  Google Scholar 

  4. Aksan, E., Pece, F., Hilliges, O.: DeepWriting: making digital ink editable via deep generative modeling. In: SIGCHI (2018)

    Google Scholar 

  5. Ribeiro, L.S.F., Bui, T., Collomosse, J., Ponti, M.: Sketchformer: transformer-based representation for sketched structure. In: CVPR (2020)

    Google Scholar 

  6. Xie, C., Lai, S., Liao, Q., Jin, L.: high performance offline handwritten Chinese text recognition with a new data preprocessing and augmentation pipeline. In: Bai, X., Karatzas, D., Lopresti, D. (eds.) DAS 2020. LNCS, vol. 12116, pp. 45–59. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-57058-3_4

    Chapter  Google Scholar 

  7. Kang, L., Riba, P., Rusinol, M., Fornes, A., Villegas, M.: Content and style aware generation of text-line images for handwriting recognition. In: TPAMI (2022)

    Google Scholar 

  8. Lai, S., Jin, L., Zhu, Y., Li, Z., Lin, L.: SynSig2Vec: forgery-free learning of dynamic signature representations by Sigma Lognormal-based synthesis and 1D CNN. In: TPAMI (2021)

    Google Scholar 

  9. Ha, D: Recurrent net dreams up fake Chinese characters in vector format with tensorflow. http://blog.otoro.net/2015/12/28/recurrent-netdreams-up-fake-chinese-characters-in-vectorformat-with-tensorflow/

  10. Zhang, X.Y., Yin, F., Zhang, Y.M., Liu, C.L., Bengio, Y.: Drawing and recognizing Chinese characters with recurrent neural network. In: TPAMI, Yoshua Bengio (2018)

    Google Scholar 

  11. Tang, S., Xia, Z., Lian, Z., Tang, Y. and Xiao, J.: FontRNN: generating large-scale Chinese fonts via recurrent neural network. In: CGF (2019)

    Google Scholar 

  12. Zhao, B., Tao, J., Yang, M., Tian, Z., Fan, C., Bai, Y.: Deep imitator: handwriting calligraphy imitation via deep attention networks. In: PR (2020)

    Google Scholar 

  13. Tang, S., Lian, Z.: Write like you: synthesizing your cursive online Chinese handwriting via metric-based meta learning. In: CGF (2021)

    Google Scholar 

  14. Dai, G., et al.: Disentangling writer and character styles for handwriting generation. In: CVPR, Zhuoman Liu and Shuangping Huang (2023)

    Google Scholar 

  15. Das, A., Yang, Y., Hospedales, T., Xiang, T., Song, Y.Z.: ChiroDiff: modelling chirographic data with diffusion models. In: ICLR (2023)

    Google Scholar 

  16. Ho, J., Jain, A., Abbeel, P.: Denoising diffusion probabilistic models. In: NeurIPS (2020)

    Google Scholar 

  17. Yun, X.L., Zhang, Y.M., Yin, F., and Liu, C.L.: Instance GNN: a learning framework for joint symbol segmentation and recognition in online handwritten diagrams. In: TMM (2021)

    Google Scholar 

  18. Graves, A.: Generating sequences with recurrent neural networks. In: ArXiv (2013)

    Google Scholar 

  19. Ha, D., Eck, D.: A neural representation of sketch drawings. In: ICLR (2018)

    Google Scholar 

  20. Aksan, E., Deselaers, T., Tagliasacchi, A., Hilliges, O.: CoSE: compositional stroke embeddings. In: NeurIPS (2020)

    Google Scholar 

  21. Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., Ganguli, S.: Deep unsupervised learning using nonequilibrium thermodynamics. In: ICML (2015)

    Google Scholar 

  22. Dhariwal, P.: Alexander quinn nichol: diffusion models beat GANs on image synthesis. In: NeurIPS (2021)

    Google Scholar 

  23. Song, J., Meng, C., Ermon, S.: Denoising diffusion implicit models. In: ICLR (2021)

    Google Scholar 

  24. Luo, C.: Understanding diffusion models: a unified perspective. In: arXiv (2022)

    Google Scholar 

  25. Liu, C.L., Yin, F., Wang, D.H., Wang, Q.F.: CASIA online and offline Chinese handwriting databases. In: ICDAR, Qiu-Feng Wang (2011)

    Google Scholar 

Download references

Acknowledgements

This work is supported by the Major Project for New Generation of AI under Grant No. 2018AAA0100400 and the National Natural Science Foundation of China (NSFC) Grant No. 62276258.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yan-Ming Zhang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ren, MS., Zhang, YM., Wang, QF., Yin, F., Liu, CL. (2024). Diff-Writer: A Diffusion Model-Based Stylized Online Handwritten Chinese Character Generator. In: Luo, B., Cheng, L., Wu, ZG., Li, H., Li, C. (eds) Neural Information Processing. ICONIP 2023. Communications in Computer and Information Science, vol 1964. Springer, Singapore. https://doi.org/10.1007/978-981-99-8141-0_7

Download citation

  • DOI: https://doi.org/10.1007/978-981-99-8141-0_7

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-99-8140-3

  • Online ISBN: 978-981-99-8141-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics