Skip to content

Training a YOLO model on a custom Formula 1 dataset to detect cars based on their team.

License

theosorus/FormulaTracker

Repository files navigation

🏎️ FormulaTracker — Detect F1 cars by team with YOLO

The goal of this project is to train a YOLO model on a custom dataset to detect Formula 1 cars and classify them by team in video footage.

FormulaTracker demo gif

Dataset I built on KaggleUltralytics YOLO docs


📊 Dataset

  • Source: curated from a full Grand Prix broadcast. Non-relevant segments were trimmed out.
  • Annotation tool: labelImg
  • Split: train = 442 images, val = 111 images
  • Classes (10):
Team
Alfa Romeo Racing
Ferrari
Haas
McLaren
Mercedes
Racing Point
RedBull
Renault
Toro Rosso
Williams

🏋️ Train the model

Hyperparameters value
task detect
mode train
model yolo11l.pt
epochs 200
batch 16
imgsz 640

Results

Confusion matrix

Sample Predictions (validation batch)

🚀 Roadmap / Future ideas

  • 🚥 Real-time speed estimation: approximate car speeds using multi-frame tracking + homography.
  • 📺 On-screen overlay: draw team labels on live or recorded video streams.
  • 🧩 Tracking: integrate ByteTrack/BoT-SORT for consistent track IDs across frames.
  • 🏁 More seasons: expand dataset with multiple races and lighting/weather conditions.

About

Training a YOLO model on a custom Formula 1 dataset to detect cars based on their team.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages