Next Article in Journal
Performance Analysis of Keypoints Detection and Description Algorithms for Stereo Vision Based Odometry
Previous Article in Journal
Practical Application of Passive Air-Coupled Ultrasonic Acoustic Sensors for Wheel Crack Detection
Previous Article in Special Issue
How to Talk to Your Classifier: Conditional Text Generation with Radar–Visual Latent Space
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Deep Learning-Based Approach for Automatic Defect Detection in Complex Structures Using PAUT Data

1
Research Institute of DNA+, Changwon National University, Changwon 51140, Republic of Korea
2
School of Sarim Honors, Changwon National University, Changwon 51140, Republic of Korea
3
School of Mechanical Engineering, Changwon National University, Changwon 51140, Republic of Korea
*
Authors to whom correspondence should be addressed.
Sensors 2025, 25(19), 6128; https://doi.org/10.3390/s25196128
Submission received: 8 September 2025 / Revised: 25 September 2025 / Accepted: 1 October 2025 / Published: 3 October 2025

Abstract

This paper presents a comprehensive study on automated defect detection in complex structures using phased array ultrasonic testing data, focusing on both traditional signal processing and advanced deep learning methods. As a non-AI baseline, the well-known signal-to-noise ratio algorithm was improved by introducing automatic depth gate calculation using derivative analysis and eliminated the need for manual parameter tuning. Even though this method demonstrates robust flaw indication, it faces difficulties for automatic defect detection in highly noisy data or in cases with large pore zones. Considering this, multiple DL architectures—including fully connected networks, convolutional neural networks, and a novel Convolutional Attention Temporal Transformer for Sequences—are developed and trained on diverse datasets comprising simulated CIVA data and real-world data files from welded and composite specimens. Experimental results show that while the FCN architecture is limited in its ability to model dependencies, the CNN achieves a strong performance with a test accuracy of 94.9%, effectively capturing local features from PAUT signals. The CATT-S model, which integrates a convolutional feature extractor with a self-attention mechanism, consistently outperforms the other baselines by effectively modeling both fine-grained signal morphology and long-range inter-beam dependencies. Achieving a remarkable accuracy of 99.4% and a strong F1-score of 0.905 on experimental data, this integrated approach demonstrates significant practical potential for improving the reliability and efficiency of NDT in complex, heterogeneous materials.

1. Introduction

Structural integrity of materials and components is a critical concern across industries such as aerospace, automotive, energy, marine, and construction. In this study, both welded specimens and composite materials are considered as representative cases for evaluating automatic defect detection approaches, since each presents distinct challenges, including high sensitivity to internal defects. In welds, flaws such as cracks, porosity, inclusions, or lack of fusion may appear due to improper technique, material impurities, or environmental conditions during fabrication [1,2]. In composites, the heterogeneous and anisotropic structure makes them vulnerable to delaminations, voids, and fiber misalignments that may not be visible on the surface [3,4,5,6,7,8,9,10,11], while large external defects are relatively easy to identify, small or hidden flaws are far more dangerous, as they may propagate over time and cause catastrophic failures. Early detection of such defects enables timely repair or replacement, extends component service life, reduces costs, and contributes to environmental sustainability by supporting remanufacturing [12].
Traditional destructive methods for evaluating mechanical strength are unsuitable when every manufactured part must be tested, which is why nondestructive testing (NDT) is a fundamental approach for quality assurance [13]. Various NDT techniques exist, including visual inspection, dye penetrant testing, magnetic particle testing, eddy current testing, radiography, and acoustic emission testing [13,14,15]. Radiography, while highly sensitive, introduces radiation hazards, whereas ultrasonic testing (UT) offers a safe and effective alternative [15]. UT employs high-frequency acoustic waves to detect internal discontinuities and has gained wide industrial use due to its accuracy and applicability even when only one-sided access is possible [16].
Phased array ultrasonic testing (PAUT) represents a significant advancement over conventional UT by using electronically steerable transducer arrays that enable beam steering and focusing over a wide angular range [3,4,17,18]. Phased Array Ultrasonic Testing (PAUT) is based on the timing (phase) of ultrasonic transducer pulses, which can be electronically steered, focused, and scanned without mechanical probe movement. This improves sensitivity, resolution, and coverage, especially for geometrically complex welds or anisotropic composite materials [5].
To validate inspection strategies and to prove reliability of use, simulation of PAUT to improve understanding of ultrasonic beam behavior studies with a focus on comparisons between PAUT and simulation have been conducted on irregular structure welds [19], dissimilar weld joints [20,21], and thin-walled pipes [22], confirming the possibility of using CIVA as an additional tool for planning and verifying PAUT inspection.
PAUT data can be displayed as A-scans, B-scans, C-scans, or S-scans, providing rich information about material structure and potential defects. However, this richness comes at the cost of significantly increased data complexity. Interpretation of PAUT scans requires expertise and remains time-consuming, even for specialists [6]. For composite structures, additional challenges arise due to heterogeneity and anisotropy, making it difficult to separate genuine defects from benign structural reflections [3,4,5,6,7,8,9,10,11]. This complexity makes manual interpretation even more challenging and underscores the urgent need for automated solutions.
In response to these challenges, a growing body of research has focused on machine learning (ML) and deep learning (DL) for automated flaw detection; while early approaches demonstrated promising results, they often faced challenges with limited generalizability when applied to real-world data collected with different equipment or under different conditions. Later work expanded to multiple defect classes and data formats, such as OPD files, achieving high accuracy in classification tasks.
Advanced PAUT processing methods like Sampling Phased Array (SPA) and Total Focusing Method (TFM) improve spatial resolution and imaging fidelity, but still rely on manual interpretation and expert judgment, leaving throughput and reproducibility constraints in place [7,8,9,10]. Signal-processing approaches. Wavelet-based features with Shannon entropy and model-based entropy methods have shown promise for noisy ultrasonic/PAUT signals and in situ indication, but typically require parameter tuning and human confirmation, limiting scalability [23,24,25]. Signal-processing approaches. Wavelet-based features with Shannon entropy and model-based entropy methods have shown promise for noisy ultrasonic/PAUT signals and in situ indication, but typically require parameter tuning and human confirmation, limiting scalability [23,24,25]. Similarly, in the broader field of NDT image processing, filtering algorithms such as the median filter have been widely applied to enhance defect clarity in radiographic images [26].
Supervised deep learning for PAUT. Early ML/DL studies on welds demonstrated accurate classification for specific defect types, yet often struggled to generalize across scanners, setups, or materials. Subsequent works expanded to multiple defect classes and OPD formats, achieving strong accuracy but retaining sensitivity to domain shifts [23,24,25,27,28,29,30,31]. Unsupervised and multimodal directions. Recent unsupervised learning for composite PAUT and multimodal fusion with thermography indicate benefits for heterogeneous materials, but add integration complexity and do not remove the need for robust sequence-level modeling of inter-beam context [32,33,34].
Despite these advancements, most existing models have struggled to explicitly model the interdependencies across a sequence of multiple A-scan signals, a critical aspect for accurate defect characterization in complex materials.
FCNs are capacity-limited for structured signals. CNNs capture local morphology but have fixed receptive fields and weak long-range dependency modeling. Attention-based multi-signal classifiers improve inter-signal reasoning but still need designs that balance localized feature extraction with global context [35,36,37]. Medak et al. [38] addressed context by merging features from neighboring B-scans (Conv2D/ConvLSTM fusion). They reported only modest mAP gains and noticeably slower inference, since sequence fusion adds compute on top of a 2D detector. Transformers have also been explored for ultrasonic signal processing, but mainly for tasks like deconvolution rather than PAUT sequence classification [39]. Most recent PAUT DL works focus on B/C-scan image detectors or single A-scan classification [34,40,41,42,43]; they do not explicitly model inter-beam dependencies across a sequence of A-scans. In our work, we target these gaps: we make SNR analysis automatic (gates from derivatives, thresholds from σ ) to reduce operator dependence, and we introduce CATT-S, where a CNN extracts per-signal features and a Transformer with self-attention models dependencies across the full A-scan sequence.
To address these limitations and improve prediction accuracy under varying noise and complex geometries, we propose the CATT-S model, a sequence model that jointly processes multiple A-scan signals to capture inter-beam context. Unlike prior studies, this paper introduces a parameter-free SNR baseline and a sequence model (CATT-S), and provides a head-to-head comparison against FCN/CNN on both simulated welds and large-scale experimental OPD composites.
The main contributions of this work are as follows:
  • The development and validation of an automated, parameter-free SNR algorithm for rapid defect indication.
  • A comparative analysis of three distinct deep learning architectures (FCN, CNN, and CATT-S) on a diverse PAUT dataset.
  • The proposal of a novel CATT-S model that effectively combines local feature extraction with global context modeling through self-attention, achieving state-of-the-art performance in complex PAUT data analysis.
  • The use of a combined simulated and large-scale experimental dataset to demonstrate the practical viability and generalizability of the proposed methods.

