Next Article in Journal
Two-Terminal Nonvolatile Write-Once-Read-Many-Times Memory Based on All-Inorganic Halide Perovskite
Next Article in Special Issue
Automatic Bounding Box Annotation with Small Training Datasets for Industrial Manufacturing
Previous Article in Journal
Optimal Design of a Multipole-Electromagnet Robotic Platform for Ophthalmic Surgery
Previous Article in Special Issue
Predicting the Optimal Input Parameters for the Desired Print Quality Using Machine Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Weighted Matrix Decomposition for Small Surface Defect Detection

1
School of Automation, Guangdong Polytechnic Normal University, Guangzhou 510665, China
2
Machine Life and Intelligence Research Center, Guangzhou University, Guangzhou 510006, China
3
School of Computer Science, University of Lincoln, Lincoln LN6 7TS, UK
4
Guangzhou Maritime University, Guangzhou 510725, China
*
Author to whom correspondence should be addressed.
Micromachines 2023, 14(1), 92; https://doi.org/10.3390/mi14010092
Submission received: 1 November 2022 / Revised: 17 December 2022 / Accepted: 23 December 2022 / Published: 29 December 2022
(This article belongs to the Special Issue Machine Learning for Advanced Manufacturing)

Abstract

:
Detecting small defects against a complex surface is highly challenging but crucial to ensure product quality in industry sectors. However, in the detection performance of existing methods, there remains a huge gap in the localization and segmentation of small defects with limited sizes and extremely weak feature representation. To address the above issue, this paper presents a weighted matrix decomposition model (WMD) for small defect detection against a complex surface. Firstly, a weighted matrix is constructed based on texture characteristics of RGB channels in the defect image, which aims to improve contrast between defects and the background. Based on the sparse and low-rank characteristics of small defects, the weighted matrix is then decomposed into low-rank and sparse matrices corresponding to the redundant background and defect areas, respectively. Finally, an automatic threshold segmentation method is used to obtain the optimal threshold and accurately segment the defect areas and their edges in the sparse matrix. The experimental results show that the proposed model outperforms state-of-the-art methods under various quantitative evaluation metrics and has broad industrial application prospects.

1. Introduction

Under the trend of intelligent manufacturing, automatic quality control is widely regarded as the top priority in industrial production [1,2]. Surface defect, the key factor of quality control, is generally defined as local anomalies embedded in homogeneous textures [3]. Due to complexity of manufacturing processes and diversity of production environments, defects on product surfaces are always various and complex. For example, the manufacturing process of powder metallurgy is composed of casting, forging, rolling, machining, and extrusion, while its porosity, an important characteristic of powder metallurgy sintered materials, is influenced by multiple factors including temperature, sintering time, and pressure [4]. Surface defects not only directly lower appearance quality, but also reduce product performance and commercial value [5]. To effectively detect surface defects, automatic visual inspection methods with great advantage in non-destructive defect detection have been widely applied in rails [6], fabric [7], steel [8], thin-film-transistor [9], photovoltaic [10], and other flat products [11].
Conventional defect detection methods can be roughly divided into three categories: statistical-, spectral-, and model-based techniques [3]. Statistical-based approaches compute local features at each pixel and then derives a set of statistics from distributions of the local features to discriminate defects [12]. They generally contain eight representative algorithms, including thresholding [13], clustering [14], edge-based [15], fractal dimension [16], gray-level statistic [17], co-occurrence matrix [18], local binary pattern [19], and morphological [20]. Among them, the most classical method is thresholding. Ostu presented a threshold selection method from gray level histograms, which is optimal for thresholding a histogram with bimodal or multimodal distribution but fails if the histogram is unimodal or close to unimodal [21]. To address this issue, a number of modified methods were developed based on the work of Ostu [22]. For example, Ng et al. proposed the valley-emphasis method (VE), which is suitable for images with unimodal and bimodal distributions [23]. To obtain better and more stable thresholding results, the Gaussian valley-emphasis method (GVE) was developed [24]. Truong et al. designed an entropy weighting scheme (EnOstu) to improve upon Otsu’s method [25]. In addition, neighborhood valley-emphasis method (NVE) [26] and improved valley-emphasis method (IVE) [27] were proposed for small surface defect detection. Statistical-based approaches perform well on defect detection against steel surface whose pixel intensities exhibit remarkable regularity and apparent periodicity. However, they are vulnerable to illumination change [28], pseudo defects, and local noise [29].
To overcome the above limitation, the second method transforms the whole image from spatial domain to frequency domain where defects can be discriminated from defect-free regions more easily via comparison of their amplitudes [3]. Spectral-based approaches are composed of six representative algorithms, such as Fourier transform [30], Gabor filters [31], optimized FIR filters [32], wavelet transform [33], multiscale geometric analysis [34], and hough transform [35]. Tsai et al. proposed fabrics defects inspection method based on a global image restoration scheme using the Fourier transform, which does not rely on local features of textures [36]. Similarly, Hu et al. combined Fourier analysis and wavelet shrinkage to detect textile defects [37]. Aiger et al. presented a novel method based on the Phase Only Transform (PHOT) [38] for detecting defects on textured surfaces. Its simplicity and generality enable it to work on various pattern without prior knowledge. Choi et al. proposed an unsupervised detection approach of surface defects by combining both global estimation and local refinement, which gives robust results even in noisy surface defect images [39]. However, the spectral-based method is unable to effectively preserve local information after the transformation, which means it can only deal with defects that occupy a large amount of the whole image and exhibit significant difference to the background.
To achieve better performance for diverse defects, the third method projects original texture distribution of image blocks into low-dimensional space using different specialized models [40], such as Markov random field [41], Gaussian mixture entropy [42], and Weibull distribution [43]. Model-based approaches accomplish defect detection by similarity measurement between the model which is established by the feature of image and the test image [44]. Susanet et al. proposed a Gaussian mixture entropy model to automatically defect detection with no manual intervention [42]. Han et al. developed a novel methodology for anomaly detection in noisy images with smooth backgrounds, named smooth-sparse decomposition (SSD) [45], which has superiority in terms of the detection accuracy as well as computation time. The following year, they proposed a spatio-temporal smooth sparse decomposition [46], which has the capability of identifying not only the time of process changes, but also the location of detected anomalies. Yu et al. proposed a coarse-to-fine model to identify rail defects at different scales [47]. However, the model-based methods are designed for specific defects and difficult to generalize for various types of defects [48].
Most of the aforementioned approaches distinguish defects from background by extracting the textural features [8]. The statistical and spectral methods can hardly deal with the situation when detect exhibit low contrast against complex background [49]. The model-based approaches tend to consider the feature of the test images, which means the model is always specific and difficult to achieve universality. Convolutional neural networks (CNNs) have become a key element in the breakthrough of defect detection [50,51,52], but they may fail to detect small defects that are only a few pixels in size, since rich representations are difficult to learn from their poor-quality appearance and structure. Another obstacle presented by convolutional neural networks is that downsampling of the image always misses the opportunity to locate small defects; for example, YOLO apply a downsampling of 32 × 32 to the input image, which means a defect with only a few pixels will disappear in the feature map [53]. In view of these points, the above conventional methods are difficult to be applied directly for the inspection of small defects on surfaces with complex backgrounds. Although these conventional defect detection methods have accomplished grate success in the detection of specific defects, their performance still needs to be improved for small defects with extremely low gradient intensity or contrast to background while equate to only a few pixels in size within images.
Detecting small defects against complex surfaces has been an extremely challenging task for industrial manufacturing. Figure 1 gives an example of small surface defect [54]. As shown, the resolution of the whole image is 640 × 480 pixels where the defect and its surrounding region are enlarged in a square box with 15 × 15 pixels in size. Figure 1b presents the ratio of the number of pixels in the defect region to the total pixel number of the original image. As can be seen, the proportion of the small defect to the whole image is quite low (less than 0.01 % ). In this case, it is difficult even for humans to notice such tiny defects. Specifically, difficulties for small defect detection are reflected in three aspects:
(1) Small defects always equate to a few pixels in size, revealing almost no other visual features, such as shape, texture, and color, which means their feature representations are extremely weak.
(2) Low contrast and unclear boundary between defect and defect-free regions of complex surface bring great uncertainties for defect feature extraction.
(3) Noise inevitably introduced in image acquisition processes is difficult to discriminate from small defects and also leads to inaccuracy of defect area segmentation.
To address these issues, a weighted matrix decomposition model (WMD) is proposed for small defect detection against complex surface. Specifically, a matrix is constructed by weighted summation of three channels from the original color image to improve the contrast between small defects and background. The weighted matrix is then decomposed into a sparse matrix and a low-rank matrix to identify defect regions while eliminating the interference of complex backgrounds. The pixel intensity of the defects identified by the sparse matrix are further analyszd. Finally, the binarization operation and the pixel value statistical analysis of the connected domain are performed to accurately segment defect regions and effectively filter out noise.
The rest of our paper is organized as follows. In Section 2, the weighted matrix decomposition model is introduced. In Section 3, experimental results on small surface defect detection are presented, together with the qualitative studies. Finally, the main idea and future work of this paper is summarized and concluded in Section 4.

