RNN vs. CNN
RNNs read strokes as a sequence, CNNs read a sketch as an image — two ways to recognise the same drawing.
Making-of
DrawLa is a fast drawing game — but behind it sits a complete recognition pipeline: a neural network we trained ourselves, a server that returns a prediction eight times per second, and a series of decisions that all served one goal. The recognition has to feel immediate.
What happens when someone draws a line? The path is short, and every stop along it has one job:
The whole round trip stays comfortably below the threshold at which people perceive delay. That is why the recognition seems to think along with you rather than trail behind you.
Recognition on the server, not on the device. At eight megabytes the model would be small enough to run locally. Fairness argued against it: every player has to see the same verdict, otherwise hardware decides the score. The second reason is maintainability — a new model is rolled out once and takes effect for everyone immediately, with no app update. The case for the opposite approach is covered in Mobile & Edge AI.
A CNN rather than a sequence model. People draw the same cat in completely different orders. An image model is blind to that order — and here that is an advantage, not a loss. The trade-off in detail is in RNN versus CNN.
Smoothed predictions. The first version showed raw output — and flickered between competing words with every stroke. It looked like wild guessing. Exponential smoothing across consecutive predictions fixed it completely without changing accuracy at all. A pure presentation detail that improved how the game feels more than any model improvement since.
| Architecture | ResNet-style CNN, four stages of two residual blocks each |
| Input | 96 × 96 pixels, single greyscale channel |
| Parameters | 2,004,345 (8.0 MB in fp32) |
| Classes | 345 |
| Training | 40 epochs, AdamW, cosine schedule, label smoothing 0.1 |
| Validation accuracy | 76.3 % top-1 |
| Runtime | ONNX Runtime, CPU, two threads |
Seventy-six per cent sounds unremarkable at first. With 345 classes, however, blind guessing lands at 0.29 per cent — the model is roughly 260 times better than chance. And in play the top-5 list is what counts, where the hit rate is considerably higher. A good share of the remaining error cannot be fixed at all: a hurried snail and a hurried seashell are sometimes the same picture.
Recognition is only half of it. The server holds the entire game state — rounds, scores, timers, votes — and is the only party allowed to change it. Clients propose actions but decide nothing. That split costs a little latency and saves an entire category of problems that arises when two devices disagree about who won.
Rooms live purely in memory. There is no database and there are no accounts: drawings exist while the game runs and are gone afterwards. That started as a shortcut and turned out to be the better answer — it keeps the privacy policy short and honest.
When players are missing, bots fill in. They replay recorded sketches from the Quick, Draw! dataset stroke by stroke rather than pasting a finished image. That way they pass through the same recognition humans do — including the possibility of not being recognised at all.
RNNs read strokes as a sequence, CNNs read a sketch as an image — two ways to recognise the same drawing.
Google's dataset of 50 million sketches — formats, metadata and the biases worth knowing about.
The full pipeline: rasterisation, augmentation, architecture, hyperparameters and ONNX export.
Google's archived component repo: web component, data API and self-hosting notes for real doodles.
Why small CNNs suit local inference on NPU, GPU or CPU — and when the effort pays off.
One model, several hardware paths: Core ML on iOS, ONNX and LiteRT on Android.
The key work on Sketch-RNN, the Quick, Draw! dataset and ResNet-style CNNs.