AUV-oriented multi-scale lightweight underwater image instance segmentation model construction method

By constructing a multi-scale lightweight underwater image instance segmentation model, the problems of insufficient multi-scale feature extraction capability and high computational complexity in underwater environments are solved, efficient and accurate object detection and segmentation on the AUV platform are achieved, and the autonomous perception ability of AUV is improved.

CN120472159APending Publication Date: 2025-08-12HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510552199.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing underwater image instance segmentation method has problems such as insufficient multi-scale feature extraction capability, poor image quality and high computational complexity in underwater environments, making it difficult to efficiently and accurately perform object detection and segmentation on AUV platforms.

Method used

A multi-scale lightweight underwater image instance segmentation model is constructed. By introducing multi-scale grouped convolution MSGConv and grouped convolution GroupConv, combined with the dynamic weighted loss function WIoU v1, we optimize feature extraction and model structure, reduce the computational complexity and improve segmentation accuracy.

Benefits of technology

Achieve high-precision underwater target detection and segmentation under limited computing resources, improve the autonomous perception of AUV, and is suitable for fields such as marine resource exploration and underwater target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472159A_ABST
    Figure CN120472159A_ABST
Patent Text Reader

Abstract

The invention discloses an AUV (Autonomous Underwater Vehicle)-oriented multi-scale lightweight underwater image instance segmentation model construction method. The method comprises the following steps: acquiring an underwater target object image data set and instance segmentation marks; converting the format of the annotation file, and randomly dividing a data set into a training set, a verification set and a test set in proportion; a novel C3K2MSGC module is constructed; grouping convolution is introduced into a segmentation detection head, and an efficient SegEfficent segmentation detection head is constructed; and introducing a WIoU loss function training model, segmenting the underwater image instance, and generating an accurate target segmentation image. According to the method, the target detection and segmentation performance of the AUV platform under limited computing resources is effectively improved, high precision and low computing cost are both considered, and the method can be widely applied to the fields of marine resource exploration, underwater target detection, ecological monitoring and the like; and an efficient and real-time image instance segmentation solution is provided for autonomous perception of the AUV in a complex underwater environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the intersection of artificial intelligence and underwater robot technology, and in particular to a method for constructing a multi-scale lightweight underwater image instance segmentation model for AUVs. Background Art

[0002] AUVs, with their autonomy, high maneuverability, and adaptability to complex underwater environments, have become essential tools for ocean exploration and underwater operations. Instance segmentation of underwater images is a key technology for AUVs to perform underwater exploration missions based on artificial intelligence (AI). It has broad applications in areas such as marine resource exploration, underwater target detection, and marine ecosystem monitoring. However, limited communication in underwater environments severely constrains data transmission and remote computing capabilities. Underwater, acoustic waves are the primary means of communication, but their slow propagation speed, limited bandwidth, and significant susceptibility to environmental interference can lead to high latency and packet loss. Fiber optics, wired connections, and satellite communications are extremely limited in their underwater applications and cannot meet the real-time, high-capacity data transmission requirements of AUVs. Therefore, unlike land-based equipment that relies on cloud computing and high-speed communication networks, AUVs often cannot rely on remote computing resources when performing their missions and must rely on their own computing power for data acquisition and processing. This places higher demands on underwater target detection and instance segmentation models: maintaining high efficiency within limited computing resources while balancing lightweightness and accuracy to ensure that AUVs can autonomously complete their missions in complex underwater environments.

[0003] Existing instance segmentation methods are primarily based on deep learning techniques, such as Mask R-CNN and the YOLO series. While these methods perform well in terrestrial scenarios, they still face numerous limitations in underwater environments. First, the scale of objects in underwater images varies greatly, and existing methods lack the ability to extract multi-scale features, making it difficult to accurately segment both large and small objects. Second, due to factors such as light attenuation, scattering effects, and water turbidity, underwater image quality is poor, resulting in blurred boundaries and limited segmentation accuracy. Furthermore, existing models typically have a large number of parameters and high computational complexity, making them difficult to deploy in underwater devices such as AUVs, which have limited computing resources.

[0004] Therefore, this paper proposes a multi-scale, lightweight underwater instance segmentation method based on an improved YOLOv11-Seg algorithm, aiming to build an efficient, lightweight target detection and segmentation algorithm suitable for AUV platforms. By optimizing the multi-scale feature extraction network, improving the lightweight model structure, and adopting a training strategy with a dynamic weighted loss function, the AUV's target recognition capability in complex underwater environments is improved. Summary of the Invention

