๐ฑ ๐ฟโ
/ ๐๐โ โ 94%
๐ What you need
- one shared phone with a browser and internet for about 20 minutes
- two visibly different classes of real things: healthy vs blemished cassava or maize leaves, ripe vs unripe mangoes
- daylight and a plain background such as a cloth or bare ground
โ Do this
- Open a free in-browser training tool (Google's Teachable Machine runs in a phone browser and needs no account).
- 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.
- Create Class B the same way. Deliberately include some awkward examples โ half-shade, slightly blurred, held differently.
- Train. Then test on items the model has never seen and record the confidence numbers for ten of them in a table.
- 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.
- 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.