Oil and gas transmission pipeline internal crack detection method based on improved YOLOv8 model

By improving the selective denoising and detailed information enhancement module of the YOLOv8 model, combined with the Shape-IoU loss function, the error detection and missed detection problems in crack detection in oil and gas conveying pipelines are solved, achieving higher detection accuracy and robustness.

CN120411604APending Publication Date: 2025-08-01CHANGZHOU UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510446293.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing crack detection algorithms are difficult to accurately distinguish prospective targets in oil and gas conveying pipelines, and are prone to missed detection and insufficient target details, resulting in low detection accuracy.

Method used

The improved YOLOv8 model is adopted to eliminate background noise through the selective denoising enhancement module, and the effective detailed information is extracted in combination with the detailed information enhancement module, and Shape-IoU is used as the regression loss function trained by the model to enhance the robustness of the detection.

Benefits of technology

It improves the accuracy of crack detection in oil and gas conveying pipelines, enhances the extraction of edge features and detailed information in complex backgrounds, and improves the robustness and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411604A_ABST
    Figure CN120411604A_ABST
Patent Text Reader

Abstract

The invention relates to the field of pipeline internal crack detection, in particular to an oil and gas transmission pipeline internal crack detection method based on an improved YOLOv8 model. The method comprises the following steps: inputting a picture of the inner wall of a to-be-detected oil and gas transmission pipeline into a trained improved YOLOv8 model, and detecting whether an internal crack exists or not; wherein the improved YOLOv8 model is characterized in that a backbone network of the improved YOLOv8 model introduces a selective denoising enhancement module for deep features so as to eliminate noise in a background; and the neck network introduces a detail information enhancement module for the fused feature map so as to combine low-level information and high-level information to carry out detail information enhancement. According to the invention, important features can be selectively enhanced, and effective detail information is extracted, so that accurate detection of cracks in the oil and gas transmission pipeline is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of crack detection in pipelines, and particularly to a method for detecting cracks in oil and gas transmission pipelines based on an improved YOLOv8 model. Background Art

[0002] As an important infrastructure for ensuring the safe supply of energy, oil and gas transmission pipelines are playing an increasingly prominent role. The usage of oil and gas transmission pipelines has increased significantly, and the requirements for pipeline quality have become more stringent accordingly.

[0003] Existing crack detection algorithms still face challenges in detecting cracks in oil and gas transmission pipelines. The main reasons are that it is difficult to accurately distinguish foreground objects in complex backgrounds, and problems of false detection and missed detection are likely to occur. At the same time, in complex backgrounds, more attention needs to be paid to the extraction of detailed information.

[0004] That is, the main reasons for the low accuracy of crack detection in oil and gas transmission pipelines include: (1) the target is interfered by background noise; (2) the detailed information of the target is insufficient.

[0005] Therefore, there is an urgent need to design a method for detecting cracks in oil and gas transmission pipelines that can solve the above problems. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a method for detecting cracks in oil and gas transmission pipelines based on an improved YOLOv8 model, which can selectively enhance important features and extract effective detailed information, so as to achieve accurate detection of cracks in oil and gas transmission pipelines.

[0007] To solve the above technical problem, the technical solution of the present invention is: a method for detecting cracks in oil and gas transmission pipelines based on an improved YOLOv8 model, including: inputting a photo of the inner wall of an oil and gas transmission pipeline to be detected into a trained improved YOLOv8 model to detect whether there are internal cracks;

[0008] Among them, the improved YOLOv8 model:

[0009] For its backbone network, a selective denoising enhancement module is introduced for deep features to eliminate noise in the background;

[0010] For its neck network, a detailed information enhancement module is introduced for the fused feature map to combine low-level information and high-level information for detailed information enhancement.

[0011] Furthermore, the selective denoising enhancement module combines a Guassian module, a SobelConv module, and an LSK attention module; among them,

[0012] The Guassian module is used for denoising operations;

[0013] The SobelConv module is used to capture the edge information of the denoised features;

[0014] The LSK attention module is used to adaptively expand the receptive field of the denoised features through large-kernel convolution and suppress interference.

[0015] Furthermore, the working process of the selective denoising enhancement module is as follows:

