吉林大学学报(工学版) ›› 2024, Vol. 54 ›› Issue (3): 741-748.doi: 10.13229/j.cnki.jdxbgxb.20220473

• 交通运输工程·土木工程 • 上一篇    

基于改进YOLOv4-tiny算法的车距预警方法

王宏志(),宋明轩,程超,解东旋()   

  1. 长春工业大学 计算机科学与工程学院,长春 130012
  • 收稿日期:2022-04-24 出版日期:2024-03-01 发布日期:2024-04-18
  • 通讯作者: 解东旋 E-mail:wanghongzi@ccut.edu.cn;xiedongxuan@ccut.edu.cn
  • 作者简介:王宏志(1961-),男,教授,博士.研究方向:数字信号处理及应用.E-mail:wanghongzi@ccut.edu.cn
  • 基金资助:
    国家自然科学基金项目(61903047);吉林省教育厅重点项目(JKH20210754KJ)

Vehicle distance warning method based on improved YOLOv4⁃tiny algorithm

Hong-zhi WANG(),Ming-xuan SONG,Chao CHENG,Dong-xuan XIE()   

  1. College of Computer Science and Engineering,Changchun University of Technology,Changchun 130012,China
  • Received:2022-04-24 Online:2024-03-01 Published:2024-04-18
  • Contact: Dong-xuan XIE E-mail:wanghongzi@ccut.edu.cn;xiedongxuan@ccut.edu.cn

摘要:

针对现有网络难以实时精确识别道路检测目标及车距的问题,提出了一种基于改进YOLOv4-tiny算法的车距预警方法。首先,总结了YOLOv4-tiny算法的特征提取结构,分析了原网络结构的不足之处。其次,在原网络中增加了空间金字塔池化层SPPF进一步提取目标特征,增强深层次语义信息表达能力,并将特征金字塔网络(FPN)结构添加下采样通道和CSPnet层,充分融合多尺度图像特征,避免浅层信息丢失。最后,使用Mosaic数据增强方法丰富数据集训练样本,并将改进YOLOv4-tiny算法与单目测距原理相结合,依据车距大小设置3种级别的信息提示进行车距预警实验。结果表明:本文算法在PASCAL VOC数据集上的检测速度为43 帧/s,平均精度达到81.25%,较YOLOv4-tiny算法提高了3.59%。可见,改进YOLOv4-tiny算法在满足检测实时性要求的同时,具备良好的目标检测精度,对提升车距预警方法的使用效果具有指导意义。

关键词: 交通运输安全工程, 目标检测, YOLOv4-tiny算法, 单目测距, 车距预警

Abstract:

Aiming at the problem that the existing network is difficult to accurately recognize the target of road detection and vehicle distance in real time, a vehicle distance warning method based on improved YOLOv4-tiny algorithm was proposed. Firstly, the feature extraction structure of YOLOv4-tiny algorithm was summarized, and the shortcomings of the original network structure were analyzed. Secondly, SPPF of spatial pyramid pooling layer was added to the original network to further extract target features and enhance the ability to express deep semantic information. Feature Pyramid Network (FPN) structure was added with down-sampling channel and CSPnet layer to fully integrate multi-scale image features and avoid the loss of shallow information. Finally, the Mosaic data enhancement method was used to enrich the data set training samples, and the improved YOLOv4-tiny algorithm was combined with the principle of single visual distance detection. The vehicle distance warning experiment was conducted by setting three levels of information cues according to the vehicle distance. The results show that the detection speed of the proposed algorithm on PASCAL VOC dataset is 43 frames/s, and the average accuracy is 81.25%, which is 3.59% higher than that of YOLOv4-tiny algorithm. It can be seen that the improved YOLOv4-tiny algorithm has good target detection accuracy while meeting the real-time requirements of detection, which has guiding significance for improving the application effect of vehicle distance warning method.

Key words: engineering of communications and transportation safety, target detection, YOLOv4-tiny algorithm, monocular distance measurement, vehicles warning

