Phased array welding defect detection method and system based on long dependency feature decoupling
By employing a phased array welding defect detection method based on long-dependency feature decoupling, and utilizing a self-attention mechanism and feature denoising model, the problem of insufficient precision and accuracy in welding defect detection is solved, and efficient multi-scale defect identification and localization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TAIYUAN UNIVERSITY OF SCIENCE AND TECHNOLOGY
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-15
AI Technical Summary
Existing welding defect detection methods are insufficient in terms of precision and accuracy, especially in the detection of internal defects in metals, where they are difficult to identify effectively. Furthermore, traditional deep learning methods do not pay enough attention to the features of abrupt change regions, resulting in poor detection performance.
A phased array welding defect detection method based on long-dependency feature decoupling is adopted. Multi-scale features are extracted through the backbone network, and high-order, mid-order and low-order features are separated by self-attention mechanism. Redundant information is removed by feature decoupling module and denoising module. Candidate regions are refined by attention-driven region proposal network. Finally, defect prediction is performed by classification and regression head.
It improves the precision and accuracy of welding defect detection, effectively identifies multi-scale defects in complex backgrounds, solves the positioning problem caused by fuzzy defect boundaries, and enhances the robustness and efficiency of detection.
Smart Images

Figure CN122049530A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial defect detection technology, and in particular to a phased array welding defect detection method and system based on long-dependency feature decoupling. Background Technology
[0002] Industrial defect detection is a crucial part of industrial production. In modern manufacturing, industrial defects not only affect appearance but also easily lead to a decline in product effectiveness and performance. In recent years, machine vision-based defect detection methods have been applied in many industrial fields. The detection process mainly consists of feature extraction and classification. However, feature extraction relies too heavily on manually designed algorithms, resulting in poor robustness and generalization ability, limiting its application to specific industrial scenarios and leading to low efficiency. With the continuous development of artificial intelligence, deep learning-based detection methods have greatly promoted the development of defect detection, but they still face the following challenges: The multi-scale complexity of metal defects: Defects on the surface of metallic materials may appear at different scales, requiring the identification of defects of various sizes and the formation of accurate bounding boxes, which places new demands on the receptive field. Furthermore, defect images in industrial scenarios are characterized by irregular regions of interest and redundant background information. Insufficient attention to abrupt change region features: Surface defects in materials are often caused by stress resulting from external forces or other factors (such as temperature changes). The stress distribution interacts with the material structure, thus affecting the surface properties and forming defects. Therefore, effectively extracting deformation features from abrupt change regions is helpful for identifying surface defects, but current deep learning methods have limited research in this area. New challenges in detecting internal metal defects: In industrial scenarios, defects exist not only on the surface but also internally. For example, cracks and inclusions in welding. For these internal defects, phased array ultrasonic testing is an emerging approach, and the results are usually presented as two-dimensional images. These defects belong to different categories, but due to the special characteristics of ultrasonic imaging, the similarity between different categories of defects is extremely high, making it difficult to guarantee the accuracy and reliability of defect identification. Summary of the Invention
[0003] To address the technical problem of low accuracy and precision in existing welding defect detection methods, this invention provides a phased array welding defect detection method and system based on long-dependency feature decoupling.
[0004] Firstly, this invention proposes a phased array welding defect detection method based on long-dependency feature decoupling, which is used to capture welding defects from ultrasonic phased array images. The phased array welding defect detection method includes: First, several multi-scale features are extracted from the ultrasound phased array images using a backbone network. F i Then from Fi High-order features with different dependencies are separated from the data. F H Intermediate-order features F M Low-order features F L ; and will F H , F M , F L Aggregation features are obtained after aggregation. F A .in, F M Depend on F i It is obtained after extraction through the Integrating operation. F H For the reason F M Features generated through a self-attention mechanism that contain global structure and long-distance dependencies. F L For the reason F M Features containing local details and short-range dependencies are generated through a self-attention mechanism. Then... F A Denoising features are obtained after denoising. F D Next, F D A two-step refinement process, from coarse to fine, is used to generate refined candidate regions. P Finally, F D and P Alignment features are obtained after ROI pooling. F ; F Welding defects are identified through classification and regression analysis.
[0005] Secondly, this invention also proposes a phased array welding defect detection system based on long-dependency feature decoupling, which utilizes the phased array welding defect detection method based on long-dependency feature decoupling from the first aspect. The phased array welding defect detection system includes: a multi-scale feature extraction module, a feature decoupling module, a denoising module, a candidate region generation module, and a prediction module. The multi-scale feature extraction module is used to extract several multi-scale features from the ultrasonic phased array image through a backbone network. F i The feature decoupling module is used to decouple features from... F i High-order features with different dependencies are separated from the data. F H Intermediate-order featuresF M Low-order features F L And will F H , F M , F L Aggregation features are obtained after aggregation. F A . F M Depend on F i It is obtained after extraction through the Integrating operation. F H For the reason F M Features generated through a self-attention mechanism that contain global structure and long-distance dependencies. F L For the reason F M Features generated using a self-attention mechanism, containing local details and short-range dependencies. A denoising module is used to... F A Denoising features are obtained after denoising. F D The candidate region generation module is used to... F D A two-step refinement process, from coarse to fine, is used to generate refined candidate regions. P The prediction module is used to... F D and P Alignment features are obtained after ROI pooling. F . F Welding defects are identified through classification and regression analysis.
[0006] Thirdly, the present invention also proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the phased array welding defect detection method based on long-dependency feature decoupling in the first aspect.
[0007] Fourthly, the present invention also proposes a computer program product comprising computer program instructions for causing a computer to execute the phased array welding defect detection method based on long-dependency feature decoupling in the first aspect.
[0008] The beneficial effects of this invention are as follows: This invention captures high-order, mid-order, and low-order features at different scales through a feature decoupling model, thereby expanding the receptive field of multi-scale defects. It also uses a gate mechanism to denoise long-dependent aggregated features, reducing interference from background information and fully capturing the intrinsic connection between abrupt change regions and defect regions to ensure high-precision detection even in complex backgrounds. Finally, it enhances the distribution of the latent domain through a coarse-fine two-step bounding box refinement, solving the localization problem caused by the ambiguity of defect boundaries. Ultimately, this invention achieves high precision and accuracy in defect detection. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a flowchart of a phased array welding defect detection method based on long-dependency feature decoupling; Figure 2 This is a structural diagram of the feature decoupling model; Figure 3 This is a structural diagram of the feature denoising model; Figure 4 This is a structural diagram of an attention-driven region suggestion network; Figure 5 This is a full-process visualization diagram of the phased array welding defect detection method based on long-dependency feature decoupling; Figure 6 This is an ultrasonic phased array image from the TYUST-PAUT dataset; Figure 7 This is a diagram of the running interface after the phased array welding defect detection method is encapsulated into detection software in another embodiment. Detailed Implementation
[0011] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] It should be noted that when a component is said to be "installed on" another component, it can be directly on the other component or it may be in a component that is centered on it. When a component is said to be "set on" another component, it can be directly set on the other component or it may also be in a component that is centered on it. When a component is said to be "fixed to" another component, it can be directly fixed to the other component or it may also be in a component that is centered on it.
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "or / and" as used herein includes any and all combinations of one or more of the associated listed items.
[0014] Please refer to Figure 1 This embodiment provides a phased array welding defect detection method based on long-dependency feature decoupling, which first uses ultrasonic phased array images (i.e., Figure 1 Input in x Four multi-scale features were obtained through ResNet and Carafe FPN (FPN: Feature Pyramid Network). F i : F i =[ F 1 , F 2 , F 3 , F 4 This combination helps capture rich feature information at different scales. Next, F i By separating global and local dependent features, we can better model the long-distance relationships between features. Then, we can generate aggregated features with dependencies through aggregation operations. F A Subsequently, a gating mechanism was used to remove [the affected individuals]. F A Redundant features are removed to obtain denoised features. F D Next, F D A two-step refinement process, from coarse to fine, is performed on candidate regions. This process effectively alleviates the anchor point and feature misalignment problem caused by feature bias and scale variation in traditional RPN (Region Proposal Network), further generating refined candidate regions. P Finally, F D andP Alignment features are obtained after ROI pooling. F Then F Welding defects (i.e.,) are obtained through classification and regression analysis. Figure 1 Output in Y The implementation of this phased array welding defect detection method relies on an innovatively designed network architecture. The network architecture will be explained in detail below: The network architecture includes a backbone network, a neck network, and a head network. The backbone network uses ResNet101 and Carafe FPN for feature extraction. Ultrasound phased array images are input into ResNet, and after processing by ResNet and Carafe FPN, multi-scale features are obtained. F i .
[0015] The neck network is one of the design focuses of this invention, and it includes: a feature decoupling model (i.e. Figure 1 The LongDependency Feature Disentanglement Module part), the feature denoising model (i.e. Figure 1 The FeatureAggregation Denoising Module part), through the attention-driven region proposal network (i.e. Figure 1 (The AdaptiveAttention-Driven RPN part in [the text]).
[0016] 1. Feature decoupling model.
[0017] Transformer-based models have significant advantages in capturing long-dependent features, but they suffer from inefficiency, high computational cost, and insufficient local feature extraction capabilities, limiting their application in industrial defect detection scenarios. However, convolutional operations excel in modeling local dependencies. In the feature extraction stage, ResNet101 and Carafe FPN are used for feature extraction. F i However, this method faces challenges in capturing the multi-level dependency features of defective targets. To address this issue, a feature decoupling model based on the above ideas is proposed, such as... Figure 2 As shown. Please refer to... Figure 2 (a) This feature decoupling model includes: an Integrating layer, a channel self-attention layer, and an aggregation layer. The Integrating layer generates a backbone network... F i Integrating operations are performed to extract intermediate-order features. F M The integration operation willF 1 , F 2 , F 3 , F 4 The general formula for summing the characteristics and taking the mean is: .
[0018] I Represents the total number of multi-scale features. i ∈[1, I Next, F i Generate globally dependent high-order features through two-channel self-attention mechanisms. F H and low-order features of local dependence F L This step is completed by the channel self-attention layer. For details, please refer to... Figure 2 (b). Channel self-attention layer is used to... F M The query vector is generated by performing normalization, 1×1 convolution, and 3×3 depthwise convolution in sequence. Q Key vector K Sum value vector V Next, Q After normalization using the Softmax function K The product yields the intermediate vector. qk Finally, qk and V The product is then subjected to a 1×1 convolution to obtain F H .Should F H Focusing more on global structure and long-range dependencies in images helps in identifying defect patterns over a large area. Similarly, F L Through with F H Obtained through a similar process. F L Focusing primarily on local details and short-range dependencies helps to capture subtle defects and local variations. (For simplicity...) F L and F H For differences in implementation methods, please refer again. Figure 2 (a) Each F M The feature map size is set to 8×8. F H The feature map window number is set to 1 ( Figure 2 (a) F H The corresponding red dashed box area), the interaction range is global (without spatial constraints), thus forming high-order features. F L The feature map window size is set to 4 ( Figure 2 (a) F L (corresponding to the red dashed box area), through this hard constraint, forcing F L Ignoring long-range dependencies, the focus is on enhancing local patterns to form low-level features. Finally, an aggregation layer is used to... F H , F M , F L Fusion yields aggregated features. F A : F A = F H + F M + F L This fusion approach ensures that the model can simultaneously focus on global and local information, improving the detection capability of multi-scale defects.
[0019] 2. Feature denoising model.
[0020] In object detection tasks, multi-level feature fusion is an important means to improve performance; however, the aggregated multi-level features often have redundancy. In super-resolution imaging tasks, gated attention mechanisms are often used to enhance the model's ability to focus on key information while ignoring other irrelevant information, thus achieving feature de-redundancy. Inspired by the above ideas, and considering that workpiece defects often have similar colors to the background, an aggregated feature denoising model is proposed. This model adaptively selects useful features along the channel dimension. The structure of this feature denoising model is as follows: Figure 3 As shown, the processing procedure is as follows: For the input F A First, a 1×1 point convolution is used to initially integrate channel features, and then a 3×3 depthwise separable convolution is used to further process the features to obtain intermediate features. F agg Then F agg The intermediate features are divided into two parts along the channel dimension. F gate , F con .for F gateAttention weight map is generated using the GELU activation function. M The GELU activation function, through its smooth non-linear properties, effectively captures complex patterns in input data, thereby identifying and amplifying the weights of important features. Simultaneously, GELU naturally suppresses smaller input values, helping to remove noise and ensuring the model focuses more on key information. This mechanism not only enhances the model's ability to capture useful features but also improves its robustness and performance. In deep learning, the parameters of each convolutional layer are learned independently; due to differences in input features, even with similar network structures, the final results will differ. Subsequently, [further details will be provided]. M and F con After gating the operation through point-by-point multiplication, we obtain... F D : F D = F con ⊙ M This gating mechanism enables adaptive selection of channel weights, activating highly relevant features and suppressing irrelevant features, thereby effectively reducing background interference and achieving feature denoising. This process helps identify and locate imperceptible defects in complex backgrounds, ensuring high detection accuracy.
[0021] 3. Attention-driven region suggestion network.
[0022] In object detection networks, after feature extraction, the feature maps are input into a Region Proposal Network (RPN) to generate a series of candidate regions. These candidate regions are crucial because they directly affect the accuracy and efficiency of subsequent object detection. High-quality candidate regions can more accurately cover the target object, reducing the possibility of false positives and false negatives, thereby improving the performance of the entire detection system. Furthermore, accurate candidate regions can reduce the complexity of subsequent classification and regression calculations, allowing the model to process image data more efficiently. Traditional Region Proposal Networks generate candidate regions by aligning features with predefined anchor boxes. However, this mechanism has limitations in handling feature offsets and scale variations. Feature offset refers to the target's position in the image not being perfectly aligned with the anchor box, while scale variations refer to the target's size and shape potentially not matching the fixed anchor box. These issues can lead to misalignment between the anchor box and target features, affecting the accuracy and performance of the detection results. In defect detection tasks, due to variations in shooting angle, distance, and lighting conditions, different parts may exhibit different features and scales. This variation can cause deviations in target features and scale between test and training images, adversely affecting the detection results. Therefore, a more robust mechanism is needed to cope with these changes and improve detection accuracy. Based on the above analysis, such as Figure 4The present invention designs a coarse-to-fine attention-driven RPN. This RPN first captures the geometric distribution features of the target through global feature dimensionality reduction. F D The data is fed into an Adaptive AvgPool layer, where it is compressed in both the horizontal and vertical dimensions to generate longitudinal and transverse vectors reflecting spatial structure features. This decoupled design aims to effectively extract the target's prior position in the image coordinate system, laying the foundation for generating deformation parameters for irregular targets. After acquiring multi-directional spatial information, channel-wise concatenation is used to fuse feature vectors from different dimensions. Subsequently, a 1*1 convolutional layer is used to integrate cross-channel information to obtain intermediate features. F e and will F e A re-weighting mechanism with a ReLU activation function is introduced. This process is similar to an attention mechanism, using learned weights to filter features, aiming to suppress background noise and enhance salient features associated with weld defect edges, thereby more accurately predicting sampling offsets. Finally, the weighted features processed by the Sigmoid activation function are combined with the initial position information (i.e., the input...) F D The initial candidate regions are obtained by combining the dot products. P C Subsequently, an attention mechanism was used to analyze the spatial information. P C Enhancements are performed, and further mapping is used to generate learnable offsets. offset .after P C With offset offset These parameters are then fed into an adaptive deformable convolution module. This module learns the offset and dynamically adjusts the position of the convolution kernel to achieve precise feature-level alignment. This breaks the limitation of fixed rectangular sampling in traditional convolution kernels and generates refined candidate regions. P The model then outputs the results. By dynamically adjusting the position of sampling points according to the actual geometry of the target, it can achieve accurate feature extraction for targets with complex shapes. This mechanism significantly enhances the network's ability to model irregular morphological features and effectively improves the recognition accuracy of subtle targets in complex backgrounds.
[0023] Fine candidate region P and F D Finally, welding defects are predicted using the head network. Please refer to [the relevant documentation] again. Figure 1 The head network includes: ROI pooling layer, classification head, and regression head. FD and P Alignment features are obtained after ROI pooling. F , F Welding defects are identified through classification and regression analysis.
[0024] To demonstrate the model learning process in this solution, the entire process of input and feature maps is visualized, such as... Figure 5 As shown, the input ultrasound phased array image (i.e., X) is first processed by a backbone network composed of FPN and ResNet to obtain features. F i As can be seen from the image, the region of interest captured by the Backbone is relatively uniform. Next, [the following will be performed]... F i Higher-order features are obtained by inputting into the feature decoupling model. F H Intermediate-order features F M Low-order features F L The visualization results show significant differences in the distributions of the three features, indicating a strong ability to decouple multi-level features, but it still cannot effectively locate the features in the defect area. Next, we will... F H , F M , F L The data is fed into a feature denoising model for denoising, and then processed from the feature map. F D It can be seen that the denoised features gradually move closer to the defective region, but there is still room for optimization. Then, through an attention-driven region proposal network, the feature regions are guided in the first stage, starting from... P C The feature map shows that the feature regions are beginning to refine, but there is still a problem of insufficient feature focus. Therefore, in the second stage of deformable convolution, the features are refined to guide the anchor boxes to shift effectively. P C , P The visualization of the two feature maps illustrates the effectiveness of the two-step refinement strategy for defect detection. Finally, defect prediction is achieved using classification and regression heads, and the prediction results are as follows: Figure 5 As shown in the upper corner. The above analysis and visualization results illustrate the workflow of this solution: "how to capture defect features" and "how to distinguish defects from the background." Throughout the learning process, red pixels represent the defect features learned by the model at that stage, and blue pixels represent the background features (i.e., unimportant features) learned by the model at that stage.
[0025] To evaluate the differences between the proposed method and existing solutions, experiments were conducted on the GC10-DET and TYUST-PAUT datasets. Due to the specific nature of industrial defects, large, medium, and small area defects are not necessarily present on all datasets; therefore, experimental results for individual APS, APL, and APM metrics are lacking on some datasets. Specifically, the proposed model was trained and tested using the PyTorch deep learning framework. The experimental environment was configured with NVIDIA Tesla V100, CUDA 12.1, Python 3.10, and PyTorch 2.1.2 to evaluate the proposed method and other benchmark models. During model training, a stochastic gradient descent optimizer was used for parameter updates, with a batch size of 8, an initial learning rate of 0.001, and a momentum coefficient of 0.9. Data augmentation strategies were limited to random horizontal flipping and multi-scale resizing to balance training efficiency and generalization ability. A 3×3 deformable convolutional kernel was introduced for the region proposal network in this solution. Two offset parameters are introduced at each convolutional kernel position, generating a total of 18 offsets to dynamically capture the geometric deformation features of defects. It is worth noting that no additional constraints are imposed on the numerical range of the offsets; their dynamic adjustment process is entirely determined by the network through backpropagation. To demonstrate the performance differences of the models in defect localization accuracy, mAP@0.5, mAP@0.75, and mAP metrics are used for evaluation. Furthermore, to further demonstrate the model's detection performance for defects of different sizes, we also provide the mean accuracy results for small (APS), medium (APM), and large (APL) scale defects. The benchmark models compared include: 1. Libra R-CNN (2019): This model improves detection performance by addressing the imbalance problem during training through adjustments at the sample, feature, and target levels. 2. YOLOv5 (2020): This model is currently widely used in industrial applications, focusing on integrating and refining various computer technologies to improve performance. 3. TOOD (2021): Proposed a task-aligned single-stage detector, improving detection performance by flexibly aligning target features and designing sample allocation schemes and task alignment losses. 4. YOLOF (2021): Achieved effective detection of targets at different scales by constructing pyramid feature maps, especially enhancing the detection capability of small objects. 5. RTMDet (2022): Utilized large-kernel depthwise convolutions to improve efficiency and adopted a dynamic label allocation strategy to accelerate training and improve accuracy. It also improved detection performance by adjusting the model architecture and data augmentation methods. 6. YOLOv6 (2022): A single-stage detection framework for industrial applications, employing adaptive aspect ratio pooling and a fully convolutional decoder to achieve a good balance between accuracy and speed.7. YOLOv7 (2023): Introduced new training techniques such as model reparameterization and model scaling to improve the performance and computational efficiency of real-time object detectors. 8. YOLOv8 (2023): Further improved detection speed and accuracy through a more efficient network architecture and optimization strategies, such as dynamic label assignment and adaptive anchor box calculation.
[0026] On the GC10-DET dataset, our proposed solution achieved the best results in terms of mAP@0.5, mAP@0.75, and mAP, as shown in Table 1. For individual categories, our solution demonstrated best or near-best performance in most defect categories. This dataset is characterized by diverse defect categories and similarities between the board background and defect areas; the experimental results highlight our solution's strong ability to distinguish between defects and background areas.
[0027] Table 1: Comparative experiments on the GC10-DET dataset.
[0028]
[0029]
[0030]
[0031] Furthermore, the experimental verification of this scheme was conducted on a private dataset. The TYUST-PAUT dataset used was collected in the actual production environments of Shanxi Yangmei Chemical Machinery (Group) Co., Ltd. and Taiyuan Boiler Group Co., Ltd., and covers ultrasonic phased array images under different welding processes and material conditions. It is mainly used to detect internal defects in welds, such as... Figure 6As shown in Table 2, internal defect detection is more complex and challenging than surface defect detection. The dataset includes four main defect types: non-critical, unfused, incomplete penetration, and air-hole. Ultrasonic phased array technology controls the direction and focus of the sound beam by adjusting the excitation phase of the probe array, thereby generating high-resolution images that enable the detection system to more accurately identify and locate defects inside welds. However, due to imaging characteristics, weld defects can appear very similar in images. This makes the TYUST-PAUT dataset an ideal benchmark for evaluating the model's ability to locate and identify internal weld defects in complex industrial environments, effectively validating the model's performance and robustness in real-world scenarios. On the TYUST-PAUT dataset, this approach also performs excellently when the defect is located inside the workpiece, achieving the best results in mAP@0.5, mAP@0.75, and mAP values. It is worth noting that the model in this approach achieves the best or near-best results in the mean accuracy index for small, medium, and large-scale defects. Furthermore, due to imaging characteristics, weld defects appear very similar in images, making defect location a key discrimination factor. Experimental results demonstrate that the proposed model has significant potential in capturing spatial location.
[0032] Table 2: Comparative experiments on the TYUST-PAUT dataset.
[0033]
[0034]
[0035] Table 3: TYUST-PAUT dataset split.
[0036]
[0037] In another embodiment, such as Figure 7As shown in the figure, this solution demonstrates the real-time operation of the model, packaged as industrial-grade dedicated inspection software, in a small-diameter pipe weld inspection scenario. The software, designed for the compact structure and concentrated defect types (such as air-holes and unfused areas) of small-diameter pipe welds, employs a lightweight architecture, is compatible with CPU computing devices, and does not rely on high-performance GPUs, lowering the deployment threshold in industrial settings. It integrates a full-process function including model initialization, single-image inspection, batch inspection, video inspection, real-time inspection, report generation, and statistical analysis, meeting diverse quality inspection needs of production lines. In practical applications, the software accurately captures multi-scale defect information from the complex background and defect features of ultrasonic phased array images of small-diameter pipe welds through a feature decoupling model. It removes background interference using a feature denoising module and then achieves precise defect localization through a coarse-fine two-step attention-driven RPN, effectively solving the problem of balancing efficiency and accuracy in small-diameter pipe weld defect inspection. The software is compatible with common image input formats in industrial settings, supports real-time visualization of inspection results and defect information, and can automatically generate inspection reports that meet industrial quality inspection standards, providing data support for production decisions. It can still maintain a high detection speed of 0.143 seconds / frame on CPU devices, and the detection rate reaches 100.0%, which fully verifies the stability and reliability of the model in the lightweight deployment scenario. It can fully adapt to the real-time quality inspection needs of small-diameter pipe weld production lines, significantly reduce the intensity of manual inspection, and improve the consistency and accuracy of inspection results.
[0038] In another embodiment, a phased array welding defect detection system based on long-dependency feature decoupling is proposed, which uses the phased array welding defect detection method based on long-dependency feature decoupling described in the above embodiment. This phased array welding defect detection system based on long-dependency feature decoupling includes: a multi-scale feature extraction module, a feature decoupling module, a denoising module, a candidate region generation module, and a prediction module. The multi-scale feature extraction module is used to extract several multi-scale features from the ultrasonic phased array image through a backbone network. F i The feature decoupling module is used to decouple features from... F i High-order features with different dependencies are separated from the data. F H Intermediate-order features F M Low-order features F L And will F H , F M , F L Aggregation features are obtained after aggregation. F A.in, F M Depend on F i It is obtained after extraction through the Integrating operation. F H For the reason F M Features generated through a self-attention mechanism that contain global structure and long-distance dependencies. F L For the reason F M Features generated using a self-attention mechanism, containing local details and short-range dependencies. A denoising module is used to... F A Denoising features are obtained after denoising. F D The candidate region generation module is used to... F D A two-step refinement process, from coarse to fine, is used to generate refined candidate regions. P The prediction module is used to... F D and P Alignment features are obtained after ROI pooling. F . F Welding defects are identified through classification and regression analysis.
[0039] In another embodiment, a computer-readable storage medium storing a computer program is also proposed. When the computer program is executed by a processor, it implements the steps of the phased array welding defect detection method based on long-dependency feature decoupling described in the above embodiments. The computer-readable storage medium may include, but is not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0040] In another embodiment, a computer program product is also proposed, comprising computer program instructions for causing a computer to execute the phased array welding defect detection method based on long-dependency feature decoupling described in the above embodiments. The computer program instructions may exist in a computer-readable medium in forms including, but not limited to, source files, executable files, and installation package files. Correspondingly, the computer program instructions may be executed by the computer in ways including, but not limited to: the computer directly executing the instructions; the computer compiling the instructions and then executing the corresponding compiled program; the computer reading and executing the instructions; or the computer reading and installing the instructions and then executing the corresponding installed program.
[0041] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0042] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A phased array welding defect detection method based on long-dependency feature decoupling, characterized in that, It is used to capture welding defects from ultrasonic phased array images; It includes: First, several multi-scale features are extracted from the ultrasound phased array images using a backbone network. F i ; Next from F i High-order features with different dependencies are separated from the data. F H Intermediate-order features F M Low-order features F L ; and will F H , F M , F L Aggregation features are obtained after aggregation. F A ;in, F M Depend on F i The result is obtained after extraction via Integrating operation; F H For the reason F M Features generated through a self-attention mechanism that include global structure and long-range dependencies; F L For the reason F M Features generated through a self-attention mechanism that include local details and short-range dependencies; Then F A Denoising features are obtained after denoising. F D Next, F D A two-step refinement process, from coarse to fine, is used to generate refined candidate regions. P ; Finally F D and P Alignment features are obtained after ROI pooling. F ; F Welding defects are identified through classification and regression analysis.
2. The phased array welding defect detection method based on long-dependency feature decoupling according to claim 1, characterized in that, The backbone networks include: ResNet and Carafe FPN; The ultrasound phased array image is input into ResNet, and after processing by ResNet and Carafe FPN, several multi-scale features are obtained. F i .
3. The phased array welding defect detection method based on long-dependency feature decoupling according to claim 1, characterized in that, Separation through feature decoupling model F i ; The feature decoupling model includes: an integrating layer, a channel self-attention layer, and an aggregation layer; The integrating layer is used for... F i Extracted by performing integration operation F M ; Channel self-attention layer is used to F M Generated through self-attention mechanism F H or F L ; The polymer layer is used to... F H , F M , F L Adding them together gives F A .
4. The phased array welding defect detection method based on long-dependency feature decoupling according to claim 3, characterized in that, Channel self-attention layer is used to F M The query vector is generated by performing normalization, convolution, and depthwise convolution in sequence. Q Key vector K Sum value vector V Next, Q After normalization and K The product yields the intermediate vector. qk ,Will qk and V The product is then convolved to obtain F H or F L .
5. The phased array welding defect detection method based on long-dependency feature decoupling according to claim 1, characterized in that, Through feature denoising model F A Denoising; whereby, the feature denoising model is used to denoise F A Intermediate features are obtained by performing point convolution and depth convolution sequentially. F agg Next, F agg Segmented into two parts intermediate features F gate , F con ;Will F gate An attention weight map is generated using an activation function. M ; and will M and F con After gating the operation through point-by-point multiplication, we obtain... F D .
6. The phased array welding defect detection method based on long-dependency feature decoupling according to claim 1, characterized in that, A fine-grained candidate region is generated using an attention-driven region suggestion network. P Among them, the attention-driven region proposal network is used to first... F D Average pooling is used to generate features in both horizontal and vertical dimensions. Then, the features in the two dimensions are concatenated and convolved to obtain the intermediate feature. F e ;Will F e After reweighting and activation function processing, and with F D Dot product yields preliminary candidate regions P C ;Will P C After information augmentation, the offset is generated by mapping. offset Offset offset and P C The inputs are fed into an adaptive deformable convolution module to obtain refined candidate regions. P .
7. The phased array welding defect detection method based on long-dependency feature decoupling according to claim 6, characterized in that, The adaptive deformable convolution module is used to learn offsets. offset The position of the convolution kernel is dynamically adjusted to achieve feature-level alignment between the target's position on the ultrasonic phased array image and the anchor frame.
8. A phased array welding defect detection system based on long-dependency feature decoupling, characterized in that, It uses the phased array welding defect detection method based on long-dependency feature decoupling as described in any one of claims 1 to 7; It includes: The multi-scale feature extraction module is used to extract several multi-scale features from ultrasound phased array images through a backbone network. F i ; Feature decoupling module, which is used to decouple features from F i High-order features with different dependencies are separated from the data. F H Intermediate-order features F M Low-order features F L ; and will F H , F M , F L Aggregation features are obtained after aggregation. F A ;in, F M Depend on F i The result is obtained after extraction via Integrating operation; F H For the reason F M Features generated through a self-attention mechanism that include global structure and long-range dependencies; F L For the reason F M Features generated through a self-attention mechanism that include local details and short-range dependencies; The noise reduction module is used to... F A Denoising features are obtained after denoising. F D ; Candidate region generation module, which is used to... F D A two-step refinement process, from coarse to fine, is used to generate refined candidate regions. P ; The prediction module is used to... F D and P Alignment features are obtained after ROI pooling. F ; F Welding defects are identified through classification and regression analysis.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the phased array welding defect detection method based on long-dependency feature decoupling as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, It includes computer program instructions for causing a computer to execute the phased array welding defect detection method based on long-dependency feature decoupling as described in any one of claims 1 to 7.