Skip to main content

Python Machine Learning

Python camp course · Ages 10-13

Train an Image Classifier

Campers train an image classifier in Python, test it on new data, and build a prediction demo they can explain.

Final project previewClassifier demo
Python Machine Learning notebook with dataset shapes, training curves, and a prediction result
10guided stages
5 dayscamp-ready pacing
1 Colabone notebook all week

What campers ship

A trained image classifier with proof

Every stage adds one piece of the same machine-learning workflow. By the end, campers can show how their model learned, how accurate it is, and where it still makes mistakes.

A Python notebook that trains on real image data

Accuracy and loss charts that show learning

A final demo with predictions and confidence

Project moments

Every result comes with evidence

Students inspect data, train the model, test it, and present results. Each checkpoint should create visible evidence they can explain.

Image grid and RGB pixel values showing how pictures become tensors

Images become numbers

The course starts by showing that every picture is a 32x32 grid of RGB values. Shapes and labels make the dataset concrete before any model is built.

Training chart with accuracy rising and loss falling

Training becomes a chart

Students watch accuracy rise and loss fall over epochs, then compare training and validation lines instead of trusting one score.

Prediction demo with confidence and a results table

Predictions need evidence

The final demo shows a photo, the predicted label, confidence, and a short explanation of correct and incorrect results.

Colab-style notebook showing the full Python machine-learning workflow

A notebook tells the whole story

Data loading, model design, training curves, test accuracy, augmentation, and predictions all live in one Colab notebook students can walk through.

Course path

Your model grows stage by stage

Each stage adds one machine-learning idea and one visible notebook result.

For camp flow

Protect the evidence checks

The course works best when students pause to inspect shapes, charts, test scores, and wrong predictions. Those checks are what separate machine learning from just running notebook cells.

Begin

What you're building

You're going to build an image classifier — an AI that looks at a picture and names what it sees. By the end of the week, you'll feed your AI a photo it has never seen and it will guess: airplane, cat, dog, truck…

You won't download a finished AI. You'll build one yourself, in Python, and train it on real graphics hardware in Google Colab. You'll watch it get smarter across each round of practice, find out where it's still wrong, and then make it better.

An image classifier is a program that sorts pictures into groups. A model is the part that does the learning — it starts knowing nothing, and we train it on thousands of labeled examples until it can recognize patterns on its own.

Your two tools

The whole course uses two tools, and you keep both open:

  • Google Colab — a free coding notebook in your browser. This is where you write Python and train your AI. Colab runs on Google's GPUs, so training that would take your laptop an hour finishes in a couple of minutes.
  • Machine Learning for Kids — a no-code site we use once, on Day 1, to feel the whole train → test loop before we write any Python.

You never install anything. Everything runs in browser tabs.

How the tools and steps connect

The warm-up shows the idea with no code. The main course builds the same workflow in Python, one notebook section at a time.

How the Python ML workflow connects
  1. 1
    Photos / CIFAR-10labeled image examplesStage 1
  2. 2
    Notebook variablesx_train, y_train, class_namesSetup-2
  3. 3
    Prepared datanormalized pixels and fair pilesStage 3
  4. 4
    Keras modelCNN layers and summaryStage 4
  5. 5
    Training historyepochs, loss, accuracyStage 5
  6. 6
    Test evidencesealed score and mistakesStages 6-7
  7. 7
    Improved modelaugmentation comparisonStage 8
  8. 8
    Inferenceuploaded image to top-3 guessesStage 9
  9. 9
    Demo evidencetable, confidence, limitationStage 10

Machine Learning for Kids gives you the no-code preview. Google Colab is where the full Python workflow happens: data becomes arrays, arrays train a Keras model, scores prove quality, and predictions become demo evidence.

Warm-up: train an AI with zero code

Before we touch Python, let's train an AI the easy way so the big idea is already in your head.

Open Machine Learning for Kids. Click Get started, then Try it now (you don't need an account today).

  1. Make a project. Add a new project named Cat or Not. Project type: Images. Storage: in your web browser.
  2. Add two labels. Open the project and click Train. Make a label called Cat and a label called Not Cat. Your coach will share two folders of pictures — drop the cat photos under Cat and everything else under Not Cat.
  3. Train it. Click Learn & Test, then Train new machine learning model. The site practices on your labeled pictures.
  4. Test it. Paste an image link and see what your model guesses. Try these:

That's the entire loop you'll build in Python this week: gather labeled examples → train a model → test it on new pictures. The only difference is that you'll write every step yourself.

The week at a glance

This is a 5-day camp. Each day builds on the one before.

DayWhat you do
Day 1Intro + warm-up, set up Colab, inspect images, and read the dataset (Setup, Stage 1, Stage 2)
Day 2Prepare the data, build your CNN, and train the baseline model (Stage 3, Stage 4, Stage 5)
Day 3Grade it honestly and study what it gets wrong (Stage 6, Stage 7)
Day 4Improve the experiment and test new images (Stage 8, Stage 9)
Day 5Build the evidence table, rehearse the demo, and showcase (Stage 10)

What you'll learn

  • How a computer sees a picture as a grid of numbers (pixels and color).
  • How to get raw data ready for a model (normalizing, labeling, splitting).
  • What a Convolutional Neural Network is and how to build one in Keras.
  • What it means to train a model — epochs, loss, and accuracy.
  • Why a model can look great in practice but fail on new pictures (overfitting), and how to fix it.
  • How to feed your trained AI a brand-new photo and read its prediction.
  • How to present an AI result honestly with evidence, mistakes, confidence, and limitations.

Ready? Head to Setup to open Colab.