A maritime multi-target ship instance segmentation method

By improving the YOLOv5 model, embedding an attention-enhanced occlusion target representation module and a multi-scale fusion module, and combining it with ship contour-assisted prediction, the problems of missed detection and incomplete segmentation in ship detection under complex maritime environments are solved, achieving higher detection accuracy and robustness.

CN117197452BActive Publication Date: 2025-11-11JIANGSU UNIV OF SCI & TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310998163.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-11-11
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

Existing technologies are prone to problems such as missed detections, false detections, and low detection accuracy in ship inspection in complex marine environments, especially incomplete segmentation results under obstructed conditions.

Method used

The YOLOv5 model is improved by embedding an attention-enhanced occluded target representation module, using a multi-scale fusion module and a ship contour-assisted prediction module. More occluded ship samples are generated through data augmentation, enhancing the model's attention to important regions and refining the ship contours.

Benefits of technology

It improves the accuracy and consistency of multi-target ship instance segmentation at sea, enhances the model's detection performance for occluded targets, reduces information loss and corrects segmentation errors, and improves the integrity and robustness of segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117197452B_ABST
    Figure CN117197452B_ABST
Patent Text Reader

Abstract

The application discloses a kind of offshore multi-target ship instance segmentation methods, steps are as follows: step 1: obtaining offshore ship image dataset;Step 2: improve YOLOv5 model, specifically: embedding attention enhancement occlusion target representation module in the backbone network of YOLOv5 model;With multi-scale fusion module replaces the multi-scale path aggregation part of YOLOv5 model;After multi-scale feature fusion module, increase multi-target segmentation module;Step 3: through the offshore ship image dataset obtained, the improved YOLOv5 model is trained, and the ship instance segmentation model is obtained;Step 4: through the ship instance segmentation model, the offshore ship data obtained in real time is processed by multi-target segmentation.The improved YOLOv5 model of the application can be used to detect and correct errors or inconsistencies that may exist in the segmentation result, can provide useful information about the occlusion area, the segmentation boundary and the segmentation result, and enhance the accuracy of instance segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ship image segmentation technology, specifically to a method for segmenting multi-target ship instances at sea based on an improved YOLOv5 model. Background Technology

[0002] Ship detection technology is a crucial method for acquiring information about ships on the ocean surface, with applications spanning from national defense and security to civilian sectors. Maritime authorities often struggle to actively locate and identify ships, while both near-shore and far-sea defense require the detection of specific targets and real-time analysis of their status to aid timely decision-making. Ship detection forms the basis of proactive maritime surveillance; however, the maritime environment is typically complex, and ships are easily affected by wind, waves, heavy rain, or other adverse weather conditions, making it difficult for cameras or other equipment to reliably acquire visual image data. Ship image instance segmentation combines object detection and semantic segmentation, requiring pixel-level segmentation of different objects. Current advanced instance segmentation methods such as Cascade Mask R-CNN, SOLOv2, and YOLACT, when directly applied to multi-ship occlusion segmentation tasks, are insensitive to ship occlusion issues, leading to numerous missed detections and incomplete segmentation. Existing research rarely focuses on multi-ship occlusion instance segmentation, failing to provide effective solutions to ship occlusion problems in multi-ship scenarios.

