Defect Image Recognition and Classification for Eddy Current Testing of Titanium Plate Based on Convolutional Neural Network

. In the actual production environment, the eddy current imaging inspection of titanium plate defects is prone to scan shift, scale distortion, and noise interference in varying degrees, which leads to the defect false detection and even missed inspection. In view of this problem, a novel image recognition and classiﬁcation method based on convolutional neural network (CNN) for eddy current detection of titanium plate defects is proposed. By constructing a variety of experimental conditions and collecting defect signals, the characteristics of eddy current testing (ECT) signals for titanium plate defects are analyzed, and then the convolution structure and learning parameters are set. The structural characteristics of local connectivity and shared weights of CNN have better feature learning and characterization capabilities for titanium plate defect images under scan shift, scale distortion, and strong noise interference. The results prove that, compared with other deep learning and classical machine learning methods, the CNN has a higher recognition and classiﬁcation accuracy for the defect eddy current image of the titanium plate in the complex detection environment.


Introduction
Titanium and titanium alloy materials have been widely used in aerospace, deep-sea exploration, and petrochemical and high-end equipment manufacturing because of their advantages of low density, high strength, and good corrosion resistance [1,2].In the application of titanium materials, the use of titanium plate is more than 50% of the total usage [3].However, due to the influence of manufacturing process and service environment, various defects are inevitable in titanium plate, and the most common defects are internal inclusions and fatigue defects.e existence of defects in the plate will inevitably bring major safety hazard to the service structure and then cause safety accidents and economic losses.
erefore, it is extremely urgent to detect and evaluate the defects in titanium plate in time.
Eddy current testing (ECT) has been widely used in the defect detection and performance evaluation of conductive materials due to its advantages such as accuracy, efficiency, and convenience [4][5][6][7].Imaging technology overcomes the shortcomings of traditional eddy current nondestructive testing (NDT) methods that cannot obtain defect shapes and has the advantages of intuitive defect information and good visibility.erefore, defect imaging has received extensive attentions from researchers in recent years.He et al. used pulsed eddy current C-scan to detect the surface and subsurface of metal plate specimen and realized the recognition and classification of simple defects based on defect images [8].Xu et al. detected the hardness distribution of metal plate welding seam through eddy current scanning and judged the hardness distribution of specimen welding surface from the actual scanning image [9].Ricci et al. used a multifrequency excitation to detect defects in the metal plate and addressed the effect of lift-off effect on defect imaging detection [10].Li et al. studied the improved the eddy current probe imaging detection of metal subsurface corrosion defects and analyzed that the depth of defects has a great impact on the image quality [11].In addition, some classical machine learning algorithms have also been applied to the recognition and classification of ECT signals, such as support vector machine (SVM) [12], Hilbert transform (HT) [13], Fisher linear discriminant analysis (FLDA) [14], and empirical mode decomposition (EMD) [15].However, the accuracy of defect detection and classification of the existing methods is still insufficient, and most of them are based on the defect signal acquisition under ideal conditions, which leads to the lack of generalization of the methods.In the actual application environment, the detection effect is poor under complex circumstances such as uncertain scanning mode and serious noise influence.
In recent years, deep learning has attracted significant attentions due to their powerful high-level feature learning capabilities and their ability to perform more essential characterization of data [16].Especially, in the field of image processing, convolutional neural network (CNN) has been widely studied and applied in the field of image understanding and video processing because of its three structural characteristics: local connectivity, shared weights, and downsampling [17][18][19].In the same way, the structural characteristics of CNN also provide a novel idea for the recognition and classification of ECT images of titanium plate defects in complex detection environment.erefore, the recognition and classification of ECT images of titanium plate defects in the complex inspection environment based on CNN are studied in this paper.e results show that the local connectivity still has a good effect on defect edge feature extraction when the defect image of titanium plate is shifted and distorted.e pooling layer using the maximum pooling has a strong ability to suppress the noise in the detection signal, and the shared weights make the training efficiency of the network model greatly improved.
erefore, the accuracy of the CNN for the identification and classification of the titanium plate defect eddy current detection image in the complex environment is better than that of other deep learning and classic machine learning methods.e remainder of this work is arranged as follows: Section 2 introduces the structure setting and parameter selection of the CNN by combining the characteristics of ECT signal.en, the experimental design and defect signal acquisition are introduced in Section 3. Section 4 carries out the experiment and discussion of defect image analysis based on convolutional neural network.Finally, conclusions and further work are outlined in Section 5.

