# Automated Surface Defect Inspection Based on Autoencoders and Fully Convolutional Neural Networks
## 3 Experimental Results
### Surface Inspection for Gold Finger Connectors  
The gold finger of a display card is the connector on the edge of the corresponding printed circuit board. Because the gold finger connector is a long and narrow strip, it would be best to acquire portions of the strip one at a time for accurate inspection. Figure 8 shows the examples of images of normal or defective samples of a gold finger connector. Some variations can be observed on the normal samples revealed in Figure 8a, especially for the regions outside the gold finger area. For the defective samples, scratches can be observed. Furthermore, we can see from Figure 8b that there are no regular patterns for the scratches. It would then be difficult to use the classification-based methods or the local abnormalities-based methods for accurate defect detection. The proposed algorithm is based on the AE shown in Figure 4, which can be trained by the images augmented from only a small number normal samples. In the experiments, 100 training images (i.e., \(K=100\)) augmented from 16 normal samples of gold finger are employed for training. All the normal samples, training images, and the reproduced images by AE have the same dimension \(256\times 256\). That is, the \(S_{k}\), \(X_{k}\), and \(Y_{k}\) have the same dimension of \(M=256\times 256\). The augmentation process is based on noise corruption operations shown in (8). For an input image from a defective sample, it is then expected that the defective parts of the image may not be reproduced by the AE. Figure 9 shows examples of the input test images and their reconstructions by the AE. The test images are outside the training set. There are two scenarios: one is with a normal input sample, and the other is with a defective input sample. All the input test images considered in the examples are outside the training set. We can observe that, for the scenario with a normal sample shown in Figure 9a,b, the input image can be accurately reproduced. On the contrary, for the scenario with a defective sample, revealed in Figure 9c,d, the reconstruction is not  
Figure 7: The proposed online inspection system. accurate. In fact, most of the defective regions are removed on the output image. We can then view the image produced by the AE as the template for the defect detection. Figure 8: Examples of normal or defective samples of gold finger connector images. (**a**) Normal samples with no defects; (**b**) defective samples. Figure 9: Examples of the input test images and their reconstructions by the AE for gold finger connector images: (**a**) normal test sample; (**b**) reconstructed normal test sample by the AE; (**c**) defective test sample; (**d**) reconstructed defective test sample by the AE. The reconstructed images produced by the AE can be segmented into two regions (i.e., \(N=2\)): one is the gold finger area, and the other is the area outside the gold finger connector. The corresponding FCN for the segmentation is trained by the images reproduced by the AE. There are 100 images for the FCN training. Figure 10 shows the results of image segmentation produced by the FCN. All the test images considered in the examples are outside the training set. It can be observed from Figure 10 that the gold finger areas can be accurately identified for the test images considered in the experiments. The general inspection procedure outlined in Algorithm 1 can be further simplified for the inspection of the gold finger connector. In this case, the focus of the surface inspection is actually on the white areas produced by the FCN shown in Figure 10b, which correspond to the gold finger area. Only the L2 distance of each block \(y\) located in the white area of the reconstructed test image produced by the AE, as well as the corresponding block \(x\) in the original test image, is measured. When the resulting L2 distance is larger than a pre-specified threshold, the block is said to be defective.