| As an important part of urban transportation,non-motorized vehicles have a less complete supervision system and facilities compared to motor vehicles,mainly relying on human supervision,which is limited in time and space.Therefore,detecting non-motorized vehicle violations based on road monitoring data,strengthening supervision,establishing a digital supervision system,has significant practical significance for ensuring traffic safety,creating a civilized traffic atmosphere,and further purifying the traffic environment.However,there are certain difficulties and challenges in completing the task of detecting non-motorized vehicle violations,such as how to reasonably split this large task,design an efficient and accurate system,and equip suitable algorithms for each module;how to enable the model to have multilabel target detection capability without reducing accuracy,so that one model can be used to detect multiple violations and reduce deployment costs;how to design a reasonable module scheduling algorithm,so that the detection and analysis of monitoring images can be completed on multiple edge devices with weak computing power,thereby avoiding significant bandwidth consumption and computing pressure caused by cloud computing.In response to the above challenges,this article designs and implements a non-motorized vehicle violation detection system based on deep learning.The system includes a vehicle type detection module,violation behavior detection module,license plate detection module,license plate recognition module,and a scheduling module responsible for task distribution and result aggregation.Each of these modules is deployed on edge devices and located in the same LAN as the monitoring devices to analyze monitoring images and detect four types of traffic violations:wrong-way driving,failure to wear a helmet,illegal passenger transportation,and illegal installation of protective gear.Real-world surveillance videos from roads are collected and annotated to create a dataset that is used for model training and evaluation.In the detection module,a lightweight ConvBlock module is proposed to improve the Patch Merging module of Swin Transformer.The improved Swin Transformer is used as the backbone network for YOLOv5,and the proposed method is applied to the vehicle type detection and license plate detection tasks.Experimental results demonstrate that this method can improve model inference speed while maintaining accuracy.Furthermore,a multi-label object detection method based on the improved model is proposed for the violation behavior detection task.The input,activation function,loss function,and post-processing parts of the model are improved,and the effectiveness of the proposed method is validated on the Pascal VOC 2008 dataset for object detection and attribute distribution tasks.For the license plate recognition task,a non-motorized vehicle license plate generation algorithm is designed to expand the dataset and improve recognition accuracy,which generates license plate images and label information in batches based on real license plate templates.Finally,the trained model is deployed on different edge devices for collaboration.To address the challenges of implementing multi-edge device collaboration,a module scheduling algorithm is designed.The working logic and process of the system are introduced,and the modules work together to accomplish the task of detecting nonmotorized vehicle violations. |