Automated detection and analysis technology for traffic conflicts based on unmanned aerial vehicle video data
-
摘要: 为实现交通冲突的快速自动化提取,提出了一种基于无人机视频的交通冲突检测与提取方法;建立了融合图像特征点提取和特征点匹配算法的视频稳像方法,以消除无人机飞行抖动导致的帧间平移或旋转,保障车辆轨迹提取的稳定性,构建了基于YOLOv8-OBB模型的旋转车辆目标检测算法,并结合ByteTrack目标跟踪方法,融合高置信度与低置信度检测框,实现了车辆轨迹的连续提取,采用了Savitzky-Golay滤波器对轨迹降噪平滑,保留轨迹原始特征并消除噪声平滑处理;建立了基于车辆轨迹的交通冲突检测和交通冲突类型判别方法,采用基于车辆边界框的方法计算TTC、PET、MTTC冲突指标,以提高冲突检测精度,通过合理性验证机制剔除无效冲突,依据冲突时刻车辆航向角及预计碰撞位置区分角度、侧向、追尾冲突;以南京3处信号交叉口为例进行了实例分析。研究结果表明:交通冲突自动检测方法能够快速准确从视频中提取交通冲突,交通冲突检测准确率达到92%,视频稳像、轨迹提取,冲突提取3种算法平均处理速度分别为3.64、5.38、250帧·s-1,满足大规模视频数据快速分析需求。研究结果有助于提升交通冲突数据质量,为基于交通冲突的交通安全研究提供了可靠的数据支持,展现出广泛的应用潜力。Abstract: To achieve rapid and automated extraction of traffic conflicts, a traffic conflict detection and extraction method based on unmanned aerial vehicle (UAV) video was proposed. A video stabilization method integrating feature point extraction and matching algorithms was developed to eliminate frame-to-frame translation and rotation caused by UAV flight jitter and to ensure stable vehicle trajectory extraction. A rotated vehicle detection algorithm based on the YOLOv8-OBB model was developed and combined with the ByteTrack tracking method, where high- and low-confidence detection boxes were fused to enable continuous extraction of vehicle trajectories. The Savitzky-Golay filter was adopted to denoise and smooth the trajectories, thus retaining the original features of the trajectories and eliminating noise. A traffic conflict detection and classification method based on vehicle trajectories was developed, using bounding box-based approaches to calculate TTC, PET, and MTTC indicators and improve detection accuracy. Invalid conflicts were eliminated through a rationality verification mechanism, and angular conflicts, lateral conflicts, and rear-end conflicts were distinguished according to the vehicle heading angle and the predicted collision position at the time of conflict. A case study was conducted at three signalized intersections in Nanjing. The results show that traffic conflicts can be extracted rapidly and accurately from videos by the automatic traffic conflict detection method, with a detection accuracy of 92%. The average processing speeds of the video stabilization algorithm, trajectory extraction algorithm, and conflict extraction algorithm are 3.64 frames per second, 5.38 frames per second, and 250 frames per second, respectively, which meet the requirements for rapid analysis of large-scale video data. The results help improve the quality of traffic conflict data and provide reliable data support for traffic safety research based on traffic conflicts, demonstrating broad application potential.
-
表 1 目标检测模型对比
Table 1. Comparison of object detection models
模型 精确度/% 召回率/% 平均精度均值/% 参数量/106 Faster R-CNN 74.3 79.5 77.1 41.1 RetinaNet 85.1 83.6 86.1 36.2 YOLOv8 90.0 88.1 92.7 3.2 YOLOv8-OBB (本文算法) 91.7 89.9 94.3 3.1 表 2 多目标追踪算法对比
Table 2. Performance comparison of multi-object tracking algorisms
模型 MOTA IDF1 IDSW SORT 0.858 0.876 24 DeepSORT 0.904 0.913 15 Bot-SORT 0.925 0.957 8 ByteTrack(本文算法) 0.931 0.964 8 表 3 车辆轨迹文件示例
Table 3. Illustration of vehicle trajectories
帧数 车辆类别 车辆编号 中心点横坐标 中心点纵坐标 检测框长度 检测框宽度 检测框角度 1 0 31 2 295.92 1 398.25 95.46 42.42 0.84 1 0 32 2 378.15 1 510.55 103.70 45.29 1.03 $ \vdots$ $ \vdots$ $ \vdots$ $ \vdots$ $ \vdots$ $ \vdots$ $ \vdots$ $ \vdots$ 300 0 31 1 743.46 1 584.89 103.83 46.93 2.19 300 0 32 1 952.85 1 438.40 101.11 43.74 2.96 表 4 交叉口流量统计
Table 4. Traffic flow statistics at the intersection
veh·h-1 进口车道 双龙大道-吉印大道 双龙大道-东南大学路 兴民路-彤天南路 东进口 直行 393 81 51 左转 184 105 223 右转 139 85 7 西进口 直行 584 152 60 左转 97 496 24 右转 328 11 48 南进口 直行 741 752 49 左转 423 5 35 右转 348 72 44 北进口 直行 1 036 961 77 左转 348 184 0 右转 255 420 9 表 5 冲突指标频次(比例)分布
Table 5. Distribution of the frequency (percentage) of conflict indexes
交通冲突指标 TTC PET MTTC 合计 0~1 s 1(0.3%) 507(32.2%) 4(0.4%) 233 1~2 s 48(14.4%) 663(42.1%) 66(6.8%) 282 2~3 s 132(39.5%) 287(18.2%) 346(35.9%) 309 3~4 s 153(45.8%) 119(7.6%) 549(56.9%) 371 表 6 各冲突类型判别准确率
Table 6. Accuracy of conflict type classification
% 判别方法 追尾冲突 侧向冲突 角度冲突 合计 质点法 88.0 71.1 75.0 82.1 外接圆法 100.0 76.3 66.7 88.4 边界框法 100.0 86.8 75.0 92.1 -
[1] 吕能超, 彭凌枫, 吴超仲, 等. 区分冲突类型的路段实时碰撞风险预测模型[J]. 中国公路学报, 2022, 35(1): 93-108.LYU Neng-chao, PENG Ling-feng, WU Chao-zhong, et al. Real-time crash-risk prediction model that distinguishes collision types[J]. China Journal of Highway and Transport, 2022, 35(1): 93-108. [2] 郭延永, 刘攀, 吴瑶, 等. 基于冲突极值模型的非常规信号交叉口安全评价[J]. 中国公路学报, 2022, 35(1): 85-92.GUO Yan-yong, LIU Pan, WU Yao, et al. Safety evaluation of unconventional signalized intersection based on traffic conflict extreme model[J]. China Journal of Highway and Transport, 2022, 35(1): 85-92. [3] YUE Q S, GUO Y Y, SAYED T, et al. Bayesian hybrid gamma-GPD model for extreme traffic conflict threshold determination in the peak over threshold approach[J]. Accident Analysis & Prevention, 2024, 206: 107717. [4] GUO Y Y, SAYED T, LIU P, et al. Modeling temporal correlation and heterogeneity in real-time conflict rates using Bayesian Tobit models for signalized intersections[J]. Accident Analysis & Prevention, 2024, 202: 107552. [5] ZHENG L, SAYED T. A novel approach for real time crash prediction at signalized intersections[J]. Transportation Research Part C: Emerging Technologies, 2020, 117: 102683. doi: 10.1016/j.trc.2020.102683 [6] AUTEY J, SAYED T, ZAKI M H. Safety evaluation of right-turn smart channels using automated traffic conflict analysis[J]. Accident Analysis & Prevention, 2012, 45: 120-130. [7] 郑玉冰, 马羊, 程建川, 等. 基于轨迹数据的非机动车道内冲突事件自动识别与可视化[J]. 中国公路学报, 2022, 35(1): 71-84.ZHENG Yu-bing, MA Yang, CHENG Jian-chuan, et al. Automated identification and visualization of conflict events in bike lanes using trajectory data[J]. China Journal of Highway and Transport, 2022, 35(1): 71-84. [8] LAURESHYN A, DE CEUNYNCK T, KARLSSON C, et al. In search of the severity dimension of traffic events: Extended Delta-V as a traffic conflict indicator[J]. Accident Analysis & Prevention, 2017, 98: 46-56. [9] SUZUKI K, NAKAMURA H. TrafficAnalyzer: The integrated video image processing system for traffic flow analysis[C]//ITS. 13th World Congress on Intelligent Transport Systems and Services. London: ITS, 2006: 1-10. [10] 王俊骅, 张方方, 张兰芳. 基于OpenCV和Halcon的交通冲突视频自动检测及数据处理[J]. 同济大学学报(自然科学版), 2010, 38(2): 238-244.WANG Jun-hua, ZHANG Fang-fang, ZHANG Lan-fang. Halcon and OpenCV-based traffic automatic conflicting detecting method and data transaction[J]. Journal of Tongji University (Natural Science), 2010, 38(2): 238-244. [11] 曲昭伟, 李志慧, 胡宏宇, 等. 基于视频处理的无信号交叉口交通冲突自动判别方法[J]. 吉林大学学报(工学版), 2009, 39(增2): 163-167.QU Zhao-wei, LI Zhi-hui, HU Hong-yu, et al. Traffic conflict automatic discrimination at non-signalized intersection based on video processing[J]. Journal of Jilin University (Engineering and Technology Edition), 2009, 39(S2): 163-167. [12] 王玉全, 邢芳, 郭伟伟. 信号交叉口混合交通冲突研究[J]. 中国安全科学学报, 2016, 26(6): 47-51.WANG Yu-quan, XING Fang, GUO Wei-wei. Research on mixed traffic conflict at signalized intersection[J]. China Safety Science Journal, 2016, 26(6): 47-51. [13] ARUN A, HAQUE M M, WASHINGTON S, et al. A systematic review of traffic conflict-based safety measures with a focus on application context[J]. Analytic Methods in Accident Research, 2021, 32: 100185. doi: 10.1016/j.amar.2021.100185 [14] 刘淼淼, 鲁光泉, 王云鹏, 等. 交叉口交通冲突严重程度量化方法[J]. 交通运输工程学报, 2012, 12(3): 120-126.LIU Miao-miao, LU Guang-quan, WANG Yun-peng, et al. Quantitative method of traffic conflict severity at intersection[J]. Journal of Traffic and Transportation Engineering, 2012, 12(3): 120-126. [15] SAUNIER N, SAYED T, ISMAIL K. Large-scale automated analysis of vehicle interactions and collisions[J]. Transportation Research Record: Journal of the Transportation Research Board, 2010, 2147(1): 42-50. doi: 10.3141/2147-06 [16] SAYED T, ZAKI M H, AUTEY J. Automated safety diagnosis of vehicle-bicycle interactions using computer vision analysis[J]. Safety Science, 2013, 59: 163-172. doi: 10.1016/j.ssci.2013.05.009 [17] ISMAIL K, SAYED T, SAUNIER N, et al. Automated analysis of pedestrian-vehicle conflicts using video data[J]. Transportation Research Record: Journal of the Transportation Research Board, 2009, 2140(1): 44-54. doi: 10.3141/2140-05 [18] ST-AUBIN P, SAUNIER N, MIRANDA-MORENO L. Large- scale automated proactive road safety analysis using video data[J]. Transportation Research Part C: Emerging Technologies, 2015, 58: 363-379. doi: 10.1016/j.trc.2015.04.007 [19] VENTHURUTHIYIL S P, CHUNCHU M. Anticipated Collision Time (ACT): A two-dimensional surrogate safety indicator for trajectory-based proactive safety assessment[J]. Transportation Research Part C: Emerging Technologies, 2022, 139: 103655. doi: 10.1016/j.trc.2022.103655 [20] ZHANG J B, LEE J, ABDEL-ATY M, et al. Enhanced index of risk assessment of lane change on expressway weaving segments: A case study of an expressway in China[J]. Accident Analysis & Prevention, 2023, 180: 106909. [21] SONG P L, SZE N N, ZHENG O, et al. Addressing unobserved heterogeneity at road user level for the analysis of conflict risk at tunnel toll plaza: A correlated grouped random parameters logit approach with heterogeneity in means[J]. Analytic Methods in Accident Research, 2022, 36: 100243. doi: 10.1016/j.amar.2022.100243 [22] 高铭, 陈鑫, 蒋烁, 等. 基于自适应微调的露天矿山低空无人机旋转目标检测[J]. 交通运输工程学报, 2026, 26(3): 291-302. doi: 10.19818/j.cnki.1671-1637.2026.158GAO Ming, CHEN Xin, JIANG Shuo, et al. Rotated object detection using low-altitude UAVs for open-pit mines with adaptive fine-tuning[J]. Journal of Traffic and Transportation Engineering, 2026, 26(3): 291-302. doi: 10.19818/j.cnki.1671-1637.2026.158 [23] 李杰, 沈堤, 余付平, 等. 基于梯度优化的低空平面航路网规划方法[J]. 交通运输工程学报, 2026, 26(3): 228-243. doi: 10.19818/j.cnki.1671-1637.2026.154LI Jie, SHEN Di, YU Fu-ping, et al. Low-altitude planar air route network planning method based on gradient optimization[J]. Journal of Traffic and Transportation Engineering, 2026, 26(3): 228-243. doi: 10.19818/j.cnki.1671-1637.2026.154 [24] 张建平, 王致远, 张光远, 等. 基于分块三维高斯泼溅的城市低空风险地图构建方法[J]. 交通运输工程学报, 2026, 26(3): 244-260. doi: 10.19818/j.cnki.1671-1637.2026.155ZHANG Jian-ping, WANG Zhi-yuan, ZHANG Guang-yuan, et al. Construction method of urban low-altitude risk map based on block 3D Gaussian splatting[J]. Journal of Traffic and Transportation Engineering, 2026, 26(3): 244-260. doi: 10.19818/j.cnki.1671-1637.2026.155 [25] ZHENG O, ABDEL-ATY M, YUE L, et al. CitySim: A drone-based vehicle trajectory dataset for safety-oriented research and digital twins[J]. Transportation Research Record: Journal of the Transportation Research Board, 2024(2678): 606-621. [26] CHEN X Q, LI Z B, YANG Y S, et al. High-resolution vehicle trajectory extraction and denoising from aerial videos[J]. IEEE Transactions on Intelligent Transportation Systems, 2021, 22(5): 3190-3202. doi: 10.1109/TITS.2020.3003782 [27] WU X, LI W, HONG D F, et al. Deep learning for unmanned aerial vehicle-based object detection and tracking: A survey[J]. IEEE Geoscience and Remote Sensing Magazine, 2022, 10(1): 91-124. doi: 10.1109/MGRS.2021.3115137 [28] 李旭, 宋世奇, 殷晓晴. 基于目标空间分布特征的无人机航拍车辆实时检测技术研究[J]. 中国公路学报, 2022, 35(12): 193-204.LI Xu, SONG Shi-qi, YIN Xiao-qing. Real-time vehicle detection technology for UAV imagery based on target spatial distribution features[J]. China Journal of Highway and Transport, 2022, 35(12): 193-204. [29] HOANH N, VU PHAM T. A multi-task framework for car detection from high-resolution UAV imagery focusing on road regions[J]. IEEE Transactions on Intelligent Transportation Systems, 2024, 25(11): 17160-17173. doi: 10.1109/TITS.2024.3432761 [30] LI X H, WU J P. Developing a more reliable framework for extracting traffic data from a UAV video[J]. IEEE Transactions on Intelligent Transportation Systems, 2023, 24(11): 12272-12283. doi: 10.1109/TITS.2023.3290827 [31] BAY H, ESS A, TUYTELAARS T, et al. Speeded-up robust features (SURF)[J]. Computer Vision and Image Understanding, 2008, 110(3): 346-359. doi: 10.1016/j.cviu.2007.09.014 [32] MUJA M, LOWE D G. Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration[J]. VISAPP, 2009, 2(1): 331-340. [33] SUN Y M, CAO B, ZHU P F, et al. Drone-based RGB-infrared cross-modality vehicle detection via uncertainty-aware learning[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2022, 32(10): 6700-6713. doi: 10.1109/TCSVT.2022.3168279 [34] ZHAO J, YANG X L, ZHANG C. Vehicle trajectory reconstruction for intersections: An integrated wavelet transform and Savitzky-Golay filter approach[J]. Transportmetrica A: Transport Science, 2024, 20(2): 2163207. doi: 10.1080/23249935.2022.2163207 [35] HYDEN Christer. A traffic conflicts technique for examining urban intersection problems[C]//Institute of Transport Economics. Proceedings of the First Workshop on Traffic Conflicts. Oslo: Institute of Transport Economics, 1977: 87-89. [36] HAYWARD J. Near-miss determination through use of a scale of danger[J]. Highway Research Record, 1972, 384: 24-34. [37] OZBAY K, YANG H, BARTIN B, et al. Derivation and validation of new simulation-based surrogate safety measure[J]. Transportation Research Record: Journal of the Transportation Research Board, 2008, 2083(1): 105-113. doi: 10.3141/2083-12 [38] ALLEN B L, SHIN B T, COOPER P J. Analysis of Traffic Conflicts and Collisions[J]. Transportation Research Record, 1978, 667: 67-74. [39] GHEORGHE C, FILIP N. Road traffic analysis using unmanned aerial vehicle and image processing algorithms[C]//IEEE. 2022 IEEE International Conference on Automation, Quality and Testing, Robotics (AQTR). New York: IEEE, 2022: 1-5. [40] 张方方, 王长君, 王俊骅. 城市快速路匝道合流区车辆交互行为模式[J]. 中国公路学报, 2022, 35(9): 66-79.ZHANG Fang-fang, WANG Chang-jun, WANG Jun-hua. Vehicle interaction patterns at on-ramp merging area of urban expressway[J]. China Journal of Highway and Transport, 2022, 35(9): 66-79. [41] 郭延永, 刘攀, 徐铖铖, 等. 基于交通冲突模型的信号交叉口右转设施安全分析[J]. 中国公路学报, 2016, 29(11): 139-146.GUO Yan-yong, LIU Pan, XU Cheng-cheng, et al. Safety analysis of right-turn facility at signalized intersection using traffic conflict model[J]. China Journal of Highway and Transport, 2016, 29(11): 139-146. [42] GUO Y Y, SAYED T, ZAKI M H, et al. Safety evaluation of unconventional outside left-turn lane using automated traffic conflict techniques[J]. Canadian Journal of Civil Engineering, 2016, 43(7): 631-642. doi: 10.1139/cjce-2015-0478 -
下载: