Class 7 · Unit 2: Domains of AI · Lesson 2.2 · 40 min
Computer vision — how a machine "sees"
The phone looks at Grandmother's kangri and says: pot. It has no eyes and no brain. So how does it see anything at all?
Today you will: Draw a picture using only 0s and 1s · Teach a camera kangri vs pot · Test it on photos it has never seen
Story
Hiba's grandmother keeps her kangri under her pheran all winter. Bilal holds up his phone camera to it.
Bilal: “The phone says it is a pot. It has never seen a kangri!” (he laughs.)
Hiba: “But how does a phone see anything at all? It has no eyes. It has no brain.”
What does a camera actually give a computer, and how does the computer find a kangri in it?
Watch
Pictures are numbers — — scan code 7.2.2 in the printed book.
Warm up your fingers
Skill: number row, 6 to 0 (7 min)
- On typing.com, open the lesson on the top-row numbers 6–0.
- Right hand reaches up. Say the number quietly as you press it.
- Then type this line three times:
0 255 128 64 32 0. These are pixel values you will use today.
On the laptop
You need: LibreOffice Calc · pixel-grid.ods · Teachable Machine in the browser (no account) · cv-photos/kangri, cv-photos/pot, cv-photos/test
Mission 1: Draw with numbers (pairs, 8 min)
- ☐1
Open
pixel-grid.ods— a 10 × 10 grid that colours itself: 0 = black, 1 = white. - ☐2
Type 0s and 1s to draw something — a chinar leaf, a house, the first letter of your name.
- ☐3
Look at the picture, then at the numbers. They're the same thing. That's what a camera gives a computer.
Mission 2: Teach a camera (pairs, 10 min)
- ☐4
Teachable Machine → Image Project → Standard image model. Don't sign in. Name the classes
kangriandpot. - ☐5
Upload the photos from
cv-photos/kangriandcv-photos/pot, then Train Model. - ☐6
Predict: how many of the
testphotos will it get right? Write your guess down. - ☐7
Test it with
cv-photos/test— photos it has never seen. Note which it got right and wrong.
No laptop today?
On squared paper, your partner reads out a 10 × 10 grid of 0s and 1s from the sheet your teacher gives you while you shade every 0. Can you guess the picture before it's finished? Then discuss: with only 3 kangri pictures, could you recognise every kangri?
Now you know
- Computer vision helps machines understand images and video.
- A picture is a grid of pixels. Every pixel is stored as numbers.
- Patterns in the numbers edges, shapes, colours — are what the model finds.
- It learns from many labelled examples. Too few, or too alike, and it makes mistakes.
- Used in face unlock, crop-disease spotting, number plates, medical scans.
Debate it
A CV system that spots faces was trained mostly on photos taken in bright sunshine. Now it is used indoors in a dim classroom in winter.
Who might it fail for, and what data would fix it?
Check yourself — practice, not a test
1. What is a pixel?
- ○ A type of camera
- ○ One tiny square of a digital image, stored as numbers
- ○ A computer program
- ○ A colour of paint
2. A computer "sees" a photo as a grid of numbers.
- ○ True
- ○ False
3. Which of these use Computer Vision? (choose all)
- ○ Face unlock on a phone
- ○ A calculator
- ○ Spotting scab on apple leaves from a photo
- ○ Reading a vehicle's number plate
4. A model trained with too few ______ may not recognise a kangri.
Remember
To a computer, a picture is just numbers. Computer vision finds the patterns in them.