Small target detection method of ship in SAR image based on WSSRNet

By constructing a WSSRNet network with multi-scale wavelet convolutional residual module and shallow jump residual structure, the missed detection and positioning deviation problems of small object detection in SAR images are solved, and the detection accuracy and recall rate are improved, especially in dense scenarios.

CN119942092BActive Publication Date: 2025-09-02WUXI UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510421867.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-09-02
Estimated Expiration
2045-04-07

AI Technical Summary

Technical Problem

The existing SAR image ship object detection algorithm is susceptible to background noise and clutter interference in small target detection, resulting in missed detection and positioning deviations, especially in dense scenarios with limited performance.

Method used

A multi-scale wavelet convolutional residual module (MWTRM) is constructed to enhance context feature extraction, combining shallow jump residual structure and shape adaptive bounding box regression strategy, and improve detection accuracy and recall through the WSSRNet network.

Benefits of technology

While ensuring real-time detection efficiency, the recall rate and detection accuracy of small targets in dense scenarios are significantly improved, the calculation overhead is reduced, and the feature expression ability of small targets is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942092B_ABST
    Figure CN119942092B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting small ship targets in SAR images based on WSSRNet, comprising the following steps: obtaining and preprocessing a SAR ship image dataset; building a SAR image ship detection network based on WSSRNet; inputting training and validation sets into the network for training, calculating a loss function and performing backpropagation to obtain a trained network with optimal parameters; and inputting a test set into the trained network with optimal parameters to output a ship detection map for the SAR ship image. The present invention enhances the ability to extract contextual features of small targets by constructing a multi-scale wavelet convolution residual module, improves spatial positioning accuracy by designing a shallow skip residual structure, and combines a shape-adaptive bounding box regression strategy to effectively address the problems of missed detection and positioning deviation of small ship targets in SAR images caused by scattering effects and noise interference. This method significantly improves the recall rate and detection accuracy of small targets in dense scenes while ensuring real-time detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a SAR image ship small target detection method based on WSSRNet, belonging to the technical field of small target detection in image processing. Background Art

[0002] Synthetic Aperture Radar (SAR) is an active radar sensor system that utilizes the principle of synthetic aperture to generate high-resolution SAR imagery by transmitting electromagnetic waves from a high-altitude platform and collecting return signals at different locations. Compared to optical sensors, this system is unaffected by factors such as weather, cloud cover, and sunlight, enabling real-time resource monitoring around the clock. Using SAR imagery for ship target detection is crucial in areas such as marine environmental monitoring, maritime traffic management, and marine resource development.

[0003] With the continuous development of deep learning technology, convolutional neural networks have demonstrated tremendous potential in the field of SAR target detection. Convolutional neural network-based target detection algorithms can be categorized into two-stage and single-stage algorithms. Two-stage algorithms, such as R-CNN, Faster R-CNN, and Mask R-CNN, generate candidate regions within an image and then use classification and regression techniques to classify and locate these regions. While these algorithms offer high detection accuracy and effectiveness, they separate candidate region generation from target classification, resulting in high computational complexity and slow detection speeds.

[0004] However, in the SAR ship target detection task, the specific shape, size, and texture features of ships in SAR images are susceptible to interference from background noise and clutter, which to some extent affects the feature extraction performance of the above algorithms. To this end, Zhu et al. utilized a repeated bilateral feature pyramid network (DB-FPN) to enhance the fusion of spatial and semantic details. Peng et al. used an adaptive multi-scale feature fusion structure and a channel attention mechanism to improve the network's feature sensitivity. Yan et al. used a selective coordinate attention mechanism to enhance the extraction and representation of ship target features. Although these studies have made some progress, their detection performance for small targets remains limited. To this end, Su et al. adopted the branching structure of the inception module in a shallow feature enhancement network architecture and used dilated convolution to expand the visual receptive field of the feature map, enhancing the network's adaptability to small-sized ship targets.

[0005] While the above methods have improved the accuracy of small target recognition in SAR images to a certain extent, due to background interference, SAR scattering effects, and resolution limitations, ship target features in near-shore scenarios are more easily confused with background interference. This is especially true when ship targets are smaller and densely distributed, leading to more serious problems with missed and false detections. Therefore, how to better focus on the contextual and spatial feature information of small targets, improve feature richness while enriching the gradient flow, and further enhance the target's feature expression capabilities has become a key issue in SAR image ship detection. Summary of the Invention

[0006] The technical problem to be solved by the present invention is: to provide a method for detecting small ship targets in SAR images based on WSSRNet, to enhance the ability to extract contextual features of small targets by constructing a multi-scale wavelet convolution residual module, to design a shallow jump residual structure to improve spatial positioning accuracy, and to combine it with a shape-adaptive bounding box regression strategy to effectively solve the problems of missed detection and positioning deviation of small ship targets in SAR images caused by scattering effects and noise interference, and to significantly improve the recall rate and detection accuracy of small targets in dense scenes while ensuring real-time detection efficiency.