[0003] Chinese patent CN114627415A discloses a ship detection method based on adaptive data augmentation. This method performs multi-scale attention calculations on feature images and updates the neural network model based on the loss value, enabling the receptive field to better understand the scene. However, the detection model is easily affected by the surrounding environment in adverse weather or complex conditions, leading to errors in target recognition or failure to identify targets. Chinese patent CN114049478A discloses a method for nighttime ship target recognition, using a Fast-R-CNN network to construct an infrared ship recognition model, which can identify and detect ships at night. However, since the Fast-R-CNN neural network is a two-stage target detection network, although the recognition accuracy is high, it cannot meet the needs of real-time ship detection at sea. Chinese patent CN114283331A discloses a lightweight strip-pruned ship detection method. This method extracts feature maps of different depths using a lightweight residual convolutional network with pruning, compressing the model size and parameter count, resulting in faster detection speed. However, it cannot meet accuracy requirements in complex environments, such as missing detections and false detections in occlusion tasks. Chinese patent CN114581670A discloses a ship instance segmentation method based on spatial distribution attention. This method solves the problem of missegmentation caused by insensitivity to some ship instance segmentation through attention methods, enhances the resistance to background interference, and improves the robustness of the network. However, the resolution of the predicted mask is not high, and post-processing is too time-consuming. This paper studies deep learning-based maritime target segmentation algorithms under complex weather conditions and proposes an improved DeepLabv3+ network model. This method uses the optimal DPC (Deep Positive Correlation) structure to capture multi-scale information, resulting in higher overall network accuracy. However, in occlusion conditions, the segmentation results are prone to target adhesion problems. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method for segmenting multiple target ships at sea, thereby solving the problems of missed detections, false detections, and low detection accuracy caused by environmental occlusion due to the complex environment in which ships are located.

[0005] This invention provides a method for segmenting multiple target ship instances at sea, comprising the following steps:

[0006] Step 1: Obtain a dataset of images of ships at sea;

[0007] Step 2: Improve the YOLOv5 model, specifically by: embedding an attention-enhanced occluded target representation module into the backbone network of the YOLOv5 model; replacing the multi-scale path aggregation part of the YOLOv5 model with a multi-scale fusion module; and adding a multi-target segmentation module after the multi-scale feature fusion module.

[0008] Among them, the attention-enhanced occlusion target representation module is used to increase the YOLOv5 model's attention to important regions; the multi-scale fusion module is used to add a set of input and output nodes on the basis of the original input and output nodes to enhance the fusion characteristics; the multi-target segmentation module works together with the detection head to perform instance segmentation of the image;

[0009] Step 3: Train the improved YOLOv5 model using the acquired marine vessel image dataset to obtain a vessel instance segmentation model;

[0010] Step 4: Perform multi-target segmentation processing on the real-time acquired maritime vessel data using a vessel instance segmentation model.

[0011] Furthermore, in step 1, the acquired marine vessel image dataset undergoes fusion-based data augmentation, wherein the data augmentation formula is:

[0012] x1=x c -w / 3 y1=y c -w / 3

[0013] x2=x c +w / 3 y2=y c +w / 3

[0014] In the formula, x1 and x2 refer to the target pixels cropped horizontally, and y1 and y2 refer to the target pixels cropped vertically. c y c w and w represent the coordinates and width of the bounding box in the annotation results, respectively.

[0015] Furthermore, the attention-enhanced occlusion target representation module is used to increase the YOLOv5 model's attention to regions of interest, specifically:

[0016] The CA module is integrated into the Backbone, Neck, and Head modules respectively to obtain perceptual attention maps in the horizontal and vertical coordinate directions. Based on the two perceptual attention maps, intermediate feature maps of spatial information in the horizontal and vertical directions are generated. The size of the module is controlled by the downsampling ratio to obtain the attention weights. The channel attention is reconstructed based on the attention weights. The attention of the YOLOv5 model to the region of interest is increased by adjusting the weights.

[0017] Furthermore, the multi-scale path aggregation part of the YOLOv5 model is replaced with a multi-scale fusion module. The specific method is as follows:

[0018] Replace the FPN and PANET layers in the YOLOv5 model with a BiFPN layer.

[0019] Furthermore, the weighted feature fusion expression in the multi-scale fusion module is:

[0020]

[0021] In the formula, w i and w j These are learnable weights; i and j represent indices; I i ε represents the input item, i.e., the i-th input; ε represents a small positive number to avoid a denominator of 0.