2. Materials and Methods

2.1. Dataset Collection and Processing

Two types of datasets were used to evaluate the proposed approaches. For welded structures, both simulated and experimental data were collected. The simulated dataset was generated using CIVA software (2023SP4 version), which provided controlled conditions for creating weld specimens with artificial flaws and noise levels [29]. Artificial defects, including cracks, porosity, and inclusions, were primarily placed in critical regions such as the weld toe and weld root to reflect realistic conditions. In total, approximately 200 simulated S-scan samples were collected, each consisting of 39 A-scan signals, and subsequently augmented using signal recombination and noise map variations to expand the dataset by a factor of 2.5. Experimental welded-plate data were obtained using phased array ultrasonic testing (PAUT) equipment (OmniScan ™ X3, Olympus, Quebec, QC, Canada), with signals stored in the OPD format [30].
For composite materials, real-world datasets were collected from carbon fiber reinforced polymer (CFRP) and other composite specimens. These datasets included multiple types of structural defects, such as delaminations, inclusions, and porosity, and were acquired under industrial inspection conditions [31]. To manage and analyze these varied data types efficiently, a dedicated software tool was developed. The composite datasets posed additional challenges due to the anisotropy and heterogeneity of materials, leading to higher structural noise compared to metallic welds.
A dedicated software tool was developed to handle PAUT data in OPD format. This tool served as a critical component of the overall pipeline, enabling the seamless integration of diverse datasets into the proposed analysis methods. Its development ensured that both simulated and real-world experimental data could be consistently processed and utilized for training and evaluation. As one of the most popular formats for PAUT data, Omnipage documents (OPD) were specifically targeted for this purpose. One of the most popular formats to store PAUT data is Omnipage documents (OPD) files collected using OmniScan equipment (OmniScan ™ X3, Olympus, Quebec, QC, Canada) and FPD files collected using FocusPX equipment (FocusPX, Olympus, Quebec, QC, Canada). So, for the first step of PAUT data analysis, experimental data files should be correctly read, and all indications with possible defects should be marked. For this purpose, an algorithm to read OPD data files was developed. This algorithm reads OPD and FPD as binary files and stores all information (sound velocity, angle range, time range, amplitude, etc.). Based on collected information, it is possible to create S-scan and A-scan images. To prove the correctness of the algorithm for reading data from OPD files, a comparison was done between the OmniPC and the newly developed algorithm, using S-scan of the same data file for the same scan position Figure 1.
To develop a deep learning-based approach for automatic defect defection, datasets of welded and composite structures were prepared. We first needed to develop an approach for automatic defect detection that would work with one type of weld shape before expanding it to apply to other types of weld shapes. Due to the limited amount of experimental data available, we decided to expand the dataset using CIVA simulation. Thus, for CIVA modeling, we focused on butt joint weld shape such that the weld profiles match those used to collect experimental PAUT. Simulation included variation in the main parameters: root face R F (0–3 mm), gap ζ (1–4 mm), thickness t (5.6–18 mm), and angles α (70° and 75°) (Table 1). Due to the artificial nature of the generated data, only 3 types were selected for defect simulation, such as cracks, porosity, and inclusions which were placed in typical regions like weld root and toe. Incomplete penetration (IP), lack of fusion (LF), and undercut (UC) defects were hard to simulate in the CIVA version we had, so we focused on those defects that could be reliably generated to expand our dataset. Non-defective welds with varied geometrical profiles were also included to ensure the dataset captured both flawed and healthy indications. Structural noise was also incorporated with different amplitudes and densities to approximate real inspection conditions. In total, approximately 200 simulated S-scan samples were collected, each consisting of 39 A-scan signals, and subsequently augmented using signal recombination and noise map variations to expand the dataset by a factor of 2.5, preserving variability and complexity for neural network training. A schematic of the weld profile with variable parameters is shown in Figure 2.
For further use, collected simulated and experimental datasets were separately split into train, validation and test subsets, and then each subset of simulated data was mixed with the corresponding subset of experimental data, forming final subsets. This prevents data leakage between simulated and real weld samples. For composites, only experimental data in OPD and FPD format were collected from CFRP specimens. Due to customer restrictions, we cannot disclose detailed material properties such as carbon content or manufacturer. Data files were processed, each containing approximately 18,000 A-scan signals, resulting in more than 50,000 training samples and about 10,000 test samples after preprocessing and labeling.
By using simulated weld datasets with large real-world composite datasets, the study established a broad foundation for evaluating both non-AI and DL-based detection approaches on PAUT data collected from structurally diverse materials. Because experimental data were received in OPD and FPD format, a special tool was developed in our software to process these files. This tool allows data preprocessing and saving them to JSON format. Thus, multiple JSON files were generated with preprocessed signals (normalized to the same signal length and marked where defects are and where they are not). Then these JSON files were split into training and testing subsets, so signals from one file were not mixed across subsets, preventing leakage.
With these datasets prepared, the next step was to apply and evaluate different defect detection methods, beginning with the enhanced signal-to-noise ratio (SNR) approach as a non-AI baseline before advancing to deep learning models.

