Hyperparameter Tuning Strategy for YOLOv8n in Real-Time Post-Accident Traffic Monitoring

Authors

  • I Nyoman Eddy Indrayana Universitas Udayana
  • Made Sudarma Universitas Udayana
  • I Ketut Gede Darma Putra Universitas Udayana
  • Anak Agung Kompiang Oka Sudana Universitas Udayana

DOI:

https://doi.org/10.24036/jtip.v19i2.1132

Keywords:

Yolov8n, Hyperparameter Optimization, Post-Accident Detection, Intelligent Traffic Monitoring, Damaged Vehicle Detection

Abstract

Traffic accidents continue to provide a considerable difficulty in contemporary transportation systems, frequently leading to vehicle damage and heightened risks for pedestrians on streets. Precise and instantaneous identification of post-accident scenarios is thus crucial for facilitating swift response and sophisticated traffic management. This research introduces a streamlined object detection methodology utilizing YOLOv8n to recognize six essential traffic-related categories: bus, automobile, damaged vehicle, motorbike, pedestrian, and truck. The main aim is to examine the impact of hyperparameter modification on detection efficacy, specifically in recognizing damaged automobiles as signs of post-accident situations. Twelve model configurations were created by systematically altering three hyperparameters: learning rate (0.01, 0.001, and 0.0001), batch size (32 and 64), and optimizer type (Adam and MuSGD). All models underwent training for 200 epochs with a dataset derived from actual traffic situations, augmented by techniques such as grayscale transformation, blurring, and rotation. The performance evaluation utilized precision, recall, F1-score, mAP50, and mAP50:95. The findings indicate that hyperparameter selection substantially influences convergence stability and detection accuracy. The optimal model attained a mAP50 of 0.905 and a mAP50:95 of 0.751, utilizing a learning rate of 0.01, a batch size of 64, and the Adam optimizer. Moreover, substantial items like cars, buses, and trucks were identified with high precision, whereas damaged vehicles and pedestrians necessitated more meticulous calibration due to increased visual variability.The findings indicate that optimized lightweight models can attain competitive performance, rendering them appropriate for real-time intelligent traffic monitoring applications.

References

H. Kumar, C. Singh, A. K. Singh, N. Kumar, Tanu, and N. S. Talwandi, “Smart AI-Enabled Accident Detection and Emergency Response System for Abandoned Roads,” in Proceedings of Data Analytics and Management, A. Swaroop, B. Virdee, S. D. Correia, and Z. Polkowski, Eds., Cham: Springer Nature Switzerland, 2026, pp. 181–192.

V. A. Adewopo and N. Elsayed, “Smart City Transportation: Deep Learning Ensemble Approach for Traffic Accident Detection,” IEEE Access, vol. 12, pp. 59134–59147, 2024, doi: 10.1109/ACCESS.2024.3387972.

M. L. Ali and Z. Zhang, “The YOLO Framework: A Comprehensive Review of Evolution, Applications, and Benchmarks in Object Detection,” Computers, vol. 13, no. 12, 2024, doi: 10.3390/computers13120336.

I. Purwita Sary, E. Ucok Armin, S. Andromeda, E. Engineering, and U. Singaperbangsa Karawang, “Performance Comparison of YOLOv5 and YOLOv8 Architectures in Human Detection Using Aerial Images,” Ultima Computing : Jurnal Sistem Komputer, vol. 15, no. 1, 2023.

R. Bai, F. Shen, M. Wang, J. Lu, and Z. Zhang, “Improving Detection Capabilities of YOLOv8-n for Small Objects in Remote Sensing Imagery: Towards Better Precision with Simpliied Model Complexity Improving Detection Capabilities of YOLOv8-n for Small Objects in Remote Sensing Imagery: Towards Better Precision with Simplified Model Complexity,” 2023, doi: https://doi.org/10.21203/rs.3.rs-3085871/v1.

