# YOLOv5-Based Electric Scooter Crackdown Platform
## 4 Implementation of Proposed System  
### Overview of YOLOv5  
This study employs the YOLO model to enhance the detection of violations and regulatory infractions. YOLO offers a simplified architecture and high processing speed by utilizing a single neural network. Furthermore, because it processes the entire image context during object detection, it effectively reduces background-related errors. Within a single convolutional neural network (CNN) pass, YOLO simultaneously calculates the bounding  
Figure 1: Overall system configuration.  
box center coordinates (\(x\), \(y\)), the bounding box dimensions (w,h), and the corresponding class probabilities.  
In particular, YOLO partitions the input image into an S \(\times\) S times S \(\times\) S grid, where each cell predicts the objects present in its corresponding region. This approach segments the image into detection regions and computes the location and attributes of objects within each cell. Subsequently, each cell forecasts B bounding boxes and assigns a confidence score to each one, indicating the likelihood that the bounding box contains an object. In addition, each cell computes conditional class probabilities for C classes, enabling the model to classify detected objects with high accuracy across various categories.  
After generating these predictions, two steps are applied to refine the final bounding boxes. First, bounding boxes with low confidence scores are discarded. Second, non-maximum suppression (NMS) is employed to remove overlapping bounding boxes, retaining only the most reliable detections. Unlike region-based convolutional neural network (R-CNN) methods--which divide an image into multiple regions for individual analysis--YOLO processes the image in a single pass, eliminating the need for region-based segmentation. This efficiency results in performance that is approximately six times faster than R-CNN, making YOLO particularly well suited for real-time object detection. Accordingly, we employed YOLOv5 to leverage these advantages.  
YOLOv5 comprises four variants, s, m, l, and x, which differ primarily in network architecture. Figure 2 provides a performance comparison of these YOLOv5 models.  
The YOLOv5s model offers a lightweight architecture compared to its counterparts, delivering robust object detection performance while maintaining a relatively high frame rate. These attributes make YOLOv5s well suited for real-time object detection and for applications running in resource-constrained environments. Additional advantages include its compact model size, rapid processing speed, and high scalability. Specifically, YOLOv5s requires less memory and fewer computational resources, and it achieves a high frames-per-second (FPS) rate, making it ideal for systems that demand real-time analysis. Moreover, its lightweight architecture allows for deployment in various embedded settings, including Internet of Things (IoT) devices and mobile platforms. In addition, efficient model training can be achieved even with a small amount of labeled data. As shown in Figure 2, the leftward arrow labeled 'Faster' indicates lower GPU latency, meaning that YOLOv5s operates with a higher frame rate. Similarly, the upward arrow labeled 'Better' reflects improved object detection accuracy, demonstrating that YOLOv5x achives superior performance at the cost of increased computational requirements.  
Figure 2: Performance comparison between each YOLOv5 model.