Real-time detection of seat belt usage in overhead traffic surveillance using YOLOv7

Main Article Content

DOI

Catur Edi WIDODO

caturediwidodo@lecturer.undip.ac.id

Priyono PRIYONO

priyono@lecturer.undip.ac.id

Aji SETIAWAN

aji_setiawan@ft.unsada.ac.id

Abstract

Driving safety plays a critical role in minimizing traffic accidents, and seat belt usage is one of the most effective preventive measures. This study aims to implement the YOLOv7 object detection model to automatically detect seat belt usage in four-wheeled vehicles using overhead traffic surveillance images. The proposed method consists of three main stages: dataset preparation, model training, and model evaluation. Dataset preparation includes acquiring video footage from different locations and time conditions, extracting image frames, and annotating four object classes: car, windshield, passenger, and seat belt. The model is trained on a dataset consisting of images taken during both day and night conditions. During training, data augmentation and anchor box optimization are applied to improve model generalization. The trained model is evaluated on an unseen test dataset and achieves a Mean Average Precision at 50% Intersection over Union (mAP50) of 97.46% and an F1 score of 95.37% at the optimal confidence level. These results indicate high detection accuracy for all object classes, especially for the seat belt class with an AP of 93.40%. The proposed system offers a promising solution for real-time traffic enforcement, reducing the reliance on manual observation and potentially improving traffic safety monitoring.

Keywords:

seat belt detection, YOLOv7, object detection, traffic surveillance, deep learning

References

Article Details

WIDODO, C. E., ADI, K., PRIYONO, P., & SETIAWAN, A. (2025). Real-time detection of seat belt usage in overhead traffic surveillance using YOLOv7. Applied Computer Science, 21(4), 1–12. https://doi.org/10.35784/acs_7594