Quantitative identification of surface defects in wood paneling based on improved YOLOv5
Jia Haonan,Xu Huadong,Wang Lihai,Zhang Jinsheng,Chu Xiaohui,Tang Xu
DOI: https://doi.org/10.12171/j.1000−1522.20220419
2023-01-01
Abstract:[Objective] 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 construct a wood panel surface defect detection system, aiming to expand the application of deep learning model in the field of wood panel defect detection. [Methods] Based on 839 wood panel defect images in the public dataset “Wood Defect Database”, the dataset is 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 is 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 is compared with the current mainstream deep learning target detection models,and finally the model is evaluated using confusion matrix, Loss value change curve, model size, detection time, and mean average accuracy. [Results] A detection method based on YOLOv5 model for live knots,dead knots, cracks and holes in wood panel surface defects is proposed. The mean average accuracy of the model for dead knots, live knots, cracks, and holes identification results are about 98.66%、99.06%、98.10%and 96.53, respectively, and compared with the current mainstream detection models, the improved model has better accuracy, recall, and combined average accuracy of 97.48%, 96.53%and 98.22%, respectively.The average detection time of the model for a single image is 10.3 ms, and the maximum detection time is20.5 ms. The detection effect and generalization characteristics are better, and the model occupies only13.7 MB of memory, which is easy to be ported. [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.