高级检索

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

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

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

       

      Abstract:
        Objective  This 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.
        Method  Based 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.
        Result  A 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.
        Conclusion  The 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.

       

    /

    返回文章
    返回