| Driver plays an important role in automotive traffic,and research shows that over 70%of traffic accidents are related to the driver and their hazardous driving characteristics.Therefore,it is necessary to monitor driver behavior during driving to ensure safe driving.With the rapid development of computer science and vehicle intelligentization,various intelligent driving and assisted driving algorithms are being applied to cars.To ensure that all functional algorithms can run completely,it is necessary to compress the algorithms to reduce their computational consumption.Based on convolutional neural networks,this paper uses object detection algorithms to identify driver behavior and improves the algorithm structure to achieve lightweight optimization and accuracy improvement.The specific research contents are as follows:(1)The driver behavior detection dataset was constructed.Under simulated real driving environments,dangerous driving behaviors of Chinese volunteer drivers were recorded,and the selected data was merged with some data from foreign datasets.Then,data samples were randomly combined through methods such as rotation,translation,and noise addition to increase sample diversity.After labeling and division,the dataset consists of 5 categories:playing with mobile phones,making phone calls,drinking water,smoking,and talking,with a total of 14,339 image data.(2)To address the complex features and long inference time problem of the YOLOv4 Backbone network model,the performance of four different feature extraction Backbone networks based on lightweight principles was compared,and the PP-LCNet structure was ultimately determined for this task.Then,to reduce the model’s computation consumption and inference time,the model was improved by using deep separable convolution,SPPF feature pyramid module,and a combination of three convolutions and ECA attention mechanism to replace five convolutions in YOLOv4,thereby increased the model’s accuracy and speed by reducing network depth and parameters.Additionally,to improve the detection of small targets,original feature information was added after the feature fusion layer,and the number of channels was reduced using 1×1 convolution.Moreover,MDK-means clustering was used to re-cluster the center points of Anchors to distribute them evenly and improve detection accuracy.Compared to the original algorithm,the optimized algorithm LCsoft-YOLOP reduced the volume from 244 M to 50 M,and the detection speed for driver behavior detection tasks increased from 35fps/s to 68fps/s,with an m AP value increasing from 91.58% to 94.84%.(3)The improved algorithm LCsoft-YOLOP was ported to the Jetson TX2 edge computing platform,and accelerated inference was completed by converting model files and using the Tensor RT framework.The final results showed that the optimization algorithm in this article could detect a single image on a low-computational platform in only 44 ms,which satisfies the real-time requirements for practical development. |