[0016] Step A, use the Guassian module to perform Gaussian denoising on the input features to obtain feature X;

[0017] Step B, use the SobelConv module to perform SobelConv operation on feature X to obtain feature G;

[0018]

[0019] where K x and K y are the horizontal and vertical convolution kernels of the Sobel operator respectively;

[0020] Use and the LSK attention module to process feature X to obtain feature Y;

[0021] Step C, fuse feature G and feature Y to obtain feature Z;

[0022] Z = G + Y.

[0023] Furthermore, use and the LSK attention module to process feature X to obtain feature Y; the specific formula is:

[0024] Y = X · (A1 · S[0] + A2 · S[1])

[0025] S = σ(Conv 7×7 ([SA avg ([A1; A2]); SA Max ([A1; A2]))))

[0026] A i = F i (A i-1 ); i ≥ 1

[0027] where A0 represents the original input feature X; F i () represents the i-th large-kernel convolution operation; σ represents the activation function sigmoid, S[0] corresponds to the dynamic weight value of branch feature A1, S[1] corresponds to the dynamic weight value of branch feature A2, SA avg () represents the average pooling operation, SA Max() represents the operation of max pooling; [A1; A2] represents the concatenation of branch feature A1 and branch feature A2; Conv 7×7 () represents a 7×7 convolution operation.

[0028] Furthermore, the working process of the detailed information enhancement module is as follows:

[0029] Step a, the low-level information feature F low and the high-level information feature F high are fused to obtain the fused feature F fusion ;

[0030] F fusion = F high + F low

[0031] Step b, the fused feature F fusion is then subjected to spatial reconstruction, channel reconstruction, and adaptive graph fusion operations to obtain the feature F agfm ;

[0032] F sc = F cru (F sru (F fusion ))

[0033] F r = Conv1d(AvgPool(F sc ))

[0034] B1 = Softmax(Conv1d(F r ))

[0035] ACGM(F sc ) = B0·B1 + B2

[0036] F out = ReLU(Conv1d(Conv1d(F r ·ACGM(F sc ))))

[0037] F agfm = σ(Conv 7×7 (Shuffle(Concat(F sc , F out ·F r ))))

[0038] In the formula, F sru () represents the spatial reconstruction operation; F cru () represents the channel reconstruction operation; F r is the result after global feature compression, F outIt is the result of image feature transformation; AGCM() represents adaptive adjustment of the relationship between channels; Concat() represents a concatenation operation; Shuffle() represents a channel shuffle operation; Conv 7×7 () represents a 7×7 convolution operation; σ represents an activation function; B1 represents the attention weight value, B0 represents the identity matrix, B2 represents the learnable parameter; Conv1d() represents a one-dimensional convolution operation; AvgPool() represents a global average pooling operation; Softmax() represents a normalization function operation; ReLU() represents an activation function;

[0039] Step c, the low-level information feature F low and the high-level information feature F high are weighted and fused, and a 1×1 convolution is performed to obtain the output feature F final ;

[0040] F final = Conv 1×1 (F agfm × W × F low + F agfm × (1 - W) × F high + F fusion )

[0041] W represents the attention weight of the low-level information feature.

[0042] Furthermore, during the process of training the improved YOLOv8 model, the boundary regression box loss function Shape-IoU is used as the regression loss function in model training.

[0043] The present invention also provides an oil and gas pipeline internal crack detection device based on the improved YOLOv8 model, which is used to detect internal cracks in oil and gas pipelines by using the oil and gas pipeline internal crack detection method based on the improved YOLOv8 model.

[0044] The present invention also provides a device, including:

[0045] A memory for storing a computer program;

[0046] A processor for executing the computer program, and when the computer program is executed by the processor, it implements the steps of the oil and gas pipeline internal crack detection method based on the improved YOLOv8 model.

[0047] The present invention also provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the oil and gas pipeline internal crack detection method based on the improved YOLOv8 model.

[0048] The present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the method for detecting cracks in an oil and gas pipeline based on an improved YOLOv8 model.

