留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

基于深度学习的交叉口流量统计策略

张韡,  陈靖升,  杨伟森,  马宇飞

张韡, 陈靖升, 杨伟森, 马宇飞. 基于深度学习的交叉口流量统计策略[J]. 交通运输工程学报, 2026, 26(10): 211-223. doi: 10.19818/j.cnki.1671-1637.2026.125
引用本文: 张韡, 陈靖升, 杨伟森, 马宇飞. 基于深度学习的交叉口流量统计策略[J]. 交通运输工程学报, 2026, 26(10): 211-223. doi: 10.19818/j.cnki.1671-1637.2026.125
ZHANG Wei, CHEN Jing-sheng, YANG Wei-sen, MA Yu-fei. Intersection traffic flow statistics strategy based on deep learning[J]. Journal of Traffic and Transportation Engineering, 2026, 26(10): 211-223. doi: 10.19818/j.cnki.1671-1637.2026.125
Citation: ZHANG Wei, CHEN Jing-sheng, YANG Wei-sen, MA Yu-fei. Intersection traffic flow statistics strategy based on deep learning[J]. Journal of Traffic and Transportation Engineering, 2026, 26(10): 211-223. doi: 10.19818/j.cnki.1671-1637.2026.125

基于深度学习的交叉口流量统计策略

doi: 10.19818/j.cnki.1671-1637.2026.125
基金项目: 

国家自然科学基金项目 51908054

详细信息
    作者简介:

    张韡(1973-),男,陕西佳县人,副教授,工学博士,E-mail:zhweijx@chd.edu.cn

  • 中图分类号: U495

Intersection traffic flow statistics strategy based on deep learning

Funds: 

National Natural Science Foundation of China 51908054

