Appearance quality defects can reduce the strength of particleboard and affect the appearance of the product. Therefore, fast and accurate detection of particleboard defects can greatly release the production potential and has a very significant research value. The traditional target detection algorithm has the disadvantages of insufficient detection capability and slow detection speed, which cannot well meet the needs of actual production. In order to solve the detection difficulties of small target and unobvious features in particleboard defect dataset, and considering the limitation of model resources by application scenarios, an improved YOLOv5 defect detection model is proposed in this paper. Firstly, the high-resolution defect images are sliced by sliding window slicing to build a low-resolution sub-image dataset. To avoid color distortion in the fusion process, the dataset is expanded with Poisson fusion and gamma enhancement. Then, a microscale layer was added to YOLOv5 and the original prediction head was replaced with the C3STR module to enhance the modeling capability of local and global features. In addition, a context information-enhanced BiFPN structure (CE-BiFPN) is designed to improve the small target detection capability of BiFPN by cross-domain fusion of different scale feature layers and obtaining context information of different sensory fields. The experimental results show that the improved YOLOv5 model achieves an average accuracy (mAP) of93.6% in the particleboard defect dataset, which is 4.9% better than YOLOv5. The APs of glue spots with obvious small-target characteristics and large shavings were improved by 17.2% and 6.4%, respectively, which proved that the improved model in this paper can effectively detect small-target defects in particleboards.
Zhiyuan ShenYan LvYihua NiPengfei Wang