A fluffy dog trotting happily across a sunny park.A fluffy dog trotting happily across a sunny park.
1 / 5
0:00
0:00

How Computers Learn from Examples · Episode 2 of 3

Which photos help a computer learn what a dog is?

Find out which photos people give a computer so it can learn to spot a dog, and how a simple label on each picture helps it find what all dogs share.

17Views

Episode text

Which photos help a computer learn what a dog is?

Picture a dog trotting up to you in the park. You can almost feel its soft fur and hear its happy panting. Big or tiny, fluffy or smooth, you know it is a dog in a blink.

A computer has never patted a dog or heard one bark. It can only look at photos. So which photos help a computer learn what a dog is?

First, the people teaching the computer gather a huge pile of dog photos, many thousands of them. One photo is not enough, because a single dog shows only one way a dog can look.

Next, they make sure the photos show many different dogs. There are tiny dogs and giant dogs, spotty ones and curly ones, dogs asleep on a sofa and dogs splashing in a pond. With only brown dogs on grass, the computer would think every dog is brown and stands on grass.

Then a person gives each photo a label, which means a word that tells what is in the picture. On every dog photo, the label says dog. The computer cannot tell by itself what a photo shows, so the label tells it.

The people also add photos of things that are not dogs, like cats, foxes and fluffy teddy bears. Each of these gets its own label, such as cat or fox, so the computer learns what a dog is not. Now, what do you think the computer looks for in all those dog photos?

The computer compares the photos and hunts for patterns, which means things that show up again and again. In the dog photos, it keeps finding a dog's snout, ears and waggy tail, shaped in ways a cat's or a fox's are not. Those shapes come back in photo after photo, whether the dog is huge or little.

Then the computer guesses what each photo shows and checks its guess against the label. When it guesses wrong, it changes its patterns a little and tries again. After many tries, it can spot a dog even in a photo it has never seen.

Label, pattern. People teach a computer what a dog is with many photos of all kinds of dogs and of things that are not dogs, each with a label, so the computer can find the dog patterns.

Next time a dog wags its tail at you, you will know just how a computer learns to spot one, and that is a lovely thing to carry into your dreams.

Technology & Transport

See all
Technology & Transport
How Computers Learn from Examples
Part of "How Computers Learn from Examples"

How Computers Learn from Examples

0 of 3 done
In this series