Accurate and timely detection of defects that may occur on fabric surfaces is a critical requirement for ensuring sustainable production quality in the textile industry. Due to human resource, time, and cost limitations, there is a growing interest in advanced image processing and deep learning-based automatic defect detection systems to improve the accuracy and efficiency of quality control in fabric manufacturing processes. In this study, we propose a novel hybrid PatchNet–Attention architecture that integrates patch-based feature extraction with an attention mechanism to improve defect localization and recognition. To evaluate the generalizability of the proposed architecture, its performance was tested on three public datasets using different class structures. Specifically, four classification scenarios were conducted: (i) classification with baseline models, (ii) patch-based classification, (iii) classification with a Convolutional Block Attention Module (CBAM)-enhanced model, and (iv) the proposed hybrid PatchNet–Attention architecture. Initially, 15 pre-trained Convolutional Neural Network (CNN) architectures were evaluated using transfer learning on the ZD001 dataset. The best-performing models, ResNet101V2 and Xception, were then selected as the foundation for constructing the hybrid PatchNet–Attention model. The experimental results demonstrate that configurations incorporating the attention mechanism consistently achieve the highest performance across all evaluated datasets. Specifically, the hybrid PatchNet–Attention model attained superior outcomes on the ZD001 dataset, with an F1-score of 99.15% and a Receiver Operating Characteristic–Area Under the Curve (ROC–AUC) of 99.5% in the three-class setting, and an F1-score of 97.28% with a ROC–AUC of 99.74% in the nine-subclass configuration. In the TILDA data set, the proposed model produced an F1 score of 87.74% and an ROC-AUC of 98.09%, while in the FDD data set it achieved an F1 score of 98.95% and a ROC-AUC of 99.50%. The source code of the proposed method can be accessed from the Data Availability section.
扫码关注我们
求助内容:
应助结果提醒方式:
