SAR (Synthetic Aperture Radar) image ship target detection method, device, equipment and medium
By splitting the SAR image into sub-images and using the improved convolutional neural network model for detection, the problem of high missed detection rate and false alarm rate in SAR image ship detection is solved, and higher detection accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411734229.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, SAR image ship detection has problems with high missed detection rate and false alarm rate, especially in large-scene SAR images.
The SAR image is split into multiple sub-images using a slice-assisted hyperinference algorithm, and each sub-image is detected using a pre-trained convolutional neural network model. Finally, the detection results of the sub-image are merged to obtain the ship object detection results in the SAR image. The model includes an improved YOLOv8n backbone network, using dynamic serpentine convolution and asymptotic feature pyramid network, and using ShapeIOU loss function for anchor box regression during the training phase.
It improves the detection accuracy of small-sized ships, reduces missed detection and false alarms, enhances the robustness of the model for scale changes, and enables more accurate anchor box regression.
Smart Images

Figure CN119672529A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence and relates to a SAR image ship target detection method, device, equipment and medium. Background Art
[0002] As an active microwave sensor, Synthetic Aperture Radar (SAR) has the ability to work all day and all weather, and has a wide range and high resolution detection capability. It has good penetration ability and is not affected by climate factors such as clouds and fog. It is one of the important methods for detecting marine ship targets. Since objects on the ocean reflect SAR beams, such as ships and offshore platforms, they appear as a collection of multiple bright pixels in SAR images. Therefore, SAR image ship detection can be considered as the detection of a collection of bright pixels in SAR images. Unlike optical images, the results of SAR image ship detection have certain uncertainty and ambiguity. SAR ship targets lack feature information such as color and texture, and are not as obvious and easy to understand as optical images. Secondly, small ship targets occupy a small number of pixels and lack sufficient feature details, which makes it difficult to extract the features of small ship targets and easy to miss detection, especially in large-scene SAR images. In addition, some sharp sea clutter bright spots or small land bright spots are easily mistakenly detected as ship targets. Summary of the invention
[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and to provide a SAR image ship target detection method, device, equipment and medium, which can solve the problems of high missed detection rate and false alarm rate in large-scene SAR image ship detection.
[0004] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0005] In a first aspect, the present invention provides a method for detecting ship targets in SAR images, comprising:
[0006] Based on the slice-assisted hyper-inference algorithm, the SAR image is divided into multiple sub-images;
[0007] Inputting the multiple sub-images into a target detection model respectively to obtain a ship target detection result in each sub-image, wherein the target detection model is a pre-trained convolutional neural network model;
[0008] The ship target detection results of the multiple sub-images are combined to obtain the ship target detection result in the SAR image.
[0009] Furthermore, the target detection model includes a YOLOv8n model.
[0010] Further, the second and third C2f modules in the backbone network of the YOLOv8n model include a first convolutional unit, a BottleNeck unit, and a second convolutional unit;
[0011] The second convolution unit includes three parallel branch convolution layers, wherein one branch convolution layer uses standard convolution and two branch convolution layers use dynamic snake convolution.
[0012] Furthermore, the convolution kernel of the dynamic snake convolution is linearized in the x-axis direction and the y-axis direction respectively, including:
[0013] In the x-axis direction, the grid position of the convolution kernel of the dynamic snake convolution It is expressed as:
[0014] ,
[0015] In the y-axis direction, the grid position of the convolution kernel of the dynamic snake convolution It is expressed as:
[0016] ,
[0017] in, and Represents the center grid of the convolution kernel; Represents the horizontal or vertical distance from the center grid of the convolution kernel; and Indicates the offset, the value range is [ − 1 , 1 ] .
[0018] Furthermore, the second convolution unit further includes a Concat layer and a 1×1 convolution layer;
[0019] The Concat layer is used to concatenate the feature maps output by the three branch convolutional layers;
[0020] The 1×1 convolutional layer is used to adjust the number of feature channels of the concatenated feature map.
[0021] Furthermore, the target detection model also includes an asymptotic feature pyramid module to fuse feature maps of different depths output by the backbone network.
[0022] Furthermore, during the training phase of the target detection model, the ShapeIOU loss function is used to calculate the anchor box regression loss, including:
[0023] ,
[0024] ,
[0025] ,
[0026] ,
[0027] ,
[0028] ,
[0029] ,
[0030] in, represents the weight coefficient in the horizontal direction, Represents the weight coefficient in the vertical direction; Indicates the width of the real box, Indicates the height of the real frame; Indicates the width of the prediction box, Indicates the height of the prediction box; represents the scale factor of the target; Represents the coordinates of the center point of the prediction box; Represents the coordinates of the center point of the real frame; Represents the diagonal distance of the minimum bounding box between the real box and the predicted box; Represents the intersection-over-union ratio of the real box and the predicted box, represents the real frame, Represents the predicted box.
[0031] In a second aspect, the present invention further provides a SAR image ship target detection device, the device comprising:
[0032] SAR image segmentation module, used to segment the SAR image into multiple sub-images based on the slice-assisted hyper-inference algorithm;
[0033] A sub-image detection result acquisition module, used to input the multiple sub-images into the target detection model respectively, and obtain the ship target detection result in each sub-image, wherein the target detection model is a pre-trained convolutional neural network model;
[0034] The SAR image detection result acquisition module is used to merge the ship target detection results of the multiple sub-images to obtain the ship target detection result in the SAR image.
[0035] In a third aspect, the present invention further provides a computer device, comprising:
[0036] Memory for storing computer programs;
[0037] The processor is used to execute the computer program to implement the steps of the above-mentioned SAR image ship target detection method.
[0038] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the steps of the above-mentioned SAR image ship target detection method.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The SAR image ship target detection method provided by the present invention divides the SAR image into multiple sub-images through a slice-assisted super-inference algorithm to enlarge the SAR image, independently detects each sub-image, and then merges the detection results of all sub-images, thereby improving the detection accuracy of small-sized ships; the target detection model of the present invention replaces the standard convolution of the second and third C2f modules of the backbone network of YOLOv8n with dynamic snake convolution, so that the network can better focus on the ship target on the sea surface in the initial stage of extracting ship features, suppress background clutter, and the two branch convolution layers use dynamic snake convolution to generate multiple feature maps of observed target structures; the PAFPN of YOLOv8n is replaced by the asymptotic feature pyramid network to reduce the semantic gap between non-adjacent hierarchical features and optimize the feature fusion effect with fewer parameters; the loss function adopts the ShapeIOU function, and the ShapeIOU function performs anchor frame regression by aggregating the shape and scale of the anchor frame itself to calculate the loss, thereby enhancing the detection capability of ship targets with different sizes and enabling more accurate anchor frame regression. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of a flow chart of a SAR image ship target detection method provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of the network structure of a target detection model in an embodiment of the present invention;
[0043] Figure 3 Schematic diagram of the network structure of the second convolution unit in an embodiment of the present invention;
[0044] Figure 4 Schematic diagram of the network structure of the ASF module in an embodiment of the present invention;
[0045] Figure 5 It is a comparison diagram of feature extraction effects of the backbone network in the embodiment of the present invention and the backbone network of the YOLOv8n model;
[0046] Figure 6 It is a comparison chart of the detection effects of the target detection model in the embodiment of the present invention and the YOLOv8n model;
[0047] Figure 7 This is a detection effect diagram of the target detection model in an embodiment of the present invention on a distant sea image;
[0048] Figure 8 This is a detection effect diagram of the target detection model in an embodiment of the present invention on a near-shore image;
[0049] Fig. 9 A schematic diagram of the structure of a SAR image ship target detection device provided by an embodiment of the present invention;
[0050] Fig.10 An internal structure diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. The embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0052] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0053] Embodiment 1:
[0054] like Figures 1 to 8 As shown, an embodiment of the present invention provides a method for detecting ship targets in SAR images. Figure 1 FIG. 1 is a flow chart of the method for detecting ship targets in SAR images. The flow chart only shows the logical sequence of the method in this embodiment. In other possible embodiments of the present invention, different methods may be used without conflict. Figure 1 The steps shown or described are accomplished in the order shown.
[0055] The SAR image ship target detection method provided in this embodiment can be applied to a terminal, and can be executed by a SAR image ship target detection device, which can be implemented by software and / or hardware, and can be integrated in a terminal.
[0056] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0057] Step 1: Based on the slice-assisted hyper-inference algorithm, the SAR image is divided into multiple sub-images.
[0058] Ship targets in SAR images are small, so they are often missed. The present invention uses the Slicing Aided Hyper Inference (SAHI) algorithm to divide the input image into multiple sub-images (slices) to enlarge the image, perform independent detection on each sub-image, then merge the detection results of all sub-images, and remove redundant detection frames through post-processing, thereby improving the accuracy of small target detection and the robustness of the model to scale changes.
[0059] Step 2: Input the multiple sub-images into the target detection model respectively to obtain the ship target detection result in each sub-image, and the target detection model is a pre-trained convolutional neural network model.
[0060] like Figure 2 As shown, the target detection model of the present invention is improved based on the YOLOv8n model, including the C2f module and the Neck module in the backbone network of the YOLOv8n model.
[0061] The C2f module of the YOLOv8n model consists of two convolutional layers and n BottleNecks. The convolutional layers are Conv2d, BatchNorm2d and SiLU, and the convolution kernel size is generally 3×3.
[0062] The present invention improves the second and third C2f modules in the backbone network of the YOLOv8n model into C2f-DSC modules.
[0063] The C2f-DSC module includes a first convolution unit, a BottleNeck unit, and a second convolution unit. The first convolution unit and the BottleNeck unit of the C2f-DSC module are the same as those of the C2f module. Figure 3 As shown, it includes three parallel branch convolution layers, a Concat layer and a 1×1 convolution layer.
[0064] Among them, one branch convolution layer uses standard convolution, and two branch convolution layers use dynamic snake convolution.
[0065] Dynamic snake convolution linearizes the standard convolution kernel in both the x-axis and y-axis directions. Taking the x-axis direction as an example, the center grid position of the convolution kernel is , each grid position in the convolution kernel The selection is a cumulative process. From the central location Initially, the position of the grid away from the center depends on the position of the previous grid. compared to, Added an offset Δ = { δ | δ ∈ [ − 1 , 1 ]} , and the offset is , thereby ensuring that the swing of the convolution kernel conforms to the linear morphological structure, which makes the network pay more attention to the slender ship contour features and enhances the network's ability to extract ship features.
[0066] With a convolution kernel of size 9×9 For example, in the x-axis direction, the grid position of the convolution kernel of the dynamic snake convolution It is expressed as:
[0067] ,
[0068] In the y-axis direction, the grid position of the convolution kernel of the dynamic snake convolution It is expressed as:
[0069] ,
[0070] in, and Represents the center grid of the convolution kernel; Represents the horizontal or vertical distance from the center grid of the convolution kernel; and Indicates the offset, the value range is Δ = { δ | δ ∈ [ − 1 , 1 ]} .
[0071] Since the offset is usually a fraction, the grid position after adding the offset is a non-integer, so bilinear interpolation is required to obtain the pixel value after the offset.
[0072] The Concat layer concatenates the features output by the three branch convolutional layers, and uses a 1×1 convolutional layer to adjust the output to the number of original feature channels.
[0073] After the 800×800 image is subjected to feature extraction by the improved backbone network of the present invention, three feature maps of different scales are finally output: the feature map size output by the C3 feature layer is 100×100, the feature map size output by the C4 feature layer is 50×50, and the feature map size output by the C5 feature layer is 25×25.
[0074] Figure 5The figure shows the comparison of the feature extraction effect of the backbone network using the C2f-DSC module and the backbone network using the C2f module, wherein Figure (a) is the heat map of the C2f module, and Figure (b) is the heat map of the C2f-DSC module. Figures (a) and (b) are the heat maps of the original image, C2, C3, C4 and C5 feature layers from left to right. It can be seen that compared with the C2f module, the C2f-DSC module improved by the present invention can better focus on the ship target on the sea surface, which is displayed as a bright bright spot area different from blue on the heat map, and can also focus on the ship faster in images with speckle noise and land islands, indicating that the C2f-DSC module can effectively suppress background clutter.
[0075] The present invention replaces the PAFPN of the Neck module of the YOLOv8n model with an asymptotic feature pyramid network, optimizes the feature fusion effect with fewer parameters, improves the detection accuracy while maintaining lightweight. The asymptotic feature pyramid network first fuses the C3 and C4 feature layers, then fuses the C3, C4 and C5 feature layers, and finally inputs the fused feature maps into the anchor-free decoupling detection head of the detection model.
[0076] Before fusing features, the asymptotic feature pyramid network uses a strategy of reducing the network width to optimize the model, that is, using a 1×1 convolution layer to first reduce the input feature dimension to 1 / 4 of the original. After adjusting the number of features, use a 1×1 convolution layer to learn features and output the C3, C4, and C5 feature layers to be fused. After the feature fusion is completed, use a 1×1 convolution layer to restore the feature map to the number of feature channels of each layer before the input. Secondly, use a 1×1 convolution layer and a bilinear interpolation method to upsample the features, use a 2×2 convolution with a step size of 2 to achieve downsampling from the C3 feature layer to the C4 feature layer, and from the C4 feature layer to the C5 feature layer, and use a 4×4 convolution with a step size of 4 to achieve downsampling from the C3 feature layer to the C5 feature layer; after the features of different levels are upsampled or downsampled, use an adaptive spatial fusion (ASF) module to fuse these features. The network structure of the ASF module is as follows: Figure 4 As shown in the figure, the features fused by the ASF module are then input into the C2f module. Take the first fusion of the C3 feature layer as an example, that is, the fusion of the C3 feature map and the C4 upsampled feature map. The ASF module first uses a 1×1 convolution layer to adjust the number of channels of the two feature maps to 8, and then concatenates them through Concat, and then decomposes the output features of the Concat concatenation into two vectors through 1×1 convolution, and normalizes them using Softmax to obtain the spatial weights of the two feature levels. The two spatial weights are multiplied with the input C3 feature map and the C4 upsampled feature map and then added to retain useful spatial information. The linear combination is defined as follows. Finally, a 3×3 convolution layer is used to capture the semantic information after feature fusion.
[0077] ,
[0078] in, Indicates that from Layer to Layer location The eigenvector at . and express The spatial weights of the two-level features are given by the constraints: , represents the obtained feature vector.
[0079] The CIOU loss function of YOLOv8n takes into account the computational losses of the relative position and relative shape between anchor frames, and adds the centroid normalized distance loss term and shape loss term on the basis of CIOU, as well as the aspect ratio difference between the true frame and the anchor frame. However, CIOU has the problem that the aspect ratio of the true frame and the anchor frame is similar but the anchor frame size is insensitive. Small targets are sensitive to shape and scale factors, which leads to significant changes in IOU values. The regression deviation of the long and short sides of the anchor frame will also lead to different IOU value changes. For small targets, the IOU value corresponding to the offset along the short side changes more significantly. Therefore, in the training stage of the target detection model, the present invention uses the ShapeIOU loss function to calculate the anchor frame regression loss. ShapeIOU takes into account the influence of the shape and scale factors of the anchor frame itself on the regression results, and calculates the loss by aggregating the shape and scale of the anchor frame itself, so that the anchor frame regression is more accurate.
[0080] The ShapeIOU loss function includes:
[0081] ,
[0082] ,
[0083] ,
[0084] ,
[0085] ,
[0086] ,
[0087] ,
[0088] in, represents the weight coefficient in the horizontal direction, represents the weight coefficient in the vertical direction, and The value of is related to the shape of the real box. When the anchor box is a square, and All are 1; Indicates the width of the real box, Indicates the height of the real frame; Indicates the width of the prediction box, Indicates the height of the prediction box; The scale factor of the target is related to the scale of the target in the dataset; Represents the coordinates of the center point of the prediction box; Represents the coordinates of the center point of the real frame; Represents the diagonal distance of the minimum bounding box between the real box and the predicted box; Represents the intersection-over-union ratio of the real box and the predicted box, represents the real frame, Represents the predicted box.
[0089] The embodiment of the present invention uses the LS-SSDDv1.0 public ship detection dataset as an experimental dataset. The LS-SSDDv1.0 dataset was released on September 15, 2020. It is derived from 15 Sentinel-1 synthetic aperture radar images with an average size of 24000*16000. It is annotated and erroneous labels are corrected in combination with AIS information and Google Earth optical image information. It contains large scenes with small ships, pure backgrounds, etc., and can be used for ship detection in large-scene satellite-borne SAR images, which is more in line with large-scene ship detection in practical applications. The LS-SSDDv1.0 dataset format is converted into the YOLO format required for training, and it is divided into training set, validation set, and test set according to 7:1:2. Mosaic enhancement and translation enhancement are used before model training to expand the training set.
[0090] During the object detection model training process, SGD is used as the optimizer to replace parameters. The initial learning rate is 0.005, the momentum is set to 0.937, the weight decay coefficient is set to 0.0005, and the cosine annealing learning rate is used to adjust the learning rate during training; the model is trained from scratch for 120 epochs. Considering the memory size of the GPU, the batch size of the training in the embodiment of the present invention is 16.
[0091] Step 3: Merge the ship target detection results of the multiple sub-images to obtain the ship target detection result in the SAR image.
[0092] Figure 6A comparison diagram of the detection effects of the target detection model of the present invention and the YOLOv8n model is shown, wherein Figure (a) is the ship target actually marked in the LS-SSDDv1.0 data set, Figure (b) is the detection result of the YOLOv8n model for Figure (a), and Figure (c) is the detection result of the target detection model of the present invention for Figure (a). It can be seen that in the detection of ships in near-shore images, compared with the YOLOv8n model, the detection model of the present invention can effectively suppress the interference of land background and detect more small ships.
[0093] Figure 7 The detection effect of the target detection model of the present invention on the distant sea image is shown. Figure 8 The figure shows the detection effect of the target detection model of the present invention on the offshore image, where the green frame represents the true value of the ship, the red frame represents the missed ship, and the blue frame represents the misdetected ship. It can be seen that the target detection model of the present invention has good detection performance in both offshore and offshore scenes, and most ships can be detected.
[0094] Embodiment 2:
[0095] Based on the same inventive concept as in Example 1, the embodiment of the present invention further provides a SAR image ship target detection device for implementing the above SAR image ship target detection method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the SAR image ship target detection device embodiment provided below can refer to the limitations of the SAR image ship target detection method above, and will not be repeated here.
[0096] like Fig. 9 As shown, an embodiment of the present invention provides a SAR image ship target detection device, comprising:
[0097] SAR image segmentation module, used to segment the SAR image into multiple sub-images based on the slice-assisted hyper-inference algorithm;
[0098] A sub-image detection result acquisition module, used to input the multiple sub-images into the target detection model respectively, and obtain the ship target detection result in each sub-image, wherein the target detection model is a pre-trained convolutional neural network model;
[0099] The SAR image detection result acquisition module is used to merge the ship target detection results of the multiple sub-images to obtain the ship target detection result in the SAR image.
[0100] Embodiment 3:
[0101] The embodiment of the present invention further provides a computer device, which may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps of the SAR image ship target detection method in the aforementioned embodiment are implemented.
[0102] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0103] Embodiment 4:
[0104] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the following method are implemented:
[0105] Based on the slice-assisted hyper-inference algorithm, the SAR image is divided into multiple sub-images;
[0106] Inputting the multiple sub-images into a target detection model respectively to obtain a ship target detection result in each sub-image, wherein the target detection model is a pre-trained convolutional neural network model;
[0107] The ship target detection results of the multiple sub-images are combined to obtain the ship target detection result in the SAR image.
[0108] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products, and therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0109] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0112] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
Claims
1. A method for detecting ship targets in SAR images, characterized in that: include: Based on the slice-assisted hyper-inference algorithm, the SAR image is divided into multiple sub-images; Inputting the multiple sub-images into a target detection model respectively to obtain a ship target detection result in each sub-image, wherein the target detection model is a pre-trained convolutional neural network model; The ship target detection results of the multiple sub-images are combined to obtain the ship target detection result in the SAR image.
2. The SAR image ship target detection method according to claim 1, characterized in that: The target detection model includes a YOLOv8n model.
3. The SAR image ship target detection method according to claim 2, characterized in that: The second and third C2f modules in the backbone network of the YOLOv8n model include a first convolutional unit, a BottleNeck unit, and a second convolutional unit; The second convolution unit includes three parallel branch convolution layers, wherein one branch convolution layer uses standard convolution and two branch convolution layers use dynamic snake convolution.
4. The SAR image ship target detection method according to claim 3, characterized in that: The convolution kernel of the dynamic snake convolution is linearized in the x-axis direction and the y-axis direction respectively, including: In the x-axis direction, the grid position of the convolution kernel of the dynamic snake convolution It is expressed as: , In the y-axis direction, the grid position of the convolution kernel of the dynamic snake convolution It is expressed as: , in, and Represents the center grid of the convolution kernel; Represents the horizontal or vertical distance from the center grid of the convolution kernel; and Indicates the offset, the value range is .
5. The SAR image ship target detection method according to claim 3 or 4, characterized in that: The second convolution unit further includes a Concat layer and a 1×1 convolution layer; The Concat layer is used to concatenate the feature maps output by the three branch convolutional layers; The 1×1 convolutional layer is used to adjust the number of feature channels of the concatenated feature map.
6. The SAR image ship target detection method according to claim 4, characterized in that: The target detection model also includes an asymptotic feature pyramid module to fuse feature maps of different depths output by the backbone network.
7. The SAR image ship target detection method according to claim 1, characterized in that: During the training phase of the target detection model, the ShapeIOU loss function is used to calculate the anchor box regression loss. include: , , , , , , , in, represents the weight coefficient in the horizontal direction, Represents the weight coefficient in the vertical direction; Indicates the width of the real box, Indicates the height of the real frame; Indicates the width of the prediction box, Indicates the height of the prediction box; represents the scale factor of the target; Represents the coordinates of the center point of the prediction box; Represents the coordinates of the center point of the real frame; Represents the diagonal distance of the minimum bounding box between the real box and the predicted box; Represents the intersection-over-union ratio of the real box and the predicted box, represents the real frame, Represents the predicted box.
8. A SAR image ship target detection device, characterized in that: include: SAR image segmentation module, used to segment the SAR image into multiple sub-images based on the slice-assisted hyper-inference algorithm; A sub-image detection result acquisition module, used to input the multiple sub-images into the target detection model respectively, and obtain the ship target detection result in each sub-image, wherein the target detection model is a pre-trained convolutional neural network model; The SAR image detection result acquisition module is used to merge the ship target detection results of the multiple sub-images to obtain the ship target detection result in the SAR image.
9. A computer device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the SAR image ship target detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the SAR image ship target detection method described in any one of claims 1 to 7 are implemented.