Supervised Learning — the robot imitates you¶
You label camera photos with the right steering; a CNN learns to do what you did.
Collect & label¶
- PhysiCar panel → Tutorials → Racing → pill Machine Learning → Train page.
- 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}/. - 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¶
- Click ▶ Train — it runs
tutorials/racing-ml/train.pyin the terminal, where the training output appears. Every run trains a new model from scratch and saves it astutorials/racing-ml/models/<id>.onnx; nothing is overwritten.
Drive¶
- Switch to the Inference page, pick your model (default: newest), ▶ Inference — it
runs
tutorials/racing-ml/inference.py. - 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