Step 1 Make the training data
Teach by example.
A computer sees each pixel as a number from 0 (black) to 255 (white). You provide the meaning.
Would you call this pixel dark or light?
Use ← → to browse. Press D or L to label.
Step 2 Train the model
Find the pattern.
Training turns your labels into a rule the model can use on new pixels. It tries possible cutoffs, counts the mistakes, and remembers the best.
How does training choose the boundary?
This tiny model checks every whole-number cutoff from 0 to 255. The animation samples that search so you can watch it happen.
Call the darkest pixels “light” and the brightest pixels “dark.” Why can’t this model get a low mistake score?
Reveal the answer
The model has a built-in rule: dark belongs below the cutoff and light belongs above it. Moving one cutoff cannot reverse those sides. A more flexible model would also learn which label goes on which side. Here, the labeling pattern and the model’s rule are incompatible.
Step 3 Use the trained model
Try a pixel it has never seen.
Training found a rule. Now give the model a new brightness value and see how it uses that rule to make a prediction.