A Weakly Supervised Surface Defect Detection Based on Convolutional Neural Network
간접 관련 산업용 섬유 · (17) 스펀본드 부직포 (11) 배리어 필름(12) 증착 필름(16) CPI(투명 폴리이미드)
기본 정보
- 저자
- DOI
- 10.1109/access.2020.2977821
- 저널
- IEEE Access
- 발행년도
- 2020
- 발행기관
- Institute of Electrical and Electronics Engineers
- 피인용수
- 61
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1109/access.2020.2977821
- 토픽
- Surface Roughness and Optical Measurements
- OpenAlex ID
- W3010618895
평가 내용
- 관련도
- 간접 관련
- 사업분야
- 산업용 섬유 · (17) 스펀본드 부직포
- 부 분야
- (11) 배리어 필름, (12) 증착 필름, (16) CPI(투명 폴리이미드)
- R&D 측면
- 물성·성능 평가
- 확신도
- 0.70
- 근거 용어
- Surface defect detection, Convolutional Neural Network, Quality assurance, Weakly supervised learning, Localization network
- 판단 근거
- 본 논문은 딥러닝을 이용한 표면 결함 검출 알고리즘에 관한 연구로, 코오롱인더스트리의 직접적인 제품 연구는 아니나 제조 공정 중 품질 관리(Quality Control)를 위한 비전 검사 기술로서 활용 가치가 높습니다.
- R&D 활용 포인트
- 산업용 부직포, 필름, CPI 등 표면 품질이 중요한 제품의 제조 공정 내 자동화된 결함 검사 시스템(AI 비전 검사) 구축 및 품질 관리 효율화에 적용 가능합니다.
- 평가 입력
- 본문 59,873자 중 30,032자 발췌
초록
본문 59,873자
본문 펼치기
섹션 본문 58문단 · 45,469자
(제목 없음)
1Surface defect detection is a critical task in product quality assurance for manufacturing lines. The deep learning-based methods recently developed for defect detection are typically trained using a supervised learning strategy and large defect sample sets. Conventional methods often require additional pixel-level labeling or bounding boxes to predict the location of defects. However, the number of required samples and the time-intensive annotation process limits the practical use of these algorithms. As such, this study proposes a weakly supervised detection framework in which a CNN model is trained to identify surface cracks in motor commutators. The model was trained using small subsets of defect samples (∼5-30) and does not require a pre-trained network. This approach consists of localization and decision networks that simultaneously predict both the location and probability of defects. A new loss function was also developed to identify abnormal regions in a sample with accessible image-level labels. A collaboration learning strategy was then applied to utilize the loss function and compensate for imbalances at the pixel level. Experimental results using a small number of image-level training labels from a real industrial dataset exhibited a 99.5% recognition accuracy, which is comparable to relevant methods using pixel-level labels.INDEX TERMS Surface defect detection, quality control, weak supervision, convolutional neural network, localization network.
I. INTRODUCTION
2Surface defect detection, an essential task in manufacturing production quality assurance, has historically been performed manually. However, this approach is highly inefficient, subjective, and time-consuming. As such, computer vision-based inspection techniques have been developed in recent years to assist with or even replace human intervention [1]- [3].
3Conventional machine learning models rely on specific vision inspection tasks acquired by analyzing and extracting defect features manually. A decision is then made using either rule-based experience or learning-based classifiers. Support vector machines (SVMs), neural networks, and decision trees all utilize this type of approach, in which system performance depends heavily on the accurate representation of specific feature types. However, modern manufacturing technology requires product lines to be more robust, limiting the use of conventional machine learning models that require long development cycles to be adapted for different tasks.
4The associate editor coordinating the review of this manuscript and approving it for publication was Shagufta Henna.
5In recent years, deep learning (DL) methods have been successfully applied to a variety of image related tasks [4], [5].
6These algorithms are more easily adapted to different products and they have produced accurate results when applied to surface quality control [6]. Unlike conventional machine learning, DL models can automatically learn features from low-level data, eliminating the need for manual intervention. However, the success of these algorithms depends heavily on the labeled images used to train the effective deep network, which must efficiently represent a broad range of features. Furthermore, the localizability and interpretability of defects must be considered.
7Various approaches to representative feature collection have been proposed in the literature, to compensate for a lack of defect samples. This has included partitioning image patches to augment samples [7], re-using pre-trained models with transfer learning [8], [9], and using pixel-level labels to increase sample quantities [10] in a supervised model. For example, He et al. [11] developed a defect classification model for steel surfaces using a semi-supervised network. These methods have produced viable results but they also VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ have specific limitations [7]. For example, identifying defect regions by partition image patches can be time-consuming in the forward process [8], [9]. Transfer learning is effective but imposes restrictions on network structure design [10]. Pixel-level labels are highly precise but labor-intensive [11]. As such, we propose an effective method to predict the defect regions with image-level labels. The interpretation of defects is an indispensable task in detection processes. It is typically conducted with visual localization and has been attempted using a variety of algorithms. Image patch partitioning is a highly accurate selection strategy, but is very difficult and time-consuming [7]. Object detection algorithms represent defective regions using a recognition model, which is trained by an additional bounding box label [12]. Semantic segmentation networks are trained by sample labeling in pixel-level and segment defect regions [10], [13]. However, both semantic segmentation and object detection are limited by the required labeling information.
8This study proposes a novel framework for defect detection, one that consists of localization and decision networks. The model was trained using weakly labeled image-level samples, and considered defect detection to be an anomaly detection problem. Unlike conventional models, a large number of defect images are not required and labels are not annotated at the instance or pixel levels in an image. In addition, our framework is robust for different network structures as it does not include transfer learning. The primary contributions of this methodology are as follows:
91) A new multi-task framework is proposed for surface defect detection using weakly supervised learning(WSL), which consists of localization and decision networks. This approach avoids the need for large collections of defectlabeled samples.
102) A visual localization and classification description is developed for surface defects. The localization network is trained using image-level labels and outputs a heat map of potential defect locations. The output of the localization network was added to the decision network to improve classification performance.
113) A new WSL loss function is proposed for overcoming the limitations of small pixel-annotated samples, which is used to train the localization network with image-level labels. A collaboration learning strategy is applied in the training process to optimize the loss function and address pixel-level data imbalances, in which defective regions are differentiated from the background by the localization network. 4) After training with only approximately 5-30 defect images samples, the model achieves accurate defect detection without the use of a pre-trained network. Successful localization and decision results are demonstrated using a real-world industrial dataset.
12The remainder of this paper is organized as follows. Section II examines previous research in automated machine vision inspection. Section III describes the proposed framework in detail, including a new WSL loss function and learning process. Section IV presents experimental results and compares the proposed model to conventional techniques. Section V presents our conclusions.
II. RELATED WORK
13In conventional machine learning algorithms, the classification of individual pixels relies on the representation of manually identified features. Each pixel is classified as a defect or non-defect, based on features calculated from neighboring pixels. The latest research work [14] reports that a novel probabilistic salience framework is based on two saliency features (absolute intensity deviation and local intensity aggregation) and is proposed to shift the intensity of each pixel according to its saliency during its iterative process. Common features involve geometric and statistical descriptors (i.e., length, width, area, mean, and standard deviation), as well as localized wavelet decomposition [15]. Machine learning algorithms such as SVM [16], fuzzy logic [17], and random forest [2] have also been used, but have mostly been outperformed by deep-learning models based on computer vision techniques [18], [19].
14The related task of automated surface inspection (ASI) has also been reported in previous studies, in which surface defects are generally described as local anomalies in homogeneous textures. ASI algorithms can be divided into four categories, depending on the properties of the surface texture [7]. These categories are structural models [20], [21], statistical methods [22], filter-based approaches [23], and model-based techniques [24].
15Deep learning (DL) has recently become the most influential technology in computer vision and pattern recognition problems. Unprecedented achievements in image classification have been produced by convolutional neural networks (CNNs) such as AlexNet [25], VGG [26], ResNet [27], and DenseNet [28], which have outperformed conventional classification models like SVM. As such, DL was applied to surface defect detection after AlexNet was proposed [25]. For instance, Meier et al. [29] used a CNN for supervised steel defect classification. However, their work was limited to a shallow network in which ReLU and batch normalization operations were not included. Ferreira et al. [30] used a CNN to extract intrinsic stone patterns in small image patches during granite tile classification. Chen et al. proposed a novel vision-based method that used a deep CNN in the detection of fastener defects [31]. Martelli et al. used a DL-based spatiotemporal image analysis system to classify defects in metallic gearboxes [32]. However, these techniques are either based on image classification using DL models or depend heavily on annotated data acquired manually, which cannot predict defective regions using only image-level labeling.
16Collecting and labeling large datasets for defect inspection is difficult in industrial environments and several techniques have been proposed to address this issue [7]- [11]. Ren et al. [7] developed a generic approach that requires partitioning of image patches. A classifier is then developed from these image patch features, which are transferred from a pre-trained DL network. In the defect segmentation stage, the trained classifier iterates over all overlapping image blocks to output the classification probability for every pixel in an input image.
17Transfer learning can also reduce training data requirements by transferring pre-trained model weights [8], [9]. Ferguson et al. [8] applied transfer learning to the CNNbased inspection of casting defects in X-ray images. This model was first trained using two large public image datasets and then optimized with a relatively small casting dataset. Transfer learning was also applied to the online training and classification of Mura defects, in which AlexNet was trained using the ImageNet LSVRC-2012 dataset and used as a feature extractor [9]. Learned features were then transferred from the pre-trained AlexNet to the network model. However, models pre-trained with non-industrial datasets have limited adaptability in complex industrial environments.
18Tabernik et al. [10] proposed an anomaly detection algorithm based on semantic segmentation frames. This model was trained with pixel-level labels to effectively augment the capacity of the training dataset, but was only able to learn 25-30 defective training images. However, acquiring pixellevel labels is both time-and labor-intensive. He et al. [11] proposed a semi-surprised defect classification approach to compensate for a lack of labeled samples in supervised training. This approach used generative adversarial networks (GANs) to generate large quantities of unlabeled data. Both labeled and unlabeled samples have been used to train classifiers with different learning strategies, but have been unable to predict defect regions.
19Defect localization, a necessary component of detection tasks, has been achieved using three different techniques in previous studies [6], [10], [12], [13]. Ren et al. [7] designed a patch classifier that was trained using features transferred from Decaf. The resulting classifier output the probability of an input image belonging to a given class. The primary issue with this technique is determining how to optimally select patch sizes. Defect localization has also been approached as a type of object detection task [12]. Jiangyun et al. used the You Only Look Once (YOLO) convolutional network, first introduced for object detection, to automatically extract multi-scale features from surface defects and inspect image regions for steal strips. However, this model required additional bounding boxes to be labeled in the training process. Defect localization has also been pursued as a semantic segmentation task. For example, Tabernik et al. [10] developed a segmentation network for performing pixel-based localization of surface defects. In this model, each pixel was considered an individual training sample to increase the effective size of the training data and to avoid overfitting. Lin et al. [33] used a class activation map (CAM) to localize defect regions in the construction of a CNN model for LED chip inspection. The predicted classification was mapped back to the previous convolution layer and weighted to generate the CAM (with higher weighted values indicating object location).
20The present study represents the first weakly supervised multi-task approach for surface-defect detection of industrial products, specifically surface cracks in motor commutators. The proposed technique differs from conventional defect detection models based on image classification using DL [25]- [30], image patch partitioning [7], object detection [12], and semi-supervised learning [11]. In contrast, it is similar to the semantic segmentation developed by Tabernik et al., in which a supervised learning strategy was used to train a segmentation network with pixel-level labels. However, our algorithm implements a weakly supervised learning strategy (an uncertain supervision) to train the localization network with accessible image-level labels. Unlike previous studies [11], the resulting model directly outputs defect localization. This approach is also similar to class activation mapping, since a heat map was used as a visual interpretation of classification results, which predicted object location [33]. However, unlike a CAM, our model outputs defect location probabilities using weakly supervised learning. The decision network also combines results from the location network, improving classification results.
III. PROPOSED FRAMEWORK
21The automated localization and classification of surface defects is a complex task. As such, this study proposes a novel weakly supervised defect detection algorithm using a CNN. Specifically, the methodology focuses on surface crack detection in motor commutators (see FIGURE 1). In this study, weakly supervised learning was investigated in multitask frames, consisting of both localization and decision networks. The decision network determines whether defects are present in an image and the localization network identifies corresponding defect regions.
22A novel loss function is also proposed to train the localization network to recognize the defect regions using only image-level labeling. This model was trained in three stages, applied sequentially to the localization and decision networks, followed by a fine-tuning step. Every pixel was considered an individual sample when training the localization network, to augment effective sample capacity and to improve the pre-training model. The proposed architecture trains from scratch using image-level labels to predict both the probability and position of defects, thereby improving performance.
23As shown in FIGURE 1, this framework consists of three parts: shared layers and two sub-networks, as well as a location network (LNet) and a decision network (DNet). The shared layer extracts ample representation features from the input image, to serve as inputs for the two sub-networks. The LNet then takes output features from the shared layer as inputs and outputs a single-channel image (called a heat map) to predict defect locations. Each pixel in the heat map exhibits a value between 0 and 1, which indicates the probability that a defect exists at the corresponding location in the original image. The DNet receives output characteristics from the shared layer and the LNet outputs a heat map that predicts the probability of defects being present at specific locations. The output of the DNet also has a value between 0 and 1, indicating the probability of a defect existing somewhere in the image. The proposed network model can simultaneously predict whether defects are present in the input image, as well as the location of the defects. Each of these steps is discussed in detail below.
A. NETWORK STRUCTURE DESIGN 1) SHARED LAYERS
24The shared layer is based on a VGG [26] architecture and consists of six convolutional layers and three maximum pooling layers. Batch normalization and non-linear ReLU layers were included after each convolutional layer, which used a 3 × 3 kernel with a step size of 1 to capture small targets (defects) in high-resolution images. The pooling layers used 2 × 2 kernels, which were more likely to capture image changes and provide local information differences. The step size in each maximum pooling layer was set to 2, thereby reducing the runtime but also the resolution. The number of channels in each convolutional layer was gradually increased to maintain the size of the parameter space. As shown in FIGURE 1, the shared layer output featured 128 channels, each of which was 1/64 the size of the input image due to the maximum pooling layers (see Table 1).
2) LNet
25LNet input was the output feature in the shared layers. It consisted of four convolutional layers with 64 channels and a 5 × 5 kernel in the first two layers. The third layer included 512 channels and a 15 × 15 kernel. The larger convolutional kernel was used to increase the size of the network receptive field. The last convolutional layer included only a single channel with a 1 × 1 kernel, which can be regarded as a linear transformation. A batch normalization layer and a nonlinear ReLU utilized a non-linear sigmoid activation function, which mapped the output range to 0 to 1. All convolutional operations in the LNet were performed in a single step and no pooling layer was included, leading to variable output sizes. Detailed LNet parameters are shown in Table 2. The output heat map is a single-channel image whose width and height are one-eighth the size of the original image, with each pixel corresponding to an 8 × 8 region. Values closer to 1 indicate higher defect probabilities. This LNet output was used as the input to the DNet.
3) DNet
26A detailed list of structural parameters for the binary DNet are shown in Table 3. The front end is a residual spatial attention module (RSAM), used to improve DNet performance by weighting areas identified by the LNet (see FIGURE 2b). FIGURE 2a) shows the residual ResNet [27] module used to improve deep neural network performance by fitting the residuals. In contrast, the RSAM included attention mask input in the forward propagation step. In this process, each channel of the input feature is multiplied by the attentionweighted mask, causing the DNet to focus more attention on heavily weighted areas. The RSAM also adds feature tensors before and after the input mask in the next layer, to prevent a lack of information after attention weighting. As such, the output from shared layers was used as input features and the output of the LNet was used as the attention mask, causing the DNet to focus more on areas identified by the LNet. Four convolutional layers (with 64, 64, 128, and 256 channels) and three maximum pooling layers were stacked after the RSAM. Batch normalized and non-linear ReLU layers were included after each convolutional layer and each maximum pooling layer had a step size of 2, which reduced the height and width of the feature map by a factor of 2. Output features inthe shared layers were transformed into 256 channels via the RSAM, stacked convolutional layers, and the max pooling layer. The size of the final output feature was 1/64 of the original input feature. This DNet structure and corresponding parameters are shown in Table 3.
27The back end of the DNet consisted of a global average pooling and two fully connected layers with 266 nodes and one node, respectively. The global average pooling eliminates spatial information in the feature map and produces fixedlength vectors, reducing the need to maintain a constant input image size. These 256-channel convolution features were transformed into vectors of length 256 using the global average pooling. The output LNet heat map was then transformed, using the global average pooling, into a vector of length 1. These two vectors were then connected to form a new 266-dimensional vector to be used as input to the fully connected layer, in which the last node is a neuron output of 1. A value between 0 and 1 represents the probability of a defect existing anywhere in the image, output through the sigmoid activation function.
B. WEAKLY SUPERVISED LOSS
28While pixel labels for non-defective samples can be acquired directly in industrial settings, defect labels for defective samples must be added manually, which is cost-prohibitive and time-consuming. In this study, images containing defects are referred to as positive samples and non-defective images are referred to as negative samples.
29In order to avoid the tedious process of rectangular frame labeling (or pixel labeling), we propose a new weakly supervised objective function Loss weak , which includes Loss positive and Loss negative for training the LNet with only image-level labels. Different optimization targets in the objective function are used for positive and negative samples during training. Loss positive and Loss negative guide the network in learning how to identify defective and non-defective pixels in the sample, respectively. Table 4 introduces the variables and descriptions used in the paper. The label for the input sample X is represented by y (X), where a value of 1 indicates the presence of defective pixels in the image (positive samples), 0 indicates the absence of defective pixels (negative samples), and is the network learning weights. p(y|(X , )) represents the predicted probability that a defect is present in the input image. In binary image classification tasks, objective functions are commonly used as binary classification cross-entropy loss functions:
30H [y(X ), p(y(X , )] = y(X )log(p(y|X , )) + (1−y(X)) log (1−p (y |X, )) . (1) Here, χ represents the pixel set for the input sample X; h and w represent the height and width of the image, respectively; and y(x i ) represents the label of pixel x i in the image. Values of 1 and 0 indicate the pixel does and does not belong to a defective area, respectively. The term q(y|(x i , )) represents the predicted probability that pixel x i belongs to the defective group. The cross entropy-based objective function in the foreground (defect) segmentation task is defined for positive samples as:
31When the input image is a positive sample (y(x) = 1), pixels are divided into defective and non-defective categories. The expected entropy is minimized when all pixels in an input image are determined to be either defective or nondefective. Entropy increases as the LNet outputs a heat map with an increasingly uniform distribution of both defective and non-defective pixels. As such, we converted the positive sample foreground (defective pixel) segmentation problem into an unsupervised maximum entropy optimization problem, thereby avoiding the use of defective labels and including only image-level labels. The expected maximum entropy function Loss positive for all pixels in a positive sample is defined as: Here Q(y |X, ) = 1 h * w N i=1 q(y |x i , ) and y(X) is 1 when the input is a positive sample.
32Cross-entropy loss was used to optimize negative samples but the two objective functions were not on the same scale. In this case, the larger objective function will dominate the direction of the gradient. Since non-defective samples satisfy y(X) = 0, p(x i ) = y(X) = 0, ∀x i ∈ Êχ (and the expectation value of all pixels is 0), the problem of optimizing all pixels can be converted into a problem of optimizing expectation values. The two objective functions are then on the same order of magnitude and the cross-entropy function for negative samples can be rewritten as:
33where y(X) = 0 when the input is a negative sample.
34The LNet optimization objective function can then be defined as:
35Loss weak = α * Loss negative + Loss positive = α * − log 1−Q(y |X, ) 2 * (1−y(X)) * y(X) +Q(y |X, ) log (Q(y |X, ) )
36where α is a collaborative learning factor that controls the learning speed of both non-defective and defective samples (α > 0).
C. LEARNING
37We propose a three-stage collaborative learning strategy for training the LNet and a shared network using the weakly supervised loss function proposed in (6). Network weights are then fixed and the DNet is trained using the binary image classification cross-entropy loss function of (2). Finally, the entire network is fine-tuned using objective functions. This threestage learning approach trains the network to identify defective and non-defective pixels using only image-level labels, thereby improving performance for small data sets. Since positive and negative samples are unbalanced in the dataset, the distribution of non-defective and defective pixels is also unbalanced. This complicates network convergence during random sampling of training data. A novel sampling process was developed to compensate for image-level imbalances and to alleviate this issue. During the learning process, the batch size was set to one and defective and non-defective samples were alternately trained to ensure that images of the same category did not appear in adjacent positions. A training step that includes both a positive and negative sample is defined as an iteration. Meanwhile, a collaborative learning strategy was implemented during LNet training with weakly supervised loss, which effectively resolved imbalances at the pixel level.
1) LNet COLLABORATIVE LEARNING
38The weak supervision loss function proposed in (6) was used to identify defective regions with image-level labels, in which Loss negative and Loss positive controlled the learning of nondefective and defective pixel features. Since the distribution of pixels in positive samples was unbalanced, the collaborative learning factor α in (6) controlled the learning speed for both sample types. As defective areas in positive samples were typically small, α was often set to a number greater than 1. During training, α was initialized with a constant (α init ) and updated after every n iterations during the total N iterations. The updated value at step i is given by:
39where k is the total number of updates: k = round(N /n), i ≤ k. As shown in FIGURE 3, the value of α first decreased and then increased, reaching a minimum value of α init /2. In the early training stages, α is large and Loss negative dominates, which biases the network towards non-defective pixels in the learning process. In the middle stages, α is relatively small and the influence of Loss positive gradually increases as the network predicts defective pixels that differ from the backbackground. In the latter stages, α gradually increases and the influence of Loss negative also increases to prevent the background from being incorrectly identified as a defective pixel. During the optimization process, Loss positive and Loss negative work collaboratively in the objective function to differentiate between defective and non-defective pixels. Weakly supervised training enables the LNet to locate defects and allows shared layers to acquire suitable initialization parameters to facilitate subsequent training. Equation (6) was used to train the shared network and LNet cooperatively, the specific implementation of which is shown in Algorithm 1.
2) DNet LEARNING AND NETWORK FINE-TUNING
40Subsequent steps included training the DNet. Network weights for the shared layers and LNet were then held constant and the cross-entropy loss in (2) was used as the objective function to optimize the DNet. Once training was completed, the DNet could accurately predict the probability of defects in an image. Finally, Equations. (2) and (6) were combined to train the entire network using a lower learning rate. No network layers were frozen during this process in order to fine-tune the entire network.
IV. EXPERIMENTAL VALIDATION A. DATASET DESCRIPTION
41The KolektorSDD dataset (http://www.vicos.si/ Downloads/ KolektorSDD) consists of labeled surface crack images on plastics electronic commutators, as shown in FIGURE 4. This set contains 50 commutator samples, each with ∼8 surfaces, totaling 399 pictures. These data were acquired in an industrial environment to ensure high-quality images, with a resolution of 1408 × 512 pixels. Among of these, 52 exhibit clearly visible defects and serve as positive samples. The remaining 347 images are defect-free negative samples. The first row in FIGURE 4(a) contains defect-free negative samples and the second row contains positive samples with defects. Each image is labeled at the pixel level. The weakly supervised loss function proposed in this study does not require the use of pixel-level labeling, which is included only for a visual comparison with the positioning results.
B. PERFORMANCE METRICS
42In this study, surface defect detection is treated as a binary image classification problem. The primary purpose is to classify images into two categories: positive (with defects) and negative (without defects). Since pixel-level positioning is not important for defect detection, the LNet only provides visualization results. As such, LNet positioning accuracy was not evaluated, only picture classification errors. LNet visualization results were output as interpretation results for network discrimination. VOLUME 8, 2020 Three-fold cross validation was used to ensure that the same picture did not simultaneously appear in the training and testing sets. Average precision (AP) and the number of false call samples were used to assess classification accuracy. AP is determined using the calculated area under the precision-recall curve, making it a precise representation of comprehensive model performance for different thresholds, particularly when the dataset contains large quantities of negative (non-defective) samples. False positive (FP) represents negative samples that were misreported as positive (defective) samples and false negative (FN) represents positive samples that were misreported as negative (non-defective) samples. The TP, FP, TN, and FN values reported below were calculated under the best F-measure. The F-measure metric is defined as:
43where P and R are respectively the precision and recall:
44In this study, γ was set to 1 to utilize the most common F1-measure.
C. IMPLEMENTATION
45Since the weakly supervised objective functions were not strongly constrained to each pixel, the network occasionally classified the image boundary as anomalous when the convolution padding consisted of null values. Therefore, all convolution padding used a mirror mode in shared LNet layers and a stochastic gradient descent (SGD) optimizer was used in all the experiments. Training a pair of positive and negative samples constituted a single iteration. The first step involved training the LNet and shared layers using the supervised loss proposed in (6). The learning rate was set to 0.1 and the collaborative learning factor α in the objective function was initialized to 8. This value varied periodically, according to (7), being updated after every 30 iterations. After 750 iterations, the defect location was determined by the output heat map.
46The second step included training the DNet. After LNet training, the shared layers and LNet weights were frozen and the DNet weights were optimized. The initial learning rate was set to 0.01 and the total number of iterations was 1200. After 600 iterations, the learning rate was reduced to 0.001. After training, the DNet output the probability of defects existing in the input image.
47Finally, Equations. (2) and (6) were used to jointly finetune the network, setting the learning rate to 0.001 and the number of iterations to 300. During this process, the collaborative learning factor α was fixed at its initial value of 8. Once joint training was completed, this framework achieved a simultaneous prediction of defect positions and existence probability. The following section evaluates DNet performance under different conditions. The network was constructed using the PyTorch machine learning library developed by Facebook' AI Research Lab. All simulations were conducted using a PC with an Intel Core i7-7820X CPU running Windows 10, two GTX1080Ti GPUs (total 22 GB), and 32.0 GB of RAM.
D. EVALUATION OF DNet PERFORMANCE FOR DIFFERENT CONFIGURATION GROUPS
48The primary DNet parameter configurations included: (i) the number of unique defect samples, (ii) freezing/not freezing shared layers and LNet weights, and (iii) randomly rotating training images by 0 • , 90 • , 180 • , and 270 • . The proposed method was evaluated using experimental results for differing quantities of defective samples, and proved to be robust. Selectively frozen and non-frozen DNet weights assisted in evaluating the effects of LNet training on final decision results. Finally, the impact of random rotations on network discrimination was evaluated, as shown in FIGURE 5. The figure displays detailed results using different colorlabeled bar charts, where frozen and non-frozen weights are indicated as orange and green, respectively. The top and bottom groups show results with and without random rotations made during training, respectively. The left group shows the average accuracy under all experimental conditions and the right group shows the number of error samples. These results indicate that only one negative sample was detected as a positive sample (with frozen weights, no random rotations, and 30 positive samples). This corresponds to an optimal AP of 99.5%. The effect of a single learning configuration was evaluated by observing changes in the average performance for each specific setting parameter. FIGURE 5 also suggests the proposed method is not sensitive to the number of defect samples, exhibiting strong robustness. Even with only five defective samples, the AP value reached 97.96%. The highest F-measure occurred when only three samples were misclassified, two of which were FPs and one was a FN. Random rotation did not result in significant performance increases (as expected), but had a detrimental effect on identification results. As shown in Table 5, rotating the image during training caused the average performance to decrease by 2.01%. FIGURE 5 indicates that frozen shared layers and LNet weights led to significantly better results. As seen in Table 5, for the case of frozen weights, the evaluation index AP increased by an average of 0.76%. This indicates that freezing weights can improve network performance for small sample sets.
E. VISUALIZATION OF THE COLLABORATIVE LEARNING PROCESS
49The LNet identified defect locations by visualizing intermediate results during different periods of the collaborative learning process. The first and second columns in FIGURE 6 show sample input images and pixel labels, respectively. Columns 3-9 show sequential LNet results after 30, 120, 240, 360, 480, 600, and 720 iterations. Results in the third column indicate that prediction results were poor after 30 iterations, with a large portion of the background area predicted to be defective. In the early training stages, α is relatively large and Loss positive dominates the loss function, which biases the network toward non-defective pixels during the learning process. Columns 3-5 demonstrate gradual classification improvements as all pixels are non-defective after 240 iterations. After additional training, α becomes relatively small, the influence of the loss function on positive samples gradually increases, and the network begins to dis-tinguish defective pixels from the background in columns 5-7. In the latter training stages, α gradually increases and the effect of Loss negative increases to prevent the background from being falsely classified as defective. Columns 7-9 indicate that once training is completed, the LNet can accurately predict defect locations. However, due to the width of the CNN reception field, the region around the defect was also identified as defective during the optimization process. This caused some blurring on the edges of defective regions.
F. LNet CONTRIBUTIONS
50DNet results were evaluated with and without LNet training, as an indicator of LNet performance. Network and shared layer weights were frozen during LNet training. The DNet was trained directly when the LNet was not trained and AP was used as an evaluation indicator in related experiments. In addition, FPs were included as a supplemental evaluation index with a recall rate of 100%. The loss risk for FPs is much smaller than that of FNs in industrial production environments, which is indicative of the number of manual rechecks required to achieve the desired accuracy. The contribution of the LNet to the final results was evaluated when the defect sample set was relatively small. The number of positive (defective) samples in the training set was 5, 6, 7, 8,9, and 10 in the experimental configuration, the results of which are shown in FIGURE 7. The line chart on the left depicts changes in AP with and without LNet training (with trends represented by the red and black lines, respectively). As seen in FIGURE 7(a), the red curve is entirely above the black curve, indicating that AP was significantly improved by LNet training. With only 5-10 defective samples, the tortuosity of the black curve is not pronounced, while the red curve exhibits obvious drops as the number of defective samples decreases. This indicates that LNet training can improve AP robustness with respect to varying sample sizes. The red curve in FIGURE 7(b) is entirely below the black curve, indicating that LNet training effectively reduced the average number of FPs at 100% recall. FIGURES 8(c) and 8(d) show output LNet heat maps with and without training, respectively. These heat maps were used as attention weights in the DNet's autonomous-learning RSAM, which focused on defective areas when the LNet was not trained. When the LNet was trained, the RSAM effectively guided the DNet to focus on areas where defects were located. A comparison of FIGURES 8(c) and 8(d) suggests that training the LNet increased differences between the foreground and background, highlighted defective pixels, and improved DNet performance. Table 6 compares the proposed method with other conventional techniques. The results presented in this section involved the same experimental configuration and the same number of training and testing samples (33 defective images), each of which utilized triple cross-validation. Primary evaluation metrics included AP, false count, and FP at 100% recall. Compared with other methods, the proposed model exhibited competitive classification performance, achieving an accuracy of 99.5% for the KolektorSDD dataset. Tabernik et al. proposed a supervised two-stage network structure and used pixel labels to train the network [10]. The resulting AP reached 99.9% and produced only a single FN and FP. In addition, three FPs occurred at a 100% recall. The proposed model utilizes a weak supervision method with a three-stage learning strategy and requires only image-level labels. This approach offers comparable FN and FP rates, producing five FPs at a recall of 100%. Table 6 also provides experimental results using commercial software packages, such as the Cognex ViDi Suite (Cognex2018) [34], and two segmented networks (U-net [35] and DeepLabV3 + [36]).The ViDi model produced an AP of 99.0%, five false counts, and seven FPs at 100% recall. The U-Net produced an AP of 96.1%, nine false counts, and up to 108 FPs at 100% recall.
G. A COMPARISON WITH CONVENTIONAL TECHNIQUES
51The DeepLab v3 + segmentation decision method produced an average accuracy of 98.0%, nine false counts, and 68 FPs at a recall of 100%. The proposed model outperformed DeepLabV3 +, Unet, and ViDi, as measured by the AP metric. A standard residual network ResNet [26] was also included in the comparison experiments. During training, the ResNet model used weights that were pre-trained with ImageNet, adjusting the number of nodes in the fully connected layer (2) for binary classification tasks. The ResNet achieved an AP of 97.8% and produced two FPs. There were 40 FNs at a recall of 100%. The proposed technique was also superior to a pre-trained ResNet18 across all indicators. Table 6 indicates that when the training set contained only 10 positive samples (with negative samples remaining unchanged), the average accuracy was lower than only ViDi and the segmentation-decision methods.
52These experimental results suggest that the proposed method maintained good performance with fewer training samples. Weakly supervised learning and collaborative training effectively enhanced differences between defective and non-defective pixels, allowing the DNet to more effectively distinguish between samples.
H. ANALYSIS AND DISCUSSION
53Experimental results from the KolektorSDD set indicate that our method achieved competitive performance using only image-level labeling, which is much simpler than pixel-level labeling. This benefit is the result of the proposed multi-task framework and three-stage learning process. Among these, the weak supervision approach and collaborative learning strategy enabled the LNet to identify defective areas that differed from the background, by enhancing the characteristics of the corresponding area. The included DNet used the output LNet heat map as an attention mask, biasing the network toward anomalous regions in the input image.
54A series of comparison experiments were conducted by freezing or not freezing the shared layers and LNet, the results of which showed that the positioning and decision tasks were highly correlated. In the 5-10 positive sample experiments, DNet performance improved after conducting weakly supervised LNet training. This indicated that differences between background and foreground features could be enhanced by the LNet, making this technique more effective.
55Various optimal objectives were selected for positive and negative samples during training. The proposed weak (uncertainty) supervision method uses only image-level labels, which significantly reduces the required labeling time. The performance, however, is comparable to other supervised methods that do require instance or pixel labeling.
56This study demonstrated that the adoption of a collaborative learning strategy can compensate for pixel-level imbalances. In the process of defect visualization, the area of interest can be gradually enlarged by varying the collaboration parameter α. This value is initially large, which biases the learning process toward non-defective pixels during the network learning process. As α decreases, the network gradually begins to predict defective pixels. In the latter stages, α gradually increases again to prevent the background from being mistaken for defective pixels. In this way, the network learns to distinguish pixel types and locate defects. A series of comparison experiments demonstrated that the proposed technique achieved an accuracy comparable to conventional models. It was also highly robust to variable positive sample quantities. Future work will focus on expanding the applicability of the algorithm, which is currently able to detect small anomalous features in large images. The edges of defects were also slightly blurred in the LNet output images, which could be improved by further development of the model.
V. CONCLUSION
57A novel weakly supervised framework was proposed for surface defect detection using deep learning and demonstrated with surface cracks in motor commutators. A new weak supervision loss was developed to train the localization network using image-level labels. A collaborative learning strategy was implemented in the training process to assist the weak supervision algorithm and compensate for pixellevel data imbalances, in which defect position information can be directly output and explained. This network design enabled training with a small (approximately 5-30 defect images) number of samples, achieving excellent performance without pre-training. Experimental results demonstrated that our approach produced comparable accuracy for a weakly supervised mode, compared with fully supervised methods, using the KolektorSDD dataset. Future work will involve training the algorithm to identify defects in other materials, such as steel or glass. YONG DENG received the B.E. degree in electrical engineering and automation from the Hunan University of Technology, in 2018. He is currently pursuing the master's degree in control theory and control engineering with the School of Automation, Guangdong University of Technology. His research interests include machine learning, generative adversarial networks, and deep learning.
58XIUXI LI received the master's and Ph.D. degrees in chemical engineering from the South China University of Technology, in 1998 and 2008, respectively. He is currently a Professor with the School of Chemical and Chemical Engineering, South China University of Technology. His current research interests include chemical process safety, product quality control, and process optimal.
참고문헌 33건
- Very Deep Convolutional Networks for Large-Scale Image Recognition Computer Vision and Pattern Recognition · 2014
- U-Net: Convolutional Networks for Biomedical Image Segmentation Lecture notes in computer science · Springer Science+Business Media · 2015 10.1007/978-3-319-24574-4_28
- From image-level to pixel-level labeling with Convolutional Networks 2015 10.1109/cvpr.2015.7298780
- Steel defect classification with Max-Pooling Convolutional Neural Networks 2022 International Joint Conference on Neural Networks (IJCNN) · 2012 10.1109/ijcnn.2012.6252468
- A survey on industrial vision systems, applications and tools Image and Vision Computing · Elsevier BV · 2003 10.1016/s0262-8856(02)00152-x
- A Review of Recent Advances in Surface Defect Detection using Texture analysis Techniques ELCVIA Electronic Letters on Computer Vision and Image Analysis · Computer Vision Center Press · 2008 10.5565/rev/elcvia.268
- Improving Automatic Detection of Defects in Castings by Applying Wavelet Technique IEEE Transactions on Industrial Electronics · Institute of Electrical and Electronics Engineers · 2006 10.1109/tie.2006.885448
- ImageNet: A large-scale hierarchical image database 2009 IEEE Conference on Computer Vision and Pattern Recognition · 2009 10.1109/cvpr.2009.5206848
- TEXEMS: Texture Exemplars for Defect Detection on Random Textured Surfaces IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2007 10.1109/tpami.2007.1038
- Multi-column deep neural networks for image classification 2009 IEEE Conference on Computer Vision and Pattern Recognition · 2012 10.1109/cvpr.2012.6248110
- ImageNet Classification with Deep Convolutional Neural Networks Neural Information Processing Systems · 2012
- Deep Residual Learning for Image Recognition 2016 10.1109/cvpr.2016.90
- A Simplified Computer Vision System for Road Surface Inspection and Maintenance IEEE Transactions on Intelligent Transportation Systems · Institute of Electrical and Electronics Engineers · 2015 10.1109/tits.2015.2482222
- A machine-vision inspection system for conveying attitudes of columnar objects in packing processes Measurement · Elsevier BV · 2016 10.1016/j.measurement.2016.02.048
- Ambiguous Surface Defect Image Classification of AMOLED Displays in Smartphones IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2016 10.1109/tii.2016.2522191
- A Generic Deep-Learning-Based Approach for Automated Surface Inspection IEEE Transactions on Cybernetics · Institute of Electrical and Electronics Engineers · 2017 10.1109/tcyb.2017.2668395
- Fabric defect detection using local homogeneity and morphological image processing 2016 10.1109/ipas.2016.7880062
- Convolutional Neural Network approaches to granite tiles classification Expert Systems with Applications · Elsevier BV · 2017 10.1016/j.eswa.2017.04.053
- Transfer-Learning-Based Online Mura Defect Classification IEEE Transactions on Semiconductor Manufacturing · IEEE Computer Society · 2017 10.1109/tsm.2017.2777499
- Automatic Defect Detection of Fasteners on the Catenary Support Device Using Deep Convolutional Neural Network IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2017 10.1109/tim.2017.2775345
- Deep Endoscope: Intelligent Duct Inspection for the Avionic Industry IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2018 10.1109/tii.2018.2807797
- Automated defect inspection of LED chip using deep convolutional neural network Journal of Intelligent Manufacturing · Springer Science+Business Media · 2018 10.1007/s10845-018-1415-x
- A Compact Convolutional Neural Network for Textured Surface Anomaly Detection 2018 10.1109/wacv.2018.00150
- Real-time Detection of Steel Strip Surface Defects Based on Improved YOLO Detection Network IFAC-PapersOnLine · Elsevier BV · 2018 10.1016/j.ifacol.2018.09.412
- Deep learning Nature · Nature Portfolio · 2015 10.1038/nature14539
- A Defect Inspection for Explosive Cartridge Using an Improved Visual Attention and Image-Weighted Eigenvalue IEEE Transactions on Instrumentation and Measurement · Institute of Electrical and Electronics Engineers · 2019 10.1109/tim.2019.2912237
- Semi-supervised defect classification of steel surface based on multi-training and generative adversarial network Optics and Lasers in Engineering · Elsevier BV · 2019 10.1016/j.optlaseng.2019.06.020
- Densely Connected Convolutional Networks 2017 10.1109/cvpr.2017.243
- Detection and Segmentation of Manufacturing Defects with Convolutional Neural Networks and Transfer Learning Smart and Sustainable Manufacturing Systems · ASM International · 2018 10.1520/ssms20180033
- Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation Lecture notes in computer science · Springer Science+Business Media · 2018 10.1007/978-3-030-01234-2_49
- Accumulated and aggregated shifting of intensity for defect detection on micro 3D textured surfaces Pattern Recognition · Elsevier BV · 2019 10.1016/j.patcog.2019.107057
- Segmentation-based deep-learning approach for surface-defect detection Journal of Intelligent Manufacturing · Springer Science+Business Media · 2019 10.1007/s10845-019-01476-x
- Color And Texture Based Wood Inspection With Non-Supervised Clustering 2001