GithubHelp home page GithubHelp logo

ieee820 / hccg-cyclegan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from changebo/hccg-cyclegan

0.0 3.0 0.0 22.63 MB

Handwritten Chinese Characters Generation

Lua 94.51% Shell 1.86% Python 3.63%

hccg-cyclegan's Introduction

HCCG-CycleGAN

Generating Handwritten Chinese Characters using CycleGAN
Bo Chang*, Qiong Zhang*, Shenyi Pan, Lili Meng
WACV 2018.

Abstract

Handwriting of Chinese has long been an important skill in East Asia. However, automatic generation of handwritten Chinese characters poses a great challenge due to the large number of characters. Various machine learning techniques have been used to recognize Chinese characters, but few works have studied the handwritten Chinese character generation problem, especially with unpaired training data. In this work, we formulate the Chinese handwritten character generation as a problem that learns a mapping from an existing printed font to a personalized handwritten style. We further propose DenseNet CycleGAN to generate Chinese handwritten characters. Our method is applied not only to commonly used Chinese characters but also to calligraphy work with aesthetic values. Furthermore, we propose content accuracy and style discrepancy as the evaluation metrics to assess the quality of the handwritten characters generated. We then use our proposed metrics to evaluate the generated characters from CASIA dataset as well as our newly introduced Lanting calligraphy dataset.

Requirement

Python 2.7

Preprocess handwritting database

The gnt files in CASIA HWDB1.1 database can be downloaded here.

python preprocess/preprocess_hw.py fonts/1252-c.gnt fonts/simhei.ttf 0.1 0.1 

Both the gnt file for the handwritten data and the ttf/otf file for the source font need to be under the fonts folder. The last two number represents for the split ratio of the training and test data.

DenseCycleGAN

Usage

  • Training
cd DenseCycleGAN
DATA_ROOT=./datasets/1252-c-0.1-0.1 name=1252-c-dense5 which_model_netG=densenet_5blocks th train.lua
  • Testing
DATA_ROOT=./datasets/1252-c-0.1-0.1 name=1252-c-dense5 phase=test th test.lua

Supported which_model_netG in training

  • resnet_6blocks
  • resnet_9blocks
  • densenet_5blocks
  • densenet_6blocks
  • densenet_7blocks
  • densenet_8blocks

hccg-cyclegan's People

Contributors

changebo avatar

Watchers

James Cloos avatar james_jjyang avatar paper2code - bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.