Autoencoder-based anomaly detection for surface defect inspection
Introduction
Machine vision is an effective non-contact technology for automated defect inspection in the manufacturing process. Most of the traditional machine vision techniques are based on texture analysis. A set of discriminative features are extracted from the spatial or the spectral domain of the test image. A high-level multiple dimensional classifier such as Support Vector Machine (SVM) or Random Forest is then applied to identify defect samples. The success of the classification highly relies on the human experts to extract and select representative features based on the local gray-level (or color) and structure variations of a defect in the test image.
In the manufacturing environment, it is quite easy to collect normal samples as many as required. However, it is difficult to collect a sufficient number of defective samples in a short period of time to train robust classification models for defect detection. The machine vision methods currently available need handcrafted features based on the characteristics of individual defect types of a specific product, where the defect samples may not be sufficient for the analysis.
In this paper, the deep learning technique is explored to tackle the defect detection task without defect samples for the training. The proposed method is image-wise defect detection, i.e. it classifies a test image as defective or defect-free. It is not used for pixel-wise defect segmentation. The unsupervised convolutional autoencoder (CAE) is applied to extract the representative features that can well describe the distribution from a set of normal samples. The loss function of the conventional CAE measures only the reconstruction errors. It could make the extracted feature values widely spread in the high-dimensional variable space. When the trained CAE is used for anomaly detection, the encoded features of a defect sample image may thus fall within the range of the normal samples’ variable space. It could make the extracted features indistinguishable between normality and abnormality. A regularization penalty is thus included in the original CAE loss function to limit the spread of the learned feature values for normal training samples. It is expected that the distances of feature vectors between the normal samples are close to each other and the unseen defect samples yield sufficiently large distances from the normal samples. The proposed CAE-based model, denoted by -CAE, is tested on various material surfaces for defect detection, including textural surfaces and patterned surfaces. The proposed method is also compared to autoencoder-variant models based on encoded features and image reconstruction error.
This paper is organized as follows. Section 2 reviews the related work on defect detection with traditional machine vision and deep learning techniques. Anomaly detection with autoencoders for various applications is also discussed. Section 3 presents the original CAE and the regularized -CAE models for defect detection. Section 4 discusses the experimental results on various material surfaces. The paper is concluded in Section 5.
Section snippets
Related work
Traditional machine vision methods rely on the extraction of handcrafted features or the design of discrimination measures to identify defects in a test image. Texture analysis techniques [1] in image processing have been popularly used for defect detection in various material surfaces. Local texture features or descriptors are extracted from the spatial or the spectral domain [2] of a test image. Discriminant classifiers are then applied to identify defects. The statistical features or texture
CAE model
The autoencoder model used in this study is based on Convolutional Autoencoder (CAE) for practical implementation in manufacturing. The autoencoder architecture for unsupervised learning is composed of two parts, encoder and decoder. The encoder takes the raw image as the input, and the abstract representation from the encoder is then the input to the decoder. The encoder involves a series of convolutional layers and downsampling to compress the original data in a high-dimensional space into an
Experimental results
In this section, the performance of the CAE models with and without regularization is evaluated for defect detection in various material surfaces. The proposed models and methods are implemented with Tensorflow and Keras. They are executed on a PC equipped with Intel i7-7700 3.40 GHz CPU and one NVIDIA GTX 1080 Ti GPU. The CAE architecture used for feature extraction has been shown in Fig. 1. The detailed setting of each layer in the CAE models is presented in Table 1.
The Adam optimizer with a
Conclusions
The CAE has been a very popular unsupervised model to extract features for anomaly detection. However, the extracted features from the traditional CAE could be widely spread and degrade the performance for unsupervised defect detection. The main contribution of the paper is the two new regularization penalties that can effectively confine the spread of the extracted features in a very limited space from a set of defect-free samples. The first regularization is very effective and easy to train
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
References (42)
- et al.
Fabric defect detection systems and methods - a systematic literature review
Optik
(2016) - et al.
Automatic detection and classification of the ceramic tiles’ surface defects
Pattern Recogn.
(2017) - et al.
Local binary features for texture classification: taxonomy and experimental study
Pattern Recogn.
(2017) - et al.
Rotation invariant co-occurrence features based on digital circles and discrete Fourier transform
Pattern Recogn. Lett.
(2014) - et al.
Improved Gabor filters for textile defect detection
Procedia Eng.
(2011) - et al.
Texture analysis by fractal descriptors over the wavelet domain using a best basis decomposition
Physica A
(2016) - et al.
Wavelet-based defect detection in solar wafer images with inhomogeneous texture
Pattern Recogn.
(2012) - et al.
A survey of network anomaly detection techniques
J. Network Comput. Appl.
(2016) - et al.
A comparative evaluation of outlier detection algorithms: experiments and analysis
Pattern Recogn.
(2018) - et al.
Conditional classifiers and boosted conditional Gaussian mixture model for novelty detection
Pattern Recogn.
(2018)
Improving one class support vector machine novelty detection using nonlinear features
Pattern Recogn.
Deep learning for smart manufacturing: methods and applications
J. Manuf. Syst.
Design of deep convolutional neural network architectures for automated feature extraction in industrial inspection
CIRP Ann. – Manuf. Technol.
Soldering defect detection in automatic optical inspection
Adv. Eng. Inf.
A smart surface inspection system using faster R-CNN in cloud-edge computing environment
Adv. Eng. Inf.
Anomaly detection of defects on concrete structures with the convolutional autoencoder
Adv. Eng. Inf.
f-AnoGAN: fast unsupervised anomaly detection with generative adversarial networks
Med. Image Anal.
A review of recent advances in surface defect detection using texture analysis techniques
Electron. Lett. Comput. Vision Image Anal.
The influence of gray-level co-occurrence matrix variables on the textural features of wrinkled fabric surfaces
J. Text. Inst.
Unsupervised defect detection in textiles based on Fourier analysis and wavelet shrinkage
Appl. Opt.
Optimization of automated online fabric inspection by fast Fourier transform (FFT) and cross-correlation
Text. Res. J.
Cited by (63)
REB: Reducing biases in representation for industrial anomaly detection
2024, Knowledge-Based SystemsAEKD: Unsupervised auto-encoder knowledge distillation for industrial anomaly detection
2024, Journal of Manufacturing SystemsA high-accuracy and lightweight detector based on a graph convolution network for strip surface defect detection
2024, Advanced Engineering InformaticsAn automated defect detection method for optimizing industrial quality inspection
2024, Engineering Applications of Artificial IntelligenceFew-shot incremental learning in the context of solar cell quality inspection
2023, Expert Systems with Applications