[0005] In light of this, the present invention provides a method for constructing a multi-scale, lightweight underwater image instance segmentation model for autonomous underwater vehicles (AUVs). This method can achieve high-precision, low-cost underwater instance segmentation under limited computing resources, providing technical support for applications such as marine resource exploration, underwater target detection, and ecological monitoring, while enhancing the autonomous perception capabilities and mission execution efficiency of AUVs.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0007] The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUVs includes the following steps:

[0008] Step 1: Obtain an underwater target object image dataset and perform instance segmentation and annotation;

[0009] Step 2: Convert the annotation file format and randomly divide the dataset into training set, validation set and test set according to the proportion;

[0010] Step 3: Introduce convolution structures of different sizes, and combine the idea of group convolution to design multi-scale group convolution MSGConv and construct a new C3K2_MSGC module;

[0011] Step 4: Introduce group convolution GroupConv into the segmentation detection head to construct an efficient Seg_Efficient segmentation detection head;

[0012] Step 5: Use the early stopping strategy to prevent overfitting, and introduce the WIoU loss function to train the model and evaluate the model performance;

[0013] Step 6: Use the trained model to perform instance segmentation on the underwater image to generate an accurate target segmentation image.

[0014] Preferably, in step 1, the underwater image dataset SUIM created by the Interactive Robotics and Vision Laboratory of the University of Minnesota is used. The dataset is an open source resource, and the Labelme tool is used to finely label the instance objects in each image in the dataset;

[0015] The SUIM dataset contains a total of 1,635 high-quality underwater environment images, which are collected from a variety of underwater detection equipment and different ocean environments.

[0016] The objects covered in the SUIM dataset are divided into six categories, including human divers, aquatic plants and seaweeds, shipwrecks and relics, underwater robots, coral reefs and invertebrates, fish and vertebrates.

[0017] Preferably, in step 2, the images annotated by the Labelme tool are saved as annotation files in JSON format, the contents of the JSON file are parsed by a custom Python script, and then converted into the TXT format required for YOLO model training; the converted annotation files correspond one-to-one to the original images, and then the 1635 annotated images are randomly divided into training set, validation set and test set in a ratio of 8:1:1.

[0018] Preferably, in the step 3, in the multi-scale group convolution MSGConv module, the obtained input is divided into two groups according to the number of channels c, the number of channels in each group is c / 2, the first group divides the original image into cheap features and unprocessed features, and the second group divides the unprocessed features into two parts on average, and uses 3×3 and 5×5 convolution kernels to perform convolution operations respectively. The obtained results are connected with the cheap features obtained from the first group, and the connected features are independent of each other in each channel. By connecting the outputs and then performing 1×1 convolution, point-to-point convolution is realized, and the fusion of multi-channel information is completed.

[0019] Preferably, the step 3 further includes floating point operations (FLOPs): this indicator is used to measure the complexity of the algorithm or model;

[0020] The calculation formula is shown in (1):

[0021] FLOPs = C out W out ·H out ·C in ·k w ·K h #(1)

[0022] Among them, C out Indicates the number of channels of the output feature map, W out Indicates the width of the output feature map, H out Represents the height of the output feature map, C in Indicates the number of channels of the input feature map, k w Represents the width of the convolution kernel, K h Indicates the height of the convolution kernel.

[0023] Preferably, step 3 further includes calculating the FLOPs ratio of the standard convolution and MSGConv, and the calculation formula is shown in (2):

[0024]

[0025] Among them, C out Indicates the number of channels of the output feature map, W out Indicates the width of the output feature map, H outRepresents the height of the output feature map, C in Indicates the number of channels of the input feature map.

[0026] Preferably, in step 4, the Detect_Efficient module is introduced, which uses two 3×3 GroupConvs to replace the combination of depth-wise separable convolution DWConv and ordinary convolution Conv in the original Detect module. Each GroupConv divides the input feature map into c / 16 groups, each group containing 16 channels; Seg_Efficient retains the cv4 module in Segment. In the forward propagation, Seg_Efficient directly calls Detect_Efficient.forward, combined with the C3K2_MSGC module in step 3, to construct the final improved network model.