[0049] After adopting the above technical solution, through the selective denoising and enhancement module, it is possible to effectively remove background noise and uneven illumination in complex backgrounds, and then selectively enhance important features, thereby enhancing the features of edge effective information; through the detailed information enhancement module, it is possible to make full use of low-level information to enhance its detailed information, and at the same time adaptively adjust the weight values of low-level information and high-level information for fusion, so as to be able to extract effective detailed information with diverse shapes, thereby enhancing the robustness of detection. Therefore, the present invention can improve the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flowchart of the method for detecting cracks in an oil and gas pipeline based on an improved YOLOv8 model of the present invention;

[0051] Figure 2 is a framework diagram of the improved YOLOv8 model of the present invention;

[0052] Figure 3 is a framework diagram of the selective denoising and enhancement module of the present invention;

[0053] Figure 4 is a framework diagram of the detailed information enhancement module of the present invention;

[0054] Figure 5 is a framework diagram of the AGFM module of the present invention;

[0055] Figure 6 is a framework diagram of the AGCM module of the present invention;

[0056] Figure 7 is a detection comparison diagram between the improved YOLOv8 model of the present invention and the traditional YOLOv8 model;

[0057] Figure 7 Among them, 7(a) is the detection result diagram of the traditional YOLOv8 model, and 7(b) is the detection result diagram of the improved YOLOv8 model of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0058] In order to make the content of the present invention easier to be clearly understood, the present invention will be further described in detail below according to specific embodiments and in conjunction with the accompanying drawings.

[0059] Such as Figure 1 and Figure 2As shown in the figure, a method for detecting cracks in oil and gas transmission pipelines based on an improved YOLOv8 model includes: inputting a photo of the inner wall of the oil and gas transmission pipeline to be detected into the trained improved YOLOv8 model to detect whether there are internal cracks;

[0060] Among them, the improved YOLOv8 model:

[0061] For its backbone network, a selective denoising enhancement module is introduced for deep features to eliminate noise in the background;

[0062] For its neck network, a detail information enhancement module is introduced for the fused feature map to combine low-level information and high-level information for detail information enhancement.

[0063] More specifically, as Figure 1 and Figure 2 shown, the method for detecting cracks in oil and gas transmission pipelines based on the improved YOLOv8 model specifically includes:

[0064] The first step: Taking the training data set in the oil and gas transmission pipeline as the input, first, the dimensions and the number of channels of the input image are adjusted;

[0065] The second step: Aiming at problems such as the interference and influence of noise in complex scenes and the features of crack edges being easily ignored, a selective denoising enhancement module (DMMA) is designed to remove noise points in the complex background and prevent the enhancement of uncompletely removed noise. Therefore, the feature information of the target area is selectively enhanced (the traditional denoising model simply processes the noise points on the entire image. Although it will have a certain effect, when combined with the enhancement module, the unremoved noise points will also be enhanced, thus affecting the detection accuracy. Therefore, the feature information is selectively enhanced to suppress interference information and enhance effective features).

[0066] Aiming at the problem that detail information is easily ignored in complex scenes and in order to better adaptively understand detail information and combine high-level information, a detail information enhancement module (SCGA) is designed to make full use of the detail information in low-level information. In the oil and gas transmission pipeline scene, it is extremely easy to ignore the detail information of the target object because the foreground and background are not easily distinguishable, and the background is very likely to interfere with the foreground, resulting in problems such as missed detection and false detection. Therefore, the detail information at different scales in low-level information is used to enhance the details. However, only focusing on detail information is likely to ignore the context information of the image because some detail information needs to be combined with context information. Therefore, the context information of high-level information needs to be introduced, and their weight values are adaptively adjusted because in the face of a scene with changing situations, it is necessary to be able to adaptively allocate the weights of detail information and global information.

[0067] For slender cracks and cracks with diverse shapes, Shape-IoU is introduced as the regression loss function for model training. It makes judgments not only from the degree of combination, but also from the consistency of its shape contour (including the degree of boundary fitting), geometric central symmetry (emphasizing the matching of the center point), and enhancement of crack targets (for irregular targets like cracks, more attention is paid to their shapes), which can improve the detection ability of slender targets, reduce the neglect of small targets, suppress over-smooth predictions, and enhance the robustness of the model.

