# Fabric Defect Detection Using L0 Gradient Minimization and Fuzzy C-Means
## 4 Experimental Results and Discussion
### Quantitative Comparison  
Besides visual qualitative comparisons, we also did quantitative comparisons. A group of metrics, including accuracy (ACC), true positive rate (TPR), false positive rate (FPR), and positive predictive value (PPV), were employed to quantify the accuracies of the other methods. A number of measurement  
Figure 17: Various texture fabric defect detection results using different methods (**a**). Different fabric type defects (**b**). Our method (**c**) carried out by human inspectors. (**d**) The automatic band selection method [6]. (**e**) The EADL method [5]. metrics; namely, true positive (TP), false positive (FP), true negative (TN), and false negative (FN), should be calculated. Based on those parameters, accuracy is calculated as: ACC = (TP + TN)/(TP + FN + FP + TN); true positive rate: TPR = TP/(TP + FN); false positive rate: FPR = FP/(FP + TN); positive predictive value: PPV = TP/(TP + FP). For these evaluation indicators, the proposed L0 gradient minimization and fuzzy c-means can obtain higher ACC and PPV values, and lower TPR, FPR values. We also adopted the intersection-over-union (IOU) to quantitatively evaluate the performance of different methods. For the segmentation task, IOU is defined as: IOU = TP/(TP + FN + FP). For intersection-over-Union (IOU), the ideal case is a ratio of 100%, which usually stipulates that when the IOU value is greater than 50%, the detection is considered correct (which is also taken into consideration in the detection). Figure 18 illustrates the ACC, TPR, FPR, PPV, and IOU results of the plain fabric, twill fabric, star-patterned fabric, dot-patterned fabric, box-patterned fabric, striped fabric, and statistical-texture fabric. Our method achieves most of the high scores in 35 testing items. The proposed method is better than other methods in Figure 18a,c-e. As shown in Figure 18a, the ACC by the proposed method, for the plain fabric dataset, twill fabric dataset, the dot-patterned fabric dataset, box-patterned fabric dataset, and statistical-textures defect dataset, are 96.99%, 98.40%, 98.87%, 96.13%, and 97.63%, respectively. As shown in Figure 18b, the proposed method can obtain the lowest TPR value for the star-patterned fabric defect detection. Figure 18c shows that the FPR values of our method are almost smaller than other approaches. Figure 18d shows that our method obtains the highest PPV value for the twill fabric, box-patterned fabric, striped fabric, and statistical-texture fabric. Figure 18e clearly indicates that our method provides the optimal IOU for all types of fabric. Furthermore, it can be observed that the proposed method obtains higher ACC, PPV, and IOU values, and lower TPR, and FPR values. These results verify the effectiveness of our proposed method, which performed better than the EADL method [5] and the automatic band selection method [6]. Considering the fact that the captured fabric images are often affected by noise, light intensity, and blurring, we analyzed the robustness of each method in different conditions. Table 1 shows the detection results of different methods (the proposed method, the EADL method [5], and the automatic band selection method [6]) in noisy, luminously intense, and blurry conditions. According to Table 1, when signal-noise ratio (SNR) decreases gradually, the ACC and IOU can remain a high level, especially when SNR = 10 dB; then, ACC can remain around 0.85. It was shown that the proposed method is robust when dealing with noise. In addition, we found that when luminous intensity decreases 20% or increases 20%, ACC can remain above 0.90. When increasing the blur with a radius of 20, the ACC and IOU can remain at a high level.