A no-code image classifier
Your sorter is 100% right on the table. Move it to the floor and it falls apart. What did it really learn?
- Train a three-class smart sorter
- Test it honestly on new photos
- Catch a model learning the wrong thing
A no-code image classifier
Your sorter is 100% right on the table. Move it to the floor and it falls apart. What did it really learn?
- Train a three-class smart sorter
- Test it honestly on new photos
- Catch a model learning the wrong thing
Story
Learn it
A no-code tool can train an image classifier in minutes, from labelled photos. But a model learns whatever separates the classes in its photos: if every plastic bottle sits on a white table and every paper scrap on a brown notebook, the easiest pattern is the background, and it learns that instead. This is learning a shortcut. Testing on new photos, in new places, is how you catch it.
Words to know
CBSE names Teachable Machine, Lobe and Orange (with its image add-on).
one category the model sorts into, like plastic, paper or food.
a pattern that separates the classes in the training photos but has nothing to do with the object: a background, the lighting, a ruler in the photo.
for three classes: actual classes down the side, predicted across the top, nine boxes in all.
the same objects on different backgrounds, in different light, at different angles, so the object is the only thing a class has in common.
Step by step: catching a shortcut in a leaf sorter
A sorter for healthy / scab leaves scores 100% on its training photos.
- Look at the training photos first: every healthy leaf was photographed in sunlight; every scab leaf indoors, under a tube light.
- Guess the shortcut: the model may have learned bright = healthy, yellowish = scab.
- Test on new photos: healthy leaves photographed indoors. The model calls them scab.
- Build the confusion matrix: most mistakes are healthy-called-scab, all from indoor photos. The pattern of mistakes points straight at the shortcut.
- Fix it: add healthy leaves photographed indoors and scab leaves in sunlight, retrain, and test the same photos again.
Careful: more photos do not always fix a shortcut. More of the same white-table photos makes it stronger. Vary the background, the light and the place on purpose, so the only thing the photos share is the object.
Your missions
datasets/sorter/Train it
10 minin groups of 3–4- 1
Teachable Machine → Image Project → Standard. Make three classes:
plastic,paper,food. - 2
Upload the photos from
datasets/sorter/train/— about 15 per class. Look at them first: where was each class photographed? - 3
Press Train. Test it with one training photo from each class. It should be very sure.
Test it honestly
12 min- 4
Predict: on photos taken somewhere else, how many out of 9 will it get right? Write it down.
Only you can see this - 5
Test each photo in
datasets/sorter/test/— 9 photos, 3 per class, on a different background. Record actual and predicted for each in Calc. - 6
Build the 3 × 3 confusion matrix: actual down the side, predicted across the top. Count how many are right.
Fix it
6 min- 7
Add the photos in
datasets/sorter/mixed/to training — the same objects on floors, counters and hands. Retrain, and test the same 9 photos again. What changed?
Hold up something that is none of the three — your pencil box. What does the model say, and how sure is it? What should a sorter do with things it doesn't know?
No laptop today?
Your teacher shows the training photos and the test photos side by side on one screen. Pairs predict what the model will say for each test photo and why. Then look at the shortcut figure in Learn and find what every photo in each class has in common.
Debate it
Real companies have found their vision models learning shortcuts: skin-disease models that had learned what a ruler in the photo meant, because doctors photographed worrying moles with a ruler beside them.
- Why is a shortcut so hard to spot from the model's accuracy alone?
- What would you check before trusting a vision model trained somewhere far from Kashmir?
Check yourself · practice, not a test
In the app, students answer these one at a time and each answer is checked straight away. It's practice, never a mark — anything they miss comes back later for another go.
1.A sorter is perfect on its training photos and poor on new ones. The most likely reason is:
- AThe camera was too good
- BIt learned something other than the object, like the background
- CIt had too many classes
- DTeachable Machine is broken
2.Adding training photos with different backgrounds can help a model learn the object instead of the table.
TrueFalse3.A confusion matrix for three classes is a ______ × 3 table.
4.Which are no-code tools CBSE lists for computer vision? (choose all that apply)
- ATeachable Machine
- BLobe
- COrange Data Mining
- DThonny
5.Put the steps in order:
- 1Make a class for each category
- 2Train the model
- 3Add labelled photos to each class
- 4Test it on photos it has never seen
A model learns what the pictures have in common — make sure it's the right thing.
Typing practice
Skill: short labels, fast and exact (5 min)
-
On typing.com: the lesson your teacher sets.
-
Type three times, eyes on the screen:
classes = ["plastic", "paper", "food"] # three classes -
Goal this term: 38–44 WPM at 95%.
Written and designed by Faizan Ayoub. © 2026 Faizan Ayoub. All rights reserved.