[0068] Step 3: Build the improved YOLOv8 model. The upstream network extracts features from the image, the middle network fuses the feature maps of different scales extracted by the upstream network, and the downstream network performs detection on the fused feature maps.

[0069] Step 4: Load the crack training dataset and validation dataset images in the oil and gas pipeline into the improved YOLOv8 model for training and validation, and save the best model in the validation set.

[0070] Step 5: Test the dataset of the test set with the saved result model to obtain the test results and complete the crack detection in the oil and gas pipeline.

[0071] In this embodiment, as Figure 3 shown, the selective denoising enhancement module combines the Guassian module, the SobelConv module, and the LSK attention module; among them,

[0072] The Guassian module is used for denoising operations.

[0073] The SobelConv module is used to capture the edge information of the denoised features.

[0074] The LSK attention module is used to adaptively expand the receptive field of the denoised features through large kernel convolution, suppress the interference of noise and irrelevant features, and thus enhance the important feature information.

[0075] Among them, the specific working process of the selective denoising enhancement module is as follows:

[0076] Step A: Use the Guassian module to perform Gaussian denoising on the input features to obtain feature X.

[0077] Step B: Use the SobelConv module to perform SobelConv operation on feature X to obtain feature G.

[0078]

[0079] In the formula, K x and K yThey are the horizontal and vertical convolution kernels of the Sobel operator respectively;

[0080] Process the feature X using and the LSK attention module to obtain the feature Y;

[0081] Y = X·(A1·S[0] + A2·S[1])

