A submarine pipeline leakage segmentation model construction method and segmentation method
Through the improved YOLOv8 network and diversified enhanced processing technology, a subsea pipeline leakage segmentation model was built, solving the problem of insufficient segmentation accuracy and efficiency in subsea pipeline leakage detection, and achieving efficient identification and real-time monitoring in complex environments.
Patent Information
- Application Number
- CN202411345262.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The prior art lacks segmentation accuracy and efficiency in subsea pipeline leakage detection, especially when occlusion exists in complex marine environments.
The improved YOLOv8 network is used to build a subsea pipeline leakage segmentation model. By acquiring and enhancing the image data of the subsea pipeline, training and tuning the initial segmentation model, the RepC2f lightweight module and lightweight shared convolution detection module are used to improve feature extraction and information transmission. efficiency.
It significantly improves the segmentation accuracy and efficiency of leakage points in subsea pipelines, can accurately identify leakage points in complex environments, and is suitable for real-time monitoring needs, providing timely leakage warnings.
Smart Images

Figure CN118864487B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for constructing a submarine pipeline leakage segmentation model and a segmentation method. Background Art
[0002] As the main way to transport marine oil and gas resources, submarine pipelines play an important role in marine energy transportation. However, submarine pipelines are prone to leakage in complex marine environments, causing environmental pollution and economic losses.
[0003] There are two main methods for detecting submarine pipeline leaks: physical signals such as electromagnetic waves and sound waves, and optical image detection. Underwater target image processing is simpler and faster than analyzing complex physical signals. In recent years, multi-jointed snake-like robots are often used for daily inspections and maintenance of submarine pipelines because of their multi-degree-of-freedom and multi-gait motion forms, which enable them to move in complex environments.
[0004] However, at present, common underwater target recognition algorithms include two-stage algorithms. Although the two-stage algorithms meet the accuracy requirements, the detection speed is slow. In addition, in the complex underwater inspection environment, there may be occlusions on the surface of the submarine pipeline, which will affect the recognition accuracy. Therefore, how to ensure the segmentation accuracy of submarine pipeline leakage and improve efficiency is an urgent problem to be solved. Summary of the invention
[0005] The problem solved by the present invention is how to improve the segmentation accuracy and efficiency of submarine pipeline leakage points.
[0006] In order to solve the above problems, the present invention provides a method for constructing a submarine pipeline leakage segmentation model, comprising:
[0007] Acquire image data of the submarine pipeline to be tested;
[0008] Performing enhancement processing on the image data, and dividing the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data;
[0009] The initial segmentation model is trained and tuned by the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network, an improved neck network and an improved segmentation head network, and the improved backbone network and the improved neck network both include a RepC2f lightweight module.
[0010] Optionally, the improved segmentation head network construction process includes:
[0011] Obtain an original YOLOv8 network, wherein the original YOLOv8 network includes an original segmentation head network;
[0012] Adding a lightweight shared convolution detection module to the original segmentation head network to obtain the improved segmentation head network;
[0013] The lightweight shared convolution detection module is used to detect the fused feature image to obtain a temporary detection result, and the fused feature image is the output data of the improved neck network.
[0014] Optionally, the lightweight shared convolution detection module includes multiple feature extraction modules, a shared convolution module and a scaling layer, and the detecting the fused feature image to obtain a temporary detection result includes:
[0015] Perform preliminary extraction on the temporary detection results respectively by each of the feature extraction modules to obtain corresponding preliminary extraction results;
[0016] Processing all the preliminary extraction results through the shared convolution module to obtain a temporary feature map;
[0017] The temporary feature map is scaled and processed through the scaling layer to obtain a temporary detection result.
[0018] Optionally, the original YOLOv8 network also includes a C2f module, and the RepC2f lightweight module construction process includes:
[0019] Based on the structural re-parameterization method, the bottleneck module in the C2f module is improved to obtain the RepC2f lightweight module;
[0020] The bottleneck module improvement process includes: adding a zero-filling operation or a zero-filling cancellation operation to the convolution operation in the bottleneck module.
[0021] Optionally, the training and tuning of the initial segmentation model by using the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model includes:
[0022] Segmenting the image sample data using the initial segmentation model to obtain a temporary segmentation result;
[0023] The initial segmentation model is optimized by using the temporary segmentation result and the corresponding label data, and the optimized initial segmentation model is used as the submarine pipeline leakage segmentation model.
[0024] Optionally, segmenting the image sample data by using the initial segmentation model to obtain a temporary segmentation result includes:
[0025] Performing feature extraction on the image sample data through the improved backbone network to obtain a plurality of temporary feature-extracted images;
[0026] Performing feature fusion on all the temporary feature extraction images through the improved neck network to obtain a fused feature image;
[0027] The fused feature image is segmented by the improved segmentation head network to obtain the temporary segmentation result.
[0028] Optionally, the improved segmentation head network further includes a prototype mask generation module, and the segmenting of the fused feature image by the improved neck network to obtain the temporary segmentation result includes:
[0029] Processing the fused feature image through the prototype mask generation module to obtain a segmentation mask result;
[0030] Detecting the fused feature image through the lightweight shared convolution detection module to obtain the temporary detection result;
[0031] The segmentation mask result and the temporary detection result are linearly combined to obtain the temporary segmentation result.
[0032] Optionally, the optimizing the initial segmentation model by using the temporary segmentation result and the corresponding label data, and using the optimized initial segmentation model as the submarine pipeline leakage segmentation model, comprises:
[0033] Based on the Inner-EIoU loss function, a loss calculation is performed on the temporary segmentation result and the corresponding label data to obtain a loss output;
[0034] The model parameters of the initial segmentation model are adjusted according to the loss output until the loss input meets a preset condition, and the initial segmentation model after parameter adjustment is used as the submarine pipeline leakage segmentation model.
[0035] The beneficial effects of the submarine pipeline leakage segmentation model construction method of the present invention are: first, a variety of submarine pipeline image sample data is obtained. These images can come from submarine cameras taken in the field, data collected by unmanned submersibles (ROVs), and data collected by other submarine detection equipment. Ensuring that the images cover different environmental conditions (such as different lighting, viewing angles) and pipeline states (such as healthy states, minor leaks, and serious leaks) is conducive to improving the detection accuracy of the trained model for pipeline leaks under different environmental conditions and pipeline states. A series of enhancement processing is performed on the acquired image sample data to improve the robustness and generalization ability of the model.
[0036] After data enhancement, the enhanced image data is divided to create a submarine pipeline segmentation dataset. The dataset should include image samples and their corresponding label data (such as binary masks) indicating the location and shape of the pipeline. The enhanced submarine pipeline image data is divided into training set, validation set and test set.
[0037] The initial segmentation model is trained and tuned using the image samples in the training set and their corresponding label data. The initial segmentation model is built based on the improved YOLOv8 network, and the traditional backbone network of YOLOv8 is optimized. For example, a structure with better feature extraction capability can be introduced to ensure the capture of detailed features in the submarine environment. For the optimization of the improved neck network, the transmission effect of features of different scales is improved by optimizing the feature fusion method, and the segmentation performance of the model is enhanced. Finally, the improved segmentation head network is designed for segmentation tasks, combined with context information, to accurately predict the category of each pixel and efficiently generate segmentation masks. The use of the RepC2f lightweight module in the backbone network and the neck network can improve the efficiency of information transmission and reduce the loss of information in the process of information circulation. This design is particularly suitable for real-time processing and deployment, and improves the responsiveness and accuracy of the model in practical applications. After training and tuning, the final submarine pipeline leakage segmentation model can accurately output the segmentation results of the submarine pipeline to be tested. The model can be used for online monitoring and real-time evaluation of the status of submarine pipelines, providing early warning of potential leaks.
[0038] Therefore, the present invention significantly improves the segmentation accuracy of the model in complex seabed environments through improved network structure and diversified enhancement processing, that is, the efficiency of information flow is improved by introducing the RepC2f lightweight module, so that the network can make more full use of the subtle structural features of metal pipes, accelerate model convergence, and ensure that subtle leakage features can be effectively identified. The optimized YOLOv8 network is suitable for real-time monitoring needs, can quickly respond to changes in pipeline status, and provide timely leakage warnings and reports. The model construction method has good flexibility and can be further adjusted and optimized according to different needs to adapt to more complex pipeline detection tasks.
[0039] In another aspect, the present invention provides a device for constructing a submarine pipeline leakage segmentation model, comprising:
[0040] An acquisition unit, used for acquiring image data of the submarine pipeline to be tested;
[0041] A processing unit, configured to perform enhancement processing on the image data and to divide the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data;
[0042] The processing unit is also used to train and tune the initial segmentation model through the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network, an improved neck network and an improved segmentation head network, and the improved backbone network and the improved neck network both include a RepC2f lightweight module.
[0043] The advantages of the submarine pipeline leakage segmentation model construction device and the submarine pipeline leakage segmentation model construction method described in the present invention over the prior art are the same, and will not be described in detail here.
[0044] In another aspect, the present invention provides a method for segmenting a submarine pipeline leakage, comprising:
[0045] Acquire image data of the target submarine pipeline to be tested;
[0046] The image data of the target submarine pipeline to be measured is input into the submarine pipeline leakage segmentation model obtained by the submarine pipeline leakage segmentation model construction method to obtain the segmentation result of the target submarine pipeline to be measured.
[0047] The submarine pipeline leakage segmentation method of the present invention and the submarine pipeline leakage segmentation model construction method have the same advantages over the prior art, which will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is one of the flow charts of a method for constructing a submarine pipeline leakage segmentation model according to an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of the structure of an improved segmentation head network according to an embodiment of the present invention;
[0050] Figure 3 This is a second flow chart of a method for constructing a submarine pipeline leakage segmentation model according to an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of the structure of a submarine pipeline leakage segmentation model building device according to an embodiment of the present invention;
[0052] Figure 5 A schematic flow chart of a submarine pipeline leakage segmentation method according to an embodiment of the present invention;
[0053] Figure 6 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0055] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0056] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0057] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0058] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0059] like Figure 1 As shown, a method for constructing a submarine pipeline leakage segmentation model provided by an embodiment of the present invention includes:
[0060] S100, acquiring image data of the submarine pipeline to be tested;
[0061] Specifically, first, obtain diverse submarine pipeline image sample data. These images can come from submarine cameras taken in the field, data collected by unmanned submersibles (ROVs), and other submarine detection equipment. Ensure that the images cover different environmental conditions (such as different lighting and viewing angles) and pipeline conditions (such as healthy status, minor leaks, and serious leaks).
[0062] S200, performing enhancement processing on the image data, and dividing the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data;
[0063] Specifically, a series of enhancement processes are performed on the acquired image sample data to improve the robustness and generalization ability of the model. The enhancement method may include:
[0064] Rotation and flipping: Increase the diversity of images and help the model learn the characteristics of pipelines in different directions.
[0065] Zoom: Randomly zoom the image to simulate different viewing distances.
[0066] Brightness and contrast adjustment: Enhances the visual features of an image and helps the model maintain accurate recognition under changing lighting conditions.
[0067] Noise addition: simulates interference in actual scenes and improves the stability of the model.
[0068] After data augmentation, the augmented image data is divided to create a submarine pipeline segmentation dataset. The dataset should include image samples and their corresponding label data (such as binary masks) indicating the location and shape of the pipeline. The augmented submarine pipeline image data is divided into training set, validation set, and test set. Usually, the training set accounts for the majority (e.g., 70%), the validation set is used for model tuning (e.g., 15%), and the test set is used for performance evaluation (e.g., 15%). Make sure that each dataset contains enough samples for effective training and evaluation.
[0069] In some embodiments, random rotation, scaling, flipping and other data set enhancement methods are used to enhance the data set; and the enhanced data set is labeled by using a tool such as Labelme (an open source image annotation tool widely used in the field of computer vision, designed to help users create annotated data for machine learning and deep learning models. It is very suitable for image segmentation, object detection and other tasks. Annotation) to form a json file, which is then converted into a txt (text) file; it is divided into a training set, a validation set and a test set according to a preset ratio, and the pictures and txt files are placed in folders accordingly. Among them, JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy for humans to read and write, and is also easy for machines to parse and generate. The JSON format is commonly used for data transmission and storage.
[0070] S300, training and tuning the initial segmentation model through the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network (Backbone), an improved neck network (Neck) and an improved segmentation head network (Head), and the improved backbone network and the improved neck network both include a RepC2f lightweight module.
[0071] Specifically, the initial segmentation model is trained using the prepared image sample data and the corresponding label data. During the training process, the model parameters are continuously adjusted and the loss function is optimized to improve the performance of the model on the validation set. Data enhancement techniques (such as random cropping, rotation, flipping, etc.) are used to increase the diversity of training data and improve the generalization ability of the model.
[0072] As for choosing YOLOv8 as the basic network model. The YOLO (You Only Look Once, a target detection model) series of models are well-known for their efficient detection capabilities and are suitable for real-time processing. The backbone network of YOLOv8 is improved, and the RepC2f lightweight module is used to improve the feature extraction capability and reduce the amount of calculation. These modules can reduce the model size and speed up the inference while maintaining high accuracy. At the same time, the neck network is optimized to better integrate features at different levels. The design of this part of the network is directly related to the detection and segmentation effects. Improving the neck network can improve the segmentation accuracy. Finally, the segmentation head network is designed to ensure that the classification results of each pixel can be accurately output. The improved segmentation head network should be able to handle scenes that require detailed segmentation, such as the tiny features of submarine pipeline leakage. The RepC2f lightweight module is obtained by improving the C2f module (Faster Implementation of CSP Bottleneck with 2convolutions, an implementation module of CSP bottleneck with two convolutions), that is, the C2f module improved by structural reparameterization is named RepC2f (RepC2f lightweight module). CSP (Cross Stage Partial Network) usually refers to a cross-stage partial network. CSPNet divides the feature map of the base layer into two parts, and then merges them through a cross-stage hierarchy, which reduces the amount of computation while ensuring accuracy. It is widely used in some deep learning tasks such as object detection.
[0073] In this embodiment, first, a variety of submarine pipeline image sample data is obtained. These images can come from submarine cameras taken in the field, data collected by unmanned submersibles (ROVs), and data collected by other submarine detection equipment. Ensuring that the images cover different environmental conditions (such as different lighting and viewing angles) and pipeline states (such as healthy states, minor leaks, and serious leaks) is conducive to improving the detection accuracy of the trained model for pipeline leaks under different environmental conditions and pipeline states. A series of enhancement processing is performed on the acquired image sample data to improve the robustness and generalization ability of the model.
[0074] After data enhancement, the enhanced image data is divided to create a submarine pipeline segmentation dataset. The dataset should include image samples and their corresponding label data (such as binary masks) indicating the location and shape of the pipeline. The enhanced submarine pipeline image data is divided into training set, validation set and test set.
[0075] The initial segmentation model is trained and tuned using the image samples in the training set and their corresponding label data. The initial segmentation model is built based on the improved YOLOv8 network, and the traditional backbone network of YOLOv8 is optimized. For example, a structure with better feature extraction capability can be introduced to ensure the capture of detailed features in the submarine environment. For the optimization of the improved neck network, the transmission effect of features of different scales is improved by optimizing the feature fusion method, and the segmentation performance of the model is enhanced. Finally, the improved segmentation head network is designed for segmentation tasks, combined with context information, to accurately predict the category of each pixel and efficiently generate segmentation masks. The use of the RepC2f lightweight module in the backbone network and the neck network can improve the efficiency of information transmission and reduce the loss of information in the process of information circulation. This design is particularly suitable for real-time processing and deployment, and improves the responsiveness and accuracy of the model in practical applications. After training and tuning, the final submarine pipeline leakage segmentation model can accurately output the segmentation results of the submarine pipeline to be tested. The model can be used for online monitoring and real-time evaluation of the status of submarine pipelines, providing early warning of potential leaks.
[0076] Therefore, this embodiment significantly improves the segmentation accuracy of the model in complex seabed environments through improved network structure and diversified enhancement processing, that is, the introduction of the RepC2f lightweight module improves the efficiency of information flow, so that the network can make more full use of the subtle structural features of metal pipes, accelerate model convergence, and ensure that subtle leakage features can be effectively identified. The optimized YOLOv8 network is suitable for real-time monitoring needs, can quickly respond to changes in pipeline status, and provide timely leakage warnings and reports. The model construction method has good flexibility and can be further adjusted and optimized according to different needs to adapt to more complex pipeline detection tasks.
[0077] Optionally, the improved segmentation head network construction process includes:
[0078] Obtain an original YOLOv8 network, wherein the original YOLOv8 network includes an original segmentation head network;
[0079] Adding a lightweight shared convolution detection module to the original segmentation head network to obtain the improved segmentation head network;
[0080] The lightweight shared convolution detection module is used to detect the fused feature image to obtain a temporary detection result, and the fused feature image is the output data of the improved neck network.
[0081] Specifically, the original YOLOv8 network contains a segmentation head network that is responsible for processing the segmentation task. The segmentation head can provide support for tasks such as instance segmentation and semantic segmentation in practical applications.
[0082] Based on the original segmentation head network, a lightweight shared convolution detection module is designed and added. In this module, the computational workload and model parameters are reduced by optimizing the convolution operation, thereby achieving lightweight. The lightweight module can be composed of multiple shared convolution layers to synchronously process the input feature image while maintaining the expressiveness of the model. The lightweight shared convolution detection module is integrated into the original YOLOv8 segmentation head network to form a new improved segmentation head network. This network makes the model more efficient by sharing convolution layers, which can significantly reduce the computational burden when running on mobile or embedded devices. The input data of the improved segmentation head network comes from the output of the improved neck network. The neck network is responsible for fusing multiple layers of features, and the output fused feature image fuses information of different scales and contexts, which provides a richer feature background for accurate segmentation results. The fused feature image is processed by the lightweight shared convolution detection module to obtain temporary detection results. These results contain the bounding boxes of each target and the corresponding category information, further providing necessary data support for the segmentation task.
[0083] Therefore, the addition of lightweight shared convolution detection modules significantly reduces the number of parameters and inference time, making the network faster and suitable for resource-constrained devices such as mobile terminals or edge computing devices. And by processing the fused feature images, the improved segmentation head network can better generalize to different targets and improve segmentation accuracy in small objects and complex backgrounds. And the lightweight design allows the model to effectively reduce computing and storage requirements while ensuring performance, making it easier to apply in a variety of environments.
[0084] Optionally, the lightweight shared convolution detection module includes multiple feature extraction modules, a shared convolution module and a scaling layer, and the detecting the fused feature image to obtain a temporary detection result includes:
[0085] Perform preliminary extraction on the temporary detection results respectively by each of the feature extraction modules to obtain corresponding preliminary extraction results;
[0086] Processing all the preliminary extraction results through the shared convolution module to obtain a temporary feature map;
[0087] The temporary feature map is scaled and processed through the scaling layer to obtain a temporary detection result.
[0088] Specifically, the improved lightweight shared convolution detection module includes multiple feature extraction modules, shared convolution modules and scaling layers, as well as a detection process for fused feature images.
[0089] Multiple feature extraction modules are responsible for preliminary feature extraction of the fused feature image. Each module may be based on different convolutional network structures (such as deep convolution, separable convolution, etc.) to capture feature information at different levels and scales. Each feature extraction module performs convolution operations on the input fused feature image, and generates corresponding preliminary extraction results after processing with activation functions (such as ReLU, LeakyReLU, etc.). These results contain responses to different features and provide a basis for subsequent feature fusion.
[0090] The preliminary extraction results obtained by all feature extraction modules are then sent to the shared convolution module for processing. This module further integrates and processes the features using convolution operations with shared weights. By fusing and processing the preliminary extraction results, a temporary feature map with richer information is generated. When processing multiple features, the shared convolution module optimizes the feature fusion method to ensure the transmission and overall consistency of information. The scaling layer scales and processes the temporary feature map to ensure that the size and number of channels of the feature map match the requirements of subsequent object detection. This layer may include operations such as upsampling (such as using interpolation methods) or downsampling (using pooling methods) to adapt to different feature levels.
[0091] Finally, after scaling, the temporary feature map generates temporary detection results, including the target’s bounding box, category information, and confidence. These results can provide preliminary support for subsequent target detection and segmentation tasks.
[0092] In some preferred embodiments, Figure 2As shown in the figure, the structural diagram of the improved segmentation head network includes a lightweight shared convolution detection module and a prototype mask generation module (Proto), wherein the lightweight shared convolution detection module (LSCD, Light Shared Convolutional Detect) includes multiple feature extraction modules (Sequential modules), shared convolution modules (Shared-Conv) and scaling layers (Scale), and the Sequential module includes two CGS modules and a Conv (convolution) module. The CGS (Conv-GN-SiLU) module is obtained by replacing the batch normalization (BN, BatchNormalization) of the convolution module (CBS, Conv-BN-SiLU) in the original output layer with group normalization (GN, GroupNormalization,) to obtain the improved convolution module. The shared convolution module (Shared-Conv) consists of two CGS modules. And the designed scaling layer (Scale) corresponds to feature maps of three different scales.
[0093] The improved segmentation head network is divided into two tasks: target detection and image segmentation;
[0094] The image segmentation task is as follows: a part of the fused feature image output from the improved neck network is processed by the Sequential module, that is, two CGS modules (ConV-GN-SiLU) and a separate Conv module extract and process features. The processed feature map is linearly combined with the output of Proto (Proto module) to generate the segmentation mask result:
[0095] The target detection task is as follows: another part of the feature map of the fused feature image is processed preliminarily by the first CGS module in the Sequential module to obtain the corresponding preliminary extraction result; the feature map is further processed by a shared convolution module (Shared-Conv) composed of two CGS modules to obtain a temporary feature map: finally, the processed feature map (temporary feature map) is scaled to feature maps of three scales of 80×80, 40×40 and 20×20 by the Scale layer, and the feature maps of the three scales are processed to obtain a temporary detection result, that is, to support the detection of targets of different sizes and improve the detection accuracy; finally, the segmentation mask result generated by the segmentation task is linearly combined with the temporary detection result generated by the target detection task to obtain a temporary segmentation result. This design makes the network structure simpler, reduces computational redundancy, and improves the ability to express feature information of targets of different scales, thereby improving the stability and speed of the model for the segmentation of sea pipes and leaks.
[0096] Optionally, the original YOLOv8 network also includes a C2f module, and the RepC2f lightweight module construction process includes:
[0097] Based on the structural re-parameterization method, the bottleneck module in the C2f module is improved to obtain the RepC2f lightweight module;
[0098] The bottleneck module improvement process includes: adding a zero-filling operation or a zero-filling cancellation operation to the convolution operation in the bottleneck module.
[0099] Specifically, the construction process of the RepC2f lightweight module is an important optimization of the C2f module in YOLOv8, especially the introduction of structural reparameterization and zero padding operations in the improvement of the bottleneck module. This improvement not only improves the performance of the model, but also reduces the computational complexity. The bottleneck structure in the C2f module usually includes a dimensionality reduction convolution (1×1 convolution), followed by a depth convolution (3×3 convolution), and then a dimensionality increase convolution (1×1 convolution). This structure is usually used to reduce the number of parameters and improve computational efficiency. Through structural reparameterization, the convolution operation of the bottleneck module is optimized, so that the operation process in the inference stage can be more efficient.
[0100] Zero padding before convolution: Use appropriate zero padding in convolution operations to ensure that the output size of the feature map remains consistent and avoid information loss due to edge effects. Padding with zeros allows the model to better learn features at the edge of the input. Zero padding cancellation: During model training, redundant calculations and padding operations can be appropriately reduced to simplify the network structure and improve computational efficiency. Cancelling redundant padding operations helps reduce time complexity.
[0101] By applying the strategy of padding zeros in the structure, we finally obtain a more efficient RepC2f lightweight module structure, which achieves a good balance between computational complexity and model performance.
[0102] The introduction of the RepC2f lightweight module significantly improves the inference speed of the model by reducing redundant calculations. The re-parameterization process allows the model to avoid unnecessary calculations after the input has been convolved multiple times, especially when dealing with real-time detection tasks, the model responds faster. The use of zero padding operations helps maintain the integrity of image features, especially when dealing with edge features, allowing the model to better capture key contextual information. By enhancing the expressiveness of features, the detection ability of the model in complex scenes is improved. By removing unnecessary padding operations, the adaptability of the RepC2f lightweight module to different input sizes is enhanced. In this way, the network can maintain stability and efficiency when processing images of different sizes and scales. The optimization of re-parameterization allows the model to reduce the number of parameters while maintaining or improving performance. This is especially important on mobile devices or in resource-constrained environments, and helps to achieve lightweight design.
[0103] Combining all these optimization measures, the RepC2f lightweight module excels in object detection performance and can perform well in multiple application scenarios by reducing computational complexity and enhancing feature extraction.
[0104] Through the above optimization process, the RepC2f lightweight module implements a more efficient and flexible feature processing mechanism, thereby improving the overall performance of YOLOv8 and making it more adaptable to complex and changeable practical application needs.
[0105] In some embodiments, the improvement process of the redesigned Bottleneck module (bottleneck module) includes: first adding a zero padding operation to the 1×1 convolution operation, outputting it to the BN layer (Batch Normalization), then canceling the zero padding of the 3×3 convolution, outputting it to the BN layer, and finally passing through the SiLU activation function (Sigmoid Weighted Linear Unit, also known as Swish activation function); and when the improved model is inferred, the structural reparameterization is turned on, and the 1×1 and 3×3 convolutions in the improved Bottleneck module are linearly transformed into 1×1 and 3×3 convolutions with the BN layer respectively; the 1×1 and 3×3 convolutions are linearly transformed into 3×3 convolutions; the Bottleneck with residual connection, its single branch of residual connection is identically changed into 3×3 convolution, and then linearly transformed into 3×3 convolution with 3×3 convolution; finally, the fusion is completed through the SiLU activation function; the Bottleneck without residual connection is directly fused through the SiLU activation function. Among them, adding a padding zero operation in the 1×1 convolution operation helps to maintain the spatial dimension of the feature map, thereby retaining more original information during the feature fusion process, which helps to maintain or even improve the detection accuracy.
[0106] Optionally, the training and tuning of the initial segmentation model by using the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model includes:
[0107] Segmenting the image sample data using the initial segmentation model to obtain a temporary segmentation result;
[0108] The initial segmentation model is optimized by using the temporary segmentation result and the corresponding label data, and the optimized initial segmentation model is used as the submarine pipeline leakage segmentation model.
[0109] Optionally, segmenting the image sample data by using the initial segmentation model to obtain a temporary segmentation result includes:
[0110] Performing feature extraction on the image sample data through the improved backbone network to obtain a plurality of temporary feature-extracted images;
[0111] Performing feature fusion on all the temporary feature extraction images through the improved neck network to obtain a fused feature image;
[0112] The fused feature image is segmented by the improved segmentation head network to obtain the temporary segmentation result.
[0113] Optionally, the improved segmentation head network further includes a prototype mask generation module, and the segmenting of the fused feature image by the improved neck network to obtain the temporary segmentation result includes:
[0114] Processing the fused feature image through the prototype mask generation module to obtain a segmentation mask result;
[0115] Detecting the fused feature image through the lightweight shared convolution detection module to obtain the temporary detection result;
[0116] The segmentation mask result and the temporary detection result are linearly combined to obtain the temporary segmentation result.
[0117] Specifically, the initial segmentation model is used to segment the image sample data to obtain a temporary segmentation result. This step provides a basis for subsequent model tuning.
[0118] The image samples are input into the improved backbone network to extract features. These feature images can express different levels and details of the image. Then, multiple temporary feature extraction images are fused through the improved neck network to generate a fused feature image. This step provides richer contextual information for subsequent segmentation. Next, the fused feature image is input into the improved segmentation head network for processing to achieve the final segmentation output. In the segmentation head network, the fused feature image is further processed by the prototype mask generation module to generate a segmentation mask result, which is a preliminary positioning of the segmentation target area. At the same time, the lightweight shared convolution module detects the fused feature image and generates a temporary detection result. Finally, the final temporary segmentation result is obtained by linearly combining the segmentation mask result and the temporary detection result. This combination method ensures the accuracy of the segmentation result and uses the advantages of both to improve the segmentation performance. By comparing the temporary segmentation result with the corresponding label data, the initial segmentation model is tuned using the loss function to minimize the segmentation error. The tuned model is identified as the submarine pipeline leakage segmentation model.
[0119] By combining improved feature extraction and fusion strategies, the model can more accurately capture the complex features of submarine pipeline leakage, thereby improving segmentation accuracy. And by using improved backbone and neck networks, the features can more comprehensively characterize the image, thereby improving the model's overall understanding of submarine pipeline leakage. Finally, combining prototype mask generation with lightweight shared convolution modules allows the model to maintain stable performance in complex scenes and adapt to images under different lighting and viewing conditions.
[0120] The lightweight modules (such as the lightweight shared convolution detection module) effectively reduce the computational complexity of the model, ensuring its high efficiency in real-time applications. The proposed architecture can be applied to other related tasks and can be extended to different categories of image segmentation applications by adjusting the model structure and training strategy.
[0121] In summary, the design of the submarine pipeline leakage segmentation model makes full use of the advanced network structure and effective feature extraction and fusion strategies, demonstrates excellent segmentation capabilities and efficient operation performance, and is suitable for wide promotion in practical applications.
[0122] Optionally, the optimizing the initial segmentation model by using the temporary segmentation result and the corresponding label data, and using the optimized initial segmentation model as the submarine pipeline leakage segmentation model, comprises:
[0123] Based on the Inner-EIoU loss function, a loss calculation is performed on the temporary segmentation result and the corresponding label data to obtain a loss output;
[0124] The model parameters of the initial segmentation model are adjusted according to the loss output until the loss input meets a preset condition, and the initial segmentation model after parameter adjustment is used as the submarine pipeline leakage segmentation model.
[0125] Specifically, during the model training process, the fused feature image is first used to generate a temporary segmentation result through the improved segmentation head network. This result is a preliminary output used to judge the performance of the model in the current training state. The Inner-EIoU (Intersection over Union) loss function is used to calculate the loss of the temporary segmentation result and the corresponding label data. The Inner-EIoU loss function focuses on detecting the overlap of the target area, especially the boundaries, and can more effectively capture the true shape of the target. The calculation formula for this loss is usually:
[0126] Inner-EIOU definition formula:
[0127] ;
[0128] in, is the value of the inner-extended intersection-over-union (IoU) loss function. IoU is the intersection over union (IoU), which is used to measure the overlap between the predicted area and the true area, that is, the ratio of the area of the intersection of the predicted box and the true box to the area of the merged area. is the value of the extended intersection-over-union (EIoU) loss function, It is the internal intersection-union ratio, focusing on the degree of overlap inside the target area, that is, the loss of the auxiliary bounding box.
[0129] Based on the loss output obtained, the back-propagation algorithm is used to adjust the parameters of the initial segmentation model. This process involves calculating the gradient of the loss with respect to each parameter and using an optimization algorithm (such as Adam or SGD) to update the model parameters. The adjustment process continues until the loss input meets the preset conditions, such as the loss drops to a certain threshold or after a set number of training iterations. The initial segmentation model after parameter adjustment is determined as the submarine pipeline leakage segmentation model, ready for subsequent verification and testing.
[0130] The Inner-EIoU loss function is used to dynamically adjust the auxiliary bounding box through the scale factor, which accelerates the convergence of the loss in the sample and the regression of the bounding box, reduces the difference between the predicted box and the real box, and thus improves the accuracy of target segmentation.
[0131] That is, through the Inner-EIoU loss function, the model can more effectively learn the spatial relationship of the target area, especially the details of the boundary, thereby improving the overall segmentation accuracy. In addition, the Inner-EIoU loss emphasizes the overlap of the internal and boundary areas, which makes the model perform better when dealing with complex boundaries and effectively reduces the phenomenon of mis-segmentation. The adjustment process can be automatically optimized according to the feedback of specific data to ensure that the model can adapt to different seabed environments or leakage characteristics and improve the generalization ability of the model. Finally, by dynamically adjusting the loss and model parameters, the model can effectively avoid overfitting of the training set and promote the performance of the model on unseen data.
[0132] In summary, in this optimization process, by using the Inner-EIoU loss function and combining parameter adjustment, the submarine pipeline leakage segmentation model has achieved significant improvements in accuracy, boundary recognition, adaptability, and prevention of overfitting, thereby improving its reliability and practicality in practical applications.
[0133] In some embodiments, Figure 3As shown, the initial segmentation model includes an improved backbone network (Backbone), an improved neck network (Neck) and an improved segmentation head network (Head). The improved backbone network includes CBS (Conv-Bn-SiLU, a combined structure. "Conv" represents convolution layer (Convolution), "Bn" represents batch normalization layer (Batch Normalization), and "SiLU" is an activation function (Sigmoid-weighted Linear Unit). This combination is widely used in some deep learning models) and RepC2f, the improved neck network includes RepC2f, and the improved segmentation head network includes Proto and LSCD. The specific process of model training is as follows: input the image sample data and the corresponding label data into the initial segmentation model, extract the features of the data through the modules in the improved backbone network, input the obtained feature image into the improved neck network, perform feature fusion on the output of the improved backbone network through the modules in the improved neck network, input the obtained fusion data into the improved segmentation head network to obtain the final temporary segmentation result, and finally calculate the loss through the temporary segmentation result and the corresponding label data. According to the obtained loss, the parameters of the initial segmentation model are adjusted using the back propagation algorithm until the loss value meets the preset conditions, such as the loss drops to a certain threshold or after a set number of training iterations. The initial segmentation model after parameter adjustment is defined as the submarine pipeline leakage segmentation model. Among them, in the figure, SPPF (Spatial Pyramid Pooling-Fast). It is generally used to perform multi-scale pooling operations on image features to extract feature information at different levels, which helps to improve the model's ability to recognize and process objects of different sizes; Upsample is upsampling; C (concat) means concatenation, and X means linear combination, a linear operation; Crop: crops the mask according to the target detection box or other requirements; Threshold: applies the set threshold to convert the cropped mask into a binary mask to generate the final segmentation result.
[0134] In some specific embodiments, the submarine pipeline leakage segmentation model is experimentally verified, including: ablation experiments and comparative experiments, to explore the impact of the proposed improvement process on the performance of the YOLOv8 model. Among them, the indicators for evaluating model performance are mainly the following: precision (Precision, P), recall (Recall, R), and mean Average Precision (mAP). Model lightweight indicators: FLOPs (Floating Point Operations, floating point operations), parameters (Params) and FPS (Frames Per Second, frame rate, i.e., the number of frames transmitted per second). This experiment uses mAP50-95, FLOPs, parameters and FPS as performance reference indicators. The larger the average precision, the higher the overall accuracy of the model.
[0135] 1. Ablation experiment: During the experiment, all RepC2f modules are re-parameterized. After the re-parameterization, the base model parameters are reduced, so the accuracy will decrease. The experimental results are shown in Table 1.
[0136] Table 1. Comparison of ablation experiments
[0137]
[0138] As shown in Table 1, after using Inner-EIoU to improve the loss function of the original model, the accuracy is improved by 1%. With the use of the improved segmentation head network, the model is improved by 0.1% and the speed is increased by 0.68 FPS. Compared with the original model, the final model has only a 0.3% difference in accuracy, while the number of parameters is reduced by 6.9 MB, the floating point operation amount is reduced by 8.1 G, and the model inference speed is increased by 10.82 FPS. Among them, YOLOv8s-seg is the basic model.
[0139] 2. Comparative Experiment: In order to verify the advancedness of Inner-EIoU, Inner-EIoU is compared with other loss functions under the premise of keeping the same experimental environment and setting parameters. The comparative experiments are shown in Table 2. Compared with other loss functions, the mAP50 of Inner-EIoU is 94.8%, and the strict index is 71.1%.
[0140] Table 2 Inner-EIoU comparison experiment
[0141]
[0142] The final experimental results prove that the submarine pipeline leakage segmentation model is faster, smaller, more accurate and faster in segmenting leakage points, occupies less resources in embedded devices, and is more suitable for submarine pipeline inspection tasks of snake-like underwater robots. Among them, CIoU (Complete IoU) is used to measure the difference between the predicted box and the true box in target detection; SIoU (Scale-Invariant IoU) is an evaluation indicator used in target detection tasks; Inner-CIoU (Inner Complete IoU); Inner-SIoU (InnerScale-Invariant IoU).
[0143] like Figure 4 As shown, an embodiment of the present invention provides a submarine pipeline leakage segmentation model building device 400, comprising:
[0144] An acquisition unit 410 is used to acquire image data of a submarine pipeline to be tested;
[0145] The processing unit 420 is used to enhance the image data and divide the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data;
[0146] The processing unit 420 is also used to train and tune the initial segmentation model through the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network, an improved neck network and an improved segmentation head network, and the improved backbone network and the improved neck network both include a RepC2f lightweight module.
[0147] The submarine pipeline leakage segmentation model construction device of this embodiment is used to implement the submarine pipeline leakage segmentation model construction method described above. Its advantages over the prior art are the same as the advantages of the submarine pipeline leakage segmentation model construction method described above over the prior art, and will not be repeated here.
[0148] like Figure 5 As shown, an embodiment of the present invention provides a method for segmenting submarine pipeline leakage, comprising:
[0149] Acquire image data of the target submarine pipeline to be tested;
[0150] The image data of the target submarine pipeline to be measured is input into the submarine pipeline leakage segmentation model obtained by the submarine pipeline leakage segmentation model construction method to obtain the segmentation result of the target submarine pipeline to be measured.
[0151] The advantages of the submarine pipeline leakage segmentation method of this embodiment compared with the prior art are the same as the advantages of the above-mentioned submarine pipeline leakage segmentation model construction method compared with the prior art, which will not be repeated here.
[0152] An embodiment of the present invention provides a submarine pipeline leakage segmentation device, comprising:
[0153] An acquisition module is used to acquire image data of the target submarine pipeline to be tested;
[0154] The processing module is used to input the image data of the target submarine pipeline to be measured into the submarine pipeline leakage segmentation model obtained by the submarine pipeline leakage segmentation model construction method to obtain the segmentation result of the target submarine pipeline to be measured.
[0155] The advantages of the submarine pipeline leakage segmentation device of this embodiment compared with the prior art are the same as the advantages of the above-mentioned submarine pipeline leakage segmentation model construction method compared with the prior art, which will not be repeated here.
[0156] like Figure 6 As shown, an electronic device 600 provided by an embodiment of the present invention includes a memory 610 and a processor 620; the memory 610 is used to store a computer program; the processor 620 is used to implement the above-mentioned method for constructing a submarine pipeline leakage segmentation model when executing the computer program.
[0157] In other words, an electronic device 600 includes a memory 610 and a processor 620 coupled to the memory 610; the memory 610 is configured to store a computer program; and the processor 620 is configured to perform the following operations when executing the computer program:
[0158] Acquire image data of the submarine pipeline to be tested;
[0159] Performing enhancement processing on the image data, and dividing the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data;
[0160] The initial segmentation model is trained and tuned by the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network, an improved neck network and an improved segmentation head network, and the improved backbone network and the improved neck network both include a RepC2f lightweight module.
[0161] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for constructing a submarine pipeline leakage segmentation model is implemented.
[0162] In other words, a non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor performs the following operations:
[0163] Acquire image data of the submarine pipeline to be tested;
[0164] Performing enhancement processing on the image data, and dividing the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data;
[0165] The initial segmentation model is trained and tuned by the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network, an improved neck network and an improved segmentation head network, and the improved backbone network and the improved neck network both include a RepC2f lightweight module.
[0166] An electronic device 600 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device 600 is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 600 can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present invention described and / or required herein.
[0167] The electronic device 600 includes a computing unit, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) or a computer program loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for the operation of the device can also be stored. The computing unit, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0168] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. In the present application, the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present invention. In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0169] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. A method for constructing a submarine pipeline leakage segmentation model, characterized in that: include: Acquire image data of the submarine pipeline to be tested; Performing enhancement processing on the image data, and dividing the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data; The initial segmentation model is trained and tuned by the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network, an improved neck network and an improved segmentation head network, and the improved backbone network and the improved neck network both include a RepC2f lightweight module; The improved segmentation head network construction process includes: Obtain an original YOLOv8 network, wherein the original YOLOv8 network includes an original segmentation head network; Adding a lightweight shared convolution detection module to the original segmentation head network to obtain the improved segmentation head network; The lightweight shared convolution detection module is used to detect the fused feature image to obtain a temporary detection result, and the fused feature image is the output data of the improved neck network; The original YOLOv8 network also includes a C2f module, and the RepC2f lightweight module construction process includes: Based on the structural re-parameterization method, the bottleneck module in the C2f module is improved to obtain the RepC2f lightweight module; The bottleneck module improvement process includes: adding a zero-filling operation or a zero-filling cancellation operation to the convolution operation in the bottleneck module.
2. The method for constructing a submarine pipeline leakage segmentation model according to claim 1, characterized in that: The lightweight shared convolution detection module includes multiple feature extraction modules, a shared convolution module and a scaling layer. The detection of the fused feature image to obtain a temporary detection result includes: Perform preliminary extraction on the temporary detection results respectively by each of the feature extraction modules to obtain corresponding preliminary extraction results; Processing all the preliminary extraction results through the shared convolution module to obtain a temporary feature map; The temporary feature map is scaled and processed through the scaling layer to obtain a temporary detection result.
3. The method for constructing a submarine pipeline leakage segmentation model according to claim 1, characterized in that: The initial segmentation model is trained and tuned by the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model, including: Segmenting the image sample data using the initial segmentation model to obtain a temporary segmentation result; The initial segmentation model is optimized by using the temporary segmentation result and the corresponding label data, and the optimized initial segmentation model is used as the submarine pipeline leakage segmentation model.
4. The method for constructing a submarine pipeline leakage segmentation model according to claim 3, characterized in that: The step of segmenting the image sample data by using the initial segmentation model to obtain a temporary segmentation result includes: Performing feature extraction on the image sample data through the improved backbone network to obtain a plurality of temporary feature-extracted images; Performing feature fusion on all the temporary feature extraction images through the improved neck network to obtain a fused feature image; The fused feature image is segmented by the improved segmentation head network to obtain the temporary segmentation result.
5. The method for constructing a submarine pipeline leakage segmentation model according to claim 4, characterized in that: The improved segmentation head network also includes a prototype mask generation module, and the segmentation of the fused feature image by the improved segmentation head network to obtain the temporary segmentation result includes: Processing the fused feature image through the prototype mask generation module to obtain a segmentation mask result; Detecting the fused feature image through the lightweight shared convolution detection module to obtain the temporary detection result; The segmentation mask result and the temporary detection result are linearly combined to obtain the temporary segmentation result.
6. The method for constructing a submarine pipeline leakage segmentation model according to claim 4, characterized in that: The step of optimizing the initial segmentation model by using the temporary segmentation result and the corresponding label data, and using the optimized initial segmentation model as the submarine pipeline leakage segmentation model, includes: Based on the Inner-EIoU loss function, a loss calculation is performed on the temporary segmentation result and the corresponding label data to obtain a loss output; The model parameters of the initial segmentation model are adjusted according to the loss output until the loss input meets a preset condition, and the initial segmentation model after parameter adjustment is used as the submarine pipeline leakage segmentation model.
7. A submarine pipeline leakage segmentation model construction device, characterized in that: include: An acquisition unit, used for acquiring image data of the submarine pipeline to be tested; A processing unit, configured to perform enhancement processing on the image data and to divide the processed image data to obtain a submarine pipeline segmentation data set, wherein the submarine pipeline segmentation data set includes image sample data and corresponding label data; The processing unit is also used to train and tune the initial segmentation model through the image sample data and the corresponding label data to obtain a submarine pipeline leakage segmentation model; wherein the submarine pipeline leakage segmentation model is used to obtain the segmentation result of the submarine pipeline to be tested, and the initial segmentation model is constructed based on an improved YOLOv8 network, the improved YOLOv8 network includes an improved backbone network, an improved neck network and an improved segmentation head network, and the improved backbone network and the improved neck network both include a RepC2f lightweight module; wherein the improved segmentation head network construction process includes: obtaining an original YOLOv8 network, the original YOLOv8 network includes an original Segmentation head network; adding a lightweight shared convolution detection module to the original segmentation head network to obtain the improved segmentation head network; wherein the lightweight shared convolution detection module is used to detect the fused feature image to obtain a temporary detection result, and the fused feature image is the output data of the improved neck network; the original YOLOv8 network also includes a C2f module, and the RepC2f lightweight module construction process includes: based on the structure re-parameterization method, the bottleneck module in the C2f module is improved to obtain the RepC2f lightweight module; wherein the bottleneck module improvement process includes: adding a padding zero operation or a padding zero cancellation operation to the convolution operation in the bottleneck module.
8. A method for segmenting submarine pipeline leakage, characterized in that: include: Acquire image data of the target submarine pipeline to be tested; The image data of the target submarine pipeline to be measured is input into the submarine pipeline leakage segmentation model obtained by the submarine pipeline leakage segmentation model construction method according to any one of claims 1 to 6 to obtain the segmentation result of the target submarine pipeline to be measured.
Citation Information
Patent Citations
Multi-scale real-time defogging method and device based on structure re-parameterization
CN116542865A
Commercial vehicle long-distance target detection perception network model based on improved YOLOv8 and detection method
CN118155171A