吉林大学学报(工学版) ›› 2025, Vol. 55 ›› Issue (3): 947-953.doi: 10.13229/j.cnki.jdxbgxb.20230614

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

数据不平衡的MobileViT网络交通事故严重程度预测模型

潘义勇(),徐翔宇   

  1. 南京林业大学 汽车与交通工程学院,南京 210037
  • 收稿日期:2023-06-15 出版日期:2025-03-01 发布日期:2025-05-20
  • 作者简介:潘义勇(1980-),男,副教授,博士.研究方向:交通运输规划与管理.E-mail:uoupanyg@njfu.edu.cn
  • 基金资助:
    国家自然科学基金项目(51508280)

Model for predicting severity of accidents based on MobileViT network considering imbalanced data

Yi-yong PAN(),Xiang-yu XU   

  1. College of Automobile and Traffic Engineering,Nanjing Forestry University,Nanjing 210037,China
  • Received:2023-06-15 Online:2025-03-01 Published:2025-05-20

摘要:

为解决数据不平衡引起的事故严重程度预测精度低的问题,提出了一种基于深度学习技术的交通事故严重程度预测模型。使用机器学习算法确定影响事故严重程度的关键变量,将数值型事故变量转换成图像数据应用于融合卷积神经网络和自注意力机制的MobileViT网络,针对数据量占比小的轻伤和重伤事故,采用焦点损失函数自适应调整轻伤和重伤事故的损失贡献,使模型更关注不平衡数据,利用精确率、召回率和F1分数评估模型预测性能。结果表明:本文模型在总体预测性能指标上达到0.81以上,优于其他基线模型,召回率和F1分数至少提高了4%和2.5%;在轻伤事故的召回率和F1分数上,MobileViT模型比WGAN-GP-XGBoost和ResNet18模型提高了25.9%和4.5%以上,重伤事故的预测性能最好,精确率、召回率和F1分数相比于另外两种模型分别提高了8.9%、4.2%和6.7%以上;使用焦点损失函数改进的MobileViT模型在预测不平衡数据上,效果高于其他数据平衡方法。

关键词: 交通运输系统工程, 事故严重程度预测, 数据不平衡, MobileViT, 焦点损失函数

Abstract:

In order to solve the problem of low accuracy of accidents severity prediction caused by data imbalance, a traffic accidents severity prediction model based on deep learning technology was proposed. Machine learning algorithm was used to determine the key variables affecting the severity of accidents, Numerical accidents variables were converted into image data and applied to MobileViT network that combined the convolutional neural network and the self-attention mechanism. Focal loss function was used to adaptively adjust the loss contribution of injury and severe accidents with small data volume, so that the model paid more attention to unbalanced data, and the prediction performance of the model was evaluated by precision, recall and F1 score. The results show that the overall predictive performance index of the proposed model is above 0.81, which is better than other baseline models, and recall and F1 score are at least increased by 4% and 2.5%. Compared with WGAN-GP-XGBoost and ResNet18 models, MobileViT model has improved recall and F1 score of injury accidents by 25.9% and 4.5% respectively. Compared with the other two models, the prediction performance for severe accidents is the best, with an increase of 8.9%, 4.2%, and 6.7% in precision, recall rate, and F1 score. Compared to other data balancing methods, the MobileViT model enhanced with focal loss as the loss function demonstrates superior performance in imbalanced data prediction.

Key words: engineering of communication and transportation system, accidents severity prediction, imbalanced data, MobileViT, focal loss function

中图分类号: 

  • U491.31

图1

基于MobileViT网络的交通事故严重程度预测模型"

表1

变量重要性排序"

排序变量重要性排序变量重要性
1安全气囊6.234 922天气情况0.861 5
2纵向座椅位置1.660 023性别0.858 2
3碰撞类型1.394 324视野遮蔽0.837 7
4驾驶员状况1.381 825控制方式0.824 8
5事故车辆数1.338 926道路等级0.818 4
6碰撞点1.291 827年龄0.818 3
7乘客抛出情况1.218 628车辆运动状态0.816 8
8纵断面线形1.120 729施工作业0.807 0
9道路表面状况1.070 030道路分隔方式0.802 6
10预估速度1.066 031路口标志0.802 4
11超速1.038 932交叉口类型0.779 3
12路肩类型1.010 733交叉口方向0.765 9
13药物使用0.969 234车道数0.757 0
14事故行为0.966 835行驶方向0.744 3
15分心状况0.950 636路面状况0.680 9
16光照情况0.945 737

距离交叉口英

里数

0.666 2
17道路线形0.920 438肇事逃逸0.640 6
18城乡道路0.889 339醉酒驾驶0.638 7
19

距离交叉口英

尺数

0.882 740环境状况0.595 4
20限速0.868 541事故发生位置0.557 2
21事故人员数0.865 042横向座椅位置0.000 0