[0007] The present invention adopts the following technical solutions to solve the above technical problems:

[0008] The WSSRNet-based SAR image ship small target detection method includes the following steps:

[0009] Step 1: Obtain a SAR ship image dataset, preprocess the dataset, and divide it into a training set, a validation set, and a test set according to a set ratio;

[0010] Step 2: Build a SAR image ship detection network based on WSSRNet, including the backbone network, neck network and detection layer;

[0011] A multi-scale wavelet convolution residual module is constructed in the backbone network to extract feature maps C2, C3, C4 and C5 at four different scales;

[0012] The neck network includes upsampling and downsampling stages. In the upsampling stage, the four feature maps C2, C3, C4 and C5 of different scales extracted by the backbone network are upsampled, concatenated and partially fused across stages to obtain the feature map P2. In the downsampling stage, a shallow skip residual structure is used to perform skip connections and feature fusion on the same-level features extracted by the backbone network and the features fused by the neck network to obtain feature maps P3 and P4.

[0013] The detection layer is used to detect ship targets of small, medium and large scales based on feature maps P2, P3 and P4;

[0014] Step 3: Input the training set and validation set into the SAR image ship detection network based on WSSRNet built in step 2 for training and validation, calculate the loss function and perform backpropagation, update the network parameters, and obtain the trained optimal parameter network;

[0015] Step 4: Input the test set into the trained optimal parameter network and output the ship detection map of the SAR ship image.

[0016] As a preferred solution of the present invention, in the SAR image ship detection network based on WSSRNet,

[0017] The backbone network includes the first to fifth convolution modules, the first to fourth multi-scale wavelet convolution residual modules and the fast spatial pyramid pooling module; the SAR ship image input by the backbone network is sequentially subjected to feature extraction by the first convolution module, the second convolution module and the first multi-scale wavelet convolution residual module to obtain a feature map C2; C2 is sequentially subjected to feature extraction by the third convolution module and the second multi-scale wavelet convolution residual module to obtain a feature map C3; C3 is sequentially subjected to feature extraction by the fourth convolution module and the third multi-scale wavelet convolution residual module to obtain a feature map C4; C4 is sequentially subjected to feature extraction by the fifth convolution module, the fourth multi-scale wavelet convolution residual module and the fast spatial pyramid pooling module to obtain a feature map C5;

[0018] The neck network includes the sixth to seventh convolution modules, the first to fifth cross-stage partial fusion modules and the first to third upsampling modules; the first upsampling module is used to upsample C5, the upsampling result is channel-joined with C4, the splicing result is subjected to feature fusion by the first cross-stage partial fusion module to obtain the feature map F0; the second upsampling module is used to upsample F0, the upsampling result is channel-joined with C3, the splicing result is subjected to feature fusion by the second cross-stage partial fusion module to obtain the feature map F1; the third upsampling module is used to upsample F1 Upsampling, the upsampling result is channel-wise spliced ​​with C2, and the splicing result is subjected to feature fusion by the third cross-stage partial fusion module to obtain feature map P2; P2 is subjected to feature extraction by the sixth convolution module, and then channel-wise spliced ​​with F1 and the output of the third convolution module. The splicing result is subjected to feature fusion by the fourth cross-stage partial fusion module to obtain feature map P3; P3 is subjected to feature extraction by the seventh convolution module, and then channel-wise spliced ​​with F0 and the output of the fourth convolution module. The splicing result is subjected to feature fusion by the fifth cross-stage partial fusion module to obtain feature map P4;

[0019] The detection layer includes the first to third detection heads. The feature map P2 output by the third cross-stage partial fusion module is used as the input of the first detection head for detecting small-scale ship targets; the feature map P3 output by the fourth cross-stage partial fusion module is used as the input of the second detection head for detecting medium-scale ship targets; the feature map P4 output by the fifth cross-stage partial fusion module is used as the input of the third detection head for detecting large-scale ship targets.

[0020] As a preferred embodiment of the present invention, the specific process of step 1 is as follows:

[0021] The HRSID ship image dataset was obtained, including 5,604 SAR images of 800 × 800 pixels covering ocean, offshore, coastal ports, and different sea conditions. There were 16,951 ship targets in total, of which small, medium, and large ship targets accounted for 54.5%, 43.5%, and 2% of the total, respectively.

[0022] The original images and corresponding label images in the HRSID ship image dataset are cropped into images of 640×640 pixels in sequence.

[0023] The cropped HRSID ship image dataset is randomly divided into training set, validation set and test set in the ratio of 7:2:1.

[0024] As a preferred solution of the present invention, the first and fourth multi-scale wavelet convolution residual modules have the same structure, and both include the eighth to tenth convolution modules, the first wavelet transform convolution module, and the first to second bottleneck modules;