Methods
CNN is a kind of deep neural network that includes convolution operation in the calculation process.It was first applied to handwritten digit recognition and character recognition by LeCun et al. [20,21].e convolution calculation in the network can effectively reduce the number of parameters of the multilayer network, thus reducing its complexity and preventing the over fitting problem of the training model.e typical structure of CNN is shown in Figure 1.
CNN is mainly composed of the input layer, convolution layer, pooling layer, full connection layer, and output layer.Its training process is to learn network parameters such as kernel parameters and interlayer connection weights of convolution layer through existing training sets, while the classification process is to calculate the corresponding class labels based on input signals and network parameters trained.In the actual model training process, multiple convolution layers and pooling layers are alternately connected layer by layer.e convolution process is a weighted summation of local input and connection weights, and then the bias is added, as shown in Figure 1.

Convolution Layer.
Convolution calculation is the basic process of CNN, which convolves through the convolution kernel and the input feature map of the previous layer and then obtains the output of a convolution calculation through the activation function.Sliding the convolution kernel in the X and Y directions in turn can get a new feature map.e convolution process is shown in Figure 2.
By sliding the convolution kernel on the input feature map for many times, the new values of multiple feature maps can be obtained by convolution: where x l−1 i represents the value of the output feature map of the previous layer, k l ij is the convolution kernel matrix, which has a size p × q, * denotes the convolution calculation, and conv l j is the j-th convolution value of the convolution layer l.After the convolution calculation, a bias term will be added to the convolution value, and a nonlinear activation function will be introduced: where b l j represents the bias to the convolution value conv l j , f(•) represents the nonlinear activation function, and y l j is the new output feature map obtained.
For the setting of nonlinear activation function f(•), the existing activation functions include sigmoid function, tanh function, and rectified linear unit (ReLU).Considering the sparsity of the ECT signal of titanium plate defects, as well as the convergence speed of the network in the training process and the problem of alleviating the disappearance of the gradient, ReLU was adopted as the activation function in this paper as follows: In the process of convolution solving the input feature map, combined with equation ( 2), suppose that the size of the input feature map is m × n, the resulting new feature map should be (m − p + 1) × (n − q + 1).e convolution process can be expressed as the feature extraction of the input.
In the feature extraction process, the convolution kernel only computes the partial elements of the input feature map.

Complexity
At the same time, for the same layer of feature map, the same convolution kernel weight is used to calculate the whole input, thus reducing the number of weight parameters.ese two processes are the local connectivity and shared weights characteristics of CNN.

Pooling Layer.
e pooling layer is also called the downsampling layer, and its input corresponds to the output feature map of the convolutional layer.According to the analysis of different characteristics of training samples, the pooling methods include the maximum pooling and average pooling.
e maximum pooling method only takes the maximum value in the pooling area as the sampling result, while the average pooling method is to obtain the average value of all elements in the area.e maximum pooling method has better pooling effect for the samples with strong sparsity [22], and it is also easier to express the contour information in the samples.erefore, the feature extraction of defect contour information from defect image is studied, and the maximum pooling method is used in this paper.
e maximum pooling method is shown in Figure 3.
In this paper, a pooling area with 2 × 2 is used for maximum pooling, and the input feature map is nonoverlapping sliding to take the maximum value, and the output feature map size is only 1/4 of the input.After the pooling layer, the feature space of the input image is reduced again, which further reduces the complexity of the network model.

Full Connection Layer.
In the fully connection layer, the pooling features of the last layer in the convolution process are reconstructed into one-dimensional features as the input of the fully connected network.e output of this layer is the category corresponding to the extracted features, which can be expressed as follows: From the above equation, it can be seen that the output of the fully connected layer is determined by one-dimensional characteristic x, weight w, bias b and activation function f(•).
e classification of titanium plate defects belongs to a multiclassification model.erefore, the output value of the fully connected layer in this paper is classified by softmax logistic regression, as follows:

Complexity
where T represents the total number of categories in the sample and a j represents the j-th value of full connection layer output.e output of the softmax layer is the probability vector of each category for the preinput feature vector.

