-
摘要: 為進一步提高智能交通系統對車輛及不同車型識別的泛化性、魯棒性與實時性。根據檢測區域的特征有針對性地構建數據集,改變余弦退火衰減(CD)學習率的更新方式,提出一種基于梯度壓縮(GC)的Adam優化算法(Adam?GC)來提高YOLO v4算法的訓練速度、檢測精度以及網絡模型的泛化能力。為驗證改進后YOLO v4算法的有效性,對實際路況的車流進行采集后,利用訓練完成的網絡模型對不同密度車流進行定量的車型檢測實驗驗證。經實驗驗證,改進后方法的整體檢測結果要優于改進前,YOLO v4和YOLO v4 GC CD訓練得到的網絡模型在阻塞流樣本下檢測得到的準確率分別為94.59%和96.46%;在同步流樣本下檢測得到的準確率分別為95.34%和97.20%;在自由流樣本下檢測得到的準確率分別為95.98%和97.88%。Abstract: Intelligent transportation systems (ITS) are the development direction of future transportation systems. ITS can effectively reduce traffic load and environmental pollution and ensure traffic safety, which has been a concern in all countries. In the field of intelligent transportation, vehicle detection has always been a hot spot but a difficult matter. To further improve the generalization, robustness, and real-time performance of the intelligent transportation system for the recognition of vehicles and different vehicle types, this study proposes an improved vehicle detection algorithm and chooses a road in the city as the background of the article. According to the characteristics of the detection region, the data set is constructed pertinently and the data set size is reduced using a video frame extraction method, aiming at achieving better detection performance with less training cost. The updating method of cosine decay with warm-up (CD) learning rate is then changed. An Adam gradient compression (GC) based on GC is proposed to improve the training speed, detection accuracy, and generalization ability of the YOLO v4 algorithm. To verify the effectiveness of the proposed algorithm, the trained network model is used to verify the quantitative vehicle type detection experiment of different density traffic flows after collecting the traffic flow information under actual road conditions. Experimental results show that the overall detection 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, synchronous flow samples, and free flow samples are 94.59% and 96.46%, 95.34% and 97.20%, 95.98%, and 97.88%, respectively. Simultaneously, the detection effect of YOLOV4 GC CD was verified at night and on rainy days with an accuracy rate of 92.06% and 95.51%, respectively.
-
Key words:
- gradient compression /
- learning rate /
- Adam optimization algorithm /
- YOLO v4 /
- vehicle recognition
-
圖 12 自由流樣本檢測對比。(a)YOLO v4在場景1的檢測結果;(b)YOLO v4在場景2的檢測結果;(c)YOLO v4在場景3的檢測結果;(d)YOLO v4 GC CD在場景1檢測結果;(e)YOLO v4 GC CD在場景2檢測結果;(f)YOLO v4 GC CD在場景3檢測結果
Figure 12. Comparison of free flow sample detection: (a) detection results of YOLO v4 in scenario 1; (b) detection results of YOLO v4 in scenario 2; (c) detection results of YOLO v4 in scenario 3; (d) detection results of YOLO v4 GC CD in scenario 1; (e) detection results of YOLO v4 GC CD in scenario 2; (f) detection results of YOLO v4 GC CD in scenario 3
圖 13 同步流樣本檢測結果對比。(a)YOLO v4在場景1的檢測結果;(b)YOLO v4在場景2的檢測結果;(c)YOLO v4在場景3的檢測結果;(d)YOLO v4 GC CD在場景1檢測結果;(e)YOLO v4 GC CD在場景2檢測結果;(f)YOLO v4 GC CD在場景3檢測結果
Figure 13. Comparison of synchronous flow sample detection: (a) detection results of YOLO v4 in scenario 1; (b) detection results of YOLO v4 in scenario 2; (c) detection results of YOLO v4 in scenario 3; (d) detection results of YOLO v4 GC CD in scenario 1; (e) detection results of YOLO v4 GC CD in scenario 2; (f) detection results of YOLO v4 GC CD in scenario 3
圖 14 阻塞流樣本檢測結果對比。(a)YOLO v4在場景1的檢測結果;(b)YOLO v4在場景2的檢測結果;(c)YOLO v4在場景3的檢測結果;(d)YOLO v4 GC CD在場景1檢測結果;(e)YOLO v4 GC CD在場景2檢測結果;(f)YOLO v4 GC CD在場景3檢測結果
Figure 14. Comparison of blocked flow sample detection: (a) detection results of YOLO v4 in scenario 1; (b) detection results of YOLO v4 in scenario 2; (c) detection results of YOLO v4 in scenario 3; (d) detection results of YOLO v4 GC CD in scenario 1; (e) detection results of YOLO v4 GC CD in scenario 2; (f) detection results of YOLO V4 GC CD in scenario 3
表 1 針對不同車流密度的準確性測試結果對比
Table 1. Comparison of accuracy test results for different traffic densities
Traffic density YOLO v4 GC CD YOLO v4 Actual number of vehicles Error number of vehicles Accuracy/% Actual number of vehicles Error number of vehicles Accuracy/% Free flow 473 10 97.88 473 19 95.98 Synchronous flow 645 18 97.20 645 30 95.34 Blocking flow 1498 53 96.46 1498 81 94.59 表 2 YOLO v4?GC?CD在雨天和夜間場景下的準確性
Table 2. Accuracy of YOLO v4 GC CD in rainy and nighttime scenarios
The scene type Actual number of vehicles Error number of vehicles Accuracy/% Night 793 63 92.06 Rain 712 32 95.51 www.77susu.com -
參考文獻
[1] Mu S D, Xiong Z X, Tian Y X. Intelligent traffic control system based on cloud computing and big data mining. IEEE Trans Ind Inf, 2019, 15(12): 6583 doi: 10.1109/TII.2019.2929060 [2] Meng C C, Bao H, Ma Y. Vehicle detection: A review // The 2020 3rd International Conference on Computer Information Science and Application Technology (CISAT). Dali, 2020: 012107. [3] Li X, Liu Z Q, Leung K M. Detection of vehicles from traffic scenes using fuzzy integrals. Pattern Recognit, 2002, 35(4): 967 doi: 10.1016/S0031-3203(01)00079-6 [4] Wei X, Liu S F, Xiang Y C, et al. Incremental learning based multi-domain adaptation for object detection. Knowl Based Syst, 2020, 210: 106420 doi: 10.1016/j.knosys.2020.106420 [5] Rohlfing M L, Buckley D P, Piraquive J, et al. Hey siri: How effective are common voice recognition systems at recognizing dysphonic voices? Laryngoscope, 2021, 131(7): 1599 [6] Zeng J, Li S Y, Zhang H C. Study on sub-region multi-feature image fusion oblique vehicle detection algorithm. J Highw Transp Res Dev, 2020, 37(8): 99 doi: 10.3969/j.issn.1002-0268.2020.08.013曾娟, 李守義, 張洪昌. 圖像分區域多特征融合斜向車輛檢測算法研究. 公路交通科技, 2020, 37(8):99 doi: 10.3969/j.issn.1002-0268.2020.08.013 [7] Ma B N. Research on Vehicle Tracking Based on Video Streaming [Dissertation]. Chengdu: University of Electronic Science and Technology of China, 2020馬泊寧. 基于視頻流的車輛跟蹤算法研究[學位論文]. 成都: 電子科技大學, 2020 [8] Cai Y F, Liu Z, Wang H, et al. Vehicle detection by fusing part model learning and semantic scene information for complex urban surveillance. Sensors, 2018, 18(10): 3505 doi: 10.3390/s18103505 [9] Cao J W, Song C X, Song S X, et al. Front vehicle detection algorithm for smart car based on improved SSD model. Sensors, 2020, 20(16): 4646 doi: 10.3390/s20164646 [10] Tian Y, Yang G, Wang Z, et al. Apple detection during different growth stages in orchards using the improved YOLO-V3 model. Comput Electron Agric, 2019, 157: 417 doi: 10.1016/j.compag.2019.01.012 [11] Xie H S, Wu Z S. A robust fabric defect detection method based on improved RefineDet. Sensors, 2020, 20(15): 4260 doi: 10.3390/s20154260 [12] Shi L, Jing M E, Fan Y B, et al. Segmentation detection algorithm based on R-CNN algorithm. J Fudan Univ Nat Sci, 2020, 59(4): 412史磊, 荊明娥, 范益波, 等. 基于R-CNN算法的分割檢測算法. 復旦學報(自然科學版), 2020, 59(4):412 [13] Wei Z Y, Zhao Z H, Zhao J J. Improved faster R-CNN algorithm and its application on vehicle detection. J Appl Sci, 2020, 38(3): 377 doi: 10.3969/j.issn.0255-8297.2020.03.004魏子洋, 趙志宏, 趙敬嬌. 改進Faster R-CNN算法及其在車輛檢測中的應用. 應用科學學報, 2020, 38(3):377 doi: 10.3969/j.issn.0255-8297.2020.03.004 [14] Hu Z H. 3D Object Detection Based on Deep Learning [Dissertation]. Xi'an: Xidian University, 2018胡增輝. 基于深度學習的3D物體檢測[學位論文]. 西安: 西安電子科技大學, 2018 [15] Zhao K, Liu L, Meng Y, et al. Traffic signs detection and recognition under low-illumination conditions. Chin J Eng, 2020, 42(8): 1074趙坤, 劉立, 孟宇, 等. 弱光照條件下交通標志檢測與識別. 工程科學學報, 2020, 42(8):1074 [16] Cao K N. Detection of Vehicle Target Based on Deep Learning [Dissertation]. Changchun: Jilin University, 2019曹凱寧. 基于深度學習的車輛目標檢測[學位論文]. 長春: 吉林大學, 2019 [17] Misra D. Mish. A self regularized non-monotonic activation function[J/OL]. arXiv preprint online (2019-08-23) [2020-10-28].https://arxiv.org/abs/1908.08681 [18] Zou D F, Cao Y, Zhou D R, et al. Gradient descent optimizes over-parameterized deep ReLU networks. Mach Learn, 2020, 109(3): 467 doi: 10.1007/s10994-019-05839-6 [19] Kalayeh M M, Shah M. Training faster by separating modes of variation in batch-normalized models. IEEE Trans Pattern Anal Mach Intell, 2020, 42(6): 1483 doi: 10.1109/TPAMI.2019.2895781 [20] Qiao S, Wang H, Liu C, et al. Weight Standardization [J/OL]. arXiv preprint online (2019-05-25) [2020-10-28].https://arxiv.org/abs/1903.10520v1 [21] Cheng K Y, Tao F, Zhan Y Z, et al. Hierarchical attributes learning for pedestrian re-identification via parallel stochastic gradient descent combined with momentum correction and adaptive learning rate. Neural Comput Appl, 2020, 32(10): 5695 doi: 10.1007/s00521-019-04485-2 [22] Melinte D O, Vladareanu L. Facial expressions recognition for human–robot interaction using deep convolutional neural networks with rectified Adam optimizer. Sensors, 2020, 20(8): 2393 doi: 10.3390/s20082393 [23] Gupta H, Jin K H, Nguyen H Q, et al. CNN-based projected gradient descent for consistent CT image reconstruction. IEEE Trans Med Imaging, 2018, 37(6): 1440 doi: 10.1109/TMI.2018.2832656 [24] He Y Y, Li B Q. A combinatory form learning rate scheduling for deep learning model. Acta Autom Sin, 2016, 42(6): 953賀昱曜, 李寶奇. 一種組合型的深度學習模型學習率策略. 自動化學報, 2016, 42(6):953 [25] Li X, Zhao Z F, Liu L, et al. An optimization model of multi-intersection signal control for trunk road under collaborative information. J Control Sci Eng, 2017, 2017: 1 -