[0025] The input of the first or fourth multi-scale wavelet convolution residual module is evenly divided into four feature subsets after passing through the eighth convolution module. The second feature subset is sequentially passed through the first wavelet transform convolution module and the ninth convolution module to obtain the output of the ninth convolution module; the output of the ninth convolution module is added element-by-element to the third feature subset and used as the input of the first bottleneck module; the output of the first bottleneck module is added element-by-element to the fourth feature subset and used as the input of the second bottleneck module; the output of the second bottleneck module is channel-spliced ​​with the output of the first bottleneck module, the output of the ninth convolution module and the first feature subset and used as the input of the tenth convolution module; the output of the tenth convolution module is channel-spliced ​​with the input of the first or fourth multi-scale wavelet convolution residual module to obtain the output of the first or fourth multi-scale wavelet convolution residual module.

[0026] As a preferred solution of the present invention, the second and third multi-scale wavelet convolution residual modules have the same structure, and both include the eighth to tenth convolution modules, the first wavelet transform convolution module and the first to sixth bottleneck modules;

[0027] The input of the second or third multi-scale wavelet convolution residual module is evenly divided into four feature subsets after passing through the eighth convolution module. The second feature subset is sequentially passed through the first wavelet transform convolution module and the ninth convolution module to obtain the output of the ninth convolution module; the output of the ninth convolution module is element-wise added to the third feature subset and used as the input of the first bottleneck module; the output of the first bottleneck module is sequentially passed through the third bottleneck module and the fourth bottleneck module to obtain the output of the fourth bottleneck module; the output of the fourth bottleneck module is element-wise added to the fourth feature subset and used as the input of the second bottleneck module; the output of the second bottleneck module is sequentially passed through the fifth bottleneck module and the sixth bottleneck module to obtain the output of the sixth bottleneck module; the output of the sixth bottleneck module is channel-wise spliced ​​with the output of the fourth bottleneck module, the output of the ninth convolution module, and the first feature subset to serve as the input of the tenth convolution module; the output of the tenth convolution module is channel-wise spliced ​​with the input of the second or third multi-scale wavelet convolution residual module to obtain the output of the second or third multi-scale wavelet convolution residual module.

[0028] As a preferred embodiment of the present invention, the first to sixth bottleneck modules have the same structure and all include a second wavelet transform convolution module and an eleventh convolution module. The input of each bottleneck module is sequentially passed through the second wavelet transform convolution module and the eleventh convolution module to obtain the output of the eleventh convolution module. The output of the eleventh convolution module is channel-joined with the input of each bottleneck module to obtain the output of each bottleneck module.

[0029] The convolution kernel sizes of the eighth to eleventh convolution modules are all 1×1, and the convolution kernel sizes of the first and second wavelet transform convolution modules are both 3×3.

[0030] As a preferred solution of the present invention, the fast spatial pyramid pooling module includes twelfth to thirteenth convolution modules and first to third maximum pooling layers. The input of the fast spatial pyramid pooling module passes through the twelfth convolution module, the first maximum pooling layer, the second maximum pooling layer and the third maximum pooling layer in sequence to obtain the output of the third maximum pooling layer. The output of the third maximum pooling layer is channel-joined with the output of the first maximum pooling layer and the output of the second maximum pooling layer, and then enters the thirteenth convolution module. The output of the thirteenth convolution module is the output of the fast spatial pyramid pooling module.

[0031] As a preferred solution of the present invention, in step 3, the loss function adopts the Inner-ShapeIoU loss function, combines ShapeIoU with Inner-IoU, and embeds the dynamic auxiliary box mechanism into the weighted loss of the geometric features of the border. The formula for generating the auxiliary box is as follows:

[0032] ,

[0033] ,

[0034] ,

[0035] ,

[0036] ,

[0037] ,

[0038] ,

[0039] in, and Respectively represent the value of the center point of the real frame on the x and y axes, and Represent the width and height of the real box respectively, 、 、 、 Respectively represent the left, right, top and bottom boundary coordinates of the dynamic auxiliary frame of the real frame, and Respectively represent the values ​​of the center point of the prediction box on the x and y axes, and Indicates the width and height of the prediction box, 、 、 、 Respectively represent the left, right, upper and lower boundary coordinates of the dynamic auxiliary box of the prediction box, is a scale factor, which is used to control the scale of the dynamic auxiliary frame to adjust the sensitivity of the regression gradient; Represents the intersection-over-union ratio of the predicted box and the true box;

[0040] The shape weight is calculated based on the aspect ratio of the real box, the center point offset and size difference are constrained, and finally the regression loss of the border is obtained. The implementation formula is as follows:

[0041] ,

[0042] ,

[0043] ,

[0044] ,

[0045] ,

[0046] ,

[0047] ,

[0048] in, and are shape weights, is the scaling factor, represents the shape distance loss, represents the shape similarity loss, Represents the diagonal length of the minimum enclosing box covering the predicted box and the true box, represents the Inner-ShapeIoU loss, Based on shape weights The weighted term calculated regarding the difference in width between the predicted box and the true box, Representation based on shape weight A weighted term calculated based on the height difference between the predicted box and the true box.

