吉林大学学报(工学版) ›› 2025, Vol. 55 ›› Issue (6): 2003-2014.doi: 10.13229/j.cnki.jdxbgxb.20230939

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

基于深度学习的高速公路小目标检测算法

徐慧智1(),郝东升1,徐小婷2,蒋时森1   

  1. 1.东北林业大学 土木与交通学院,哈尔滨 150040
    2.浙江公路技师学院 试验检测中心,杭州 310007
  • 收稿日期:2023-09-05 出版日期:2025-06-01 发布日期:2025-07-23
  • 作者简介:徐慧智(1977-),男,副教授,博士.研究方向:交通环境感知理论与方法.E-mail:stedu@126.com
  • 基金资助:
    国家自然科学基金青年科学基金项目(62371170)

Expressway small object detection algorithm based on deep learning

Hui-zhi XU1(),Dong-sheng HAO1,Xiao-ting XU2,Shi-sen JIANG1   

  1. 1.School of Civil Engineering and Transportation,Northeast Forestry University,Harbin 150040,China
    2.Test and Inspection Center,Zhejiang Highway Technician College,Hangzhou 310007,China
  • Received:2023-09-05 Online:2025-06-01 Published:2025-07-23

摘要:

针对高速公路路侧摄像头拍摄的图像中,远端的行人和车辆目标小、实时检测难问题,提出一种改进的目标检测算法YOLOv5s-3S-4PDH。首先,采用Shufflenetv2-Stem-SPPF网络结构,提高模型的运行速度;其次,引入加速归一化加权融合特征图和160×160小目标检测层,优化小目标检测性能;然后,引入改进的解耦头机制,提高小目标检测的定位和分类精度;最后,采用Focal EIoU作为定位损失函数,加快模型训练的收敛速度。在自建行人和车辆数据集上进行对比实验,结果表明:该算法与YOLOv5s基准网络算法相比,计算量和参数量分别减少了10.1%和24.6%,检测速度和精度分别提高了15.4%和2.1%;在VisDrone2019数据集上进行的迁移学习实验表明,该算法对所有目标类别的平均精度高于YOLOv5s。YOLOv5s-3S-4PDH算法在满足小目标检测实时性与精度的同时,也具备泛化能力。

关键词: 交通运输规划与管理, 高速公路, 目标检测, 深度学习

Abstract:

To address the challenging issue of real-time detection of small distant pedestrians and vehicles in images captured by roadside cameras on expressways, an improved object detection algorithm YOLOv5s-3S-4PDH was proposed. Firstly, the Shufflenetv2-Stem-SPPF network structure was used to improve the running speed of the algorithm. Secondly, the accelerated normalized weighted fusion feature map and the 160×160 small object detection layer were introduced to optimize the performance of small object detection; Then, the improved decoupling head mechanism was introduced to improve the localization and classification accuracy of small object detection. Finally, Focal EIoU was used as the localization loss function of the algorithm to accelerate the training convergence speed of the algorithm. The results show that: compared with the YOLOv5s on the self-built pedestrian and vehicle dataset, the computation and parameter amount of the proposed algorithm are reduced by 10.1% and 24.6%, respectively, and the detection speed and accuracy are increased by 15.4% and 2.1%, respectively; Transfer learning experiment on the VisDrone2019 dataset shows that the proposed algorithm has better average precision for all categories. The proposed algorithm not only meets the real-time and accuracy requirements of small object detection, but also has generalization ability.

Key words: transportation planning and management, expressway, object detection, deep learning

中图分类号: 

  • U495

图1

改进YOLOv5s网络结构图"

图2

ShuffleNetv2的单元模块"

图3

Stem模块网络结构图"

图4

增加160×160层的多尺度特征融合网络"

图5

YOLOX的解耦头结构示意图"

图6

改进解耦头示意图"

图7

行人和车辆位置和宽高标准化分布"

图8

自建行人和车辆数据集"

表1

模型训练环境"

环境项环境规格
CPUInter(R) Core(TM) i9-12900
内存64 GB
显卡NVIDA RTX A4000
操作系统Windows 11
编程语言Python 3.9.10
深度学习框架Pytorch 1.12.1
集成开发环境Pycharm社区版2022.3.2
CUDA12.0
CUDNN8.3.2

表2

实验超参数"

超参数系数值
初始学习率0.01
循环学习率0.01
动量0.937
权重衰减系数0.000 5
预热学习轮数3.0
预热学习动量0.8
预热初始偏置学习率0.1
边界框回归损失系数0.05
分类损失系数0.5
置信损失系统1.0
有无物体BCE Loss中正样本权重1.0
分类BCE Loss中正样本权重1.0
IoU训练阈值0.2
Anchor的宽高比4.0

表3

不同主干网络对比实验结果"

