Skip to content

Deep learningBanking and logistics

Handwriting Reader

Write a digit or a PIN code and a neural network reads it. Or train one yourself.

  • CNN
  • TensorFlow.js
  • MNIST
  • Data augmentation

Write a digit

Waiting
Or pick a sample digit

Real handwriting from the MNIST test set, which the pretrained network never trained on.

What the network reads

Pretrained

Waiting for a digit

Write in the pad, or pick a sample. It reads as you write.

What it sees: 28 × 28
Probability of each digit
  • 0–
  • 1–
  • 2–
  • 3–
  • 4–
  • 5–
  • 6–
  • 7–
  • 8–
  • 9–

Couriers still sort parcels by PIN codes written by hand. Write one digit in each box, as on a delivery slip: the network reads all six and points to the digit a person should check before the parcel goes to the wrong city.

  1. empty

  2. empty

  3. empty

  4. empty

  5. empty

  6. empty

PIN code read

––– –––

Write in the boxes, or write the sample PIN.

The pretrained network learnt from MNIST's 60,000 training digits. Everything runs in this browser tab; nothing you write leaves it.

Things to try

  1. Draw a 7 with a bar through it, then without.
  2. Write a PIN code and see which digit it asks you to check.
  3. Train your own network, then read the same digit with both.

Where I'd use it

  • PIN codes on parcels
  • Cheque amounts
  • Meter readings

Want this on your own data? Tell me about your project.