## 2 Materials and Methods
### Detection Algorithms  
Despite the importance of enforcing helmet usage in reducing the severity of motorcycle collisions, this process may be perceived as costly. This is especially true for jurisdictions with limited police resources. To overcome these challenges, automated helmet detection frameworks have been considered. Object detection involves identifying and locating objects (e.g., motorcyclists without helmets) within videos or images using image processing techniques or deep neural networks. Image processing for object detection consists of several steps, such as pre-processing, feature extraction, thresholding, edge detection, and contour analysis. Various methods have been proposed, including the Haar cascade classifier [22], histogram of oriented gradients (HOG) [23], and scale-invariant feature transform (SIFT) [24] to detect objects in images. Furthermore, deep learning methods, which are able to learn complex patterns, have emerged as the leading approach due to their adaptability and ability to handle real-world scenarios [25]. These techniques employ convolutional neural networks (CNNs) for feature extraction and include models such as Region-based CNN (R-CNN) [26], Fast and Faster R-CNN [27], Single Shot Multi-Box Detector (SSD), and You Only Look Once (YOLO) [28; 29; 30]. Among these many techniques for object detection, YOLO has been a popular choice for real-time object detection due to its speed and efficiency. This algorithm was utilized in various studies for detecting objects, such as helmets [31; 32], license plates [33], and road users in conflict interactions [34]. Many improvements have been recently made, with numerous model architecture modifications increasing accuracy and reducing processing time [35; 36; 37; 38]. These models, which continue to be improved over time, are very useful for image detection due to their easy implementation, pre-trained existing weights, and open-source availability. However, the accuracy of YOLO models is associated with the quality of the training dataset, which may be limited. Additional deep learning techniques can be implemented to overcome this drawback. Several different studies have proposed helmet detection algorithms. For example, [PERSON]. [39] used a YOLOv5 detector in two steps to detect helmets in China, which first detects a motorcyclist and then helmet usage. Also, [40] proposed a deep learning framework to verify motorcyclist helmet usage in Myanmar. The algorithm provided an accuracy that was approximately 5% lower than a human observer. Furthermore, [PERSON]. [41] employed feature extraction techniques and a multi-layer perceptron classifier to verify if motorcyclists were using helmets. [PERSON]. [42] used a similar approach for motorcyclists in Thailand, and the method found a low rate of false positives. In addition, [PERSON]. [43] used support vector machines to identify helmet wearing in busy environments. Most of the existing research focused on helmet detection algorithms rely on standard detection frameworks (e.g., YOLO) or classifiers (e.g., support vector machines) using real data only [44; 45; 46]. However, these methods become less effective when employed in very dense locations that have multiple violations occurring in one scene with poor visibility. Generative adversarial neural networks [47], have gained popularity in recent years due to their ability to generate fake images that are convincing replicas of real images. Other approaches include diffusion networks which add random noise to the models in order to obtain the process to construct samples, and variational autoencoders, which apply regularization to ensure that adequate data can be generated. To overcome the limitations associated with poor visibility and class imbalance, this paper proposes a framework that considers synthetic data. Therefore, generative adversarial networks have the potential of improving the model accuracy by enhancing the training process overall.