This application tries to classify the handwritten image into the ten digits on the fly as the image is being drawn, using either a mouse or a finger. As you move your mouse or finger to draw on the screen, it shows the classification results in real-time, so that you can see the most likely classification, the second likely, the third, etc.
Internally, it uses a neural-network model with one hidden layer of 512 neurons, and calculates the model output (as known as inference) as soon as it receives a mouse-move or touch-move event. Therefore, to make it possible to run smoothly on even low-end handheld devices, we fully leverage CPU's processing power using multi-threaded WASM and Single Instruction Multiple Data (SIMD) technologies.