Аннотация
Automatic vehicle detection and counting on urban roads is an important task in the context of modern urban traffic monitoring, transport management, and environmental observation. The object of the study is the process of vehicle detection, tracking, and counting in urban traffic video streams. The subject of the study is the models, methods, and software tools for real-time vehicle recognition and counting based on the Ultralytics library, the YOLOv8x detection model, and the SORT tracking algorithm. The purpose of the study is to develop and test a lightweight and efficient real-time system for vehicle detection and counting under urban traffic conditions. The research methods are based on the use of computer vision methods, deep learning methods for object detection, real-time object tracking algorithms, and practical software implementation in Python using the Ultralytics library, OpenCV, and cvzone. The proposed methodology includes vehicle detection in each frame using YOLOv8x, assignment of unique identifiers to detected vehicles using SORT, and counting vehicles when the center of a tracked bounding box crosses a predefined virtual boundary line. The results of the work are the development and testing of a real-time vehicle counting system for urban roads. Experimental evaluation showed that in a 5-minute urban traffic video the system detected 146 vehicles compared to 152 manually verified vehicles, with an overall counting error of 3.94%. In an additional 12-second drone video, the system correctly counted all 6 vehicles. The developed solution provides real-time visualization of detection and tracking results and stores the counted data in CSV format for further analysis. The scientific novelty of the proposed results lies in the practical integration of the YOLOv8x model from the Ultralytics library with the SORT algorithm to create a computationally efficient vehicle counting system suitable for real-time urban traffic analysis. In contrast to more computationally demanding tracking approaches, the proposed solution combines acceptable accuracy, implementation simplicity, and low computational overhead, which makes it suitable for deployment on resource-constrained devices. Conclusions: the developed system for vehicle detection and counting demonstrates sufficient accuracy and practical applicability for real-time traffic monitoring tasks. The obtained results confirm the possibility of using the proposed approach in urban traffic flow analysis, congestion assessment, and environmental monitoring. The system can also serve as a basis for further development of intelligent transport monitoring solutions, including speed estimation, trajectory analysis, and operation under more complex road and weather conditions.