Grzego / handwriting-generation

Implementation of handwriting generation with use of recurrent neural networks in tensorflow. Based on Alex Graves paper (https://arxiv.org/abs/1308.0850).
MIT License
520 stars 107 forks source link

Online handwriting #12

Open JFSomerset opened 5 years ago

JFSomerset commented 5 years ago

Would it be possible to output the text along a straight(er) line with this configuration?

Grzego commented 5 years ago

The reason why generated handwriting is not on straight line is the dataset. Most examples are skewed because that's how most people write on whiteboard.

So the easiest approach (I guess) would require "fixing" the dataset.

One thing that could work is doing linear regression over lines (or parts of them) and then shift every point accordingly. You could experiment with this (or other ideas) by using some additional preprocessing here in code (line[:, :2] will give an array of all (x, y) points, on which you can for example run linear regression).