J. Park, A. U. Hassan and J. Choi, "Few-Shot Korean Font Generation based on Hangul Composability," KIPS Transactions on Software and Data Engineering, vol. 10, no. 11, pp. 473-482, 2021. DOI: https://doi.org/10.3745/KTSDE.2021.10.11.473.
KIPS KIPS Transactions on Software and Data Engineering, Vol. 10, No. 11, pp. 473-482, Nov. 2021 PDF
Although several Hangul generation models using deep learning have been introduced, they require a lot of data, have a complex structure, requires considerable time and resources, and often fail in style conversion. This paper proposes a model CKFont using the components of the initial, middle, and final components of Hangul as a way to compensate for these problems. The CKFont model is an end-to-end Hangul generation model based on GAN, and it can generate all Hangul in various styles with 28 characters and components of first, middle, and final components of Hangul characters. By acquiring local style information from components, the information is more accurate than global information acquisition, and the result of style conversion improves as it can reduce information loss. This is a model that uses the minimum number of characters among known models, and it is an efficient model that reduces style conversion failures, has a concise structure, and saves time and resources. The concept using components can be used for various image transformations and compositing as well as transformations of other languages.
>> conda create --name tutorial-TF python=3.6.8
>> conda activate tutorial-TF or activate tutorial-TF
>> conda install -c anaconda tensorflow-gpu=1.13.1
- Generate Source font and split chars images
>> python ./tools/src-font-image-generator.py
>> python ./tools/src-split-font-image-generator.py
- Generate Target font and split chars images
>> python ./tools/tgt-font-image-generator.py
>> python ./tools/tgt-split-font-image-generator.py
- Combine source, target, and target split imgs
>> python ./tools/combine_images.py --input_dir src-image-data/images --b_dir tgt-image-data/images --c_dir tgt-split-image-data/images --operation combine
- Convert images to TFRecords
>> python ./tools/images-to-tfrecords.py
>> python main.py --mode train --output_dir trained_model --max_epochs 25
>> python main.py --mode train --output_dir finetuned_model --max_epochs 500 --checkpoint trained_model/
1.Convert images to TFRecords
>> python ./tools/test-images-to-tfrecords.py
>> python main.py --mode test --output_dir testing_results --checkpoint finetuned_model
This code is inspired by the pix2pix tensorflow project. Special thanks to the following works for sharing their code and dataset.
- tensorflow-hangul-recognition
- pix2pix
J. Park, A. U. Hassan and J. Choi, "Few-Shot Korean Font Generation based on Hangul Composability," KIPS Transactions on Software and Data Engineering, vol. 10, no. 11, pp. 473-482, 2021. DOI: https://doi.org/10.3745/KTSDE.2021.10.11.473.
The code and other helping modules are only allowed for PERSONAL and ACADEMIC usage.