Why it is hard to turn pixels into meaning, how the field moved from rules made by people to models that learn, what computer vision systems can do, and a map of the course.
By the end, students can
- Explain what computer vision is, and how it is different from image processing, computer graphics and machine learning.
- Explain why vision is hard. A photo loses information (like distance), so many different scenes can make the same photo.
- Name the main changes a vision system must handle (angle, light, size, objects in front, shape, busy background) and explain why a good method must ignore them.
- Describe the three periods in the history of the field, and why 2012 was a turning point.
- Choose the right task (classification, detection, semantic segmentation, instance segmentation) from the output an application needs.
- Load a picture in Python and explain its shape, number type and colour order.
Students should already know
- Basic programming. This lecture has almost no maths.
How to run this session
This first lecture gives students the main idea of the whole course: seeing is guessing from incomplete information. Every later lecture adds one tool for one part of this problem. If students remember only one thing, it should be this: a picture is a grid of numbers, and we must build meaning from those numbers.
The lecture has four parts and three short activities. The activities are more important than the history slides. If you are short of time, cut the history (Part 2), not the activities.
| Time | Part | Slides | What happens |
|---|---|---|---|
| 0–10 | Opening | 1–4 | "What do you see?", pixels as numbers, a simple definition |
| 10–40 | Why seeing is hard | 5–11 | Graphics in reverse, lost distance, the eight cat pictures, the brightness illusion, think–pair–share |
| 40–60 | History | 12–17 | Three periods, then and now, the 1966 story, the 2012 chart, old ideas in new methods |
| 60–85 | Uses | 18–24 | The main tasks, real examples, where vision is used, the parts of a system, mango design task |
| 85–100 | Course map and end | 25–29 | Course plan, live code, summary, exit ticket |
Before class
- Open the slides in full screen (press F) and the presenter view (press S) on your laptop. Check that both work with the room's projector.
- For the live code (slide 27): have Python with
opencv-pythonready, or open Google Colab. Download the iris photo from/figures/photos/iris.jpgon this site and save it asiris.jpg. - Bring two sheets of paper for the illusion on slide 9.
- Optional: prepare a show of hands or an online poll for the illusion and the exit ticket.
Background for the lecturer
This part goes deeper than the slides. It helps you answer students' questions.
Why vision is "graphics in reverse"
A camera turns a scene into a picture. We can write this as . The scene includes the shapes, the materials, the light, and where the camera is. Computer graphics calculates . Computer vision tries to go backwards, from the picture to the scene.
Mathematicians call a problem well-posed when it has an answer, the answer is unique (only one), and a small change in the input gives only a small change in the answer. Vision usually fails the "unique" rule:
- Distance is lost. Every point along one line from the camera lands on the same pixel. (Lecture 2 shows the formula .) If you make a scene twice as big and twice as far away, the picture does not change.
- Light and colour are mixed together. A pixel's brightness is roughly light × surface colour. A dark pixel can be a dark surface in bright light, or a bright surface in shadow. The illusion on slide 9 is your brain choosing one of these explanations.
- Hidden parts are not seen at all. The back of an object is not in the picture.
To solve a problem like this, we add extra rules or knowledge. For example: surfaces are mostly smooth; light usually comes from above; cars have a normal size; the same object appears in two cameras; or "here are a million labelled photos" (learning). A simple sentence for the class: older methods write these rules by hand; deep learning learns them from data.
Ignoring changes but still telling things apart
A good recogniser gives the same answer for very different pictures of the same object. We say it is invariant to those changes. But it must give different answers for similar-looking objects of different types. These two goals fight each other:
- A method that ignores everything gives the same answer for every picture. That is useless.
- Raw pixels notice every small change, including the changes we want to ignore.
Most of this course is about finding a good balance:
- edges are not affected by overall brightness (lecture 4);
- pyramids handle different sizes (lecture 5);
- feature descriptors like SIFT handle rotation and some angle changes (lecture 8);
- neural networks learn which changes to ignore, from data (lectures 6 and 7).
The history, with a few more details
You do not need to teach these dates. They are here in case students ask.
- 1963, blocks world. A PhD student at MIT found 3D blocks in photos by finding edges and reasoning about how lines meet. It only worked in very tidy scenes.
- 1966, the Summer Vision Project. A short MIT memo planned to use summer students to build a large part of a seeing system. People often retell it (sometimes with exaggeration) as "solve vision in one summer". The fair lesson: we cannot see how hard our own brain is working.
- 1982, Marr's book Vision. Marr said we should study a seeing system at three levels: what problem it solves and why; how, the method and the way information is stored; and with what, the hardware (brain cells or computer chips). This is still a good habit: ask "what problem does this solve?" before "how is it coded?".
- 1980s–1990s, geometry and filters. Edge detection (Canny, 1986), motion, camera calibration, and 3D from two or more cameras. Face recognition with eigenfaces (1991) treated a face photo as one long list of numbers.
- 1999–2005, local features and learning. SIFT (1999) found small points that can be matched between photos even after zooming or rotating. The Viola–Jones face detector (2001) was fast enough for normal cameras. The usual recipe was features designed by people + a learned classifier.
- 2009–2012, data. ImageNet collected millions of labelled photos. Its yearly competition (2010–2017) used 1000 classes and became the field's scoreboard.
- 2012, AlexNet. A deep convolutional network trained on two GPUs won with 16.4% top-5 error. The second-best entry had 26.2%. Convolutional networks were not new (they started in the 1980s), but now there was enough data and computing power.
- 2015, ResNet. "Skip connections" made networks with more than 100 layers trainable (3.6% error).
- 2020–2023, transformers and foundation models. The Vision Transformer (ViT) used ideas from language models on small patches of a picture. CLIP learned from hundreds of millions of pictures with captions. It can recognise classes it was never directly trained on ("zero-shot"). Segment Anything cuts out almost any object from one click. Lecture 12 covers this.
Neighbouring fields
Students often ask where the borders are. This table helps:
| Field | Input → output | Example |
|---|---|---|
| Image processing | picture → picture | remove noise, sharpen, compress |
| Computer vision | picture → description | "two cars, 12 m away, moving left" |
| Computer graphics | description → picture | draw a 3D model, make a game |
| Machine learning | data → model | the training method behind most modern vision |
The borders are not sharp. For example, making a photo bigger and sharper ("super-resolution") is picture → picture, but it uses vision models. The table is a starting point, not a rule.
Notes for the code slide
cv2.imreaddoes not give an error when the file name is wrong. It returnsNone. The next line then fails with a confusing message like'NoneType' object has no attribute 'shape'. Show students this once.- OpenCV uses BGR colour order. Matplotlib and most deep-learning libraries use RGB. Use
cv2.cvtColor(img, cv2.COLOR_BGR2RGB)before showing a picture with matplotlib. - Pixels are read as
img[row, column], which isimg[y, x]. The origin is at the top left, and y goes down. In school maths, y goes up. uint8maths wraps around:np.uint8(200) + np.uint8(100)gives44. Useimg.astype(np.float32)before doing maths.
Common misconceptions
"Computers see pictures like we do, only faster."
A computer gets only a grid of numbers. It has no objects, no edges, no distance. Everything we see must be calculated. Slide 3 is made to break this belief. Go back to it whenever this idea comes up again.
"Deep learning has solved computer vision."
Tests like ImageNet are mostly solved. Vision is not. Models still fail when things change (new cameras, weather, countries). Tiny changes to a picture can fool them. They need a lot of labelled data, and it is hard to prove they are safe. Measuring and geometry are often still done with older methods.
"The older methods are out of date, so we can skip them."
Filters, pyramids and features are inside modern networks. Older methods are still the best choice when there is little data, a small computer, or a need for predictable and explainable results. Many factory and measuring tasks are like this.
"A camera with more pixels is always better."
More pixels on the same sensor size means more noise in each pixel, more data to process, and slower models. Good light, a good lens and a good camera position usually matter more than megapixels.
In-class questions with answers
Use these during the lecture, or as a short quiz at the start of lecture 2.
Why can't one photo tell you how big an object is?
Answer
A camera sends every point on one line from the camera to the same pixel. So a small object near the camera and a big object far away make the same picture. To know the size, we need extra information: a known object next to it, the distance, a second camera, movement, or knowledge of normal sizes.
Give an example where the same pixel number means different things.
Answer
A grey pixel can be a white wall in shadow, or a dark grey wall in sunlight (light × surface colour). It can also be part of a small near object or a big far object. The illusion on slide 9 shows that the same number can look different depending on what is around it.
A system must find every person in a CCTV picture, draw their exact outline, and keep them apart. Which task is this?
Answer
Instance segmentation: an outline (mask) for each pixel, with a different number for each person. Detection only gives boxes. Semantic segmentation would join people who overlap into one shape.
Name the three things behind the big jump on ImageNet in 2012.
Answer
A lot of labelled data (ImageNet), fast parallel computers (GPUs), and better ways to train deep networks (for example ReLU, dropout and data augmentation).
Exercises
Give one or two as homework. Students need only Python.
Exercise 1.1: Look at the numbers
Load any photo with OpenCV. Print its shape and number type. Print the BGR values of the centre pixel, one dark pixel and one bright pixel. Change it to grey and save it.
Hints and solution
import cv2
img = cv2.imread("photo.jpg")
assert img is not None, "wrong file name"
h, w, c = img.shape
print(img.shape, img.dtype)
print("centre:", img[h // 2, w // 2])
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imwrite("photo_gray.jpg", gray)
Check that students use img[y, x], not img[x, y]. Grey is a weighted mix (about 0.299 R + 0.587 G + 0.114 B), not a simple average, because our eyes are most sensitive to green. Lecture 2 explains why.
Exercise 1.2: Break a "recogniser"
Take one photo of an object. Make six changed versions: rotate it, make it darker, make it smaller, cover part of it, add noise, and put it on a busy background. For each one, calculate the average pixel difference from the original:
np.abs(a.astype(float) - b.astype(float)).mean().
Then calculate the same number between your original and a photo of a different object.
What do you notice? What does this tell you about comparing pictures pixel by pixel?
Discussion
Often a small change (darker, or moved a little) gives a bigger pixel difference than a completely different object. So raw pixel difference is a bad way to decide "same object". This is why we need features that ignore these changes (lectures 4, 5, 8) and learned features (lectures 6 and 7). Students must resize all pictures to the same size first.
Exercise 1.3: Design a system (half a page, written)
Choose a real problem in your city or job that computer vision could help with: parking, sorting rubbish, checking crops, queues, anything. Describe: (a) the camera and the light; (b) the task and the exact output; (c) three changes that will make it hard; (d) which mistake is worse, and why.
What a good answer has
A clear output ("number of free parking spaces in each row, every 30 seconds"). A task that fits this output (detection or segmentation, not classification, when counting). Real problems for that place (rain, night, sun glare, cars hiding other cars). And a reason why one mistake is worse, which shows where to set the decision threshold. Give more marks for clear, specific answers than for buzzwords.
Further reading
All free online:
- R. Szeliski, Computer Vision: Algorithms and Applications, 2nd ed., chapter 1 (introduction and history). Free PDF from the author's website: szeliski.org/Book.
- A. Torralba, P. Isola, W. T. Freeman, Foundations of Computer Vision, the first chapters. Free to read at visionbook.mit.edu.
- D. Marr, Vision (1982), chapter 1, for the "three levels" idea (in libraries).
- O. Russakovsky et al. (2015), "ImageNet Large Scale Visual Recognition Challenge", IJCV. Free on arXiv.
Slide-by-slide script
What to say on each slide. The same notes appear in presenter view: open the slides and press S.
- 1
What is computer vision?
Welcome the class. Say who you are in one or two sentences.
Say what the course is about in one sentence: we teach computers to get useful information from pictures and videos.
Tell students what today is like: there is almost no maths today. Today is about one question: why is seeing so hard for a computer? Every later lecture gives one tool to solve one part of that problem.
- 2
What do you see?
Activity (1 minute). Show the photo. Ask the class to call out everything they see.
Typical answers: flowers, purple, irises, petals, leaves, a garden, sunlight, the background is blurry.
Then point out two things:
- It was fast and easy. Nobody had to think hard.
- They saw more than the pixels show. They know which parts are flowers and which are leaves. They know the petals are thin and soft. They know the sun is shining. None of this is written in the picture.
Say: "In this course we try to make a computer do even a small part of what you just did in one second."
We will use this photo again on the next slide, and in the code at the end.
- 3
What the computer gets
This is the most important slide today. Give students time to look at it.
- Each number is the brightness of one pixel. 0 means black. 255 means white.
- The red square is on the edge of a leaf. Bright background is in the top left (numbers near 250). The dark leaf is in the bottom right (numbers near 90).
- Show them the jump from about 250 to about 100. That jump is the edge of the leaf. In lecture 4 we will find edges by looking for jumps like this.
- A colour photo has three grids like this: one for red, one for green, one for blue.
Ask: "Look only at the numbers on the right. Can you tell this is a flower?" No. You can only tell that something bright meets something dark. This is where the computer starts.
The key message: computer vision is the work of getting from these numbers to meaning.
If students ask why the numbers stop at 255: each number uses 8 bits, and 8 bits can store 256 different values (0 to 255). Lecture 2 explains how a camera makes these numbers.
- 4
A simple definition
Write three words on the board: measure, recognise, act. They help students sort every example they will see later.
- Measure is about shape and position: cameras, 3D, movement. Lectures 2, 8 and 11 use it a lot.
- Recognise is what most people think of: "Is there a person in this photo?" Lectures 6 to 10 and 12.
- Act reminds students that vision is usually part of a bigger system. When the system makes a mistake, something real happens. That is why we will care about measuring errors later.
Also explain the neighbours of computer vision:
- Image processing: picture in, picture out (make it sharper, remove noise).
- Computer vision: picture in, description out ("two cars, 12 metres away").
- Computer graphics: description in, picture out (games, animation).
- Machine learning: the method that most modern computer vision uses.
- 5
Part 1: Why is seeing hard?
A good sentence to say here: "A large part of your brain is busy with seeing. That tells us something: seeing is not easy, even for a brain."
- 6
Vision is graphics in reverse
Draw two arrows on the board:
- WORLD → PICTURE, and write "graphics" on it.
- PICTURE → WORLD, and write "vision" on it.
Explain with numbers. Graphics is like a multiplication: 3 × 4 = 12. There is one answer. Vision is like this question: "The answer is 12. What were the two numbers?" It could be 3 × 4, 2 × 6, 1 × 12… Without more information you cannot know.
Mathematicians call a problem like this ill-posed: it has more than one possible answer. When a camera takes a picture, some information is lost. For example, the distance to each object is lost, and the back of every object is hidden. So vision cannot just calculate the world. It must make a good guess.
- 7
A photo loses distance
Go through the drawing from left to right.
- All light lines meet at one point, the camera. Lecture 2 explains why.
- Anything between the same two lines lands on the same part of the picture (the red line).
- So a small object near the camera and a big object far away look the same. This is how a toy car close to the camera can look like a real car.
- Even the tilted object gives the same picture.
Ask: "So how do you know how far away things are?" Collect answers. Good answers: we have two eyes; things move when we move our head; we know how big a car usually is; far things look smaller and more blue; lines meet in the distance.
These are clues. A computer needs clues too. Later lectures teach them: two cameras and motion (lectures 8 and 11), and learning from many examples (lectures 6 to 10).
- 8
One object, many pictures
Go through the eight pictures. Give each change its name:
Change What happens to the pixels Viewpoint (angle) every pixel moves Light every number changes Size the cat covers far fewer pixels Occlusion (something in front) part of the cat is missing Shape change the cat bends (cats bend a lot) Busy background the cat must be found among other things Noise and blur small details are lost One more change that is not shown: different cats. Black cats, white cats, fat cats, kittens: all must count as "cat". But a fox, which looks similar, must not.
The main message: the numbers change a lot, but the answer stays the same. A good method must ignore these changes (we say it is invariant to them) but still notice the small differences between a cat and a fox. Remember this idea. It comes back in lectures 4, 5, 7 and 8.
- 9
Your eyes guess too
Activity. Ask for a show of hands. Most people say A is brighter.
Then tell them: both squares have exactly the same number (0.5). If you can, cover the background with two pieces of paper. The squares now look the same.
Why this matters:
- Your brain does not report the raw brightness. It corrects for the background, because in real life a dark background often means shadow.
- This correction is a guess based on experience. Usually it helps you. Here it fools you.
- The lesson: seeing is guessing with smart rules. Computers also need rules like this. Older methods write the rules by hand. Newer methods learn the rules from many examples.
- 10
The gap between numbers and meaning
This slide sums up Part 1. The rest of the course climbs from numbers to meaning, step by step:
- Clean the picture and understand the numbers (lectures 3 to 5)
- Find simple shapes: edges, corners, small patterns (lectures 4 and 8)
- Let the computer learn from many examples (lectures 6 and 7)
- Give detailed answers: boxes, outlines, movement, sentences (lectures 9 to 12)
"Semantic" means "about meaning".
- 11
Think, pair, share (4 minutes)
Give 2 minutes to talk in pairs. Then ask 3 or 4 pairs to share.
Good examples to look for:
- Easy for a child, hard for a computer: knowing a friend after a new haircut; knowing that a cup can be held by its handle; understanding a cartoon; reading messy handwriting; telling a photo of a person from a real person.
- Easy for a computer, hard for a person: counting 4000 grains of rice exactly; measuring a part to 0.01 mm; comparing one face with a million others; checking 10 000 phone screens per hour for a tiny scratch; seeing infrared light.
The "why" is the important part. Computers win when the task is exact, repeated and clearly defined. People win when the task needs common sense, context, or flexibility. This explains why factories use computer vision a lot, but self-driving cars are still hard.
- 12
Part 2: How did we get here?
Keep the history short. Tell it like a story. Students remember stories better than dates.
- 13
A short history
Tell it in three parts.
1. Big hopes (1960s). The first programs found 3D blocks in simple line drawings ("the blocks world"). In 1966, researchers planned to build a large part of a seeing machine in one summer, with students. Next slide.
2. Careful tools (1970s to 2000s). David Marr's book Vision (1982) gave the field a way of thinking. Researchers built careful mathematical tools:
- edge detectors (Canny, 1986),
- camera geometry and 3D,
- face recognition with "eigenfaces" (1991),
- small image features that can be matched between photos, such as SIFT (1999).
Fast face detection (2001) put computer vision into ordinary cameras. Systems were built from features designed by people + a simple classifier (a program that sorts things into groups).
3. Learning (2012 to now). A very large set of labelled photos (ImageNet) and fast graphics cards (GPUs) made a new method win easily in 2012: deep convolutional neural networks. Since then: bigger models, more data, less hand design. Examples: ResNet (2015), transformers for images (2020), models that learn from pictures and text (CLIP, 2021), and models that can cut out almost any object (Segment Anything, 2023).
Point out that this course follows the same path. Part I of the course is era 2. Part II is era 3.
- 14
What computers could do, then and now
Let the two pictures speak.
- Left, 1970s: line drawings of blocks, a face made of parts joined by springs, people made of cylinders. Everything is drawn by hand or very simple, because real photos were too hard.
- Right, 2010s: the same questions (where are the objects, what shape are they, where is the person) answered on real, messy photos. Often in real time, on a phone.
Ask: "What changed between the left and the right?" Students will say "faster computers". Ask for more. The answer we want: a lot of data, and methods that learn from it. That is the 2012 story, two slides later.
- 15
The summer that took sixty years
Do not make fun of the 1966 researchers. They were very clever. The point is this: you cannot watch your own brain see. So you have no idea how much work it is doing. The same mistake happened again around 2015 with self-driving cars. For about ten years, they were "two years away".
Ask: "What else feels easy because we do it without thinking?" Walking, catching a ball, understanding speech. All of these were also very hard for computers.
- 16
2012: the big change
Explain the competition first. ImageNet has 1.2 million training photos in 1000 groups (dog breeds, cars, foods, tools…). The computer may give 5 guesses per photo. If the right answer is not among the 5 guesses, it counts as an error.
Now look at the shape of the bars:
- With features designed by people, progress was slow: 28% → 26% error.
- In 2012, AlexNet, a deep convolutional neural network trained on graphics cards (GPUs), cut the error by about one third in one year.
- Three years later, networks made fewer errors than one trained person. (The 5% for a person comes from one researcher who trained himself on the task. It is an estimate.)
Three things came together: a lot of labelled data (ImageNet), fast parallel computers (GPUs), and some new training tricks (lecture 6).
Warn students not to over-read the chart. "Better than people on ImageNet" does not mean computers see better than people. The test is narrow. Computers still fail on small changes that people ignore, like the eight cat pictures earlier.
- 17
Old ideas are still inside new methods
This slide explains why the course starts with older methods. Students often ask: "Why learn filters if deep learning does everything?"
Four answers:
- Deep networks are built from these ideas. A convolutional network is a stack of learned filters (lecture 7).
- When a network fails, the older ideas often explain why: bad sampling, wrong size, strange light.
- Many real systems still use older or mixed methods. They are cheap, predictable, and need no training data. Examples: measuring parts, scanning documents, factory checks.
- Geometry is hard to learn from data alone. Cameras follow the rules of physics.
- 18
Part 3: What can computer vision do?
Say: "So what do people use all this for?"
- 19
The main tasks
Explain each task by what it gives as output. This is how engineers think about tasks.
- Classification: one label (or a few labels) for the whole picture. Output: a name.
- Detection: what and where. Output: a list of boxes, each with a name and a confidence score. Lecture 9.
- Semantic segmentation: a label for every pixel. Both balls get the same colour, because both are "ball". Lecture 10.
- Instance segmentation: every pixel gets a label and an object number. So the two balls get different colours. Lecture 10.
Ask: "You want to count mangoes on a moving belt. Which output do you need?" Answer: detection or instance segmentation. Classification cannot count. Semantic segmentation joins touching mangoes into one blob. Choosing the task from the output you need is the most useful skill on this slide.
- 20
The same tasks on real photos
The simple scene made the words clear. Real photos show why the tasks are hard.
- Left, detection: faces and bodies are found and numbered. The system also used clothes and hair colour to find the same person in other photos.
- Right, instance segmentation: every person and every surfboard gets its own colour, even when they overlap. Look at the reflections in the wet sand: they are not coloured. The model had to learn that a reflection is not a person.
Ask: "Which is harder to label by hand, left or right?" The right, by far. Drawing an exact outline takes minutes per object. Drawing a box takes a few seconds. The cost of labelling data affects which task a company chooses.
- 21
Vision at work
Go through the six pictures. For each one, ask: "What must the system give as output?"
- Handwriting: one label per number. This 1990s system was one of the first neural networks used in business, reading post codes and bank cheques.
- Checking parts: exact 3D measurements, sometimes to less than a millimetre.
- Robot picking: the position and angle of an item, so the robot can hold it.
- Medical: a 3D model from many scan slices. A mistake can hurt a patient.
- Driving: where every car, person and lane is, many times every second.
- Drones: a 3D model built from hundreds of overlapping photos.
Point out that half of these are about measuring and half are about recognising. This connects back to the definition slide.
- 22
More places that use vision
The items appear one by one. Stop at two or three and ask students for an example they have used themselves. Phones are the easiest: almost everyone has used face unlock or portrait mode.
Make it local. Ask: "Which of these have you seen in Indonesia?" Common answers: traffic cameras that read number plates (e-tilang), toll gates, parking machines, fruit sorting, phone cameras, face check-in at offices or airports.
Also say: mistakes cost different amounts. A wrong photo tag is not a problem. A missed tumour, or a car that brakes for nothing, is a big problem. Building a vision system is mostly about understanding the cost of mistakes.
- 23
The parts of a vision system
Draw this chain on the board. You will point back to it in later lectures ("today we are working in the clean-up box").
Stress the first point. Good engineers fix the light before the algorithm. For example, a light shining from under a moving belt makes every object a dark shape on a bright background. Then a very simple method works. Lecture 2 covers light and cameras.
Also stress the last point. A model is only as good as its data and its tests. We will learn how to measure errors in lectures 6, 9 and 10.
- 24
Design task (5 minutes, groups of 3)
Run this in groups. Give 4 minutes. Then take one answer per question, each from a different group.
Good answers:
- A closed box with even, soft light (no shadows, no sunlight). A camera with fixed colour settings. A plain belt. Maybe two cameras, or rollers that turn the mango, so the whole fruit is seen.
- Classification for each mango. But the camera sees several mangoes at once, so really it is detection + classification, or instance segmentation and then classification.
- Different mango types have different ripe colours. Stickers, dirt, spots and shine. Mangoes touching each other. Blur because the belt moves fast. And ripeness is partly inside the fruit, so you cannot see it. Some factories use special near-infrared cameras for this.
- It depends on the business. Usually, selling unripe mangoes as ripe causes complaints. A ripe mango sorted as unripe only waits one more day. This difference decides where to put the decision threshold (lecture 9, precision and recall).
The point: students just designed a vision system using only today's ideas. The rest of the course fills in each part.
- 25
Part 4: This course
Move on to the course plan.
- 26
Course map
Connect each lecture to today's ideas in one sentence:
- 2: how the numbers are made (the "graphics" direction)
- 3 to 5: treat the picture as a signal: clean it, and find patterns at every size
- 6 and 7: let the computer learn features instead of designing them
- 8: match the same points between photos (measuring)
- 9 and 10: recognise things and say where they are
- 11: add time
- 12: add language
Tools: Python with NumPy, OpenCV and PyTorch. Google Colab runs in the browser, needs no installation, and gives a free GPU.
- 27
A picture really is a table of numbers
If you can, run this live. It takes 2 minutes and makes "a picture is numbers" real. The iris photo is at
lecture.williem.app/figures/photos/iris.jpg. Save it asiris.jpg, and the output will match the slide exactly.The pixel at row 650, column 950 is on a petal. It has a lot of blue (241) and red (173) and little green (88). Blue + red = purple.
Three warnings for students:
shapeis (height, width, colours). Rows come first. Students often mix up x and y. Tell them now:img[y, x]. 1328 × 2000 × 3 = 7 968 000 numbers: the "8 million" from slide 3.uint8means whole numbers from 0 to 255. Maths withuint8wraps around: 200 + 100 gives 44, not 300. Change tofloatbefore doing maths. Lecture 3 comes back to this.- OpenCV stores colour as BGR, not RGB. If you show an OpenCV image with matplotlib, red and blue are swapped and skin looks blue. This is the most common beginner mistake in this course.
- 28
Summary
Read the summary aloud. Or better: ask students to say each point before you show it. If time is short, go straight to the exit ticket.
- 29
Exit ticket (on paper or in chat)
Collect the answers. They show quickly if the main ideas landed. Expected answers:
- Many different 3D scenes make the same photo, because a photo loses information (like distance). So there is more than one possible answer.
- Any three of: angle, light, size, something in front, shape change, busy background, noise or blur, different kinds of cats.
- Detection (find boxes, then count them), or instance segmentation. Classification cannot count. Semantic segmentation joins touching cars into one blob.
A question for next time: "Why do the two sides of a straight road seem to meet at one point far away?"
Next: Image formation