模型主干网络AP@0.5/%mAP@0.5/%FPSParams/106FLOPs/109
行人车辆
YOLOv5sC3Net89.395.392.326.67.0215.8
YOLOv5s-1SShufflenetv283.093.988.550.23.347.3
YOLOv5s-2SShufflenetv2-Stem86.792.390.448.73.369.0
YOLOv5s-3SShufflenetv2-Stem-SPPF88.194.991.546.54.029.5

表4

消融和对比实验结果"

序号Focal EIoUBiFPN解耦头

增加160×160

检测层

AP@0.5/%mAP@0.5/%FPSParams/106FLOPs/109
行人车辆
YOLOv8s91.895.993.829.611.128.4
188.194.991.546.54.029.5
2??88.3(+0.2)95.2(+0.3)91.8(+0.3)45.44.029.5
3????88.6(+0.3)95.3(+0.1)91.9(+0.1)40.14.1710.2
4??????90.1(+0.5)95.4(+0.1)92.7(+0.8)38.64.4010.9
5????????93.1(+3.0)95.5(+0.1)94.4(+1.7)30.75.3114.2

表5

算法性能对比 (%)"

算法mAP@0.5FPSParamsFLOPs
YOLOv5s+2.1+15.4-24.6-10.1
YOLOv8s+0.6+3.7-52.2-50.0

图9

模型损失图"

图10

模型评价指标图"

图11

VisDrone 2019数据集示例"

表6

迁移学习实验结果"

种类YOLOv5sYOLOv5s-3S-4DPH
P/%R/%AP@0.5/%P/%R/%AP@0.5/%
pedestrian48.539.740.756.441.745.6
people45.235.633.549.835.236.4
bicycle29.116.913.829.016.714.5
car64.073.574.467.280.981.1
van47.536.936.850.741.842.2
truck55.330.932.247.031.632.3
tricycle40.723.119.944.225.124.6
awning-tricycle24.011.610.426.715.413.3
bus61.143.846.862.550.253.3
motor48.043.239.153.745.344.6
mAP@0.5/%34.838.8
mAP@0.5:0.95/%19.222.1

图12

不同算法检测部分效果对比图"

