Skip to content

Supervised Learning — the robot imitates you

You label camera photos with the right steering; a CNN learns to do what you did.

Collect & label

  1. PhysiCar panel → Tutorials → Racing → pill Machine Learning → Train page.
  2. The labeling UI is embedded right there: for each camera frame, press the button for the correct action (left / straight / right). Photos land in tutorials/racing-ml/data/{left,straight,right}/.
  3. Label a few hundred frames — cover curves, straights, and both directions. Bad or lazy labels teach bad driving: the model can only be as good as your labels.

Train

  1. Click ▶ Train — it runs tutorials/racing-ml/train.py in the terminal, where the training output appears. Every run trains a new model from scratch and saves it as tutorials/racing-ml/models/<id>.onnx; nothing is overwritten.

Drive

  1. Switch to the Inference page, pick your model (default: newest), ▶ Inference — it runs tutorials/racing-ml/inference.py.
  2. Watch the live view in the app's MYAPP tab. Wobbly on curves? Label more curve frames and train again — this loop (collect → train → drive → improve) is the daily life of every ML engineer.

You can even switch models while driving — pick another model mid-run and the car follows it between frames.

How a CNN "sees" → Learn: deep learning · Why labels matter → Learn: supervised learning

AI