[0049] A computer device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the steps of the WSSRNet-based SAR image ship small target detection method are implemented.

[0050] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the WSSRNet-based SAR image ship small target detection method.

[0051] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0052] 1. The present invention constructs a multi-scale wavelet convolution residual module (MWTRM) in the backbone feature extraction network. By introducing wavelet transform convolution (WTConv), a richer receptive field is obtained. Combined with the residual structure, multi-scale features are integrated, which pays more attention to the contextual information and spatial feature information of small targets while reducing computational overhead.

[0053] 2. This paper proposes a shallow skip residual structure (SSRM). By designing a shallow feature pyramid structure, it enhances the utilization of position information and shallow detail features, improving the localization accuracy and recall of small objects. It also utilizes cross-stage skip connections to integrate multi-level features, increasing feature richness while enriching the gradient flow, further enhancing the feature representation of the object.

[0054] 3. This paper adopts Inner-ShapeIoU as the loss function of the network. By introducing the ideas of auxiliary boxes and Shape-IoU, it adaptively adjusts the scale of the auxiliary box and combines the box shape information to alleviate the scale difference problem in box regression, thereby improving the accuracy and convergence speed of box regression. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is a flow chart of the method for detecting small ship targets in SAR images based on WSSRNet proposed in the present invention;

[0056] Figure 2 This is the network structure diagram of SAR image ship small target detection based on WSSRNet proposed by the present invention;

[0057] Figure 3 This is a network structure diagram of the MWTRM module proposed in the present invention;

[0058] Figure 4 This is a comparison test chart between the WSSRNet proposed in this invention and other Yolo series algorithms. DETAILED DESCRIPTION

[0059] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be interpreted as limiting the present invention.

[0060] Accurate ship detection in SAR images is of great significance for marine surveillance and management, such as maritime traffic supervision, illegal fishing monitoring, marine resource exploration, and maritime search and rescue. How to effectively identify small-sized ship targets in dense nearshore scenes, suppress background clutter interference, and capture multi-scale scattering features has become a key issue in SAR image ship target detection. To address the problems of background interference, feature confusion, and missed detection in SAR image detection of small-sized ship targets in dense nearshore scenes, a SAR image ship target detection method based on WSSRNet is proposed. Figure 1 The specific steps are as follows:

[0061] Step 1: Obtain the HRSID ship detection dataset, which contains SAR images generated in different scenarios such as open sea and near ports and multiple polarizations. After preprocessing the dataset, divide it into training set, validation set, and test set according to the set ratio.

[0062] The data set is specifically obtained as follows: The HRSID ship detection data set is obtained, which contains 5604 SAR images with a size of 800×800 generated in different scenes such as open sea and near port and multiple polarizations. There are a total of 16,951 ship targets, of which the number of small, medium and large ship targets accounts for 54.5%, 43.5% and 2% of the total, respectively.

[0063] The dataset preprocessing is as follows: the original image and the corresponding label image in the HRSID dataset are cropped into images of size 640×640 pixels in sequence to avoid overlapping areas.

[0064] The specific division of the data set is as follows: the 640×640 data set is randomly divided into training set, validation set, and test set in a ratio of 7:2:1.

[0065] Step 2: Build a SAR image ship detection network based on Wavelet Shallow Residual Network (WSSRNet), such as Figure 2 As shown, it includes the backbone network (Backbone), the neck network (Neck) and the detection layer (Head).

[0066] Step 2.1: Build the backbone network. The backbone consists of five CBS modules, four multi-scale wavelet transform convolutional residual modules (MWTRMs), and one fast spatial pyramid pooling (SPPF) module. The CBS module consists of a convolutional layer (Conv), batch normalization (BN), and the SiLu activation function, which is used for preliminary image feature extraction and image resizing. The convolutional kernel size of the convolutional layer is 3, and the stride is 2.

[0067] like Figure 3As shown in the figure, the MWTRM module uses a multi-branch residual structure to perform jump connections on different feature extraction stages. It is composed of three CBS modules with a convolution kernel size of 1, one WTCBS module with a convolution kernel size of 3, and several bottleneck modules stacked with one WTCBS module and one CBS module. The input features first pass through a 1×1 CBS to double the number of channels, and then are evenly divided into four feature subsets. The first feature subset is used to retain low-level features; the second feature subset passes through two convolution modules consisting of a convolution layer, batch normalization, and activation function. The first convolution module uses wavelet transform convolution. The first convolutional layer uses the Haar wavelet transform to perform multi-level decomposition of the input image to retain more spatial resolution, thereby increasing the receptive field of the convolution and avoiding over-parameterization of the network. The second uses point-by-point convolution. The processing of the third and fourth feature subsets is similar to that of the second feature subset. The difference is that before the third and fourth feature subsets are operated on by the two convolution modules, the feature map is first added to the feature map processed by the previous branch. Then, it is input into the bottleneck block composed of two different convolution modules and skip layer connections. Finally, the feature maps of the four branches are spliced ​​together, and the number of channels and parameters are compressed through point-by-point convolution. Skip connections are used on the periphery of the module to further enrich the gradient flow. The Bottleneck module is composed of two CBS residuals with a convolution kernel size of 3.

