naba89 / RNN-Handwriting-Generation-Pytorch

sequence generation using RNN using pytorch
Apache License 2.0
10 stars 1 forks source link
handwriting-generation lstm pytorch pytorch-implmention rnn sequence-generation

Implementation of RNN Handwriting Generation in Pytorch

This repository contains my attempt at implementing Alex Graves wonderful paper on sequence generation in Pytorch.

Most of the data pre-processing and sampling code is from hardmaru's implementation. Since these parts are independent of the framework, can be used directly.

Tried to keep the model and loss function implementation simple to follow. Hope it helps anybody looking for a simple implementation.

Dependencies

conda install -c omnia svgwrite\ sudo apt-get install libmagickwand-dev\ pip install Wand\ pip install tensorboardX\ pytorch >= 0.3

Data

Before running train.py and sample.py you need to follow the instruction and download the necessary files.

You can find a model trained with the default parameters for 30 epochs in the save directory. Below is the training curve for the trained model.

example

Some generated samples from the trained network:

example example example example

Well it does look like handwriting!

Coming soon: Text-to-Handwriting