Experimental Setup and Signal Acquisition
In order to verify the identification and classification ability of the proposed method in this paper for the eddy current detection images of titanium plate defects in the complex detection environment, defects with different sizes were manufactured in the titanium plate specimen and various experiments were conducted on the defects based on the ECT instrument and the detection signals of defects were collected.

ECT Instrument.
Figure 4 shows the ECT instrument, which consists of an electromagnetic (EM) instrument, a probe, a scanning stage, a stage controller, and a PC host system [9].e EM instrument was designed and developed based on the field programmable gate array (FPGA).FPGA uses the direct digital synthesis technology to generate excitation signals, and the signal is output to the excitation coil of electromagnetic probe after digital to analogue conversion (DAC) and multistage amplification.
After amplification and analogue to digital conversion (ADC), the induced voltage of the probe detection coil is demodulated by FPGA and the real and imaginary parts of the induced voltage are finally obtained.e EM instrument can operate from 5 kHz to 200 kHz and perform digital demodulation at the rate of 100 k/second.e EM instrument has been demonstrated to provide a signal-tonoise ratio (SNR) of ∼96 dB. e transmit and receive probe (TR probe) is used in this paper, which is made of copperenamelled wire with wire diameter of 0.08 mm, and its structure and parameters are shown in Figure 5 and Table 1, respectively.e PC host system based on LabVIEW is mainly used to set the detection parameters such as excitation frequency, scanning range of mobile platform, and minimum step and monitor and save the collected signals in real time.
As shown in Figure 5, the alternating magnetic field generated in the exciting coil acts on the specimen, and eddy  current is generated in the tested specimen.e strength, phase, and distribution of eddy current in the specimen are related to the characteristics of the specimen.e magnetic field generated by eddy current in the specimen is induced again by the pickup coil, and then the defects and characteristics of the specimen are analyzed.

Defect Signal Acquisition.
e defects produced in the production process and service process of the titanium plate are mainly crack defects.erefore, in this paper, different sizes of defects are manufactured on the surface of TA2 titanium plate to simulate the defects in the actual titanium plate.e schematic diagram and defect parameters of the manufactured specimens are shown in Figure 6 and Table 2, respectively.
In this paper, C-scan is adopted to collect the defect signal.
e frequency of the excitation signal is set to 30 kHz, the lift-off height l 1 of the probe is set to 0.5 mm, the scanning area size is 15.4 mm × 22.2 mm, and the steps in X-axis and Y-axis direction are set as 0.14 mm and 0.2 mm, respectively.e scanning direction is shown in Figure 7.
In our previous studies [23,24], it can be found that when the scanning direction of the probe is perpendicular to the edge of the defect, the detection accuracy is better.However, in the actual inspection process, it is impossible to predict the position and shape of the defect, which leads to large in the inspection results of the same defect, and then affects the further analysis and judgment of the defect.erefore, a number of experiments were carried out in different scanning directions and scanning starting positions in this paper.e initial position is set when the scanning direction is perpendicular to the defect edge.On the basis of the initial position, it is scanned every 5 °, and the total deviation angle is set to 25 °.Similarly, based on the initial position, it is extended twice         Complexity along the X-axis and Y-axis directions, respectively, and the extension interval is 2 mm.e experiment is repeated 5 times under each scanning.