[0022] Furthermore, the improved YOLOv5 model also includes replacing the YOLOHead of the YOLOv5 model with a decoupling head for object detection.

[0023] Furthermore, the improved YOLOv5 model also includes: inserting a ship contour auxiliary prediction module after the C5 feature layer of the Backbone; the ship contour auxiliary prediction module runs in parallel with the BiFPN layer, and performs fine processing on the ship contour in the image.

[0024] Furthermore, the ship contour-assisted prediction module performs refined processing on the ship contour in the image, and the specific steps are as follows:

[0025] Step A1: Add the center point coordinates to the offset to obtain the initial set of contour points.

[0026] Step A2: Concatenate the features of all initial contour points and the center point in the set of initial contour points into a vector of length (M+1)×P, where M is the number of initial contour points in the set of initial contour points; and P is the channel number of the initial contour point features.

[0027] Step A3: Based on the vector, obtain the predicted offset of each initial contour point using the MLP algorithm.

[0028] Step A4: Add the initial contour point to the predicted offset of the initial contour point to obtain the refined ship contour.

[0029] The beneficial effects of this invention are:

[0030] The improved YOLOv5 model of this invention can be used to detect and correct potential errors or inconsistencies in segmentation results. The improved YOLOv5 algorithm can provide useful information about occluded regions, segmentation boundaries, and segmentation results, helping to identify and correct these errors, thereby enhancing the accuracy, completeness, and consistency of instance segmentation.

[0031] This invention utilizes data augmentation techniques to generate more occluded ship training samples, expanding the scale of the training data. More training samples help the model better learn the distribution and characteristics of the occluded data. Furthermore, increased data can introduce randomness and diversity, mitigating overfitting issues.

[0032] This invention uses an attention-enhanced target representation module, a multi-scale fusion module, and a ship contour-assisted prediction module.

[0033] This invention utilizes an attention-enhanced occluded target representation module to increase the network's focus on important regions, helping the model more accurately define the boundaries of occluded targets. By learning the key features and contextual information of occluded targets, the model can generate more accurate boundary representations and adapt to different occlusion conditions, resulting in more precise and accurate segmentation results. The attention-enhanced target representation module allows the network to focus more on potentially occluded ship targets, which helps improve the model's attention to occluded targets and dynamically adjusts attention weights, adapting to the actual occlusion situation in the image, thereby improving the detection performance of ships with various occlusions.

[0034] This invention reduces information loss in the feature pyramid by adding a multi-scale feature fusion module. Through a more efficient feature fusion mechanism, it better preserves and transmits important semantic information, reducing information loss and improving the accuracy and robustness of instance segmentation. The multi-scale fusion module uses bottom-up and top-down paths to better fuse features at different scales. It can more accurately capture multi-level, multi-scale semantic information and fuse it into the final feature representation. This helps improve the object detection algorithm's ability to perceive objects at different scales.

[0035] This invention adds a ship contour-assisted prediction module to predict and generate ship contour information at occlusion boundaries, correcting incomplete or incorrect segmentation of the target ship. This helps the algorithm better handle occlusion situations and improves the accuracy and completeness of instance segmentation. The ship contour-assisted prediction module helps identify and segment occluded regions. This is crucial for occluded ship segmentation tasks, as occlusion can lead to incomplete or incorrect segmentation of the target ship. Furthermore, the ship contour occlusion prediction module provides information about the ship contour, especially near the occlusion boundaries. This information can optimize the segmentation boundaries to better match the actual ship contour. Attached Figure Description

[0036] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:

[0037] Figure 1 This is a flowchart of a specific embodiment of the present invention;

[0038] Figure 2 This is a diagram showing the preprocessing results of ship targets in a specific embodiment of the present invention;

[0039] Figure 3 This is a diagram illustrating the configuration of the attention-enhanced occlusion target representation module in a specific embodiment of the present invention;

[0040] Figure 4 The location where the attention mechanism is added in a specific embodiment of the present invention;