2.2. Enhanced SNR-Based Method

This section describes an enhanced signal-to-noise ratio (SNR)-based method implemented in parallel with the deep learning (DL) models. This approach differs from conventional SNR analysis, which relies on manual depth gating, by automatically determining the depth gates. This is achieved through the following three-step process:
  • Constructing depth scans (D-scans), which involves applying max-projection across the beams.
  • Collapsing the D-scan into a single depth-accumulated signal by averaging along the scanning axis.
  • Performing derivative analysis to automatically locate acoustic interfaces.
This process allows for automatic gating and flaw indication directly from PAUT data without requiring manual parameter tuning; while effective in many cases, the method is not universally applicable and may be less reliable for data with excessive noise or for defects like large pore zones.

2.3. Deep Learning Models

Three neural network architectures were investigated for their ability to classify and localize defects. A Fully Connected Network (FCN) for direct signal classification, a convolutional neural network (CNN) for local feature extraction from A-Scan and S-Scan inputs, and a convolutional neural network with Attention Temporal Transformer for (CATT-S), which first extracts local features with a convolutional block and then applies Transformer self-attention to jointly model inter-beam dependencies across multiple A-scans. The FCN was utilized as a simple baseline model to establish foundational performance and confirm the feasibility of a deep learning approach for this task. The CNN was then employed to exploit its strength in automatically extracting salient, local features from the signal, which is crucial for distinguishing defect patterns. Finally, in CATT-S, a convolutional feature extractor first processes each A-Scan to produce localized embeddings, and a Transformer encoder with self-attention then jointly models the sequence of A-Scans to learn inter-signal dependencies and global context across signals. This design captures complex inter-signal relationships and subtle defect features, which is essential for overcoming the limitations of models with a fixed receptive field, while retaining the strengths of convolution for local pattern extraction. All models were trained using both simulated and real OPD datasets, with augmentation applied to improve generalization. Training and validation were carried out on separate subsets to prevent overfitting.

3. SNR-Based Automatic Defect Detection

3.1. Automatic Depth-Gate Detection

As a non-AI baseline, an enhanced signal-to-noise ratio (SNR)-based method was implemented to provide automatic defect detection in PAUT data. Unlike conventional SNR evaluation, which relies on operator-defined gates and manual parameter tuning, the developed approach introduces an automatic procedure for depth-gate detection and statistical defect characterization. Original phased-array acquisition delivers the following three-dimensional matrix:
S = { S ( x , z , n ) } x = 1 , , M ( scan index ) z = 0 , , Z max 1 ( time-of-flight index ) n = 1 , , N ( beam index )
For each (x,z), keep only the maximum echo over all beams,
D ( x , z ) = max 1 n N S ( x , z , n ) ,
to obtain a D-scan where D R M × Z max . The max-projection preserves specular reflections that might occur in only a few beams while suppressing incoherent noise [44]. To characterize the specimen globally, the D-scan is collapsed along the scan axis by averaging
g ( z ) = 1 M x = 1 M D ( x , z ) .
The resulting one-dimensional depth profile g ( z ) has the same length as a single A-scan and represents the mean energy returned from each depth. Derivative analysis is then used to highlight acoustic interfaces. The first g ( z ) and second Δ g ( z ) discrete derivatives are computed as in Equations (4) and (5) [44].
g ( z ) = d g d z g ( z + 1 ) g ( z 1 ) .
Δ g ( z ) = d 2 g d z 2 g ( z + 1 ) 2 g ( z ) + g ( z 1 ) .
Computing the first derivative g ( z ) converts each step into a pair of extreme: a large positive lobe at the rising edge and a negative lobe at the trailing edge. These extremes quantify the magnitude of the slope and hence localize the regions where the acoustic impedance changes most rapidly. While in the second derivative Δ g ( z ) , each steep rise produces one narrow positive curvature peak centered on the interface. To discard the noise peaks, a 25% threshold is defined, and the remaining peaks are used for gate setup.
T = 1 4 Δ g ( z ) .
The remaining peaks define depth gates, expressed as
P = { [ z 2 i , z 2 i + 1 ] } i = 0 L 1 ,
where each interval covers the positive curvature zone of one reflector Figure 3. In Figure 3 dashed lines show the start and end of the first (top) and second (bottom) reflection peacks. So, to display the inner structure of material, the gates for C-scan plot are set to be between 2nd and 3rd dashed line: end of top reflection and start of bottom reflection of composite PAUT.