[0068] The SPPF module consists of two CBS layers with a convolution kernel size of 1 and three max pooling layers with a convolution kernel size of 5, followed by residuals. The two CBS layers with a convolution kernel size of 1 are used to adjust the number of channels. In the backbone network, these operations on the original image allow the backbone network to obtain the features of interest through each MWTRM module and further extract effective features, improving the network's feature extraction capabilities for small objects.

[0069] Step 2.2: Build the neck network (Neck). The output feature maps of the SPPF module at the end of the backbone network in Step 2.1 serve as the input feature maps of the neck. The neck consists of three upsampling operations, five concatenation operations, five cross-stage partial bottleneck (C2f) modules, and two CBS modules. The output feature maps of the first three MWTRMs and the third and fourth CSB modules in the backbone network are then fed into the neck layer by layer for concatenation of high- and low-dimensional features to reduce feature loss during transmission (the concatenation operation). The upsampling operation is called Up Sample. The C2f module is a cross-stage partial network fusion layer consisting of two convolutions with a kernel size of 1 and two bottleneck modules with a residual.

[0070] Step 2.3: Build the detection layer (Head). The Neck layer built in step 2.2 has three output feature maps of different sizes, corresponding to the inputs of three detection heads of three different sizes. The detection head, or Detect, consists of four CBS modules with a convolution kernel of 3 and two convolution kernels with a convolution kernel of 1. After the original features are processed by the backbone network and the Neck layer, the output feature maps are input to the detection head for prediction. The three detection heads are P2 / 4, P3 / 8, and P4 / 16, respectively, to cover targets of different scales. The P2 / 4 small target detection layer reduces deep semantic interference and reduces computational overhead, allowing the network to further focus on shallow feature extraction of small targets. When the detection head makes a prediction, it calculates the difference between the true target and the predicted target, and calculates the loss through the Inner-ShapeIoU loss function for backpropagation, thereby correcting the next network parameters.

[0071] Step 2.4: Build a shallow skip residual module (SSRM). In SAR image ship detection tasks, small targets have a low pixel count and lack feature information. The high-dimensional abstraction of deep feature maps can easily lead to loss of spatial detail. This is especially true in complex scenarios such as near-shore occlusion and densely packed images. The large receptive field of a deep detection head can introduce background interference, exacerbating missed and false detections of small targets. Shallower, high-resolution feature maps, on the other hand, contain more spatial information and encompass more small-scale location details. Therefore, the present invention first introduces a P2 small target detection layer with a feature map size of 160×160 into the Neck constructed in step 2.2 and the Head constructed in step 2.3. This layer directly utilizes high-resolution features to capture detailed feature information such as the target's spatial position and edge texture. Simultaneously, the redundant P5 detection layer is removed to reduce deep semantic interference and computational overhead, allowing the network to further focus on shallow feature extraction of small targets. Second, skip residual connections are established between the shallower feature layers (C3 / P3, C4 / P4) of the same level between the Backbone built in step 2.1 and the Neck built in step 2.2 to compensate for the weakening fusion effect between low-level features and high-level semantic information caused by changes in network depth. Specifically, the output of the third CBS of the Backbone is first connected to the fourth Concat operation in the Neck, and then the output of the fourth CBS of the Backbone is connected to the fifth Concat operation in the Neck, thus achieving skip connections of features across stages.

