留言板

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

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

轻量型YOLOv5s车载红外图像目标检测

刘彦磊 李孟喆 王宣宣

刘彦磊, 李孟喆, 王宣宣. 轻量型YOLOv5s车载红外图像目标检测[J]. 中国光学(中英文), 2023, 16(5): 1045-1055. doi: 10.37188/CO.2022-0254
引用本文: 刘彦磊, 李孟喆, 王宣宣. 轻量型YOLOv5s车载红外图像目标检测[J]. 中国光学(中英文), 2023, 16(5): 1045-1055. doi: 10.37188/CO.2022-0254
LIU Yan-lei, LI Meng-zhe, WANG Xuan-xuan. Lightweight YOLOv5s vehicle infrared image target detection[J]. Chinese Optics, 2023, 16(5): 1045-1055. doi: 10.37188/CO.2022-0254
Citation: LIU Yan-lei, LI Meng-zhe, WANG Xuan-xuan. Lightweight YOLOv5s vehicle infrared image target detection[J]. Chinese Optics, 2023, 16(5): 1045-1055. doi: 10.37188/CO.2022-0254

轻量型YOLOv5s车载红外图像目标检测

基金项目: 国家自然科学基金(No. 61905068)
详细信息
    作者简介:

    刘彦磊(1986—),男,河南中牟人,博士,讲师,2011年,2014年于河南师范大学分别获得学士、硕士学位,2018年6月于北京理工大学获得博士学位,主要从事红外光谱测量及应用技术方面的研究。E-mail:liuyanlei@htu.edu.cn

  • 中图分类号: TP391.4

Lightweight YOLOv5s vehicle infrared image target detection

