A method and system for detecting weld defects in ultra-lightweight natural gas pipelines
By building the MSLE-YOLO model, combining data augmentation and ultra-lightweight network architecture, the problems of data set imbalance and small target recognition in weld defect detection are solved, and efficient and accurate weld defect detection is achieved, suitable for edge equipment.
Patent Information
- Application Number
- CN202510428376.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-08
AI Technical Summary
The category imbalance of weld defect datasets leads to overfitting, making it difficult to identify small targets, and the large amount of existing model parameters cannot be run efficiently on edge devices.
The MSLE-YOLO model is built, using the Mobilenetv3 BLOCK_SCSA module, P2 small target layer and Inner_CIoU loss function, combined with data enhancement technology, including random data enhancement and picture enhancement, to build an ultra-lightweight network architecture, and optimize the training process.
It improves the accuracy and robustness of weld defect detection, reduces the number of model parameters and calculation complexity, and enables it to be applied in real time on edge devices, reducing the rate of missed and false alarms.
Smart Images

Figure CN119942096B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural gas pipeline detection. Specifically, it relates to an ultra-lightweight method and system for detecting weld defects in natural gas pipelines. Background Art
[0002] In natural gas pipelines, the weld, as the connecting part of the pipeline, bears great internal and external pressures. Defects in the weld may affect the fatigue strength and corrosion resistance of the welding material, thus directly affecting the safety and operation stability of the pipeline. To avoid major accidents such as natural gas leakage caused by weld defects, resulting in property losses and casualties, it is of great significance to detect weld defects. Traditional weld defect detection generally uses non-destructive testing methods, including various detection methods such as X-rays, traditional ultrasonic waves, TOFD (Time of Flight Diffraction) ultrasonic diffraction time difference method, eddy current, and magnetic powder. Although these methods can accurately identify various types of weld defects, their discrimination process still relies on manual evaluation, so there are cases of missed and misjudgments.
[0003] With the continuous development of computer vision technology, object detection technology based on deep learning has been widely used in the field of weld defect detection. The deep learning model automatically represents and learns the high-dimensional discriminant features of the weld through a deep neural network, which can effectively eliminate the influence of subjective deviation on the detection results, thus significantly improving the detection efficiency and accuracy. Although important progress has been made in weld defect detection by deep learning, there are still many problems as follows: (1) The weld defect dataset often has the problem of class imbalance, that is, the difference in the number of normal welds and defective welds, resulting in insufficient learning of the deep learning model for defect classes and affecting the recognition ability of rare or small defects; (2) Weld defects usually appear as tiny objects, such as microcracks and pores. These small objects are often difficult to clearly identify due to low resolution and background noise. Therefore, existing weld defect detection models often have problems with decreased accuracy when dealing with small objects; (3) Existing weld defect detection models are usually based on deep convolutional neural networks or large-scale pre-trained models, which require a large amount of computing resources and storage space and are difficult to operate efficiently on edge devices with limited resources, thus restricting the practical application of real-time detection. Summary of the Invention
[0004] The technical problems to be solved by the present invention are:
[0005] To solve the problems of overfitting caused by class imbalance in the weld defect dataset; being difficult to effectively identify small objects, resulting in low accuracy and high false negative / false positive rates; and the large number of model parameters making it impossible to be deployed on edge detection devices.
[0006] The technical solutions adopted by the present invention to solve the above technical problems are:
[0007] The present invention provides a method for detecting weld defects of ultra-lightweight natural gas pipelines, comprising the following steps:
[0008] S100. Construct a dataset, obtain the public dataset steeltube, perform random data augmentation on the dataset to complete the expansion, and then process the dataset through image enhancement;
[0009] S200. Construct an ultra-lightweight network model MSLE-YOLO, including constructing a multi-semantic difference mitigation module SCSA based on the progressive channel self-attention mechanism, constructing a four-head enhanced fast pyramid architecture network EFPAN improved by adding a P2 small target layer, and using the Inner_CIoU loss function as the optimization target of the network;
[0010] S300. Use the ultra-lightweight network model MSLE-YOLO constructed in step S200 for training. During the training process, regularly use the validation set to evaluate the model, adjust the hyperparameters of the model to ensure the stability of the training process and prevent overfitting, and use the trained ultra-lightweight network model MSLE-YOLO to detect weld defects of natural gas pipelines.
[0011] Further, in step S100, the methods of random data augmentation include horizontal flipping, vertical flipping, random rotation, random translation, and scaling.
[0012] Further, in step S100, the methods of image enhancement include blur effect, median blur, and contrast-limited adaptive histogram equalization.
[0013] Further, in step S200, it includes
[0014] S210. Construct a multi-semantic difference mitigation module SCSA based on the progressive channel self-attention mechanism, and process the feature dependence relationships of space and channels through the synergistic effect of spatial attention and channel attention;
[0015] It includes constructing a backbone network using the Mobilenetv3 BLOCK module, including two 1*1 pointwise convolutions and one K*K depth convolution; wherein, the Mobilenetv3 BLOCK module is set as an inverted bottleneck structure, and by combining the SCSA attention module, the number of channels is expanded to enhance the feature extraction ability; the SCSA module in it extracts multi-semantic spatial information through the shared multi-semantic spatial attention SMSA, spatial decoupling, and lightweight convolution to generate a spatial attention map; then uses the progressive channel self-attention PCSA spatial prior information to calculate the channel self-attention, and gradually compresses and convolves to generate an effective channel attention map;
[0016] The calculation formula is as follows:
[0017] SMSA Feature Decomposition:
[0018] ;
[0019] ;
[0020] SMSA Feature Extraction:
[0021] ;
[0022] ;
[0023] PCSA Attention Weight Calculation:
[0024] ;
[0025] The overall calculation process of the Mobilenetv3 BLOCK_SCSA module is as follows:
[0026] ;
[0027] Among them, T represents the input feature map, represents the i-th sub-feature, H represents the height dimension, W represents the width dimension, C represents the number of channels, K represents the number of sub-features, Attn represents the attention mechanism function, GN represents group normalization, Concat is used to splice feature maps of different dimensions, Sigmoid and Softmax represent activation functions, Q represents the query vector, K represents the key vector, V represents the value vector, D represents the scaling factor, Conv represents point convolution, and DW represents depthwise separable convolution.
[0028] Furthermore, in step S200, it also includes,
[0029] S220. Design a four-head enhanced fast pyramid architecture network EFPAN with an improved P2 small target layer, and add a super-lightweight dynamic upsampling module DySample to the EFPAN framework to construct an enhanced fast pyramid architecture DyS-EFPAN incorporating dynamic upsampling.
[0030] Furthermore, in step S200, it also includes,
[0031] S230. Adopt the Inner_CIoU loss function as the optimization target of the network. The Inner_CIoU loss function calculates the IoU intersection over union loss by introducing an auxiliary bounding box, where the size of the auxiliary box is controlled by a scale factor; the calculation formula is as follows:
[0032] ;
[0033] ;
[0034] ;
[0035] ;
[0036] ;
[0037] ;
[0038] wherein, represents the Inner_CIoU loss function, and b represent the ground truth box and the predicted box respectively, r and l represent the right boundary and the left boundary of the box respectively; t and b represent the top boundary and the bottom boundary of the box respectively, in represents the overlapping part of the ground truth box and the predicted box, un represents the total coverage area of the ground truth box and the predicted box, ratio represents the scale factor, and represent the height and width of the ground truth box respectively, h and w represent the height and width of the predicted box respectively, p represents the distance between the center point of the anchor box and the center point of the predicted box, c represents the diagonal length of the minimum bounding rectangle covering the anchor box and the ground truth box, a represents a positive trade-off parameter for balancing the weights of different loss terms, v is used to measure the aspect ratio consistency between the predicted box and the ground truth box.
[0039] A super-lightweight natural gas pipeline weld defect detection system, which has program modules corresponding to the above steps and executes the steps in the above super-lightweight natural gas pipeline weld defect detection method when running.
[0040] A computer-readable storage medium storing a computer program configured to implement the steps of the super-lightweight natural gas pipeline weld defect detection method when called by a processor.
[0041] Compared with the prior art, the beneficial effects of the present invention are:
[0042] (1)The present invention designs the MSLE-YOLO model. By introducing the Mobilenetv3 BLOCK_SCSA module, the P2 small target layer, and the Inner_CIoU loss function, the detection accuracy of weld defects is effectively improved. Especially in the aspect of small target detection, it can more accurately detect tiny weld defects.
[0043] (2)The present invention designs an ultra-lightweight network architecture, including the Mobilenetv3 BLOCK module with an inverted bottleneck structure and a channel expansion strategy, and the EFPAN enhanced fast pyramid architecture with fewer convolutional layers, a lower number of channels, and combined with the DySample dynamic upsampling module. Compared with the existing YOLOv8 model, the number of parameters of MSLE-YOLO is reduced by 56.3%, and the GFLOPS is reduced by 18.5%. Therefore, the present invention can operate efficiently on edge devices with limited computing resources. This enables the real-time application of weld defect detection at the natural gas pipeline site, not only improving the detection efficiency but also reducing the hardware requirements, with strong practicality and commercial value.
[0044] (3)The present invention optimizes the loss function (Inner_CIoU), accelerates the convergence speed of the network, and improves the positioning accuracy. Compared with the traditional CIoU loss function, Inner_CIoU performs more excellently when dealing with targets of different scales, effectively improving the training efficiency and the robustness of the network.
[0045] (4)The present invention adopts a multi-level data augmentation technique, including blur effect, median blur, and CLAHE, which enhances the adaptability of the model under different environmental conditions. In addition, the experimental results show that MSLE-YOLO performs excellently in terms of accuracy and recall rate, effectively reducing the phenomena of missed detection and false detection, and ensuring the reliability of the detection results. Description of the Drawings
[0046] Figure 1 These are pictures of steel pipe weld defects of eight categories in the publicly available dataset steeltube in the embodiment of the present invention. Among them, (a) is air-hole, (b) is bite-edge, (c) is broken-arc, (d) is crack, (e) is overlap, (f) is slag-inclusion, (g) is unfused, and (h) is hollow-bead.
[0047] Figure 2This is the block diagram of the MSLE-YOLO network structure in the embodiments of the present invention. Among them, Backbone represents the backbone part, Neck represents the neck, Head represents the head, mn_conv represents pointwise convolution, SPPF represents the pyramid pooling operation, Concat represents splicing feature maps of different scales, Detect represents the detection head, INPUT represents the input image, and image enhance represents image enhancement;
[0048] Figure 3 This is the structure diagram of the Mobilenetv3 BLOCK_SCSA module in the embodiments of the present invention. Among them, MN Conv represents pointwise convolution, DW Conv represents depthwise convolution, AvgPool represents average pooling, Group Norm represents group normalization, Sigmoid represents the activation function, Q, K, and V respectively represent query, key, and value, which are used to calculate the attention weight, and CA-SHSA represents the channel-level single-head self-attention mechanism, represents element-wise multiplication;
[0049] Figure 4 This is the structure diagram of the Enhanced Fast Pyramid Architecture (EFPAN) in the embodiments of the present invention;
[0050] Figure 5 This is the flowchart of the DySample dynamic upsampling module in the embodiments of the present invention. Among them, linear represents the linear layer, 0.25 represents the adjustable range factor, pixel shuffle represents pixel rearrangement, O represents the offset, g represents the original grid, and grid sample represents grid sampling;
[0051] Figure 6 This is the comparison chart of the standard evaluation indicators of the MSLE-YOLO model and the YOLOv8 model for eight types of steel pipe weld defects in the embodiments of the present invention. Among them, (a) is the P-R (precision-recall) curve graph of MSLE-YOLO, and (b) is the P-R (precision-recall) curve graph of YOLOv8. In (a) and (b), the area under the P-R curve is AP (average precision), and mAP is the average value of AP for all classes. Detailed implementation manners
[0052] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings.
[0053] Specific implementation manner 1: Combining Figures 1 to 5 As shown, the present invention provides an ultra-lightweight natural gas pipeline weld defect detection method, including the following steps:
[0054] S100. Build a dataset, obtain a public dataset, and perform random data augmentation on the dataset to complete the expansion. Then, process the dataset through image enhancement, specifically including:
[0055] Obtain the public dataset steeltube, combined with Figure 1 As shown, this dataset contains 3,408 steel pipe weld defect images of eight different categories. To avoid overfitting problems caused by class imbalance in the weld defect dataset, perform random data augmentation on the dataset. The data augmentation methods include horizontal flipping, vertical flipping, random rotation, random translation, and scaling, and then expand the dataset to 4,000 images (500 images per category). Then, use a multi-level image enhancement technology, including blur effect, median blur, and CLAHE (Contrast Limited Adaptive Histogram Equalization), to process the training data;
[0056] Apply the blur effect to simulate the slight blur that occurs in the actual detection process of the image, including image defocus caused by camera movement or environmental light changes;
[0057] Apply median blur to effectively remove salt-and-pepper noise and small spots in the image, improve the image quality, and enhance the robustness of the model to noisy images;
[0058] Apply Contrast Limited Adaptive Histogram Equalization to enhance the local contrast of the image, make the weld defect features more obvious, and improve the detection ability of the model under different brightness and contrast conditions;
[0059] After completing the above dataset processing, randomly reallocate the 4,000 weld defect images according to the ratio of 6:2:2 for the training set, validation set, and test set;
[0060] S200. Build an MSLE-YOLO (ultra-lightweight network) model, including building a multi-semantic difference mitigation module (SCSA) based on the progressive channel self-attention mechanism, building a four-head enhanced fast pyramid architecture network (EFPAN) with an improved P2 small object layer, and using the Inner_CIoU loss function as the optimization target of the network, specifically including:
[0061] S210. Build a multi-semantic difference mitigation module (SCSA) based on the progressive channel self-attention mechanism, and process the feature dependence relationships of space and channels through the collaborative action of spatial attention and channel attention;
[0062] During this process, the Mobilenetv3 BLOCK module is used to construct the backbone network, including two 1*1 pointwise convolutions and one K*K depth convolution; among them, the Mobilenetv3 BLOCK module is set as an inverted bottleneck structure, and by combining the SCSA attention module, the number of channels is expanded to enhance the feature extraction ability; the SCSA module in it extracts multi-semantic space information through shared multi-semantic space attention SMSA, spatial decoupling and lightweight convolution to generate a spatial attention map; then, the progressive channel self-attention PCSA spatial prior information is used to calculate the channel self-attention, and gradually compress and convolve to generate an effective channel attention map; the calculation formula is as follows:
[0063] SMSA feature decomposition:
[0064] ;
[0065] ;
[0066] SMSA feature extraction:
[0067] ;
[0068] ;
[0069] PCSA attention weight calculation:
[0070] ;
[0071] The overall calculation process of the Mobilenetv3 BLOCK_SCSA module is:
[0072] ;
[0073] Among them, T is the input feature map, represents the i-th sub-feature, H represents the height dimension, W represents the width dimension, C represents the number of channels, K is the number of sub-features, which is 4 in the present invention, Attn represents the attention mechanism function, GN is group normalization, Concat is used to splice feature maps of different dimensions, Sigmoid and Softmax are activation functions, Q is the query vector, K is the key vector, V is the value vector, D is the scaling factor, Conv is the point convolution, and DW is the depthwise separable convolution;
[0074] S220. Design a four-head enhanced fast pyramid architecture network (EFPAN) with an improved P2 small target layer added, combined with Figure 4As shown, the network has fewer convolutional layers and a lower number of channels, enabling more effective sharing of semantic information. At the same time, a super-lightweight dynamic upsampling module DySample is added to the EFPAN framework to construct DyS-EFPAN (Enhanced Fast Pyramid Architecture Incorporating Dynamic Upsampling). This network can reduce the computational burden while retaining the necessary feature learning ability.
[0075] S230. Combine Figure 5 As shown, the Inner_CIoU loss function is used as the optimization objective of the network. The Inner_CIoU loss function calculates the IoU (Intersection over Union) intersection-over-union loss by introducing an auxiliary bounding box, where the size of the auxiliary box is controlled by a scale factor. The size of the auxiliary box will be dynamically adjusted according to different IoU samples, thereby accelerating the convergence process of the network and further improving the overall network performance. The calculation formula is as follows:
[0076] ;
[0077] ;
[0078] ;
[0079] ;
[0080] ;
[0081] ;
[0082] Where represents the Inner_CIoU loss function, and b represent the ground truth box (GT) and the predicted box respectively, r and l represent the right and left boundaries of the box; t and b represent the top and bottom boundaries of the box, in represents the overlapping part of the ground truth box and the predicted box, un represents the total coverage area of the ground truth box and the predicted box, ratio is the scale factor, which is set to 1.2 in this experiment; and represent the height and width of the ground truth box respectively, h and w represent the height and width of the predicted box respectively, p represents the distance between the center point of the anchor box and the center point of the predicted box, c represents the diagonal length of the minimum bounding rectangle covering the anchor box and the ground truth box, a is a positive trade-off parameter used to balance the weights of different loss terms, and v is used to measure the aspect ratio consistency between the predicted box and the ground truth box;
[0083] S300. Use the ultra-lightweight network model MSLE-YOLO constructed in step S200 for training. During the training process, regularly use the validation set to evaluate the model and adjust the hyperparameters of the model to ensure the stability of the training process and prevent overfitting. Use the trained ultra-lightweight network model MSLE-YOLO to detect natural gas pipeline weld defects.
[0084] Specific implementation plan two: The present invention provides an ultra-lightweight natural gas pipeline weld defect detection system, which has program modules corresponding to the above steps and executes the steps in the above ultra-lightweight natural gas pipeline weld defect detection method when running.
[0085] Other combinations and connection relationships in this implementation plan are the same as those in the first specific implementation plan.
[0086] Specific implementation plan three: The present invention provides a computer-readable storage medium, which stores a computer program, and the computer program is configured to implement the steps of the ultra-lightweight natural gas pipeline weld defect detection method when called by a processor.
[0087] Other combinations and connection relationships in this implementation plan are the same as those in the first specific implementation plan.
[0088] Simulation experiment
[0089] Based on the dataset obtained in step S100, train the constructed MSLE-YOLO model according to the following path:
[0090] Set up the experimental environment. The experimental platform is the Windows 11 operating system, the CPU is i5-12490f, and the graphics card is NVIDIA RTX 4060TI with 8g video memory. Environment configuration: The Python version is 3.9.18, the torch version is 2.2.1, and the cuda version is 11.8;
[0091] Initialize the network parameters, including
[0092] Input image size: 640×640
[0093] Batch size: Input 27 images each time to ensure that the model can process sufficient batch information;
[0094] Optimizer: Use the Stochastic Gradient Descent (SGD) optimizer, set the initial learning rate to 0.01, and perform learning rate decay.
[0095] Number of training rounds: Set to 300 rounds to ensure that the model can be fully trained;
[0096] During the training process, the validation set is used to evaluate the model, and the hyperparameters of the model (learning rate, batch size, weight decay coefficient, optimizer type, number of training epochs) are adjusted to ensure the stability of the training process and prevent overfitting;
[0097] Through standard evaluation metrics, including mAP, number of parameters, and GFLOPS, a comparison is made with existing models to evaluate the performance of MSLE-YOLO in the weld defect detection task, and ablation experiments are conducted to prove the effectiveness of each module in the model;
[0098] After the model training is completed, the test set is used to evaluate the model, and the performance is evaluated through the following metrics:
[0099] mAP@0.5 (mean average precision): Measures the mean average precision of the model across multiple classes.
[0100] Precision and recall: Used to evaluate the model's ability to identify defects.
[0101] GFLOPS: Measures the computational complexity of the model and evaluates its running efficiency on edge devices.
[0102] Combined Figure 6 As shown, the experimental results indicate that the mAP@0.5 of MSLE-YOLO in weld defect detection reaches 89.9%, which is a 3.5% improvement compared to YOLOv8. At the same time, MSLE-YOLO also has significant optimization in computational complexity, with its GFLOPS being 6.6, a 18.5% reduction compared to YOLOv8. As shown in Table 1 below, through ablation experiments, the contributions of each module to the model performance are verified. The experimental results show that the Mobilenetv3 BLOCK_SCSA module, EFPAN architecture, DySample upsampling module, and Inner_CIoU loss function module all improve the accuracy and efficiency of the model to varying degrees.
[0103]
[0104] Table 1 Ablation experiment results of each module
[0105] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art of the present invention can make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will all fall within the protection scope of the present invention.
Claims
1. A method for detecting weld defects in ultra-lightweight natural gas pipelines, characterized in that, It includes the following steps: S100. Construct a dataset, obtain the public dataset steeltube, perform random data augmentation on the dataset to complete the expansion, and then process the dataset through image augmentation; S200. Construct a super-lightweight network model MSLE-YOLO, including constructing a multi-semantic difference mitigation module SCSA based on the progressive channel self-attention mechanism, constructing a four-head enhanced fast pyramid architecture network EFPAN with improved P2 small target layer, and using the Inner_CIoU loss function as the optimization target of the network; It includes S210. Construct a multi-semantic difference mitigation module SCSA based on the progressive channel self-attention mechanism, and process the feature dependence relationship between space and channels through the synergistic effect of spatial attention and channel attention; It includes constructing a backbone network using the Mobilenetv3 BLOCK module, including two 1*1 pointwise convolutions and one K*K depth convolution; among them, the Mobilenetv3 BLOCK module is set as an inverted bottleneck structure, and by combining the SCSA attention module, the number of channels is expanded to enhance the feature extraction ability; the SCSA module in it extracts multi-semantic spatial information through shared multi-semantic spatial attention SMSA, spatial decoupling and lightweight convolution to generate a spatial attention map; then, the channel self-attention is calculated using the progressive channel self-attention PCSA spatial prior information, and gradually compressed and convolved to generate an effective channel attention map; The calculation formula is as follows: SMSA feature decomposition: SMSA feature extraction: Attn H = Sigmoid(GNK H (Concat(T 1H , T 2H ,..., T KH ))) Attn W = Sigmoid(GNK W (Concat(T 1W , T 2W ,..., T KW ))) PCSA attention weight calculation: The overall calculation process of the Mobilenetv3 BLOCK_SCSA module is: Mobilenetv3 BLOCK_SCSA(T) = SCSA(Conv 1×1 (DW 1×1 (Conv 1×1 (T)))) Among them, T represents the input feature map, T i represents the i-th sub-feature, H represents the height dimension, W represents the width dimension, C represents the number of channels, K represents the number of sub-features, Attn represents the attention mechanism function, GN represents group normalization, Concat is used to splice feature maps of different dimensions, Sigmoid and Softmax represent activation functions, Q represents the query vector, K represents the key vector, V represents the value vector, D represents the scaling factor, Conv represents point convolution, and DW represents depthwise separable convolution; S300. Use the super-lightweight network model MSLE-YOLO constructed in step S200 for training. During the training process, regularly use the validation set to evaluate the model and adjust the hyperparameters of the model to ensure the stability of the training process and prevent overfitting. Use the trained super-lightweight network model MSLE-YOLO to detect the weld defects of natural gas pipelines.
2. The ultra-lightweight natural gas pipeline weld defect detection method according to claim 1, characterized in that: In step S100, the methods of random data augmentation include horizontal flipping, vertical flipping, random rotation, random translation and scaling.
3. The ultra-lightweight natural gas pipeline weld defect detection method according to claim 1, wherein: In step S100, the methods of image augmentation include blur effect, median blur and contrast-limited adaptive histogram equalization.
4. A method for detecting weld defects of an ultra-lightweight natural gas pipeline according to claim 1, characterized in that: In step S200, it also includes S220. Design a four-head enhanced fast pyramid architecture network EFPAN with improved P2 small target layer, and add a super-lightweight dynamic upsampling module DySample to the EFPAN framework to construct an enhanced fast pyramid architecture DyS-EFPAN incorporating dynamic upsampling.
5. A method for detecting weld defects of an ultra-lightweight natural gas pipeline according to claim 4, characterized in that: In step S200, it also includes S230. Use the Inner_CIoU loss function as the optimization target of the network. The Inner_CIoU loss function calculates the IoU intersection over union loss by introducing an auxiliary bounding box, where the size of the auxiliary box is controlled by a scaling factor; the calculation formula is as follows: un = (w gt * h gt ) * (ratio) 2 + (w * h) * (ratio) 2 - in(2) Among them, L inner_CIoU represents the Inner_CIoU loss function, b gt and b' respectively represent the ground truth box and the predicted box, r and l respectively represent the right and left boundaries of the box; t and d respectively represent the top and bottom boundaries of the box, in represents the overlapping part of the ground truth box and the predicted box, un represents the total coverage area of the ground truth box and the predicted box, ratio represents the scaling factor, h gt and w gt respectively represent the height and width of the ground truth box, h' and w' respectively represent the height and width of the predicted box, p represents the distance between the center point of the anchor box and the center point of the predicted box, c represents the diagonal length of the minimum bounding rectangle covering the anchor box and the ground truth box, a represents a positive trade-off parameter used to balance the weights of different loss terms, and v is used to measure the aspect ratio consistency between the predicted box and the ground truth box.
6. A super-lightweight natural gas pipeline weld defect detection system, characterized in that: The system has program modules corresponding to the steps described in any one of the above claims 1-5, and when running, executes the steps in the above ultra-lightweight natural gas pipeline weld defect detection method.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the ultra-lightweight natural gas pipeline weld defect detection method described in any one of claims 1-5 when called by a processor.
Citation Information
Patent Citations
Small sample pipeline defect intelligent identification system and method
CN115049600A