To address the challenges of small and low-resolution vehicle targets,blurry backgrounds,and limited distinctive features in autonomous driving scenarios,an improved YOLOv7 vehicle detection method based on the integrated CBAM attention mechanism is proposed Firstly,on the basis of the traditional YOLOv7 object detection algorithm,the detection scale of 20×20 is replaced with 160×160 to increase the ability of shal-low feature extraction,secondly,the CBAM attention mechanism is introduced to enhance the model's perception and positioning accuracy of small targets,and finally the NWD metric is introduced to improve the sensitivity of the original CIoU loss function to the position deviation of small targets,and the similarity of the bounding box of Gaussian distribution is measured by using the Wasserstein distance to increase the detection of small targets.The results demonstrate that the improved model maintains a similar Frames Per Second(FPS)while achieving a 1.5%increase in precision(P)and a 3.2%increase in average precision(mAP)for object detection.