摘要:Vehicle detection is the first step and an important part of automatic traffic incident detection systems. It guarantees subsequent vehicle identification and vehicle counting accuracy and has crucial theoretical significance and practical value for traffic safety and control. The model obtained by the original YOLOv4 algorithm is too large to be used in embedded terminals in real time. To overcome this problem, this study replaces the original backbone network of YOLOv4, which is CSPDarknet53, with MobileNetv3 for the feature extraction. To further reduce the number of parameters, deep separable convolution is used to replace the common 3×3 convolution in the original model of the enhanced feature extraction networks SPP and PANet. Because of the imbalance in the object detection data, the loss function is redesigned using a weighting method. The research results show that in comparison to the original YOLO series algorithm, the optimized YOLOv4 algorithm improves the accuracy by 0.53% and reduces the number of model parameters by 78%. In comparison to the other algorithms, the improved YOLOv4 model is smaller and more accurate, which is the basis for realizing intelligent transportation systems.