The rapid increase of car ownership facilitates people’s travel,but the following problems such as road congestion,traffic accidents and casualties are becoming more and more serious.In recent years,with the rapid development of artificial intelligence,auto driving technology has become an important technology to solve the traditional automobile road traffic problems,which has been valued and studied by more and more enterprises and countries.As the foundation and important part of automatic driving system,target detection algorithm needs to identify and locate targets quickly and accurately.Under the general road background,the existing target detection algorithm is competent,but in complex road background,due to the multiple targets and large distances and angles,there will be occlusion problems of dense targets and small target detection problems,which may cause false detection and missed detection.It brings great challenges to the existing target detection algorithms.At the same time,the complexity of the automatic driving system is higher and higher,and it also brings great burden to the hardware.Therefore,it is of great practical significance to design the target detection algorithm more lightweight.Based on the target detection algorithm based on deep learning,this paper studies the target detection algorithm under the complex road background.The specific research contents are as follows:(1)Aiming at the problem of false detection and missing detection caused by occluded targets and small targets in complex road background,based on YOLOv5 s algorithm,this paper first introduces Quality Focal Loss,which combines the classification score with the quality prediction of location,so that the improved loss function can not only ensure that the original Focal Loss can balance the characteristics of positive and negative,difficult samples,but also process continuous label values,and improve the detection accuracy without damage;Secondly,a shallow detection layer is added as the detection layer of smaller targets,the three-scale detection of the original algorithm is changed to four-scale,and the feature fusion part is also changed accordingly,which improves the learning ability of the algorithm to the features of small targets;Then,based on the feature fusion idea of Bi FPN,a de weighted Bi FPN is proposed,which makes full use of the deep,shallow and original feature information,strengthens the feature fusion,further reduces the loss of feature information in the convolution process,and improves the detection accuracy of small targets;Finally,in order to further improve the feature extraction ability of the algorithm,CBAM attention mechanism is introduced.Through experimental exploration,CBAM attention module is embedded in front of the detection head of the algorithm,so that the algorithm pays more attention to useful information and enhances the feature learning ability of the algorithm.(2)Aiming at the problem that the target detection algorithm in complex road background is not lightweight enough,this paper also takes YOLOv5 s algorithm as the basis.Firstly,the improvement of Focal Loss and multi-scale detection is retained to ensure the high detection accuracy of the algorithm;Secondly,using Ghost Net for reference and through experimental exploration,the Bottleneck of the Neck part of the original algorithm is replaced by Ghost Bottleneck,which reduces the volume of the algorithm model and the amount of parameters and calculations on the premise of maintaining the detection accuracy;Then,the Backbone part of the original network is replaced with Mobilenetv3 to further lighten the algorithm and improve the detection speed of the algorithm in the CPU environment;Finally,the algorithm is transformed into a series of formats and successfully embedded into the raspberry visual car to realize the landing of the algorithm. |