Abstract:To address the issue of low vehicle detection accuracy in road surveillance, this paper proposes an improved vehicle detection method based on YOLOv7. Firstly, we introduce the Efficient Multi-Scale Attention Mechanism (EMA) for cross-space learning to enhance attention to feature information. Secondly, we replace the SPPCSPC module in the neck network with the SPPFCSPC module, trim the CBS layer, and introduce the EMA attention mechanism to strengthen attention to small target areas, thereby obtaining more accurate vehicle features. Additionally, we incorporate the EMA attention into the MP module to fuse more important feature information. Finally, employing the MPDIoU loss function accelerates model convergence and enhances detection accuracy. Experimental results show that the improved YOLOv7 achieves a detection accuracy of 86.69%, which is a 2.83% improvement over the original YOLOv7 network. This enhancement effectively boosts the accuracy of vehicle object detection, providing assurance for applications such as road video surveillance.