留言板

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

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

改进YOLOv4的表面缺陷检测算法

李彬 汪诚 丁相玉 巨海娟 郭振平 李卓越

李彬,汪诚,丁相玉,等. 改进YOLOv4的表面缺陷检测算法[J]. 北京航空航天大学学报,2023,49(3):710-717 doi: 10.13700/j.bh.1001-5965.2021.0301
引用本文: 李彬,汪诚,丁相玉,等. 改进YOLOv4的表面缺陷检测算法[J]. 北京航空航天大学学报,2023,49(3):710-717 doi: 10.13700/j.bh.1001-5965.2021.0301
LI B,WANG C,DING X Y,et al. Surface defect detection algorithm based on improved YOLOv4[J]. Journal of Beijing University of Aeronautics and Astronautics,2023,49(3):710-717 (in Chinese) doi: 10.13700/j.bh.1001-5965.2021.0301
Citation: LI B,WANG C,DING X Y,et al. Surface defect detection algorithm based on improved YOLOv4[J]. Journal of Beijing University of Aeronautics and Astronautics,2023,49(3):710-717 (in Chinese) doi: 10.13700/j.bh.1001-5965.2021.0301

改进YOLOv4的表面缺陷检测算法

doi: 10.13700/j.bh.1001-5965.2021.0301
详细信息
    通讯作者:

    E-mail:warrant_74@126.com

  • 中图分类号: V239;TP181

Surface defect detection algorithm based on improved YOLOv4

