Index Ai Academy
Foundation · Foundation mathPutting it together

Capstone: a sign reader from the formulas

About 45 minLooking ahead: some prerequisites aren't done yet

Why this matters

This is the Foundation's final project, and it uses nearly every module. Vectors and matrices hold the signs and the weights (Module 4); the forward pass is matrix products, relu and softmax (Modules 4, 5 and 7); the loss is cross-entropy (Module 7); the backward pass is the chain rule along many paths (Module 5); the update is gradient descent (Module 5); and the honest verdict, an accuracy with an error bar, is Module 7's statistics. Nothing here is new. What's new is doing all of it at once, from an empty file, then explaining the result as an engineer would: what was built, how well it works, how sure that number is, and where it goes wrong. The guided steps below build one version together, then rebuild it in PyTorch; the brief at the end asks you to build your own and write it up.

  • Build a trail-sign classifier with NumPy alone: data, a two-layer network, softmax and cross-entropy
  • Train it with a backward pass you have checked numerically, and plot its loss curve
  • Test it once on held-back signs and report the accuracy with a 95% error bar
  • Study its wrong predictions in a confusion table, and write a one-page report naming every formula and shape you used
  • Rebuild the same reader in PyTorch, check it reaches the same verdict, and train it on mini-batches
Quick check
Have a guess before you start. A classifier gets 27 of 30 held-back signs right. Besides the accuracy, 0.9, what should a report give?

The project

Purpose. Build, train and test a sign reader, then report it honestly.

A trail-sign camera describes each sign by three numbers between about 0 and 1: how pointed its shape is, how wide and how tall. Arrows are pointed, tent-site signs are wide, and trail markers are tall, but real signs are worn, tilted and half-hidden, so the numbers are noisy and the kinds overlap. The task: tell the three kinds apart.