PurposeThe problem of fabric defect detection is a particularly challenging task, as the fabric defects occupy only a small portion of the image pixels and it is difficult to collect sufficient samples for training deep learning-based models. The purpose of this work is to present a novel self-supervised learning method to address this problem.Design/methodology/approachIn order to solve the problem of lack of defect samples, based on the fabric-specific degree of texture regularity, we propose an anomaly generation method to create synthetic fabric defects by destroying the normal fabric texture. To improve the detection of defects of different sizes, a global–local parallel detection mechanism is proposed. A self-supervised model including an anomaly generation module, a reconstruction subnetwork and a discriminative subnetwork is established to achieve model training without prior anomaly information.FindingsThe proposed method features self-supervised training, does not require no labelled anomaly data and detects anomalies by distinguishing their distance from normal samples at both global and local levels. When tested on four fabric datasets, our approach outperforms state-of-the-art unsupervised and self-supervised methods and achieves significantly higher localization accuracy.Originality/valueA high-fidelity fabric defects synthesis method is presented to alleviate the problem of collecting numerous fabric defects, providing a reference for other surface anomaly detection problems. The proposed global–local parallel detection mechanism can serve as a reference for other methods dedicated to detecting particular anomalies. The proposed self-supervised network model can effectively locate fabric anomalies without prior labelling information, which could be used as a framework for other model designs.
Read full abstract