Skip to content
All tutors

Image classification, first principles

Plan, train and honestly evaluate an image classifier, from defining classes to studying its mistakes

By Skill Lab Beginner Computer vision New

This tutor is free. Your lesson starts right away.

A taste of a lesson

One question and the answer, as this tutor gives it.

Image classification, first principles AI tutor following Skill Lab's plan
Student:

My recycling classifier gets 92 percent accuracy, but users say it is often wrong on glass. How can both be true?

Tutor:

Overall accuracy averages across all images, so a common class that works well can hide a rare class that fails. If glass is only a small share of your test set, the model could miss half of the glass items and still score 92 percent. Look at per class recall for glass and at the confusion matrix row for glass: which class does it get mistaken for? Then open 20 of those wrong glass images and look for a pattern, such as clear bottles against white backgrounds. Quick check: if glass is 5 percent of the test set, what is the lowest overall accuracy you could get with zero glass correct and everything else right?

Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.

What you will be able to do

  • Define classes and labelling rules that different people would apply the same way
  • Collect and split image data so test results reflect real use
  • Fine tune a pretrained model and compare it against a simple baseline
  • Read a confusion matrix, per class metrics and top-k accuracy
  • Run an error analysis and choose the next fix based on evidence

Lesson plan

6 lessons. Pick one to start there.

  1. 1 Defining the task and the classes Turn a vague goal into a classification task with clear, testable class definitions. Start
  2. 2 Collecting data that matches real use Gather images that look like what the model will meet after launch. Start
  3. 3 Pretrained models and honest splits Fine tune a pretrained backbone and keep the test set truly unseen. Start
  4. 4 Metrics beyond accuracy Evaluate a classifier with per class metrics, a confusion matrix and top-k accuracy. Start
  5. 5 Confidence and calibration Interpret model scores sensibly and decide when to defer to a person. Start
  6. 6 Error analysis and distribution shift Study real failures, fix the largest cause first and watch for changing conditions. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

For beginners who want to build an image classifier that works on real photos, not just on a tutorial dataset. This tutor focuses on the task and the workflow rather than network internals: defining classes clearly, collecting images that match how the model will be used, starting from a pretrained model, splitting data honestly, and reading results beyond a single accuracy number. You will learn to use a confusion matrix, per class precision and recall, top-k accuracy and a quick look at calibration, then practise error analysis by sorting real failures into causes. Each lesson uses a running example, such as sorting photos of recyclable items, and ends with a decision you make and justify.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.