Funds: Supported by National Natural Science Foundation of China (No. 61905068)
More Information
  • 摘要:

    车载红外图像的目标检测是自动驾驶进行道路环境感知的重要方式。针对现有车载红外图像目标检测算法中内存利用率低、计算复杂和检测精度低的问题,提出了一种改进YOLOv5s的轻量型目标检测算法。首先,将C3Ghost和Ghost模块引入YOLOv5s检测网络,以降低网络复杂度。其次,引进αIoU损失函数,以提升目标的定位精度和训练效率。然后,降低网络结构下采样率,并利用KMeans聚类算法优化先验框大小,以提高小目标检测能力。最后,分别在主干网络和颈部引入坐标注意力(Coordinate Attention,CA)和空间深度卷积模块进一步优化模型,提升模型特征的提取能力。实验结果表明,相对于原YOLOv5s算法,改进算法的模型大小压缩78.1%,参数量和每秒千兆浮点运算数分别减少84.5%和40.5%,平均检测精度和检测速度分别提升4.2%和10.9%。

     

  • 图 1  YOLOv5s算法结构

    Figure 1.  YOLOv5s algorithm structure

    图 2  改进YOLOv5s算法结构

    Figure 2.  Improved YOLOv5s algorithm structure

    图 3  (a)普通卷积和(b)Ghost卷积(Φ为线性操作)

    Figure 3.  (a) Ordinary convolution and (b) Ghost convolution (Φ is a linear operation)

    图 4  CA结构

    Figure 4.  CA structure

    图 5  空间深度卷积(Scale=2)

    Figure 5.  SPD-Conv (Scale=2)

    图 6  数据增强结果。(a)Mosaic增强;(b)MixUp增强;(c)Copy-Paste增强

    Figure 6.  Data augmentation results. (a) Mosaic augmentation; (b) MixUp augmentation; (c) Copy-Paste augmentation

    图 7  几种不同算法的检测效果。(a)YOLOv3-tiny;(b)YOLOv4-tiny;(c)YOLOv5n;(d)YOLOv6-N;(e)YOLO7-tiny;(f)YOLO5s;(g)本文算法

    Figure 7.  Detection results of different algorithms. (a) YOLOv3-tiny; (b) YOLOv4-tiny; (c) YOLOv5n; (d) YOLOv6-N; (e) YOLO7-tiny; (f) YOLO5s; (g) proposed in this paper

    表  1  优化后先验框大小

    Table  1.   Optimized prior anchor size

    特征图尺度160×16080×8040×40
    感受野大小
    [6,8][14,37][35,94]
    先验框[7,19][31,26][96,68]
    [15,13][50,37][154,145]
    下载: 导出CSV

    表  2  YOLOv5s和YOLOv5s-G轻量化性能对比

    Table  2.   Performance comparison of lightweight for YOLOv5s and YOLOv5s-G

    Modelt/hoursSize/MBParams/MGFLOPsP(%)R(%)mAP(%)FPS
    YOLOv5s48.7713.707.0215.887.169.880.8119
    YOLOv5s-G30.257.463.688.086.166.377.5137
    下载: 导出CSV

    表  3  不同损失函数性能对比

    Table  3.   Performance comparison of different loss functions

    Modelt/hoursP(%)R(%)mAP(%)FPS
    YOLOv5s-G30.2586.166.377.5137
    YOLOv5s-G-EIoU24.3184.568.778.9141
    YOLOv5s-G-SIoU24.6285.867.277.8139
    YOLOv5s-G-αIoU23.5085.969.379.8147
    下载: 导出CSV

    表  4  多尺度融合性能对比

    Table  4.   Performance comparison of multi-scale fusion

    Modelt/hoursSize/MBParams/MGFLOPsP(%)R(%)mAP(%)FPS
    YOLOv5s-G-αIoU23.507.463.688.085.969.379.8147
    YOLOv5s-G1-αIoU26.898.603.759.686.073.683.6125
    YOLOv5s-G2-αIoU24.562.730.957.284.572.882.9154
    YOLOv5s-G2-αIoU-KMeans25.622.730.957.285.572.483154
    下载: 导出CSV

    表  5  不同注意力机制性能对比

    Table  5.   Performance comparison of different attention mechanisms

    Modelt/hoursSize/MBParams/MGFLOPsP(%)R(%)mAP(%)FPS
    YOLOv5s-G2-αIoU-KMeans25.622.730.957.285.572.483154
    YOLOv5s-G2-αIoU-KMeans-SE30.952.750.967.286.073.584.1149
    YOLOv5s-G2-αIoU-KMeans-ECA26.062.730.957.285.573.884.2145
    YOLOv5s-G2-αIoU-KMeans-CBAM28.212.760.967.385.773.484135
    YOLOv5s-G2-αIoU-KMeans-CA28.622.760.967.386.673.684.3139
    下载: 导出CSV

    表  6  空间深度卷积效果

    Table  6.   SPD-Conv effect

    Modelt/hoursSize/MBParams/MGFLOPsP(%)R(%)mAP(%)FPS
    YOLOv5s-G2-αIoU-Kmeans-CA28.622.760.967.386.673.684.3139
    YOLOv5s-G2-αIoU-Kmeans-CA-SPD30.283.01.099.487.474.685.0132
    下载: 导出CSV

    表  7  与其他先进算法对比

    Table  7.   Comparison with other advanced algorithms

    ModelSize/MBParams/MGFLOPsP(%)R(%)mAP(%)FPS
    SSD186.023.70115.768.955.763.288
    EfficientDet302.039.40107.572.858.467.852
    YOLOv4+GhostNet150.339.3025.681.166.977.7112
    YOLOv5-MobileNetV37.94.09.383.767.576.9128
    YOLOv3-tiny16.68.6712.979.354.962.9175
    YOLOv4-tiny12.96.2716.278.957.367.2149
    YOLOv5n3.71.765.183.666.176.6164
    YOLOv6-N9.34.3011.184.871.580.3208
    YOLOv7-tiny12.36.0213.284.274.783.6143
    YOLOv5s13.77.0215.887.169.880.8119
    proposed in this paper3.01.099.487.474.685.0132
    下载: 导出CSV
  • [1] MUHAMMAD K, ULLAH A, LLORET J, et al. Deep learning for safe autonomous driving: current challenges and future directions[J]. IEEE Transactions on Intelligent Transportation Systems, 2021, 22(7): 4316-4336. doi: 10.1109/TITS.2020.3032227
    [2] TAKUMI K, WATANABE K, HA Q SH, et al. . Multispectral object detection for autonomous vehicles[C]. Proceedings of the on Thematic Workshops of ACM Multimedia 2017, ACM, 2017: 35-43.
    [3] CHOI Y, KIM N, HWANG S, et al. KAIST multi-spectral day/night data set for autonomous and assisted driving[J]. IEEE Transactions on Intelligent Transportation Systems, 2018, 19(3): 934-948. doi: 10.1109/TITS.2018.2791533
    [4] LIU Q, ZHUANG J J, MA J. Robust and fast pedestrian detection method for far-infrared automotive driving assistance systems[J]. Infrared Physics &Technology, 2013, 60: 288-299.
    [5] 任凤雷, 周海波, 杨璐, 等. 基于双注意力机制的车道线检测[J]. 中国光学(中英文),2023,16(3):645-653.

    REN F L, ZHOU H B, YANG L, et al. Lane detection based on dual attention mechanism[J]. Chinese Optics, 2023, 16(3): 645-653. (in Chinese)
    [6] WANG H, CAI Y F, CHEN X B, et al. Night-time vehicle sensing in far infrared image with deep learning[J]. Journal of Sensors, 2016, 2016: 3403451.
    [7] GALARZA-BRAVO M A, FLORES-CALERO M J. Pedestrian detection at night based on faster R-CNN and far infrared images[C]. Proceedings of the 11th International Conference on Intelligent Robotics and Applications, Springer, 2018: 335-345.
    [8] CHEN Y F, XIE H, SHIN H. Multi‐layer fusion techniques using a CNN for multispectral pedestrian detection[J]. IET Computer Vision, 2018, 12(8): 1179-1187. doi: 10.1049/iet-cvi.2018.5315
    [9] 王驰, 于明坤, 杨辰烨, 等. 抛撒地雷的夜视智能探测方法研究[J]. 中国光学,2021,14(5):1202-1211. doi: 10.37188/CO.2020-0214

    WANG CH, YU M K, YANG CH Y, et al. Night vision intelligent detection method of scatterable landmines[J]. Chinese Optics, 2021, 14(5): 1202-1211. (in Chinese) doi: 10.37188/CO.2020-0214
    [10] GONG J, ZHAO J H, LI F, et al. . Vehicle detection in thermal images with an improved yolov3-tiny[C]. Proceedings of 2020 IEEE International Conference on Power, Intelligent Computing and Systems, IEEE, 2020: 253-256.
    [11] SUN M Y, ZHANG H CH, HUANG Z L, et al. Road infrared target detection with I‐YOLO[J]. IET Image Processing, 2022, 16(1): 92-101. doi: 10.1049/ipr2.12331
    [12] 吴海滨, 魏喜盈, 刘美红, 等. 结合空洞卷积和迁移学习改进YOLOv4的X光安检危险品检测[J]. 中国光学,2021,14(6):1417-1425. doi: 10.37188/CO.2021-0078

    WU H B, WEI X Y, LIU M H, et al. Improved YOLOv4 for dangerous goods detection in X-ray inspection combined with atrous convolution and transfer learning[J]. Chinese Optics, 2021, 14(6): 1417-1425. (in Chinese) doi: 10.37188/CO.2021-0078
    [13] 张印辉, 庄宏, 何自芬, 等. 氨气泄漏混洗自注意力轻量化红外检测[J]. 中国光学(中英文),2023,16(3):607-619.

    ZHANG Y H, ZHUANG H, HE Z F, et al. Lightweight infrared detection of ammonia leakage using shuffle and self-attention[J]. Chinese Optics, 2023, 16(3): 607-619. (in Chinese)
    [14] JIANG X H, CAI W, YANG ZH Y, et al. IEPet: a lightweight multiscale infrared environmental perception network[J]. Journal of Physics:Conference Series, 2021, 2078: 012063. doi: 10.1088/1742-6596/2078/1/012063
    [15] WU ZH L, WANG X, CHEN CH. Research on lightweight infrared pedestrian detection model algorithm for embedded Platform[J]. Security and Communication Networks, 2021, 2021: 1549772.
    [16] XIN X L, PAN F, WANG J CH, et al. . SwinT-YOLOv5s: improved YOLOv5s for vehicle-mounted infrared target detection[C]. Proceedings of the 41st Chinese Control Conference (CCC), IEEE, 2022: 7326-7331.
    [17] ZHAI SH P, SHANG D R, WANG SH H, et al. DF-SSD: an improved SSD object detection algorithm based on DenseNet and feature fusion[J]. IEEE Access, 2020, 8: 24344-24357. doi: 10.1109/ACCESS.2020.2971026
    [18] DAI X R, YUAN X, WEI X Y. TIRNet: object detection in thermal infrared images for autonomous driving[J]. Applied Intelligence, 2021, 51(3): 1244-1261. doi: 10.1007/s10489-020-01882-2
    [19] 2022. FREE FLIR Thermal Dataset for Algorithm Training. [Online]. Available: https://www.flir.com/oem/adas/adas-dataset-form.
    [20] CAO M L, FU H, ZHU J Y, et al. Lightweight tea bud recognition network integrating GhostNet and YOLOv5[J]. Mathematical Biosciences and Engineering, 2022, 19(12): 12897-12914. doi: 10.3934/mbe.2022602
    [21] HE J B, ERFANI S M, MA X J, et al.. Alpha-IoU: a family of power intersection over union losses for bounding box regression[C]. Proceedings of the 34th Advances in Neural Information Processing Systems, 2021.
    [22] ZHA M F, QIAN W B, YI W L, et al. A lightweight YOLOv4-Based forestry pest detection method using coordinate attention and feature fusion[J]. Entropy, 2021, 23(12): 1587. doi: 10.3390/e23121587
    [23] SUNKARA R, LUO T. No more strided convolutions or pooling: a new CNN building block for low-resolution images and small objects[C]. Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Springer, 2022: 443-459.
  • 加载中
图(7) / 表(7)
计量
  • 文章访问数:  1040
  • HTML全文浏览量:  608
  • PDF下载量:  249
  • 被引次数: 0
出版历程
  • 收稿日期:  2022-12-14
  • 修回日期:  2023-01-06
  • 录用日期:  2023-03-24
  • 网络出版日期:  2023-04-13

目录

    /

    返回文章
    返回