图2

变量筛选"

表2

模型总体性能比较"

模型精确率召回率F1分数
MobileViT0.814 30.828 60.819 8
WGAN-GP-XGBoost0.809 70.796 40.799 8
ResNet180.774 60.785 80.776 8
BBC-LGBM0.610 30.783 90.656 0
MLP0.681 70.781 10.720 4
ORF0.413 40.638 00.459 3
GBDT0.673 50.764 20.705 4
SVM0.518 30.660 20.546 2

表3

3种模型的混淆矩阵"

模型实际类别预测类别
仅财产损失轻伤重伤
MobileViT仅财产损失7491651
轻伤1062580
重伤0123
WGAN-GP-XGBoost仅财产损失832830
轻伤1562053
重伤0222
ResNet18仅财产损失816972
轻伤1621983
重伤1123

表4

按类别比较性能指标"

模型类别精确率召回率F1分数
MobileViT仅财产损失0.876 00.818 60.846 3
轻伤0.608 50.708 80.654 8
重伤0.958 30.958 30.958 3
WGAN-GP-XGBoost仅财产损失0.842 10.909 30.874 4
轻伤0.706 90.563 20.626 9
重伤0.880 00.916 70.898 0
ResNet18仅财产损失0.833 50.891 80.861 7
轻伤0.668 90.545 50.600 9
重伤0.821 40.920 00.867 9

图3

不同数据平衡方法的实验结果比较"

