The increasing traffic density in Indonesia highlights the need for an accurate vehicle detection system to support infrastructure planning. This study aims to implement the YOLOv7 algorithm for detecting and classifying various types of vehicles in traffic images. The method involves training the model using Google Colab on a Kaggle dataset consisting of 6,633 images, with a batch size of 1, 19 training epochs, and optimization using the Stochastic Gradient Descent (SGD) algorithm. The training results show that the model achieved a precision of 93.22%, recall of 90.64%, mAP@0.5 of 94.27%, and mAP@0.5:0.95 of 69.19%, with a total training time of 1 hours. In conclusion, the YOLOv7 algorithm is effective for vehicle detection and classification, although increasing the number of training epochs is recommended to further enhance model performance.
Copyrights © 2025