# Automated Surface Defect Inspection Based on Autoencoders and Fully Convolutional Neural Networks
## 4 Conclusions  
The experimental results have revealed the effectiveness of the proposed algorithm for surface inspection. Only normal samples are required for the proposed algorithm. A simple data augmentation scheme is adopted for the generation of defective images for the training of the neural networks. This could facilitate the collection of a training set for the algorithm. In addition, the ability for the self-generation of the template by the AE for an input test image is beneficial for lifting the restriction on the synchronization between the position of the test image and the template. Flexibility for the inspection process can be improved. The segmentation operations carried out by the FCN can separate the templates into different regions for independent inspection. Both the self-generation and segmentation operations for templates could effectively enhance both the robustness and accuracy for defect detection. Experiments on the gold finger areas and the backplate surface of a display card have been conducted. Both the visualization and numerical results are provided. We conclude from the results that the proposed algorithm provides an effective solution for defect detection applications where flexibility, reliability, and accuracy of the inspection are important concerns.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**The Proposed Algorithm**} & **Algorithm in [14]** & **Algorithm in [24]** \\ \hline Gold Finger & AUROC & 0.978 & 0.690 & 0.859 \\ (\(256\times 256\)) & Latency & 4.1 ms & 1.7 ms & 1.7 ms \\ \hline Backplate Surface & AUROC & 0.983 & 0.674 & 0.886 \\ (\(512\times 512\)) & Latency & 47.3 ms & 7.3 ms & 7.3 ms \\ \hline \hline \end{tabular}
\end{table}
Table 4: Summary of AUROC and inference latency for various algorithms.  
Figure 17: The ROC curve for the inspection of backplate surface for various algorithms: (**a**) ROC curve of the proposed algorithm; (**b**) ROC curve for algorithm in [14]; (**c**) ROC curve for algorithm in [24].  
Regarding future research of the proposed study, labeling would be a potential extension. In the proposed algorithm, the coherent regions of the test targets are specified and labeled by direct visual observation. Efforts are therefore required for accurate labeling. Degradation in performance may be possible with improper labeling. Semi-supervised techniques for the proposed system are then desired for alleviating the efforts for labeling. The techniques are expected to provide accurate detection even with noisy labels. The higher robustness against noisy labels would be beneficial for the deployment of the proposed algorithm for new inspection targets with minimal labeling efforts.  
Conceptualization, T.-M.T., W.-J.-H. and Y.-J.J.; Methodology, C.-W.L. and L.Z.; Software, C.-W.L., L.Z. and C.-C.T.; Visualization, C.-W.L., L. Z. and C.-C.T.; Validation, C.-C.T., T.-M.T. and Y.-J.J.; Supervision, T.-M.T. and W.-J.H.; Project administration, W.-J.H.; Writing--original draft, W.-J.H. All authors have read and agreed to the published version of the manuscript.  
This research was jointly funded by the Ministry of Science and Technology, Taiwan, and TUL Corporation under Grant MOST 110-2622-E-003-003.  
Not applicable.  
The data are contained within the article.  
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.  
The following abbreviations are used in this manuscript:  
AE. Autoencoder.  
AUROC. Area Under Receiver Operating Characteristic.  
CNN. Convolutional Neural Network.  
FCN. Fully Convolutional Network.  
FPR. False Positive Rate.  
IoT. Internet of Things.  
ReLU. Rectified Linear Unit.  
ROC. Receiver Operating Characteristic.  
TPR. True Positive Rate.