[0041] Figure 5 This is an improved multi-scale feature fusion layer in a specific embodiment of the present invention;

[0042] Figure 6 This is a decoupling head in a specific embodiment of the present invention;

[0043] Figure 7 This is a global deformation diagram in a specific embodiment of the present invention;

[0044] Figure 8 This is a ship contour auxiliary prediction module in a specific embodiment of the present invention;

[0045] Figure 9 This is a diagram showing the overall structure of the improved YOLOv5 model in a specific embodiment of the present invention;

[0046] Figure 10 This is a training loss diagram comparing the improvements before and after in a specific embodiment of the present invention;

[0047] Figure 11 This is a map showing the comparison of the improvements before and after in a specific embodiment of the present invention;

[0048] Figure 12 This is a segmentation result diagram of an example in a specific embodiment of the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] The present invention will be further illustrated below with reference to specific embodiments. Those skilled in the art should understand that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Modifications to the present invention in various equivalent forms all fall within the scope defined by the appended claims.

[0051] This invention provides a method for segmenting multiple target ship instances at sea, the overall implementation process of which is as follows: Figure 1 As shown, it includes the following steps:

[0052] Step 1: Obtain a dataset of images of ships at sea, and perform fusion-based data augmentation on the acquired dataset. The data augmentation formula is as follows:

[0053] x1=x c -w / 3 y1=y c -w / 3

[0054] x2=x c +w / 3 y2=y c +w / 3

[0055] In the formula, x1 and x2 refer to the target pixels cropped horizontally, and y1 and y2 refer to the target pixels cropped vertically. c y c w and w represent the coordinates and width of the bounding box in the annotation results, respectively.

[0056] The cropped ROI (region of interest) target is randomly positioned and pasted onto the initial image. The returned bounding box (bbox) is the bounding box of the ROI on the original image. This bounding box will occlude targets in the image, thus generating more occluded ship images. The ROI target can also be copied multiple times to random positions and pasted onto the image. The designed bounding boxes will generate new ship images with the original targets in the image. This increases the amount of data in the training set. The image after a series of image preprocessing steps is shown below. Figure 2 As shown.

[0057] Step 2: Improve the YOLOv5 model, specifically by: embedding an attention-enhanced occlusion target representation module into the backbone network of the YOLOv5 model; replacing the multi-scale path aggregation part of the YOLOv5 model with a multi-scale fusion module; adding a multi-target segmentation module after the multi-scale feature fusion module; replacing the YOLO Head of YOLOv5 with a decoupling head for target detection; and inserting a ship contour auxiliary prediction module after the C5 feature layer of the backbone network.

[0058] The attention-enhanced occlusion target representation module is used to increase the YOLOv5 model's attention to regions of interest, specifically:

[0059] The CA module is integrated into three modules: Backbone, Neck, and Head, to obtain perceptual attention maps in both horizontal and vertical coordinate directions. Based on these two perceptual attention maps, intermediate feature maps of spatial information in the horizontal and vertical directions are generated. The size of the module is controlled by a downsampling ratio to obtain attention weights. Channel attention is reconstructed based on these attention weights, and YOLOv5's attention to important regions is increased through dynamic weight adjustment.

[0060] The CA attention module encodes channels using location information. It first decomposes global pooling into two one-to-one feature encoding operations: one along the horizontal coordinate direction and the other along the vertical coordinate direction, to encode features for each channel. For example... Figure 3 The diagram shows the attention mechanism flowchart. Feature aggregation is performed along these two spatial directions, returning two directional perceptual attention maps. These two generated directional perceptual attention maps are then concatenated and transformed using 1×1 convolutions to generate intermediate feature maps of spatial information in the horizontal and vertical directions. A downsampling ratio is used to control the module size, and convolution and normalization operations are applied to the generated feature maps to generate the final attention weights. Figure 4 The diagram shown is a schematic of the network after the attention mechanism is added.