Experimental Results and Discussion
Due to the existence of defects in the titanium plate, the distribution of induced eddy current is unbalanced and finally the amplitude and phase of voltage in the detection coil are changed.e real and imaginary parts of the detection signal for defect C1 are shown in Figure 8. From the actual detection results, both the real and imaginary parts of the detected signals changed significantly in the defect positions of the titanium plate, and the change of the real part is much greater than that of the imaginary part.At the same time, considering that the actual detection of titanium plates will inevitably suffer from the influence of noise and other factors, the real part is used to detect and analyze the defects in this paper.
e original image of the real part of the eddy current detection of the defect of the titanium plate is shown in Figure 9, and the defect corresponds to the schematic diagram of the defect shown in Figure 6. e scanning direction is perpendicular to the edge of the defect, and the defect position is at the center of the scanning area.From the analysis of the actual imaging results, the length and width of the defect are reflected in the contour of the scanning image, and the amplitude of the real part is related to the depth of 8 Complexity the defect, that is, the deeper the defect is, the smaller the amplitude of the real part is.However, the location and edge of defects cannot be known in advance during the actual defect detection process.erefore, a variety of scanning directions described in Section 3.2 are used for detection experiments to verify the effectiveness of the method in the paper.
In the defect detection experiment, 200 groups of real part of each defect are randomly selected as training samples, and the remaining 70 groups are used as test samples.Finally, the training and test set of 9 defects are 1800 groups and 630 groups, respectively.e size of defect image obtained by scanning is 112 × 112, which is the input of CNN.Combining with the defect image and the parameters of CNN, it is easy to over fit when the convolution layer is more than 2 layers.erefore, the network structure of single convolution layer, pooling layer, and full connection layer is adopted in this paper.e maximum pooling method as shown in Figure 3 is adopted.Other parameters set in CNN are shown in Table 3.
In order to verify the effectiveness of CNN for the defect recognition and classification of titanium plate defect detection images, stacked autoencoder (SAE), deep belief network (DBN), and SVM are used for experimental comparison in this paper.e original defect signal is used for identification and classification, and the results are shown in Table 4.According to the actual classification results, the accuracy of these classifiers is more than 95%, and the accuracy of DBN and SVM is more than 96%.e accuracy of CNN is 99.79%.Because the CNN can accurately extract the contour information of different defects in the process of convolution processing of defect image, it can classify defects more accurately.
However, when defects are detected in the actual production environment, the detected defect signal is often interfered by different levels of noise due to the influence of working conditions and environment.In order to further verify the classification performance of the CNN for defect images interfered by noise of different intensity in this paper, Gaussian white noise with different intensities were added to the signals to make the SNR from 30 dB to 95 dB. e imaging results of defect C8 and C5 under different noise intensities are shown in Figures 10 and 11, respectively.
After adding different intensities of noise into the original signal, the existing model trained based on the defect data set in the ideal laboratory environment is used to classify the noisy signal, and the classification results are shown in Figure 12.From the analysis of classification results, the accuracy of these classifiers is reduced under different levels of noise interference.When the SNR is 30 dB, the classification accuracy of CNN is 95.68%.However, even in the presence of noise, the classification accuracy of the CNN is higher than that of other classifiers.
In addition to using the existing trained models to identify and classify the noisy defect signals, some noisy Based on the new model, the classification accuracy of defect signals affected by different noises is improved in different degrees.When SNR >50 dB, the classification accuracy of CNN is still more than 98%.

Conclusions
Compared with other deep learning and classical machine learning methods, the convolution process of CNN can accurately extract the defect edge features of titanium plate defect images under different scanning directions and starting positions and then achieve higher defect classification accuracy.At the same time, the pooling layer of the CNN also plays a good role in resisting the noise interference in the defect image, which makes it have high defect classification accuracy under strong noise interference.By analyzing the defect feature extraction and antinoise interference of CNN, the application range of eddy current testing method in the titanium plate defect detection is widened.In future research, we will continue to optimize the network parameters in order to quickly learn and update the model online.Moreover, the defect type and defect damage degree of titanium plate will be further expanded.

Data Availability
e (DefectSignals_ECScan.rar)data used to support the findings of this study have been deposited in the Aliyun Server repository (http://120.76.226.240/KH_AnCore/DefectSignals_ECScan.rar), and other researchers can download original data from this URL.e experimental equipment setup and specimen parameters are shown in Figure 6 and Table 2.

Figure 6 :
Figure 6: Schematic diagram of specimen and defects.

Figure 8 :
Figure 8: e (a) real and (b) imaginary parts of the detection signal for defect C1.

Figure 9 :
Figure 9: Original scanning real part imaging of titanium plate defects.

Figure 13 :Figure 12 :
Figure 13: Classification accuracy of (a) training set and (b) testing set with noisy signal.
signals are also added to the training set to train a new classification model in this paper, and the classification accuracy of training and testing is shown in Figure 13.By adding part of the noise signals into the training set, the training classification model can be more robust to noise interference, and the training model can also be updated in real time.Figure 13(a) shows the classification accuracy during training.On the basis of the new model, the noisy signals are reclassified.e classification results are shown in Figure 13(b).

Table 3 :
Parameters of the CNN.

Table 4 :
Classification accuracy using original signals.