[1] 梁鸿, 王庆玮, 张千, 等. 小目标检测技术研究综述[J]. 计算机工程与应用, 2021, 57(1): 17-28.
Liang Hong, Wang Qing-wei, Zhang Qian, et al. Small object detection technology: a review[J]. Computer Engineering and Applications, 2021, 57(1): 17-28.
[2] Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition[J]. Computer Science, 2014, 21(8): 91-103.
[3] Krizhevsky A, Sutskever I, Hinton E G. ImageNet classification with deep convolutional neural networks[J]. Communications of the ACM, 2017, 60(6): 84-90.
[4] 王芋人, 武德安. 一种提高小目标检测准确率的数据增强方法[J]. 激光杂志, 2021, 42(11): 41-45.
Wang Yu-ren, Wu De-an. Data augmentation method for improving the accuracy of small target detection[J]. Laser Journal, 2021, 42(11): 41-45.
[5] 杨慧剑, 孟亮. 基于改进的YOLOv5的航拍图像中小目标检测算法[J]. 计算机工程与科学, 2023, 45(6): 1063-1070.
Yang Hui-jian, Meng Liang. A small target detection algorithm based on improved YOLOv5 in aerial image[J]. Computer Engineering & Science, 2023, 45(6): 1063-1070.
[6] Ren S Q, He K M, 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.
[7] Singh B, Davis L S. An analysis of scale invariance in object detection-SNIP[C]∥IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 2018:3578-3587.
[8] Zhang S, Zhu X, Lei Z, et al. Faceboxes:a CPU real-time face detector with high accuracy[C]∥IEEE International Joint Conference on Biometrics, Denver, USA, 2017: 1-9.
[9] 王建中, 王加乐, 于子博, 等. 士兵和装甲车目标多尺度检测方法[J]. 北京理工大学学报, 2023, 43(2): 203-212.
Wang Jian-zhong, Wang Jia-le, Yu Zi-bo, et al. Multi-scale detection method for soldier and armored vehicle objects[J]. Transactions of Beijing Institute of Technology, 2023, 43(2): 203-212.
[10] 谌雨章, 黄逸姿, 张钧涵. 基于多速率空洞卷积的多尺度水下小目标检测[J]. 计算机工程, 2023, 49(6): 257-264.
Chen Yu-zhang, Huang Yi-zi, Zhang Jun-han. Multi-scale underwater small object detection based on multi-rate dilated convolution[J]. Computer Engineering, 2023, 49(6): 257-264.
[11] 李成豪, 张静, 胡莉, 等. 基于多尺度感受野融合的小目标检测算法[J]. 计算机工程与应用, 2022, 58(12): 177-182.
Li Cheng-hao, Zhang Jing, Hu Li, et al. Small object detection algorithm based on multiscale receptive field fusion[J]. Computer Engineering and Applications, 2022, 58(12): 177-182.
[12] 董亚盼, 高陈强, 谌放, 等. 基于注意力机制的红外小目标检测方法[J]. 重庆邮电大学学报: 自然科学版, 2023, 35(2): 219-226.
Dong Ya-pan, Gao Chen-qiang, Chen Fang, et al. Infrared small target detection method based on attention mechanism[J]. Journal of Chongqing University of Posts and Telecommunications (Natural Science Edition), 2023, 35(2): 219-226.
[13] Qu J S, Su C, Zhang Z W, et al. Dilated convolution and feature fusion SSD network for small object detection in remote sensing images[J]. IEEE Access, 2020, 8: 82832-82843.
[14] Li K, Cheng G, Bu S, et al. Rotation-insensitive and context-augmented object detection in remote sensing images[J]. IEEE Transactions on Geoscience and Remote Sensing, 2017, 56(4): 2337-2348.
[15] Redmon J, Divvala S, Girshick R, et al. You only look once: unified, real-time object detection[C]∥IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, USA, 2016: 779-788.
[16] Redmon J, Farhadi A. YOLO9000: better, faster, stronger[C]∥IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, USA, 2017: 6517-6525.
[17] Redmon J, Farhadi A. YOLOv3: an incremental improvement[C]∥IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 2018:1-6.
[18] Bochkovskiy A, Wang C Y, Liao H. YOLOv4: optimal speed and accuracy of object detection[DB/OL].[2023-06-05].
[19] Liu S, Qi L, Qin H, et al. Path aggregation network for instance segmentation[C]∥IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 2018: 8759-8768.
[20] Ma N, Zhang X, Zheng H T, et al. ShuffleNet: an extremely efficient convolutional neural network for mobile devices[C]∥IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 2018: 116-131.
[21] Yu C, Gao C, Wang J, et al. BiSeNet V2: bilateral network with guided aggregation for real-time semantic segmentation[J]. International Journal of Computer Vision, 2021, 129: 3051-3068.
[22] 陈奎, 刘晓, 贾立娇, 等. 基于轻量化网络与增强多尺度特征融合的绝缘子缺陷检测[J].高压技术,2024(3):1289-1300.
Chen Kui, Liu Xiao, Jia Li-jiao, et al. Insulator defect detection based on lightweight network and enhanced multi-scale feature fusion[J].高压技术,2024(3):1289-1300.
[23] Tan M, Pang R, Le A V. EfficientDet: scalable and efficient object detection[C]∥IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2020:10778-10787.
[24] 高新波, 莫梦竟成, 汪海涛, 等. 小目标检测研究进展[J]. 数据采集与处理, 2021, 36(3):391-417.
Gao Xin-bo, Jing-cheng Momeng, Wang Hai-tao, et al. Recent advances in small object detection[J]. Journal of Data Acquisition and Processing, 2021, 36(3):391-417.
[25] Lin T Y, Dollar P, Girshick R, et al. Feature pyramid networks for object detection[C]∥IEEE Conference on Computer Vision and Pattern Recognition Honolulu, USA, 2017: 2117-2125.
[26] Song G, Liu Y, Wang X. Revisiting the sibling head in object detector[C]∥IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2020: 11560-11569.
[27] Ge Z, Liu S, Wang F, et al. YOLOX: exceeding YOLO series in 2021[DB/OL]. [2023-06-10].
[28] Zhang Y F, Ren W, Zhang Z, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506: 146-157.
[29] 徐慧智, 宋爱秋, 武笑宇. 基于均匀设计的船舶目标检测深度学习模型训练方法[J]. 科学技术与工程, 2022, 22(25): 11241-11249.
Xu Hui-zhi, Song Ai-qiu, Wu Xiao-yu. Training method of deep learning to ship target detection based on uniform design[J]. Science Technology and Engineering, 2022, 22(25) : 11241-11249.
[30] 冒国韬, 邓天民, 于楠晶. 基于多尺度分割注意力的无人机航拍图像目标检测算法[J]. 航空学报, 2023, 44(5): 273-283.
Mao Guo-tao, Deng Tian-min, Yu Nan-jing. Object detection in UAV images based on multiscale split attention[J]. Acta Aeronautica et Astronautica Sinica, 2023, 44(5): 273-283.
[1] 何庆龄,裴玉龙,侯琳,刘静,潘胜. 混合策略改进WOA-BiLSTM的快速路出口匝道车速预测[J]. 吉林大学学报(工学版), 2025, 55(6): 2038-2049.
[2] 张汝波,常世淇,张天一. 基于深度学习的图像信息隐藏方法综述[J]. 吉林大学学报(工学版), 2025, 55(5): 1497-1515.
[3] 李健,刘欢,李艳秋,王海瑞,关路,廖昌义. 基于THGS算法优化ResNet-18模型的图像识别[J]. 吉林大学学报(工学版), 2025, 55(5): 1629-1637.
[4] 田丽,贾煜辉. 改进YOLOv5s算法的高光谱遥感图像目标检测[J]. 吉林大学学报(工学版), 2025, 55(5): 1742-1748.
[5] 文斌,丁弈夫,杨超,沈艳军,李辉. 基于自选择架构网络的交通标志分类算法[J]. 吉林大学学报(工学版), 2025, 55(5): 1705-1713.
[6] 孟祥海,王国锐,张明扬,田毕江. 基于选择集成的山区高速事故预测模型[J]. 吉林大学学报(工学版), 2025, 55(4): 1298-1306.
[7] 李振江,万利,周世睿,陶楚青,魏巍. 基于时空Transformer网络的隧道交通运行风险动态辨识方法[J]. 吉林大学学报(工学版), 2025, 55(4): 1336-1345.
[8] 吴文静,邓淳淳,贾洪飞,孙舒航. 内涝影响下路网畅通可靠度评估及关键路段识别[J]. 吉林大学学报(工学版), 2025, 55(4): 1250-1257.
[9] 岳昊,常笑,刘建业,曲秋莳. 引入车辆窗的定制公交线路优化[J]. 吉林大学学报(工学版), 2025, 55(4): 1266-1274.
[10] 郑利民,陈双,李刚. YOLOv5网络算法下交通监控视频违章车辆多目标检测[J]. 吉林大学学报(工学版), 2025, 55(2): 693-699.
[11] 赵孟雪,车翔玖,徐欢,刘全乐. 基于先验知识优化的医学图像候选区域生成方法[J]. 吉林大学学报(工学版), 2025, 55(2): 722-730.
[12] 马书红,张俊杰,陈西芳,廖国美. 利用出租车时序数据识别城市功能区[J]. 吉林大学学报(工学版), 2025, 55(2): 603-613.
[13] 高天洋,胡大伟,姜瑞森,吴雪,刘慧甜. 基于模块化车辆的区域灵活接驳公交线路优化[J]. 吉林大学学报(工学版), 2025, 55(2): 537-545.
[14] 才华,郑延阳,付强,王晟宇,王伟刚,马智勇. 基于多尺度候选融合与优化的三维目标检测算法[J]. 吉林大学学报(工学版), 2025, 55(2): 709-721.
[15] 李昱燃,汪飞,朱才华,韩飞,李岩. 污染天气居民通勤模式选择影响因素的链式效用[J]. 吉林大学学报(工学版), 2025, 55(2): 577-590.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 唐新星,赵丁选,黄海东,艾学忠,冯石柱 . 改进的工程机器人立体视觉标定方法[J]. 吉林大学学报(工学版), 2007, 37(02): 391 -0395 .
[2] 潘冠宇,刘大有,窦全胜,刘晓华 . PSO方法的收敛性及基于微分演化的参数确定策略[J]. 吉林大学学报(工学版), 2007, 37(04): 842 -845 .
[3] 赵艳菊;王太勇;徐跃;曹康平;张攀;邓辉 . 基于双CPU的便携式故障诊断仪的设计与开发[J]. 吉林大学学报(工学版), 2008, 38(03): 557 -0560 .
[4] 李洪萍,裴玉龙,杨中良 .