[0061] The multi-scale fusion module is used to add a set of input and output nodes to the existing input and output nodes, thereby increasing the fusion characteristics. The specific method is as follows:

[0062] Replace the Feature Pyramid + Path Aggregation Network (FPN + PANET) in YOLOv5 with a Bidirectional Weighted Feature Pyramid (BiFPN) layer;

[0063] Using a weighted bidirectional feature pyramid, the structure is as follows: Figure 5 As shown, an additional path is added between the original input and output nodes to fuse as many features as possible without significantly increasing costs. A compound scaling method is used to uniformly calibrate the resolution, depth, and width of all backbone, feature, and prediction networks. The improved feature fusion module no longer treats all features equally by indiscriminately adding them together. A weighted strategy is introduced, adding a learnable weight to learn the importance of different input features. The added multi-scale feature fusion module repeatedly performs top-down and bottom-up multi-scale feature fusion, resulting in a three-layer feature map that combines the current layer and the layers above and below it.

[0064] The weighted feature fusion expression in the multi-scale fusion module is:

[0065]

[0066] In the formula, w i and w j These are learnable weights; i and j represent indices; I i ε represents the input item, i.e., the i-th input; ε represents a small positive number to avoid the case where the denominator is 0.

[0067] This weighting adjustment controls the importance of input items, with larger weights corresponding to larger contributions. The output is calculated using a weighted summation method. Each input item has a corresponding weight; the larger the weight, the higher the importance of the input item. The final output is the sum of all weighted items divided by the total weights.

[0068] The multi-target segmentation module works in conjunction with the detection head to perform instance segmentation of the image;

[0069] A segmentation head mimicking the PSPNet algorithm is added to the detection layer of the YOLOv5 network. Image features are extracted using a backbone network, and the resulting feature map is then input into the Neck layer. A multi-scale feature fusion network is used to fuse the feature map, which is then passed through convolutional layers, dropout layers, and upsampling layers to predict the category of each pixel in the original image, resulting in the final output.

[0070] A decoupling head is used instead of the YOLO Head for target detection. The structure of the decoupling head is as follows: Figure 6 As shown, the decoupling head separates the detection task into two tasks: classification and localization. The classification task focuses on which existing category the extracted features are most similar to, while the localization task focuses on the location coordinates and corrects the relevant parameters of the bounding box. Using different branch operations is beneficial to improving detection performance, and a 1×1 branch operation is added to avoid the structure becoming too large.

[0071] The ship contour prediction module runs in parallel with the BiFPN layer. This module refines the ship contours in the image, and the specific steps are as follows:

[0072] Step A1: Add the center point coordinates to the offset to obtain the initial set of contour points.

[0073] Step A2: Concatenate the features of all initial contour points and the center point in the set of initial contour points into a vector of length (M+1)×P, where M is the number of initial contour points in the set of initial contour points; and P is the channel number of the initial contour point features.

[0074] Step A3: Based on the vector, obtain the predicted offset of each initial contour point using the Multilayer Perceptron (MLP) algorithm.

[0075] Step A4: Add the predicted offset of the initial contour point to obtain the refined ship contour.

[0076] The ship profile prediction module can be mainly divided into a profile initialization generation module and a profile deformation module. Profile initialization generation is based on regression using center point features. CIM adds the center point coordinates to the offset to obtain the initial profile points. The center point coordinates can be expressed as... Where N is the number of vertices in the initial contour. Then the contour points can be represented as... The initial contour generation path is directly from the center point to the vertex, such as... Figure 7 As shown in the global deformation mechanism, no intersections are generated in the path, avoiding the influence of adverse factors on contour generation and making the generated initial contour closer to the true ground contour. The contour deformation module further refines the generated initial contour, using a simple and efficient global aggregation mechanism to supplement global information and correct contour errors. Based on the center point features and contour boundary points, the ship contour is further refined. The features of M initial contour boundary points and center points are concatenated into a vector of length (M+1)×P, where P is the channel number of the boundary point features. Then, the generated vector is input into the MLP module with M×2 channels, and a contour boundary point offset prediction vector of length M×2 is obtained, represented as... Then, the predicted offset and the initial contour coordinates are summed to obtain the adjusted fine instance contour, represented as... Overall ship profile auxiliary prediction module, such as Figure 8 As shown.

