Portfolio Project

Handwriting Legibility Scoring

PyTorch CNN Fine-Tuning

Machine Learning Python PyTorch AWS Docker CNN

Context

My wife says my handwriting is hard to read. I wanted an objective score.

Approach

  • Built three digit-recognition models (simple baseline → CNN).
  • Trained on MNIST (60,000 digits) and selected the best model.
  • Deployed it behind a serverless scoring API for the live demo.

Impact

  • The best model reached 99.1% accuracy on MNIST.
  • My digits scored 72.5% legible; 0, 3, 5, and 8 were the toughest.
  • My wife was right.

Experiment Setup

I used MNIST as a baseline, then scored my own handwriting with the same setup.

  • Dataset: MNIST (60,000 train / 10,000 test) for digit recognition.
  • Goal: compare model types and quantify my own legibility with a consistent metric.
  • Output: per-digit accuracy and a confusion matrix to see which digits I write most ambiguously.

Model Iteration

  • Model 1: simple linear classifier as a baseline.
  • Model 2: small CNN (TinyVGG-style) to capture strokes and curves.
  • Model 3: deeper CNN (VGG16-style) with the best test accuracy (99.1%).

Custom Handwriting Evaluation

  • Built a loader so new images can be preprocessed and scored consistently.
  • Computed overall legibility (72.5%) and found my hardest digits (0, 3, 5, and 8).
  • Used the breakdown to make it actionable (which digits to practice).

What I'd Improve

  • Train on EMNIST or other real handwriting datasets to reduce domain shift from MNIST.
  • Add augmentation (stroke thickness, rotation, blur) to better match camera/scanner variation.
  • Calibrate confidence so the model can say 'uncertain' instead of forcing a guess.

Links