快速路自由流速度及其影响因素

[J]. 吉林大学学报(工学版), 2007, 37(04): 772 -776 .
[5] 李嘉菲,刘大有,于万钧 . 一种能发现重复任务的过程挖掘算法[J]. 吉林大学学报(工学版), 2007, 37(01): 106 -110 .
[6] 谢哲东,赵继,张雷 . 微小研抛机器人动力学仿真分析与运动实验[J]. 吉林大学学报(工学版), 2008, 38(02): 349 -0353 .
[7] 刘晓丽,方建勇,蒋蔓,李志英,刘凤岐 . 透闪石/尼龙1010复合材料
等温结晶动力学研究
[J]. 吉林大学学报(工学版), 2008, 38(02): 298 -0302 .
[8] 杨树凯,宋传学,安晓娟,蔡章林 . 用虚拟样机方法分析悬架衬套弹性对
整车转向特性的影响
[J]. 吉林大学学报(工学版), 2007, 37(05): 994 -0999 .
[9] 于国飞, , , 孔德文 , 马士泽 , 吴光强. 应用ADAMS/CAR二次开发模块[J]. 吉林大学学报(工学版), 2005, 35(06): 582 -0586 .
[10] 代磊磊,姜桂艳,裴玉龙 . 饱和信号交叉口排队长度预测[J]. 吉林大学学报(工学版), 2008, 38(06): 1287 -1290 .