Abstract:To solve the small target under complex background of vehicle detection error detection,leak phenomenon, such as innovative put forward an improved YOLOv7 network target detection algorithm.Firstly,in order to solve the problem of small target vehicle secondary information interference,the ECA attention mechanism was integrated into the main network feature layer of YOLOv7 model,and the weight proportion of target area information was enhanced and irrelevant information was suppressed through adaptive learning.Secondly,in order to solve the qualitative problem of hyperparameter stochastic experience of neural network detection model training,the sparrow search algorithm was used to optimize the hyperparameter of detection model training,and the global optimal learning rate was quickly converged through internal and external double loop iteration,and then the weight information of the optimal group was obtained, and finally the detection accuracy of small target vehicles was improved.The experimental results show that the detection accuracy of YOLOv7-ECA-SSA detection model based on structure optimization and hyperparameter optimization is 79.01%on BDD100K data set,5.38%higher than that of the original model,and has better detection performance of small target vehicles.