[0072] Step 2.5: After deploying steps 2.1, 2.2, 2.3, and 2.4, the processed SAR ship image JPG image with a size of 640×640×3 is first passed through two CBS modules in the backbone network with a convolution kernel size of 3 and a stride of 2, and then passed through a MWTRM module. At this time, the image size becomes 160×160×32. The output at this time is recorded as the first stage C2, which is the input of the third CBS module with a convolution kernel size of 3 and a stride of 2. The output of the third CBS module is then used as the input of the second MWTRM module. At this time, the output image size becomes 80×80×6 4. The output at this time is recorded as the second stage C3, and then passes through the fourth CBS module with a convolution kernel of 3 and a stride of 2. The output image is used as the input of the third MWTRM module. At this time, the size of the output image becomes 40×40×128. The output at this time is recorded as the third stage C4, which is the input of the fifth CBS module with a convolution kernel of 3 and a stride of 2. The output image then passes through the fourth MWTRM module and an SPPF module in sequence. At this time, the size of the output image becomes 20×20×256. The output at this time is recorded as the fourth stage C5. The output feature map of this stage is transmitted to the Neck part. After the first Up Sample, its output is concatenated (Concat) with the output C4 of the third stage. The concatenated feature map enters the first C2f module as input. The output feature map is used as the fifth stage, and the output of this stage is subjected to the second Up After Sample, the output is concat-operated with the output C3 of the second stage. After splicing, it is input to the second C2f module. The output at this time is used as the sixth stage, and the third UpSample is performed. The output is concat-operated with the output C2 of the first stage as the input of the third C2f module. At this time, the output feature map size is 160×160×65, which is input to the first Detect to complete the object prediction and accuracy calculation, and the loss is calculated through the Inner-ShapeIoU loss function for back propagation, and the network parameters are updated. The output of the third C2f module is used as the input of the first CBS module of the Neck part. The output result is concat-operated with the output of the third CBS module in Backbone and the output of the sixth stage, combining shallow spatial information and deep semantic information to reduce feature information loss. The splicing result is used as the input of the fourth C2f module. At this time, the output feature map size is 80×80×65, and it is input to the second Detect to complete the prediction and the second CBS module of the Neck part. After completing the object prediction, the loss is calculated through the Inner-ShapeIoU loss function for back propagation, and the network parameters are updated.The output of the second CBS module in the Neck part is concatenated with the output of the fourth CBS module in the Backbone and the output of the fifth stage. The concatenated feature map is used as the input of the final C2f module. The output feature map has a size of 40×40×65. The feature map is input to the third Detect module to complete the prediction and calculate the loss through the Inner-ShapeIoU loss function. Backpropagation is performed to update the network parameters. Experimental indicators are obtained through multiple rounds of training.

[0073] There are several Bottleneck modules in the MWTRM module. In the MWTRM modules of layers C2, C3, C4, and C5, the number of Bottleneck modules is 1, 3, 3, and 1, respectively.

[0074] Step 3: Input the SAR ship images of the training set preprocessed in step 1 into the SAR image ship detection network in step 2 for training, calculate the Inner-ShapeIoU loss function and perform backpropagation, update the network parameters, and obtain the optimal parameter model.

[0075] The Inner-ShapeIoU loss function combines ShapeIoU with Inner-IoU and embeds the dynamic auxiliary box mechanism into the weighted loss of the geometric features of the border. The dynamic auxiliary box mechanism is embedded into the weighted loss of the geometric features of the border. First, the auxiliary box is generated according to the following formula:

[0076] ,

[0077] ,

[0078] ,

[0079] ,

[0080] ,

[0081] ,

[0082] ,

[0083] in, and Indicates the coordinates of the center point of the real frame, and represents the width and height of the real box, 、 、 、 Respectively represent the left, right, top and bottom boundary coordinates of the dynamic auxiliary frame of the real frame, and Indicates the coordinates of the center point of the prediction box, and Indicates the width and height of the prediction box, 、 、 、 Represents the left, right, top, and bottom boundary coordinates of the dynamic auxiliary frame of the real frame, and the scale factor Used to control the scale of the dynamic auxiliary frame to adjust the sensitivity of the regression gradient, the present invention sets .

[0084] Then, the weight coefficient is calculated based on the aspect ratio of the original ground truth (GT) box, constraining the center point offset and size difference, and finally obtaining the regression loss of the box. The implementation formula is as follows:

[0085] ,

[0086] ,

[0087] ,

[0088] ,

[0089] ,

[0090] ,

[0091] ,

[0092] in, is the scaling factor, the present invention sets , and Shape weights are calculated based on the aspect ratio of the GT frame. The introduction of shape weights enhances the differential penalty for length and width offsets, which helps improve the positioning accuracy of non-square targets. and shape similarity loss They are used to impose weighted constraints on center point offset and size difference respectively.

[0093] The experimental indicators are accuracy, recall, average precision at IOU 0.5 (mAP 0.5), which represents the average accuracy when the IOU detection threshold is 0.5, and average precision at IOU 0.95 (mAP 0.5:0.95), which represents the average accuracy when the IOU detection threshold ranges from 0.5 to 0.95. The formula is as follows:

[0094] ,

[0095] ,

[0096] ,

[0097] in, Represents a true positive sample (True Positive), Indicates a false positive sample (FalsePositive), Indicates a positive sample that has not been detected (False Negative).

[0098] IOU stands for Intersection over Union (IOU), a measure of the geometric overlap between the predicted and annotated bounding boxes. It quantifies detection accuracy by calculating the ratio of the spatial intersection to the union of the two. It is a commonly used performance metric in object detection tasks. Furthermore, in object detection tasks, IOU serves as an optimization target in the loss function during model training, driving model parameter adjustments through backpropagation to improve bounding box regression accuracy. It is also used in the non-maximum suppression algorithm to filter out redundant detection boxes, ensuring that the final output box has optimal spatial coverage.

[0099] Step 4: Input the preprocessed test set in step 1 into the optimal parameter model trained in step 3, and output the ship detection map of the SAR ship image.

[0100] In order to prove the effectiveness of the SAR image ship small target detection method based on WSSRNet provided by the present invention, the model is trained, verified and tested using the HRSID ship detection dataset. As can be seen from Table 1, the evaluation indicators of the present invention are all higher than those of the existing detection network, and the detection effect is closest to the true value. The detection results are compared as follows: Figure 4 shown.

