Live data from Hacker News

RNN-Based Handwriting Recognition in Gboard

ai.googleblog.com

11–20 of 23 posts

Re: RNN-Based Handwriting Recognition in Gboard

#11

The "Making it Work, On-device" paragraph makes it seem like TensorFlow Lite will easily get your model running fast on-device, but in reality RNNs aren't currently supported by the TFLite Converter and the TFLiteLSTMCell example is super slow for training, so this is actually based on proprietary code not available to mere mortals using open source TensorFlow. If you were to actually try reproducing this work, you'd…

That is an important point, Google is the master of releasing things in half, this was a common practice in Tensorflow since the initial release, they basically removed a lot of things to release it and it became a Frankenstein base of code. Bazel is another example, inside Google it works amazingly, but the open source project is a pain in the ass.

Re: RNN-Based Handwriting Recognition in Gboard

#12
post #8

I used it on windows phone 5 years back for chinese- wonder if this is new to android? (on iPhone right now)

Handwriting recognition has been available on Android for a while (especially for Chinese). This article is "only" about incremental improvements.

Re: RNN-Based Handwriting Recognition in Gboard

#14

Really cool stuff! My phone isn't big enough to do handwriting on, so I'm not really sure where this is supposed to be used? On a tablet I guess?

I just tried tout for refirsttime, and although the keyboardspace on my phone is barely large enough to cran five characters in there, the input scrolls sideraysautomatically if you litt your finger long enoy gh. So longer words can be entered as well. It doesn't seem to reevaluate previously decoded segments baselon what follows, though, so you can end up with weird misspellings at the beyinning of words. I dont think! Im going to use it from now on, beaurthere cognition is balenow ghto requiresigniti cant editing and the frictonisatittooncomfortable vihout a stylus.

Edited with the QWERTY keyboard:

I just tried it out for the first time, and although the keyboard space on my phone is barely large enough to cram five characters in there, the input scrolls sideways automatically if you lift your finger long enough. So longer words can be entered as well. It doesn't seem to reevaluate previously decoded segments based on what follows, though, so you can end up with weird misspellings at the beginning of words. I don't think I'm going to use it from now on, because the recognition is bad enough to require significant editing and the friction is a bit too uncomfortable without a stylus.

Re: RNN-Based Handwriting Recognition in Gboard

#16
post #15

Isn't swiping inherently faster? With sweeping you need 1 angle (corner) for letter. Typical letter uses much more than 1 corner.

Only if you're writing words in the dictionary, and you're using the English alphabet.

Handwriting recognition is way more impactful for users in, say, Chinese.

Re: RNN-Based Handwriting Recognition in Gboard

#17
Wow, it is really surprising to me that bezier curve control points produced by an optimization process would be good inputs to a neural net model. Small perturbations to the inputs could produce radically different bezier control points depending on the decisions made by the curve optimizer, so this forces the neural network to learn about the characteristics of the optimizer as well as the input.

Neural nets usually thrive on raw high dimensional inputs, so dramatically reducing the dimensionality of the input seems like a strange decision. I'm sure it improves speed, but I would expect higher accuracy by processing the raw input.

Re: RNN-Based Handwriting Recognition in Gboard

#18

Wow, it is really surprising to me that bezier curve control points produced by an optimization process would be good inputs to a neural net model. Small perturbations to the inputs could produce radically different bezier control points depending on the decisions made by the curve optimizer, so this forces the neural network to learn about the characteristics of the optimizer as well as the input. Neural nets usuall…

I don't know ML, but I was surprised too, since converting a series of points into Bezier paths of a certain degree seems arbitrary...

Re: RNN-Based Handwriting Recognition in Gboard

#19

I just switched from Android to iPhone, and Gboard on iPhone doesn't have the translation function. It also doesn't have multiple languages -- if I want to switch languages I have to exit out of Gboard and use the default iOS keyboard. Anyone know why these features for Gboard are missing on iOS?

these features are not missing: check settings

Re: RNN-Based Handwriting Recognition in Gboard

#20

this is so awesome! but how is it that we have RNN solutions for handwriting when we don't even have a standard, canned RNN for OCR? I know tesseract and related projects exist, but when I've tried them they have been fairly brittle with lower accuracy than I was expecting. Accuracy was especially problematic for letter combinations like "-ing" that would consistently be recognized as "-mg". Is there a good ML OCR li…

The reason is that online OCR (this particular case) is entirely different from offline OCR.

Online OCR is when you input the strokes directly on the tablet/phone, so it becomes a sequence of XY coordinates with an associated timestamp. It takes into account where you start and where you end the stroke on the canvas, along with the intermediate points (information galore).

Offline OCR is when you take a photo of your handwriting in your notebook, so you just get the raw pixels of a image. In offline OCR, you'd also have to properly segment and binarize the image before the OCR step.

With that being said, tesseract (version 4) uses an LSTM.

Post reply on HN