3.2. Signal-to-Noise–Based Defect Characterization

Once the gates are defined, SNR analysis is performed on the ultrasonic C-scan. Local amplitudes are normalized by the maximum admissible amplitude A max ,
p ( i , j ) = D ( i , j ) A max × 100 ,
where D ( i , j ) is the measured amplitude at spatial coordinates ( i , j ) . Within a selected region Ω , the first and second statistical moments (Equations (9) and (10)) are computed as follows:
μ = 1 N ( i , j ) Ω p ( i , j ) ,
σ = 1 N ( i , j ) Ω p ( i , j ) μ 2 ,
where N is the number of pixels in Ω . Defect thresholds are then defined as a confidence interval, as commonly used in ultrasonic testing [44],
S min = μ k σ , S max = μ + k σ ,
with k set adaptively to σ in the automatic mode. For automatic SNR analysis, we set the value of parameter k adaptively to σ . This choice was made after testing on real PAUT data with different noise levels, specimen geometries and inspection conditions. In most cases using σ as a scaling factor adapts thresholds to the noise spreads, providing sufficient defect markup. If small false-positive defections appear (due to noise variations), they can be removed later from the report table (in developed software) by setting up a threshold for minimal defect size. Pixels above S max are flagged as high-contrast defects, while pixels below S min correspond to low-amplitude anomalies. The defective areas are then estimated as
A < = A tot n < N , A > = A tot n > N ,
where n < and n > are the counts of pixels below S min and above S max , and A tot is the total physical area of the inspected region.
This procedure enables robust automatic defect zone delineation by combining derivative-based depth gating with statistical amplitude analysis. The method effectively reduces reliance on manual parameter tuning, making it more practical for large-scale inspections. The main improvement of our SNR-based method is that it was made automatic and parameter-free. In standard SNR analysis, the operator usually sets analysis gates for proper C-scan plot view and thresholds manually. In our version gates are calculated automatically from the signal derivative profile, thresholds are set adaptively using k = σ , and amplitudes are normalized. Also, in software small false-positive detections can be removed later via setup of a minimal defect size threshold. Applied to simulated weld datasets, the algorithm successfully detected defective zones in C-scans within automatically calculated gates. When tested on composite OPD datasets, it also demonstrated the ability to highlight defect-like zones in anisotropic CFRP Figure 4. In Figure 4, we presented an example of defective zone detection using an improved approach with automatic gates and SNR parameters setup—C-scan plotted after setting automatically calculated gates (a) and after applying SNR with automatically tuned parameters with defective zones marked yellow (b).
But in data with very high noise levels or large pore zones, automatically calculated gates are usually wrong (Figure 5), so they should be manually adjusted before applying SNR analysis. In pore zones reflections are spread, and amplitude can be close to noise, so thresholds based on k ≈ σ do not always isolate them. In very noisy data σ becomes large and thresholds expand, which reduces sensitivity to real defects and can mark structural noise as defects.
While computationally efficient and interpretable, the SNR-based method is not universally applicable. It serves as a fast baseline, but more advanced deep learning approaches are required to achieve reliable classification and localization across diverse materials and geometries.

4. Deep Learning Architectures for Defect Detection

4.1. Fully Connected Neural Network

One of the most popular uses of NN models for classification tasks in the case of working with 1D signals is a fully connected neural network (FC NN). The core component is Dense layers, where each neuron from one layer is connected to each neuron of the previous and following layer Figure 6.
For the prepared dataset, an FC NN structure with four hidden Dense layers was chosen Figure 7. After each hidden layer except the first, the rectified linear unit (ReLU) activation function was used. The output layer contains one neuron with a sigmoid activation function, as the main goal is binary classification of defect and non-defect signals. The Adam optimizer with 0.0001 learning and the binary cross-entropy loss function [45] give better results for the chosen architecture of FC NN.
FC NN was trained for 50 epochs with batch size 16. The maximum validation accuracy was 90.82%, whereas training accuracy reached 80.8% Figure 8. Increasing the number of epochs led to higher training loss, indicating overfitting and making NN predictions unreliable. Such low testing accuracy is obviously not enough for practical use in real-world cases. More fundamentally, because an FC NN processes each input as a flat vector, it lacks inductive bias for spatial or temporal structure and therefore does not encode neighborhood or sequence information across beams or along depth. These limitations motivate the use of a CNN to capture local morphology and CATT-S to jointly model inter-beam dependencies via self-attention.

4.2. Convolutional 1D Neural Network

The next attempt was to use Convolutional 1D Neural Networks (CNN). The core component is the convolution layer, which extracts salient features from the signal that are essential for differentiating between defect and non-defect signals. The prepared dataset does not contain too many samples, so the final CNN should not consist of too many layers to prevent overfitting. The final CNN contains three Convolutional 1D layers with a MaxPooling 1D layer after each convolution Figure 9.
Like FC NN, the output layer is also represented by a single neuron with a sigmoid activation function. The ReLU activation function was used after each Convolution 1D and Dense layer. The Adam optimizer with a learning rate of 0.0001 was used in the training process with binary cross-entropy as the loss function. The training process took 50 epochs with 16 batch sizes. The maximum achieved validation accuracy is 97.94%, while testing accuracy is 94.9% Figure 10. This is the promising result for practical application of the defect detection algorithm based on this CNN.
Experiments confirmed that the CNN delivered higher accuracy than the FC NN, particularly on noisy weld data. However, when applied to a single A-scan, a 1-D CNN has a fixed receptive field along depth and does not model cross-beam context. In PAUT, echoes from the same reflector appear across sequences of beams with varying arrival times and amplitudes; these patterns are non-stationary and depend on geometry and probe steering. For our welded dataset, this per-A-scan modeling was often sufficient, but for composite datasets, with stronger structural noise and anisotropy, capturing inter-signal relationships is essential. which requires processing a sequence of A-scans jointly, rather than treating each scan independently.

