Western Formula Racing is building its first autonomous car, and before it can drive itself it has to see the track. Blue and yellow cones mark the two edges, and orange cones mark the start, the finish and the lanes around them. My job was the first piece of that: a model that finds every cone in a camera image and says which kind it is.
I trained YOLOv8n on FSOCO, the shared Formula Student cone dataset: 7,881 training images and 2,172 validation images. I split them by the team that recorded them, so the model is always graded on footage from sources it has never seen. Another 1,516 images were locked away as a test set and never used to choose a model.
Where it started
The first run, three epochs at 640 pixels, scored 38% mAP50 across the four competition cone classes. Training for 50 epochs at the same size only reached 45.7%, and the learning curve had gone flat. More training wasn’t going to fix it, so I stopped training and started measuring the data.
The cones were too small to see
At a 640-pixel input, 79% of the validation cones were less than 8 pixels across on their short side. Most of what the model was being asked to find was a smudge of colour a few pixels wide.
I ran validation again on the exact same checkpoint at 1280 pixels, changing nothing else. The score jumped from 45.7% to 66.0%. Training at 1280 then took it to 68.0%.
A third of every image was a logo
Next I audited the whole dataset: all 190,381 labelled boxes in training and validation, checked against FSOCO’s official conversion code. The coordinates were right, but FSOCO pads every image with a 140-pixel border carrying contributor logos. That border covered a median 37% of each training image, space the model spent looking at logos instead of cones.
I built a border-free copy of the dataset, shifting and re-normalising every box, then checked each one against its original annotation. The worst round-trip error across all 190K boxes was 0.00004 pixels. On the border-free images, the same model went from 68.0% to 71.13%.
Fixing labels by hand
The audit turned up real labelling problems too. Large orange cones were only 3.9% of training boxes. Almost every “unknown” cone in training, 98.8% of them, came from a single team’s footage. Some cones were labelled twice.
Rather than guess which labels were wrong, I ran the model over every training image and flagged the 94 places where it confidently disagreed with the label. I reviewed all 94 by eye and changed only the 16 that were clearly wrong: orange labels on blue and yellow cones, small cones that were really large ones, a large orange box drawn around a tree, and one cone nobody had labelled. The other 78 stayed as they were, each with a recorded reason.
Knowing when not to ship
I retrained on the cleaned-up data twice. One run scored 70.20% and the other 70.23%, both just below the model I already had, so I kept the original. Cleaner labels are still worth having, but on this validation set they didn’t move the score, and the score decides.
| Step | mAP50 |
|---|---|
| 3 epochs at 640 px | 38.2% |
| 50 epochs at 640 px | 45.7% |
| Same model, evaluated at 1280 px | 66.0% |
| Trained at 1280 px | 68.0% |
| Watermark borders removed | 71.13% |
| Retrained on corrected labels (two runs) | 70.20%, 70.23% |
Getting it onto the car
A detector alone doesn’t drive anything. I wrote a C++17 ROS 2 adapter that takes the ZED stereo camera’s 3D cone positions, rejects bad ones (stale timestamps, impossible geometry, lost tracking) and publishes them for the planner, plus a replay viewer for stepping through saved detections. The repo has 90 automated tests: 55 in Python, 19 for the C++ core and 16 that run the compiled ROS node, with the C++ and ROS checks running in CI on Ubuntu and ROS 2 Jazzy. On a laptop GPU the detector takes 10.8 ms per image at 1280 pixels.
What I took from it
The biggest gains came from looking at the data, not the model: measuring how small the cones were, and noticing that a third of every image was a logo. Those two fixes added 23 points without any retraining, more than every training run put together. Next is footage from the team’s own camera, which is the real test.