2. Weighted Matrix Decomposition Model

2.1. Overall Network Architecture

The total framework of the proposed weighted matrix decomposition (WMD) model is shown in Figure 2. As can be seen, it is composed of three main steps, including weighted matrix construction, image decomposition, and defect region segmentation. Specifically, a weighted matrix is firstly constructed for a color image to improve contrast between defect and defect-free regions. The weighted matrix is further decomposed into a low-rank and sparse matrices to eliminate redundant background. Finally, defective regions in the latter matrix are located by an adaptive threshold. The following sections will elaborate on each step of the proposed WMD model.

2.2. Weighted Matrix Construction

Figure 3 shows the 2D views and 3D views of the RGB channels and gray-scale version of a steel surface image. As can be seen, pixel values of the defect are extremely close to those of the background. In this case, it is quite difficult to discriminate the defect and defect-free regions. To solve this problem, a weighted matrix is proposed to enhance contrast, which consists of three steps, including normalization, weighted summation, and linear transformation.
(1) Normalization
The pixel values [ 0 , 255 ] of the RGB channels are all normalized to [ 0 , 1 ] for the convenience of calculation, that is,
I ( x , y , z ) = f ( x , y , z ) / 255
where f ( x , y , z ) denotes input color image, ( x , y ) represents spatial coordinates, and z { 1 , 2 , 3 } is the channel index corresponding to the R, G, B channels, respectively.
(2) Weighted Summation
To closely match human perception of lightness, weights of the RGB channels are assigned based on the CIELAB color space [55]. Specifically, the higher contrast between defect and defect-free regions, the larger the weight. As shown in Figure 3, the contrast between the defect and defect-free regions in the three channels are arranged in descending order as G, R, and B channels. The weighted summation of the RGB channels is expressed as
I M ( x , y ) = u 1 · I ( x , y , 1 ) + u 2 · I ( x , y , 2 ) + u 3 · I ( x , y , 3 )
where u 1 , u 2 , and u 3 are constant and satisfy u 2 > u 1 > u 3 , u 1 + u 2 + u 3 = 1 . To further enhance the contrast of the defect, the cube root of the weighted summation is adopted, that is
I L ( x , y ) = I M ( x , y ) 1 / 3
where I L ( x , y ) denoted the contrast-enhanced matrix.
(3) Linear Transformation
The pixel values of I L ( x , y ) are linearly transformed to integer values from 0 to 255, that is
I W ( x , y ) 255 × I L ( x , y ) m i n ( I L ( x , y ) ) m a x ( I L ( x , y ) ) m i n ( I L ( x , y ) )
where I W ( x , y ) is a positive integer matrix. If there are decimals in Equation (4), we round them up to the nearest integer. In this stage, we obtain the weighted matrix I W ( x , y ) , where the contrast of the defect is significantly enhanced, as can be seen from Figure 3. I W ( x , y ) is further decomposed in the following sections to separate defects from the background.

2.3. Matrix Decomposition

A weighted matrix I W is first partitioned into N nonoverlapping patches, and then decomposed into sparse matrix I S with defects and low-rank matrix I L with redundant backgrounds. To address the issues discussed in Section 1, a novel weighted matrix decomposition model is proposed as follows:
I W = I L + I S
where I L is devoted to allow identification of the intrinsic feature subspace of the redundant background patches. I S is used to capture the spatial and feature relations of patches. Then, the defect detection task is transformed into a typical optimization problem of recovering low-rank and sparse components from a data matrix:
min I S , I L r a n k ( I L ) + λ | | ( I S ) | | 0 s . t . I W = I L + I S
where the λ is weight coefficient ( λ > 0 ). r is a constant. | | · | | 0 represents the L 0 norm to count the number of non-zero values. k is the number of pixels in the defect area.
Figure 4 illustrate the matrix decomposition process for an image containing single defect, while Figure 5 present the matrix decomposition process for an image containing multiple defects. In each figure, the first column shows visual images of the weighted matrix, low-rank matrix, and sparse matrix after integerization while the second column presents their 3D views. In the following, the regularization of sparsity and low-rank matrices is verified, and their decomposition is implemented.
(1) Sparsity Regularization for Salient Defects
The contrast between defect and defect-free is glaringly obvious in the sparse matrices of Figure 4 and Figure 5. In their 3D view images, it is quite clear that most of the values are 0. Since the defect area is particularly smaller than the input image, the I S satisfies the following requirements:
| | ( I S ) | | 0 < k
where the image size is M × N, namely:
k M × N
Equation (8) means that most of the elements in matrix I S are 0. That is, the assumption that the weight matrix of small surface defect images have sparsity, holds.
(2) Low-Rank Regularization for Image Background
As shown in Figure 4 and Figure 5, the texture of low-rank matrices is relatively smooth. If the image is divided into L blocks (where L < N ), they are often similar and approximately lie in a low-dimensional subspace. The low-rank regularization on the background feature matrix I L is applied to pursue its intrinsic structure. Figure 6 presents three representative small surface defect images with the same size of 480 × 640 × 3 , their corresponding weighted matrices in second column, and the singular value of the weighted matrix in third column where the patch size is 8 × 640 and the vertical sliding steps are 8. Since the sizes of all corresponding patch-images are 5120 × 60 , the matrix has 60 singular values. The above analysis shows that the background feature matrix I L derived from the weighted matrix is low-rank, that is,
r a n k ( I L ) r
where r is a constant. Intrinsically, it constrains the complexity of the background image.
(3) Sparse and Low-Rank Matrices Decomposition
In order to detect small surface defect of images, the defect detection task is intrinsically a typical problem of recovering a low-rank and sparse components from a data matrix. This problem can be effectively solved via Principal Component Pursuit [56] and converted to solve the following convex optimization problem:
min I S , I L | | ( I L ) | | * + λ | | ( I S ) | | 1 s . t . I W = I L + I S
where λ is a positive constant. | | ( I L ) | | * , | | ( I S ) | | 1 replace r a n k ( I L ) in Equation (9) and | | ( I S ) | | 0 in Equation (7), respectively, for tractable computation. Here, | | · | | * is the nuclear norm of a matrix (i.e., the sum of singular values); | | · | | 1 is the L 1 -norm, that is
| | X | | 1 = i j | X i j |
The above optimization problem Equation (10) is convex and can be solved by applying the Accelerated Proximal Gradient approach proposed in [57]. Through the above steps, the low-rank and sparse decomposition process of the weighted matrix has been completed, where the latter contains defect areas.

