A novel defect detection method for color printing fabrics based on attention mechanism and space-to-depth transformation
摘要
Defect detection of color printing fabrics is a challenging branch of the textile industry. However, due to the issues of multi-scale defects and information loss of tiny objects, the defect accuracy of the existing methods fails to meet the requirements of online inspection. Motivated by the above issues, this paper proposes an improved YOLOV5 based on spatial pyramid pooling, named SPPAM-YOLOV5. Initially, a flexible spatial attention module is introduced to help enhance feature information and locate defects. Furthermore, a space-to-depth method is adopted to replace each stride convolution in backbone network to mitigate information loss. Additionally, a novel feature pyramid network with four prediction layers is constructed to materialize multi-scale feature fusion and detection. Finally, we replace the GIoU loss with Efficient-CIoU loss to improve the detection accuracy of defects with variable aspect ratios. An evaluation of our proposed model on color printing fabric defect dataset is conducted to demonstrate the performance, with a mean average precision (mAP) of 87.6% and FPS of 124.9, which outperforms current mainstream models at the same level. Moreover, our model obtains a remarkable improvement in APs and the recall rate on top of the YOLOV5s.