Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.34 KB

README.markdown

File metadata and controls

41 lines (32 loc) · 1.34 KB

Handwriting synthesis

This is an implementation of sec.4 and 5 of "Generating Sequences With Recurrent Neural Networks" paper by Alex Graves

Generated samples

Unconditional samples

Setting: bias=0.2, seed=range(5)

Conditional samples

Setting: bias=2, seed=range(5)

Strength means blessed with an enemy : words are wind! : Bridged by a lightwave : kimi no na ma : Bonjour! On y va? :

Usage

  • Place data (sentences.txt and strokes-py3.npy) in data/ directory.
  • Use train.py script to train the model.
  • Runs are saved in runs/ directory.
  • To generate above samples, use models/dummy.py
    from models.dummy import generate_unconditionally, generate_conditionally
    for i in range(5):
        x = generate_unconditionally(i)
        plot_stroke(x,save_name=f'asset/un_{i+1}')
    
    texts = ['Strength means blessed with an enemy!', 'words are wind!', 'Bridged by a lightwave ', 'kimi no na ma', 'Bonjour! On y va?']
    
    for i in range(5):
        x = generate_conditionally(random_seed=i, text=texts[i])
        plot_stroke(x, save_name=f'asset/co_{i}')