Skip to content
forked from kyxscut/CG-GAN

CG-GAN for Vietnamese Handwriting Words and Nom Characters

Notifications You must be signed in to change notification settings

phonhay103/CG-GAN

 
 

Repository files navigation

CG-GAN(CVPR2022)

This is the official PyTorch implementation of the CVPR 2022 paper: "Look Closer to Supervise Better: One-Shot Font Generation via Component-Based Discriminator".

Requirements

(Welcome to develop CG-GAN together.)

We recommend you to use Anaconda to manage your libraries.

Data Preparation

Please convert your own dataset to LMDB format by using the tool lmdb_maker.py

Both the char(text) label, the radical list and the corresponding writer ID are required for every text image.

Please prepare the TTF font and corpus for the rendering of printed style images.

For handwritten word synthesis task, please download the datasets prepared by us.

data
-- datasets
   -- train_img_104K
      -- data.mdb
      -- lock.mdb

Training

Handwritten word synthesis

Modify the dataRoot , ttfRoot and corpusRoot in scripts/train_handwritten.shas your settings.

  --dataroot data/<train_folder> \
  --ttfRoot data/fonts/<font_folder> \
  --corpusRoot data/texts/<seen_char>.txt \

Train your model, run

 sh scripts/train_handwritten.sh

Testing

Handwritten word synthesis

test your model, run

 sh scripts/test_handwritten.sh

Citation

If our paper helps your research, please cite it in your publication(s):

@article{cluo2019moran,
  author    = {Yuxin Kong, Canjie Luo, Weihong Ma, Qiyuan Zhu, Shenggao Zhu, Nicholas Yuan, Lianwen Jin},
  title     = {Look Closer to Supervise Better: One-Shot Font Generation via Component-Based Discriminator},
  year      = {2022},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  publisher = {IEEE}
}

About

CG-GAN for Vietnamese Handwriting Words and Nom Characters

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 99.3%
  • Shell 0.7%