1 潘义勇, 吴静婷, 缪炫烨. 老年驾驶员事故严重程度影响因素时间不稳定性分析[J]. 吉林大学学报:工学版,2024, 54(10): 2819-2826.
Pan Yi-yong, Wu Jing-ting, Miao Xuan-ye. Temporal instability analysis of factors affecting accident severity of elderly drivers[J]. Journal of Jilin University (Engineering and Technology Edition),2024, 54(10): 2819-2826.
2 戢晓峰, 乔新. 建成环境对行人交通事故严重程度的非线性影响[J]. 交通运输系统工程与信息, 2023, 23(1): 314-323.
Ji Xiao-feng, Qiao Xin. Nonlinear influence of built environment on pedestrian traffic accident severity[J]. Journal of Transportation Systems Engineering and Information Technology, 2023, 23(1): 314-323.
3 Zheng M, Li T, Zhu R, et al. Traffic accident´s severity prediction: a deep-learning approach-based CNN network[J]. IEEE Access, 2019, 7: 39897-39910.
4 吕璞, 柏强, 陈琳. 融合深度反残差与注意力机制的山区高速公路事故严重程度预测模型[J]. 中国公路学报, 2021, 34(6): 205-213.
Lv Pu, Bai Qiang, Chen Lin. A model for predicting the severity of accidents on mountainous expressways based on deep inverted residuals and attention mechanisms[J]. China Journal of Highway and Transport, 2021, 34(6): 205-213.
5 Wang S, Zhang J, Li J, et al. Traffic accident risk prediction via multi-view multi-task spatio-temporal networks[J]. IEEE Transactions on Knowledge and Data Engineering, 2023, 35(12): 12323-12336.
6 Tian Z, Zhang S. Deep learning method for traffic accident prediction security[J]. Soft Computing, 2022, 26(11): 5363-5375.
7 Mehta S, Rastegari M. Mobilevit: light-weight, general-purpose, and mobile-friendly vision transformer[J/OL].[2023-06-07].
8 Rahim M A, Hassan H M. A deep learning based traffic crash severity prediction framework[J].Accident Analysis & Prevention, 2021,154: No. 106090.
9 Khan M N, Ahmed M M. A novel deep learning approach to predict crash severity in adverse weather on rural mountainous freeway[J]. Journal of Transportation Safety & Security, 2023, 15(8): 795-825.
10 刘文文. 基于深度学习的摩托车事故严重程度预测研究[D]. 重庆: 重庆交通大学交通运输学院, 2022.
Liu Wen-wen. Research on motorcycle accident severity prediction based on deep learning[D]. Chongqing: College of Traffic & Transportation, Chongqing Jiaotong University 2022.
11 Lin T Y, Goyal P, Girshick R, et al. Focal loss for dense object detection[C]∥Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 2017: 2980-2988.
12 Sharma A, Vans E, Shigemizu D, et al. DeepInsight: a methodology to transform a non-image data to an image for convolution neural network architecture[J]. Scientific reports, 2019, 9(1): No. 11399.
13 马永杰, 程时升, 马芸婷, 等. 卷积神经网络及其在智能交通系统中的应用综述[J]. 交通运输工程学报, 2021, 21(4): 48-71.
Ma Yong-jie, Cheng Shi-sheng, Ma Yun-ting, et al. Review of convolutional neural network and its application in intelligent transportation system[J]. Journal of Traffic and Transportation Engineering, 2021, 21(4): 48-71.
14 Yan H, Ma X, Pu Z. Learning dynamic and hierarchical traffic spatiotemporal features with transformer[J]. IEEE Transactions on Intelligent Transportation Systems, 2021, 23(11): 22386-22399.
15 Li Y, Yang Z, Xing L, et al. Crash injury severity prediction considering data imbalance: a wasserstein generative adversarial network with gradient penalty approach[J]. Accident Analysis & Prevention, 2023, 192: No.107271.
16 Niyogisubizo J, Liao L, Zou F, et al. Predicting traffic crash severity using hybrid of balanced bagging classification and light gradient boosting machine[J]. Intelligent Data Analysis, 2023, 27(1): 79-101.
17 Cicek E, Akin M, Uysal F, et al. Comparison of traffic accident injury severity prediction models with explainable machine learning[J]. Transportation Letters, 2023, 15(9): 1043-1054.
18 Zhang Y, Li H, Ren G. Analyzing the injury severity in single-bicycle crashes: an application of the ordered forest with some practical guidance[J]. Accident Analysis & Prevention, 2023, 189: No. 107126.
19 Mohammadpour S I, Khedmati M, Zada M J H. Classification of truck-involved crash severity: dealing with missing, imbalanced, and high dimensional safety data[J]. PLoS one, 2023, 18(3): No.e0281901.
20 Silagyi II D V, Liu D. Prediction of severity of aviation landing accidents using support vector machine models[J]. Accident Analysis & Prevention, 2023, 187: No. 107043.
[1] 陈永恒,杨家伟,孙经宇. 借道左转交叉口的网联左转车辆最佳轨迹控制[J]. 吉林大学学报(工学版), 2025, 55(2): 614-622.
[2] 陈发城,鲁光泉,林庆峰,张浩东,马社强,刘德志,宋会军. 有条件自动驾驶下驾驶人接管行为综述[J]. 吉林大学学报(工学版), 2025, 55(2): 419-433.
[3] 何永明,冯佳,魏堃,万亚楠. 超高速公路曲线路段车辆制动侧滑影响因素分析[J]. 吉林大学学报(工学版), 2025, 55(2): 591-602.
[4] 吴娇蓉,刘旭东. 不同住房类型空间单元的建成环境对通勤方式选择的影响分析[J]. 吉林大学学报(工学版), 2025, 55(2): 554-565.
[5] 王长帅,徐铖铖,任卫林,彭畅,佟昊. 自动驾驶接管过程中驾驶能力恢复状态对交通流振荡特性的影响[J]. 吉林大学学报(工学版), 2025, 55(1): 150-161.
[6] 张娜,陈峰,王剑坡,朱亚迪. 基于时空序列相似性的城轨乘客出行模式识别[J]. 吉林大学学报(工学版), 2024, 54(9): 2588-2599.
[7] 周锡浈,宫贺,李敦敦,季彦婕,严杰. 建成环境对路内停车泊位使用率的非线性影响模型[J]. 吉林大学学报(工学版), 2024, 54(9): 2520-2530.
[8] 严利鑫,曾涛,贺宜,郭军华,胡鑫辉. 共驾型智能车辆人机接管行为序列编码与解析[J]. 吉林大学学报(工学版), 2024, 54(9): 2547-2556.
[9] 曲昭伟,李霖,陈永恒,吴场建. 长区间掉头车辆特性分析及其安全评价[J]. 吉林大学学报(工学版), 2024, 54(8): 2206-2213.
[10] 何永明,权聪,魏堃,冯佳,万亚楠,陈世升. 超高速公路车路协同路侧单元感知融合方法[J]. 吉林大学学报(工学版), 2024, 54(7): 1923-1934.
[11] 程国柱,盛林,王浩宇,冯天军. 考虑右转车二次冲突的信号交叉口行人过街安全评价方法[J]. 吉林大学学报(工学版), 2024, 54(7): 1903-1912.
[12] 张明业,杨敏,黎彧,黄世玉,李清韵. 考虑有序充电策略的多车型电动公交调度优化[J]. 吉林大学学报(工学版), 2024, 54(5): 1293-1301.
[13] 秦雅琴,钱正富,谢济铭. 协同换道避障模型和轨迹数据驱动的车辆协同避障策略[J]. 吉林大学学报(工学版), 2024, 54(5): 1311-1322.
[14] 严利鑫,冯进培,郭军华,龚毅轲. 不同险态情景下共驾型智能车辆接管行为特征分析[J]. 吉林大学学报(工学版), 2024, 54(3): 683-691.
[15] 马潇驰,陆建. 基于基因表达式编程的高架道路事故实时预测[J]. 吉林大学学报(工学版), 2024, 54(3): 719-726.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!