AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Software and smart helpers

Week 22 · Unit 7.5: Living with AI · 3 lessons
3

How computers see

Computing 7: Unit 7.5, pp. 150–181
GoalExplain how image recognition uses lines, colours, textures and shapes, and why it can make mistakes.
New words
image recognition · a computer system that decides what is in a picture by comparing its lines, colours, textures and shapes with pictures it has learned fromtexture · how the surface of something looks or feels, such as smooth or bumpybias · unfair results, often because the training data did not include enough different examplesnon-player character (NPC) · a character in a game that the computer controls and that reacts to the player
Explanation

Image recognition lets a computer decide what is in a picture. It looks for lines, colours, textures and shapes. It was trained on thousands of pictures, so it can recognise the same object when it looks a little different. A phone that unlocks with your face can still know you after a new haircut, with a scarf on, or in a dim room. Games use AI too: a non-player character can react to what you do. But training data matters. If an AI saw only red apples, it may fail with a green apple, which is a kind of bias. People must check the results, and you must ask permission before you take or share a photo of someone.

takes a picturechecks shape, colour, texturesays: apple
Worked examples
ClueAppleBananaOrange
shaperoundlong and curvedround
colourred or greenyelloworange
texturesmoothsmoothbumpy
The AI compares the clues in a new picture with the clues it learned. The picture with the most matching clues wins.
Test pictureIn the training data?AI’s guess
red appleyesapple
green applenonot sure, or wrong
An AI that has seen only red apples may not know a green one. The table shows what can happen. The fix is to add more varied training pictures.
StartINPUT stepssteps <= 3?yesnoOUTPUT dog barksOUTPUT dog sleepsEnd
A farm game has a guard dog as a non-player character. The dog watches how far the player is, in steps. If the player is 3 steps away or closer, the dog barks. The flowchart shows the rule.
Class activity

Human image recogniser (no computer): your partner secretly chooses a fruit or vegetable from a picture book or the kitchen. They may give clues only about shape, colour and texture, one clue at a time, and you must guess after each clue. Count how many clues you needed. Then your partner picks something unusual, such as a purple carrot, and you discuss why this is harder. Say how a computer could be helped by seeing many different examples. If you have a computer or tablet, an adult can help you look at a photo and describe its lines, colours and shapes.

Practice
1
A phone camera decides about its flash with this flowchart. Follow it for a brightness of 2 and for a brightness of 4. What does the camera output each time?
StartINPUT brightnessbrightness < 4?yesnoOUTPUT flash onOUTPUT flash offEnd
2
Use the clues to complete the last column.
PictureShapeColourTextureGuess
Along and curvedyellowsmooth?
Broundorangebumpy?
3
Sara’s phone still unlocks when she wears a scarf. Why does the image recognition still work?
4
A team trains an AI to find birds only with photos taken on sunny days. It fails on a foggy day. Explain the problem and a fix.