Penerapan YOLO dan OpenCV dalam Klasifikasi Kendaraan pada Lalu Lintas Kota Depok - Aldo Pamungkas; Shevti Arbekti Arman; Elliya Sestri (ITB Ahmad Dahlan Jakarta, 2025)
The growth in the number of vehicles in Depok City has driven the need for an accurate and efficient traffic monitoring system. This study implements the You Only Look Once (YOLO) version 8 algorithm to automatically detect and classify vehicles based on Python and OpenCV. The focus of the study is on four types of vehicles, namely motorcycles, private cars, buses, and trucks. The dataset was obtained from CCTV recordings and field documentation, then annotated using LabelImg and processed into YOLO format. The training process was carried out using the pretrained YOLOv8 model, while the system testing was conducted on videos of Depok City roads. Model performance was evaluated using the metrics of mAP@0.5 and mAP@0.5:mAP95, precision, recall, and F1 score. The evaluation results show that the model achieved a mAP@0.5 of 91% and a mAP@0.5:mAP95 of 75.1%, precision of 88.5%, recall of 85.2%, and an F1-score of 86.8%. With these results, the model is capable of detecting and classifying vehicles in real time with high accuracy under various lighting conditions and camera angles. Additionally, this system is integrated with a web interface using Flask for direct visualization of detection results. This research contributes to supporting smart transportation systems in urban environments and provides a potential solution for data-based traffic management.