Learn AI Projects for Kids Teach a Computer to See

Teach a Computer to See

Beginner 🕐 11 min Lesson 1 of 9
What you'll learn
  • Understand what an image classifier is and how AI learns to recognize visual patterns
  • Train a working image classifier using Google Teachable Machine with webcam photos
  • Test and improve a model by identifying what it gets right and where it struggles

How Does a Computer Learn to See?

When you look at a dog, your brain instantly knows it is a dog. You have seen hundreds of dogs, and over time your brain built a mental picture of what makes a dog a dog. AI learns to see in a very similar way — by looking at many examples until it spots the patterns that make something recognizable.

This kind of AI is called an image classifier. You give it examples of different categories, it studies the patterns in those images, and then it can sort new images into the right category. Recycling robots at sorting facilities, apps that identify plants from photos, and medical software that spots problems in X-rays all use image classifiers.

Today you are going to build one yourself — using a free tool from Google called Teachable Machine. No coding. No downloads. Just a web browser and a webcam.

Setting Up Your First Classifier

Open a web browser and go to teachablemachine.withgoogle.com. Click Get Started, then choose Image Project. You will see two boxes called Class 1 and Class 2 — these are your categories.

For your first project, train the AI to tell the difference between a pet and something that is not a pet. If you do not have a pet nearby, you can use a stuffed animal or a picture on your phone. Click the pencil icon next to each class name and rename them: call one Pet and the other Not a Pet.

Here is how to gather training photos:

  • Click Webcam under the Pet class. Hold up your pet (or stuffed animal) and click Hold to Record. Move the object slightly — left, right, closer, farther. Aim for at least 30 different photos.
  • Switch to the Not a Pet class. Record 30 or more photos of random objects: a book, your hand, a cup, your chair.
Tip: The more different angles and lighting conditions you capture, the smarter your AI will be. A model trained only on close-up front-facing photos will struggle when you hold the object sideways.

Train Your Model and Test It

When you have your photos, click the big Train Model button. It takes about 30 seconds — watch the progress bar. When it finishes, a preview box will appear on the right side. Point your webcam at your pet (or stuffed animal) and watch what happens. The AI will show you a prediction with a confidence percentage.

Now try to fool it. Hold up something that is sort of pet-shaped but is not a pet. How does it do? Try showing it your hand — does it think that is a pet? Try pointing the camera at an empty room. These tests reveal what the AI learned and where it gets confused.

If the confidence is low or the wrong class keeps winning, add more training photos. Zoom out, try different backgrounds, try different lighting. Click Train Model again after adding more photos. Every round of training makes your AI a little smarter.

What You Just Built

You just trained a real machine learning model. What Teachable Machine does under the hood is use a technique called transfer learning — it starts from a powerful existing AI model and fine-tunes it using your specific photos. That is why it only needs a few dozen examples instead of millions.

The same basic process powers professional AI systems used in medicine, agriculture, manufacturing, and robotics. A vet clinic might train a classifier to spot skin conditions in pets. A farmer might train one to recognize diseased crops. You built yours in 10 minutes — and the process is exactly the same.

In the next lesson, you will use Teachable Machine again — but this time to teach AI to recognize sounds instead of images.

Key takeaways
  • AI learns to see by studying patterns across many labeled examples
  • More varied training photos from different angles and lighting produce a smarter model
  • Transfer learning lets Teachable Machine build powerful models from just a few dozen examples