## 4 Experiments
### Results and Discussion
#### 4.3.1 DAGM2007
Table 4 shows the comparison between our method and others in accuracy and the amount of training data. Both the methods proposed in the Ref. [1; 2; 3] and our method use CNN to detect defection. Although the accuracy of our method is not much higher than the above three, the amount of training data in our method is far less than theirs. For the first six classes of images, our wavelet model has 5037 patches (64 \(\times\) 64 pixels) on average for each class. The total training set had 20,631,552 pixels in each class. In the \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Class**} & **Our Non-** & **Our** & **[PERSON]’s** & **[PERSON]’s** & **[PERSON]’s** & **[PERSON]’s** & **Statistical** & **SIFT and** & **Weibull**[**44**] & **[PERSON]’s** \\  & **Wavelet** & **Model** & **Mode** & & **CNN**[1] & **CNN**[2] & **CNN**[3] & **Features**[42] & **ANN**[43] & **Weibull**[**44**] & **Model**[**26**] \\ \hline TPR (\%) & & & & & & & & & & \\
2 & 95.8 & 97.5 & 100 & 100 & 100 & 100 & 94.3 & 95.7 & -* & 92.5 \\
3 & 87.0 & 100 & 100 & 100 & 100 & 95.5 & 99.5 & 98.5 & 99.8 & 89.6 \\
6 & 100 & 99 & 100 & 100 & 100 & 100 & 100 & 99.8 & 94.9 & 93.8 \\
7 & 66.5 & 97.5 & 100 & 100 & - & - & - & - & 95.9 \\
8 & 100 & 96.5 & 100 & 100 & - & - & - & - & - & 95.9 \\
9 & 74 & 99.5 & 100 & 100 & - & - & - & - & - & - \\
10 & 51 & 92 & 100 & 100 & - & - & - & - & - & - \\ TNR (\%) & & & & & & & & & & \\
2 & 97.5 & 99.4 & 100 & 99.8 & 100 & 97.3 & 80 & 91.3 & - & - \\
3 & 98.8 & 99 & 100 & 96.3 & 100 & 100 & 100 & 100 & - \\
6 & 100 & 99.9 & 100 & 100 & 100 & 99.5 & 96.1 & 100 & 100 & - \\
7 & 100 & 99.5 & 100 & 100 & - & - & - & - & - & - \\
8 & 100 & 98.9 & 100 & 100 & - & - & - & - & - & - \\
9 & 55.9 & 100 & 100 & 99.9 & - & - & - & - & - & - \\
10 & 99.9 & 98.0 & 100 & 100 & - & - & - & - & - & - \\ AVEACC (\%) & & & & & & & & & & & \\
96.1 & 99.3 & 100 & 99.7 & 99.8 & 99.2 & 95.9 & 98.2 & 97.1 & - \\ \hline \hline \end{tabular}  
* The Refs. [2; 3; 42; 43; 44] only tested the first six classes, so the rest use “-” representations.  
\end{table} 
Table 3: The results of our methods in the DAGM2007 dataset and the comparison of others. Here, TPR and TNR are recorded by adjusting the threshold of the judgment strategy to make the acc maximum. Figure 15: The accuracy curve and loss curve of the wavelet model and non-wavelet model. Ref. [1; 2; 3], the total training set had 209,190,912, 867,631,104 and 221,729,792 pixels in each class, respectively. As for the last four classes of images, the numbers of our model and that of the Ref. [1] were 40,710,144 and 419,430,400 pixels, respectively. Through comparison, it can be found that although the average accuracy of the Ref. [1] is 0.4% higher than our method, the total training pixels In the Ref. [1] is 10 times bigger than ours. In the Ref. [2], the average accuracy is 0.5% higher than our method, but their total training pixels is 42 times bigger than ours. Compared with the Ref. [2], the average accuracy of our method is not only 0.1% higher than that of them, but the total pixels of our training set is also one-tenth of them. In the field of deep learning, models usually have better performance on the trained data. Therefore, the extensive use of data as training sets can help to improve the prediction accuracy of their model, but it will also increase the amount of calculation and the training time. The Ref. [25] proposed a four-stage appearance defect detection model which can achieve high detection accuracy. They used U-Net to segment those candidate defect regions the image and then make corrections and decisions, while ours only uses the basic convolutional neural network. In contrast, our focus is on data processing and judgment, and the complexity of the model is low.