留言板

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

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

YOLOv13-ECNet:面向交通事故检测的轻量跨尺度注意力模型

骆炫羽,  王文胜,  沈逸

骆炫羽, 王文胜, 沈逸. YOLOv13-ECNet:面向交通事故检测的轻量跨尺度注意力模型[J]. 交通信息与安全, 2026, 44(3): 37-50. doi: 10.3963/j.issn.1674-4861.2026.03.004
引用本文: 骆炫羽, 王文胜, 沈逸. YOLOv13-ECNet:面向交通事故检测的轻量跨尺度注意力模型[J]. 交通信息与安全, 2026, 44(3): 37-50. doi: 10.3963/j.issn.1674-4861.2026.03.004
LUO Xuanyu, WANG Wensheng, SHEN Yi. YOLOv13-ECNet: A Lightweight Cross-scale Attention Model for Traffic Accident Detection[J]. Journal of Transport Information and Safety, 2026, 44(3): 37-50. doi: 10.3963/j.issn.1674-4861.2026.03.004
Citation: LUO Xuanyu, WANG Wensheng, SHEN Yi. YOLOv13-ECNet: A Lightweight Cross-scale Attention Model for Traffic Accident Detection[J]. Journal of Transport Information and Safety, 2026, 44(3): 37-50. doi: 10.3963/j.issn.1674-4861.2026.03.004

YOLOv13-ECNet:面向交通事故检测的轻量跨尺度注意力模型

doi: 10.3963/j.issn.1674-4861.2026.03.004
基金项目: 

国家重点研发计划项目 2020YFB1713203

北京市教育委员会科研计划项目 KM202411232023

北京信息科技大学“青年骨干教师”支持计划项目 YBT202403

详细信息
    作者简介:

    骆炫羽(2005—)本科生. 研究方向:图像处理. E-mail:xy_luo@bistu.edu.cn

    通讯作者:

    王文胜(1990—)博士,副教授. 研究方向:图像处理. E-mail:ws_wang1128@126.com

  • 中图分类号: U491.31

