FAST DETECTION OF SEATBELT DRIVER BASED ON IMAGE

: Traffic accidents are one of the biggest contributors to injuries and fatalities world-wide. Victims of traffic accidents range from minor injuries to severe injuries and even death. The severity of many accidents is often due to a lack of discipline and public awareness of traffic rules and safety measures. Car manufacturers have attempted to mitigate the effects of accidents by providing seat belts. However, many people neglect to use them, thinking that nothing will happen while driving. Even with fines imposed by authorities, people can outsmart them by removing their seat belts when officers are not around. To address this issue, a model has been developed to monitor drivers using artificial intelligence and computer vision. The camera captures images, which are then processed by a neural network trained with the YOLOv5 algo-rithm. The model has an average precision of 89% and a recall of 81%, and can accurately detect whether drivers are wearing seat belts or not. This model is expected to aid in improving driver and passenger safety on the roads. By paying attention to the use of seat belts, the severity of injuries sustained in accidents can be reduced.


INTRODUCTION
Along with the increasing human population worldwide, car production is also increasing to meet the growing demand. However, the increasing number of vehicles has also contributed to the increase in accidents, especially car accidents [1]. Traffic accidents are one of the problems that are very detrimental and require serious handling. Given the magnitude of the impact, such as loss of life, injury and property damage, efforts to prevent and reduce the number of traffic accidents need to be increased [2].
In order to reduce the adverse effects that occur due to accidents, security forces will make rules that force all drivers, both local residents and tourists, to use seat belts. If drivers wear their seat belts properly, this will help protect them from serious injury in the event of an accident. In short, seat belts can help protect drivers from the risk of fatal injury in an accident [3]. The use of seat belts is also justified by the existence of laws and regulations that require passengers in cars to wear seat belts [4].
The integration of Internet of Things (IoT) technology with the installation of seat belt sensor cameras on vehicles has a positive impact on people's lives, especially in improving traffic order in big cities. In this case, seat belt sensors in vehicles can help create smart cities that are more orderly and safer for drivers, as well as provide the ability to carry out real-time monitoring of traffic violations. This can help increase the awareness of motorists to comply with traffic rules and reduce the number of violations that occur, thereby creating a safer and more orderly city [5].
Artificial intelligence (AI) technology has been integrated in various fields, including in cameras. Today's camera not only functions as a tool for recording and taking pictures, but can also be used as a data collection tool. The image produced by the camera will then be processed using a transformation technique to look for class classifications of detection directly [6]. In addition, the use of artificial intelligence in the camera aims to recognize the surrounding environment as well as improve the ability to analyze data and make more accurate decisions [7].
Machine learning tools are very popular and have been applied in various fields, one of which is the use of images to be used for machine recognition processes independently. Deep learning is growing fast in machine learning and convolutional neural networks (CNNs) are becoming the main tool for image analysis and classification. However, challenges such as model complexity, local deadlock issues, and over-and under-training issues remain relevant [8] [9]. In addition, interpretation of the results from deep learning models is also a challenge. To address this, further research and development is required, especially for applications requiring image analysis and classification. .
There are various algorithms for predicting images using edge detection. However, under certain conditions such as similar objects or image rotation, these algorithms are less stable and accurate in making predictions [10]. Therefore, the modeling uses the YOLO neural network to predict whether the vehicle driver is wearing a seat belt or not while in the vehicle. Seat belt detection has previously been carried out using the PASCAL-VOC public dataset with the original SDD algorithm, but it has shown a slightly lower accuracy in detecting seat belts, averaging at 79.6% [11]. YOLO is a very effective technology used to detect ob-  [12].

METHOD
The flow of research starts from dataset collection to the frame detection model.

Collecting Data
The data used in this study is taken from a public dataset provided by the Roboflow website and supplemented with independent data collected by taking pictures from videos. A total of 595 image data were collected, divided into two different classes: images of drivers using seat belts and images of drivers not using seat belts.