2.4. Pixels Segmentation

After obtaining the sparse matrix, the following features can be observed in combination with Figure 1, Figure 4 and Figure 5.
(1) I m b a l a n c e d D a t a D i s t r i b u t i o n : From Figure 1, it can be seen that the percentage of small defects in the whole image is very low, which means that the background occupies most of the image, that is, the area difference between defect and defect-free is highly significant.
(2) Z e r o P i x e l s P r e d o m i n a t i o n : Most pixels in the sparse matrix are zero (background regions), and the non-zero pixels correspond to defects or noises, as shown in the 3D view of Figure 4 and Figure 5 (the second row). For intuitive visualization, the pixel values of sparse matrix are readjusted to a value of positive integer between 0 and 255, as shown in Figure 4 and Figure 5 (the first row).
After the above analysis, combined with the sparse matrices of Figure 4 and Figure 5, we have two following conclusions. Firstly, the pixel values of the defect are less than 0, and the pixel value greater than 0 is interference such as noise. Secondly, after integer conversion, the mode in images is adopted as the threshold. If pixel values of an area are lower than the mode in images, then the area is regarded as a defect; otherwise, it is regarded as the background. The binarization image is expressed by
I B W ( x , y ) = 1 , I S ( x , y ) < m o d e ( f ( x , y ) ) 0 , o t h e r w i s e
where the defect is represented as 1 and the background is 0.
In order to enhance the consistency of the defect images, for those images containing a small amount of noises or other interference factors, the connected domain pixel value statistics method is used to further instantly remove the interference and accurately segment the defect area.

3. Results and Discussions

3.1. Experimental Setup

3.1.1. Datasets

