Performance-Efficiency Tradeoff Analysis of YOLOv8 Variants for Real-Time Multiclass Vehicle Detection in High-Density Traffic - Dede Kurniadi; Asri Mulyani; Nuraisah Nuraisah (The Indonesian Institute of Science and Technology Research, 2026)
The growing number of vehicles in Indonesia increases the need for an efficient and reliable traffic monitoring system. In Garut Regency, traffic monitoring is still carried out manually without the support of artificial intelligence, thus limiting the effectiveness of real-time traffic analysis. This study develops and evaluates a CCTV image-based vehicle classification model using YOLOv8 with a focus on application in real-world traffic conditions. The development process follows the Machine Learning Life Cycle (MLLC) stages, including data acquisition, preprocessing, training, and model evaluation. The dataset comprises 1,200 CCTV traffic images from 10 locations in Garut Regency, supplemented by 7,426 additional images from the Roboflow platform to enhance the diversity of viewpoints and visual conditions. To address class imbalance, an undersampling technique is applied so that each vehicle category, motorcycle, car, truck, bus, and public transportation, has a balanced number of instances. Three YOLOv8 variants, namely Nano, Small, and Medium, are trained and evaluated using two testing schemes: a 70:20:10 data split and a 5-fold cross-validation method. Performance evaluation was conducted using the mean Average Precision (mAP), precision, recall, and inference speed metrics. The experimental results show that YOLOv8m with the 5-Fold Cross Validation scheme produces the best performance with mAP@50 of 0.947, precision of 0.932, and recall of 0.883, while YOLOv8n excels in terms of inference speed with an average of ±8.77 ms/frame. These findings suggest that the selection of YOLOv8 variants should consider the balance between accuracy and computational efficiency and confirm the potential of YOLOv8 as an initial component of an automated CCTV-based traffic monitoring system in real-world environments with limited resources.