Multi-scale feature fusion detection method and system for pressure vessel defect detection
By using a multi-scale feature fusion detection method, the problems of low efficiency and high false detection rate in pressure vessel defect detection are solved, and high-precision positioning of small and slender defects is achieved, which is suitable for automated inspection of pressure vessels.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SPECIAL EQUIP SAFETY SUPERVISION INSPECTION INST OF JIANGSU PROVINCE
- Filing Date
- 2026-04-17
- Publication Date
- 2026-06-19
AI Technical Summary
Existing methods for detecting defects in pressure vessels are inefficient in complex environments, highly dependent on operators, and difficult to achieve large-scale online real-time detection. Furthermore, small and elongated defects are easily weakened or lost in images, and background interference leads to a high false detection rate.
A multi-scale feature fusion detection method is adopted. By introducing a multi-scale component attention mechanism and a dynamic multi-scale feature fusion module, and combining a composite regression loss function that combines SIoU and EIoU, the model's cross-scale modeling ability and fine-grained feature expression ability in complex backgrounds are enhanced, thereby improving the localization stability and regression accuracy of slender targets.
It significantly improves the detection recall and positioning accuracy of small and elongated defects, and realizes efficient automated inspection under lightweight conditions, which is suitable for industrial equipment such as pressure vessels.
Smart Images