中图分类号: 

  • U492.8

图1

YOLOv4-tiny网络结构"

图2

FPN特征融合结构"

图3

YOLOv4-Tiny改进网络结构"

图4

空间金字塔池化原理图"

图5

SPPF结构示意图"

图6

双向FPN结构示意图"

图7

CSPnet残差结构示意图"

图8

使用Mosaic数据增强图示"

图9

训练损失曲线"

表1

本文算法与近年来目标检测算法性能对比"

算法AP/%mAP/%FPS
BusCarMotorbikeBicyclePerson
YOLOv4-tiny2186.1190.8885.3586.1986.0077.6675.51
Faster RCNN-vgg965.8979.7168.6575.7477.6962.7622.48
Faster RCNN-Resnet967.8681.1473.1072.3679.4065.9915.21
Ssd-Mobilenetv21681.6085.8284.8483.5175.8975.2939.14
Mobilenetv1-YOLOv42786.1289.0584.6687.5884.6680.5036.03
Mobilenetv2-YOLOv42884.9190.4385.6988.8884.7281.3229.95
Mobilenetv3-YOLOv42986.0988.5083.4487.0784.5379.7426.31
本文90.2191.9087.8387.4086.8881.2543.37

图10

YOLOv4-tiny和本文算法的MAP曲线对比"

表2

MV-CE120-10UC型工业相机参数"

参数数值参数数值
像元尺寸/ μm×μm1.85×1.85信噪比/dB40.5
靶面尺寸1/1.7"增益/dB0~27
分辨率/dpi4000×3036曝光时间/s0.000 03~0.5
动态范围/dB70~71适配镜头焦距/mm6

图11

白天道路上的目标测距结果"

图12

夜间道路上的目标测距结果"

1 王新竹, 李骏, 李红建, 等. 基于三维激光雷达和深度图像的自动驾驶汽车障碍物检测方法[J]. 吉林大学学报: 工学版, 2016, 46(2): 360-365.
Wang Xin-zhu, Li Jun, Li Hong-jian, et al. Obstacle detection method for autonomous vehicles based on 3D lidar and depth image[J]. Journal of Jilin University (Engineering Science), 2016, 46(2): 360-365.
2 周俊静, 段建民, 杨光祖. 基于雷达测距的车辆识别与跟踪方法[J]. 汽车工程, 2014, 36(11): 1415-1420.
Zhou Jun-jing, Duan Jian-min, Yang Guang-zu. Vehicle recognition and tracking method based on radar ranging[J]. Automotive Engineering, 2014, 36(11): 1415-1420.
3 邹斌, 袁宇翔. 面向智能交通的单目视觉测距方法研究[J]. 交通运输系统工程与信息, 2018, 18(4): 46-53.
Zou Bin, Yuan Yu-xiang. Research on monocular visual ranging method for intelligent transportation[J]. Transportation Systems Engineering and Information, 2018, 18(4): 46-53.
4 李琳辉, 伦智梅, 连静, 等. 基于卷积神经网络的道路车辆检测方法[J]. 吉林大学学报: 工学版, 2017, 47(2): 384-391.
Li Lin-hui, Zhi-mei Lun, Lian Jing, et al. Road vehicle detection method based on convolutional neural network[J]. Journal of Jilin University (Engineering Edition), 2017, 47(2): 384-391.
5 文学志, 方巍, 郑钰辉. 一种基于类Haar特征和改进AdaBoost分类器的车辆识别算法[J]. 电子学报, 2011, 39(5): 1121-1126.
Wen Xue-zhi, Fang Wei, Zheng Yu-hui. A vehicle recognition algorithm based on Haar-like features andimproved AdaBoost classifier[J]. Journal of Electronis, 2011, 39(5): 1121-1126.
6 Lienhart R, Maydt J. An extended set of Haar-like features for rapid object detection[J/OL]. [2022-03-15].
7 Dooley D, Mcginley B, Hughes C, et al. A blind-zone detection method using a rear-mounted fisheye camera with combination of vehicle detection methods[J]. IEEE Transactions on Intelligent Transportation Systems, 2015, 17(1): 264-278.
8 Girshick R, Donahue J, Darrell T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]∥Proceedings of 2014 IEEE International Conference on Computer Vision and Pattern Recognition, Columbus, USA, 2014: 580-587.
9 Girshick R. Fast R-CNN[C]∥Proceedings of 2015 IEEE International Conference on Computer Vision, San-tiago, Chile, 2015: 1440-1448.
10 He K, Xiang Y, Shao Q, et al. Spatial pyramid pooling in deep convolutional networks for visual recognition[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2014, 37(9): 1904-1916.
11 Ren S, He K, Girshick R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149.
12 彭博, 蔡晓禹, 唐聚, 等. 基于改进Faster R-CNN的无人机视频车辆自动检测[J]. 东南大学学报: 自然科学版, 2019, 49(6): 1199-1204.
Peng Bo, Cai Xiao-yu, Tang Ju, et al. Automatic detection of UAV video vehicles based on improved Faster R-CNN[J]. Journal of Southeast University (Natural Science Edition), 2019, 49(6): 1199-1204.
13 Redmon J, Divvala S, Girshick R, et al. You only look once: unified, real-time object detection[C]∥2016 IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, USA, 2016: 779-788.
14 Redmon J, Farhadi A. YOLO9000: better, faster, stronger[C]∥IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, USA, 2017: 6517-6525.
15 Redmon J, Farhadi A. YOLOv3: an incremental improvement[J/OL]. [2022-03-17].
16 Bochkovskiy A, Wang C Y, Liao H. YOLOv4: optimal speed and accuracy of object detection[J/OL]. [2022-03-17].
17 Liu W, Anguelov D, Erhan D, et al. SSD: single shot multibox detector[C]∥European Conference on Computer Vision. Berlin: Springer, 2016: 21-37.
18 谭红臣, 李淑华, 刘彬, 等. 特征增强的SSD算法及其在目标检测中的应用[J]. 计算机辅助设计与图形学学报, 2019, 31(4): 573-579.
Tan Hong-chen, Li Shu-hua, Liu Bin, et al. Feature enhanced SSD algorithm and its application in object detection[J]. Journal of Computer Aided Design and Graphics, 2019, 31(4): 573-579.
19 Huang J, Rathod V, Sun C, et al. Speed/accuracy trade-offs for modern convolutional object detectors[C]∥Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, USA, 2017: 7310-7311.
20 Concise feature pyramid region proposal network formulti-scale object detection[J]. Journal of Supercomp-uting, 2020, 76(5): 3327-3337.
21 Lin T Y, Dollar P, Girshick R, et al. Feature pyramid networks for object detection[C]∥2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, USA, 2017: 936-944.
22 Wang C Y, Liao H, Wu Y H, et al. CSPNet: a new backbone that can enhance learning capability of CNN[C]∥Proceedings of IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPR), Seattle, USA, 2020: 1571-1580.
23 Li Z, Wang H, Zhong H, et al. Self-attention moduleand FPN-based remote sensing image target detection[J]. Arabian Journal of Geosciences, 2021, 14(23): 1-18.
24 Prasetyo E, Suciati N, Fatichah C. Yolov4-tiny and spatial pyramid pooling for detecting head and tail of fish[C]∥2021 International Conference on Artificial Intelligence and Computer Science Technology (ICAICST), Yogyakarta, Indonesia, 2021: 157-161.
25 Shum H Y, Szeliski R, Systems and experiment paper : construction of panoramic image mosaics with global and local alignment[J]. International Journal of Computer Vision, 2000, 36(2): 101-130.
26 Zheng Z, Wang P, Liu W, et al. Distance-IoU loss: faster and better learning for bounding box regression[J]. AAAI Technical Track: Vision, 2019, 34(7): 12993-13000.
27 Li G, Liu Z, Li F, et al. Block Convolution: towards memory-efficient inference of large-scale CNNs on FPGA[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2021, 41(5): 1436-1447.
28 Zhang L, Wang S, Sun H, et al. Research on dual mode target detection algorithm for embedded platform[J]. Complexity, 2021, 2021(8): 1-8.
29 Liu C, Su X Y, Wu J, et al. Method for detecting surface defects of runner blades of large hydraulic turbines based on improved real-time lightweight net-work[J]. Journal of Physics Conference Series, 2021, 1955(1): 714-724.
30 Shen C, Zhao X, Liu Z, et al. Joint vehicle detection and distance prediction via monocular depth estimation[J]. IET Intelligent Transport Systems, 2020, 14(7): 753-763.
31 Zhe T, Huang L, Wu Q, et al. Inter-vehicle distance estimation method based on monocular vision using 3D detection[J]. IEEE Transactions on Vehicular Technology, 2020, 69(5): 4907-4919.
[1] 何杰,张长健,严欣彤,王琛玮,叶云涛. 基于微观动力学参数的高速公路特征路段事故风险分析[J]. 吉林大学学报(工学版), 2024, 54(1): 162-172.
[2] 王春华,李恩泽,肖敏. 多特征融合和孪生注意力网络的高分辨率遥感图像目标检测[J]. 吉林大学学报(工学版), 2024, 54(1): 240-250.
[3] 薛珊,张亚亮,吕琼莹,曹国华. 复杂背景下的反无人机系统目标检测算法[J]. 吉林大学学报(工学版), 2023, 53(3): 891-901.
[4] 陶博,颜伏伍,尹智帅,武冬梅. 基于高精度地图增强的三维目标检测算法[J]. 吉林大学学报(工学版), 2023, 53(3): 802-809.
[5] 贺宜,孙昌鑫,彭建华,吴超仲,江亮,马明. 电动载货三轮车风险行为及影响因素分析[J]. 吉林大学学报(工学版), 2023, 53(2): 413-420.
[6] 潘恒彦,张文会,梁婷婷,彭志鹏,高维,王永岗. 基于MIMIC与机器学习的出租车驾驶员交通事故诱因分析[J]. 吉林大学学报(工学版), 2023, 53(2): 457-467.
[7] 朱洁玉,马艳丽. 合流区域多车交互风险实时评估方法[J]. 吉林大学学报(工学版), 2022, 52(7): 1574-1581.
[8] 高明华,杨璨. 基于改进卷积神经网络的交通目标检测方法[J]. 吉林大学学报(工学版), 2022, 52(6): 1353-1361.
[9] 彭涛,方锐,刘兴亮,王海玮,庞彦伟,许洪国,刘福聚,王涛. 基于典型事故场景的雪天高速换道自动驾驶策略[J]. 吉林大学学报(工学版), 2022, 52(11): 2558-2567.
[10] 曲优,李文辉. 基于锚框变换的单阶段旋转目标检测方法[J]. 吉林大学学报(工学版), 2022, 52(1): 162-173.
[11] 潘德伦,冀隽,张跃进. 基于运动矢量空间编码的视频监控动态目标检测方法[J]. 吉林大学学报(工学版), 2021, 51(4): 1370-1374.
[12] 陈雪云,许韬,黄小巧. 基于条件生成对抗网络的医学细胞图像生成检测方法[J]. 吉林大学学报(工学版), 2021, 51(4): 1414-1419.
[13] 金立生,郭柏苍,王芳荣,石健. 基于改进YOLOv3的车辆前方动态多目标检测算法[J]. 吉林大学学报(工学版), 2021, 51(4): 1427-1436.
[14] 兰凤崇,李继文,陈吉清. 面向动态场景复合深度学习与并行计算的DG-SLAM算法[J]. 吉林大学学报(工学版), 2021, 51(4): 1437-1446.
[15] 袁哲明,袁鸿杰,言雨璇,李钎,刘双清,谭泗桥. 基于深度学习的轻量化田间昆虫识别及分类模型[J]. 吉林大学学报(工学版), 2021, 51(3): 1131-1139.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!