[0082] ([SAavg([A = σ(Conv 7×7 ([SA avg ([A1; A2]); SA Max ([A1; A2]))

[0083] A i = F i (A i-1 ) ; i≥1

[0084] In the formula, A0 represents the original input feature X; F i () represents the i-th large kernel convolution operation; σ represents the activation function sigmoid, S[0] corresponds to the dynamic weight value of the branch feature A1, S[1] corresponds to the dynamic weight value of the branch feature A2, SA avg represents the average pooling operation, SA Max represents the max pooling operation; A1 represents the first branch in the LSK (Large Kernel Selection Module), which is used to extract the local information and compact feature expression of the input feature, A2 represents the second branch in the LSK (Large Kernel Selection Module), which is used to obtain the global information and multi-scale information of the input feature within a larger receptive field than the first branch; [A1; A2] represents the concatenation of the branch feature A1 and the branch feature A2; Conv 7×7 () represents a 7×7 convolution operation. It should be noted that the calculation formula of S is to perform channel mixing and compression on two downsampled feature maps, and output two channels, the first channel is S[0], and the second channel is S[1].

[0085] Step C, fuse the feature G and the feature Y to obtain the feature Z;

[0086] Z = G + Y

[0087] Specifically, the Gaussian module is used to denoise the input features, and the denoised features are respectively fed into the SobelConv module and the LSK attention module. The SobelConv module enhances the edge information of the features, and the LSK attention module expands the receptive field through adaptive large-kernel convolution, which is complementary to the SobelConv. It focuses more on context connection. Then, the two-branch features are fused and output to the middle part of the network, achieving efficient denoising and target area enhancement while ensuring real-time performance, thus avoiding interference from image background noise and effectively enhancing the crack features.

[0088] In this embodiment, as Figure 4 , Figure 5 and Figure 6 shown, the working process of the detail information enhancement module is as follows:

[0089] Step a, the low-level information feature F low and the high-level information feature F high are fused to obtain the fused feature F fusion ;

[0090] F fusion = F high + F low

[0091] Step b, the fused feature F fusion is then subjected to spatial reconstruction, channel reconstruction, and adaptive graph fusion (AGFM module) operations to obtain the feature F agfm ;

[0092] F sc = F cru (F sru (F fusion ))

[0093] F r = Conv1d(AvgPool(F sc ))

[0094] B1 = Softmax(Conv1d(F r ))

[0095] ACGM(F sc ) = B0·B1 + B2

[0096] F out = ReLU(Conv1d(Conv1d(F r ·ACGM(F sc ))))

[0097] F agfm = σ(Conv 7×7(Shuffle(Concat(F sc ,F out ·F r ))))

[0098] wherein, F sru () represents a spatial reconstruction operation; F cru () represents a channel reconstruction operation; F r is the result after global feature compression, F out is the result of graph feature transformation; AGCM() represents being processed by the AGCM module to adaptively adjust the relationship between channels (as Figure 6 shown, it can be simply understood as an operation that reduces the weight of unimportant information between channels and strengthens the weight of important channels, so as to enhance important features); Concat() represents a concatenation operation; Shuffle() represents a channel rearrangement operation; Conv 7×7 () represents a 7×7 convolution operation; σ represents an activation function; B1 represents an attention weight value, B0 represents an identity matrix of the channel representation after dimensionality reduction, B2 represents a learnable parameter, initialized to 1e-6; Conv1d() represents a one-dimensional convolution operation; AvgPool() represents a global average pooling operation; Softmax() represents a normalization function operation; ReLU() represents an activation function;

[0099] Step c, the low-level information feature F low and the high-level information feature F high are weighted and fused, and a 1×1 convolution is performed to obtain the output feature F final ;

[0100] F final =Conv 1×1 (F agfm ×W×F low +F agfm ×(1 - W)×F high +F fusion )

[0101] W represents the attention weight of the low-level information feature.

[0102] Specifically, when facing complex scenarios, it is often easy to overlook the detailed information in the crack area, resulting in unsatisfactory detection effects. This embodiment adopts the fusion features of low-level information and high-level information, and then through spatial and channel reconstruction convolutions, it can effectively enhance the crack detailed information in its enhanced spatial features and channel features, avoiding the blurring of the features of the background and the target. Then, through the adaptive graph channel attention (each channel corresponding to each node in the AGCM in the AGFM module, and the finally output is the weight value of the mutual dependence between each channel, which is adjusted by itself, so it is called adaptive graph channel attention), the relationship between channels is dynamically adjusted, the channels of the cracks are highlighted, the irrelevant channels are suppressed, and the channel features are redistributed. Finally, the weight values of the low-level information and the high-level information are automatically and appropriately adjusted to enhance the detailed information and suppress the irrelevant information. Therefore, this embodiment realizes the attention of the model to the detailed information of the image by making full use of the features of the low-level information. In order to ensure that it will not overlook the context information, the high-level information is also combined. Therefore, by adaptively adjusting the weight values of the high and low-level information, the interference of the background area is suppressed, and the feature information of the crack area is enhanced, solving the problem of missing or insufficient detailed information.

[0103] In this embodiment, the formula for the complete boundary regression box loss function Shape-IoU is:

[0104] L bbox = λ1·(1 - IoU) + λ2·distance shape + λ3·Ω shape

[0105] In the formula, λ1, λ2, and λ3 respectively represent the weight hyperparameters that control the IoU loss, the distance loss, and the shape loss. distance shape represents the loss function of the distance, and Ω shape represents the shape loss function;

[0106] Among them, the calculation formula for the IoU loss is:

[0107]

[0108] In the formula, B is the predicted bounding box in the model, and B gt is the ground truth bounding box. |B ∩ B gt | is the intersection area of the predicted bounding box and the ground truth bounding box, and |B ∪ B gt | is the union area of the predicted bounding box and the ground truth bounding box.

[0109] Among them, the calculation formula for the distance loss is:

[0110]

[0111] In the formula, xc , y c is the center point coordinate of the predicted bounding box. represents the center point position of the target box, c is the diagonal length of the minimum bounding rectangle; h gt represents the height of the ground truth bounding box, w gt is the width of the ground truth bounding box, (h gt ) scale , (h gt ) scale represent the scale features of the target in the dataset. ww and hh represent the weight coefficients in the horizontal and vertical directions respectively. The specific values of these coefficients are closely related to the geometric shape (the ratio of width to height) of the actual bounding box. After being weighted by hh and ww, the distance loss calculates the deviation of the predicted box and the ground truth box in the center point coordinates respectively.

[0112] Among them, the calculation formula of the shape loss is:

[0113]

[0114] In the formula, the parameter θ is used to adjust the weight of the shape difference to the loss function. The shape loss is used to measure the degree of coincidence between the predicted box and the ground truth box in the width and height dimensions, and makes the loss more sensitive to large deviations through the exponential function.

[0115] Specifically, the traditional IoU has poor performance under irregular targets, and at the same time, it will ignore the contour and topological information of the target and only care about the intersection-over-union of the areas. In this embodiment, Shape-IoU is used as the loss function. By directly optimizing the overlapping area, it indirectly promotes the shape of the bounding box to be closer to the true annotation box, makes the predicted box fit the target better, thereby improving the detection ability of slender targets, reducing the neglect of small targets, suppressing over-smooth predictions, and enhancing the robustness of the model.

[0116] The advantages of the solutions involved in the above embodiments will be introduced in detail below in combination with specific experiments and visualization results.

[0117] As Figure 7 shown, Figure 7 (a) is the detection result diagram of the traditional YOLOv8 model, and the confidence level of crack detection in the oil and gas pipeline is 0.47; Figure 7 (b) is the detection result diagram of the improved YOLOv8 model of this embodiment, and the confidence level of crack detection in the oil and gas pipeline is 0.75. The improvement of the confidence level in the improved YOLOv8 model indicates that the model is more confident in judging the "existence" and "category" of the target, which means more accurate detection and more confident classification, and is an intuitive manifestation of the optimization of the model performance.

[0118] Table 1

[0119]

[0120] Table 1 is a comparison table between the traditional YOLOv8 model and the improved YOLOv8 model of this embodiment on the pipeline crack dataset.

[0121] The mAP@0.5 achieved by the traditional YOLOv8 model on the pipeline crack dataset is 57.2%, while the mAP@0.5 achieved by the improved YOLOv8 model of this embodiment on the pipeline crack dataset is 65.3%. The improvement of mAP@0.5 indicates that the model has become more reliable in three aspects: judging whether there is a target, whether the bounding box is correct, and whether the category is accurate, which means that the overall detection performance is stronger.

[0122] A crack detection device for oil and gas transmission pipelines based on an improved YOLOv8 model is used to detect cracks in oil and gas transmission pipelines by using the crack detection method for oil and gas transmission pipelines based on the improved YOLOv8 model in the above embodiment.

[0123] A device includes:

[0124] A memory for storing a computer program;

[0125] A processor for executing the computer program, and when the computer program is executed by the processor, it realizes the steps of the crack detection method for oil and gas transmission pipelines based on the improved YOLOv8 model in the above embodiment.

[0126] A readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it realizes the steps of the crack detection method for oil and gas transmission pipelines based on the improved YOLOv8 model in the above embodiment.

[0127] A computer program product includes a computer program, and when the computer program is executed by a processor, it realizes the steps of the crack detection method for oil and gas transmission pipelines based on the improved YOLOv8 model in the above embodiment.

[0128] Inspired by the ideal embodiments of the present invention as described above, through the above description, relevant staff can completely make various changes and modifications without departing from the technical idea of this invention. The technical scope of this invention is not limited to the content in the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A method for detecting cracks in oil and gas transmission pipelines based on an improved YOLOv8 model, characterized in that: It includes: Input the inner wall photo of the oil and gas transmission pipeline to be detected into the trained improved YOLOv8 model to detect whether there are internal cracks; Among them, the improved YOLOv8 model: For its backbone network, a selective denoising enhancement module is introduced for deep features to eliminate noise in the background; For its neck network, a detail information enhancement module is introduced for the fused feature map to combine low-level information and high-level information for detail information enhancement.

2. The method for detecting cracks in oil and gas transmission pipelines based on the improved YOLOv8 model according to claim 1, characterized in that: The selective denoising enhancement module combines the Guassian module, the SobelConv module and the LSK attention module; among them, The Guassian module is used for denoising operations; The SobelConv module is used to capture the edge information of the denoised features; The LSK attention module is used to adaptively expand the receptive field of the denoised features through large kernel convolution to suppress interference.

3. The method for detecting cracks in oil and gas transmission pipelines based on the improved YOLOv8 model according to claim 2, characterized in that: The working process of the selective denoising enhancement module is: Step A, use the Guassian module to perform Gaussian denoising on the input features to obtain feature X; Step B, use the SobelConv module to perform SobelConv operation on feature X to obtain feature G; where K x and K y are the horizontal and vertical convolution kernels of the Sobel operator, respectively; Use and the LSK attention module to process feature X to obtain feature Y; Step C, fuse feature G and feature Y to obtain feature Z; Z = G + Y.

4. The method for detecting cracks in oil and gas transmission pipelines based on the improved YOLOv8 model according to claim 3, characterized in that: Use and the LSK attention module to process feature X to obtain feature Y; the specific formula is: Y = X·(A1·S[0] + A2·S[1]) S = σ(Conv 7×7 ([SA avg ([A1; A2]); SA Max ([A1; A2]))) A i = F i (A i-1 ); i≥1 Wherein, A0 represents the feature X of the original input; F i () represents the i-th large kernel convolution operation; σ represents the activation function sigmoid; S[0] corresponds to the dynamic weight value of the branch feature A1; S[1] corresponds to the dynamic weight value of the branch feature A2; SA avg () represents the operation of average pooling; SA Max () represents the operation of max pooling; [A1; A2] represents the concatenation of the branch feature A1 and the branch feature A2; Conv 7×7 () represents the 7×7 convolution operation.

5. The method for detecting cracks in oil and gas transmission pipelines based on the improved YOLOv8 model according to claim 1, characterized in that: The working process of the detail information enhancement module is: Step a, the low-level information feature F low and the high-level information feature F high are fused to obtain the fused feature F fusion ; F fusion = F high + F low Step b, fuse the feature F fusion Through spatial reconstruction, channel reconstruction, and adaptive graph fusion operations, the feature F is obtained agfm ; F sc = F cru (F sru (F fusion )) F r = Conv1d(AvgPool(F sc )) B1 = Softmax(Conv1d(F r )) ACGM(F sc ) = B0·B1 + B2 F out = ReLU(Conv1d(Conv1d(F r ·ACGM(F sc )))) F agfm = σ(Conv 7×7 (Shuffle(Concat(F sc ,F out ·F r )))) where F sru () represents a spatial reconstruction operation; F cru () represents a channel reconstruction operation; F r is the result after global feature compression, F out is the result of graph feature transformation; AGCM() represents adaptive adjustment of the relationship between channels; Concat() represents a concatenation operation; Shuffle() represents a channel rearrangement operation; Conv 7×7 () represents a 7×7 convolution operation; σ represents an activation function; B1 represents an attention weight value, B0 represents an identity matrix, B2 represents a learnable parameter; Conv1d() represents a one-dimensional convolution operation; AvgPool() represents a global average pooling operation; Softmax() represents a normalization function operation; ReLU() represents an activation function; Step c, low-level information feature F low and high-level information feature F high are weighted and fused, and 1×1 convolution is performed to obtain the output feature F final ; F final = Conv 1×1 (F agfm × W × F low + F agfm × (1 - W) × F high + F fusion ) W represents the attention weight of the low-level information features.

6. The method for detecting cracks in oil and gas transmission pipelines based on the improved YOLOv8 model according to claim 1, characterized in that: During the process of training the improved YOLOv8 model, the boundary regression box loss function Shape-IoU is used as the regression loss function in model training.

7. A device for detecting cracks in oil and gas transmission pipelines based on an improved YOLOv8 model, characterized in that: It is used to detect cracks in oil and gas transmission pipelines by using the method for detecting cracks in oil and gas transmission pipelines based on the improved YOLOv8 model described in any one of claims 1-6.

8. A device, characterized in that: It includes: A memory for storing computer programs; A processor for executing the computer program, and when the computer program is executed by the processor, it implements the steps of the method for detecting cracks in an oil and gas pipeline based on an improved YOLOv8 model according to any one of claims 1-6.

9. A readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, it implements the steps of the method for detecting cracks in an oil and gas pipeline based on an improved YOLOv8 model according to any one of claims 1-6.

10. A computer program product comprising a computer program, characterized in that when the computer program is executed by a processor, it implements the steps of the method for detecting cracks in an oil and gas pipeline based on an improved YOLOv8 model according to any one of claims 1-6.

Citation Information

Cited By

  • Remote control vehicle road obstacle detection method and system

    CN121617072A

  • A method and system for remotely controlled vehicle road obstacle detection

    CN121617072B