A Real-Time Helmet Detection System Based on YOLOv8 to Support Traffic Law Enforcement
Keywords:
Helmet, Roboflow, Traffic, , Vehicle, YOLOAbstract
Helmet use is a critical safety measure for motorcycle riders, yet non-compliance remains high in Indonesia. This study introduces a real-time helmet detection system using the YOLOv8 architecture, deployed on Android devices with the Kotlin programming language. A dataset of 1,197 digital images was collected and annotated using Roboflow Annotate, containing two classes: helmet users (True) and non-users (False). To improve model generalization, data augmentation techniques such as rotation and shear were applied. The model was trained using the pretrained yolov8n.pt weights and evaluated based on mAP and Intersection over Union (IoU). During training, the model achieved a mAP50 of 98% and a mAP50–95 of 59.6%. In testing, the mAP50 reached 98.3% and mAP50–95 reached 61%, with an average IoU of 0.73. The trained model was then converted into TensorFlow Lite format and integrated into an Android application. Real-time testing showed a detection accuracy of 93.3%. These results demonstrate that YOLOv8 is effective for mobile-based real-time helmet detection and has strong potential to support traffic law enforcement systems, especially in urban environments where manual monitoring is inefficient. The system contributes to enhancing public safety through smart technology integration.
References
Aprian, A. T. (2024). Penerapan Pasal 291 Ayat (1) Dan Ayat (2) Undang–Undang Nomor 22 Tahun 2009 Tentang Lalu Lintas Dan Angkutan Jalan Terhadap Bukti Pelanggaran (E–Tilang)(Studi Kasus Surat E–Tilang Nomor B/487129/Xi/Yan. 1.2/2023). Fakultas Hukum.
Azhari, A. N., & Wahyono, W. (N.D.). Automatic Detection Of Helmets On Motorcyclists Using Faster-Rcnn. Ijccs (Indonesian Journal Of Computing And Cybernetics Systems), 16(4), 357–366.
Balla, F. (2024). Less Is More-Adapting The Yolov8 Network For Multi-Spectral Human Presence Detection. Oslo Metropolitan University.
Bayunegara, D., Anggraeni, Y. M., Fitriani, E., Setiadi, W., & Triadi, I. (2025). Analisis Yuridis Pelaksanaan Sanksi Denda Tilang Electronic Traffic Lawenforcement (E-Tle) Terhadap Pelaku Pelanggar Lalu Lintas Menurutundang-Undang Nomor 22 Tahun 2009. Quantum Juris: Jurnal Hukum Modern, 7(1).
Cahyani, A. N., & Junaidy, A. B. (2025). Larangan Bermain Smartphone Saat Berkendara Berdasarkan Prespektif Sad-Dhariah. Court Review: Jurnal Penelitian Hukum (E-Issn: 2776-1916), 5(02), 1–16.
Desai, S., Das, J., Langde, P., & Umate, L. (2024). Helmet And Number Plate Detection Using Yolov8. 2024 Ieee 3rd World Conference On Applied Intelligence And Computing (Aic), 1228–1234.
Ely, I. (2023). Efektivitas Fungsi Kepolisian Dalam Penegakan Hukum Tindak Pidana Kecelakaan Lalu Lintas. Undaris.
Febriana, N. H. (2023). Analisis Deteksi Helm Pada Pengendara Bermotor Untuk Mendeteksi Pelanggaran Lalu Lintas Menggunakan Metode You Only Look Once (Yolov4). Universitas Pembangunan Nasional" Veteran" Jawa Timur.
Indonesia, R. (2009). Undang-Undang Republik Indonesia Nomor 22 Tahun 2009 Tentang Lalu Lintas Dan Angkutan Jalan.
Jain, S., Dash, S., Deorari, R., & Others. (2022). Object Detection Using Coco Dataset. 2022 International Conference On Cyber Resilience (Iccr), 1–4.
Jia, W., Xu, S., Liang, Z., Zhao, Y., Min, H., Li, S., & Yu, Y. (2021). Real-Time Automatic Helmet Detection Of Motorcyclists In Urban Traffic Using Improved Yolov5 Detector. Iet Image Processing, 15(14), 3623–3637.
Meidyan, M. A., & Yustanti, W. (2024). Implementasi Metode You Only Look Once (Yolov5) Dalam Deteksi Pelanggaran Helm. Journal Of Emerging Information System And Business Intelligence (Jeisbi), 5(3), 214–222.
Mercado Reyna, J., Luna-Garcia, H., Espino-Salinas, C. H., Celaya-Padilla, J. M., Gamboa-Rosales, H., Galván-Tejada, J. I., Galván-Tejada, C. E., Sol’Is Robles, R., Rondon, D., & Villalba-Condori, K. O. (2023). Detection Of Helmet Use In Motorcycle Drivers Using Convolutional Neural Network. Applied Sciences, 13(10), 5882.
Nobrihas, R. Y. T., Mahoklory, S. S., Mbanga, E., & Sellan, R. N. (2023). Kepatuhan Penggunaan Helm Saat Berkendara Dalam Mencegah Cedera Kepala Pada Pengendara Remaja. Lasalle Health Journal, 2(2), 147–157.
Pandey, J., & Asati, A. R. (2023). Lightweight Convolutional Neural Network Architecture Implementation Using Tensorflow Lite. International Journal Of Information Technology, 15(5), 2489–2498.
Pardede, C. R. V., Nita, S., & Setyabudi, C. M. (2022). Analisis Program Electronic Traffic Law Enforcement (Etle) Dalam Rangka Menciptakan Kamseltibcarlantas (Studi Kasus Kota Serang). Journal Of Innovation Research And Knowledge, 1(8), 533–542.
Pratiwi, H. (2024). Buku Ajar Kecerdasan Buatan: Disertai Praktik Baik Pemanfaatannya. Asadel Liamsindo Teknologi.
Reis, D., Kupec, J., Hong, J., & Daoudi, A. (2023). Real-Time Flying Object Detection With Yolov8. Arxiv Preprint Arxiv:2305.09972.
Satya, L., Septian, M. R. D., Sarjono, M. W., Cahyanti, M., & Swedia, E. R. (2023). Sistem Pendeteksi Plat Nomor Polisi Kendaraan Dengan Arsitektur Yolov8. Sebatik, 27(2), 753–761.
Septian, M. R. D., Masitoh, A. H., & Sari, I. M. (N.D.). Implementation Of Deep Learning Algorithm For Vehicle Count Monitoring System. Tepian, 5(4), 587833.
Shan, D., Yang, Z., Wang, X., Meng, X., & Zhang, G. (2024). An Aerial Image Detection Algorithm Based On Improved Yolov5. Sensors, 24(8), 2619.
Shorten, C., Khoshgoftaar, T. M., & Furht, B. (2021). Deep Learning Applications For Covid-19. Journal Of Big Data, 8(1), 1–54.
Tzutalin. (2015). Labelimg: Label Object Bounding Boxes In Images.
Wen, H., Du, Z., Zhang, Y., & Li, Z. (2022). Annotation Efficiency And Its Impact On Deep Learning Object Detection Performance. Sensors, 22(5), 1801. Https://Doi.Org/10.3390/S22051801
Yunyun, L. I. U., & Jiang, W. (2021). Detection Of Wearing Safety Helmet For Workers Based On Yolov4. 2021 International Conference On Computer Engineering And Artificial Intelligence (Icceai), 83–87.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Tiara Puspita, Ericks Rachmat Swedia, Margi Cahyanti, M Ridwan Dwi Septian

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors retain all their rights to the published works, such as (but not limited to) the following rights; Copyright and other proprietary rights relating to the article, such as patent rights, The right to use the substance of the article in own future works, including lectures and books, The right to reproduce the article for own purposes, The right to self-archive the article