为进一步提高交通智能系统对车辆及车辆不同车型识别的泛化性、鲁棒性与实时性。根据检测区域的特征有针对性的构建数据集，改变余弦退火衰减（Cosine decay with warmup CD）学习率的更新方式，提出一种基于梯度压缩（Gradient Compression GC）的Adam优化算法（Adam-GC）来提高YOLO（You Only Look Once） v4算法的训练速度、检测精度以及网络模型的泛化能力。为验证本文提出算法的有效性，对实际路况的车流进行采集后，利用训练完成的网络模型对不同密度车流进行定量的车型检测实验验证。经实验验证，改进后方法的整体检测结果要优于改进前，YOLO v4和YOLO v4-GC-CD训练得到的网络模型在阻塞流样本下检测得到的准确率分别为94.59%和96.46%；在同步流样本下检测得到的准确率分别为95.34%和97.20%；在自由流样本下检测得到的准确率分别为95.98%和97.88%。
In order to further improve the generalization, robustness and real-time performance of traffic intelligent system for vehicle and different vehicle types recognition. According to the characteristics of the detection region, the data set is constructed pertinently, and the updating method of cosine decay with warm up (CD) learning rate is changed. An Adam GC based on gradient compression (GC) is proposed to improve the training speed, detection accuracy and generalization ability of YOLO (you only look once) V4 algorithm. In order to verify the effectiveness of the algorithm proposed in this paper, after collecting the traffic flow of the actual road conditions, the trained network model is used to verify the quantitative vehicle type detection experiment of different density traffic flow. The experimental results show that the overall detection result of the improved method is better than that of the original method. The accuracy rates of the network models trained by YOLO v4 and YOLO v4-GC-CD under the blocking flow samples are 94.59% and 96.46%, respectively; the accuracy rates of the detection under synchronous flow samples are 95.34% and 97.20%, respectively; the accuracy rates of detection under free flow samples are 95.98% and 97.88%, respectively.