rAs Kids All courses
AI: Build & Break It ยท Module 4 of 8
๐Ÿ“ฑ Shared phone

Train a Real Classifier

With a shared phone and forty photos you can train a working image classifier in ten minutes.

๐Ÿ“ฑ ๐ŸŒฟโœ… / ๐Ÿƒ๐Ÿ›โŒ โ†’ 94%
A phone screen with two labelled photo sets โ€” healthy leaves and marked leaves โ€” and a confidence bar.

๐ŸŽ’ What you need

โœ‹ Do this

  1. Open a free in-browser training tool (Google's Teachable Machine runs in a phone browser and needs no account).
  2. Create Class A and capture around 40 images, rotating and re-angling the object as you go. Variety inside a class is what makes it robust.
  3. Create Class B the same way. Deliberately include some awkward examples โ€” half-shade, slightly blurred, held differently.
  4. Train. Then test on items the model has never seen and record the confidence numbers for ten of them in a table.
  5. Note something important: the two confidence numbers always add to 100%. The model cannot say 'I don't know' โ€” it can only divide certainty between the boxes you gave it.
  6. Add a third class called 'nothing' โ€” bare ground, hands, random objects โ€” and retrain. Test again. Did the false alarms drop?

๐Ÿ’ก Why it works

That third class is a genuine professional technique. A two-class model forced to choose will confidently mislabel anything unfamiliar, which is how a leaf-disease app ends up diagnosing a shoe. Giving it a background or 'none of these' class gives it somewhere honest to put the unknown. Real deployed systems also set a confidence threshold below which they refuse to answer at all.

๐Ÿ”ฅ Challenge

Build the same classifier twice: once with 20 images per class, once with 60. Test both on the identical ten items and report the difference in a table. Does more data always win?

๐Ÿ“– New words

classone of the categories a classifier can output
confidencethe model's score for each class, which is not the same as being right
thresholdthe confidence level below which you refuse to trust the answer
๐Ÿงช
Model Trainer

Tap when you have finished this module.