Surface defect detection of solid wood board based on improvedYOLOv5 algorithm
Solid wood panels are widely used in construction,home furnishing,art and other fields around the world.Due to the different kinds of defects on the surface of the panels that affect their performance,the production effi-ciency of manually removing the defects of solid wood panels is low,and the quality cannot be guaranteed.In order to solve the problems of low efficiency and over-reliance on workers subjective judgment in the surface defect detec-tion of solid wood plates,this paper combines machine vision and deep learning methods,and uses machines instead of humans to detect defects in solid wood plates.Two kinds of solid wood plates of Pinus densiflora and Pinus sylves-tris var.mongolica were collected by color CCD camera,and cut into a total of 1 500 wood pictures with a size of 2 048 pixels and 2 048 pixels.The pictures contained living joints,dead joints,pith and crack defects.Based on the YOLOv5 structure,inspired by Vision Transformer,this paper uses the global attention module in the backbone net-work to improve the algorithm,and modifies the loss function for the lateral sawing method of solid wood plate,in or-der to obtain better results in the task of defect detection and sawing of solid wood plate.After full training,the over-all mAP on the test set reaches 0.974,and the recall rate reaches 0.946,which is 5.98%and 9.36%higher than the unmodified YOLOv5,respectively,showing certain advantages.
solid wood boarddefect detectingYOLOv5 algorithmVision Transformerwood process