A radar image ship target detection method with trunk lightweight feature enhancement
The radar image ship target detection method with lightweight backbone feature enhancement solves the problems of easy loss of small target information and high computational complexity in SAR image ship target detection by utilizing a feature extraction backbone network, a feature fusion network and a global attention network, thus achieving efficient and accurate target detection.
Patent Information
- Application Number
- CN202411851810.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Existing SAR image ship target detection methods suffer from problems such as multi-scale targets, complex networks, and the easy disappearance of small target information. Furthermore, traditional methods have low detection accuracy and high computational complexity in complex environments, making it difficult to meet real-time requirements.
A radar image ship target detection method with lightweight backbone and enhanced features is proposed, which includes a feature extraction backbone network, a feature fusion network, and a global attention network. The computational load is reduced by using a residual block structure, and variable convolution and global attention mechanisms are introduced to improve the ability to extract information about small targets. The method is combined with a YOLOv8 detection head for target detection.
It effectively preserves small target information, reduces computational complexity, improves detection accuracy, is suitable for mobile deployment, and meets real-time requirements.
Smart Images

Figure CN119810644B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer vision, and is applied to the detection task of SAR image ship targets, and in particular to a radar image ship target detection method with lightweight backbone feature enhancement. BACKGROUND
[0002] Synthetic Aperture Radar (SAR) has become an important part of radar research with its all-weather, all-day, high-resolution and other characteristics. Target detection is an important basis for interpreting and processing radar images. At the present stage, SAR image target detection is mainly divided into traditional methods and deep learning-based target detection methods. In the detection of SAR ship targets, the biggest feature of traditional algorithms is to manually design and extract the features of the target, such as gray level, contrast, shape, texture, etc. Traditional SAR ship target detection algorithms generally use the differences in manually designed features between targets to detect targets. This algorithm can often achieve satisfactory results in the case of simple background clutter and small scene interference, but in some complex environments, there will be more false alarms, thereby greatly reducing the accuracy of the algorithm. Deep learning-based target detection methods do not need to manually design target features. Neural networks use various feature extraction structures inside to learn and update themselves from a large amount of data, thereby achieving more accurate target detection results. With the development of deep learning technology and the update of computer device computing power, it has become possible to deploy neural networks in the field of SAR image target detection.
[0003] Among traditional SAR image target detection algorithms, the most representative is the Constant False Alarm (CFAR) detection algorithm. In the CFAR algorithm, the background statistical distribution in the SAR image is first fitted, and then the threshold is calculated and target detection is completed. However, in actual applications, the statistical distribution of the background is often affected by sea waves, sea clutter, etc., making it difficult to fit a suitable statistical distribution to describe the background. Traditional SAR image target detection algorithms represented by the CFAR algorithm are a pixel-level detection algorithm. When processing images, especially high-resolution images, traditional target detection algorithms will result in a large amount of calculation and greatly reduced detection speed, making it 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 network can be briefly summarized as follows: first, the input image is extracted by the convolution layer, the output of the convolution layer is activated by the activation function, the non-linear factor is increased to enable it to fit complex functions, and then the classification or regression results are output through the pooling, normalization and full connection layer structures, and the loss function generated during the calculation process is used to adaptively optimize the learnable parameters in the operation process, and finally the network converges to ensure high accuracy. It is thanks to its powerful fitting ability and the ability to extract abstract features from large-scale data that target detection algorithms based on deep learning have been successful. In addition, since there is no need to design feature differences in neural networks, the generalization ability of the network is also enhanced. The network with these advantages can achieve higher accuracy in SAR image ship target detection tasks.
[0005] Now the mainstream and high-accuracy neural networks are all for optical image detection tasks, and SAR images are very different from optical images, so directly applying the network will result in poor detection effect. The ordinary convolution (Convolution) used in the traditional convolution layer extracts features from the rectangular region on the input image, and the improved depthwise separable convolution (Depthwise Separable Convolution) only simplifies the operation parameters without changing the target shape during feature extraction; Unlike optical images, due to the imaging mechanism of SAR systems, SAR images often contain very complex background clutter and coherent noise, which makes the system prone to interference during target detection; In the detection task of optical images, deeper networks often contain more detailed feature information, thereby achieving higher detection accuracy, while SAR images have the characteristics of large scene and small target, although deep networks can better capture detailed information, but with the deepening of the network, the information of small targets will gradually fade out or even disappear, at this time it will cause the network to learn useless feature information, fitting difficulty and other problems. At the same time, the high accuracy of neural networks often accompanies greater computational complexity, which tests the real-time performance and computing power of the device when deployed on mobile terminals such as airborne and spaceborne, so balancing the computational complexity and prediction accuracy is also a key problem in SAR image target detection tasks. SUMMARY
[0006] The purpose of the present application is to provide a radar image ship target detection method with lightweight backbone feature enhancement, which solves the problems of target multi-scale, network complexity and easy disappearance of small target information in SAR image ship target detection.
[0007] In order to achieve the above-mentioned tasks, the present application adopts the following technical solutions:
[0008] A radar image ship target detection method with lightweight backbone feature enhancement, comprising:
[0009] SAR images to be detected are acquired, and the SAR images are input into a trained target detection model to output target detection results through the model; wherein the target detection model comprises a feature extraction backbone network, a feature fusion network, a global attention network and a detection head;
[0010] The feature extraction backbone network comprises, from front to back, a convolutional layer Conv, a depth separable convolutional layer DWConv, a batch normalization layer BN, and four residual blocks connected in turn, and a SiLU activation function is arranged after the batch normalization layer;
[0011] The feature fusion network comprises a three-layer feature pyramid, and the output of the fourth residual block is taken 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 and the top layer after 2 times up-sampling, and 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 up-sampling;
[0012] The global attention network comprises a global attention block, and the output of each layer of the feature pyramid enters a global attention block; the global attention block comprises three branches, which are a shortcut mapping branch, a compression normalization branch and an activation visualization branch;
[0013] The output of the global attention network enters the detection head, and the target detection results are output through the detection head.
[0014] Further, in the feature extraction backbone network, after the SAR images are input and the size is adjusted, the Focus function is realized by using the convolutional layer Conv, then the initial feature extraction is realized by using the depth separable convolutional layer DWConv and the batch normalization layer BN, the calculation parameters are reduced, and then the activation is performed through the SiLU activation function.
[0015] Further, in the residual block structure, two variable convolutional layers with different sizes of convolutional kernels are used, the input and output channel numbers of the variable convolutional layer with a convolutional kernel size of 1x1 are the same, and the output channel number of the variable convolutional layer with a convolutional kernel size of 3x3 is half of the original input channel number.
[0016] Further, 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 a first variable convolutional layer DConv without changing the channel number, and then is processed by a second variable convolutional layer to reduce the channel number by half, denoted as X1; X1 is processed by a deep separable convolutional layer DWConv to obtain X2, and X1 and X2 are spliced in the channel dimension, and then are processed by an SE attention mechanism and another variable convolutional layer DConv to obtain X output ; the second branch is a shortcut mapping branch that directly outputs the input feature map X; and the output feature map of the final residual block is the spliced result of X output and X
[0018] Further, in the four residual blocks, the output of a previous residual block is taken as the input of a subsequent residual block; and the outputs of the second, third and fourth residual blocks are taken as the inputs of a feature pyramid in a feature fusion network for feature fusion.
[0019] Further, the processing process of the variable convolutional layer DConv is represented as:
[0020]
[0021] wherein R represents a 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 the element value at the position p0+p n on the feature map, y(p0) represents the element value at the position p0 on the output feature map, which is obtained by convolution of the convolution kernel and the input feature map; and the offset Δp n is a learnable parameter in the training process of the target detection model.
[0022] Further, in the global attention network:
[0023] The shortcut mapping branch is used to directly map the input feature map X N as the output;
[0024] The compression normalization branch is used to process the input feature map X N by the deep separable convolutional layer DWConv to reduce the calculation parameters, and then by the batch normalization layer BN and the convolutional layer Conv to obtain the output feature map X N1 .
[0025] The activation visualization branch is used to process the input feature map X N to obtain X N2 after adjusting the channel number, and then to obtain the transition feature X N1 by element-wise addition of X addTransition feature X add After convolution layer Conv processing and nonlinear function Sigmoid activation After that And X N1 Element-wise multiplication, get
[0026] Finally, the output X of the global attention block Noutput For And X N Element-wise addition result.
[0027] Further, the detection head adopts the detection head of the YOLOv8 network.
[0028] 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 backbone lightweight feature enhanced radar image ship target detection method is implemented.
[0029] A computer readable storage medium, the medium stores a computer program; characterized in that when the computer program is executed by the processor, the backbone lightweight feature enhanced radar image ship target detection method is implemented.
[0030] Compared with the prior art, the present application has the following technical features:
[0031] The network model proposed in the present application uses an anchor-free network architecture, avoiding the complex calculation amount that occurs in traditional anchor-based networks. A residual block structure is designed for mobile deployment requirements, effectively reducing the calculation parameters in each iteration in actual measurement, better preserving small target information, and reducing the actual deployment device power requirement; for the multi-scale and irregular characteristics of ship targets, variable convolution is introduced to more accurately extract ship target contour information and improve the detection effect of network ship targets; the feature network fusion part, to make up for the problem that traditional attention only focuses on local information and wastes global information, considers global information on the basis of the traditional FPN structure, uses an activation function more suitable for binary classification targets, and effectively improves the system detection accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 It is an application flowchart in an embodiment of the present application;
[0033] Figure 2 It is a target detection model structure diagram proposed by the present application;
[0034] Figure 3 It is a structure diagram of the residual block proposed by the present application;
[0035] Figure 4 Structure diagram of the global attention block proposed in the application;
[0036] Figure 5 The detection effect performance of the embodiment of the application is compared with that of the existing network. DETAILED DESCRIPTION
[0037] Referring to the accompanying drawings Figure 1 The application provides a radar image ship target detection method with backbone lightweight feature enhancement. The method constructs a lightweight target detection model and introduces a global attention mechanism in a feature pyramid network (FPN) structure to improve the feature fusion process, realize feature enhancement, and better preserve small target feature information. The method specifically includes the following steps:
[0038] SAR images to be detected are acquired, and the SAR images are input into a trained target detection model to output target detection results through the model. 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] Referring to the accompanying drawings Figure 2 The feature extraction backbone network proposed in the application 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. A SiLU activation function is arranged after the batch normalization layer.
[0041] In one embodiment of the application, the input SAR image is resized to 640*640*3, and then a convolution layer Conv with a convolution kernel size of 6x6 and an output channel number of 12 is used to realize the Focus function. At this time, the output feature map size is 320*320*12. Then, a depth separable convolution layer DWConv and a batch normalization layer BN are used to realize preliminary feature extraction and reduce the calculation parameters. After that, a SiLU activation function is used for activation. At this time, the output feature map size is 320*320*64.
[0042] Referring to the accompanying drawings Figure 3 The application provides a residual block structure. In the residual block structure, two variable convolution layers with different convolution kernel sizes are used. The input and output channel numbers of the variable convolution layer with a convolution kernel size of 1x1 are the same. The output channel number of the variable convolution layer with a convolution kernel size of 3x3 is half of the original input channel number.
[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 without changing the channel number, and then processed by the second variable convolution layer to reduce the channel number by half, denoted as X1; X1 is processed by the deep separable convolution layer DWConv to obtain X2, and then X1 and X2 are spliced in the channel dimension, and then processed by 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; and the output feature map of the final residual block is X output , which is the spliced result of X and X
[0045] The four residual blocks are arranged from front to back, and the output of the previous residual block is taken as the input of the next residual block; meanwhile, the outputs of the second, third and fourth residual blocks are taken as the inputs of the feature pyramid in the feature fusion network for feature fusion.
[0046] In an embodiment of the application, 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] where 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 the element value at the position p0+p n on the feature map, and y(p0) represents the element value at the position p0 on the output feature map, which is obtained by convolution of the convolution kernel and the input feature map; after introducing the offset Δp n , the variable convolution layer DConv is obtained, which is expressed as:
[0050]
[0051] where the offset Δp n is a learnable parameter in the training process of the target detection model.
[0052] 2. Feature fusion network
[0053] The feature fusion network consists of three layers of feature pyramid. The feature map at the top of the feature pyramid has the smallest size 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 2x 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 2x 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. 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 transform the input feature map X N After the depth separable convolution layer DWConv reduces the calculation parameters, and after the batch normalization layer BN and convolution layer Conv processing, the output feature map X is obtained. 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 nonlinear function Sigmoid activation, we can get after With X N1 Multiply element by element, and we get
[0059] The output of the final global attention block X Noutput for With X N The result of element-wise addition.
[0060] In the global attention block of the scheme, the ordinary convolution layer Conv structure realizes the function of full connection, all uses 1x1 convolution kernel, adjusts each branch to keep the output channel number consistent, and finally the output channel number is unified to 256; in the compression and normalization branch, the DWConv convolution kernel size is 1x1, the output channel number is 256, and the result is normalized by using BN to reduce the calculation parameters and speed up the network convergence; in the activation visualization branch, the result is activated by using the sigmoid(·) function, each value on the feature map is compressed to the range of (0, 1), and the representation ability of the feature map is enhanced.
[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 input channel number of the detection head part is 256, and in order to reduce the calculation parameters of the network as much as possible while ensuring the detection effect of small targets, the outputs of the three global attention blocks are connected to the detection head.
[0064] 5. Training of target detection model
[0065] First, collect the SAR image ship target data set for target detection, and directly use the public SSDD data set for convenience; the environment used in this embodiment is NVIDIA GeForce RTX 4060 8GB.
[0066] The training of the target detection model is carried out by using the data set, and the network effect is evaluated, and the evaluation indexes mainly include: accuracy (Precision), recall (Recall), F1 score and average precision mean mAP 50 ; if the training result meets the requirements, stop training, save the trained target detection model for target recognition of SAR images; if it does not meet the requirements, adjust the hyperparameters and repeat the training process. In the experimental results of this embodiment, the batch size is 58, the training times is 50, and the initial learning rate is 0.002.
[0067] The experimental results of the present application on the SSDD data set are recorded as follows, and the performance comparison is shown as Figure 5 .
[0068]
[0069] The above examples are only used to illustrate the technical solutions of the present application, but not limit the same; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalent ones; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should 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 by: include: Obtain 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 convolutional layer Conv, a depthwise separable convolutional layer DWConv, a batch normalization layer BN, and four residual blocks connected in sequence. A SiLU activation function is provided after the batch normalization layer. The residual block 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, 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 ; 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 The result after splicing with X ; The processing process of the variable convolution layer DConv is expressed as: in, R represents the convolution kernel, Represents the offset of each point in the convolution kernel relative to the center point, Represents the weight of the convolution kernel corresponding position, Represents the feature map The value of the element at position, Represents the output feature map The element value of the position is obtained by convolving the convolution kernel with the input feature map; offset are learnable parameters during the object detection model training process; The feature fusion network consists of 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 2x 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 2x 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: a shortcut mapping branch, a compression normalization branch, and an activation explicitation branch: 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 transform the input feature map X N After the depth separable convolution layer DWConv reduces the calculation parameters, and after the batch normalization layer BN and convolution layer Conv processing, the output feature map X is obtained. 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 transition characteristics ; Transition characteristics After the convolution layer Conv processing and nonlinear function Sigmoid activation, we can get ,after With X N1 Multiply element by element, and we get ; The output of the final global attention block for With X N The result of element-by-element addition; The output of the global attention network enters the detection head, which outputs the target detection results.
2. The radar image ship target detection method with backbone 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 convolutional layer Conv. Then, preliminary feature extraction is achieved through the depthwise separable convolutional layer DWConv and the batch normalization layer BN to reduce the calculation parameters, and then activation is performed through the SiLU activation function.
3. The radar image ship target detection method with backbone lightweight feature enhancement according to claim 1 is characterized in that: Two variable convolution layers with different convolution kernel sizes are used in the residual block. 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 radar image ship target detection method with backbone 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.
5. The radar image ship target detection method with backbone lightweight feature enhancement according to claim 1 is characterized in that: The detection head adopts the detection head of the YOLOv8 network.
6. 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, it implements the radar image ship target detection method with backbone lightweight feature enhancement according to any one of claims 1 to 5.
7. A computer-readable storage medium storing a computer program; wherein: When the computer program is executed by a processor, the radar image ship target detection method with backbone lightweight feature enhancement according to any one of claims 1 to 5 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