基金项目:中央高校基本科研业务费专项(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
-
计量
- 文章访问?157
- HTML全文浏览野66
- PDF下载野38
- 被引次数:0
出版历程
- 收稿日期:2022-10-20
- 录用日期:2023-03-19
- 修回日期:2023-03-16
- 网络出版日期:2023-03-21
- 刊出日期:2023-04-25
Quantitative identification of surface defects in wood paneling based on improved YOLOv5
College of Mechanical and Electrical Engineering, Northeast Forestry University, Harbin 150040, Heilongjiang, China
摘要:
目的为解决人工及传统数字图像处理方法对木板材表面缺陷识别效果差、效率低等问题,提高木材利用率。以深度学习模型为基础,构建木板材表面缺陷检测系统,旨在拓展深度学习模型在木板材缺陷检测领域的应用、/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>
Abstract:
ObjectiveThis paper aims to solve the problems of poor recognition and low efficiency of surface defects of wood panel lumber by manual and traditional digital image processing methods, and to improve the utilization rate of wood. Based on the deep learning model, we constructed a wood panel surface defect detection system, aiming to expand the application of deep learning model in the field of wood panel defect detection.
MethodBased on 839 wood panel defect images in the public dataset “Wood Defect Database? the dataset was expanded using Imgaug data enhancement library; by introducing SE attention mechanism in the backbone feature network part, the YOLOv5 wood panel surface defect target detection framework was constructed using focus, FPN + PAN structure, and then the transfer learning idea to improve the training method and divide the training process into two phases (freezing phase and unfreezing phase). Then the constructed model was compared with the current mainstream deep learning target detection models, and finally the model was evaluated using confusion matrix, loss value change curve, model size, detection time, and mean average accuracy.
ResultA detection method based on YOLOv5 model for live knots, dead knots, cracks and holes in wood panel surface defects was proposed. The mean average accuracy of the model for dead knots, live knots, cracks, and hole identification results were about 98.66%, 99.06%, 98.10% and 96.53, respectively, and compared with the current mainstream detection models, the improved model had better accuracy, recall, and mean average accuracy of 97.48%, 96.53% and 98.22%, respectively. The average detection time of the model for a single image was 10.3 ms, and the maximum detection time was 20.5 ms. The detection effect and generalization characteristics were good, and the model only occupied 13.7 MB of memory, making it easy to transplant.
ConclusionThe experiments indicate that the improved YOLOv5 model can be used to detect the main defects on the surface of wood paneling. The model is better than the other five mainstream inspection models in identifying surface defects. On the basis of maintaining the original detection accuracy, it improves the recognition of small target defects, reduces the situation of missing wood panel defects, and realizes fast detection in complex scenes.
[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.