Project · Jul 2026

AI Kart Tracking

Computer Vision Object Tracking Python PyTorch

AI Summary

Inspired by a marshal role at TeamSport, this project builds a computer vision system that processes a karting track video feed frame by frame to detect, track, and classify every kart in view. A YOLO object detector identifies karts in each frame, and a persistent tracker assigns each kart a stable identity across frames. A custom KartState class then measures how far each kart has moved over a rolling window of roughly 0.4 seconds, normalised against the bounding box size so distance judgements are consistent regardless of how close the kart is to the camera. Based on that movement score, each kart is colour-coded green (driving), amber (slow), or red (stopped), with stopped karts rendered as a flashing translucent overlay to draw immediate attention.

The model was trained on a home PC using an RTX 4060 Ti with 8 GB of VRAM, with Python 3.12.3 and the GPU build of PyTorch installed via the cu128 index. Training data came from publicly accessible CCTV footage of a different karting track on YouTube; frames were extracted and every kart was labelled by hand in Roboflow under a single class. A key validation decision was to withhold several complete clips from training entirely and use them as unseen real-world test footage, which proved important in catching a model-selection issue that would otherwise have gone unnoticed.

The project developed practical skills in the full computer vision pipeline: data collection, manual annotation in Roboflow, YOLO model training on consumer GPU hardware, multi-object tracking, and motion-state classification logic. It also gave hands-on experience with environment setup for GPU-accelerated deep learning on Windows, including resolving CUDA compatibility issues between Python versions and PyTorch build variants.

← Back to Projects View full project on GitHub →