4.3. Transformer-Based Neural Network

To overcome the inherent limitations of CNNs, particularly their fixed receptive field and inability to model long-range dependencies, we propose a novel hybrid architecture: the Convolutional Attention Temporal Transformer for Sequences (CATT-S). This model is specifically designed to leverage the strengths of both convolutional feature extraction and the self-attention mechanism of a Transformer Figure 11. The architecture consists of a convolutional block followed by a Transformer encoder. The convolutional layers first process each A-scan signal in parallel, acting as a robust feature extractor to capture local morphology within the PAUT signal. These features are then fed into the Transformer encoder.
The key improvement lies in the self-attention mechanism of the Transformer. Unlike CNNs, which only process features within a limited, local window, the self-attention mechanism computes the relationship between every pair of A-scan signals within a given sequence. This enables the model to effectively capture long-range inter-beam dependencies and global context across the entire PAUT scan. For example, the model can learn to correlate a subtle feature in one beam with a much stronger reflection in a distant beam, allowing it to differentiate a genuine defect from benign structural noise or material anisotropy. This is particularly critical for analyzing complex composite materials, where a holistic understanding of the entire signal sequence is necessary to accurately identify defects.
In developed CATT-S, the CNN block extracts features for each signal in the input sequence separately. The length of each signal in the sequence is always constant—it is necessary for proper feature extraction by CNN. For each signal, one feature vector f i is produced, and for the whole sequence, we obtain F = [ f 1 , f 2 , , f T ]. Then in the Transformer self-attention block, linear projections are computed as follows: Q = F W q , K = F W k , V = F W v . Projection weights ( W q , W k , W v ) are constant, but resulting projections depend on sequence size T. The attention matrix A is then calculated as shown in Equation (13) [46] and has size T × T .
A = softmax Q K T d k .
Each value in this matrix shows the relation between one signal and another in the sequence. These weights alone represent normalized probabilities, but final context-aware features are produced only after multiplication by value matrix V. This operation makes each output vector a weighted combination of all input features, where weights are controlled by attention scores. In this way attention can build a context window that is not fixed like in CNN, but adaptive to all relations across the sequence. When a defect echo appears in several neighboring signals, their attention weights are reinforced, while isolated local anomalies not repeated in neighbors get counted as noise. CATT-S was trained for 15 epochs with batch size 8, sequence length 50, and the AdamW optimizer ( lr = 8 × 10 4 , weight decay = 0.015 ) with BCE loss in Equation (14) [45].
L BCE = 1 N i = 1 N [ y i log ( p i ) + ( 1 y i ) log 1 p i ] ,
where p i ( 0 , 1 ) is the predicted probability and y i { 0 , 1 } is the ground-truth label. During the training stage we experimented with different sequence sizes (from 30 to 100), while signal length was always frozen to 320, which is necessary for CNN feature extraction. Considering specifics of experimental PAUT data, we decided to fix sequence length to 50 as an optimal balance. Technically the model can accept variable sequence lengths as long as the NN graph is not frozen, because the projection weights remain the same and only the matrix sizes change. However, for practical deployment, we had to convert the trained NN into ONNX format for integration into developed software. In this stage, the NN graph freezes, and the input sequence length must remain constant (50). To improve training stability on a relatively small dataset, we applied dropout regularization, multi-head attention, early stopping, and moderate hidden layer sizes. Also, overlapping signal sequences were generated using a sliding window to augment the dataset and increase sample variability.
As shown in Figure 12, both training and validation loss decreased steadily while accuracy increased, reaching a validation accuracy of about 97.5 % . The training and validation curves remained close throughout, indicating stable convergence and good generalization without signs of overfitting. These results confirm that the convolutional feature extractor combined with self-attention effectively captures both local and long-range features in PAUT sequences.
On experimental PAUT data of complex structures, CATT-S achieved 99.4% accuracy (Figure 13), indicating that almost all samples were classified correctly. On experimental PAUT data of complex structures, among all CATT-S predictions labeled as defects, 91.4% were true defects (precision) with a recall of 0.896—most true defects across all are found, giving an F1-score of 0.905. The ROC–AUC of 0.997 indicates near-complete separability between defect and non-defect signals across thresholds, enabling operating points that keep both false positives and missed defects low.

5. Conclusions

This study describes a complete pipeline for automatic defect detection in PAUT data. Due to the main focus of the paper being to improve the process of defect detection, PAUT of butt joint welds was chosen due to its prevalence, and PAUT of composite materials was chosen. First, the well-known SNR method was improved to become automatic and parameter-free. For proper C-scan plot view depth gates are calculated automatically from the signal derivative profile accumulated from D-scan, thresholds are set adaptively, and amplitudes are normalized; while improved SNR algorithm can be applied for successful automatic defect detection, it still has difficulties working with highly noisy data or PAUT of specimens with large pore zones. Thus, as the next step, a DL-based approach was developed. FCN confirmed feasibility but lacked capacity, and CNN achieved strong accuracy (about 95%) but was limited by its fixed receptive field. The proposed new CATT-S architecture, where convolutional layers extract local features and Transformer self-attention models dependencies across sequences of A-scans, reached 99.4% accuracy on experimental PAUT data with precision 0.914, recall 0.896, F1-score 0.905, and ROC–AUC 0.997; while more computationally demanding than CNN, CATT-S can still run in real time on CPU after ONNX conversion. Input sequence length was fixed to 50 signals, and to speed up complete scan processing, we implemented parallel chunk-based prediction, which keeps inference practical despite high CPU load.
Thus, we successfully improved the process of finding defects in the PAUT data using the standard SNR algorithm, although not for all possible data variations. Also, the developed new CATT-S architecture was optimized for parallel processing of several A-scan signal sequences at once using only the CPU, so it can be used for real-time defect detection in PAUT data.
Future work can be focused on improving this approach to apply it for more variation in PAUT welds and tests in real-time defect detection in PAUT.