YOLOv13-ECNet: A Lightweight Cross-scale Attention Model for Traffic Accident Detection

  • 摘要: 针对交通事故检测中事故目标形态多变、成像条件退化和样本长尾分布导致的漏检、误检,以及检测稳定性不足问题,研究了1种面向交通事故检测的轻量跨尺度注意力模型YOLOv13-ECNet,旨在为监控终端赋予自动化异常感知能力。交通事故目标常表现为车体碰撞形变、侧翻、起火、烟雾遮挡和多车交互等非规则状态,目标边界与局部纹理特征不稳定;道路监控图像又易受夜间弱光、雨雾天气、运动模糊、远距离成像和车辆遮挡等因素影响,导致事故区域与复杂背景之间的可分性降低。以YOLOv13为基础架构,在其颈部至检测头的P3路径中构建两级极轻量级联增强架构,该结构保持主干网络、检测头、损失函数和训练策略不变,仅在P3路径的横向连接融合前进行局部增强,以减少多尺度融合过程中事故细节信息被弱化的问题。方法中加入EMA(efficient multi-scale attention)多尺度交互模块,通过通道分组、并行多尺度分支和跨空间信息交互增强细粒度纹理与局部上下文表征能力,以改善夜间、雨雾和遮挡场景下事故目标的漏检问题;在EMA输出特征基础上级联CloFormer-EA模块,利用局部高频聚合与全局低频建模的双通路机制,强化对车体形变、烟雾、火焰,以及多车相对位置关系等异常特征的表达。为验证方法有效性,在涵盖白天、夜间、雨雾和遮挡等多种复杂成像条件的8 047张场景交通事故数据集上开展实验,结果表明:与YOLOv13-n相比,参数增加0.86%,计算量增加1.61%,平均精度均值mAP@0.5:0.95提升4.11%;相较于YOLOv5n与YOLOv11n,平均精度均值提升了3.11%、0.94%,参数量最高减少了4.38%,计算复杂度最高下降11.3%,且在边缘设备上的推理延迟低至33.20 ms,体现出较好的精度-效率权衡与边缘部署适配性。

     

  • 图  1  YOLOv13-ECNet网络结构

    Figure  1.  Network structure of YOLOv13-ECNet

    图  2  EMA模块内部结构示意图

    Figure  2.  Internal structure of the EMAmodule

    图  3  CloFormer核心模块的内部结构示意图

    Figure  3.  Internal structure of the CloFormer core module

    图  4  数据集示例

    Figure  4.  Examples of the dataset

    图  5  ECNet与基线模型在9个典型场景下的定性可视化结果对比

    Figure  5.  Qualitative comparison between ECNet and the baseline model in nine typical scenarios

    图  6  复杂场景下的目标检测结果定性分析

    Figure  6.  Qualitative analysis of object detection results in complex scenarios

    图  7  YOLOv13-ECNet边缘部署实测结果

    Figure  7.  Real-world measurement results of YOLOv13-ECNet edge deployment

    图  8  边界框损失收敛曲线

    Figure  8.  Box loss convergence curves

    图  9  验证指标变化曲线

    Figure  9.  Validation metric curves

    图  10  精度-效率帕累托前沿

    Figure  10.  Accuracy-efficiency pareto front

    表  1  实验硬件与软件环境配置

    Table  1.   Experimental hardware and software environment configuration

    组件 配置
    操作系统 Windows 11
    CPU Intel Core i9-14900HX
    GPU NVIDIA GeForce RTX 4060 Laptop
    显存 8 GB GDDR6
    内存 16 GB
    编程语言 Python 3.11.13(via Anaconda)
    深度学习框架 PyTorch 2.5.1(for CUDA 12.1)
    加速环境 CUDA 12.1, cuDNN 9.1.0
    核心算法库 Ultralytics 8.3.63
    下载: 导出CSV

    表  2  训练超参数设置

    Table  2.   Training hyperparameter settings

    参数名称 参数值
    图像尺寸 640×640
    批量大小 16
    训练轮数 150
    优化器 SGD
    初始学习率(lr0) 0.01
    动量 0.937
    权重衰减 0.000 5
    训练精度 FP32
    随机种子 42
    下载: 导出CSV

    表  3  消融实验结果对比

    Table  3.   Comparison of ablation study results

    方法 复杂度 较基线变化/% 质量指标
    参数量/MB 计算量/GFLOPs ∆参数量/ % ∆计算量/ % P R F1 PmAP0.50 PmAP0.50:0.95 ΔF1/% ΔPmAP0.50:0.95/%
    YOLOv13-n(基线) 2.448 6.2 0.00 0.00 0.829 0.738 0.781 0.806 0.414 0.00 0.00
    +EMA 2.448 6.2 0.00 0.00 0.855 0.723 0.783 0.819 0.413 0.26 -0.24
    +EMA+CLO(ours) 2.469 6.3 0.86 1.61 0.836 0.745 0.788 0.830 0.431 0.90 4.11
    + NAM+EMA 2.448 6.2 0.00 0.00 0.808 0.732 0.768 0.818 0.422 -1.66 1.93
    + EMA+CLO+PConv 2.462 6.3 0.57 1.61 0.839 0.717 0.773 0.811 0.413 -1.02 -0.24
    + EMA(InnerIOU) 2.448 6.2 0.00 0.00 0.833 0.697 0.759 0.798 0.411 -2.82 -0.72
    + EMA(shapeIoU) 2.448 6.2 0.00 0.00 0.803 0.757 0.779 0.813 0.404 -0.26 -2.42
    下载: 导出CSV

    表  4  增强模块集成位置与融合位置的对比实验结果

    Table  4.   Comparative results of enhancement module integration and fusion position

    实验方案 集成位置 融合位置 参数量/MB 计算量/GB PmAP0.50 PmAP0.50:0.95
    YOLOv13(基线) 2.448 6.2 0.806 0.414
    本文方法 P3路径 lateral融合前 2.469 6.3 0.815 0.431
    拓扑对比 P3路径 lateral融合后 2.469 6.3 0.810 0.406
    层级对比A P4路径 lateral融合前 2.544 6.4 0.808 0.411
    层级对比B P5路径 lateral融合前 2.754 6.3 0.801 0.395
    下载: 导出CSV

    表  5  与现有模型的性能对比

    Table  5.   Performance comparison with existing common models

    模型 复杂度 质量指标 效率指标
    参数量/MB 计算量/ GFLOPs P R F1 PmAP0.50 PmAP0.50:0.95 EGFLOPs EParams eff2 Feff3
    RT-DETR-l 31.986 103.4 0.808 0.703 0.752 0.746 0.355 0.003 4 0.011 0.050 0.097
    YOLOv13-n 2.448 6.2 0.829 0.738 0.781 0.806 0.414 0.066 8 0.169 0.970 0.979
    YOLOv5n 2.503 7.1 0.841 0.751 0.793 0.814 0.418 0.058 9 0.167 0.917 0.932
    YOLOv8n 3.006 8.1 0.848 0.742 0.791 0.839 0.44 0.054 3 0.146 0.876 0.849
    YOLOv11n 2.582 6.3 0.892 0.737 0.807 0.833 0.427 0.067 8 0.165 0.986 0.967
    ECNet 2.469 6.3 0.836 0.745 0.788 0.830 0.431 0.068 4 0.175 0.990 0.985
    下载: 导出CSV
  • [1] 张浩晨, 张竹林, 史瑞岩, 等. YOLO-CDC: 优化改进YOLOv8的车辆目标检测算法[J]. 计算机工程与应用, 2025, 61 (13): 124-137.

    ZHANG H C, ZHANG Z L, SHI R Y, et al. YOLO-CDC: an optimized and improved YOLOv8 vehicle object detection algorithm[J]. Computer Engineering and Applications, 2025, 61 (13): 124-137. (in Chinese)
    [2] 王天硕, 高景伯, 童盛军. 面向不平衡数据的SMOTE-LSTM车辆事故检测方法[J]. 交通信息与安全, 2025, 43(1): 52-60. doi: 10.3963/j.jssn.1674-4861.2025.01.005

    WANG T S, GAO J B, TONG S J. Vehicle accident detection method based on SMOTE-LSTM for imbalanced data[J]. Journal of Transport Information and Safety, 2025, 43(1): 52-60. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2025.01.005
    [3] 孙竞航. 基于4D毫米波雷达的路侧感知与交通安全态势评估[D]. 长春: 吉林大学, 2025.

    SUN J H. Roadside perception and traffic safety situation assessment based on 4D millimeter wave radar[D]. Changchun: Jilin University, 2025. (in Chinese)
    [4] WANG T, KIM S, JI W, et al. DeepAccident: a motion and accident prediction benchmark for V2X autonomous driving[C]. The AAAI Conference on Artificial Intelligence, Vancouver, Canada: AAAI Press, 2024.
    [5] TERVEN J, CORDOVA-ESPARZA D, ROMERO-GONZALEZ J A. A comprehensive review of YOLO architectures in computer vision: from YOLOv1 to YOLOv8 and YOLO-NAS[J]. Machine Learning and Knowledge Extraction, 2023, 5(4): 1680-1716. doi: 10.3390/make5040083
    [6] 周力, 代亮, 杨杰, 等. 基于CRD-YOLOv5s的交通场景目标检测[J]. 长安大学学报(自然科学版), 2025, 45(5): 186-199.

    ZHOU L, DAI L, YANG J, et al. Traffic scene object detection based on CRD-YOLOv5s[J]. Journal of Chang'an University(Natural Science Edition), 2025, 45(5): 186-199. (in Chinese)
    [7] 邓召学, 刘灿, 郝丙森, 等. 面向长尾分布和特征缺失的交通标志目标检测算法[J]. 吉林大学学报(工学版), 2026, 56 (6): 1642-1654.

    DENG Z X, LIU C, HAO B S, et al. Traffic sign object detection algorithm oriented to long tail distribution and feature missing[J]. Journal of Jilin University(Engineering and Technology Edition), 2026, 56(6): 1642-1654. (in Chinese)
    [8] 翟永杰, 朱浩硕, 李佳蔚, 等. VDD-YOLO: 用于车辆变形损伤的评估方法[J]. 科学技术与工程, 2025, 25(29): 12560-12569.

    ZHAI Y J, ZHU H S, LI J W, et al. VDD-YOLO: an evaluation method for vehicle deformation damage[J]. Science Technology and Engineering, 2025, 25(29): 12560-12569. (in Chinese)
    [9] 张逊逊, 朱旭, 李晓伟. 基于特征交互和多模态自适应融合的车辆再识别方法[J]. 交通信息与安全, 2025, 43(4): 110-118. doi: 10.3963/j.jssn.1674-4861.2025.04.011

    ZHANG X X, ZHU X, LI X W. Vehicle re-identification method based on feature interaction and multimodal adaptive fusion[J]. Journal of Transport Information and Safety, 2025, 43 (4): 110-118. (in Chinese) doi: 10.3963/j.jssn.1674-4861.2025.04.011
    [10] LEI M, LI S, WU Y, et al. YOLOv13: real-time object detection with hypergraph-enhanced adaptive visual perception[EB/OL]. (2025-06-17)[2025-12-08]. https://arxiv.org/abs/2506. 17733.
    [11] OUYANG D, HE S, ZHAN J, et al. Efficient multi-scale attention module with cross-spatial learning[C]. IEEE International Conference on Acoustics, Speech and Signal Processing(ICASSP), Rhodes Island, Greece: IEEE, 2023.
    [12] FAN Q, HUANG H, CHEN M, et al. Rethinking local perception in lightweight vision transformer[C]. The IEEE/CVF International Conference on Computer Vision(ICCV), Paris, France: IEEE, 2023.
    [13] HUANG D, ZHANG G Y, LI Z X, et al. Light-YOLO: a lightweight and high-performance network for detecting small obstacles on roads at night[J]. Computer Vision and Image Understanding, 2025, 259: 104428. doi: 10.1016/j.cviu.2025.104428
    [14] KHAN S H, NASEER M, HAYAT M, et al. Transformers in vision: a survey[J]. ACM Computing Surveys, 2022, 54 (10): 1-41.
    [15] LIN T Y, MAIRE M, BELONGIE S, et al. Microsoft COCO: common objects in context[C]. European Conference on Computer Vision (ECCV), Zurich, Switzerland: Springer, 2014.
    [16] 赵静, 李京谦, 杨蕾, 等. 基于PConv-CGLU与重参数检测头的轻量化膜下棉苗实时检测算法[J]. 农业工程学报, 2025, 41(18): 151-162.

    ZHAO J, LI J Q, YANG L, et al. Lightweight real-time detection algorithm for cotton seedlings under plastic film based on PConv-CGLU and re-parameterized detection head[J]. Transactions of the Chinese Society of Agricultural Engineering, 2025, 41(18): 151-162. (in Chinese)
    [17] HUANG P, TIAN S, SU Y, et al. IA-CIOU: an improved IOU bounding box loss function for SAR ship target detection methods[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2024, 17: 10569-10583. doi: 10.1109/JSTARS.2024.3402540
    [18] ZHANG H, XU C, ZHANG X. Shape-IoU: more precise metric considering bounding box shape and scale[EB/OL]. (2023-12-29)[2025-12-01]. https://arxiv.org/abs/2312.17663.
    [19] REZATOFIGHI H, TSOI N, GWAK J, et al. Generalized intersection over union: a metric and a loss for bounding box regression[C]. The IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR). Long Beach, USA: IEEE, 2019.
    [20] ZHENG Z, WANG P, REN D, et al. Enhancing geometric factors in model learning and inference for object detection and instance segmentation[J]. IEEE Transactions on Cybernetics, 2022, 52(8): 8574-8586. doi: 10.1109/TCYB.2021.3095305
    [21] 赵文红, 王巍, 姚振, 等. 注意力增强的YOLOv5在电力线绝缘子缺陷检测中的应用[J]. 太赫兹科学与电子信息学报, 2025, 23(11): 1-8.

    ZHAO W H, WANG W, YAO Z, et al. Application of attention-enhanced YOLOv5 in power line insulator defect detection[J]. Journal of Terahertz Science and Electronic Information Technology, 2025, 23(11): 1-8. (in Chinese)
    [22] 崔广, 李宇杰, 王艳, 等. 基于改进YOLOv8s算法的地铁轨道缺陷目标智能检测方法[J]. 交通运输工程学报, 2025, 25(6): 1-12.

    CUI G, LI Y J, WANG Y, et al. Intelligent detection method for subway track defects based on improved YOLOv8s algorithm[J]. Journal of Traffic and Transportation Engineering, 2025, 25(6): 1-12. (in Chinese)
    [23] 周屯极, 张扬宇, 孟可, 等. MCT-YOLO: 航拍视角下小目标检测算法[J]. 计算机工程与应用, 2025, 61(10): 1-10.

    ZHOU T J, ZHANG Y Y, MENG K, et al. MCT-YOLO: small object detection algorithm from aerial view[J]. Computer Engineering and Applications, 2025, 61(10): 1-10. (in Chinese)
    [24] ALLMENDINGER A, SALTIK A O, PETEINATOS G G, et al. Assessing the capability of YOLO- and transformer-based object detectors for real-time weed detection[J]. Precision Agriculture, 2025, 26: 52. doi: 10.1007/s11119-025-10246-0
    [25] 姜天豪, 王瑞. 基于多头注意力时空图卷积网络的交通事故预测[J]. 上海大学学报(自然科学版), 2025, 31(4): 632-644.

    JIANG T H, WANG R. Traffic accident prediction based on multi-head attention spatio-temporal graph convolutional networks[J]. Journal of Shanghai University(Natural Science Edition), 2025, 31(4): 632-644. (in Chinese)
  • 加载中
图(10) / 表(5)
计量
  • 文章访问数:  13
  • HTML全文浏览量:  11
  • PDF下载量:  0
  • 被引次数: 0
出版历程
  • 收稿日期:  2025-11-17

目录

    /

    返回文章
    返回