 The rapid growth of vehicle ownership in China has led to increased traffic congestion and other negative effects. To address these issues, we propose a lightweight detection model based on an improved version of YOLOv5. We replace the bottleneck CSP structure with the ghostnet structure and prune the network model to speed up inference. Additionally, we introduce the coordinate attention mechanism to enhance the network's feature extraction and improve its detection and recognition abilities. Distance IU non-maximum suppression replaces non-maximum suppression to address the issue of false detection and omission when detecting congested targets. Finally, we combine the five-frame differential method with VIBE and MDSLBP operators to enhance the model's feature extraction capabilities for vehicle contours. Our experiments show that our model outperforms the original model in terms of the number of parameters, inference ability, and accuracy when applied to both the expanded UA to track and a self-built dataset. Therefore, this method has significant industrial value in intelligent traffic systems and can effectively improve vehicle detection indicators in traffic monitoring scenarios. This article was authored by Qian Jiao, Wen Yuma, Chao Zhen, and others. We are article.tv, links in the description below.