留言松/h2>

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

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

基于改进YOLOv5木板材表面缺陷的定量识别

贾浩甶/a>,徐华丛/a>,王立浶/a>,张金甞/a>,褚晓辈/a>,唐旭

downloadPDF
贾浩? 徐华? 王立? 张金? 褚晓? 唐旭. 基于改进YOLOv5木板材表面缺陷的定量识别[J]. 北京林业大学学报, 2023, 45(4): 147-155. doi: 10.12171/j.1000-1522.20220419
引用本文: 贾浩? 徐华? 王立? 张金? 褚晓? 唐旭. 基于改进YOLOv5木板材表面缺陷的定量识别[J]. 北京林业大学学报, 2023, 45(4): 147-155.doi:10.12171/j.1000-1522.20220419
Jia Haonan, Xu Huadong, Wang Lihai, Zhang Jinsheng, Chu Xiaohui, Tang Xu. Quantitative identification of surface defects in wood paneling based on improved YOLOv5[J]. Journal of Beijing Forestry University, 2023, 45(4): 147-155. doi: 10.12171/j.1000-1522.20220419
Citation: Jia Haonan, Xu Huadong, Wang Lihai, Zhang Jinsheng, Chu Xiaohui, Tang Xu. Quantitative identification of surface defects in wood paneling based on improved YOLOv5[J].Journal of Beijing Forestry University, 2023, 45(4): 147-155.doi:10.12171/j.1000-1522.20220419
doi:10.12171/j.1000-1522.20220419
基金项目:中央高校基本科研业务费专项(2572022BL03),国家自然科学基金面上项目?1870537(/div>
详细信息
    作者简今

    贾浩男。主要研究方向:木材无损检测。Email9a href="//www.inggristalk.com/j/article/doi/10.12171/mailto:jhn@nefu.edu.cn">jhn@nefu.edu.cn 地址?50040黑龙江省哈尔滨市香坊区和兴路26号东北林业大学机电工程学陡/p>

    责任作耄

    徐华东,教授,博士生导师。主要研究方向:活立木质量检测。Email9a href="//www.inggristalk.com/j/article/doi/10.12171/mailto:xhd-8215@163.com">xhd-8215@163.com 地址:同三/span>

  • 中图分类叶S784;TP391.4

Quantitative identification of surface defects in wood paneling based on improved YOLOv5

  • 摘要: 目的为解决人工及传统数字图像处理方法对木板材表面缺陷识别效果差、效率低等问题,提高木材利用率。以深度学习模型为基础,构建木板材表面缺陷检测系统,旨在拓展深度学习模型在木板材缺陷检测领域的应用、/sec> 方法基于“Wood Defect Database”公开数据集中?39张木板材缺陷图像,使用Imgaug数据增强库对数据集进行扩充;通过在主干特征网络部分引入SE注意力机制,使用focus、FPN + PAN结构构建YOLOv5木板材表面缺陷目标检测框架,进而采用迁移学习思想改进训练方式,将训练过程分为两个阶段(冻结阶段和解冻阶段)。然后将构建的模型与当前主流深度学习目标检测模型进行对比,最后利用混淆矩阵、Loss值变化曲线、模型大小、检测时间以及均值平均精确率等指标评价模型、/sec> 结果提出了一种基于YOLOv5模型对木板材表面缺陷中活节、死节、裂缝、孔洞的检测方法。模型对死节、活节、裂缝、孔洞识别结果的均值平均精确率分别约为98.66%?9.06%?8.10%?6.53%,并与当前主流检测模型进行比较,改进的模型具有更好的精确率、召回率和均值平均精确率,分别为97.48%?6.53%?8.22%。模型单幅图像平均检测时间为10.3 ms,最大检测耗时20.5 ms,检测效果与泛化特性较好,模型所占内存仅13.7 MB,易于移植、/sec> 结论实验表明改进的YOLOv5模型可用于检测木板材表面主要缺陷。且模型对木板材表面缺陷的识别效果优于其?种主流检测模型。在维持原有检测精度的基础上,提高了小目标缺陷的识别能力,减少了木板材缺陷漏检的情况,实现了在复杂场景下的快速检测、/sec>

  • ?nbsp; 1通过Imgaug数据增强后图片与原图片的对比

    Figure 1.Comparison between the image enhanced by Imgaug data and the original image

    ?nbsp; 2YOLOv5s网络结构国/p>

    i为输入通道数,o为输出通道数,k为卷积核大小+i>s为步长,n为卷积数量、i>iis the number of input channels,ois the number of output channels,kis the convolution kernel size,sis the step size, andnis the number of convolutions.

    Figure 2.Network structure diagram of YOLOv5s

    ?nbsp; 3SE-Net结构示意国/p>

    $ {X}_{1} $指输入,U是主干网络每一层卷积层的输出,c?b>w?i>h?i>C?i>W?i>H均为特征向量? {X}_{2} $表示结合了权重之后最终的输出? {F}_{\mathrm{t}\mathrm{r}} $为卷积操作,运算$ {F}_{\mathrm{s}\mathrm{q}} $为挤压操作,$ {F}_{\mathrm{e}\mathrm{x}} $表示激励操作,$ {F}_{\mathrm{s}\mathrm{c}\mathrm{a}\mathrm{l}\mathrm{e}} $指代缩放操作? {X}_{1} $ refers to input,Urefers to the output of each convolution layer of the backbone network,c,w,h,C,W,Hare the eigenvector, $ {X}_{2} $ represents the final output after combining weights. $ {F}_{\mathrm{t}\mathrm{r}} $ is a convolution operation, $ {F}_{\mathrm{s}\mathrm{q}} $ is the squeeze operation,$ {F}_{\mathrm{e}\mathrm{x}} $ stands for excitation operation, $ {F}_{\mathrm{s}\mathrm{c}\mathrm{a}\mathrm{l}\mathrm{e}} $ refers to the scale operation.

    Figure 3.SE-Net structure diagram

    ?nbsp; 4引入SE-Net注意力机制模坖/p>

    Figure 4.Introducing SE-Net attention mechanism module

    ?nbsp; 5引入注意力机制前后识别结果对毓/p>

    Figure 5.Comparison of recognition results before and after the introduction of attention mechanism

    ?nbsp; 6改进模型分析结果总结

    mAP@0.5表示在交并比(IoU)设?.5时,每一个类别下所有图片的均值平均精确率 mAP@0.5 indicates the average accuracy of all images in each category when the intersection and combination ratio is set to 0.5.

    Figure 6.Summary of improved model analysis results

    ?nbsp; 7木板材缺陷识别效果图

    Figure 7.Effect picture of wood plate defect identification

    ?nbsp; 2实验环境

    Table 2.Experimental environment

    配置名称 Configuration name 版本参数 Version parameter
    系统环境 System environment Ubuntu18.04
    中央处理 Central processing unit AMD Ryzen7 4800H with Radeon Graphics@2.90 GHz
    图形处理 Graphics processing unit NVIDIA GeForce RTX 2060 6 GB
    图形处理器加速库 Graphics processing unit acceleration library CUDA tookit10.1,cuDNN7.5.6
    随机存取存储 Random access memory 16 GB
    深度学习框架 Deep learning framework Pytorch1.8.0
    下载: 导出CSV

    ?nbsp; 3改进YOLOv5模型对不同缺陷识别结果对毓/p>

    Table 3.Comparison of improved YOLOv5 model for different defect identification results %

    标签 Label 精确 Precision rate 召回 Recall rate mAP@0.5 mAP@0.5?.95
    死节 Dead knot 97.35 97.50 98.66 78.74
    活节 Live knot 97.92 98.14 99.06 83.19
    裂缝 Crack 96.70 91.55 98.10 72.22
    孔洞 Hole 95.57 96.73 96.53 80.15
    注:mAP@0.5表示在交并比(IoU)设?.5时,每一个类别下所有图片的均值平均精确率,mAP@0.5?.95表示在不同交并比阈值(0.50 ~ 0.95,步?.05)(0.50?.55?.60?.65?.70?.75?.80?.85?.90?.95)上的均值平均精确率。Notes: mAP@0.5 indicates the average accuracy of all images in each category when the intersection and combination ratio is set to 0.5, mAP@0.5?.95 indicates the average accuracy of the mean value on the threshold of different intersection and combination ratios (0.50?.95, step size 0.05) (0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95).
    下载: 导出CSV

    ?nbsp; 4不同模型识别结果对比

    Table 4.Comparison of recognition results of different models

    网络模型
    Network model
    精确玆br/>Precision rate/% 召回玆br/>Recall rate/% mAP@0.5/% 检测时闳br/>Detection time/ms 模型大小
    Model size/MB
    SSD 81.17 91.60 86.12 91.4 92.1
    faster-RCNN 89.16 93.50 81.94 178.6 108.0
    YOLOv3 96.89 93.59 96.30 32.7 117.0
    YOLOv4 81.90 92.37 86.75 120.2 224.0
    YOLOv5 97.14 96.12 98.06 22.1 13.7
    改进的YOLOv5
    Improved YOLOv5
    97.48 96.53 98.22 10.3 14.1
    下载: 导出CSV
  • [2]Akhyar F, Novamizanti L, Putra T, et al. Lightning YOLOv4 for a surface defect detection system for sawn lumber[C]//Jay K C C, Klara N, Yong R, et al. IEEE 5th International Conference on Multimedia Information Processing and Retrieval (MIPR). New York: IEEE, 2022: 184?89. [3]肖雨? 杨慧? 王柯? ? 卷积神经网络在木材缺陷检测应用中的研究进展[J]. 木材科学与技? 2021, 35(3): 12?8. doi:10.12326/j.2096-9694.2020088

    Xiao Y Q, Yang H M, Wang K X, et al. Research progress of convolutional neural network in wood defect detection[J]. Wood Science and Technology, 2021, 35(3): 12?8. doi:10.12326/j.2096-9694.2020088 [4]Xia B, Luo H, Shi S. Improved faster R-CNN based surface defect detection algorithm for plates[J]. Computational Intelligence and Neuroscience, 2022, 2022: 11?2. [5]Mu H, Zhang M, Qi D, et al. Wood defects recognition based on fuzzy bp neural network[J]. International Journal of Smart Home, 2015, 9: 143?52. [6]Yang Y, Zhou X, Liu Y, et al. Wood defect detection based on depth extreme learning machine[J]. Applied Sciences, 2020, 10(21): 7488. doi:10.3390/app10217488 [7]Mu H, Zhang M, Qi D, et al. The application of RBF neural network in the wood defect detection[J]. International Journal of Hybrid Information Technology, 2015, 8(2): 41?0. doi:10.14257/ijhit.2015.8.2.04 [8]李超, 刘思佳, 曹军, ? 基于PSO优选特征的实木板材缺陷的压缩感知分选方法[J]. 北京林业大学学报, 2015, 37(7): 117?22.

    Li C, Liu S J, Cao J, et al. The method of wood defectrecognition based on PSO feature selection and compressed sensing[J]. Journal of Beijing Forestry University, 2015, 37(7): 117?22. [9]Chen L C, Pardeshi M S, Lo W T, et al. Edge-glued wooden panel defect detection using deep learning[J]. Wood Science and Technology, 2022, 56(2): 477?07. doi:10.1007/s00226-021-01316-3 [10]缪伟? 陆兆? 王俊? ? 基于视觉的火灾检测研究[J]. 森林工程, 2022, 38(1): 86?2. doi:10.3969/j.issn.1006-8023.2022.01.011

    Miao W Z, Lu Z N, Wang J L, et al. Fire detection research based on vision[J]. Forest Engineering, 2022, 38(1): 86?2. doi:10.3969/j.issn.1006-8023.2022.01.011 [11]高明? 倪海? 张博? ? 一种基于GoogLeNet卷积神经网络的木节缺陷识别方法[J]. 森林工程, 2021, 37(4): 66?0. doi:10.3969/j.issn.1006-8023.2021.04.009

    Gao M Y, Ni H M, Zhang B Y, et al. A method for recognizing wood knots defects based on GoogLeNet convolutional neural network[J]. Forest Engineering, 2021, 37(4): 66?0. doi:10.3969/j.issn.1006-8023.2021.04.009 [12]He T, Liu Y, Yu Y, et al. Application of deep convolutional neural network on feature extraction and detection of wood defects[J]. Measurement, 2020, 152: 107357. doi:10.1016/j.measurement.2019.107357 [13]Urbonas A, Raudonis V, Maskeliūnas R, et al. Automated identification of wood veneer surface defects using faster region-based convolutional neural network with data augmentation and transfer learning[J]. Applied Sciences, 2019, 9(22): 4898. doi:10.3390/app9224898 [14]Shi J, Li Z, Zhu T, et al. Defect detection of industry wood veneer based on NAS and multi-channel mask R-CNN[J]. Sensors, 2020, 20(16): 4398. doi:10.3390/s20164398 [15]Sun P A. Wood quality defect detection based on deep learning and multicriteria framework[J]. Mathematical Problems in Engineering, 2022, 2022: 9?6. [16]Wang L, Yan W Q. Tree leaves detection based on deep learning[C]//Minh N, Wei Q Y, Harvey H. International Symposium on Geometry and Vision. Auckland: Auckland University of Technology (AUT), 2021: 26?8. [17]赵睿, 刘辉, 刘沛? ? 基于改进YOLOv5s的安全帽检测算法[J/OL]. 北京航空航天大学学报, 2023[2023?01?12]. https://doi.org/10.13700/j.bh.1001-5965.2021.0595.

    Zhao R, Liu H, Liu P L, et al. Research on safety helmet detection algorithm based on improved YOLOv5s[J/OL]. Journal of Beijing University of Aeronautics and Astronautics, 2023[2023?1?2]. https://doi.org/10.13700/j.bh.1001-5965.2021.0595. [18]李彦? 范习? 杨绪? ? 基于自注意力卷积网络的遥感图像分类[J]. 北京林业大学学报, 2021, 43(10): 81?8. doi:10.12171/j.1000-1522.20210196

    Li Y F, Fan X J, Yang X B, et al. Remote sensing image classification framework based on self-attention convolutional neural network[J]. Journal of Beijing Forestry University, 2021, 43(10): 81?8. doi:10.12171/j.1000-1522.20210196 [19]邹梓? 盖绍? 达飞? ? 基于注意力机制的遮挡行人检测算法[J]. 光学学报, 2021, 41(15): 157?65.

    Zou Z Y, Gai S Y, Da F P, et al. Occluded pedestrian detection algorithm basedon attention mechanism[J]. Acta Optica Sinica, 2021, 41(15): 157?65. [20]Gao M, Wang F, Liu J, et al. Estimation of the convolutional neural network with attention mechanism and transfer learning on wood knot defect classification[J]. Journal of Applied Physics, 2022, 131(23): 233101. doi:10.1063/5.0087060 [21]Du J. Understanding of object detection based on CNN family and YOLO[J] . Journal of Physics Conference, 2018, 1004: 012029. [22]Gao M, Song P, Wang F, et al. A novel deep convolutional neural network based on ResNet-18 and transfer learning for detection of wood knot defects[J]. Journal of Sensors, 2021, 2021: 16?7.
    相关文章
  • 施引文献
  • 资源附件 (0)
  • 加载? />       <div class=
    ?7)/ ?4)
    计量
    • 文章访问?157
    • HTML全文浏览野66
    • PDF下载野38
    • 被引次数:0
    出版历程
    • 收稿日期:2022-10-20
    • 录用日期:2023-03-19
    • 修回日期:2023-03-16
    • 网络出版日期:2023-03-21
    • 刊出日期:2023-04-25

    目录

      Baidu
      map