Author Contributions

Conceptualization, J.L.; methodology, K.B. and J.L.; validation, K.B., J.-I.C. and J.L.; formal analysis, K.B.; investigation, K.B.; resources, J.L.; data curation, K.B.; writing—original draft preparation, K.B., J.-I.C. and J.L.; writing—review and editing, K.B., J.-I.C. and J.L.; supervision, J.-I.C. and J.L.; project administration, J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by KOREA HYDRO & NUCLEAR POWER CO., LTD. (No. 2024-TECH-10) and the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (RS-2025-25396743).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data supporting the findings of this study are not publicly available due to security restrictions of the providing company. However, the data may be made available upon reasonable request and subject to review.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Raj, B.; Jayakumar, T.; Rao, B.P.C. Non-destructive testing and evaluation for structural integrity. Sadhana 1995, 20, 5–38. [Google Scholar] [CrossRef]
  2. Ondrejka, V.; Gergeľ, T.; Bucha, T.; Pástor, M. Innovative methods of non-destructive evaluation of log quality. Cent. Eur. For. J. 2021, 67, 3–13. [Google Scholar] [CrossRef]
  3. Boccardi, S.; Boffa, N.D.; Carlomagno, G.M.; Maio, L.; Meola, C.; Ricci, F. Infrared thermography and ultrasonics to evaluate composite materials for aeronautical applications. J. Phys. Conf. Ser. 2015, 658, 012007. [Google Scholar] [CrossRef]
  4. Garnier, C.; Pastor, M.L.; Eyma, F.; Lorrain, B. The detection of aeronautical defects in situ on composite structures using Non Destructive Testing. Compos. Struct. 2011, 93, 1328–1336. [Google Scholar] [CrossRef]
  5. Katnam, K.B.; Da Silva, L.F.M.; Young, T.M. Bonded repair of composite aircraft structures: A review of scientific challenges and opportunities. Prog. Aerosp. Sci. 2013, 61, 26–42. [Google Scholar] [CrossRef]
  6. Drewry, M.A.; Georgiou, G.A. A review of NDT techniques for wind turbines. Insight-Non Test. Cond. Monit. 2007, 49, 137–141. [Google Scholar] [CrossRef]
  7. Ciang, C.C.; Lee, J.R.; Bang, H.J. Structural health monitoring for a wind turbine system: A review of damage detection methods. Meas. Sci. Technol. 2008, 19, 122001. [Google Scholar] [CrossRef]
  8. Raišutis, R.; Jasiūnienė, E.; Šliteris, R.; Vladišauskas, A. The review of non-destructive testing techniques suitable for inspection of the wind turbine blades. Ultragarsas-Ultrasound 2008, 63, 26–30. [Google Scholar]
  9. Galappaththi, U.I.K.; De Silva, A.K.M.; Macdonald, M.; Adewale, O.R. Review of inspection and quality control techniques for composite wind turbine blades. Insight-Non Test. Cond. Monit. 2012, 54, 82–85. [Google Scholar] [CrossRef]
  10. Greene, E. Marine composites non-destructive evaluation. Ship Struct. 2014, 1, 416–427. [Google Scholar]
  11. Soutis, C. Fibre reinforced composites in aircraft construction. Prog. Aerosp. Sci. 2005, 41, 143–151. [Google Scholar] [CrossRef]
  12. Dwivedi, S.K.; Vishwakarma, M.; Soni, A. Advances and researches on non destructive testing: A review. Mater. Today Proc. 2018, 5, 3690–3698. [Google Scholar] [CrossRef]
  13. Li, W.; Zhou, Z.; Li, Y. Inspection of butt welds for complex surface parts using ultrasonic phased array. Ultrasonics 2019, 96, 75–82. [Google Scholar] [CrossRef] [PubMed]
  14. Bai, Z.; Chen, S.; Jia, L.; Zeng, Z. Phased array ultrasonic signal compressive detection in low-pressure turbine disc. NDT E Int. 2017, 89, 1–13. [Google Scholar] [CrossRef]
  15. Yang, S.; Yoon, B.; Kim, Y. Using phased array ultrasonic technique for the inspection of straddle mount-type low-pressure turbine disc. NDT E Int. 2009, 42, 128–132. [Google Scholar] [CrossRef]
  16. Aulin, A.; Shahzad, K.; MacKenzie, R.; Bott, S. Comparison of non-destructive examination techniques for crack inspection. In Proceedings of the International Pipeline Conference, Calgary, AB, Canada, 28 September–2 October 2020; American Society of Mechanical Engineers: New York, NY, USA, 2020; Volume 84447, p. V001T03A044. [Google Scholar]
  17. Xu, Q.; Wang, H. Sound field modeling method and key imaging technology of an ultrasonic phased array: A review. Appl. Sci. 2022, 12, 7962. [Google Scholar] [CrossRef]
  18. Shi, H.; Ebrahimi, M.; Zhou, P.; Shao, K.; Li, J. Ultrasonic and phased-array inspection in titanium-based alloys: A review. Proc. Inst. Mech. Eng. Part E J. Process Mech. Eng. 2023, 237, 511–530. [Google Scholar] [CrossRef]
  19. Liu, W.; Wen, Z.; Wang, J.; Wang, S.; Wang, H.; Zhang, W.; Hong, J. Experimental Study on Lateral Resolution of Phased Array Ultrasonic Testing of Irregular Structure Weld Defects. Shock Vib. 2022, 2022, 1427417. [Google Scholar] [CrossRef]
  20. Szávai, S.; Bézi, Z.; Dudra, J.; Méhész, I. Modelling of phased array ultrasonic inspection of a steam generator dissimilar metal weld. Procedia Struct. Integr. 2016, 2, 1015–1022. [Google Scholar] [CrossRef]
  21. Kumar, S.; Menaka, M.; Venkatraman, B. Phased array ultrasonic inspection of dissimilar weld joints in nuclear facility by experiment and simulation. In Proceedings of the NDE India Conference, Bengaluru, India, 5–7 December 2019. [Google Scholar]
  22. Si, J.; Wei, D.; Yang, Y.; Tang, X. CIVA Simulation and Experiment Verification for Thin-Walled Small-Diameter Pipes by Using Phased Array Ultrasonic Testing. In Proceedings of the ASME Pressure Vessels and Piping Conference, Minneapolis, MN, USA, 19–24 July 2020; American Society of Mechanical Engineers: New York, NY, USA, 2020; Volume 83815, p. V001T01A080. [Google Scholar]
  23. Zhang, X.; Feng, N.; Wang, Y.; Shen, Y. Acoustic emission detection of rail defect based on wavelet transform and Shannon entropy. J. Sound Vib. 2015, 339, 419–432. [Google Scholar] [CrossRef]
  24. Hao, Q.; Zhang, X.; Wang, Y.; Shen, Y.; Makis, V. A novel rail defect detection method based on undecimated lifting wavelet packet transform and Shannon entropy-improved adaptive line enhancer. J. Sound Vib. 2018, 425, 208–220. [Google Scholar] [CrossRef]
  25. Yaacoubi, S.; Montresor, S.; Bentahar, M. A model-based approach for in-situ automatic defect detection in welds using ultrasonic phased array. Expert Syst. Appl. 2022, 206, 117747. [Google Scholar]
  26. Kadhim, S.J.; Al-Sabur, R.K.; Ali, A.B.K. Application of Different Median Filter Algorithms for Welding Defects Clarification in Radiographic Images. Univ. Thi-Qar J. Eng. Sci. 2020, 11, 56–61. [Google Scholar] [CrossRef]
  27. Mineo, C.; MacLeod, C.; Morozov, M.; Pierce, S.G.; Summan, R.; Rodden, T.; Kahani, D.; Powell, J.; McCubbin, P.; McCubbin, C.; et al. Flexible integration of robotics, ultrasonics and metrology for the inspection of aerospace components. AIP Conf. Proc. 2017, 1806, 020008. [Google Scholar]
  28. Bertovic, M.; Virkkunen, I. NDE 4.0: New paradigm for the NDE inspection personnel. In Handbook of Nondestructive Evaluation 4.0; Springer: Cham, Switzerland, 2022; pp. 239–269. [Google Scholar]
  29. Virkkunen, I.; Koskinen, T.; Jessen-Juhler, O.; Rinta-Aho, J. Augmented ultrasonic data for machine learning. J. Nondestruct. Eval. 2021, 40, 4. [Google Scholar] [CrossRef]
  30. Siljama, O.; Koskinen, T.; Jessen-Juhler, O.; Virkkunen, I. Automated flaw detection in multi-channel phased array ultrasonic data using machine learning. J. Nondestruct. Eval. 2021, 40, 67. [Google Scholar] [CrossRef]
  31. Kim, Y.H.; Lee, J.R. Automated data evaluation in phased-array ultrasonic testing based on A-scan and feature training. NDT E Int. 2024, 141, 102974. [Google Scholar] [CrossRef]
  32. Plastropoulos, A.; Torbali, M.E.; Avdelidis, N.P.; Ibarra-Castanedo, C.; Klein, M.; Maldague, X.P. Advanced NDT inspection approach for aircraft composite panels. In Proceedings of the Thermosense: Thermal Infrared Applications XLVI, Orlando, FL, USA, 15–19 April 2024; SPIE: Bellingham, WA, USA, 2024; Volume 13047, pp. 115–124. [Google Scholar]
  33. Sudharsan, P.L.; Gantala, T.; Balasubramaniam, K. Multi modal data fusion of PAUT with thermography assisted by Automatic Defect Recognition System (M-ADR) for NDE Applications. NDT E Int. 2024, 143, 103062. [Google Scholar] [CrossRef]
  34. Tunukovic, V.; McKnight, S.; Mohseni, E.; Pierce, S.G.; Pyle, R.; Duernberger, E.; O’Hare, T. A study of machine learning object detection performance for phased array ultrasonic testing of carbon fibre reinforced plastics. NDT E Int. 2024, 144, 103094. [Google Scholar] [CrossRef]
  35. Scabini, L.F.; Bruno, O.M. Structure and performance of fully connected neural networks: Emerging complex network properties. Physica A 2023, 615, 128585. [Google Scholar] [CrossRef]
  36. Salman, S.; Liu, X. Overfitting mechanism and avoidance in deep neural networks. arXiv 2019, arXiv:1901.06566. [Google Scholar] [CrossRef]
  37. Lin, T.; Horne, B.G.; Giles, C.L. How embedded memory in recurrent neural network architectures helps learning long-term temporal dependencies. Neural Netw. 1998, 11, 861–868. [Google Scholar] [CrossRef]
  38. Medak, D.; Posilović, L.; Subašić, M.; Budimir, M.; Lončarić, S. Deep learning-based defect detection from sequences of ultrasonic B-scans. IEEE Sens. J. 2021, 22, 2456–2463. [Google Scholar] [CrossRef]
  39. Sendra, T.; Belanger, P. On the use of a Transformer Neural Network to deconvolve ultrasonic signals. Ultrasonics 2025, 152, 107639. [Google Scholar] [CrossRef] [PubMed]
  40. Na, Y.; He, Y.; Deng, B.; Lu, X.; Wang, H.; Wang, L.; Cao, Y. Advances of Machine Learning in Phased Array Ultrasonic Non-Destructive Testing: A Review. Artif. Intell. 2025, 6, 124. [Google Scholar] [CrossRef]
  41. Zhang, Q.; Peng, J.; Tian, K.; Wang, A.; Li, J.; Gao, X. Advancing ultrasonic defect detection in high-speed wheels via UT-YOLO. Sensors 2024, 24, 1555. [Google Scholar] [CrossRef]
  42. Zhang, S.; Zhang, Y. Weld Defect Downscaling Recognition for Phased Array Ultrasonic Data Based on Semantic Segmentation. E-J. Nondestruct. Test. 2024, 29, 29918. [Google Scholar] [CrossRef]
  43. I, B.; Barashok, K.; Choi, Y.; Choi, Y.; Aslam, M.; Lee, J. Machine learning techniques in ultrasonics-based defect detection and material characterization: A comprehensive review. Adv. Mech. Eng. 2025, 17, 1–41. [Google Scholar] [CrossRef]
  44. Krautkrämer, J.; Krautkrämer, H. Ultrasonic Testing of Materials, 4th ed.; Springer: Berlin/Heidelberg, Germany, 1990. [Google Scholar]
  45. Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
  46. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention Is All You Need. In Advances in Neural Information Processing Systems 30; Curran Associates, Inc.: Red Hook, NY, USA, 2017; pp. 5998–6008. [Google Scholar]
