Learn AI Projects for Kids Build a Smart Trash Sorter

Build a Smart Trash Sorter

Beginner 🕐 12 min Lesson 4 of 9
What you'll learn
  • Train a three-category image classifier using Teachable Machine
  • Test a trained model on unseen items and identify where it makes mistakes
  • Explain what training data bias is and how diverse training data produces fairer AI

AI Is Already Sorting Your Trash

In cities around the world, recycling facilities use AI cameras and robotic arms to sort waste on conveyor belts — identifying plastic, paper, glass, and food scraps at speeds no human sorter could match. The technology behind those robots is exactly what you are going to build today: a multi-category image classifier.

In earlier lessons, you built classifiers with two categories. Today you are going to step up to three categories: trash (stuff that just goes in the bin), recycling (clean plastic, paper, and metal), and compost (food scraps and organic waste). Three categories means the AI has more to learn and needs more training examples to get it right.

Build Your Three-Class Classifier

Go to teachablemachine.withgoogle.com, click Get Started, and choose Image Project. Add a third class by clicking Add a class at the bottom. Name your three classes Trash, Recycling, and Compost.

Gather your training items. Look around the kitchen or classroom for real examples:

  • Trash: broken pen, used tissue, chip wrapper, torn plastic bag
  • Recycling: clean plastic bottle, empty cardboard box, aluminum can, newspaper
  • Compost: apple core, banana peel, coffee grounds, wilted lettuce

Record 40 or more photos for each category. Show items from different angles, under different lighting, against different backgrounds. Click Train Model when you are ready.

Challenge: What happens when you hold up a dirty plastic bottle? Does it belong in recycling (for the plastic) or trash (because it is dirty and not rinsed)? This is a real question that actually confuses sorting facilities too — and it shows how complicated real-world AI can be.

Test Your Sorter

Once trained, test your model on items it has not seen before. Find a few new pieces of trash and recycling that you did not use during training. How accurate is it? Does it ever put something in the wrong category?

Keep track of which items it gets wrong. These mistakes tell you something important: the AI is missing training examples that look like those items. Go back, add more photos, and retrain. This cycle of test-and-improve is exactly how real AI engineers develop sorting robots.

Why Does AI Get Biased?

Here is a critical thinking challenge. Imagine you only trained your trash sorter on photos of items from one brand — say, one specific brand of water bottle. Your model would learn what that particular bottle looks like, not what plastic bottles in general look like. Then when you tested it on a different brand, it might get confused or put it in the wrong category.

This is called training data bias — when the examples used to train an AI are too narrow or do not represent the full range of things the AI will see in the real world.

This same problem affects real AI systems. Facial recognition tools trained mostly on light-skinned faces have much higher error rates on darker-skinned faces. Self-driving cars trained mostly in sunny climates have struggled in fog and heavy rain. The lesson is always the same: make your training data as diverse and representative as possible. More brands. More lighting conditions. More variations. An AI is only as fair and accurate as the data it learned from.

Key takeaways
  • Three-category classifiers need more training data per class than binary classifiers
  • Testing on unseen items reveals training gaps that you can fix by adding more diverse examples
  • Training data bias happens when examples are too narrow and the AI struggles with real-world variation