In recent years, significant advancements have been made in the fields of computer vision and artificial intelligence. One of the key applications of these technologies is object detection and tracking in video, which is widely used in projects such as traffic management, urban surveillance, vehicle counting, and smart parking systems. This article introduces a practical system for vehicle detection and tracking using the YOLOv11 Large model and the SORT (Simple Online Realtime Tracking) algorithm.
YOLO (You Only Look Once) is one of the fastest and most accurate real-time object detection algorithms. The YOLOv11 Large version, due to its higher accuracy, is capable of detecting vehicles under various conditions such as lighting changes, high-speed motion, and crowded scenes. In this system, each video frame is processed by the YOLO model, and the output includes bounding box coordinates, object class (Car), and confidence score.
Object detection alone is not sufficient because objects are re-detected in every frame without maintaining a consistent identity. To solve this problem, the SORT algorithm is used, which consists of two main components:
The Kalman Filter, which predicts the vehicle’s position even if it is temporarily lost, and
The Hungarian Algorithm combined with IoU, which associates new detections with existing tracks to maintain a consistent unique ID.
The overall process of the system is as follows:
This system can be used in various applications, including:
If a vehicle is temporarily lost and receives a new ID, tracking stability can be improved by increasing max_age, adjusting iou_threshold, and tuning the YOLO confidence threshold.
Combining YOLOv11 for detection and SORT for tracking provides a fast, simple, and efficient solution for real-time vehicle tracking systems. This system serves as a strong foundation for further development, including vehicle counting, trajectory analysis, and intelligent surveillance applications.