[0077] Step 3: Train the improved YOLOv5 model using the acquired marine vessel image dataset to obtain a vessel instance segmentation model;

[0078] The improved YOLOv5 overall block diagram is as follows: Figure 9As shown, loss functions are used to measure the degree of difference between the model's predicted values ​​and the actual values. These include classification loss (cls_loss), localization loss (box_clss), and confidence loss (obj_loss). The classification loss calculates whether the anchor box is correctly classified with its corresponding label; the localization loss calculates the error between the predicted and labeled boxes; and the confidence loss calculates the network's confidence level. GIOU (Generalized Intersection over Union) is used as the loss function for bounding box regression. The GIOU loss function overcomes the problems of the Intersection over Union (IOU) loss function not fully reflecting the degree of overlap between the two bounding boxes and potentially lacking gradient backpropagation. The formula for calculating GIOU is as follows:

[0079]

[0080] L GIoU =1-GIoU

[0081] In the formula, IOU is calculated by comparing the intersection and union of the predicted and ground truth boxes. The GIoU loss function fully considers the degree of overlap between the predicted and ground truth boxes and the possibility of no gradient backpropagation. First, find the smallest box C that can wrap around them. Then, calculate the area of ​​C and subtract the area of ​​the union of boxes A and B. Ratio this area with the area of ​​box C. Finally, subtract this ratio from the IoU value of boxes A and B to obtain the GIoU.

[0082] In the ship segmentation process, to avoid imbalanced positive and negative samples, FocalLoss loss is used to reduce the impact of easily classified samples on the loss function, and to focus more on training the more difficult-to-classify samples. The calculation formula is as follows:

[0083] FL(p t )=-(1-p t ) γ log(p t )

[0084] In the formula, a factor γ is added to the original samples for easy and hard samples, where γ ranges from 0 to 5. For example, when γ is 3, a prediction result of 0.9 is definitely a simple sample, so the cube of (1-0.9)γ will be very small, resulting in a smaller loss function value. Samples with a prediction probability of 0.2 will have a relatively large loss. The same applies to negative samples; a prediction of 0.2 should result in a much smaller loss than a prediction of 0.9. When the prediction probability is 0.5, the loss is reduced by only 0.25 times, so more attention is paid to these difficult-to-distinguish samples, thus reducing the influence of easy samples. The loss diagram during training is shown below. Figure 10 As shown.

[0085] After training the improved YOLOv5 network, it is necessary to evaluate whether the model meets the accuracy requirements. Precision, accuracy, recall, and mean precision (map) are commonly used as metrics to measure detection accuracy. Map is calculated by summing the average precision of all classes and dividing by the total number of classes, as shown in Table 1 below.

[0086]

[0087] Table 1

[0088] Accuracy is the proportion of all correctly predicted samples out of the total sample, expressed as follows:

[0089]

[0090] Precision is the proportion of correctly predicted positive samples out of all correctly predicted positive samples, and is expressed as follows:

[0091]

[0092] Recall is the proportion of correctly predicted positive samples out of all actual positive samples, expressed as follows:

[0093]

[0094] The specific results of the mean and average precision map are shown in the figure below. Figure 11 As shown.

[0095] Step 4: Perform multi-object segmentation processing on the real-time acquired maritime vessel data using a vessel instance segmentation model. The actual instance segmentation results are as follows: Figure 12 As shown.

