Radar image ship target detection method based on trunk lightweight feature enhancement
By adopting the backbone lightweight feature enhancement method in SAR image ship target detection, the backbone network, feature fusion network, global attention network and detection head are used to solve the problem of multi-scale targets, complex networks, and easy disappearance of small target information, achieving efficient and accurate target detection and reducing computational complexity.
Patent Information
- Application Number
- CN202411851810.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-16
AI Technical Summary
In SAR image ship target detection, there are problems such as multi-scale targets, complex networks, and small target information is prone to disappear, resulting in poor detection results and high computational complexity.
Radar image ship target detection method with enhanced backbone lightweight feature, including feature extraction backbone network, feature fusion network, global attention network and detection head. Through residual block structure and depth, convolutional layer and global attention mechanism can be separated, and features can be extracted and fused, to improve detection accuracy and reduce calculation complexity.
It effectively reduces the computational complexity, retains small target information, improves detection accuracy, is suitable for mobile deployment, and improves the detection effect of multi-scale and irregular characteristics of ship targets.
Smart Images

Figure CN119810644A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and is applied to the detection task of ship targets in SAR images. In particular, it relates to a radar image ship target detection method with backbone lightweight feature enhancement. Background Art
[0002] Synthetic Aperture Radar (SAR) has become an important part of radar research with its all-weather, all-day, and high-resolution features. Target detection is an important basis for interpreting and processing radar images. At present, target detection in SAR images is mainly divided into traditional methods and target detection methods based on deep learning. In the detection of SAR ship targets, the biggest feature of traditional algorithms is that they need to manually design and extract target features, such as grayscale, contrast, shape, texture, etc. Traditional SAR ship target detection algorithms generally use the artificially designed feature differences between targets for target detection. This algorithm can often achieve relatively satisfactory results when the background clutter is simple and the scene interference is small. However, in some complex environments, more false alarms will occur, which greatly reduces the accuracy of the algorithm. The target detection method based on deep learning does not require artificial design of target features in advance. The neural network learns and self-updates a large amount of data through various internal feature extraction structures, thereby achieving more accurate target detection results. With the development of deep learning technology and the update of computer equipment computing power, it has become possible to deploy neural networks in the field of SAR image target detection.
[0003] Among the traditional SAR image target detection algorithms, the most representative one is the Constant False Alarm (CFAR) detection algorithm. In the CFAR algorithm, the statistical distribution of the background in the SAR image is first fitted, and then the threshold is calculated and the target detection is completed. However, in practical applications, the statistical distribution of the background is often affected by waves, sea clutter, etc., which makes it difficult to fit a suitable statistical distribution to describe the background. The traditional SAR image target detection algorithm represented by the CFAR algorithm is a pixel-level detection algorithm. When performing image processing, especially high-resolution images, the traditional target detection algorithm will result in a large amount of calculation, and the detection speed will be greatly reduced, which is difficult to meet real-time requirements.
[0004] With the development of neural networks, target detection technology based on deep learning has become an important and mainstream research direction in this field, and more and more related target detection methods have been proposed. The operation process of neural networks can be briefly summarized as follows: first, the input image is extracted through the convolution layer, the output of the convolution layer is activated by the activation function, and nonlinear factors are added to enable it to fit complex functions. Then, the classification or regression results are output through the layer structure of pooling, normalization, and full connection. The whole process is uniformly back-propagated according to the loss function generated in the calculation process, and the learnable parameters in the calculation process are adaptively optimized, and finally the network convergence is achieved to ensure a high accuracy. It is precisely because of its powerful fitting ability and the ability to extract abstract features from large-scale data that the target detection algorithm based on deep learning has achieved success. In addition, since there is no need to artificially design feature differences in the neural network, the generalization ability of the network is also enhanced. The network with these advantages can achieve higher accuracy in the task of ship target detection in SAR images.
[0005] The mainstream and highly accurate neural networks are now all for optical image detection tasks. SAR images are very different from optical images, and directly applying the network will lead to poor detection results. The ordinary convolution used by the traditional convolution layer is to extract features from the rectangular area on the input image, including the improved depthwise separable convolution, which only simplifies the operation parameters and does not change the target shape problem during feature extraction; different from optical images, due to the imaging mechanism of the SAR system, SAR images often contain very complex background clutter and coherent noise, which makes the system easily interfered when performing target detection; in the detection task of optical images, deeper networks often contain more detailed feature information, thereby obtaining higher detection accuracy, and SAR images have the characteristics of large scenes and small targets. Although deep networks can better capture detailed information, as the network deepens, the information of small targets will gradually fade or even disappear, which will cause the network to learn useless feature information and fitting difficulties. At the same time, the high accuracy of neural networks is often accompanied by greater computational complexity. When deployed on mobile terminals such as airborne and satellite-borne, it puts a test on the real-time performance and computing power of the equipment. Therefore, balancing computational complexity and prediction accuracy is also a key issue in SAR image target detection tasks. Summary of the invention
[0006] The purpose of the present invention is to provide a radar image ship target detection method with backbone lightweight feature enhancement, so as to solve the problems of multi-scale targets, complex networks and easy disappearance of small target information in SAR image ship target detection.
[0007] In order to achieve the above tasks, the present invention adopts the following technical solutions:
[0008] A radar image ship target detection method with backbone lightweight feature enhancement, comprising:
[0009] Acquire a SAR image to be detected, input the SAR image into a trained target detection model, and output the target detection result through the model; wherein the target detection model includes a feature extraction backbone network, a feature fusion network, a global attention network, and a detection head;
[0010] The feature extraction backbone network includes, from front to back, a convolution layer Conv, a depth-separable convolution layer DWConv, a batch normalization layer BN, and four residual blocks connected in sequence, and a SiLU activation function is set after the batch normalization layer;
[0011] The feature fusion network includes three layers of feature pyramids, with the output of the fourth residual block as the top layer of the feature pyramid; the middle layer of the feature pyramid is obtained by adding the output of the third residual block to the top layer after 2 times upsampling, and the bottom layer of the feature pyramid is obtained by adding the output of the second residual block to the middle layer after 2 times upsampling;
[0012] The global attention network includes a global attention block. Each layer of the feature pyramid output enters a global attention block. The global attention block contains three branches, namely the shortcut mapping branch, the compression normalization branch, and the activation explicitation branch.
[0013] The output of the global attention network enters the detection head, which outputs the target detection result.
[0014] Furthermore, in the feature extraction backbone network, the input SAR image is resized and the Focus function is implemented using the convolution layer Conv. Then, the initial feature extraction is achieved through the depthwise separable convolution layer DWConv and the batch normalization layer BN to reduce the calculation parameters, and then it is activated through the SiLU activation function.
[0015] Furthermore, two variable convolution layers with convolution kernels of different sizes are used in the residual block structure. The number of input and output channels of the variable convolution layer with a convolution kernel size of 1x1 is the same, and the number of output channels of the variable convolution layer with a convolution kernel size of 3x3 is half of the original input channels.
[0016] Furthermore, the residual block structure has two branches:
[0017] In the first branch, the input feature map X entering the residual block is first processed by the first variable convolution layer DConv, and the number of channels remains unchanged. After passing through the second variable convolution layer, the number of channels is reduced to half, recorded as X1; X1 enters the depthwise separable convolution layer DWConv to obtain X2, and X1 and X2 are then spliced in the channel dimension, and then pass through the SE attention mechanism and another variable convolution layer DConv to obtain X output ; The second branch is a shortcut mapping branch, which directly outputs the input feature map X; the output feature map of the final residual block is X output The result after splicing with X
[0018] Furthermore, among the four residual blocks, the output of the previous residual block is used as the input of the next residual block; and the outputs of the second, third, and fourth residual blocks are used as the input of the feature pyramid in the feature fusion network for feature fusion.
[0019] Furthermore, the processing process of the variable convolution layer DConv is expressed as:
[0020]
[0021] Among them, R represents the convolution kernel, p n Represents the offset of each point in the convolution kernel relative to the center point, w(p n ) represents the weight of the corresponding position of the convolution kernel, x(p0+p n ) represents p0+p on the feature map n The element value at position y(p0) represents the element value at position p0 on the output feature map, which is obtained by convolving the convolution kernel with the input feature map; the offset Δp n are learnable parameters during the object detection model training process.
[0022] Furthermore, in the global attention network:
[0023] The shortcut mapping branch is used to transform the input feature map X N Direct mapping as output;
[0024] The compression normalization branch is used to convert the input feature map X N After the depth separable convolution layer DWConv reduces the calculation parameters, the output feature map X is obtained after the batch normalization layer BN and the convolution layer Conv processing. N1 ;
[0025] The activation explicit branch is used to transform the input feature map X N After adjusting the number of channels, we get X N2 , then with X N1 Add element by element to get the transition feature X add; Transition feature X add After the convolution layer Conv processing and the nonlinear function Sigmoid activation, we get after With X N1 Multiplying element by element, we get
[0026] The output of the final global attention block is X Noutput for With X N The result of element-wise addition.
[0027] Furthermore, the detection head adopts the detection head of the YOLOv8 network.
[0028] A terminal device comprises a processor, a memory and a computer program stored in the memory; the characteristic is that when the processor executes the computer program, the radar image ship target detection method with trunk lightweight feature enhancement is implemented.
[0029] A computer-readable storage medium having a computer program stored therein; characterized in that when the computer program is executed by a processor, the radar image ship target detection method with trunk lightweight feature enhancement is implemented.
[0030] Compared with the prior art, the present invention has the following technical features:
[0031] The network model proposed in the present invention uses an anchor-free network architecture, avoiding the complex calculations in the traditional anchor network (anchorbase). A residual block structure is designed for the flexible deployment requirements of the mobile terminal. In actual measurements, the calculation parameters in each iteration are effectively reduced, and the small target information is well preserved, reducing the computing power requirements of the actual deployed equipment; in view of the multi-scale and irregular characteristics of ship targets, variable convolution is introduced to more accurately extract the contour information of ship targets and improve the detection effect of network ship targets; in the feature network fusion part, in order to make up for the problem that traditional attention only focuses on local information and wastes global information, on the basis of the traditional FPN structure, global information is taken into consideration, and an activation function that is more suitable for binary classification targets is used, which effectively improves the detection accuracy of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of an application flow in one embodiment of the present invention;
[0033] Figure 2 This is a structural diagram of the target detection model proposed in the present invention;
[0034] Figure 3 This is a structural diagram of the residual block proposed by the present invention;
[0035] Figure 4 The structural diagram of the global attention block proposed in the present invention;
[0036] Figure 5 The following is a comparison of the detection effect performance between the embodiment of the present invention and the existing network. DETAILED DESCRIPTION
[0037] See attached Figure 1 The present invention provides a radar image ship target detection method with backbone lightweight feature enhancement. In the method, a lightweight target detection model is constructed, and a global attention mechanism is introduced into the feature pyramid network (FPN) structure to improve the feature fusion process and realize feature enhancement, so as to better preserve the feature information of small targets. The method of the present invention specifically comprises the following steps:
[0038] Acquire the SAR image to be detected, input the SAR image into the trained target detection model, and output the target detection result through the model; wherein the target detection model includes a feature extraction backbone network, a feature fusion network, a global attention network and a detection head.
[0039] 1. Feature extraction backbone network
[0040] See attached Figure 2 The feature extraction backbone network proposed in this scheme includes a convolution layer Conv, a depth-separable convolution layer DWConv, a batch normalization layer BN, and four residual blocks connected in sequence from front to back, and a SiLU activation function is set after the batch normalization layer.
[0041] In one embodiment of the present invention, the input SAR image is resized to 640*640*3, and then passes through a convolution layer Conv with a convolution kernel size of 6x6 and an output channel number of 12 to implement the Focus function. At this time, the output feature map size is 320*320*12; then, a depthwise separable convolution layer DWConv and a batch normalization layer BN are passed to implement preliminary feature extraction to reduce calculation parameters, and then the SiLU activation function is used for activation. At this time, the output feature map size is 320*320*64.
[0042] See attached Figure 3 The present invention provides a residual block structure, in which two variable convolution layers with convolution kernels of different sizes are used. The number of input and output channels of the variable convolution layer with a convolution kernel size of 1x1 is the same, and the number of output channels of the variable convolution layer with a convolution kernel size of 3x3 is half of the original input channels.
[0043] The residual block structure has two branches:
[0044] In the first branch, the input feature map X entering the residual block is first processed by the first variable convolution layer DConv, and the number of channels remains unchanged. After passing through the second variable convolution layer, the number of channels is reduced to half, recorded as X1; X1 enters the depthwise separable convolution layer DWConv to obtain X2, and X1 and X2 are then spliced in the channel dimension, and then pass through the SE attention mechanism and another variable convolution layer DConv to obtain X output ; The second branch is a shortcut mapping branch, which directly outputs the input feature map X; the output feature map of the final residual block is X output The result after splicing with X
[0045] Four residual blocks are arranged in sequence from front to back, and the output of the previous residual block is used as the input of the next residual block; at the same time, the outputs of the second, third and fourth residual blocks are used as the input of the feature pyramid in the feature fusion network for feature fusion.
[0046] In one embodiment of the present invention, the output feature map size of the first residual block is 320*320*128, the output feature map size of the second residual block is 160*160*256, the output feature map size of the third residual block is 80*80*512, and the output feature map size of the fourth residual block is 40*40*1024.
[0047] For any point p0 on the feature map, the traditional convolution can be expressed as:
[0048]
[0049] Among them, p n Represents the offset of each point in the convolution kernel relative to the center point, w(p n ) represents the weight of the corresponding position of the convolution kernel, x(p0+p n ) represents p0+p on the feature map n The element value at position y(p0) represents the element value at position p0 on the output feature map, which is obtained by convolving the convolution kernel with the input feature map; the offset Δp is introduced n After that, the variable convolution layer DConv is obtained, which is expressed as:
[0050]
[0051] Among them, the offset Δp n are learnable parameters during the object detection model training process.
[0052] 2. Feature Fusion Network
[0053] The feature fusion network includes three layers of feature pyramid. The feature map size of the top layer of the feature pyramid is the smallest and the most features. This scheme uses the output of the fourth residual block as the top layer of the feature pyramid. At this time, the feature map size is 40*40*1024; the middle layer of the feature pyramid is obtained by adding the output of the third residual block and the top layer after 2 times upsampling. At this time, the feature map size is 80*80*512; the bottom layer of the feature pyramid is obtained by adding the output of the second residual block and the middle layer after 2 times upsampling. At this time, the feature map size is 160*160*256.
[0054] 3. Global Attention Network
[0055] In this scheme, the global attention network includes a global attention block. Each layer of the feature pyramid output enters a global attention block, and the number of input channels is controlled to be unified to 256. The global attention block contains three branches, namely, the shortcut mapping branch, the compression normalization branch, and the activation explicitation branch, as shown in Figure 4 As shown, where:
[0056] The shortcut mapping branch is used to transform the input feature map X N Direct mapping as output;
[0057] The compression normalization branch is used to convert the input feature map X N After the depth separable convolution layer DWConv reduces the calculation parameters, the output feature map X is obtained after the batch normalization layer BN and the convolution layer Conv processing. N1 ;
[0058] The activation explicit branch is used to transform the input feature map X N After adjusting the number of channels, we get X N2 , then with X N1 Add element by element to get the transition feature X add ; Transition feature X add After the convolution layer Conv processing and the nonlinear function Sigmoid activation, we get after With X N1 Multiplying element by element, we get
[0059] The output of the final global attention block is X Noutput for With X N The result of element-wise addition.
[0060] In the above global attention block of this scheme, the ordinary convolution layer Conv structure realizes the full connection function, and uses 1x1 convolution kernel. Each branch is adjusted to keep the number of output channels consistent, and finally the number of output channels is unified to 256; in the compression and normalization branch, the DWConv convolution kernel size is 1x1, the number of output channels is 256, and the result is normalized using BN to reduce the calculation parameters and speed up the network convergence; in the activation and explicitation branch, the sigmoid(·) function is used to activate the result, compressing the values on the feature map to the range of (0,1) to enhance the representation ability of the feature map.
[0061] 4. Detection head
[0062] The output of the global attention network enters the detection head, and the target detection result is output through the detection head; in this embodiment, the detection head adopts the detection head of the YOLOv8 network.
[0063] The number of input channels of the detection head is 256, and in order to ensure the small target detection effect while minimizing the network calculation parameters, the outputs of the three global attention blocks are connected to the detection head.
[0064] 5. Training of target detection model
[0065] First, a SAR image ship target dataset for target detection is collected. For convenience, the public SSDD dataset can be used directly. The environment used in this embodiment is NVIDIA GeForce RTX 4060 8GB.
[0066] The target detection model is trained using the dataset and the network effect is evaluated. The evaluation indicators are mainly: accuracy, recall, F1 score and mean average precision (mAP). 50 ; If the training result meets the requirements, stop the training and save the trained target detection model for target recognition in SAR images; if it does not meet the requirements, adjust the hyperparameters and repeat the training process. In the experimental results shown in this embodiment, the batch size is 58, the number of training times is 50, and the initial learning rate is 0.002.
[0067] The experimental results of the present invention on the SSDD dataset are recorded as follows. Figure 5 shown.
[0068]
[0069] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A radar image ship target detection method with backbone lightweight feature enhancement, characterized in that: include: Acquire a SAR image to be detected, input the SAR image into a trained target detection model, and output the target detection result through the model; wherein the target detection model includes a feature extraction backbone network, a feature fusion network, a global attention network, and a detection head; The feature extraction backbone network includes, from front to back, a convolution layer Conv, a depth-separable convolution layer DWConv, a batch normalization layer BN, and four residual blocks connected in sequence, and a SiLU activation function is set after the batch normalization layer; The feature fusion network includes three layers of feature pyramids, with the output of the fourth residual block as the top layer of the feature pyramid; the middle layer of the feature pyramid is obtained by adding the output of the third residual block to the top layer after 2 times upsampling, and the bottom layer of the feature pyramid is obtained by adding the output of the second residual block to the middle layer after 2 times upsampling; The global attention network includes a global attention block. Each layer of the feature pyramid output enters a global attention block. The global attention block contains three branches, namely the shortcut mapping branch, the compression normalization branch, and the activation explicitation branch. The output of the global attention network enters the detection head, which outputs the target detection result.
2. The method for detecting ship targets in radar images with trunk lightweight feature enhancement according to claim 1 is characterized in that: In the feature extraction backbone network, the input SAR image is resized and the Focus function is implemented using the convolution layer Conv. Then, the initial feature extraction is achieved through the depthwise separable convolution layer DWConv and the batch normalization layer BN to reduce the calculation parameters, and then it is activated through the SiLU activation function.
3. The method for detecting ship targets in radar images with trunk lightweight feature enhancement according to claim 1 is characterized in that: In the residual block structure, two variable convolution layers with convolution kernels of different sizes are used. The number of input and output channels of the variable convolution layer with a convolution kernel size of 1x1 is the same, and the number of output channels of the variable convolution layer with a convolution kernel size of 3x3 is half of the original input channels.
4. The method for detecting ship targets in radar images with trunk lightweight feature enhancement according to claim 1 is characterized in that: The residual block structure has two branches: In the first branch, the input feature map X entering the residual block is first processed by the first variable convolution layer DConv, and the number of channels remains unchanged. After passing through the second variable convolution layer, the number of channels is reduced to half, recorded as X1; X1 enters the depthwise separable convolution layer DWConv to obtain X2, and X1 and X2 are then spliced in the channel dimension, and then pass through the SE attention mechanism and another variable convolution layer DConv to obtain X output ; The second branch is a shortcut mapping branch, which directly outputs the input feature map X; the output feature map of the final residual block is X output The result after splicing with X 5. The method for detecting ship targets in radar images with trunk lightweight feature enhancement according to claim 1 is characterized in that: Among the four residual blocks, the output of the previous residual block is used as the input of the next residual block; at the same time, the outputs of the second, third and fourth residual blocks are used as the input of the feature pyramid in the feature fusion network for feature fusion.
6. The method for detecting ship targets in radar images with trunk lightweight feature enhancement according to claim 1, characterized in that: The processing process of the variable convolution layer DConv is expressed as: Among them, R represents the convolution kernel, p n Represents the offset of each point in the convolution kernel relative to the center point, w(p n ) represents the weight of the corresponding position of the convolution kernel, x(p0+p n ) represents p0+p on the feature map n The element value at position y(p0) represents the element value at position p0 on the output feature map, which is obtained by convolving the convolution kernel with the input feature map; the offset Δp n are learnable parameters during the object detection model training process.
7. The method for detecting ship targets in radar images with trunk lightweight feature enhancement according to claim 1, characterized in that: In the global attention network: The shortcut mapping branch is used to transform the input feature map X N Direct mapping as output; The compression normalization branch is used to convert the input feature map X N After the depth separable convolution layer DWConv reduces the calculation parameters, the output feature map X is obtained after the batch normalization layer BN and the convolution layer Conv processing. N1 ; The activation explicit branch is used to transform the input feature map X N After adjusting the number of channels, we get X N2 , then with X N1 Add element by element to get the transition feature X add ; Transition feature X add After the convolution layer Conv processing and the nonlinear function Sigmoid activation, we get after With X N1 Multiplying element by element, we get The output of the final global attention block is X Noutput for With X N The result of element-wise addition.
8. The method for detecting ship targets in radar images with trunk lightweight feature enhancement according to claim 1 is characterized in that: The detection head adopts the detection head of the YOLOv8 network.
9. A terminal device comprising a processor, a memory and a computer program stored in the memory; characterized in that: When the processor executes the computer program, the radar image ship target detection method with trunk lightweight feature enhancement according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, wherein a computer program is stored in the medium; characterized in that: When the computer program is executed by a processor, the radar image ship target detection method with trunk lightweight feature enhancement according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Attention pyramid network-based SAR image multi-scale ship detection method
CN110084210A
Lightweight SAR ship detection method and system
CN116844055A
SAR image ship target identification method based on attention mechanism
CN117218612A
Sparse SAR ship target detection method and device based on attention feature fusion
CN117372676A
Multi-scale feature enhanced deep learning SAR ship detection method
CN118628905A
Cited By
Early warning method and system for ship spacing in navigable tunnel and medium
CN120472716A
Lightweight SAR (Synthetic Aperture Radar) image target detection system and method fused with multi-scale attention
CN121353648A
Method and system for converting SAR (Synthetic Aperture Radar) to optical image based on space-frequency guidance
CN121810508A