Figure 1. Comparison of S-scan for 199 mm scan step of same testing sample in OmniPC software (OmniPC™ 6.0.0) (a) and using developed software sw (b).
Figure 1. Comparison of S-scan for 199 mm scan step of same testing sample in OmniPC software (OmniPC™ 6.0.0) (a) and using developed software sw (b).
Sensors 25 06128 g001
Figure 2. Schematic weld profile with variable parameters.
Figure 2. Schematic weld profile with variable parameters.
Sensors 25 06128 g002
Figure 3. Original signal accumulated from D-scan (a) and calculated second order derivative signal (b).
Figure 3. Original signal accumulated from D-scan (a) and calculated second order derivative signal (b).
Sensors 25 06128 g003
Figure 4. Original C-scan (a) and calculated defective area by automatic SNR (b).
Figure 4. Original C-scan (a) and calculated defective area by automatic SNR (b).
Sensors 25 06128 g004
Figure 5. D-scan of highly noised data with wrong automatic gates calculation.
Figure 5. D-scan of highly noised data with wrong automatic gates calculation.
Sensors 25 06128 g005
Figure 6. Schematic representation of the common structure of FC NN.
Figure 6. Schematic representation of the common structure of FC NN.
Sensors 25 06128 g006
Figure 7. Schematic representation of FC NN designed for defect detection algorithm.
Figure 7. Schematic representation of FC NN designed for defect detection algorithm.
Sensors 25 06128 g007
Figure 8. Plot of training and validation accuracy and losses changing in FC NN training process.
Figure 8. Plot of training and validation accuracy and losses changing in FC NN training process.
Sensors 25 06128 g008
Figure 9. Schematic representation of CNN designed for defect detection algorithm.
Figure 9. Schematic representation of CNN designed for defect detection algorithm.
Sensors 25 06128 g009
Figure 10. Plot of training and validation accuracy and losses changing in CNN training process.
Figure 10. Plot of training and validation accuracy and losses changing in CNN training process.
Sensors 25 06128 g010
Figure 11. Schematic simplified architecture of CATT-S model.
Figure 11. Schematic simplified architecture of CATT-S model.
Sensors 25 06128 g011
Figure 12. Plot of training and validation accuracy and losses changing in CATT-S training process.
Figure 12. Plot of training and validation accuracy and losses changing in CATT-S training process.
Sensors 25 06128 g012
Figure 13. Evaluation metrics of CATT-S on experimental PAUT data.
Figure 13. Evaluation metrics of CATT-S on experimental PAUT data.
Sensors 25 06128 g013
Table 1. Key variable parameters for simulated weld dataset collection.
Table 1. Key variable parameters for simulated weld dataset collection.
Parameter VariedRange/ValuesNotes
Root face ( R F )0–3 mmVariation in root face thickness
Gap ( ζ )1–4 mmJoint gap between plates
Thickness (t)5.6–18 mmVariation in plate thickness
Angle ( α )70°, 75°Weld V-groove angle
Defect typesCracks, Porosity, InclusionsDefects variation placed in weld root and weld toe
Non-defective samplesIncludedVarious geometrical profiles without flaws
Structural noiseVaried amplitude & densitySimulated inspection conditions
Dataset size∼200 S-scan samplesEach S-scan consists of 39 A-scan signals
Augmentation×2.5Variations in noise maps and signal recombination
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

Barshok, K.; Choi, J.-I.; Lee, J. Deep Learning-Based Approach for Automatic Defect Detection in Complex Structures Using PAUT Data. Sensors 2025, 25, 6128. https://doi.org/10.3390/s25196128

AMA Style

Barshok K, Choi J-I, Lee J. Deep Learning-Based Approach for Automatic Defect Detection in Complex Structures Using PAUT Data. Sensors. 2025; 25(19):6128. https://doi.org/10.3390/s25196128

Chicago/Turabian Style

Barshok, Kseniia, Jung-In Choi, and Jaesun Lee. 2025. "Deep Learning-Based Approach for Automatic Defect Detection in Complex Structures Using PAUT Data" Sensors 25, no. 19: 6128. https://doi.org/10.3390/s25196128

APA Style

Barshok, K., Choi, J.-I., & Lee, J. (2025). Deep Learning-Based Approach for Automatic Defect Detection in Complex Structures Using PAUT Data. Sensors, 25(19), 6128. https://doi.org/10.3390/s25196128

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