[0027] Preferably, in step 5, Wise-IoUv1 is used as the loss function, and the formula for calculating the area of the union is shown in (3):

[0028] S u =wh+w gt h gt -W i H i #(3)

[0029] Among them, w and h represent the width and height of the anchor box respectively, w gt and h gt Represents the width and height of the target box, W i and H i Represent the width and height of the intersection box of the anchor box and the target box respectively;

[0030] The formula for calculating the standard loss function is shown in (4):

[0031]

[0032] Among them, S u Represents the area of the union, and the intersection over union (IoU) is used to measure the degree of overlap between the predicted box and the true box in the target detection task;

[0033] The formula for calculating the WIoU v1 loss function is shown in (5):

[0034]

[0035] in, Represents the weight factor of WIoU, calculated The formula for the value of is shown in (6):

[0036]

[0037] Among them, x and y represent the coordinates of the center point of the anchor box, x gt and y gt Represents the coordinates of the center point of the target frame, W g and H g Respectively represent the width and height of the minimum enclosing box;

[0038] The superscript * in formula (6) indicates that Will not produce gradients that hinder convergence, W g , H g Separation from the computational graph; This design will significantly enhance the quality of anchor frames. This will significantly reduce the quality of the anchor box. In addition, when the overlap between the anchor box and the target box is high, the mechanism can significantly reduce the dependence on the center point distance.

[0039] Preferably, in step 5, the training set is input into the improved model for training, the training rounds are set to 500, and an early stopping strategy (patience is set to 50) is adopted to avoid model overfitting; the model performance is regularly evaluated using the validation set, and the precision rate P and recall rate R are commonly used indicators for evaluating the model. The precision rate P is defined as the proportion of positive samples predicted to be positive, and the calculation formula is shown in (7):

[0040]

[0041] Among them, N TP is the number of correctly predicted positive samples, N FP is the number of negative samples that are incorrectly predicted as positive samples;

[0042] The recall rate R represents the proportion of actually positive samples that are correctly predicted as positive samples. The calculation formula is shown in (8):

[0043]

[0044] Among them, N TP is the number of correctly predicted positive samples, N FN is the number of positive samples that are incorrectly predicted as negative samples;

[0045] The F1 value is the harmonic mean of the precision P and recall R values, and its calculation formula is shown in (9):

[0046]

[0047] The AP value is obtained by integrating the PR curve, as shown in formula (10):

[0048]

[0049] Among them, r i represents the recall threshold corresponding to the first interpolation point in the P interpolation segment arranged in ascending order, P inter (r i+1 ) means that the recall rate is r i+1 The accuracy of time;

[0050] mAP is the average of the AP values of each category, which is used to evaluate the overall performance of the multi-category model. The calculation formula is shown in (11):

[0051]

[0052] Where K is the total number of categories;

[0053] The calculation of the number of frames per second (FPS) of the image processed is shown in formula (12):

[0054]

[0055] Preferably, in step 6, the optimal weight is selected as the final segmentation model weight, thereby constructing an instance segmentation model for multi-scale lightweight underwater images of the AUV platform; the test data set is input into the trained network model, and the instance segmentation prediction result is obtained through forward propagation calculation.

[0056] Compared with the prior art, the present invention has achieved the following technical effects:

[0057] (1) The present invention combines the dynamically weighted WIoU loss function to further optimize the model's learning ability for difficult samples, improve the segmentation accuracy, and overcome the problem of poor generalization ability of existing models;

[0058] (2) The present invention also significantly improves the model's feature extraction capability for underwater multi-scale targets by designing a lightweight multi-scale feature extraction module C3K2_MSGC and a lightweight segmentation detection head Seg_Efficent, while reducing the model's computational complexity and parameter count. This overcomes the problem in existing models where the AUV platform cannot rely on its own computing power to efficiently and accurately detect and segment underwater target objects when underwater communication conditions are limited, and provides reliable technical support for underwater target detection, marine resource exploration and other fields based on AUV platforms. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a flowchart of the multi-scale lightweight underwater instance segmentation method based on the improved YOLOv11-Seg of the present invention;

[0060] Figure 2 Schematic diagram of the structure of MSGConv of the present invention;

[0061] Figure 3 Schematic diagram of the structure of the C3K2_MSGC module of the present invention;

[0062] Among them, there are C3K_MSGC module and Bottleneck_MSGC module;

[0063] Figure 4 This is a schematic diagram of the structure of the Seg_Efficient module of the present invention;