Image Pre-Processing
For this study, all images will be standardized to a size of 640 x 640 pixels by equalizing their sizes. The process of image annotation is essential to assist the model in recognizing classification targets based on the available classes [13], resulting in improved accuracy and efficiency by reducing the number of parameters and minimizing memory usage [14]. By annotating the images, the model will be better equipped to identify the various classes within them, facilitating the classification and data processing tasks. To increase the diversity and robustness of the image data, various augmentation techniques will be applied, such as shear, exposure, blur and noise. This technique will be used to create augmented data, which will be replicated by a factor of 2. As a result, there will be a total of 836 data samples for training, 120 data for validation, and 57 data for testing purposes. By augmenting data in this way, the model will be exposed to a wider variety of images, thereby increasing its ability to generalize to new data and be able to recognize data under various conditions [15]. The deep learning algorithm chosen for training the model is YOLOv5, which is highly effective for fast detection compared to other popular models like R-CNN or SSD [16]. YOLOv5 is a single-stage object detection model that offers four variations, namely YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x. Among these options, YOLOv5s is the smallest and fastest model, with a parameter of 7.0 M and a weight of 13.7 M. This model architecture offers a balance between speed and accuracy, making it suitable for real-time object detection applications. By utilizing YOLOv5s for the training process, the model will be optimized for efficiency and fast detection, while maintaining high accuracy levels. [17]. After preprocessing, the data will go through multiple layers, each with its own neural network. Image 3 shows the layer architecture of YOLOv5.

Model Evaluation
During the testing of the developed model, the evaluation will be based on the mean Average Precision (mAP) value. The goal of this study is to achieve a maximum precision value that is at least equal to the recall value [18]. Hence, it is necessary to calculate the precision and recall values using the following formula: (1) These terms are used in binary classification tasks to evaluate model performance based on TP, FN, and FP instances, which determine its ability to correctly identify positive samples and avoid incorrectly labeling negative ones.

Model Testing
The trained YOLOv5 algorithm will be used to save the model for subsequent direct hardware testing on both the computer and camera. To aid in the testing process, an additional library called OpenCV will be employed as a tool to detect objects using a computerbased CPU [19]. The resulting input can use either images or videos, as depicted in image 4. By implementing this approach, a more comprehensive evaluation of the model's performance under real-world conditions can be conducted, providing a better understanding of its strengths and limitations.

RESULT AND DISCUSSION
This section will demonstrate how the created model can carry out its duties by being able to recognize objects that are wearing seat belts and objects that are not wearing seat belts. The configuration used in YOLO has 32 batches and 157 epochs. To find out the process of processing training data with the YO-LO V5 algorithm, you can see the flow of precision for each epoch in Image 5.

Image 5. Precision Flow
When training the model the value of precision increases from low to high, when it reaches the highest point the graph fluctuates causing it to be unstable but the distance is not too significant. The model is good enough to detect validation objects according to the class being trained.
In addition to the precision value, there is also a recall value which has a function as a measure of the completeness of the detected object. In other words, recal is the ratio of the correct detection value to the number of algorithm detections. Image 6 is the recall flow of the training process.

Image 6. Recall Flow
The graph on recall experiences significant fluctuations because each object is sometimes not detected in its entirety because sometimes there are 2 different objects in one image. To complete the evaluation process, another parameter will be added in the form of Mean Average Precision (mAP) to evaluate the average detection box generated by the algorithm covering the actual object. Tabel 2 shows the overall parameters of the training and validation processes. The calculation data above is obtained from the validation process during training. Image 7 will illustrate the confusion matrix of the training process and obtaining the data

Implementation
Testing of model detection is carried out using 2 methods, namely images and real time video. In this case, adding a library in the form of OpenCV because it will combine the model results from YOLOv5 with OpenCV as input. The first test is carried out by entering random images and the results will be shown in image 8.

Image 8. Detection Image
From the test using images as input, the appropriate results were obtained, namely the top image was not wearing a seat belt and was successfully detected by the machine not using a seat belt, the image below also successfully showed wearing a seat belt. For the second test using video as input, refer to Image 9.

Image 9. Detection Video
Testing with video taken from a device camera that can retrieve the IP address. Detection in the video can run well and get an average confidence level ranging from 80%.

CONCLUSION
In this research build a model using the neural network architecture in YOLOv5. This model serves to detect whether the driver is wearing a seat belt or not using a seat belt. The model also has a good level of accuracy during the training process with random data under various conditions. The average grade level for the whole class when training is 89% for precision and 81% for recall. Can be tested directly on hardware that has camera features when connected to the internet. The results obtained are quite effective when applied to everyday life for the monitoring process.

BIBLIOGRAPHY
[1] S. Sharma and S. Sebastian, "IoT based car accident detection and notification algorithm for general road accidents," International