# Fabric Defect Detection Using L0 Gradient Minimization and Fuzzy C-Means
## 1 Introduction  
Fabric defect detection plays a crucial role in the automatic inspection in textile production processes. However, traditional fabric defect defection is often dependent on human inspection, and quality controls often rely to experience of specialized workers. It is noted that the human workers are prone to fatigue and boredom due to the repetitive nature of their tasks [1]. Thus, the human inspection involves limitations in terms of accuracy, coherence, and efficiency when detecting defects. Since the fabric textures are so complicated (including plain weave fabric, knitted fabric, twill fabric, laces, and pattern fabric) [2], the fabric colors are variable, and the contrasts between fabric defects and background are low, generalized defect detection exploration is highly challenging.  
Currently, automated defect detection methods based on machine vision have drawn much attention. Gaussian mixture entropy modeling [3] and wavelet transform [4] were used to detect defect in simple plain and twill fabric images via transformation and reconstruction processes. However, most of these methods designed for the simplest plain and twill fabrics, which cannot be effectively applied on complicated patterns fabric, such as the dot-patterned fabric, star-patterned fabrics and statistical-texture fabrics. The entropy-based automatic selection of the wavelet decomposition level (EADL) [5] method and the automatic band selection method [6] achieved defect defection in statistical and structural textures. Bollinger bands (BB) [7] and image decomposition (ID) methods [8] have been shown to perform robustly for dot-patterned, star-patterned and box-patterned fabrics. However, it remains unknown whether these two methods can be used for plain, twill, and statistical-texture fabrics. In a preliminary evaluation, the BB and ID methods failed to recognize some defective samples. As shown in Figure 1, the BB and ID methods are weak at differentiating defects with directional features. These methods achieve good results on a certain texture, but it remains challenging to robustlyand accurately handle the fabric defect image if it has a complicated patterns texture, low contrast between defect object and background, various colors, and a low signal-to-noise ratio.  
To address these problems, we present a novel method based on L0 gradient minimization (LGM) and fuzzy c-means (FCM), which provides a new perspective for the detection of fabric defects. Usually, a defect-free fabric image in industrial products has consistent texture, and the defect can be considered as the defective structure information and texture information. In our work, we first used the LGM method to filter the input image to eliminate the influence of texture information on fabric defects. Then, the filtered results with just defective information were segmented by applying the FCM. The proposed method can handle the defect with the plain fabric, twill fabric, star-patterned fabric, dot-patterned fabric, box-patterned fabric, striped fabric, and statistical-texture fabric (as shown in Figure 2).  
Figure 1: Failure of the BB and ID methods for detecting defects. (**a**) Defect sample, (**b**) detection result using the BB method, and (**c**) detection result using the ID method.  
Figure 2: Various textures of fabric images. (**a**) Plain fabric, (**b**) twill fabric, (**c**) star-patterned fabric, (**d**) dot-patterned fabric, (**e**) statistical-texture fabrics, (**f**) box-patterned fabric, and (**g**) striped fabric.  
The remainder of this paper is organized as follows. Section 2 briefly discusses some related works. Section 3 mainly focuses on presents the proposed method. The experiment results and discussions are given in Section 4. Conclusions and future works pertaining to this work are presented in Section 5.