[0064] Figure 5 This is a schematic diagram of the overall network structure of the improved model of the present invention;

[0065] Among them, there are C2PSA module and SPPF module;

[0066] Figure 6 Reference graph for calculating the WIoU loss function of the present invention;

[0067] Figure 7 Schematic diagram of the segmentation results of the model of the present invention. DETAILED DESCRIPTION

[0068] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0069] like Figure 1 As shown, the present invention discloses a method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV, comprising the following steps:

[0070] Step 1: Obtain an underwater target object image dataset and use the Labelme tool for instance segmentation and annotation

[0071] The underwater image dataset SUIM, created by the Interactive Robotics and Vision Laboratory at the University of Minnesota, is used. As an open-source resource, this dataset contains 1,635 high-quality underwater environment images. These images were collected from a variety of underwater detection equipment and different marine environments, and have significant data diversity and environmental representativeness. Based on the characteristics of the marine ecosystem, the objects covered in the dataset are divided into six categories, including human divers, aquatic plants and seagrasses, shipwrecks and relics, underwater robots (including ROVs, AUVs, etc.), coral reefs and invertebrates, fish and vertebrates. Then, the Labelme tool is used to finely annotate the instance objects in each image in the dataset.

[0072] Step 2: Convert the annotation file format and randomly divide the dataset into training set, validation set and test set according to the proportion

[0073] The images annotated by the Labelme tool are saved as annotation files in JSON format. The contents of the JSON files are parsed by a custom Python script and then converted into the TXT format required for YOLO model training. The converted annotation files correspond one-to-one with the original images to ensure data consistency. The 1,635 annotated images are then randomly divided into training, validation, and test sets in an 8:1:1 ratio. The training set is used for model parameter optimization and feature learning, the validation set is used to evaluate the model's segmentation performance under different hyperparameter settings, and the test set is used to ultimately evaluate the model's performance on unseen data to ensure the model's robustness and practicality.

[0074] Step 3: Introduce convolution structures of different sizes, and combine the idea of grouped convolution to design multi-scale grouped convolution (MSGConv) and build a new C3K2_MSGC module

[0075] The scales of objects in underwater images vary greatly. Traditional convolution only uses a single-scale convolution kernel, so it is not sufficient to distinguish the features of objects or scenes of different scales. To accurately segment both large and small objects, this paper designs multi-scale grouped convolution (MSGConv) based on the idea of grouped convolution and the channel feature fusion method used in MobileNet.

[0076] like Figure 2As shown in the figure, in the MSGConv module, the input is divided into two groups according to the number of channels c, and the number of channels in each group is c / 2. The first group divides the original image into cheap features and unprocessed features; the second group divides the unprocessed features into two parts, and performs convolution operations using 3×3 and 5×5 convolution kernels respectively; the results are connected with the cheap features obtained from the first group, and the connected features are independent of each other in each channel; by connecting the outputs and then performing 1×1 convolution, point-to-point convolution is realized, and the fusion of multi-channel information is completed.

[0077] FLOPs (Floating Point Operations): This metric is used to measure the complexity of an algorithm or model; its calculation formula is shown in (1):

[0078] FLOPs = C out W out ·H out ·C in ·k w ·K h #(1)

[0079] Among them, C out Indicates the number of channels of the output feature map, W out Indicates the width of the output feature map, H out Represents the height of the output feature map, C in Indicates the number of channels of the input feature map, k w Represents the width of the convolution kernel, K h Indicates the height of the convolution kernel.

[0080] The FLOPs ratio of standard convolution and MSGConv is calculated as shown in formula (2):

[0081]

[0082] Among them, C out Indicates the number of channels of the output feature map, W out Indicates the width of the output feature map, H out Represents the height of the output feature map, C in Indicates the number of channels of the input feature map.

[0083] It can be seen that compared with traditional convolution methods, MSGConv greatly reduces the number of model parameters and the amount of computation.

[0084] Then, the second ordinary convolution in the forward channel of the Bottleneck module is replaced by MSGConv to obtain a new module Bottleneck_MSGC; the Bottleneck module in the original C3K module is replaced by Bottleneck_MSGC to obtain a new module C3K_MSGC;