More Information
Article Text (Baidu Translation)
  • 摘要:

    为实现交叉路口交通流量同步统计,提出了一种基于深度学习的交叉口交通参与者流量统计策略。选取西安市5个典型交叉口进行无人机航拍视频采集,构建了适用于深度学习的数据集;基于YOLOv8原始网络结构,增加小目标检测层P2,以减少对小目标的漏检率,并融合BiFPN结构,提升了对小样本类别的识别效果,改进了检测模型,实现对交叉路口交通参与者的全类别检测;在此基础上,通过动态调整虚拟检测线,利用Trigger函数捕获车辆过线前后的状态变化实现计数,并建立映射表,对车辆目标流向进行判定,同时针对行人运动方向与车辆不同的特点,额外设定行人检测线,采用相同方法实现计数与流向判定,最终提出一种基于动态虚拟检测线的交叉口流量统计方法。研究结果表明:改进后的模型相比原始模型在mAP50指标上提升11.23%,行人检测的召回率与精度显著提高,同时提升了数据集中样本量较少客车的召回率;用本文流量统计方法对西安市另一交叉口流量进行试验验证,该方法对交叉口流量的平均统计精度为93.6%,重复计数率较固定检测线大幅下降,检测速度较其他方法提升至24帧·s-1,能够满足交叉口流量精准统计的需求。本文方法实现了对交叉口各交通参与者的计数与流向的高精度同步检测,可用于优化信号配时,缓解交通拥堵,提升交通安全。

     

  • 图  1  检测目标分类

    Figure  1.  Detection target classification

    图  2  不同类别的数据集分布

    Figure  2.  Dataset distribution of different categories

    图  3  改进YOLOv8网络结构

    Figure  3.  Modified YOLOv8 network structure

    图  4  固定检测线实际效果

    Figure  4.  Actual effect of fixed detection line

    图  5  自适应设置检测线

    Figure  5.  Adaptive detection line setting

    图  6  向量叉积

    Figure  6.  Vector cross product

    图  7  车辆过线前后状态

    Figure  7.  Vehicle status before and after crossing the line

    图  8  路口位置信息

    Figure  8.  Intersection location information

    图  9  全局变量状态信息

    Figure  9.  Global variable state information

    图  10  行人检测线

    Figure  10.  Pedestrian detection line

    图  11  模型训练结果

    Figure  11.  Model training results

    图  12  漏检情况

    Figure  12.  Cases of missed detection

    表  1  数据集对比

    Table  1.   Comparison of datasets

    数据集 目标类别数 分辨率 航拍高度 拍摄视角 覆盖交叉口各进口道 是否包含行人/非机动车 标注格式
    UAVDT 3 1 080p 多种高度 斜视 否 否 VOC
    DroneVehicle 2 4K 低空为主 斜视/俯视 否 否 专用格式
    VisDrone 2019 10 多种分辨率 多种高度 斜视 部分覆盖 是 VOC/COCO
    自建数据集 7 4K 90~120 m 俯视 是 是 YOLO
    下载: 导出CSV

    表  2  目标状态信息

    Table  2.   Target status information

    状态 身份编码 方向
    False/True 标号 in/out
    下载: 导出CSV

    表  3  车辆流向信息

    Table  3.   Vehicle flow information

    驶入方向/驶出方向 上 下 左 右
    上 掉头 直行 右转 左转
    下 直行 掉头 左转 右转
    左 左转 右转 掉头 直行
    右 右转 左转 直行 掉头
    下载: 导出CSV

    表  4  行人状态信息表

    Table  4.   Pedestrian status information table

    行人状态 身份编码 方向 穿过的线
    False/True 标号 顺/逆 上/下/左/右
    下载: 导出CSV

    表  5  基线模型与改进模型训练结果

    Table  5.   Training results of baseline model versus improved model

    类别 平均精度 召回率 mAP50或AP50 mAP50~95或AP50~90
    基线模型 改进模型 基线模型 改进模型 基线模型 改进模型 基线模型 改进模型
    全部 0.789 0.911 0.801 0.921 0.837 0.931 0.602 0.680
    轿车 0.924 0.965 0.963 0.974 0.976 0.984 0.756 0.787
    货车 0.795 0.921 0.833 0.935 0.895 0.933 0.673 0.722
    客车 0.435 0.924 0.829 0.857 0.772 0.860 0.712 0.746
    行人 0.783 0.873 0.325 0.796 0.510 0.879 0.122 0.368
    两轮车 0.861 0.877 0.770 0.917 0.808 0.901 0.421 0.521
    三轮车 0.718 0.829 0.892 0.969 0.907 0.967 0.595 0.666
    人行横道 0.986 0.987 0.996 0.996 0.994 0.990 0.948 0.949
    下载: 导出CSV

    表  6  消融试验结果

    Table  6.   Ablation study results

    类别 模型 检测框平均精度/% 召回率 AP50 AP50~90
    客车 YOLOv8n 43.5 0.829 0.772 0.712
    YOLOv8+BiFPN 98.9 0.784 0.852 0.750
    YOLOv8+P2 86.4 0.726 0.819 0.672
    YOLOv8+P2+BiFPN 92.4 0.857 0.860 0.746
    行人 YOLOv8n 78.3 0.325 0.510 0.122
    YOLOv8+BiFPN 78.1 0.522 0.658 0.194
    YOLOv8+P2 82.2 0.793 0.875 0.383
    YOLOv8+P2+BiFPN 87.3 0.796 0.879 0.368
    下载: 导出CSV

    表  7  路口流量流向检测结果

    Table  7.   Intersection flow direction detection result

    路口 行驶方向 轿车/veh 货车/veh 客车/veh 两轮车/veh 三轮车/veh 路口转向流量统计精度/% 行人/个
    检测 实测 检测 实测 检测 实测 检测 实测 检测 实测 检测 实测
    上方路口 左转 41 46 8 8 0 0 12 12 3 3 92.75 顺时针
    右转 45 49 8 10 0 0 8 8 9 10 90.91 15 17
    直行 77 79 0 0 0 0 24/25 24 11 11 98.25 逆时针
    掉头 0 0 0 0 0 0 0 0 0 0 100.00 12 12
    下方路口 左转 56 62 0 0 0 0 28 35 6 6 87.38 顺时针
    右转 49 51 0 0 0 0 25/26 28 10 12 92.31 18 20
    直行 86 87 0 0 0 0 15 18 10 12 94.87 逆时针
    掉头 5 5 0 0 0 0 0 0 0 0 100.00 35 37
    左侧路口 左转 57 60 0 0 0 0 30/31 36 9 11 89.72 顺时针
    右转 41 41 0 0 0 0 22 25 8 8 95.95 23 26
    直行 95 99 28 28 12 12 26/27 30 10 13 93.96 逆时针
    掉头 3 3 0 0 0 0 0 0 0 0 100.00 21 24
    右侧路口 左转 32 32 0 0 0 0 0 0 7 7 100.00 顺时针
    右转 20 22 8 8 0 0 24 24 3 3 96.49 12 12
    直行 140 143 63 68 12 12 9 10 10 11 95.90 逆时针
    掉头 4 4 0 0 0 0 0 0 0 0 100.00 20 25
    总流量 751 783 115 122 24 24 223 250 96 107 93.60 156 173
    注:数据中“24/25”,后者为包含重复计数数据,前者为去除重复计数数据;转向流量统计精度为各路口除行人外各流向数据去除重复计数后的检测值之和与实测数据之和的比值;顺时针、逆时针为行人在各个路口的行走方向。
    下载: 导出CSV

    表  8  动态检测线重复计数率

    Table  8.   Repetition counting rate of dynamic detection line

    类型 轿车 货车 客车 行人 两轮车 三轮车
    实际计数/veh 751 115 24 156 223 96
    总计数/veh 751 115 24 156 226 96
    重复计数率/% 0 0 0 0 1.33 0
    下载: 导出CSV

    表  9  模型性能指标

    Table  9.   Model performance indicators

    指标类型 MOTA MOTP IDF1 召回率 精度
    数值 0.799 0.289 0.859 0.829 0.973
    下载: 导出CSV

    表  10  固定检测线重复计数率

    Table  10.   Repetition counting rate of fixed detection line

    类型 轿车 货车 客车 行人 两轮车 三轮车
    实际计数/veh 753 117 23 165 220 98
    总计数/veh 765 120 24 165 225 101
    重复计数率/% 1.57 2.5 4.16 0 2.22 2.97
    下载: 导出CSV

    表  11  不同流量统计方法对比

    Table  11.   Comparison of different traffic flow counting methods

    试验方法 算法实现 统计目标类别 检测精度/% 检测速度/(帧·s-1)
    区域进入+轨迹拟合[21] 背景差法+卡尔曼滤波器 1 84.00
    组合虚拟检测框[23] 改进YOLOv4+DeepSORT 3 97.05 15
    轨迹拟合及转弯角度[25] YOLOv5+DeepSORT 3 92.90
    本文方法 改进YOLOv8+ByteTrack 6 93.60 24
    下载: 导出CSV
  • [1] 宋浪, 安实, 俞山川, 等. 设置借道左转车道的排阵式交叉口组合设计方法[J]. 交通运输工程学报, 2025, 25(1): 295-310. doi: 10.19818/j.cnki.1671-1637.2025.01.021

    SONG Lang, AN Shi, YU Shan-chuan, et al. Combination design method of tandem intersections with contraflow left-turn lane[J]. Journal of Traffic and Transportation Engineering, 2025, 25(1): 295-310. doi: 10.19818/j.cnki.1671-1637.2025.01.021
    [2] 赵红星, 王钰捷, 聂江龙, 等. 元胞推演多步决策的交叉口深度强化学习信号连续控制[J]. 交通运输工程学报, 2025, 25(4): 296-310. doi: 10.19818/j.cnki.1671-1637.2025.04.021

    ZHAO Hong-xing, WANG Yu-jie, NIE Jiang-long, et al. Deep reinforcement learning signal continuous control of intersection based on cellular deduction multi-step decision mechanism[J]. Journal of Traffic and Transportation Engineering, 2025, 25(4): 296-310. doi: 10.19818/j.cnki.1671-1637.2025.04.021
    [3] 张印辉, 计凯, 何自芬, 等. 注意力引导的多尺度红外行人车辆实时检测[J]. 红外与激光工程, 2024, 53(5): 20240063.

    ZHANG Yin-hui, JI Kai, HE Zi-fen, et al. Attention-guided multi-scale infrared real-time detection of pedestrian and vehicle[J]. Infrared and Laser Engineering, 2024, 53(5): 20240063.
    [4] DU K, GUO X P, LI L T, et al. Traffic prediction in time series, spatial temporal, and OD data: A systematic survey[J]. Journal of Traffic and Transportation Engineering (English Edition), 2025, 12(3): 666-700. doi: 10.1016/j.jtte.2025.03.001
    [5] XIE Z M, RAJAMANI R. Vehicle counting and maneuver classification with support vector machines using low-density flash lidar[J]. IEEE Transactions on Vehicular Technology, 2022, 71(1): 86-97. doi: 10.1109/TVT.2021.3125919
    [6] MANDELLOS N A, KERAMITSOGLOU I, KIRANOUDIS C T. A background subtraction algorithm for detecting and tracking vehicles[J]. Expert Systems with Applications, 2011, 38(3): 1619-1631. doi: 10.1016/j.eswa.2010.07.083
    [7] 周经美, 赵祥模, 程鑫, 等. 结合光流法的车辆运动估计优化方法[J]. 哈尔滨工业大学学报, 2016, 48(9): 65-69.

    ZHOU Jing-mei, ZHAO Xiang-mo, CHENG Xin, et al. Optical flow-based optimization method of vehicle motion estimation[J]. Journal of Harbin Institute of Technology, 2016, 48(9): 65-69.
    [8] GIRSHICK R, DONAHUE J, DARRELL T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]//IEEE. 2014 IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE, 2014: 580-587.
    [9] REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: Unified, real-time object detection[C]//IEEE. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2016: 779-788.
    [10] GOMAA A, ABDELWAHAB M M, ABO-ZAHHAD M, et al. Robust vehicle detection and counting algorithm employing a convolution neural network and optical flow[J]. Sensors, 2019, 19(20): 4588. doi: 10.3390/s19204588
    [11] XIAO W J, LIU J F. Application of vision sensing technology in urban intelligent traffic control system[C]//IEEE. 2018 4th International Conference on Computer and Technology Applications (ICCTA). New York: IEEE, 2018: 74-77.
    [12] FEDOROV A, NIKOLSKAIA K, IVANOV S, et al. Traffic flow estimation with data from a video surveillance camera[J]. Journal of Big Data, 2019, 6(1): 73. doi: 10.1186/s40537-019-0234-z
    [13] 孔方方, 宋蓓蓓. 改进YOLOv3的全景交通监控目标检测[J]. 计算机工程与应用, 2020, 56(8): 20-25.

    KONG Fang-fang, SONG Bei-bei. Improved YOLOv3 panoramic traffic monitoring target detection[J]. Computer Engineering and Applications, 2020, 56(8): 20-25.
    [14] 赖见辉, 王扬, 罗甜甜, 等. 基于YOLO_V3的侧视视频交通流量统计方法与验证[J]. 公路交通科技, 2021, 38(1): 135-142.

    LAI Jian-hui, WANG Yang, LUO Tian-tian, et al. A YOLO_V3-based road-side video traffic volume counting method and verification[J]. Journal of Highway and Transportation Research and Development, 2021, 38(1): 135-142.
    [15] 马永杰, 马芸婷, 程时升, 等. 基于改进YOLOv3模型与Deep-SORT算法的道路车辆检测方法[J]. 交通运输工程学报, 2021, 21(2): 222-231. doi: 10.19818/j.cnki.1671-1637.2021.02.019

    MA Yong-jie, MA Yun-ting, CHENG Shi-sheng, et al. Road vehicle detection method based on improved YOLOv3 model and Deep-SORT algorithm[J]. Journal of Traffic and Transportation Engineering, 2021, 21(2): 222-231. doi: 10.19818/j.cnki.1671-1637.2021.02.019
    [16] 李永上, 马荣贵, 张美月. 改进YOLOv5s+DeepSORT的监控视频车流量统计[J]. 计算机工程与应用, 2022, 58(5): 271-279.

    LI Yong-shang, MA Rong-gui, ZHANG Mei-yue. Traffic monitoring video vehicle volume statistics method based on improved YOLOv5s+DeepSORT[J]. Computer Engineering and Applications, 2022, 58(5): 271-279.
    [17] 陈婷, 姚大春, 高涛, 等. 基于PReNet和YOLOv4融合的雨天交通目标检测网络[J]. 交通运输工程学报, 2022, 22(3): 225-237. doi: 10.19818/j.cnki.1671-1637.2022.03.018

    CHEN Ting, YAO Da-chun, GAO Tao, et al. A fused network based on PReNet and YOLOv4 for traffic object detection in rainy environment[J]. Journal of Traffic and Transportation Engineering, 2022, 22(3): 225-237. doi: 10.19818/j.cnki.1671-1637.2022.03.018
    [18] 刘展威, 黄鹤飞, 许广路. 基于YOLOv8n+StrongSORT的车流量检测方法[J]. 计算机技术与发展, 2025, 35(9): 156-164.

    LIU Zhan-wei, HUANG He-fei, XU Guang-lu. Traffic flow detection method based on YOLOv8n+StrongSORT[J]. Computer Technology and Development, 2025, 35(9): 156-164.
    [19] LIU H L, MA Y J, JIANG H, et al. SPR-YOLO: A traffic flow detection algorithm for fuzzy scenarios[J]. Arabian Journal for Science and Engineering, 2025, 50(19): 15843-15856. doi: 10.1007/s13369-025-09997-9
    [20] XU S Z, CUI K D. YOLO-EFM: Efficient traffic flow monitoring algorithm with enhanced multi-level information fusion[J]. Results in Engineering, 2025, 26: 105545. doi: 10.1016/j.rineng.2025.105545
    [21] SHOKROLAH SHIRAZI M, MORRIS B T. Vision-based turning movement monitoring: count, speed & waiting time estimation[J]. IEEE Intelligent Transportation Systems Magazine, 2016, 8(1): 23-34. doi: 10.1109/MITS.2015.2477474
    [22] 陈秀锋, 吴阅晨, 邴其春, 等. 基于类锚虚拟线圈的多流向车流量检测算法[J]. 交通运输系统工程与信息, 2021, 21(2): 51-57.

    CHEN Xiu-feng, WU Yue-chen, BING Qi-chun, et al. A multi-direction traffic flow statistics algorithm based on anchor-like visual loops[J]. Journal of Transportation Systems Engineering and Information Technology, 2021, 21(2): 51-57.
    [23] 颜洵. 高空场景下的交叉路口车流量统计算法研究[D]. 宜昌: 三峡大学, 2021: 3.

    YAN Xun. Research on traffic statistics algorithms at intersections in high-altitude scenes[D]. Yichang: China Three Gorges University, 2021: 3.
    [24] 张敬, 张林, 王长伟. 基于航拍视频的交叉口车流量统计方法研究[J]. 计算机仿真, 2020, 37(12): 117-121.

    ZHANG Jing, ZHANG Lin, WANG Chang-wei. Research on statistical method of traffic flow at intersection based on aerial video[J]. Computer Simulation, 2020, 37(12): 117-121.
    [25] 张韡, 李永, 刘涛, 等. 基于深度学习的转弯车流量检测方法[J]. 科学技术与工程, 2025, 25(4): 1701-1710.

    ZHANG Wei, LI Yong, LIU Tao, et al. Turning traffic flow detection method based on deep learning[J]. Science Technology and Engineering, 2025, 25(4): 1701-1710.
    [26] TAN M X, PANG R M, LE Q V. EfficientDet: scalable and efficient object detection[C]//IEEE. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2020: 10778-10787.
    [27] 罗瑞琪, 张兴宇, 刘岩. 交叉口行人过街溢出轨迹分析及优化方法研究[J]. 现代交通技术, 2020, 17(5): 52-56.

    LUO Rui-qi, ZHANG Xing-yu, LIU Yan. Study on pedestrian trajectory analysis and optimizing method for crossing overflow[J]. Modern Transportation Technology, 2020, 17(5): 52-56.
    [28] 张帅奇. 基于交叉口行人过街特性的行人轨迹预测及车辆路径规划研究[D]. 西安: 长安大学, 2024: 9.

    ZHANG Shuai-qi. Research on pedestrian trajectory prediction and vehicle path planning based on crosswalk pedestrian behavior[D]. Xi'an: Chang'an University, 2024: 9.
    [29] HOSSAIN M S, BETTS J M, PAPLINSKI A P. Dual focal loss to address class imbalance in semantic segmentation[J]. Neurocomputing, 2021, 462: 69-87. doi: 10.1016/j.neucom.2021.07.055
    [30] LIN T Y, GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(2): 318-327. doi: 10.1109/TPAMI.2018.2858826
    [31] ZHANG Y F, SUN P Z, JIANG Y, et al. ByteTrack: multi-object tracking by associating every detection box[C]//Springer. Computer Vision - ECCV 2022. Cham: Springer, 2022: 1-21.
  • 加载中
图(12) / 表(11)
计量
  • 文章访问数:  7
  • HTML全文浏览量:  4
  • PDF下载量:  1
  • 被引次数: 0
出版历程
  • 收稿日期:  2025-08-10
  • 录用日期:  2025-11-27
  • 修回日期:  2025-11-18
  • 刊出日期:  2026-10-28

目录

    /

    返回文章
    返回