[0101] Table 1

[0102]

[0103] Based on the same inventive concept, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the aforementioned WSSRNet-based SAR image ship small target detection method are implemented.

[0104] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the aforementioned WSSRNet-based SAR image ship small target detection method.

[0105] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, 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 magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0106] 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 flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 flowcharts and / or block diagrams. 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.

[0107] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0109] The above embodiments are only for illustrating the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.

Claims

1. The SAR image ship small target detection method based on WSSRNet is characterized by: The steps include: Step 1: Obtain a SAR ship image dataset, preprocess the dataset, and divide it into a training set, a validation set, and a test set according to a set ratio; Step 2: Build a SAR image ship detection network based on WSSRNet, including the backbone network, neck network and detection layer; The backbone network includes the first to fifth convolution modules, the first to fourth multi-scale wavelet convolution residual modules and the fast spatial pyramid pooling module; the SAR ship image input by the backbone network is sequentially subjected to feature extraction by the first convolution module, the second convolution module and the first multi-scale wavelet convolution residual module to obtain a feature map C2; C2 is sequentially subjected to feature extraction by the third convolution module and the second multi-scale wavelet convolution residual module to obtain a feature map C3; C3 is sequentially subjected to feature extraction by the fourth convolution module and the third multi-scale wavelet convolution residual module to obtain a feature map C4; C4 is sequentially subjected to feature extraction by the fifth convolution module, the fourth multi-scale wavelet convolution residual module and the fast spatial pyramid pooling module to obtain a feature map C5; The first and fourth multi-scale wavelet convolution residual modules have the same structure, both including the eighth to tenth convolution modules, the first wavelet transform convolution module and the first to second bottleneck modules; The input of the first or fourth multi-scale wavelet convolution residual module is evenly divided into four feature subsets after passing through the eighth convolution module. The second feature subset is sequentially passed through the first wavelet transform convolution module and the ninth convolution module to obtain the output of the ninth convolution module; the output of the ninth convolution module is element-wise added to the third feature subset and used as the input of the first bottleneck module; the output of the first bottleneck module is element-wise added to the fourth feature subset and used as the input of the second bottleneck module; the output of the second bottleneck module is channel-wise spliced ​​with the output of the first bottleneck module, the output of the ninth convolution module, and the first feature subset, and used as the input of the tenth convolution module; the output of the tenth convolution module is channel-wise spliced ​​with the input of the first or fourth multi-scale wavelet convolution residual module to obtain the output of the first or fourth multi-scale wavelet convolution residual module; The second and third multi-scale wavelet convolution residual modules have the same structure, both including the eighth to tenth convolution modules, the first wavelet transform convolution module and the first to sixth bottleneck modules; The input of the second or third multi-scale wavelet convolution residual module is uniformly divided into four feature subsets after passing through the eighth convolution module. The second feature subset is sequentially passed through the first wavelet transform convolution module and the ninth convolution module to obtain the output of the ninth convolution module; the output of the ninth convolution module is element-wise added to the third feature subset and used as the input of the first bottleneck module; the output of the first bottleneck module is sequentially passed through the third bottleneck module and the fourth bottleneck module to obtain the output of the fourth bottleneck module; the output of the fourth bottleneck module is element-wise added to the fourth feature subset and used as the input of the second bottleneck module; the output of the second bottleneck module is sequentially passed through the fifth bottleneck module and the sixth bottleneck module to obtain the output of the sixth bottleneck module; the output of the sixth bottleneck module is channel-wise spliced ​​with the output of the fourth bottleneck module, the output of the ninth convolution module, and the first feature subset to obtain the input of the tenth convolution module; the output of the tenth convolution module is channel-wise spliced ​​with the input of the second or third multi-scale wavelet convolution residual module to obtain the output of the second or third multi-scale wavelet convolution residual module; The neck network includes the sixth to seventh convolution modules, the first to fifth cross-stage partial fusion modules and the first to third upsampling modules; the first upsampling module is used to upsample C5, the upsampling result is channel-joined with C4, the splicing result is subjected to feature fusion by the first cross-stage partial fusion module to obtain the feature map F0; the second upsampling module is used to upsample F0, the upsampling result is channel-joined with C3, the splicing result is subjected to feature fusion by the second cross-stage partial fusion module to obtain the feature map F1; the third upsampling module is used to upsample F1 Upsampling, the upsampling result is channel-wise spliced ​​with C2, and the splicing result is subjected to feature fusion by the third cross-stage partial fusion module to obtain feature map P2; P2 is subjected to feature extraction by the sixth convolution module, and then channel-wise spliced ​​with F1 and the output of the third convolution module. The splicing result is subjected to feature fusion by the fourth cross-stage partial fusion module to obtain feature map P3; P3 is subjected to feature extraction by the seventh convolution module, and then channel-wise spliced ​​with F0 and the output of the fourth convolution module. The splicing result is subjected to feature fusion by the fifth cross-stage partial fusion module to obtain feature map P4; The detection layer includes the first to third detection heads. The feature map P2 output by the third cross-stage partial fusion module is used as the input of the first detection head to detect small-scale ship targets. The feature map P3 output by the fourth cross-stage partial fusion module is used as the input of the second detection head to detect medium-scale ship targets. The feature map P4 output by the fifth cross-stage partial fusion module is used as the input of the third detection head to detect large-scale ship targets. Step 3: Input the training set and validation set into the SAR image ship detection network based on WSSRNet built in step 2 for training and validation, calculate the loss function and perform backpropagation, update the network parameters, and obtain the trained optimal parameter network; Step 4: Input the test set into the trained optimal parameter network and output the ship detection map of the SAR ship image.

