dashcam-perception
Fine-tuning YOLOv8 for dashcam perception on BDD100K — and building the evaluation framework to prove, class by class, that it worked.
The problem
A YOLOv8 model pretrained on COCO already knows car, person, and bus. But a dashcam has to read the road, and two of the classes that matter most — traffic sign and rider — have no COCO equivalent at all. The pretrained model scores exactly zero on them, not because it is bad, but because it was never taught they exist.
Traffic lights are worse than nothing: COCO has them, so the model is confident, but at driving distances it detects them poorly. A detector that misses signs and misreads lights is not much use on a road.
Approach
Fine-tune YOLOv8m on 70,000 BDD100K images across its 10-class detection set, then measure the gain honestly. The measurement was the harder half: I wrote an AP@0.5 evaluator from scratch — IoU matching, per-class precision/recall, VOC all-point interpolation — so the COCO baseline and the fine-tuned model are scored through identical code on the same images. The delta that produces is the claim I actually trust.
Results
0.350 → 0.524
+49.7% mAP@0.5 over the COCO baseline
The two classes COCO cannot see go from nothing to 0.66 and 0.36, and the largest gains land exactly where a dashcam needs them — signs, lights, and riders. Every class but one improves.
| Class | Baseline | Fine-tuned | Δ | Instances |
|---|---|---|---|---|
| traffic sign | 0.000 | 0.660 | +0.660 | 1,873 |
| traffic light | 0.239 | 0.628 | +0.389 | 1,339 |
| rider † | 0.000 | 0.358 | +0.358 | 37 |
| truck | 0.458 | 0.631 | +0.173 | 207 |
| car | 0.612 | 0.781 | +0.169 | 5,300 |
| bus | 0.488 | 0.651 | +0.163 | 84 |
| bicycle † | 0.292 | 0.417 | +0.125 | 57 |
| person | 0.516 | 0.627 | +0.111 | 760 |
| motorcycle † | 0.395 | 0.491 | +0.096 | 18 |
| train † | 0.500 | 0.000 | −0.500 | 1 |
| mAP@0.5 | 0.350 | 0.524 | +0.174 |
† Low instance support — these APs carry wide error bars. train has a single instance in the subset, so its −0.500 is one missed box, not a real regression; excluding it, mAP@0.5 goes 0.333 → 0.583.
Predictions vs. ground truth
Green is the ground truth, red is the fine-tuned model — including a case where it falls short.



Engineering notes
The evaluator is the point. Reading mAP off the trainer would have measured the fine-tuned model against itself. Writing the metric by hand meant the baseline and the fine-tune were graded the same way, which is the only reason the before/after is trustworthy.
Baseline remapping. To grade a COCO model against BDD labels at all, its predictions are mapped onto BDD's 10 classes and out-of-vocabulary detections dropped — otherwise the comparison would be apples to oranges.
Trained on an M-series Mac. Batch size and image resolution were tuned to fit unified-memory limits (batch 32, imgsz 416) rather than a datacenter GPU's headroom.
The bug that cost the most. An early run trained on silently mismatched image/label paths and learned nothing useful. Fixing the data plumbing — not the model — was what unlocked the result.