[0085] Finally, in the original C3K2 module, the C3K module when the parameter C3K=True is replaced by the C3K_MSGC module, and the Bottleneck module when the parameter C3K=False is replaced by the Bottleneck_MSGC module to obtain the final C3K2_MSGC module, whose structure is as follows: Figure 3 This module not only reduces the parameters and computational complexity of the entire model, but also preserves multi-scale feature information.

[0086] Step 4: Introduce group convolution (GroupConv) into the segmentation detection head to build an efficient Seg_Efficient segmentation detection head

[0087] Based on the YOLOv11 segmentation detection head Segment, this paper proposes a new segmentation detection head Seg_Efficient. Its core improvement lies in the introduction of the Detect_Efficient module;

[0088] like Figure 4 As shown, this module uses two 3×3 GroupConv to replace the combination of depthwise separable convolution (DWConv) and ordinary convolution (Conv) in the original Detect module. Specifically, each GroupConv divides the input feature map into c / 16 groups, each containing 16 channels, which significantly reduces the number of parameters and computations. Seg_Efficient retains the cv4 module in Segment to generate mask coefficients. Due to the optimization of the Detect_Efficient module, the overall computational efficiency is further improved. In the forward propagation, Seg_Efficient directly calls Detect_Efficient.forward, making the training and inference process more efficient; these improvements significantly reduce the computational complexity and memory usage while maintaining high segmentation and detection accuracy. Finally, combined with the C3K2_MSGC module in step 3, the final improved network model is constructed. Its complete structure is shown below. Figure 5 shown.

[0089] Step 5: Use early stopping strategy to prevent overfitting and introduce WIoU loss function to train the model

[0090] In the improved model, Wise-IoU v1 is used as the loss function, which is combined with a dynamic non-monotonic focusing strategy. By evaluating the abnormality of the anchor boxes, the gradient gain is dynamically adjusted to weaken the competitive advantage of high-quality anchor boxes and suppress the negative impact of low-quality samples on the training process. This design enables the model to pay more attention to medium-quality anchor boxes, thereby improving the overall performance of the detection model.

[0091] like Figure 6 As shown, the anchor box is the area covered by the diagonal line, which is recorded as The target box is the area covered by the horizontal line, denoted as The bounding box is the minimum enclosing box, and the middle line is the line connecting the center points of the anchor box and the target box. The formula for calculating the area of the union is shown in (3):

[0092] S u =wh+w gt h gt -W i H i #(3)

[0093] Among them, w and h represent the width and height of the anchor box respectively, w gt and h gt Represents the width and height of the target box, W i and H i Represent the width and height of the intersection box of the anchor box and the target box respectively;

[0094] Among them, the intersection over union (IoU) is used to measure the overlap between the predicted box and the real box in the target detection task. The calculation method of the standard loss function is shown in formula (4):

[0095]

[0096] Among them, S u Represents the area of the union, and the intersection over union (IoU) is used to measure the degree of overlap between the predicted box and the real box in the target detection task.

[0097] Because low-quality examples are unavoidable in training data, traditional geometric metrics (such as distance and aspect ratio) often over-penalize these examples, resulting in reduced model generalization. The ideal loss function should moderately reduce the impact of geometric metrics when there is a high degree of overlap between the predicted and true boxes, avoiding excessive interference in the training process and thus improving the model's generalization performance.

[0098] Based on this idea, the distance attention mechanism is constructed by introducing the distance metric, and finally the WIoU v1 loss function including the dual attention mechanism is designed. The formula for calculating the value of the WIoU v1 loss function is shown in (5):

[0099]

[0100] in, Represents the weight factor of WIoU, calculated The formula for the value of is shown in (6):

[0101]

[0102] Among them, x and y represent the coordinates of the center point of the anchor box, x gt and y gt Represents the coordinates of the center point of the target frame, W g and H g Respectively represent the width and height of the minimum enclosing box.

[0103] The superscript * in formula (6) indicates that Will not produce gradients that hinder convergence, W g , H g Separation from the computational graph; This design will significantly enhance the quality of anchor frames. This will significantly reduce the quality of the anchor box. In addition, when the overlap between the anchor box and the target box is high, the mechanism can significantly reduce the dependence on the center point distance.

[0104] The training set is input into the improved model for training. The training rounds are set to 500 times, and the early stopping strategy (patience is set to 50) is adopted to avoid model overfitting. The model performance is regularly evaluated using the validation set. Precision P and recall R are commonly used indicators for evaluating the model. Precision P is defined as the proportion of positive samples predicted to be positive. Its calculation formula is shown in (7):