To guarantee the effectiveness of the algorithm, we use two publicly available datasets for experimentation. In order to convince the experimental effect, we use the existing methods and the proposed method in this paper for performance evaluation in the same dataset. The dataset used in this experiment is the silicon steel strip dataset (http://faculty.neu.edu.cn/songkechen/zh_CN/zdylm/263273/list/index.htm, accessed: 10 December 2022) [54], which contains a number of color images with a resolution of 480 × 640 × 3 pixels. It is characterized by small defect areas, noise interference, complex background, and extremely low contrast between defect and defect-free regions. Another is the magnetic tile dataset (https://github.com/abin24/Magnetic-tile-defect-datasets., accessed: 10 December 2022), consisting of numerous size-varied images. In the experiments, each image is cropped to uniform 270 × 180 pixels. The contrast between the defect and the background is extremely low in each magnetic tile image, while interfering by stains and textures.

3.1.2. Parameter Settings

The parameters in the implementation of the proposed WMD model are set as follows. In weight matrix construction, to closely match human perception of lightness, we assign weights of the RGB channels based on the CIELAB color space, where u 1 = 0.212 , u 2 = 0.715 , u 3 = 0.073 . In matrix decomposition, λ is related to the number of small defect pixel values, which is set as λ to 1 / m a x ( M , N ) . All experiments are tested on the MATLAB software platform under a machine that is equipped with Intel-i7 2.4-GHz CPU, 16-GB memory.

3.1.3. Comparison Algorithms

The proposed defect detection algorithm is compared with nine state-of-the-art solutions, including six statistical methods (EnOstu [25], VE [23], NVE [26], GVE [24], IVE [27], Ostu [21]), a spectral method (PHOT [38]), and a model-based method (SSD [45]). EnOstu [25] is fully automatic and capable of detecting extremely small defect regions, and the images of low contrast between defect and defect-free. VE [23] is widely used in defect detection, where the applicable defect range can be from no defect to small or large defects. NVE [26] has accurate segmentation results in defect detection, such as a small defect image, a part image, and a number image. GVE [24] resolves such problem of an optimal segmentation threshold selection in a image with unimodal or close to unimodal by introducing a Gaussian weighting scheme to enhance the weighting effect. IVE [27] is suitable for the defect detection with uneven illumination, complex image texture, and relatively small defect area. Ostu [21] is a classical automatic threshold segmentation method. PHOT [38] can be applied to various patterns of defect detection, e.g., periodic texture defect, multiple textures defect of various size and regularities, arbitrary scene with synthetic defect, etc. SSD [45] can detect various types of defects in a smooth background. With the popularization of deep learning methods, a defect classification method based on deep features, called MT [50], is selected as the comparison method of this experiment. In this method, SqueezeNet and MobileNetV2 models are adopted for feature extraction, while the ReliefF algorithm is used for feature selection.

3.1.4. Evaluation Metrics

To evaluate the performance of small surface defect detection methods, we employ nine comparison metrics including accuracy ( A c ), sensitivity ( S e ), specificity ( S p ), the Mean Intersection over Union ( M I o U ), the F-Measure ( M F ) [58], the Mutual Information ( M I ), the Normalized Mutual Information ( N M I ), the Structural Similarity ( S S I M ) [59], and the E-Measure ( E M ) [60], respectively. It should be noted that the recall rate and sensitivity are the same. The higher these nine indexes, the better the performance of the algorithm. The common evaluation indicators A c , S e , S p , M I o U , M F can be formulated as follows
A c = T P + T N T P + T N + F P + F N
S e = T P T P + F N
S p = T N T N + F P
P r = T P T P + F P
M I o U = T P F N + T P + F P
M F = ( β 2 + 1 ) · P r · S e β 2 · P r + S e
where T P , T N , F P , and F N represent the number of True Positives, True Negatives, False Positives, and False Negatives, respectively. True Positive ( T P ) denotes the number of correctly detected defect pixels mapping to the ground truth. True Negatives ( T N ) represents the number of correctly detected background pixels mapping to the ground truth. False Positive ( F P ) is the number of defect pixels that are false detected. False Negative ( F N ) represents the number of undetected defect pixels. In general, the improvement of precision corresponds to the decrease of recall. For the M F metric, we use β 2 = 1 in this paper to balance precision and recall.
We also compare the detected result with ground truth by calculating their pixel and structure similarity. Specifically, M I and N M I metrics compute pixels similarity between the test image and the ground truth, while the S S I M and E M compute the structural similarity.
S S I M = ( 2 u x u y + c 1 ) ( 2 δ x y + c 2 ) ( u x 2 + u y 2 + c 1 ) ( δ x 2 + δ y 2 + c 2 )
where u x and u y are the mean values of x and y, respectively. δ x 2 and δ y 2 are the variances of x and y, respectively. δ x y is the covariance of x and y. c 1 and c 2 are constants. E M comprehensively evaluates image quality from pixel, region, boundary, and object level [60], that is
E M = 1 w + h x = 1 y = 1 ϕ F M ( x , y )
where w and h are the width and height of image, respectively. ϕ F M is an enhanced alignment matrix.

3.2. Comparison With the State-of-the-Art

The proposed WMD algorithm is evaluated on the small surface defect detection dataset and compared with nine recently proposed algorithms. The visual comparisons are shown in Figure 7, Figure 8, Figure 9, Figure 10, Figure 11 and Figure 12, and Table 1 shows some quantitative comparison. The results show that the proposed WMD, an unsupervised method, ranks first on the small surface defect detection dataset across different criteria.

3.2.1. Visual Comparison

Figure 7, Figure 8 and Figure 9 show the visualization of partial detection results. In Figure 7 and Figure 8, we can observe that EnOstu [25], VE [23], IVE [27], SSD [45], Ostu [21], and MT [50] cannot identify the location of the defect. NVE [26], GVE [24], PHOT [38], and our method (WMD) are able to effectively separate the defect from the background. In Figure 9, EnOstu [25], VE [23], NVE [26], GVE [24], and IVE [27] almost judge the background as a defect. PHOT [38] and SSD [45] identify background and a small number of defects. Ostu [21] and MT [50] are powerless against magnetic tile defects.
To further evaluate the performance of these methods, we conduct two experiments on five randomly selected single-defect images and multiple-defect images in a silicon steel strip dataset, as shown in Figure 10 and Figure 11, respectively. In these two experiments, the results from EnOstu [25], VE [23], IVE [27], SSD [45], Ostu [21], and MT [50] methods are not present because they are incapable of detecting defects and their results contain a number of false positives. Similarly, there is no experimental result for the magnetic tile image because the traditional method is similar to Figure 9 in other images. In Figure 10, PHOT [38] is unable to effectively identify defects on all the five images. The NVE [26] and GVE [24] methods can detect relatively salient defects in (a)–(c) and partial defect regions in (d), but fail to detect the defect that is highly similar to the background in (e). The method proposed (WMD) in this paper achieves the best detection results in the above five images. In Figure 11, we obtain a conclusion similar to that in Figure 10.

3.2.2. Performance Comparison

It can be seen that the methods of NVE [26] and GVE [24] are suitable for the detection of small surface defects by the comparison of the above experiments. Figure 12 shows some quantitative comparisons by the three methods (NVE, GVE, and WMD). As shown in Figure 12a,c–i, A c (%), S e (%), M F , M I o U , M I , N M I , S S I M , and E M are clearly higher than those of the baseline methods. S p represents the probability of detected background pixels, and S e denotes the probability of detected defect pixels. However, it should be noted that recall is more indispensable than precision in small surface defect detection, in respect that a missed defect has a greater hazard than an error-checked noise. The performance comparison demonstrates that the proposed WMD model performs better than all the competitors in detecting the images with single defect and multiple defects.
To quantify the effect of Figure 9, the evaluation indicators of ten methods are shown in Table 1. As can be seen, the WMD works best in the A c (%), P r (%), S e (%), M F , M I o U , N M I , S S I M , and E M indicators. The S p value of EnOstu [25], VE [23], NVE [26], GVE [24], and IVE [27] respectively reaches 100%, because the five methods almost all judge the background as defects. However, their P r and S p values are extremely low, and the A c value for correct identification of background and defects is also quite small. The above results demonstrate the effectiveness of the proposed method in the magnetic tile image.

3.3. Verify the Effectiveness of Weighted Matrix Decomposition

In the experiment comparison in Section 3.2, the small surface defect images are converted to gray images, then the existing methods are used to perform defect detection. However, in Section 2.2, the contrast between the defect and the background of the weighted matrix is greater than that in the gray images (Figure 3). To verify the effectiveness of low-rank and sparse matrices decomposition in defect detection, all methods are simultaneously used in the weighted matrix. Visual comparisons are shown in Figure 13, Figure 14, Figure 15, Figure 16 and Figure 17, while some quantitative comparisons are presented in Figure 18 and Table 2.

3.3.1. Visual Effect Verification

Figure 13, Figure 14 and Figure 15 show the visualization results. As can be seen, the detection effect of NVE [26], GVE [24], and IVE [27] present great distinction between single-defect and multiple-defect images. In Figure 13, these methods cannot identify background and defects, whereas in Figure 14, they fail to separate the defect or only part of the region. Similar conclusions can be obtained in other small surface defect images. Ostu [21] and MT [50] are unable to distinguish defects and backgrounds in Figure 13 and Figure 14. PHOT [38] only identifies one of the defects in a small number of multi-defect images, and performs poorly in single-defect images. The results are similar with those in Section 3.2. EnOstu [25], VE [23], SSD [45], and our method (WMD) are capable of discriminating the defect regions. In Figure 15, the visual results of the EnOstu [25], NVE [26], GVE [24], IVE [27], PHOT [38], SSD [45], Ostu [21], and MT [50] in the weighted matrix are similar to those in Figure 9. The detection performance of the VE [23] in the weighted matrix is better than that in the original image, but it only detects part of the defects, and also mistakenly judges some background as defects. Our method (WMD) is capable of separating defects from the background.
Figure 16 and Figure 17 show some visual comparisons of the best methods in the experiments. As can be seen from Figure 16, EnOstu [25], VE [23], and WMD successfully separate the defects from the background. However, SSD [45] occasionally fails to identify the defect. In Figure 17a–d, EnOstu [25] and VE [23] correctly detect small defects, but are incapable of detecting defects similar to the background in Figure 17e. SSD [45] is unable to detect the defects as small as a few pixels or similar to the background. The method proposed (WMD) in this paper successfully locates the defects in the above five images.

3.3.2. Performance Metrics Verification

Figure 18 shows some quantitative comparison of the best methods (EnOstu [25], VE [23], SSD [45], and WMD). It can be concluded that the proposed model WMD in this paper has the best performance in terms of eight evaluation metrics (Figure 18a,c–i). The quantitative evaluation results in Figure 15 are shown in Table 2, which yields similar conclusions to Table 1. Among them, the P r and S p values of PHOT [38] are both 0, indicating that it judges all defects as background. However, the A C value reaches 99.77691 % , because the proportion of defects in the image is extremely low, and the background is particularly large. The quantitative evaluation results in Figure 15 are shown in Table 2, which yields similar conclusions to Table 1. Among them, the P r and S p values of PHOT [38] are both 0, indicating that it judges all defects as background. However, the A C value reaches 99.77691 % , because the proportion of defects in the image is quite low, and the background is particularly large.
In summary, for the images whose defect and defect-free region share similar appearance, WMD successfully separates the defects from the background, while other methods often fail. These results illustrate the robustness of the WMD algorithm, and confirm the effectiveness of the proposed weighted matrix in separating the low-rank and sparse subspaces.

4. Conclusions

In this paper, we have presented a weighted matrix decomposition model which effectively solves the problem of detecting small surface defects. Firstly, a weighted matrix is established to improve the contrast between small defects and background. Then, the weighted matrix is decomposed into a low-rank matrix representing image background and a sparse matrix identifying defects, which eliminates the interference of complex backgrounds. Finally, the pixel intensity of the defects is analyzed to select the optimal threshold and accurately separate the defects from the background. Experiments on a small surface defect dataset have shown that, compared to the conventional methods, the proposed achieves encouraging performance in small defect detection against complex product surfaces on public benchmark datasets under various quantitative metrics. The proposed model provides an effective solution in industrial manufacturing for detecting small defects against complex product surfaces. In the future, we will further generalize our 2D patch model into 3D or more dimensions and investigate applications of the N-D patch model. We will also try multi-subspace cluster strategies to further improve the flexibility of our method in highly variant background cases.

Author Contributions

Conceptualization, Z.Z. and H.W.; methodology, Z.Z. and H.W.; software, Z.Z. and H.W.; validation, Z.Z., H.W. and D.X.; writing—original draft preparation, Z.Z. and H.W.; writing—review and editing, Z.Z., H.W. and D.X.; visualization, Z.Z. and H.W.; supervision, Z.Z. and H.W.; project administration, Z.Z., H.W. and D.X.; funding acquisition, Z.Z., H.W. and D.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (Grant No. 62103112), the China Postdoctoral Science Foundation (Grant No.2021M700921), Guangzhou Key Laboratory of Intelligent Building Equipment Information Integration and Control (Grant No. 202002010003), University scientific research project of Guangzhou Education Bureau (Grant No. 202234607), and Special projects in universities’ key fields of Guangdong Province (Grant No. 2020ZDZX2002).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Chang, J.; Qiao, Z.; Wang, Q.; Kong, X.; Yuan, Y. Investigation on SMT Product Defect Recognition Based on Multi-Source and Multi-Dimensional Data Reconstruction. Micromachines 2022, 13, 860. [Google Scholar] [CrossRef] [PubMed]
  2. Okunkova, A.A.; Volosova, M.A.; Kropotkina, E.Y.; Hamdy, K.; Grigoriev, S.N. Electrical Discharge Machining of Alumina Using Ni-Cr Coating and SnO Powder-Mixed Dielectric Medium. Metals 2022, 12, 1749. [Google Scholar] [CrossRef]
  3. Wang, J.; Li, Q.; Gan, J.; Yu, H.; Yang, X. Surface Defect Detection via Entity Sparsity Pursuit With Intrinsic Priors. IEEE Trans. Ind. Inform. 2020, 16, 141–150. [Google Scholar] [CrossRef]
  4. Olanipekun, A.T.; Maledi, N.B.; Mashinini, P.M. The synergy between powder metallurgy processes and welding of metallic alloy: A review. Powder Metall. 2020, 63, 254–267. [Google Scholar] [CrossRef]
  5. Zhong, Z.; Ma, Z. A novel defect detection algorithm for flexible integrated circuit package substrates. IEEE Trans. Ind. Electron. 2022, 69, 2117–2126. [Google Scholar] [CrossRef]
  6. Niu, M.; Song, K.; Huang, L.; Wang, Q.; Yan, Y.; Meng, Q. Unsupervised Saliency Detection of Rail Surface Defects Using Stereoscopic Images. IEEE Trans. Ind. Inform. 2021, 17, 2271–2281. [Google Scholar] [CrossRef]
  7. Yapi, D.; Allili, M.S.; Baaziz, N. Automatic Fabric Defect Detection Using Learning-Based Local Textural Distributions in the Contourlet Domain. IEEE Trans. Autom. Sci. Eng. 2018, 15, 1014–1026. [Google Scholar] [CrossRef]
  8. Liu, K.; Luo, N.; Li, A.; Tian, Y.; Sajid, H.; Chen, H. A New Self-Reference Image Decomposition Algorithm for Strip Steel Surface Defect Detection. IEEE Trans. Instrum. Meas. 2020, 69, 4732–4741. [Google Scholar] [CrossRef]
  9. Tzu, F.M. Effectiveness of electrical and optical detection at pixel circuit on thin-film transistors. Micromachines 2021, 12, 135. [Google Scholar] [CrossRef]
  10. Yu, J.; Yang, Y.; Zhang, H.; Sun, H.; Zhang, Z.; Xia, Z.; Zhu, J.; Dai, M.; Wen, H. Spectrum Analysis Enabled Periodic Feature Reconstruction Based Automatic Defect Detection System for Electroluminescence Images of Photovoltaic Modules. Micromachines 2022, 13, 332. [Google Scholar] [CrossRef]
  11. Wang, Q.; Zhang, Z.; Yin, W.; Chen, H.; Liu, Y. Defect Detection Method for CFRP Based on Line Laser Thermography. Micromachines 2022, 13, 612. [Google Scholar] [CrossRef]
  12. Ojala, T.; Pietikäinen, M. Texture classification. In CVonline: The Evolving, Distributed, Non-Proprietary, On-Line Compendium of Computer Vision. 2001. Available online: https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OJALA1/texclas.htm (accessed on 10 December 2022).
  13. Win, M.; Bushroa, A.; Hassan, M.; Hilman, N.; Ide-Ektessabi, A. A contrast adjustment thresholding method for surface defect detection based on mesoscopy. IEEE Trans. Ind. Inform. 2015, 11, 642–649. [Google Scholar] [CrossRef]
  14. Yang, H.; Chen, Y.; Song, K.; Yin, Z. Multiscale Feature-Clustering-Based Fully Convolutional Autoencoder for Fast Accurate Visual Inspection of Texture Surface Defects. IEEE Trans. Autom. Sci. Eng. 2019, 16, 1450–1467. [Google Scholar] [CrossRef]
  15. Ojala, T.; Pietikainen, M.; Silven, O. Edge-based texture measures for surface inspection. In Proceedings of the 11th IAPR International Conference on Pattern Recognition. Vol. II. Conference B: Pattern Recognition Methodology and Systems, The Hague, The Netherlands, 30 August–3 September 1992; Volume 1, pp. 594–595. [Google Scholar]
  16. Zhiznyakov, A.; Privezentsev, D.; Zakharov, A. Using fractal features of digital images for the detection of surface defects. Pattern Recognit. Image Anal. 2015, 25, 122–131. [Google Scholar] [CrossRef]
  17. Ma, Y.; Li, Q.; Zhou, Y.; He, F.; Xi, S. A surface defects inspection method based on multidirectional gray-level fluctuation. Int. J. Adv. Robot. Syst. 2017, 14, 1729881417703114. [Google Scholar] [CrossRef] [Green Version]
  18. Pastor-López, I.; Sanz, B.; Puerta, J.G.d.l.; Bringas, P.G. Surface defect modelling using co-occurrence matrix and fast fourier transformation. In Hybrid Artificial Intelligence Systems; Springer: Cham, Switzerland, 2019; pp. 745–757. [Google Scholar]
  19. Song, K.; Yan, Y. A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects. Appl. Surf. Sci. 2013, 285, 858–864. [Google Scholar] [CrossRef]
  20. Nieniewski, M. Morphological Detection and Extraction of Rail Surface Defects. IEEE Trans. Instrum. Meas. 2020, 69, 6870–6879. [Google Scholar] [CrossRef]
  21. Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef] [Green Version]
  22. Bradley, D.; Roth, G. Adaptive thresholding using the integral image. J. Graph. Tools 2007, 12, 13–21. [Google Scholar] [CrossRef]
  23. Ng, H.F. Automatic thresholding for defect detection. Pattern Recognit. Lett. 2006, 27, 1644–1649. [Google Scholar] [CrossRef]
  24. Ng, H.F.; Jargalsaikhan, D.; Tsai, H.C.; Lin, C.Y. An improved method for image thresholding based on the valley-emphasis method. In Proceedings of the 2013 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference, Kaohsiung, Taiwan, 29 October–1 November 2013; pp. 1–4. [Google Scholar]
  25. Truong, M.T.N.; Kim, S. Automatic image thresholding using Otsu’s method and entropy weighting scheme for surface defect detection. Soft Comput. 2018, 22, 4197–4203. [Google Scholar] [CrossRef]
  26. Fan, J.L.; Lei, B. A modified valley-emphasis method for automatic thresholding. Pattern Recognit. Lett. 2012, 33, 703–708. [Google Scholar] [CrossRef]
  27. Liu, Z.; Wang, J.; Zhao, Q.; Li, C. A fabric defect detection algorithm based on improved valley-emphasis method. Res. J. Appl. Sci. Eng. Technol. 2014, 7, 2427–2431. [Google Scholar] [CrossRef]
  28. Wang, H.; Peng, J.; Yue, S. A directionally selective small target motion detecting visual neural network in cluttered backgrounds. IEEE Trans. Cybern. 2018, 50, 1541–1555. [Google Scholar] [CrossRef]
  29. Wang, H.; Peng, J.; Zheng, X.; Yue, S. A robust visual system for small target motion detection against cluttered moving backgrounds. IEEE Trans. Neural Netw. Learn. Syst. 2019, 31, 839–853. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  30. Zorić, B.; Matić, T.; Hocenski, Ž. Classification of biscuit tiles for defect detection using Fourier transform features. ISA Trans. 2022, 125, 400–414. [Google Scholar] [CrossRef] [PubMed]
  31. Tsa, D.M.; Wu, S.K. Automated surface inspection using Gabor filters. Int. J. Adv. Manuf. Technol. 2000, 16, 474–482. [Google Scholar] [CrossRef] [Green Version]
  32. Kumar, A. Inspection of surface defects using optimal FIR filters. In Proceedings of the 2003 IEEE International Conference on Acoustics, Speech, and Signal Processing, Hong Kong, China, 6–10 April 2003. [Google Scholar]
  33. Zhou, X.; Wang, Y.; Zhu, Q.; Mao, J.; Xiao, C.; Lu, X.; Zhang, H. A surface defect detection framework for glass bottle bottom using visual attention model and wavelet transform. IEEE Trans. Ind. Inform. 2019, 16, 2189–2201. [Google Scholar] [CrossRef]
  34. Bonnaillie-Noël, V.; Brancherie, D.; Dambrine, M.; Hérau, F.; Tordeux, S.; Vial, G. Multiscale expansion and numerical approximation for surface defects. In ESAIM: Proceedings; EDP Sciences: Les Ulis, France, 2011; Volume 33, pp. 22–35. [Google Scholar]
  35. Li, W.C.; Tsai, D.M. Defect inspection in low-contrast LCD images using Hough transform-based nonstationary line detection. IEEE Trans. Ind. Inform. 2009, 7, 136–147. [Google Scholar] [CrossRef]
  36. Tsai, D.M.; Hsieh, C.Y. Automated surface inspection for directional textures. Image Vis. Comput. 1999, 18, 49–62. [Google Scholar] [CrossRef]
  37. Hu, G.H.; Wang, Q.H.; Zhang, G.H. Unsupervised defect detection in textiles based on Fourier analysis and wavelet shrinkage. Appl. Opt. 2015, 54, 2963–2980. [Google Scholar] [CrossRef] [PubMed]
  38. Aiger, D.; Talbot, H. The phase only transform for unsupervised surface defect detection. In Emerging Topics in Computer Vision and Its Applications; World Scientific: Singapore, 2012; pp. 215–232. [Google Scholar]
  39. Choi, J.; Kim, C. Unsupervised detection of surface defects: A two-step approach. In Proceedings of the 2012 19th IEEE International Conference on Image Processing, Orlando, FL, USA, 30 September–3 October 2012; pp. 1037–1040. [Google Scholar]
  40. Luo, Q.; Fang, X.; Liu, L.; Yang, C.; Sun, Y. Automated visual defect detection for flat steel surface: A survey. IEEE Trans. Instrum. Meas. 2020, 69, 626–644. [Google Scholar] [CrossRef] [Green Version]
  41. Cross, G.R.; Jain, A.K. Markov random field texture models. IEEE Trans. Pattern Anal. Mach. Intell. 1983, PAMI-5, 25–39. [Google Scholar] [CrossRef] [PubMed]
  42. Susan, S.; Sharma, M. Automatic texture defect detection using Gaussian mixture entropy modeling. Neurocomputing 2017, 239, 232–237. [Google Scholar] [CrossRef]
  43. Liu, K.; Wang, H.; Chen, H.; Qu, E.; Tian, Y.; Sun, H. Steel Surface Defect Detection Using a New Haar–Weibull-Variance Model in Unsupervised Manner. IEEE Trans. Instrum. Meas. 2017, 66, 2585–2596. [Google Scholar] [CrossRef]
  44. Liu, K.; Yan, H.; Meng, K.; Chen, H.; Sajid, H. Iterating tensor voting: A perceptual grouping approach for crack detection on el images. IEEE Trans. Autom. Sci. Eng. 2020, 18, 831–839. [Google Scholar] [CrossRef]
  45. Yan, H.; Paynabar, K.; Shi, J. Anomaly detection in images with smooth background via smooth-sparse decomposition. Technometrics 2017, 59, 102–114. [Google Scholar] [CrossRef]
  46. Yan, H.; Paynabar, K.; Shi, J. Real-time monitoring of high-dimensional functional data streams via spatio-temporal smooth sparse decomposition. Technometrics 2018, 60, 181–197. [Google Scholar] [CrossRef]
  47. Yu, H.; Li, Q.; Tan, Y.; Gan, J.; Wang, J.; Geng, Y.A.; Jia, L. A Coarse-to-Fine Model for Rail Surface Defect Detection. IEEE Trans. Instrum. Meas. 2019, 68, 656–666. [Google Scholar] [CrossRef]
  48. Cao, J.; Zhang, J.; Wen, Z.; Wang, N.; Liu, X. Fabric defect inspection using prior knowledge guided least squares regression. Multimed. Tools Appl. 2017, 76, 4141–4157. [Google Scholar] [CrossRef]
  49. Qu, T.; Zou, L.; Zhang, Q.; Chen, X.; Fan, C. Defect detection on the fabric with complex texture via dual-scale over-complete dictionary. J. Text. Inst. 2016, 107, 743–756. [Google Scholar] [CrossRef]
  50. Aydin, I.; Akin, E.; Karakose, M. Defect classification based on deep features for railway tracks in sustainable transportation. Appl. Soft Comput. 2021, 111, 107706. [Google Scholar] [CrossRef]
  51. Yang, H.; Wang, Y.; Hu, J.; He, J.; Yao, Z.; Bi, Q. Deep learning and machine vision-based inspection of rail surface defects. IEEE Trans. Instrum. Meas. 2021, 71, 1–14. [Google Scholar] [CrossRef]
  52. Block, S.B.; da Silva, R.D.; Dorini, L.B.; Minetto, R. Inspection of imprint defects in stamped metal surfaces using deep learning and tracking. IEEE Trans. Ind. Electron. 2020, 68, 4498–4507. [Google Scholar] [CrossRef]
  53. Liu, L.; Ouyang, W.; Wang, X.; Fieguth, P.; Chen, J.; Liu, X.; Pietikäinen, M. Deep learning for generic object detection: A survey. Int. J. Comput. Vis. 2020, 128, 261–318. [Google Scholar] [CrossRef] [Green Version]
  54. Song, K.; Yan, Y. Micro surface defect detection method for silicon steel strip based on saliency convex active contour model. Math. Probl. Eng. 2013, 2013, 429094. [Google Scholar] [CrossRef] [Green Version]
  55. Schwarz, M.W.; Cowan, W.B.; Beatty, J.C. An experimental comparison of RGB, YIQ, LAB, HSV, and opponent color models. ACM Trans. Graph. 1987, 6, 123–158. [Google Scholar] [CrossRef]
  56. Candès, E.J.; Li, X.; Ma, Y.; Wright, J. Robust principal component analysis? J. ACM 2011, 58, 1–37. [Google Scholar] [CrossRef]
  57. Lin, Z.; Ganesh, A.; Wright, J.; Wu, L.; Chen, M.; Ma, Y. Fast Convex Optimization Algorithms for Exact Recovery of a corrupted Low-Rank Matrix. Coordinated Science Laboratory Report No. UILU-ENG-09-2214, DC-246. 2009. Available online: https://core.ac.uk/download/pdf/158319805.pdf (accessed on 10 December 2022).
  58. Achanta, R.; Hemami, S.; Estrada, F.; Susstrunk, S. Frequency-tuned salient region detection. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 20–25 June 2009; pp. 1597–1604. [Google Scholar]
  59. Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. 2004, 13, 600–612. [Google Scholar] [CrossRef]
  60. Fan, D.P.; Gong, C.; Cao, Y.; Ren, B.; Cheng, M.M.; Borji, A. Enhanced-alignment measure for binary foreground map evaluation. arXiv 2018, arXiv:1805.10421. [Google Scholar]
