HNHacker News
TopNewBestAskShowJobs

sjv

183 karma · joined June 10, 2019

submissionscomments
sjv··on Show HN: Generate realistic handwriting with neural networks [demo]
I implemented the network from scratch in vanilla javascript. The file is just a custom binary file containing the names, shapes, and weights of the network parameters. If you have more specific questions, feel free to ask them.
sjv··on Show HN: Generate realistic handwriting with neural networks [demo]
The dataset is from the IAM On-Line Handwriting Database. I've linked my github, which has my email, on my profile.
sjv··on Show HN: Generate realistic handwriting with neural networks [demo]
Outputs are sampled from a probability distribution, and increasing the legibility effectively concentrates probability density around more likely outcomes. So you're correct that it's just altering variation. The general technique is referred to as 'adjusting the temperature of the sampling distribution'.
sjv··on Show HN: Generate realistic handwriting with neural networks [demo]
Hey HN — This is a simple web app that allows you to enter text and watch as an in-browser neural network generates the corresponding handwriting in real time. I’m happy to hear feedback or answer questions about how it works!
sjv··on Show HN: A realistic handwriting generator, directly in the browser [demo]
The value is almost entirely as a technical demo of current machine learning techniques. Handwritten fonts will always be a more reliable way to create synthetic handwriting, so I don't see this as something that will be used as anything other than a toy.
sjv··on Show HN: A realistic handwriting generator, directly in the browser [demo]
Hey HN — This is a simple web app that allows you to enter text and watch as an in-browser neural network generates the corresponding handwriting in real time. I’m happy to hear feedback or answer questions about how it works!
sjv··on Show HN: Handwritten.js – Convert typed text to realistic handwriting
Yes, it's mostly based on that. Primary difference is that this model adds an inference model (VAE style), which allows you to a) sample style vectors from a latent distribution b) do so more efficiently than the priming mechanism described in that paper.
sjv··on Show HN: Handwritten.js – Convert typed text to realistic handwriting
It's not intentionally slowed down. The sampling process is computationally heavy and you'll notice improved performance when running it on better hardware. There are many algorithmic ways to speed up neural network computation and I'm fairly sure I could speed things up by an order of magnitude or two if I invested some time into it.
sjv··on Show HN: Handwritten.js – Convert typed text to realistic handwriting
The model was trained on a relatively small dataset which has few occurrences of the letter x, almost none of which are in cursive. As you've found, asking the model to write out an x in a cursive style can totally derail the generation process.
sjv··on Show HN: Handwritten.js – Convert typed text to realistic handwriting
Non-statistical methods of imitating handwriting are always fairly easy to identify as synthetic due to the uniformity of strokes and unnatural kerning (among other things). Even methods which incorporate random variations don't hide these artifacts sufficiently well. In my opinion, the only way to generate synthetic handwriting which is convincingly real is to use statistical methods (i.e. machine learning) to model all variation which is present in real handwriting. I've implemented a neural network in javascript which does exactly this - https://seanvasquez.com/handwriting-generation/. You can play around with it and find a few weaknesses, but in general I find that it can produce handwriting which is indistinguishable from real handwriting.
sjv··on An attempt to make a font look more handwritten
This problem was more or less solved with neural networks in 2013, see https://arxiv.org/abs/1308.0850. I've implemented a similar model in javascript that you can interact with: https://seanvasquez.com/handwriting-generation/
sjv··on An attempt to make a font look more handwritten
Perhaps something like this? https://seanvasquez.com/handwriting-generation