## 3 Dataset Preparation and Training Environment  
### Dataset Preparation  
The original signal used in this study was obtained from the PE80 pipe sample with a wall thickness of 20 mm. The specimens were deliberately created to include different sizes of weld defects by cardboard and side drill holes. The imitated cardboard cracks while the side drill holes represented volumetric defects like porosity and slag inclusion. To obtain the near-surface defect signal in the blind zone and the general defect signal, two positions were designated for each defect, located at 1/4 near the outer wall and 1/2 near the inner wall, respectively. The signals were gathered using transducers with a central frequency of 1 MHz, a refracting angle of 60\({}^{\circ}\), and a chip size of 10 \(\times\) 10 mm. Other pieces of equipment for the ultrasonic testing platform include an ultrasonic signal generation receiver (5072 PR), an A/D card (PCI-5114), an industrial computer, and detection software. By varying the transducer's position, an original dataset of 719 signals was collected with each signal having 12,500 sampling points.  
Because of uneven proportion in the amount of each type of defect signal, the original dataset was enhanced by time shifting and adding white Gaussian noise. Each type of signal was expanded to 200. Physically, time-shifting refers to the change in the distance between the transducer chip and the defect, while white Gaussian noise represents the electrical noise of the circuit during signal transmission [24]. Gaussian noise addition is a feasible method for enhancing all five types of defect signals: data enhancement mainly relies on this method. Segmenting defect signals in blind zones is challenging, and thus the time shifting method is only suitable for general defects. Additionally, as the initial wave pulse in the signal often contains a region consisting solely of electrical noise, the noise signals are randomly selected and added to the tail of the signals during the data enhancement process. This technique provides a similar enhancing effect to the time shifting method. During the actual operation process, we found that it was not easy to evaluate the accuracy performance of the model on large datasets. Therefore, the decision was made to expand the number of each signal type to 200. The number of signals for each weld defect is presented in Table 1. Figure 1 illustrates the different types of defect signals that were considered, while Figure 2 showcases the impact of applying white Gaussian noise addition and time shifting techniques to the signal.  
SST processing was performed on all signals to obtain a 256 \(\times\) 256 pixel image, which was then shuffled, and the training dataset and testing dataset were divided into an 8:2 ratio. The training dataset was used for model training and parameter adjustment, while the testing dataset was used to evaluate the model's performance.  
\begin{table}
\begin{tabular}{c c c} \hline
**Defects** & **Original Dataset** & **Enhanced Dataset** \\ \hline Planar defects in the blind zone (PDBZ) & 184 & 200 \\ Volumetric defects in the blind zone (VDBZ) & 166 & 200 \\ General planar defects (GPD) & 157 & 200 \\ General volumetric defects (GVD) & 132 & 200 \\ No defects (ND) & 80 & 200 \\ Total & 719 & 1000 \\ \hline \end{tabular}
\end{table}
Table 1: Number of signals in the original dataset and the enhanced dataset.