With the gradual improvement of the transportation network,vehicles not only bring great convenience to life,but also pose challenges to traffic public safety.As an important technical foundation of intelligent traffic systems,vehicle and pedestrian detection algorithms can effectively increase the driver’s perception of the traffic environment and the ability of vehicle autonomous driving to avoid obstacles,so as to avoid the occurrence of traffic accidents.Aiming at the problem that traditional vehicle and pedestrian detection algorithms cannot meet real-time and high precision in complex scenes,the existing convolutional neural network(CNN)vehicle and human detection algorithms are studied,analyzes the advantages and disadvantages of traditional algorithms and CNN algorithms,and proposes an improved algorithm for vehicle and pedestrian detection based on YOLOv3.First of all,in view of the poor detection effect of the algorithm on small targets,a feature detection map with a size of 152×152 is added to improve the recall rate of small vehicle and pedestrian target detection.Secondly,the k-means algorithm is used to adjust the size of the anchor to make it conform to the scale distribution of the vehicle and pedestrian detection data set,and to improve the detection accuracy of the model.Then,an attention mechanism is added to the network model to improve the problem of attention deviation and improve the detection accuracy of vehicles and pedestrians at the edge of the image.On the other hand,considering the problem of insufficient feature extraction ability of the algorithm due to the excessive difference between the vehicle and pedestrian targets in the image,the four detection branches after the algorithm adds the feature detection map introduces the spatial pyramid pooling structure to merge the local and global features to improve the feature extraction capacity.At the same time,the adaptively spatial feature fusion algorithm is introduced in the four feature detection maps to improve the conflict of spatial location information caused by multi-scale detection.Finally,in order to improve the problem that the network model is limited by computer resources due to the complex neural network structure,the huge amount of convolution operation,and more network weights.While satisfying high accuracy,the optimized algorithm network is model compressed to obtain a lightweight vehicle and pedestrian detection network model.In summary,the improved algorithm has a smaller weight and a faster inference speed while taking into account the accuracy,and can be better deployed to mobile devices. |