More Information
  • 摘要:

    为解决航空发动机部件表面缺陷检测精度低、检测速度慢的问题,提出一种改进的YOLOv4算法进行智能检测。在路径聚合网络(PANet)结构中融合浅层特征与深层特征,增大特征检测尺度,同时去除自下而上的路径增强结构,提高小目标检测精度和整体检测速度;根据各类缺陷数量不同的情况,优化聚焦损失中的平衡参数,增加权重因子调节各类缺陷的损失权重,将改进后的聚焦损失代替分类误差中的交叉熵损失函数,降低样本不平衡和难易样本对检测精度的影响。实验表明:相比于原始YOLOv4算法,改进后的YOLOv4算法在测试集上的平均精度均值(mAP)为90.10%,提高了2.17%;检测速度为24.82 fps,提高了1.58 fps,检测精度也高于单发多框检测(SSD)算法、EfficientDet算法、YOLOv3算法和YOLOv4-Tiny算法。

     

  • 图 1  YOLOv4网络结构

    Figure 1.  YOLOv4 network structure

    图 2  改进的YOLOv4结构

    Figure 2.  Improved YOLOv4 structure

    图 3  缺陷类型

    Figure 3.  Defect types

    图 4  聚类中心为12的聚类结果

    Figure 4.  Clustering results when cluster center is 12

    图 5  不同模型的Fβ对比

    Figure 5.  Comparison of Fβ of different models

    图 6  各类缺陷样本的检测结果

    Figure 6.  Test results of various defect samples

    表  1  数据集中的目标数量

    Table  1.   Number of targets in dataset

    缺陷类型目标数量总和
    训练集验证集测试集
    裂纹1 5795805952 754
    缺口8482722701 390
    凹坑9313133491 593
    划痕1 7826286493 059
    下载: 导出CSV

    表  2  不同参数组合下的检测精度对比

    Table  2.   Comparison of detection accuracy under different parameter combinations

    α0β0mAP/%AP/%
    裂纹缺口凹坑划痕
    0.202.5088.0285.0486.9191.7388.38
    0.203.0088.2485.9487.7490.6688.60
    0.203.5089.0184.9090.6292.1888.32
    0.252.5089.0986.4090.9290.0788.95
    0.253.0090.1087.0991.2192.6589.45
    0.253.5088.4984.5590.0990.2789.06
    0.302.5089.0086.6287.6692.2989.41
    0.303.0088.6286.8690.6589.3087.68
    0.303.5088.3485.9889.5389.9187.94
    下载: 导出CSV

    表  3  不同模型的检测性能对比

    Table  3.   Comparison of detection performance of different models

    网络结构mAP/%Speed
    /fps
    AP/%
    裂纹缺口凹坑划痕
    YOLOv487.9323.2486.6492.2986.0286.78
    YOLOv4-A89.6124.9486.3693.1289.1089.86
    YOLOv4-B90.1024.8287.0991.2192.6589.45
     注:fps表示帧/s。
    下载: 导出CSV

    表  4  不同模型的网络结构参数量对比

    Table  4.   Comparison of network structure parameters of different models

    网络结构总参数量参数容量/MB
    YOLOv463 953 841243.96
    YOLOv4-A48 971 468186.81
    YOLOv4-B48 971 468186.81
    下载: 导出CSV

    表  5  不同算法的检测性能对比

    Table  5.   Comparison of detection performance of different algorithms

    网络结构mAP/%Speed/fps
    SSD60.0733.07
    EfficientDet-D049.3913.07
    EfficientDet-D157.7110.52
    EfficientDet-D263.409.45
    YOLOv386.2530.37
    YOLOv4-Tiny54.2564.55
    YOLOv487.9323.24
    YOLOv4-B90.1024.82
    下载: 导出CSV
  • [1] 李华. 基于孔探图像分析的航空发动机故障诊断专家系统研究[D]. 南京: 南京航空航天大学, 2015.

    LI H. Research on aeroengine fault diagnosis expert system based on endoscopic image analysis[D]. Nanjing: Nanjing University of Aeronautics and Astronautics, 2015(in Chinese).
    [2] 关玉璞, 陈伟, 高德平. 航空发动机叶片外物损伤研究现状[J]. 航空学报, 2007, 28(4): 851-857. doi: 10.3321/j.issn:1000-6893.2007.04.014

    GUAN Y P, CHEN W, GAO D P. Present status of investigation of foreign object damage to blade in aeroengine[J]. Acta Aeronautica et Astronautica Sinica, 2007, 28(4): 851-857(in Chinese). doi: 10.3321/j.issn:1000-6893.2007.04.014
    [3] 何嘉辉, 张栋善, 赵成, 等. 航空发动机叶片裂纹检测技术及应用分析[J]. 内燃机与配件, 2020(15): 151-152. doi: 10.19475/j.cnki.issn1674-957x.2020.15.065

    HE J H, ZHANG D S, ZHAO C, et al. Detection technology and application analysis of aero-engine blade crack[J]. Internal Combustion Engine & Parts, 2020(15): 151-152(in Chinese). doi: 10.19475/j.cnki.issn1674-957x.2020.15.065
    [4] LIU W, ANGUELOV D, ERHAN D, et al. SSD: Single shot multibox detector[C]//Proceedings of European Conference on Computer Vision. Berlin: Springer, 2016: 21-37.
    [5] REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: Unified, real-time object detection[C]//IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2016: 779-788.
    [6] REDMON J, FARHADI A. YOLO9000: Better, faster, stronger[C]//IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2017: 6517-6525.
    [7] REDMON J, FARHADI A. YOLOv3: An incremental improvement[C]//IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2018: 1804-0276.
    [8] BOCHKOVSKIY A, WANG C Y, LIAO H Y M. YOLOv4: Optimal speed and accuracy of object detection[C]//IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2020: 10934.
    [9] REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149.
    [10] DAI J F, LI Y, HE K M, et al. R-FCN: Object detection via region-based fully convolutional networks[C]//Proceedings of the 30th International Conference on Neural Information Processing Systems. New York: ACM, 2016: 379-387.
    [11] HE K M, GKIOXARI G, DOLLÁR P, et al. Mask R-CNN[C]//IEEE International Conference on Computer Vision. Piscataway: IEEE Press, 2017: 2980-2988.
    [12] 王玺坤, 姜宏旭, 林珂玉. 基于改进型YOLO算法的遥感图像舰船检测[J]. 北京航空航天大学学报, 2020, 46(6): 1184-1191. doi: 10.13700/j.bh.1001-5965.2019.0394

    WANG X K, JIANG H X, LIN K Y. Remote sensing image ship detection based on modified YOLO algorithm[J]. Journal of Beijing University of Aeronautics and Astronautics, 2020, 46(6): 1184-1191(in Chinese). doi: 10.13700/j.bh.1001-5965.2019.0394
    [13] 陈科山, 郝宇, 何泓波, 等. 基于R-D SSD模型航空发动机安装工位检测算法[J]. 北京航空航天大学学报, 2021, 47(4): 682-689.

    CHEN K S, HAO Y, HE H B, et al. Detection algorithm of aeroengine installation station based on R-D SSD model[J]. Journal of Beijing University of Aeronautics and Astronautics, 2021, 47(4): 682-689(in Chinese).
    [14] 旷可嘉. 深度学习及其在航空发动机缺陷检测中的应用研究[D]. 广州: 华南理工大学, 2017.

    KUANG K J. Research on deep learning and its application on the defects detection for aero engine[D]. Guangzhou: South China University of Technology, 2017(in Chinese).
    [15] 李浩. 基于图像识别的航空发动机叶片裂纹检测研究[D]. 成都: 电子科技大学, 2019.

    LI H. Research on the blade crack detection of aero-engine based on image recognition[D]. Chengdu: University of Electronic Science and Technology of China, 2019(in Chinese).
    [16] 陈为, 梁晨红. 基于改进SSD的航空发动机目标缺陷检测[J]. 控制工程, 2021, 28(12): 2329-2335. doi: 10.14107/j.cnki.kzgc.cpcc2019-063

    CHEN W, LIANG C H. Aeroengine target defect detection based on improved SSD[J]. Control Engineering of China, 2021, 28(12): 2329-2335(in Chinese). doi: 10.14107/j.cnki.kzgc.cpcc2019-063
    [17] WANG C Y, MARK L H Y, WU Y H, et al. CSPNet: A new backbone that can enhance learning capability of CNN[C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. Piscataway: IEEE Press, 2020: 1571-1580.
    [18] MISRA D. Mish: A self regularized non-monotonic neural activation function[EB/OL]. (2020-08-13) [2021-06-01]. https://arxiv.org/abs/1908.08681.
    [19] MAAS A L, HANNUN A Y, NG A Y. Rectifier nonlinearities improve neural network acoustic models[C]//Proceedings of Interational Conference on Machine learning, 2013: 1-6.
    [20] HE K M, ZHANG X Y, REN S Q, et al. Spatial pyramid pooling in deep convolutional networks for visual recognition.[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015, 37(9): 1904-1916. doi: 10.1109/TPAMI.2015.2389824
    [21] LIU S, QI L, QIN H F, et al. Path aggregation network for instance segmentation[C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2018: 8759-8768.
    [22] LIN T Y, DOLLÁR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]//IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2017: 2117-2125.
    [23] YU J H, JIANG Y N, WANG Z Y, et al. UnitBox: An advanced object detection network[C]//Proceedings of the 24th ACM International Conference on Multimedia. New York: ACM, 2016: 516-520.
    [24] REZATOFIGHI H, TSOI N, GWAK J, et al. Generalized intersection over union: A metric and a loss for bounding box regression [C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2019: 658-666.
    [25] ZHENG Z, WANG P, LIU W, et al. Distance-IoU loss: Faster and better learning for bounding box regression[C]//Proceedings of the AAAI Conference on Artificial Intelligence. 2020, 34(7): 12993-13000.
    [26] 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.
    [27] TAN M X, PANG R M, LE Q V. EfficientDet: Scalable and efficient object detection[C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2020: 10778-10787.
    [28] TAN M X, LE Q V. EfficientNet: Rethinking model scaling for convolutional neural networks [EB/OL].(2020-09-11) [2021-06-01]. https://arxiv.org/abs/1905.11946.
  • 加载中
图(6) / 表(5)
计量
  • 文章访问数:  675
  • HTML全文浏览量:  146
  • PDF下载量:  166
  • 被引次数: 0
出版历程
  • 收稿日期:  2021-06-04
  • 录用日期:  2021-10-11
  • 网络出版日期:  2023-03-10
  • 整期出版日期:  2023-03-30

目录

    /

    返回文章
    返回
    常见问答