F1 team detector (YOLOv9s)
Detects Formula One cars and classifies their team: Ferrari, McLaren, Mercedes, Red Bull. This checkpoint was retrained to power the interactive demo at budijuarto/f1-team-detector. The demo reproduces the best configuration from:
B. Juarto and Yulianto, "Formula One Car Detection Using Comparative Deep Learning Models," ICORIS 2026.
Files
| File | Use |
|---|---|
best.pt | Ultralytics checkpoint (PyTorch). |
f1_yolov9s.onnx | ONNX export with dynamic input size. Outputs preds [1, 8, N] (cx, cy, w, h in letterboxed-input pixels, then 4 class probabilities) and p3, p4, p5, the three feature maps entering the detection head. The demo uses these maps for EigenCAM. |
Training
- Data: Roboflow Universe "Formula 1" v2 (lab-3o63b/formula-1-zyw3q), CC BY 4.0.
- The training split was class-balanced by undersampling whole images until each team had exactly 1538 boxes (5850 images kept, seed 42). The validation and test splits were not changed.
- YOLOv9s initialised from the official COCO checkpoint, imgsz 512, 50 epochs, batch 16, default Ultralytics optimiser and augmentations. The paper used batch 4; the other settings match the paper.
Results
| Metric | Paper (val, best epoch) | This checkpoint (val, best epoch 46) | This checkpoint (val) | This checkpoint (test) |
|---|---|---|---|---|
| Precision | 0.893 | 0.927 | 0.928 | 0.929 |
| Recall | 0.950 | 0.935 | 0.935 | 0.950 |
| mAP@0.5 | 0.957 | 0.957 | 0.958 | 0.959 |
| mAP@0.5:0.95 | 0.789 | 0.772 | 0.773 | 0.776 |
AP@0.5 per team:
| Team | Paper (val) | This checkpoint (val) | This checkpoint (test) |
|---|---|---|---|
| Ferrari | 0.966 | 0.955 | 0.942 |
| McLaren | 0.955 | 0.965 | 0.956 |
| Mercedes | 0.922 | 0.942 | 0.960 |
| Red Bull | 0.963 | 0.968 | 0.978 |
Error analysis on the test split
Detections at confidence 0.25 were matched to the labels at IoU 0.5, and every mismatch was then
checked visually (data/label_audit.json in the demo project). Out of 317 test images:
- 282 were fully correct;
- 21 were correct, but the dataset label was wrong: 17 images contain real cars without a label, 4 have the wrong team in the label, 1 have a duplicated label box;
- 14 contained model errors: wrong team 1, missed car 5, false positive 9, poor localisation 3, duplicate box 0 (an image can have several).
Against the raw labels 35 images appear to contain errors; after the audit only 14 do. The metrics above are computed by Ultralytics against the raw labels, so they slightly underestimate the model. Most frequent remaining model errors: background → Ferrari (4), background → McLaren (3), background → Mercedes (2), Red Bull → Ferrari (1), background → Red Bull (1).
Usage
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
model = YOLO(hf_hub_download("budijuarto/f1-team-detector-yolov9s", "best.pt"))
results = model.predict("photo.jpg", imgsz=512, conf=0.25)
Limitations
- Closed set: only four teams. Cars from other teams (Williams, Aston Martin, ...) are either missed or forced into one of the four classes. Look for two overlapping boxes with different teams on the same car.
- Liveries change every season. The dataset spans several seasons, but a brand-new livery can reduce accuracy.
- In the paper and on this checkpoint's validation split, Mercedes has the lowest AP (on the test split Ferrari is lowest). The paper suggests that the silver/black livery offers little contrast against tarmac and barriers. In this test split, however, most detections counted as "background -> Mercedes" false positives were real Mercedes cars that the dataset did not label.
- One training run, no seed averaging. Treat differences of about 0.01 mAP between models as noise.
Citation
@inproceedings{juarto2026f1,
title = {Formula One Car Detection Using Comparative Deep Learning Models},
author = {Juarto, Budi and Yulianto, Yulianto},
booktitle = {Proceedings of ICORIS 2026},
year = {2026}
}