Figure 1. Examples of small surface defect dataset [54]. (a) Typical challenging examples of small surface defect. (b) The ratio is calculated over the defective or defect-free regions to an image.
Figure 1. Examples of small surface defect dataset [54]. (a) Typical challenging examples of small surface defect. (b) The ratio is calculated over the defective or defect-free regions to an image.
Micromachines 14 00092 g001
Figure 2. Framework of the WMD model for defect detection.
Figure 2. Framework of the WMD model for defect detection.
Micromachines 14 00092 g002
Figure 3. The first column shows R channel, G channel, B channel, grayscale version, and weighted matrix of a steel surface image, respectively, while the second and third columns present their corresponding 2D and 3D views. The weighted matrix is derived from the weighted summation of the R, G, and B channels.
Figure 3. The first column shows R channel, G channel, B channel, grayscale version, and weighted matrix of a steel surface image, respectively, while the second and third columns present their corresponding 2D and 3D views. The weighted matrix is derived from the weighted summation of the R, G, and B channels.
Micromachines 14 00092 g003
Figure 4. Matrix decomposition in single-defect images. The first column is a weighted matrix, which is decomposed into low-rank (in second column) and sparse matrices (in third column), respectively.
Figure 4. Matrix decomposition in single-defect images. The first column is a weighted matrix, which is decomposed into low-rank (in second column) and sparse matrices (in third column), respectively.
Micromachines 14 00092 g004
Figure 5. Matrix decomposition in multiple-defect images. The first column is a weighted matrix, which is decomposed into low-rank (in second column) and sparse matrices (in third column), respectively.
Figure 5. Matrix decomposition in multiple-defect images. The first column is a weighted matrix, which is decomposed into low-rank (in second column) and sparse matrices (in third column), respectively.
Micromachines 14 00092 g005
Figure 6. Low-rank matrix analysis. The first column shows three representative examples. In addition, the second and third one are weighted matrices and the singular values of the corresponding background patch-images.
Figure 6. Low-rank matrix analysis. The first column shows three representative examples. In addition, the second and third one are weighted matrices and the singular values of the corresponding background patch-images.
Micromachines 14 00092 g006
Figure 7. Visual comparisons of detection results of the ten methods on the image with a single defect. Our detection result (WMD) is quite close to ground truth.
Figure 7. Visual comparisons of detection results of the ten methods on the image with a single defect. Our detection result (WMD) is quite close to ground truth.
Micromachines 14 00092 g007
Figure 8. Visual comparisons of detection results of the ten methods on the image with multiple defects. The detection result of the proposed WMD method is quite close to ground truth, whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Figure 8. Visual comparisons of detection results of the ten methods on the image with multiple defects. The detection result of the proposed WMD method is quite close to ground truth, whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Micromachines 14 00092 g008
Figure 9. Visual comparisons of detection results of the ten methods on the image with multiple defects. The detection result of the proposed WMD method is quite close to ground truth, whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Figure 9. Visual comparisons of detection results of the ten methods on the image with multiple defects. The detection result of the proposed WMD method is quite close to ground truth, whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Micromachines 14 00092 g009
Figure 10. Visual comparisons of four methods on (ae) five randomly selected single-defect images. The detection result of the proposed WMD method is quite close to ground truth (GT), whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Figure 10. Visual comparisons of four methods on (ae) five randomly selected single-defect images. The detection result of the proposed WMD method is quite close to ground truth (GT), whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Micromachines 14 00092 g010
Figure 11. Visual comparisons of four methods on (ae) five randomly selected multiple-defect images. The detection result of the proposed WMD method is quite close to ground truth (GT), whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Figure 11. Visual comparisons of four methods on (ae) five randomly selected multiple-defect images. The detection result of the proposed WMD method is quite close to ground truth (GT), whereas the other competing methods are unable to either identify the defect location or completely separate the defect from the background.
Micromachines 14 00092 g011
Figure 12. Quantitative comparison in terms of (a) A c (%), (b) S p (%), (c) S e (%), (d) M F , (e) M I o U , (f) M I , (g) N M I , (h) S S I M , and (i) E M , where the x axis is the Image ID. Our method (WMD) significantly outperforms these evaluated defect detection algorithms across ten randomly selected surface defect detection images.
Figure 12. Quantitative comparison in terms of (a) A c (%), (b) S p (%), (c) S e (%), (d) M F , (e) M I o U , (f) M I , (g) N M I , (h) S S I M , and (i) E M , where the x axis is the Image ID. Our method (WMD) significantly outperforms these evaluated defect detection algorithms across ten randomly selected surface defect detection images.
Micromachines 14 00092 g012
Figure 13. Visual comparisons of detection results using the ten methods on weighed matrix. NVE, GVE, IVE, and PHOT do not have any output. EnOstu, VE, SSD, Ostu, MT, and our method (WMD) have the ability to separate defects from the background.
Figure 13. Visual comparisons of detection results using the ten methods on weighed matrix. NVE, GVE, IVE, and PHOT do not have any output. EnOstu, VE, SSD, Ostu, MT, and our method (WMD) have the ability to separate defects from the background.
Micromachines 14 00092 g013
Figure 14. Visual comparisons of detection results using the ten methods on weighed matrix with multiple defects. NVE, GVE, and PHOT cannot effectively identify defects. EnOstu, VE, IVE, SSD, Ostu, MT and our method (WMD) can effectively provide the location of the defect.
Figure 14. Visual comparisons of detection results using the ten methods on weighed matrix with multiple defects. NVE, GVE, and PHOT cannot effectively identify defects. EnOstu, VE, IVE, SSD, Ostu, MT and our method (WMD) can effectively provide the location of the defect.
Micromachines 14 00092 g014
Figure 15. Visual comparisons of detection results using the ten methods on weighed matrix of magnetic tile images. EnOstu, VE, NVE, GVE, IVE, PHOT, SSD, Ostu, and MT cannot effectively identify defects. VE only identifies some defects, and our method (WMD) can effectively provide the location of defect.
Figure 15. Visual comparisons of detection results using the ten methods on weighed matrix of magnetic tile images. EnOstu, VE, NVE, GVE, IVE, PHOT, SSD, Ostu, and MT cannot effectively identify defects. VE only identifies some defects, and our method (WMD) can effectively provide the location of defect.
Micromachines 14 00092 g015
Figure 16. Visual comparisons of different methods on (ae) five randomly selected single-defect images. The ground truth (GT) is shown in the last column. EnOstu, VE, SSD, and our method (WMD) have the ability to locate the defect.
Figure 16. Visual comparisons of different methods on (ae) five randomly selected single-defect images. The ground truth (GT) is shown in the last column. EnOstu, VE, SSD, and our method (WMD) have the ability to locate the defect.
Micromachines 14 00092 g016
Figure 17. Visual comparisons of different methods on (ae) five randomly selected multiple-defect images. Compared with the baseline methods, the proposed WMD produces more discriminative models, which is capable of identifying the defect from backgrounds.
Figure 17. Visual comparisons of different methods on (ae) five randomly selected multiple-defect images. Compared with the baseline methods, the proposed WMD produces more discriminative models, which is capable of identifying the defect from backgrounds.
Micromachines 14 00092 g017
Figure 18. Quantitative comparison in terms of (a) A c (%), (b) S p (%), (c) S e (%), (d) M F , (e) M I o U , (f) M I , (g) N M I , (h) S S I M , and (i) E M , where the x axis is the Image ID. Our method outperforms the baseline methods.
Figure 18. Quantitative comparison in terms of (a) A c (%), (b) S p (%), (c) S e (%), (d) M F , (e) M I o U , (f) M I , (g) N M I , (h) S S I M , and (i) E M , where the x axis is the Image ID. Our method outperforms the baseline methods.
Micromachines 14 00092 g018
Table 1. Results on the magnetic tile image in terms of A c (%), P r (%), S p (%), S e (%), M F , M I o U , M I , N M I , S S I M , and E M .
Table 1. Results on the magnetic tile image in terms of A c (%), P r (%), S p (%), S e (%), M F , M I o U , M I , N M I , S S I M , and E M .
Methods Ac (%) Pr (%) Sp (%) Se (%) MF MIoU NMI SSIM EM
EnOtsu0.450130.199901000.251230.003990.002000.500080.867460.00130
VE10.495140.2222910010.316310.004440.002220.500310.883160.23347
NVE0.278370.199561000.079130.003980.002000.500040.867110.02549
GVE0.278370.199561000.079130.003980.002000.500040.867110.02549
IVE0.278370.199561000.079130.003980.002000.500040.867110.02549
PHOT99.662408.333336.9306999.847680.075680.039330.507450.999840.58086
SSD99.8400979.4117626.7326799.986150.400000.250000.590210.999920.64337
Ostu36.867250.3024596.0396036.749030.006030.003020.500460.924780.24855
MT50.754170.3834695.0495050.665660.007640.003830.500720.944070.25117
WMD99.8637894.4444433.6633799.996040.496350.330100.628830.999940.66594
Table 2. Results on weight matrix of magnetic tile image in terms of A c (%), P r (%), S p (%), S e (%), M F , M I o U , M I , N M I , S S I M , and E M .
Table 2. Results on weight matrix of magnetic tile image in terms of A c (%), P r (%), S p (%), S e (%), M F , M I o U , M I , N M I , S S I M , and E M .
Methods Ac (%) Pr (%) Sp (%) Se (%) MF MIoU NMI SSIM EM
EnOtsu0.552790.200111000.354100.003990.002000.500090.867660.00655
VE80.784570.6355161.3861480.823330.012580.006330.500850.977790.25874
NVE0.286270.199571000.087040.003980.002000.500040.867120.01858
GVE0.286270.199571000.087040.003980.002000.500040.867120.01858
IVE0.286270.199571000.087040.003980.002000.500040.867120.01858
PHOT99.776910099.97626000.500010.999870.38060
SSD99.6031727.6785761.3861499.679530.381540.235740.573700.999860.66337
Ostu62.840560.4866491.0891162.784120.009680.004860.500950.958230.25334
MT49.194500.3678994.0594149.104860.007330.003680.500640.941400.25088
WMD99.8637894.4444433.6633799.996040.496350.330100.628830.999940.66594
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhong, Z.; Wang, H.; Xiang, D. Weighted Matrix Decomposition for Small Surface Defect Detection. Micromachines 2023, 14, 92. https://doi.org/10.3390/mi14010092

AMA Style

Zhong Z, Wang H, Xiang D. Weighted Matrix Decomposition for Small Surface Defect Detection. Micromachines. 2023; 14(1):92. https://doi.org/10.3390/mi14010092

Chicago/Turabian Style

Zhong, Zhiyan, Hongxin Wang, and Dan Xiang. 2023. "Weighted Matrix Decomposition for Small Surface Defect Detection" Micromachines 14, no. 1: 92. https://doi.org/10.3390/mi14010092

APA Style

Zhong, Z., Wang, H., & Xiang, D. (2023). Weighted Matrix Decomposition for Small Surface Defect Detection. Micromachines, 14(1), 92. https://doi.org/10.3390/mi14010092

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop