A SAR ship target detection method based on attention pyramid

Through the SAR ship target detection method based on the attention pyramid, feature extraction and hybrid attention feature pyramid network are used for refined processing, which solves the problem of low ship detection accuracy under the influence of speckle noise in SAR images and significantly improves the detection accuracy.

CN114419490BActive Publication Date: 2024-09-03BEIJING INST OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111627620.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-09-03
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

Speckle noise in SAR images causes problems for ship detection in complex backgrounds, resulting in low detection accuracy.

Method used

The SAR ship target detection method based on the attention pyramid is used to obtain the preliminary feature map through the feature extraction network, and input it into the hybrid attention feature pyramid network for refined extraction. It combines channel and spatial attention for feature fusion and refinement processing, and finally inputs Classification and regression subnetworks for ship detection.

Benefits of technology

It improves the accuracy of ship detection in complex backgrounds and enhances the detection and recognition effects of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419490B
    Figure CN114419490B
Patent Text Reader

Abstract

The present invention provides a SAR ship target detection method based on attention pyramid, wherein the SAR image is input into a feature extraction network to obtain a preliminary feature extraction result; the preliminary extracted features are input into a feature pyramid network based on channel attention and spatial attention to obtain a more refined feature extraction result. Compared with the traditional SAR image ship detection method, this scheme improves the detection and recognition accuracy of ships by first completing preliminary feature extraction of the SAR image, and then using the channel attention and spatial attention feature pyramid network to refine the extracted preliminary features; especially for ship detection tasks under complex backgrounds, the feature pyramid network based on channel attention and spatial attention proposed in this scheme can enable the model to have higher detection and recognition effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of synthetic aperture radar target detection, and in particular to a SAR ship target detection method based on an attention pyramid. Background Art

[0002] Synthetic Aperture Radar (SAR) is an active microwave imaging sensor that provides high-resolution images around the clock and in all weather conditions. Since SAR imaging is not affected by natural factors such as clouds, rain, and weather, SAR images are widely used in military and civilian fields.

[0003] However, due to the characteristics of SAR's own imaging method, a multiplicative noise called speckle noise will be added to the image, which will cause problems for target detection in SAR images, especially for ship detection in complex backgrounds such as land and coastal areas. This problem becomes particularly prominent. Summary of the invention

[0004] The present invention provides a SAR ship target detection method based on attention pyramid, and the main technical problem solved is: how to improve the accuracy of ship target detection in SAR images under complex backgrounds.

[0005] In order to solve the above technical problems, the present invention provides a SAR ship target detection method based on attention pyramid, comprising:

[0006] Obtain the SAR image to be tested, input it into the feature extraction network, and obtain the preliminary extracted feature map C with different resolution sizes. i ; i is greater than or equal to 2; characteristic graph C i The resolution is 1 / 2 of the SAR image to be tested i ;

[0007] The preliminary feature extraction feature map is input into the hybrid attention feature pyramid network, and the refined extracted feature map P is output. i '; wherein the hybrid attention feature pyramid network includes a feature pyramid network and a hybrid attention network composed of a spatial attention network and a channel attention network in parallel, wherein the feature pyramid network is used to convert at least part of the initially extracted feature map C i Information fusion is performed, and the hybrid attention network performs refined extraction based on the fusion result F to obtain the refined extracted feature map P i ′;

[0008] The refined extracted feature map P i ′ Input classification and regression sub-networks and output ship detection targets.

[0009] Optionally, the feature extraction network includes a ResNet-50 network.

[0010] Optionally, the input is fed into a feature extraction network to obtain a preliminary extracted feature map C with different resolution sizes. i include:

[0011] Feature extraction is performed through the ResNet-50 network to obtain feature maps equivalent to 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the resolution of the SAR image to be tested, which are denoted as C2, C3, C4, and C5 respectively.

[0012] Optionally, the classification and regression sub-networks adopt a 3x3 convolutional cascade network.

[0013] Optionally, the feature pyramid network is used to convert at least part of the initially extracted feature map C i Information fusion includes:

[0014] Adjust the selected feature maps C i The number of channels remains the same, and the adjusted feature map is denoted as T i ; The i is greater than or equal to 3;

[0015] By analyzing the previous feature map T i-1 Upsampling result and current feature map T i Sum and get the fused feature map M i ;

[0016] By combining the fused feature map M i The fusion result F is obtained by connection and merging.

[0017] Optionally, in the fused feature map M i Before the connection and merging, it also includes: i Use 3x3 convolution to alleviate the problem, and the feature map after convolution is denoted as P i .

[0018] Optionally, the hybrid attention network performs refined extraction based on the fusion result F, including:

[0019] Using the channel attention network, calculate the first score of the fusion result F ca ;

[0020] Using the spatial attention network, calculate the second score of the fusion result F sa ;

[0021] Based on the first score caWith the second score sa Add and sum to get the mixed attention score;

[0022] Multiply the hybrid attention score by the fusion result F as the output feature map of the hybrid attention network, denoted as U;

[0023] The resolution of the output feature map U of the hybrid attention network is adjusted so that each feature map P in the output feature map U i The resolution of the initially extracted feature map C i The resolution of the refined extracted feature map P is obtained. i ′.

[0024] Optionally, it also includes determining the refined extracted feature map P i The feature map P′ with the smallest resolution in ′ i min reaches the set resolution threshold, if not, i min uses a convolution with a step size of 2 to downsample to get P′ i+1 , and judge P′ i+1 Whether the set resolution threshold is reached, P′ is re-calculated. i+1 Use convolution with a step size of 2 to downsample and get P' i+2 , and so on, until the refined extracted feature map P i ' contains a feature graph whose resolution reaches the set resolution threshold.

[0025] Optionally, the set resolution threshold is 1 / 128 of the resolution of the SAR image to be measured.

[0026] Optionally, i∈[2,5].

[0027] The beneficial effects of the present invention are:

[0028] The present invention provides a SAR ship target detection method based on attention pyramid, wherein the SAR image is input into a feature extraction network to obtain a preliminary feature extraction result; the preliminary extracted features are input into a feature pyramid network based on channel attention and spatial attention to obtain a more refined feature extraction result. Compared with the traditional SAR image ship detection method, this scheme improves the detection and recognition accuracy of ships by first completing preliminary feature extraction of SAR images, and then using channel attention and spatial attention feature pyramid networks to refine the extracted preliminary features; especially for ship detection tasks under complex backgrounds, the feature pyramid network based on channel attention and spatial attention proposed in this scheme can enable the model to have higher detection and recognition effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flow chart of the SAR ship target detection method based on attention pyramid of the present invention;

[0030] Figure 2 Schematic diagram of the feature pyramid network structure based on hybrid attention of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below through specific implementation methods in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0032] Embodiment 1:

[0033] This embodiment provides a SAR ship target detection method based on attention pyramid, and its process is as follows: Figure 1 As shown in the figure, first, the SAR image is input into the feature extraction network to output the preliminary feature extraction result; the preliminary extracted feature map is input into the hybrid attention feature pyramid network based on spatial attention and channel attention to obtain the refined feature extraction result; the refined feature extraction result is sent to the classification and regression sub-network to obtain the final ship detection result.

[0034] The specific implementation process of this solution is as follows:

[0035] Step 1: Preliminary feature extraction

[0036] The SAR image is input into the backbone network of the image classification network. The backbone network includes the ResNet-50 network trained on the ImageNet dataset. Feature extraction is performed through the ResNet-50 network to obtain preliminary feature extraction results.

[0037] The ResNet-50 network has a large receptive field, good feature extraction effect, and has the advantage of fast running speed. The training process of the ResNet-50 network can adopt any existing method, which is not the focus of the present invention, so it will not be repeated here. It is only necessary to input the SAR image to complete the preliminary feature extraction.

[0038] Optionally, the ResNet-50 network performs feature extraction on the input SAR image, and obtains preliminary feature extraction results including: obtaining feature maps with a resolution of 1 / 4 (C2), 1 / 8 (C3), 1 / 16 (C4), and 1 / 32 (C5) of the original image.

[0039] The present invention can achieve further refined extraction of preliminary features based on the following feature pyramid network with hybrid attention, thereby improving the accuracy of ship detection in complex backgrounds.

[0040] Step 2: Feature Refinement Extraction

[0041] See also Figure 2 , including the following steps:

[0042] a1. Feature pyramid network completes information fusion of multi-scale features

[0043] The C3, C4, and C5 feature maps output by the feature extraction network are sent to a hybrid attention feature pyramid network based on spatial attention and channel attention to complete the fusion of information between feature maps of different resolutions and the refined extraction of features.

[0044] In this embodiment, the hybrid attention feature pyramid network based on spatial attention and channel attention mainly includes a feature pyramid network (FPN) and a hybrid attention network (CSA-Net) composed of a spatial attention network and a channel attention network in parallel.

[0045] The Feature Pyramid Network (FPN) is used to fuse information and reconstruct feature maps of initially extracted feature maps with different resolution sizes. The Hybrid Attention Network (CSA-Net) is based on the attention mechanism to extract salient features useful in classification and regression tasks from feature maps generated by the FPN network. At the same time, the Hybrid Attention Network will continuously update parameters according to the loss calculated by the network, and autonomously find the most suitable features for classification and regression.

[0046] Information fusion is completed using a feature pyramid network. In this embodiment, the feature pyramid network includes lateral connections and top-down feature fusion. The lateral connection is used to adjust the number of channels of the C3, C4, and C5 feature maps so that the number of channels of feature maps of different resolutions remains consistent; specifically, the number of channels can be adjusted using 1x1 convolution, as shown in the following formula (1):

[0047] T i =Conv 1×1 (C i ) i=3,4,5; (1)

[0048] Here, the number of channels is adjusted to 256 (the specific number can be flexibly set and there is no restriction on this), and the adjusted feature maps are recorded as T3, T4, and T5 respectively.

[0049] The top-down feature fusion is used to complete the information exchange between feature maps of different resolutions and enhance the semantic information of high-resolution feature maps. Specifically, the feature maps T3, T4, and T5 after the number of channels is adjusted are interpolated in a top-down manner and element-based addition to obtain the fused feature maps M3, M4, and M5, as shown in the following formula (2):

[0050] M i =Upsample(T i-1 )+T i i=3,4,5; (2)

[0051] At the same time, in order to eliminate the aliasing effect in the interpolation process, the fused feature maps M3, M4, and M5 are each alleviated by 3x3 convolution to obtain the convolved feature maps denoted as P3, P4, and P5, see the following formula (3):

[0052] P i =Conv 3×3 (M i ) i=3,4,5; (3)

[0053] The feature maps of P3, P4, and P5 are merged according to the channel dimension, as shown in the following formula (4):

[0054] F = concat(P3,P4,P5); (4)

[0055] Finally, the output result F of the feature pyramid network is obtained.

[0056] a2. Refined extraction of fusion features based on hybrid attention mechanism

[0057] The above fused feature maps are spliced ​​according to the channel dimension and input into the feature fusion network with spatial attention and channel attention to obtain the refined features. In order to meet the output form of the original feature pyramid, the resolution of the refined feature maps is adjusted here to output feature maps with different receptive field sizes.

[0058] The output result F of the feature pyramid is sent to the hybrid attention network to generate a hybrid attention score score, where the hybrid attention score score is the channel attention score score ca And the spatial attention score sa The result of addition.

[0059] Among them, the channel attention score ca The calculation method is as follows:

[0060] score ca=CA(F); (5)

[0061] Spatial attention score sa The calculation method is as follows:

[0062] score sa =SA(F); (6)

[0063] The mixed attention score is the channel attention score. ca And the spatial attention score sa The result of the addition is shown in the following formula (7):

[0064] score=score ca +score sa ; (7)

[0065] Multiply the score by F as the output feature map of the hybrid attention network, denoted as U, as shown in the following formula (8):

[0066] U=F*score; (8)

[0067] In order to follow the output paradigm of the feature pyramid network and meet the needs of the subsequent classification and regression sub-networks, the resolution of the output result U of the hybrid attention network is adjusted so that the resolution of the output feature map corresponds to the resolution of the output feature map C3, C4, and C5 of the feature extraction network, that is, 1 / 8, 1 / 16, and 1 / 32 of the input image, respectively, and are denoted as P3', P4', and P5', respectively, see the following formula (9):

[0068] P i ′=resize(U) i=3,4,5; (9)

[0069] At the same time, in order to better detect objects of different scales, P5' is downsampled using a convolution with a step size of 2 to obtain P6', see the following formula (10):

[0070] P′6=Conv 3×3 (P′5); (10)

[0071] The resolution of the feature map of P6' is 1 / 64 of the input image. Further, P6' is downsampled using a convolution with a step size of 2 to obtain P7', and the resolution of the feature map of P7' is 1 / 128 of the input image, see the following formula (11):

[0072] P′7=Conv 3×3 (P′6); (11)

[0073] The resolution of the P7' feature map is 1 / 128 of the input image. At this time, the resolution of the P7' feature map reaches the set resolution threshold, and further downsampling of the P7' feature map is stopped. Of course, the resolution threshold can also be flexibly set, and there is no restriction on this.

[0074] Step 3: Classification and regression subnetworks complete ship detection

[0075] The refined feature maps of different resolutions obtained in step 2 are sent to the classification and regression sub-network to obtain the detection results of the ship. The classification and regression sub-network adopts a 3x3 convolutional cascade network. The convolutional cascade structure can provide accurate classification and positioning results.

[0076] In order to improve the accuracy of ship target detection in SAR images under complex backgrounds, the present invention further optimizes the feature fusion network based on the feature fusion pyramid network. Considering that the complex background environment in SAR images is closely related to the ship target detection results, affecting the accuracy of the ship target detection results, how to improve the expression ability of the fused features is the key. The present invention improves on the basis of the conventional feature pyramid network, splices the feature maps with different resolution sizes after the original network fusion in the channel dimension, and then inputs them into the hybrid attention network based on spatial attention and channel attention to complete the refined extraction of feature maps, and finally reconstructs feature maps of different resolution sizes, which are sent to the classification and regression sub-networks to obtain the detection results of ships.

[0077] Obviously, those skilled in the art should understand that the above steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a computer storage medium (ROM / RAM, disk, optical disk) and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Therefore, the present invention is not limited to any specific combination of hardware and software.

[0078] The above contents are further detailed descriptions of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A SAR ship target detection method based on attention pyramid, It is characterized in that include: Obtain the SAR image to be tested, input it into the feature extraction network, and obtain the preliminary extracted feature map C with different resolution sizes. i ; i is greater than or equal to 2; characteristic graph C i The resolution is 1 / 2 of the SAR image to be tested i ; The preliminary feature extraction feature map is input into the hybrid attention feature pyramid network, and the refined extracted feature map P is output. i '; wherein the hybrid attention feature pyramid network includes a feature pyramid network and a hybrid attention network composed of a spatial attention network and a channel attention network in parallel, wherein the feature pyramid network is used to convert at least part of the initially extracted feature map C i Information fusion is performed, and the hybrid attention network performs refined extraction based on the fusion result F to obtain the refined extracted feature map P i ′; The refined extracted feature map P i ′ Input classification and regression sub-networks and output ship detection targets.

2. The SAR ship target detection method based on attention pyramid as claimed in claim 1, It is characterized in that The feature extraction network includes a ResNet-50 network.

3. The SAR ship target detection method based on attention pyramid as claimed in claim 2, It is characterized in that The input is fed into the feature extraction network to obtain a preliminary extracted feature map C with different resolution sizes. i include: Feature extraction is performed through the ResNet-50 network to obtain feature maps equivalent to 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the resolution of the SAR image to be tested, which are denoted as C2, C3, C4, and C5 respectively.

4. The SAR ship target detection method based on attention pyramid as claimed in claim 1, It is characterized in that The classification and regression sub-networks use a 3x3 convolutional cascade network.

5. The SAR ship target detection method based on attention pyramid according to any one of claims 1 to 4, It is characterized in that The feature pyramid network is used to transform at least part of the initially extracted feature map C i Information fusion includes: Adjust the selected feature maps C i The number of channels remains the same, and the adjusted feature map is denoted as T i ; The i is greater than or equal to 3; By analyzing the previous feature map T i-1 Upsampling result and current feature map T i Sum and get the fused feature map M i ; By combining the fused feature map M i The fusion result F is obtained by connection and merging.

6. The SAR ship target detection method based on attention pyramid as claimed in claim 5, It is characterized in that In the fused feature map M i Before the connection and merging, it also includes: i Use 3x3 convolution to alleviate the problem, and the feature map after convolution is recorded as P i .

7. The SAR ship target detection method based on attention pyramid as claimed in claim 6, It is characterized in that The hybrid attention network performs refined extraction based on the fusion result F, including: Using the channel attention network, calculate the first score of the fusion result F ca ; Using the spatial attention network, calculate the second score of the fusion result F sa ; Based on the first score ca With the second score sa Add and sum to get the mixed attention score; Multiply the hybrid attention score by the fusion result F as the output feature map of the hybrid attention network, denoted as U; The resolution of the output feature map U of the hybrid attention network is adjusted so that each feature map P in the output feature map U i The resolution of the initially extracted feature map C i The resolution of the refined extracted feature map P is obtained. i ′.

8. The SAR ship target detection method based on attention pyramid as claimed in claim 7, It is characterized in that It also includes judging the refined extracted feature map P i The feature map P′ with the smallest resolution in ′ i min reaches the set resolution threshold, if not, i min uses a convolution with a step size of 2 to downsample to get P′ i+1 , and judge P′ i+1 Whether the set resolution threshold is reached, P′ is re-calculated. i+1 Use convolution with a step size of 2 to downsample and get P' i+2 , and so on, until the refined extracted feature map P i ' contains a feature graph whose resolution reaches the set resolution threshold.

9. The SAR ship target detection method based on attention pyramid as claimed in claim 8, It is characterized in that The set resolution threshold is 1 / 128 of the resolution of the SAR image to be measured.

10. The SAR ship target detection method based on attention pyramid as claimed in claim 9, It is characterized in that Said i∈[2,5].