M. Bakirci, “Utilizing YOLOv8 for enhanced traffic monitoring in intelligent transportation systems (ITS) applications,” Digit. Signal Process., vol. 152, p. 104594, Sep. 2024, doi: 10.1016/j.dsp.2024.104594.

S. Kamijo, Y. Matsushita, K. Ikeuchi, and M. Sakauchi, “Traffic monitoring and accident detection at intersections,” IEEE Transactions on Intelligent Transportation Systems, vol. 1, no. 2, pp. 108–118, Jun. 2000, doi: 10.1109/6979.880968.

I. N. E. Indrayana, M. Sudarma, I. K. G. D. Putra, and A. A. K. O. Sudana, “Improve Nighttime Highway Vehicles and Pedestrian Detection Using Yolov8+CLAHE,” in 2024 Ninth International Conference on Informatics and Computing (ICIC), IEEE, Oct. 2024, pp. 1–6. doi: 10.1109/ICIC64337.2024.10956682.

E. Zadobrischi and M. Negru, “Pedestrian detection based on TensorFlow YOLOv3 embedded in a portable system adaptable to vehicles,” 2020 15th International Conference on Development and Application Systems, DAS 2020 - Proceedings, pp. 21–26, 2020, doi: 10.1109/DAS49615.2020.9108940.

J. Sang et al., “An Improved YOLOv2 for Vehicle Detection,” Sensors, vol. 18, no. 12, p. 4272, Dec. 2018, doi: 10.3390/s18124272.

J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection,” in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), IEEE, Jun. 2016, pp. 779–788. doi: 10.1109/CVPR.2016.91.

L. Cheng, D. Zhang, and Y. Zheng, “Road Object Detection in Foggy Complex Scenes Based on Improved YOLOv8,” IEEE Access, vol. 12, pp. 107420–107430, 2024, doi: 10.1109/ACCESS.2024.3438612.

J. Terven, D. M. Córdova-Esparza, and J. A. Romero-González, “A Comprehensive Review of YOLO Architectures in Computer Vision: From YOLOv1 to YOLOv8 and YOLO-NAS,” Dec. 01, 2023, Multidisciplinary Digital Publishing Institute (MDPI). doi: 10.3390/make5040083.

“Vehicle Classification and Counting for Traffic Analysis based on Single-stage YOLOv8 Model,” Iraqi Journal of Computers, Communications, Control and Systems Engineering, pp. 41–53, Jun. 2024, doi: 10.33103/uot.ijccce.24.2.4.

N. U. A. Tahir, Z. Long, Z. Zhang, M. Asim, and M. ELAffendi, “PVswin-YOLOv8s: UAV-Based Pedestrian and Vehicle Detection for Traffic Management in Smart Cities Using Improved YOLOv8,” Drones, vol. 8, no. 3, p. 84, Feb. 2024, doi: 10.3390/drones8030084.

I. N. Eddy Indrayana, M. Sudarma, I. K. Gede Darma Putra, and A. A. Kompiang Oka Sudana, “Cross-Domain Fine-Tuning of YOLOv8 for Vehicle Detection in Daytime and Nighttime Traffic Surveillance,” in 2025 IEEE International Conference on Data and Software Engineering (ICoDSE), 2025, pp. 136–142. doi: 10.1109/ICoDSE68111.2025.11351551.

I. Damaj, S. K. Al Khatib, T. Naous, W. Lawand, Z. Z. Abdelrazzak, and H. T. Mouftah, “Intelligent transportation systems: A survey on modern hardware devices for the era of machine learning,” Journal of King Saud University - Computer and Information Sciences, vol. 34, no. 8, pp. 5921–5942, Sep. 2022, doi: 10.1016/j.jksuci.2021.07.020.

J. Lee and K. Hwang, “YOLO with adaptive frame control for real-time object detection applications,” Multimed. Tools Appl., vol. 81, no. 25, pp. 36375–36396, Oct. 2022, doi: 10.1007/s11042-021-11480-0.

