Skip to content

5 · Hands-on: train a model in your browser

Time to actually do it. You're going to train a real image model — no coding, no app to install, and no account needed — using a free tool from Google called Teachable Machine. It runs right in your web browser at teachablemachine.withgoogle.com.

Good to know (privacy + cost): Teachable Machine is free, and Google says your images, sounds, and poses stay on your own computer while you train — they don't get uploaded unless you choose to save your project to Google Drive. Nothing to buy. (Do this with a parent or teacher nearby, and use your own safe, non-private examples — see Lesson 10.)

Teachable Machine can train three kinds of models: Image (recognize pictures or webcam frames), Audio (recognize short sounds), and Pose (recognize body positions from a camera). We'll do an Image project because it's the easiest to see working. A fun first goal: teach it to tell "thumbs up" vs. "thumbs down."

The steps (this is the whole game — features, labels, training data, all in action):

  1. Open the tool. Go to teachablemachine.withgoogle.com and choose Get Started → Image Project → Standard image model.
  2. Name your labels. You'll see two empty classes ("Class 1," "Class 2"). Rename them to your two labels — for example, Thumbs Up and Thumbs Down. (Labels, from Lesson 2!)
  3. Collect training data. Under Thumbs Up, click Webcam and hold the pose while it captures a bunch of frames. Aim for lots and varied — different distances, angles, and backgrounds (remember Lesson 3: variety matters). Do the same for Thumbs Down. Try to keep the two roughly balanced in count.
  4. Train. Click Train Model and wait a few seconds while it learns the pattern. Don't switch browser tabs during training — it pauses.
  5. Try it live. A Preview panel turns on your webcam and shows its guess plus a confidence bar for each label. Give it a thumbs up — does the right bar shoot up?

That's it — you trained a model! The bars you see are the model's confidence: how sure it is, shown as a percentage. In the next lesson we'll test it properly and learn what those numbers really mean.

Maker tip: If you don't have a webcam, you can upload image files instead. And you can add a third label (like "no hands") to make it smarter about when neither pose is showing.

Think about it. Before you train, predict: which two labels did you pick, and what kind of variety will you add to your examples so the model doesn't accidentally learn your background instead of your hands?

Sources