## 3 Deep Learning-Based Crack Sizing Method  
### Length Measurement Architecture  
The efficiency of the conventional manual measurement method varies with the experience of the inspector. Additionally, the noise caused by the material grains and the measurement system can further aggravate this. Therefore, developing an effective and automatic data analysis method is imperative to enhancing the measurement accuracy and efficiency and mitigate the interpretation burden of operators. According to the analysis in Section 2.2, the core problem of accurately measuring the defect length is how to effectively determine the left and right ends of the defect in ultrasonic diffraction images or the scanning path. Hence, an automatic measurement strategy was conceived. The population of A-scan signals in the scanning path is classified by the corresponding intelligent algorithm. The TOFD dataset is classified by performing complete feature extraction and defect signal recognition. This technique precisely detects defects area on the B-scan and the area size correlates directly with the defect length. The defect region is extracted and its size in the scanning direction is obtained by the connected region solution algorithm based on the classification results. Some artificial intelligence techniques, especially neural networks, have widely been used to automatically classify flaws in ultrasonic testing during the last several decades [22]. [PERSON] employed a three-layered neural network to automatically classify cracks, porosity, and slag defects based on features extracted from ultrasonic pulse echoes using Fisher discriminant analysis [23]. Later, a large number of recognition networks and feature extraction techniques for ultrasonic signal were developed and utilized to achieve better recognition accuracy [24; 25; 26]. Although good performance has been achieved, the complexity of feature extraction by signal processing techniques and the sensitivity of the selected feature to operating conditions limit its application in practice. As computing power increases incredibly and has the ability to process large quantities of dimensional data, a fully connected deep neural network (DNN) was developed to classify various defects by original ultrasonic signals without any feature extraction [27]. Since the fully connected DNN shows relatively poor performance at low signal-to-noise ratio, a robust DNN framework with convolution layers, called a convolutional neural network (CNN), was successfully adopted to identify flaws under noisy conditions [28] and to classify the delamination and void defects in CFRP specimens [29]. The CNN was firstly proposed by [PERSON] [30], which later provided amazing performance in the fields of speech recognition and computer vision [31; 32]. So, in this paper, a CNN framework is designed to automatically classify the ultrasonic diffraction A-scans for measuring the length of the defect, as illustrated in Figure 4. The deep learning architecture is composed of two convolutional layers followed by a pooling layer behind each, two fully connected (FC) layers, and one output layer. Convolutional layers combined with pooling layers are used for feature extraction while FC layers are used for classification. Sixteen 8 \(\times\) 1 kernel filters are applied to the input signal with 896 samples in the first convolutional layer, followed by non-linear operation with an activation function to generate sixteen 445 \(\times\) 1 feature maps. Here, the activation function, \(Relu(x)=\left\{ \begin{array}{l}x,\ x>0\\ 0,\ x\leq 0^{\prime}\end{array} \right.\) is adopted. Subsequently, the feature maps are down-sampled to obtain sixteen 223 \(\times\) 1 feature maps by the 2 \(\times\) 1 kernel filters in the first pooling layer. In the second convolutional layer and the second pooling layer, similar convolutional and pooling options are conducted on the new feature maps to generate thirty-two 56 \(\times\) 1 feature maps.