# A Generic Automated Surface Defect Detection Based on a Bilinear Model
## 3 Experiments
### Contrast Experiments
#### 3.3.1 Open Datasets  
Since the vast majority of the evaluations using the two datasets for performance evaluation had only the experimental results of average precision, and average precision is the main and most important performance indicator for the multi-category task, therefore only the average precision of the methods is compared on two open datasets.  
(A) Localization and Classification Results of the DAGM_2007 Defect Dataset: For the DAGM_2007 dataset, the ratio of the training set to the test set is 1:1. Some experimental localization results of the proposed method running in the dataset are shown in Figure 8.  
In the combination image of the original image and Grad-CAM, the red region represents the confidence level of the pixels that the network discriminates against. The deeper the color, the higher the confidence level of the pixels in the image. The dataset is compared with the results of surface defect detection algorithms proposed by [PERSON] [33] and [PERSON] [34]. The experimental classification results are shown in Table 1.  
Figure 8: Examples of localization on DAGM_2007 defect dataset. From top to bottom are the original image, the combination of the original image and the heat map, and the location results of the defects. The Ground-Truth of the defect is marked with the red bounding boxes, while the localization results of the proposed method is marked with the blue bounding boxes. (**a**) classes1; (**b**) classes2; (**c**) classes3; (**d**) classes4; (**e**) classses5; (**f**) classes6.  
As can be seen from Table 1, although high classification accuracy has been achieved on the DAGM_2007 surface defect data set at present, the proposed method can still further improve the classification accuracy on the data set and achieve the automatic location of defects at the same time.  
(B) Localization and Classification Results of the NEU Defect Dataset: For the NEU surface defect dataset, a number of 150 images are randomly selected as the test set in each class of defects, and the remaining images are used as the training set. Some experimental localization results of the proposed method running in the dataset are shown in Figure 9.  
Most images of the NEU defect dataset have multiple defects, and the texture of each type of defective image is different, which brings more challenges to automatic location. As shown in Figure 9, although the proposed method does not perform well in defect localization when applied to NEU datasets, it can extract specific pixel regions to identify a certain class of images. Using this dataset, the proposed method was compared with the algorithms proposed by BYEC [6], [PERSON] et al. [35] and [PERSON] et al. [18]. To ensure the validity of the comparison results, the same training data generation method as the papers mentioned above is used. The experimental classification results are shown in Table 2.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Method** & **Average Precision** \\ \hline GLCM + MLP & 81.68\% \\ gcForest & 86.67\% \\ BCNN & 95.57\% \\ FCN [33] & 98.35\% \\ Zhao [34] & 98.53\% \\ Ours & 99.49\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of results on DAGM_2007 surface defect dataset.  
Figure 9: Localization results of the proposed method on the NEU defect dataset. From top to bottom are the original image, the combination of the original image and the heat map, and the location results of the defects. The Ground-Truth of the defect is marked with the red bounding boxes, and the localization results of the proposed method is marked with the blue bounding boxes. (**a**) crazing; (**b**) inclusion; (**c**) patches; (**d**) pitted-surface; (**e**) rolled-in-scale; (**f**) scratches.  
As can be seen from Table 2, compared with the latest methods proposed by [PERSON] and [PERSON], the proposed method has a higher detection accuracy in the NEU defect detection dataset.