Research on fabric defect detection method based on improved YOLOv5
A fabric defect detection method based on an improved YOLOv5 was proposed to address issues such as small target size and extreme aspect ratio in fabric defects.In this method,the self-attention mechanism CotNet network was introduced on the basis of the original network model.The PAFPN network in the neck network was optimized to a BiFPN network.Additionally,the target loss function was improved to a CIoU loss function to enhance the model's ability to collect contextual information between adjacent keys and to detect small targets and large defects with significant size changes more accurately.The proposed model achieves more accurate boundary box regression while enhancing the detection ability of small targets and large defects with significant size changes.It is experimentally demonstrated that the improved model in this paper improves by 6.8%and accuracy by 6.7%on the fabric defect detection dataset compared with YOLOv5 model,which validates the model.