| In recent years,computer technology has developed rapidly,and the level of automobile manufacturing has also been steadily improved.Driverless cars have become a hot spot in technology today,and will become mainstream in the near future.As the most critical link of autonomous driving technology,environmental perception is the premise and guarantee for the realization of safe autonomous driving.Target detection based on unmanned vehicles in complex traffic scenarios is an important task of autonomous driving environment perception.It needs to detect various targets such as cars and pedestrians at the same time,and also faces many challenges such as occlusion between targets,insufficient lighting,and maintaining high precision and high detection speed in extreme weather.The target detection algorithm based on deep learning has the advantages of high accuracy,strong versatility,strong task transfer ability,low engineering development,optimization and maintenance costs,and has become an effective solution to target detection tasks in complex traffic scenarios.Based on the YOLOv4 target detection algorithm,this thesis proposes to improve and optimize it.First use the depthwise separable convolution and inverted residual structure to make lightweight improvements to the network,which reduces the amount of parameters and calculation of the YOLOv4 algorithm,and greatly improves the detection speed at the expense of a small part of the detection accuracy.The attention mechanism is integrated into the YOLOv4 network,and CBAM is embedded in three different detection layers,so that the algorithm can pay more attention to the target itself during the training process,and finally improves the detection accuracy without affecting the detection speed.Second,the effects of different input sizes on the performance of the target detection algorithm are experimentally explored and analyzed,and the most balanced input size for the performance of the algorithm is selected after considering the two aspects of detection speed and accuracy.Third,the K-means++ algorithm is used to perform cluster analysis in the KITTI data set,and an anchor frame with a more suitable size is obtained to replace the anchor frame in the original algorithm.Finally,in view of the imbalance of positive and negative samples during training,a focal loss function is introduced based on the YOLOv4 loss function,which effectively improves the detection accuracy of small targets and difficult-to-classify targets.Eventually the improved YOLOv4 algorithm in this thesis is tested on the KITTI test set,and the results show that the accuracy reaches 82.98%,and the detection speed is 38.4FPS,which meets the requirements of real-time detection.Finally,experiments are carried out using the domestic traffic target dataset SODA10 M,which verifies the generalization and effectiveness of the improved algorithm in this thesis. |