[0096] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for segmenting multiple target ship instances at sea, characterized in that, Includes the following steps: Step 1: Obtain a dataset of images of ships at sea; Step 2: Improve the YOLOv5 model, specifically by: embedding an attention-enhanced occlusion target representation module into the backbone network of the YOLOv5 model; replacing the multi-scale path aggregation part of the YOLOv5 model with a multi-scale fusion module; adding a multi-target segmentation module after the multi-scale feature fusion module; inserting a ship contour auxiliary prediction module after the C5 feature layer of the backbone; the ship contour auxiliary prediction module runs in parallel with the BiFPN layer, and performs fine processing on the ship contours in the image. The YOLOv5 model comprises several modules: an attention-enhanced occlusion target representation module to increase its focus on important regions; a multi-scale fusion module to add a set of input and output nodes to the existing input and output nodes, enhancing fusion capabilities; a multi-target segmentation module working in conjunction with the detection head to segment images into instances; and a multi-scale fusion module replacing the multi-scale path aggregation part of the YOLOv5 model, specifically by replacing the FPN and PANET layers in the YOLOv5 model with BiFPN layers. Finally, a ship contour-assisted prediction module refines the ship contours in the image, with the following specific steps. Step A1: Add the center point coordinates to the offset to obtain the initial set of contour points; Step A2: Concatenate the features of all initial contour points and the center point in the set of initial contour points into a vector of length (M+1)×P, where M is the number of initial contour points in the set of initial contour points; and P is the channel number of the initial contour point features. Step A3: Based on the vector, obtain the predicted offset of each initial contour point using the MLP algorithm; Step A4: Add the initial contour points to the predicted offsets of the initial contour points to obtain the refined ship contour. Step 3: Train the improved YOLOv5 model using the acquired marine vessel image dataset to obtain a vessel instance segmentation model; Step 4: Perform multi-target segmentation processing on the real-time acquired maritime vessel data using a vessel instance segmentation model.

2. The method for segmenting multiple target ships at sea as described in claim 1, characterized in that, In step 1, the acquired dataset of marine vessel images undergoes fusion-based data augmentation, wherein the data augmentation formula is: x1=x c -w / 3y1=y c -w / 3 x2=x c +w / 3y2=y c +w / 3 In the formula, x1 and x2 refer to the target pixels cropped horizontally, and y1 and y2 refer to the target pixels cropped vertically. c y c w and w represent the coordinates and width of the bounding box in the annotation results, respectively.

3. The method for segmenting multiple target ships at sea as described in claim 1, characterized in that, The attention-enhanced occlusion target representation module is used to increase the YOLOv5 model's attention to regions of interest, specifically: The CA module is integrated into the Backbone, Neck, and Head modules respectively to obtain perceptual attention maps in the horizontal and vertical coordinate directions. Based on the two perceptual attention maps, intermediate feature maps of spatial information in the horizontal and vertical directions are generated. The size of the module is controlled by the downsampling ratio to obtain the attention weights. The channel attention is reconstructed based on the attention weights. The attention of the YOLOv5 model to the region of interest is increased by adjusting the weights.

4. The method for segmenting multiple target ships at sea as described in claim 1, characterized in that, The weighted feature fusion expression in the multi-scale fusion module is: In the formula, w i and w j These are learnable weights; i and j represent indices; I i ε represents the input item, i.e., the i-th input; ε represents a small positive number to avoid a denominator of 0.

5. The method for segmenting multiple target ships at sea as described in claim 1, characterized in that, The improved YOLOv5 model also includes replacing the YOLO Head of the YOLOv5 model with a decoupling head for object detection.

Citation Information

Patent Citations

  • Infrared ship image rapid identification method and system based on improved Cascade R-CNN

    CN114049478A

  • Lightweight SAR image ship detection model and method based on strip pruning

    CN114283331A

  • Ship instance segmentation method based on spatial distribution attention

    CN114581670A

  • Ship detection method and system based on adaptive data enhancement

    CN114627415A