Implementation of the handwriting generation experiments in the paper Generating Sequences with Recurrent Neural Networks by Alex Graves. The implementation closely follows the original paper, with a few slight deviations, and the generated samples are of similar quality to those presented in the paper.
Download the checkpoint content from this link Put the contents of the above downloaded folder into checkpoints folder. The software requirements are listed in the requirements.txt file.
Create a 'logs' folder before running, files are saved as usage_demo in img folder. Further instructions to run are in run.py
python run.py
A pretrained model is included, for training your own model:
In order to train a model, data must be downloaded and placed in this directory.
Follow the download instructions here http://www.fki.inf.unibe.ch/databases/iam-on-line-handwriting-database.
Only a subset of the downloaded data is required. Move the relevant download data so the directory structure is as folllows:
data/
├── raw/
│ ├── ascii/
│ ├── lineStrokes/
│ ├── original/
| blacklist.npy
Once this is completed, run prepare_data.py
extract the data and dump it to numpy files.
To train the model, run rnn.py
. This takes a couple days on a single Tesla K80.
Paras Rawat | Siddharth Sudhakar |
Made with ❤️ by DS Community SRM