2. The SAR image ship small target detection method based on WSSRNet according to claim 1 is characterized in that: The specific process of step 1 is as follows: The HRSID ship image dataset was obtained, which includes 5,604 SAR images of 800 × 800 pixels covering ocean, offshore, coastal ports, and different sea conditions. There are 16,951 ship targets in total, of which small, medium, and large ship targets account for 54.5%, 43.5%, and 2% of the total, respectively. The original images and corresponding label images in the HRSID ship image dataset are cropped into images of 640×640 pixels in sequence. The cropped HRSID ship image dataset is randomly divided into training set, validation set and test set in the ratio of 7:2:

1.

3. The SAR image ship small target detection method based on WSSRNet according to claim 1 is characterized in that: The first to sixth bottleneck modules have the same structure, each including a second wavelet transform convolution module and an eleventh convolution module. The input of each bottleneck module passes through the second wavelet transform convolution module and the eleventh convolution module in sequence to obtain the output of the eleventh convolution module. The output of the eleventh convolution module is channel-joined with the input of each bottleneck module to obtain the output of each bottleneck module. The convolution kernel sizes of the eighth to eleventh convolution modules are all 1×1, and the convolution kernel sizes of the first and second wavelet transform convolution modules are both 3×3.

4. The SAR image ship small target detection method based on WSSRNet according to claim 1 is characterized in that: The fast spatial pyramid pooling module includes 12th to 13th convolution modules and 1st to 3rd maximum pooling layers. The input of the fast spatial pyramid pooling module passes through the 12th convolution module, the first maximum pooling layer, the second maximum pooling layer, and the third maximum pooling layer in sequence to obtain the output of the third maximum pooling layer. The output of the third maximum pooling layer is channel-joined with the output of the first maximum pooling layer and the output of the second maximum pooling layer before entering the 13th convolution module. The output of the 13th convolution module is the output of the fast spatial pyramid pooling module.

5. The SAR image ship small target detection method based on WSSRNet according to claim 1 is characterized in that: In step 3, the loss function adopts the Inner-ShapeIoU loss function, combines ShapeIoU with Inner-IoU, and embeds the dynamic auxiliary box mechanism into the weighted loss of the geometric features of the border. The formula for generating the auxiliary box is as follows: union=(w gt ·h gt )·(ratio) 2 +(w·h)·(ratio) 2 -inter in, and Respectively represent the value of the center point of the real frame on the x and y axes, ω gt and h gt Represent the width and height of the real box respectively, Respectively represent the left, right, top, and bottom boundary coordinates of the dynamic auxiliary frame of the real frame, x c and y c Respectively represent the value of the center point of the prediction box on the x and y axes, ω and h represent the width and height of the prediction box, b l 、b r 、b t 、b b They represent the left, right, upper, and lower boundary coordinates of the dynamic auxiliary box of the prediction box, respectively. Ratio is the scale factor, which is used to control the scale of the dynamic auxiliary box to adjust the sensitivity of the regression gradient; IoU inner Represents the intersection-over-union ratio of the predicted box and the true box; The shape weight is calculated based on the aspect ratio of the real box, the center point offset and size difference are constrained, and finally the regression loss of the border is obtained. The implementation formula is as follows: L Inner-ShapeIoU =1-IoU inner +distance shape +0.5×Ω shape Among them, ww and hh are shape weights, scale is the scaling factor, and distance shape represents the shape distance loss, Ω shape represents the shape similarity loss, c represents the diagonal length of the minimum enclosing box covering the predicted box and the true box, L Inner-ShapeIoU represents the Inner-ShapeIoU loss, ω w represents the weighted term about the difference in width between the predicted box and the true box calculated based on the shape weight hh, ω h Represents the weighted term about the height difference between the predicted box and the true box calculated based on the shape weight ww.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor executes the computer program, the steps of the method for detecting small ship targets in SAR images based on WSSRNet are implemented as described in any one of claims 1 to 5.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting small ship targets in SAR images based on WSSRNet are implemented.

Citation Information

Patent Citations

  • Special-shaped copper strip defect real-time detection method and system, terminal equipment and storage medium

    CN119515838A