L. Wang, H. Wang, S. Letchmunan, R. Xiao, O. H. Ahmed, and Z. Liu, “A systematic literature review of lightweight YOLO models for object detection,” PeerJ Comput. Sci., vol. 11, p. e3357, Nov. 2025, doi: 10.7717/peerj-cs.3357.

S. Pudaruth, I. M. Boodhun, and C. W. Onn, “Reducing Traffic Congestion Using Real-Time Traffic Monitoring with YOLOv8,” International Journal of Advanced Computer Science and Applications, vol. 15, no. 10, 2024, doi: 10.14569/IJACSA.2024.01510109.

N. B. A. Karna, M. A. P. Putra, S. M. Rachmawati, M. Abisado, and G. A. Sampedro, “Toward Accurate Fused Deposition Modeling 3D Printer Fault Detection Using Improved YOLOv8 With Hyperparameter Optimization,” IEEE Access, vol. 11, pp. 74251–74262, 2023, doi: 10.1109/ACCESS.2023.3293056.

M. Sohan, T. Sai Ram, and Ch. V. Rami Reddy, “A Review on YOLOv8 and Its Advancements,” in Data Intelligence and Cognitive Informatics, S. and F.-G. P. Jacob I. Jeena and Piramuthu, Ed., Singapore: Springer Nature Singapore, 2024, pp. 529–545. doi: 10.1007/978-981-99-7962-2_39.

H. Duan, Y. Zhang, S. Zhu, and Z. Liang, “Lightweight multi-scale vehicle object detection algorithm based on optimized YOLOv8,” Pattern Analysis and Applications, vol. 28, no. 4, p. 183, Dec. 2025, doi: 10.1007/s10044-025-01562-2.

A. Sundaresan Geetha, M. A. R. Alif, M. Hussain, and P. Allen, “Comparative Analysis of YOLOv8 and YOLOv10 in Vehicle Detection: Performance Metrics and Model Efficacy,” Vehicles, vol. 6, no. 3, pp. 1364–1382, Aug. 2024, doi: 10.3390/vehicles6030065.

M. Zhang and Z. Zhang, “Research on Vehicle Target Detection Method Based on Improved YOLOv8,” Applied Sciences, vol. 15, no. 10, p. 5546, May 2025, doi: 10.3390/app15105546.

X. Shi, X. Zhang, Y. Su, and X. Zhang, “Positive Anchor Area Merge Algorithm: A Knowledge Distillation Algorithm for Fruit Detection Tasks Based on Yolov8,” IEEE Access, vol. 13, pp. 34954–34968, 2025, doi: 10.1109/ACCESS.2025.3544361.

M. Bakirci, “Real-Time Vehicle Detection Using YOLOv8-Nano for Intelligent Transportation Systems,” Traitement du Signal, vol. 41, no. 04, pp. 1727–1740, Aug. 2024, doi: 10.18280/ts.410407.

A. D. Desta and C. Jian, “Enhancing YOLOv8 for Vehicle Detection in Intelligent Traffic Management,” Metallurgical and Materials Engineering, vol. 31, no. 4, pp. 190–200, Apr. 2025, doi: 10.63278/1423.

F. Qanouni, H. El Massari, N. Gherabi, and M. El Badaoui, “Road Accident Detection using SVM and Learning: A Comparative Study,” International Journal of Advanced Computer Science and Applications, vol. 15, no. 5, 2024, doi: 10.14569/IJACSA.2024.0150565.

Downloads

Published

2026-05-20

How to Cite

[1]
I. N. E. Indrayana, M. Sudarma, I. K. G. D. Putra, and A. A. K. O. Sudana, “Hyperparameter Tuning Strategy for YOLOv8n in Real-Time Post-Accident Traffic Monitoring”, J. teknol. inf. pendidik., vol. 19, no. 2, pp. 1580–1599, May 2026.