Figure CN122243996A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, and in particular to a multi-scale feature fusion detection method and system for pressure vessel defect detection. Background Technology
[0002] Pressure vessels, as key core equipment in fields such as petroleum, chemical, nuclear energy, and aerospace, operate under extreme conditions including high temperature, high pressure, alternating stress, and strong corrosion for extended periods. Under the combined effects of material fatigue, manufacturing defects, and environmental corrosion, their walls inevitably develop cracks, scratches, and corrosion. These defects are often highly concealed and sudden; if not detected and accurately assessed in a timely manner, they can easily lead to serious safety accidents such as media leaks or even explosions.
[0003] Traditional nondestructive testing methods, such as ultrasonic testing, magnetic particle testing, and penetrant testing, while relatively mature, still suffer from limitations such as low testing efficiency, high dependence on operator experience, and difficulty in achieving large-scale online real-time testing. With the rapid development of computer vision and deep learning technologies, object detection methods based on convolutional neural networks have demonstrated significant advantages in the field of industrial visual inspection. In particular, single-stage detection algorithms, represented by the YOLO series, have gradually become the mainstream solution for automated inspection in industrial scenarios due to their end-to-end training mechanism and a good balance between detection accuracy and inference speed.
[0004] However, existing methods still face many challenges in detecting defects on the walls of pressure vessels: First, defects such as cracks and micro-scratches account for a very low percentage of pixels in the image, and their shapes are slender and irregular, making it easy for key information to be weakened or even lost during multi-layer feature downsampling; Second, due to factors such as metal surface reflection, uneven lighting, and weld texture, there are complex background interferences in the image, which can easily lead to an increased false detection rate of the model. Summary of the Invention
[0005] One of the objectives of this invention is to provide a multi-scale feature fusion detection method and system for pressure vessel defect detection. The constructed attention network enhances the model's ability to model defect features across scales in complex contexts by integrating multi-scale component attention mechanisms. By designing a dynamic multi-scale feature fusion module, the expressive power of fine-grained defect features is improved. By constructing a composite regression loss function combining SIoU and EIoU, the localization stability and regression accuracy of slender targets are enhanced. Thus, while maintaining low computational overhead, the detection recall and localization accuracy of small and slender defects are significantly improved.
[0006] This invention provides a multi-scale feature fusion detection method for pressure vessel defect detection, comprising: Acquire surface or X-ray images of the pressure vessel to be inspected; Surface images or X-ray images are input into a defect detection network for detection. The defect location and category information output by the defect detection network are used as the detection results for the pressure vessel. The construction of the defect detection network includes: A defect detection network is constructed based on the target detection framework; the defect detection network includes a backbone network, a neck network, and a detection head. A multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, thereby enhancing the model's ability to model defect features across scales in complex backgrounds and outputting an enhanced multi-scale feature map. In the backbone network and / or neck network, a dynamic multi-scale feature fusion module is configured. The dynamic multi-scale feature fusion module dynamically fuses multi-scale features through an adaptive weight allocation strategy to enhance the expressive power of fine-grained defect features. A composite bounding box regression loss function combining SIoU loss and EIoU loss is constructed, and a collaborative optimization mechanism of angle constraint and scale shape matching is introduced to perform regression constraints on the defect bounding box output by the detection head. Output the defect location and category information after regression optimization by the defect detection network and the composite bounding box regression loss function.
[0007] Preferably, a multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, enhancing the model's ability to model defect features across scales in complex backgrounds and outputting enhanced multi-scale feature maps, including: Local basic spatial features of the input feature map are extracted using a 5×5 depthwise separable convolution. The local basic spatial features are input into three parallel strip convolution branches, and multi-scale feature extraction is performed using strip convolution kernels of 1×7 and 7×1, 1×11 and 11×1, and 1×21 and 21×1, respectively. The outputs of the three branches are aggregated with the local basic spatial features, and then a spatial attention weight map is generated by 1×1 convolution and sigmoid activation function. The spatial attention weight map is multiplied pixel-by-pixel with the original input feature map to obtain the enhanced features.
[0008] Preferably, the dynamic multi-scale feature fusion module includes: The dynamic tangent activation unit dynamically adjusts the slope of the nonlinear mapping through a learnable scaling factor; The region attention operator is used to divide the feature map into multiple sub-regions and calculate the autocorrelation within each region, capturing subtle defects with long-range dependencies. The multi-path adaptive convolutional architecture processes features in parallel through depthwise separable convolutional branches with kernel sizes of 3×3, 5×5 and 7×7, and fuses them based on residual connections. The dual-frequency feedforward network unit utilizes frequency gating to achieve coordinated enhancement of high and low frequency information of features.
[0009] Preferably, the composite bounding box regression loss function balances the contributions of SIoU loss and EIoU loss through the hyperparameter λ, satisfying: ; in, This represents the regression loss function for the composite bounding box; Indicates SIoU loss; λ represents the EIoU loss; the value range of λ is [0,1].
[0010] Preferably, SIoU loss introduces angle penalty cost. The calculation formula is as follows: ; in, The height difference between the center points of the predicted bounding box and the ground truth bounding box. Let be the Euclidean distance between the centers of the two points.
[0011] Preferably, the EIoU loss introduces independent length and width constraint logic to satisfy:
[0012] in, The normalization penalty term represents the distance between the center points of the predicted bounding box and the ground truth bounding box; and These represent the normalized differences between the predicted bounding box and the ground truth bounding box in the width and height dimensions, respectively.
[0013] Preferably, the target detection framework includes the YOLO series of networks.
[0014] This invention also provides a multi-scale feature fusion detection system for pressure vessel defect detection, comprising: The acquisition module is used to acquire surface images or X-ray images of the pressure vessel to be inspected; The detection module is used to input surface images or X-ray images into the defect detection network for detection; The output module is used to take the defect location and category information output by the defect detection network as the detection result for the pressure vessel. The construction of the defect detection network includes: A defect detection network is constructed based on the target detection framework; the defect detection network includes a backbone network, a neck network, and a detection head. A multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, thereby enhancing the model's ability to model defect features across scales in complex backgrounds and outputting an enhanced multi-scale feature map. In the backbone network and / or neck network, a dynamic multi-scale feature fusion module is configured. The dynamic multi-scale feature fusion module dynamically fuses multi-scale features through an adaptive weight allocation strategy to enhance the expressive power of fine-grained defect features. A composite bounding box regression loss function combining SIoU loss and EIoU loss is constructed, and a collaborative optimization mechanism of angle constraint and scale shape matching is introduced to perform regression constraints on the defect bounding box output by the detection head. Output the defect location and category information after regression optimization by the defect detection network and the composite bounding box regression loss function.
[0015] Preferably, the dynamic multi-scale feature fusion module is deployed in the deep layers of the backbone network and / or the path aggregation structure of the neck network to replace the original standard convolutional module.
[0016] Preferably, the composite bounding box regression loss function balances the contributions of SIoU loss and EIoU loss through the hyperparameter λ, satisfying: ; in, This represents the regression loss function for the composite bounding box; Indicates SIoU loss; λ represents the EIoU loss; the value range of λ is [0,1].
[0017] The beneficial effects of this invention are as follows: By integrating a multi-scale component attention mechanism, this invention effectively enhances the model's ability to model defect features across scales in complex contexts. Furthermore, by designing a dynamic multi-scale feature fusion module, it improves the expressive power of fine-grained defect features. Finally, by constructing a composite regression loss function combining SIoU and EIoU, and introducing a collaborative optimization mechanism of angle constraints and scale-shape matching, it significantly enhances the localization stability and regression accuracy of slender targets. While maintaining low computational overhead, this invention significantly improves the detection recall and localization accuracy of small and slender defects with an aspect ratio greater than or equal to 3, or a length greater than 80 pixels and a width less than 20 pixels, providing a practically feasible technical solution for automated defect detection in industrial equipment such as pressure vessels.
[0018] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.
[0019] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of a multi-scale feature fusion detection method for pressure vessel defect detection in an embodiment of the present invention; Figure 2 This is a schematic diagram of the A2M-DetNet network architecture in an embodiment of the present invention; Figure 3 This is a structural diagram of the SegNext attention mechanism in an embodiment of the present invention; Figure 4 This is a structural diagram of the DMF-Block in an embodiment of the present invention; Figure 5 This is a comparison chart of detection results on the NEU-DET dataset in this embodiment of the invention; Figure 6 This is a comparison chart of detection results on the GDXray dataset in an embodiment of the present invention. Detailed Implementation
[0021] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0022] This invention provides a multi-scale feature fusion detection method for pressure vessel defect detection, such as... Figure 1 As shown, it includes: Step S1: Obtain a surface image or X-ray image of the pressure vessel to be inspected; Step S2: Input the surface image or X-ray image into the defect detection network for detection; Step S3: Use the defect location and category information output by the defect detection network as the detection result for the pressure vessel; The construction of the defect detection network includes: A defect detection network is constructed based on the target detection framework; the defect detection network includes a backbone network, a neck network, and a detection head. The target detection framework includes: YOLO series networks; YOLOv12 is preferred; the specific architecture of the defect detection network is as follows: Figure 2 As shown; A multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, thereby enhancing the model's ability to model defect features across scales in complex backgrounds and outputting an enhanced multi-scale feature map. In the backbone network and / or neck network, a dynamic multi-scale feature fusion module is configured. The dynamic multi-scale feature fusion module dynamically fuses multi-scale features through an adaptive weight allocation strategy to enhance the expressive power of fine-grained defect features. A composite bounding box regression loss function combining SIoU loss and EIoU loss is constructed, and a collaborative optimization mechanism of angle constraint and scale shape matching is introduced to perform regression constraints on the defect bounding box output by the detection head. Output the defect location and category information after regression optimization by the defect detection network and the composite bounding box regression loss function.
[0023] Among them, such as Figure 3 As shown, a multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, enhancing the model's ability to model defect features across scales in complex backgrounds and outputting enhanced multi-scale feature maps, including: Local basic spatial features of the input feature map X are extracted using a 5×5 depthwise separable convolution. : ; Will Input three parallel bar convolution branches, and use bar convolution kernels of 1×7 and 7×1, 1×11 and 11×1, and 1×21 and 21×1 respectively to extract features at multiple scales. Connect the outputs of the three branches with... The data is aggregated and then subjected to a 1×1 convolution followed by a sigmoid activation function to generate a spatial attention weight map A: ; In the formula, Indicates the first The output of each bar convolution branch; The spatial attention weight map A is multiplied pixel-by-pixel with the original input feature map X to obtain the enhanced feature Y: ; In the formula, Indicates the confidence level of attention allocation; By using multi-branch strip convolution to approximate a large receptive field, it exhibits higher response sensitivity to slender crack-like structures, effectively mitigating the false detection problem caused by background interference.
[0024] The dynamic multi-scale feature fusion module includes: The dynamic tangent activation unit dynamically adjusts the slope of the nonlinear mapping using a learnable scaling factor α. ; In the formula, This represents the output feature map after dynamic tangent activation; Represents the hyperbolic tangent function; Indicates the scaling factor; Represents the original input feature map; The region attention operator is used to divide a feature map into multiple sub-regions and calculate the autocorrelation within each region. Its attention weights are calculated according to the following conditions: ; In the formula, This represents the output of the region self-attention. , , This represents the query, key, and value vectors after the region partitioning. This represents the similarity matrix between feature points within the computational region, used to capture long-range spatial dependencies. It is the scaling factor, where The dimension of the number of input channels is used to prevent the softmax gradient from vanishing due to an excessively large dot product; A multi-path adaptive convolutional architecture processes features in parallel through depthwise separable convolutional branches with kernel sizes of 3×3, 5×5, and 7×7, and fuses them based on residual connections. ; In the formula, Represents a pixel-by-pixel convolutional layer. Indicates the kernel size as Depth-wise convolution, through parallel... , , Branching enables multi-scale receptive fields; Dual-frequency feedforward network units utilize frequency gating to achieve coordinated enhancement of high and low frequency information of features: ; In the formula, This represents the frequency-gated function, which generates weights between 0 and 1 through global average pooling and non-linear mapping. and These represent the high-frequency details and low-frequency background components extracted from the feature map, respectively. like Figure 4 As shown, the Dynamic Multi-Scale Feature Fusion Module (DMF-Block) adopts a deep residual nesting design, which can adaptively select the most suitable receptive field according to the defect morphology at different levels, effectively avoiding the feature loss problem that may occur when the traditional FPN structure processes drastic scale changes.
[0025] The composite bounding box regression loss function balances the contributions of SIoU loss and EIoU loss through the hyperparameter λ, satisfying the following: ; in, This represents the regression loss function for the composite bounding box; Indicates SIoU loss; λ represents the EIoU loss; the value range of λ is [0,1].
[0026] SIoU loss introduces angle penalty cost The calculation formula is as follows: ; in, The height difference between the center points of the predicted bounding box and the ground truth bounding box. The distance between the centers of the two points is the Euclidean distance; this mechanism prioritizes aligning the prediction boxes in terms of angle, reducing oscillations in the early stages of regression.
[0027] EIoU loss introduces independent length and width constraint logic to satisfy:
[0028] in, The normalization penalty term represents the distance between the center points of the predicted bounding box and the ground truth bounding box; and These represent the normalized differences between the predicted bounding box and the ground truth bounding box in the width and height dimensions, respectively, thus enabling independent constraints on the width and height dimensions.
[0029] The model utilizes SIoU for rapid orientation alignment in the early stages of training, and relies on EIoU for fine-tuning in the mid-to-late stages. This ensures convergence efficiency while improving the stability and accuracy of positioning slender targets.
[0030] This invention presents a multi-scale feature fusion detection method for pressure vessel defect detection, employing an end-to-end defect detection network built on the YOLOv12 framework. In the feature extraction stage, the backbone network acquires multi-scale representations through hierarchical downsampling and utilizes Multi-Scale Component Attention (MSCA) in the SegNext attention mechanism to enhance the joint modeling capability of local fine-grained structures and global contextual information. To address the issue of small defects being easily submerged in deep features, a dynamic multi-scale feature fusion module (DMF-Block) is designed. Through region attention, multi-path adaptive convolution, and dual-frequency feature enhancement, adaptive weighted fusion of multi-scale features is achieved. For bounding box regression, a composite loss function combining SIoU and EIoU is constructed. Through collaborative optimization of angular constraints and independent length and width constraints, the localization stability of slender targets is improved. Through the collaborative design of multi-scale attention modeling, dynamic feature fusion, and regression constraint optimization, the model achieves stable representation and accurate localization of fine-grained defects under lightweight conditions, achieving a balance between accuracy and efficiency.
[0031] After training under the above conditions, the algorithm performance is shown in Tables 1 and 2: Table 1. Quantization comparison on the NEU-Det dataset Table 2. Quantization comparison on the GDXray dataset The detection performance on the NEU-DET dataset and the detection performance on the GDXray dataset are as follows: Figure 5 , Figure 6 As shown; In summary, compared with the benchmark algorithm, this invention demonstrates superior performance in terms of accuracy, speed, number of parameters, and computational cost. The model without model structure simplification achieves an excellent mAP50 accuracy.
[0032] The results of the simplified ablation experiments based on the model are shown in Tables 3 and 4: Table 3 Quantitative Analysis of Ablation Experiments Table 4 Loss Function Weight Settings Ablation Table Ablation experiments validated the effectiveness of each core component of A2MDet: using YOLOv12n as a benchmark, the SegNext attention module improved mAP50 from 71.0% to 73.3%, the Dynamic Multi-Scale Feature Fusion (DMF) module improved mAP95 to 39.1%, and the combination of the three achieved the optimal performance of 75.1%. Regarding regression loss, when SIoU and EIoU were configured with a balanced weight of 0.5:0.5, the model's P, R, mAP50, and mAP95 all reached their peak values, indicating that a single geometric constraint is insufficient to account for irregular defects.
[0033] In practical inspection scenarios, for pressure vessels, due to their manufacturing processes, the locations of small and elongated defects are mainly distributed within limited areas such as the connection regions between components. Inspecting images of all locations on the pressure vessel is unnecessary and time-consuming. Therefore, in one embodiment, surface images or X-ray images are input into a defect detection network for inspection, including: Determine the location of the area on the pressure vessel corresponding to the surface image or X-ray image; Determine the risk value of the area's location; When the risk value is greater than the preset threshold (any value between 0 and 100, or zero), the corresponding defect detection network is invoked for detection based on the location of the area. In this embodiment, the surface image or ray image is a region image segmented from the original captured image; the segmentation is based on a pre-configured surface segmentation map of the pressure vessel, that is, the surface of the pressure vessel is divided into multiple region units in the surface segmentation map, and each region unit is configured with a risk value. Determining the location of the area on the pressure vessel corresponding to the surface image or ray image includes: reconstructing a panoramic image of the pressure vessel from the surface image or ray image; and mapping the panoramic image to the corresponding 3D model of the pressure vessel to determine the location of the area on the pressure vessel corresponding to each surface image or ray image used to construct the panoramic image. The specific configuration steps for the risk values corresponding to each regional unit are as follows; The surface segmentation map of the pressure vessel is sent to a preset number of expert terminals, and the initial configuration of the risk value of each region unit is received from each expert terminal; the initial configuration is averaged to obtain the first parameter value of each region unit; the minimum value of the initial configuration is used as the minimum threshold; and the maximum value of the initial configuration is used as the maximum threshold. Acquire historical inspection and / or usage data of the pressure vessel; filter the historical inspection and / or usage data to extract abnormal data as basic analysis data; process the basic analysis data based on the surface segmentation map to determine the unit data corresponding to each region unit; determine the second parameter value of each region unit based on the unit data corresponding to each region unit and the pre-configured risk analysis table; wherein, the risk analysis table is pre-configured, and the number of abnormal unit data in the table corresponds one-to-one with the second parameter value and is directly proportional to it; The sum of the first and second parameter values is used as the risk value configured for the corresponding area unit. In actual use, the first parameter value is also corrected based on specific detection and usage results. The correction is achieved through a pre-configured correction step size and correction time interval. That is, at each correction time interval, the cell data of the region is statistically analyzed for abnormal data. When the value is zero, the first parameter value is reduced by one correction step size until it is reduced to the minimum threshold. When the value is not zero, the first parameter value is increased by one correction step size until it is increased to the maximum threshold. Assuming that the maximum value of the configurable first parameter value is 100, the correction compensation can be configured to any value from 0.1 to 2. The correction time interval can be configured to any value from 1 hour to 1 month. In this embodiment, training a defect detection network for each region unit of the pressure vessel can achieve targeted detection, thereby ensuring the accuracy and effectiveness of the defect detection network.
[0034] For regions with risk values less than or equal to a preset threshold, random sampling is used to select units for the defect detection network. The defect detection network used can be determined through the following steps: Determine the distance between a region unit and other region units with risk values greater than a preset threshold (i.e., the minimum number of region units between two region units in the panoramic image). Based on the distance and a preset first selection value table, determine the first selection value; Calculate the similarity between the characterization parameter set of a region unit and the characterization parameter sets of other region units whose risk values are greater than a preset threshold; Based on similarity and a preset second selection value table, determine the second selection value; The defect detection network is selected from the regions where the sum of the first and second selection values is greater than a preset threshold.
[0035] The first selection value table is pre-constructed based on analysis. During the analysis and construction, the greater the distance, the smaller the first selection value. The second selection value table is also pre-constructed. The higher the similarity in the table, the larger the second selection value. The parameters in the parameter set include: parameters indicating which part of the pressure vessel the region unit is located in (body, valve, or connection area between valve and body), parameters indicating the distance from the boundary of the location, etc.
[0036] This invention also provides a multi-scale feature fusion detection system for pressure vessel defect detection, comprising: The acquisition module is used to acquire surface images or X-ray images of the pressure vessel to be inspected; The detection module is used to input surface images or X-ray images into the defect detection network for detection; The output module is used to take the defect location and category information output by the defect detection network as the detection result for the pressure vessel. The construction of the defect detection network includes: A defect detection network is constructed based on the target detection framework; the defect detection network includes a backbone network, a neck network, and a detection head. A multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, thereby enhancing the model's ability to model defect features across scales in complex backgrounds and outputting an enhanced multi-scale feature map. In the backbone network and / or neck network, a dynamic multi-scale feature fusion module is configured. The dynamic multi-scale feature fusion module dynamically fuses multi-scale features through an adaptive weight allocation strategy to enhance the expressive power of fine-grained defect features. A composite bounding box regression loss function combining SIoU loss and EIoU loss is constructed, and a collaborative optimization mechanism of angle constraint and scale shape matching is introduced to perform regression constraints on the defect bounding box output by the detection head. Output the defect location and category information after regression optimization by the defect detection network and the composite bounding box regression loss function.
[0037] The dynamic multi-scale feature fusion module is deployed in the path aggregation structure of the deep layers of the backbone network and / or the neck network to replace the original standard convolutional module.
[0038] The composite bounding box regression loss function balances the contributions of SIoU loss and EIoU loss through the hyperparameter λ, satisfying the following: ; in, This represents the regression loss function for the composite bounding box; Indicates SIoU loss; λ represents the EIoU loss; the value range of λ is [0,1].
[0039] In practical inspection scenarios, for pressure vessels, due to their manufacturing process, the locations of small and elongated defects are mainly distributed in limited areas such as the connection areas between components. Inspecting images of all locations on the pressure vessel is unnecessary and wastes inspection time. Therefore, in one embodiment, the inspection module includes: A location determination unit is used to determine the location of the area on the pressure vessel corresponding to a surface image or a ray image; Risk value determination unit, used to determine the risk value of the area location; The detection unit is used to call the corresponding defect detection network for detection based on the region location when the risk value is greater than a preset threshold (any value between 0 and 100, which can be zero). In this embodiment, the surface image or ray image is a region image segmented from the original captured image; the segmentation is based on a pre-configured surface segmentation map of the pressure vessel, that is, the surface of the pressure vessel is divided into multiple region units in the surface segmentation map, and each region unit is configured with a risk value. The location determination unit determines the location of the area on the pressure vessel corresponding to the surface image or ray image, and performs the following operations: reconstructs a panoramic image of the pressure vessel from the surface image or ray image; and maps the panoramic image to the corresponding 3D model of the pressure vessel to determine the location of the area on the pressure vessel corresponding to each surface image or ray image in the constructed panoramic image. In addition, the present invention also provides a multi-scale feature fusion detection system for pressure vessel defect detection, including: a risk value configuration module, wherein the specific configuration steps for configuring the risk value corresponding to each region unit are as follows; The surface segmentation map of the pressure vessel is sent to a preset number of expert terminals, and the initial configuration of the risk value of each region unit is received from each expert terminal; the initial configuration is averaged to obtain the first parameter value of each region unit; the minimum value of the initial configuration is used as the minimum threshold; and the maximum value of the initial configuration is used as the maximum threshold. Acquire historical inspection and / or usage data of the pressure vessel; filter the historical inspection and / or usage data to extract abnormal data as basic analysis data; process the basic analysis data based on the surface segmentation map to determine the unit data corresponding to each region unit; determine the second parameter value of each region unit based on the unit data corresponding to each region unit and the pre-configured risk analysis table; wherein, the risk analysis table is pre-configured, and the number of abnormal unit data in the table corresponds one-to-one with the second parameter value and is directly proportional to it; The sum of the first and second parameter values is used as the risk value configured for the corresponding area unit. In actual use, the first parameter value is also corrected based on specific detection and usage results. The correction is achieved through a pre-configured correction step size and correction time interval. That is, at each correction time interval, the cell data of the region is statistically analyzed for abnormal data. When the value is zero, the first parameter value is reduced by one correction step size until it is reduced to the minimum threshold. When the value is not zero, the first parameter value is increased by one correction step size until it is increased to the maximum threshold. Assuming that the maximum value of the configurable first parameter value is 100, the correction compensation can be configured to any value from 0.1 to 2. The correction time interval can be configured to any value from 1 hour to 1 month. In this embodiment, training a defect detection network for each region unit of the pressure vessel can achieve targeted detection, thereby ensuring the accuracy and effectiveness of the defect detection network.
[0040] For regions with risk values less than or equal to a preset threshold, random sampling is used to select these regions for detection by the defect detection network. To enable the detection of these randomly sampled regions, the multi-scale feature fusion detection system for pressure vessel defect detection also includes a network model determination module. This module determines the defect detection network used for detecting the randomly sampled regions, which can be achieved through the following steps: Determine the distance between a region unit and other region units with risk values greater than a preset threshold (i.e., the minimum number of region units between two region units in the panoramic image). Based on the distance and a preset first selection value table, determine the first selection value; Calculate the similarity between the characterization parameter set of a region unit and the characterization parameter sets of other region units whose risk values are greater than a preset threshold; Based on similarity and a preset second selection value table, determine the second selection value; The defect detection network is selected from the regions where the sum of the first and second selection values is greater than a preset threshold.
[0041] The first selection value table is pre-constructed based on analysis. During the analysis and construction, the greater the distance, the smaller the first selection value. The second selection value table is also pre-constructed. The higher the similarity in the table, the larger the second selection value. The parameters in the parameter set include: parameters indicating which part of the pressure vessel the region unit is located in (body, valve, or connection area between valve and body), parameters indicating the distance from the boundary of the location, etc.
[0042] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A multi-scale feature fusion detection method for pressure vessel defect detection, characterized in that, include: Acquire surface or X-ray images of the pressure vessel to be inspected; Surface images or X-ray images are input into a defect detection network for detection. The defect location and category information output by the defect detection network are used as the detection results for the pressure vessel. The construction of the defect detection network includes: A defect detection network is constructed based on the target detection framework; the defect detection network includes a backbone network, a neck network, and a detection head. A multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, thereby enhancing the model's ability to model defect features across scales in complex backgrounds and outputting an enhanced multi-scale feature map. In the backbone network and / or neck network, a dynamic multi-scale feature fusion module is configured. The dynamic multi-scale feature fusion module dynamically fuses multi-scale features through an adaptive weight allocation strategy to enhance the expressive power of fine-grained defect features. A composite bounding box regression loss function combining SIoU loss and EIoU loss is constructed, and a collaborative optimization mechanism of angle constraint and scale shape matching is introduced to perform regression constraints on the defect bounding box output by the detection head. Output the defect location and category information after regression optimization by the defect detection network and the composite bounding box regression loss function.
2. The multi-scale feature fusion detection method for pressure vessel defect detection as described in claim 1, characterized in that, A multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, enhancing the model's ability to model defect features across scales in complex backgrounds and outputting enhanced multi-scale feature maps, including: Local basic spatial features of the input feature map are extracted using a 5×5 depthwise separable convolution. The local basic spatial features are input into three parallel strip convolution branches, and multi-scale feature extraction is performed using strip convolution kernels of 1×7 and 7×1, 1×11 and 11×1, and 1×21 and 21×1, respectively. The outputs of the three branches are aggregated with the local basic spatial features, and then a spatial attention weight map is generated by 1×1 convolution and sigmoid activation function. The spatial attention weight map is multiplied pixel-by-pixel with the original input feature map to obtain the enhanced features.
3. The multi-scale feature fusion detection method for pressure vessel defect detection as described in claim 1, characterized in that, The dynamic multi-scale feature fusion module includes: The dynamic tangent activation unit dynamically adjusts the slope of the nonlinear mapping through a learnable scaling factor; The region attention operator is used to divide the feature map into multiple sub-regions and calculate the autocorrelation within each region, capturing subtle defects with long-range dependencies. The multi-path adaptive convolutional architecture processes features in parallel through depthwise separable convolutional branches with kernel sizes of 3×3, 5×5 and 7×7, and fuses them based on residual connections. The dual-frequency feedforward network unit utilizes frequency gating to achieve coordinated enhancement of high and low frequency information of features.
4. The multi-scale feature fusion detection method for pressure vessel defect detection as described in claim 1, characterized in that, The composite bounding box regression loss function balances the contributions of SIoU loss and EIoU loss through the hyperparameter λ, satisfying: ; in, This represents the regression loss function for the composite bounding box; Indicates SIoU loss; λ represents the EIoU loss; the value range of λ is [0,1].
5. The multi-scale feature fusion detection method for pressure vessel defect detection as described in claim 4, characterized in that, SIoU loss introduces angle penalty cost The calculation formula is as follows: ; in, Indicates the cost of penalty from the perspective of angle; The height difference between the center points of the predicted bounding box and the ground truth bounding box. Let be the Euclidean distance between the centers of the two points.
6. The multi-scale feature fusion detection method for pressure vessel defect detection as described in claim 4, characterized in that, EIoU loss introduces independent length and width constraint logic to satisfy: ; in, The normalization penalty term represents the distance between the center points of the predicted bounding box and the ground truth bounding box; and These represent the normalized differences between the predicted bounding box and the ground truth bounding box in the width and height dimensions, respectively.
7. The multi-scale feature fusion detection method for pressure vessel defect detection as described in claim 1, characterized in that, The object detection framework includes the YOLO series of networks.
8. A multi-scale feature fusion detection system for pressure vessel defect detection, characterized in that, include: The acquisition module is used to acquire surface images or X-ray images of the pressure vessel to be inspected; The detection module is used to input surface images or X-ray images into the defect detection network for detection; The output module is used to take the defect location and category information output by the defect detection network as the detection result for the pressure vessel. The construction of the defect detection network includes: A defect detection network is constructed based on the target detection framework; the defect detection network includes a backbone network, a neck network, and a detection head. A multi-scale component attention mechanism is introduced into the backbone network to process the input pressure vessel surface image or ray image, thereby enhancing the model's ability to model defect features across scales in complex backgrounds and outputting an enhanced multi-scale feature map. In the backbone network and / or neck network, a dynamic multi-scale feature fusion module is configured. The dynamic multi-scale feature fusion module dynamically fuses multi-scale features through an adaptive weight allocation strategy to enhance the expressive power of fine-grained defect features. A composite bounding box regression loss function combining SIoU loss and EIoU loss is constructed, and a collaborative optimization mechanism of angle constraint and scale shape matching is introduced to perform regression constraints on the defect bounding box output by the detection head. Output the defect location and category information after regression optimization by the defect detection network and the composite bounding box regression loss function.
9. The multi-scale feature fusion detection system for pressure vessel defect detection as described in claim 8, characterized in that, The dynamic multi-scale feature fusion module is deployed in the deep layers of the backbone network and / or the path aggregation structure of the neck network to replace the original standard convolutional module.
10. The multi-scale feature fusion detection system for pressure vessel defect detection as described in claim 8, characterized in that, The composite bounding box regression loss function balances the contributions of SIoU loss and EIoU loss through the hyperparameter λ, satisfying: ; in, This represents the regression loss function for the composite bounding box; Indicates SIoU loss; λ represents the EIoU loss; the value range of λ is [0,1].