[0105]

[0106] Among them, N TP N is the number of correctly predicted positive samples. FP is the number of negative samples that are incorrectly predicted as positive samples.

[0107] The recall rate R represents the proportion of actually positive samples that are correctly predicted as positive samples. Its calculation formula is shown in (8):

[0108]

[0109] Among them, N TP N is the number of correctly predicted positive samples. FN The recall rate is the number of positive samples that are incorrectly predicted as negative samples. The higher the recall rate, the stronger the model's ability to correctly identify positive samples.

[0110] Relying only on P and R to evaluate the model has limitations, so we introduce F1 and mAP values. The F1 value is the harmonic mean of the precision P and recall R values. Its calculation formula is shown in (9):

[0111]

[0112] The PR curve of the model is usually plotted with the recall rate R as the X-axis and the precision rate P as the Y-axis. The AP value is obtained by integrating the PR curve and its calculation formula is shown in (10):

[0113]

[0114] Among them, r i represents the recall threshold corresponding to the first interpolation point in the P interpolation segment arranged in ascending order, P inter (r i+1 ) means that the recall rate is r i+1 time accuracy.

[0115] mAP is the average of the AP values of each category, which is used to evaluate the overall performance of the multi-category model. Its calculation formula is shown in (11):

[0116]

[0117] Where K is the total number of categories.

[0118] The number of frames per second (FPS) can be calculated using formula (12). The larger the FPS value, the more image frames the model can process per unit time, thereby improving real-time processing capabilities and better meeting the real-time requirements of the AUV platform. Therefore, by calculating the FPS value, the real-time performance of the model on the AUV platform can be effectively measured.

[0119]

[0120] Step 6: After the model training process is completed, the system will generate two weights: the best weight and the final weight.

[0121] The optimal weight is selected as the final segmentation model weight, thereby constructing an instance segmentation model for multi-scale lightweight underwater images for AUV platforms; then, the test dataset is input into the trained network model, and the instance segmentation prediction result is obtained through forward propagation calculation. The final segmentation result is as follows Figure 7 shown.

[0122] The above description is merely a preferred embodiment of the present invention and does not limit the technical scope of the present invention. Therefore, any minor modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A multi-scale lightweight underwater image instance segmentation model construction method for AUV, characterized by: The steps include: Step 1: Obtain an underwater target object image dataset and perform instance segmentation and annotation; Step 2: Convert the annotation file format and randomly divide the dataset into training set, validation set and test set according to the proportion; Step 3: Introduce convolution structures of different sizes, and combine the idea of group convolution to design multi-scale group convolution MSGConv and construct a new C3K2_MSGC module; Step 4: Introduce group convolution GroupConv into the segmentation detection head to construct an efficient Seg_Efficient segmentation detection head; Step 5: Use the early stopping strategy to prevent overfitting, and introduce the WIoU loss function to train the model and evaluate the model performance; Step 6: Use the trained model to perform instance segmentation on the underwater image to generate an accurate target segmentation image.

2. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: In step 1, the underwater image dataset SUIM, created by the Interactive Robotics and Vision Laboratory at the University of Minnesota, is used. This dataset is an open source resource, and the Labelme tool is used to finely label the instance objects in each image in the dataset. The SUIM dataset contains a total of 1,635 high-quality underwater environment images, which are collected from a variety of underwater detection equipment and different ocean environments. The objects covered in the SUIM dataset are divided into six categories, including human divers, aquatic plants and seaweeds, shipwrecks and relics, underwater robots, coral reefs and invertebrates, fish and vertebrates.

3. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: In step 2, the images annotated by the Labelme tool are saved as annotation files in JSON format. The contents of the JSON file are parsed by a custom Python script and then converted into the TXT format required for YOLO model training. The converted annotation files correspond one-to-one with the original images, and then the 1,635 annotated images are randomly divided into training, validation, and test sets in a ratio of 8:1:

1.

4. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: In the step 3, in the multi-scale group convolution MSGConv module, the obtained input is divided into two groups according to the number of channels c, and the number of channels in each group is c / 2. The first group divides the original image into cheap features and unprocessed features. The second group divides the unprocessed features into two parts on average, and convolution operations are performed using 3×3 and 5×5 convolution kernels respectively. The obtained results are connected with the cheap features obtained from the first group, and the connected features are independent of each other in each channel. By connecting the outputs and then performing 1×1 convolution, point-to-point convolution is realized, and the fusion of multi-channel information is completed.

5. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: Step 3 also includes floating point operations (FLOPs): this indicator is used to measure the complexity of the algorithm or model; The calculation formula is shown in (1): FLOPs=C out ·W out ·H out ·C in ·k w ·K h #(1) Among them, C out Indicates the number of channels of the output feature map, W out Indicates the width of the output feature map, H out Represents the height of the output feature map, C in Indicates the number of channels of the input feature map, k w Represents the width of the convolution kernel, K h Indicates the height of the convolution kernel.

6. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: Step 3 also includes the calculation of the FLOPs ratio of standard convolution and MSGConv, and the calculation formula is shown in (2): Among them, C out Indicates the number of channels of the output feature map, W out Indicates the width of the output feature map, H out Represents the height of the output feature map, C in Indicates the number of channels of the input feature map.

7. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: In step 4, the Detect_Efficient module is introduced. This module uses two 3×3 GroupConvs to replace the combination of depth-wise separable convolution DWConv and ordinary convolution Conv in the original Detect module. Each GroupConv divides the input feature map into c / 16 groups, each containing 16 channels; Seg_Efficient retains the cv4 module in Segment. In the forward propagation, Seg_Efficient directly calls Detect_Efficient.forward and combines the C3K2_MSGC module in step 3 to construct the final improved network model.

8. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: In step 5, Wise-IoU v1 is used as the loss function, and the formula for calculating the area of the union is shown in (3): S u =wh+w gt h gt -W i H i #(3) Among them, w and h represent the width and height of the anchor box respectively, w gt and h gt Represents the width and height of the target box, W i and H i Represent the width and height of the intersection box of the anchor box and the target box respectively; The formula for calculating the standard loss function is shown in (4): Among them, S u Represents the area of the union, and the intersection over union (IoU) is used to measure the degree of overlap between the predicted box and the true box in the target detection task; The formula for calculating the WIoU v1 loss function is shown in (5): in, Represents the weight factor of WIoU, calculated The formula for the value of is as shown in (6): Among them, x and y represent the coordinates of the center point of the anchor box, x gt and y gt Represents the coordinates of the center point of the target frame, W g and H g Respectively represent the width and height of the minimum enclosing box; The superscript * in formula (6) indicates that Will not produce gradients that hinder convergence, W g , H g Separation from the computational graph; This design will significantly enhance the quality of anchor frames. This will significantly reduce the quality of the anchor box. In addition, when the overlap between the anchor box and the target box is high, the mechanism can significantly reduce the dependence on the center point distance.

9. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: In step 5, the training set is input into the improved model for training. The number of training rounds is set to 500, and an early stopping strategy (patience is set to 50) is adopted to avoid model overfitting. The validation set is used to regularly evaluate the model performance. Precision P and recall R are commonly used indicators for evaluating the model. Precision P is defined as the proportion of positive samples predicted to be positive. The calculation formula is shown in (7): Among them, N TP is the number of correctly predicted positive samples, N FP is the number of negative samples that are incorrectly predicted as positive samples; The recall rate R represents the proportion of actually positive samples that are correctly predicted as positive samples. The calculation formula is shown in (8): Among them, N TP is the number of correctly predicted positive samples, N FN is the number of positive samples that are incorrectly predicted as negative samples; The F1 value is the harmonic mean of the precision P and recall R values, and its calculation formula is shown in (9): The AP value is obtained by integrating the PR curve, as shown in formula (10): Among them, r i represents the recall threshold corresponding to the first interpolation point in the P interpolation segment arranged in ascending order, P inter (r i+1 ) means that the recall rate is r i+1 The accuracy of time; mAP is the average of the AP values of each category, which is used to evaluate the overall performance of the multi-category model. The calculation formula is shown in (11): Where K is the total number of categories; The calculation of the number of frames per second (FPS) of the image processed is shown in formula (12):

10. The method for constructing a multi-scale lightweight underwater image instance segmentation model for AUV according to claim 1, characterized in that: In step 6, the optimal weight is selected as the final segmentation model weight, thereby constructing an instance segmentation model for multi-scale lightweight underwater images for AUV platforms; the test dataset is input into the trained network model, and the instance segmentation prediction result is obtained through forward propagation calculation.