Ship small target detection method, device, equipment and medium

By introducing the GCCR-GhostNet module and LSD-Head detection head into the YOLOv5 lightweight detection model, and combining it with the P-MIoU loss function, the problems of low recognition accuracy and difficult deployment in small target detection of ships are solved, achieving efficient and accurate small target detection and lightweight deployment.

CN120932124APending Publication Date: 2025-11-11NORTHEAST FORESTRY UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511103730.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing technologies for small target detection on ships suffer from problems such as low detection and recognition accuracy, sparse small target features, high-frequency noise interference in complex environments, and difficulty in model deployment. In particular, small ships are difficult to distinguish in remote sensing images against low-contrast backgrounds, and general neural network models are difficult to deploy in real time on edge computing platforms.

Method used

We adopt the lightweight detection model YOLOv5 architecture, replace the C3 module of the backbone network with the GCCR-GhostNet module, and cascade an upsampling module in the neck network. Combined with the global context channel calibration module GCCR and the LSD-Head detection head, we enhance feature extraction and location constraints through multi-scale feature fusion and attention mechanism and training with the P-MIoU loss function.

Benefits of technology

It improves the recognition accuracy of small target detection and the real-time deployment capability of the model on the edge computing platform, enhances the feature recognition accuracy of small target shape and location, and reduces computing costs and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120932124A_ABST
    Figure CN120932124A_ABST
Patent Text Reader

Abstract

The invention discloses a ship small target detection method and device, equipment and a medium, and relates to the technical field of remote sensing target recognizing.A channel attention mechanism is embedded into a feature transformation process to capture a nonlinear dependency relationship among channels and generate attention weights of the channels, features are extracted based on the attention weights of the channels, and the target recognition accuracy is improved. According to the mechanism, the nonlinear expression capability is weakened through linear features, so that the extraction capability of morphological features of small targets is improved; the method comprises the following steps of: firstly, performing linear change on features of each channel in a feature map to generate a channel weight of each channel, extracting spatial features channel by channel and fusing the spatial features, and realizing direct weighted modulation of the feature channels through linear operation by the mechanism, thereby avoiding complex nonlinear transformation and improving the recognition precision of the position of a small target; therefore, accurate feature recognition is carried out on the form and the position of the small target, and finally, the detection and recognition precision of the small target can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote sensing target recognition technology, and in particular to a method, apparatus, equipment and medium for detecting small targets on ships. Background Technology

[0002] With the rapid development of remote sensing technology, Synthetic Aperture Radar (SAR) technology has achieved high resolution and robust performance in complex environments due to its all-weather, real-time imaging capabilities and strong penetration. Especially in maritime surveillance, SAR has unique advantages—it can overcome multiple limitations imposed by weather conditions such as clouds, rain, and snow, enabling continuous target monitoring in complex sea conditions. Traditional ship target detection algorithms are mostly designed for specific scenarios, achieving target identification by modeling and simulating sea clutter and combining it with constant false alarm rate (CFAR) detection. These methods heavily rely on features and rules designed based on empirical knowledge, resulting in limited generalization ability.

[0003] In contrast, neural network SAR image ship detection methods that do not require manually designed features have achieved good results. However, general neural network target detection methods still have the following problems: ① Difficulty in detecting small targets. In the vast ocean background environment, ships in SAR images usually occupy only a small number of pixels, have weak scattering characteristics, sparse texture and shape features, and are easily submerged by the background; for example... Figure 1 As shown in (a) and (b), small ships are difficult to distinguish against a low-contrast background; ② High-frequency noise interference in complex environments; SAR images not only include the ocean surface, but also various terrain features such as land and islands, such as... Figure 1 As shown in (c) and (d), this complex background information often causes confusion with the target ship, leading to an increase in false detection and false negative rates; ③ It is difficult to deploy models on edge computing platforms. Most general detection models pursue accuracy, resulting in a large number of model parameters, making it difficult to achieve real-time deployment on edge computing platforms such as spaceborne and airborne platforms; In summary, achieving the optimization of positioning accuracy for small targets based on lightweight and real-time deployment capability models has become a key breakthrough direction in the current field.

[0004] Currently, common detection methods typically employ attention mechanisms and multi-scale feature fusion in the detection model. The extensive computation involved in multi-scale feature extraction and attention mechanisms consumes a significant amount of memory and computing power, leading to complex model training and inefficient inference. To address this issue, lightweight object detection methods are often used at present. However, due to the sparse features of small objects, there are significant biases in recognizing the shape and position features of small objects, and fine-grained spatial information is easily lost in the deeper layers of the network, resulting in low accuracy in detecting and recognizing small objects. Summary of the Invention

[0005] This invention provides a method, apparatus, equipment, and medium for detecting small targets on ships, which can solve the problem of low detection and identification accuracy of small targets in the prior art.

[0006] This invention provides a method for detecting small targets on ships, comprising the following steps: Acquire SAR images of small targets such as ships on the sea surface; Global channel features of SAR images after passing through multiple channels of different dimensions are extracted, as well as global channel information of multiple channels of different dimensions are extracted. Based on the global channel information, channel descriptors representing the relationship between the corresponding channel and other channels are obtained. Based on the channel descriptors, the nonlinear dependencies between channels of different dimensions are captured, and attention weights of each channel are generated based on the dependencies. The global channel features are multiplied by the attention weights of each channel to obtain a preliminary feature map. The initial feature map is transformed into multiple real feature maps with different dimensional channels. For each real feature map, a linear transformation of the real feature map with different dimensional channels is performed to obtain multiple associated feature maps of channel features. Channel weights of each associated feature map under different dimensional channels are generated, and spatial features of each associated feature map are extracted channel by channel. Based on the channel weights, the spatial features are weighted and fused channel by channel to generate a spatial feature map and obtain multiple spatial feature maps. Multiple spatial feature maps are fused to obtain a target feature map; targets in the target feature map are identified to achieve the detection of small targets on ships.

[0007] Preferably, the target feature map is obtained through a lightweight detection model, which is based on the YOLOv5 architecture. The C3 module between the convolutional layers in the YOLOv5 backbone network is replaced with the GCCR-GhostNet module, an upsampling module is cascaded between the convolutional layers in the YOLOv5 neck network, and an LSD-Head detection head is used in the YOLOv5 head. The GCCR-GhostNet module includes a GhostNetv2 network and a Global Context Channel Calibration (GCCR) module, which is cascaded in each transformation stage of the GhostNetv2 network. The GCCR module includes Global Average Pooling (GAP), 1×1 convolution, ReLU activation function, and Sigmoid function. The Global Average Pooling (GAP) is used to extract global channel information and generate channel descriptors; the non-linear dependencies between channels of different dimensions are captured by two consecutive 1×1 convolutions and the ReLU activation function; the Sigmoid function is used to generate attention weights for each channel based on the dependencies. The LSD-Head detection head includes a linear transformation module, an SE channel attention mechanism, and a depthwise separable convolution, which are cascaded in sequence. The linear transformation module is used to perform linear transformations on the real feature map in different dimensions and channels to generate multiple associated feature maps with channel features; the SE channel attention mechanism is used to generate channel weights for each associated feature map in different dimensions and channels; the depthwise separable convolution is used to weight and fuse spatial features channel by channel. The lightweight detection model is trained using the P-MIoU loss function, which is constructed by introducing geometric constraints in IoU, including center point offset, aspect ratio difference, and angle limitation.

[0008] Preferably, the acquisition of the preliminary feature map includes: Global channel features of SAR images are extracted using the GhostNetv2 network to obtain feature maps. ; For the input feature map The channel descriptor vector Z∈ℝ^(C×1×1) generated using global average pooling (GAP) is: ; descriptor Z c Subsequently, two consecutive 1×1 convolutional layers are passed, and the ReLU activation function is used to generate channel attention weights W∈ℝ^(C×1×1), which are expressed as: ; The output feature map is obtained by multiplying the input feature map by the attention weights channel by channel. Y c , represented as: ; The feature map Y c This is a preliminary feature map.

[0009] Preferably, the acquisition of the spatial feature map includes: Input feature map After pointwise convolution of size 1×1 with n channels, m true feature maps are generated. , represented as: ; Feature map of each channel in the feature map Y generated by its convolution kernel Through linear transformation feature maps generated by s linear transformations for: ; in: It is the i-th original feature map; This is the j-th linear transformation; the final φ_{i,s} is the identity mapping used to preserve the intrinsic feature map; concatenating the feature maps generated by the m convolutional kernels and the feature maps generated by the linear transformation yields the output feature map: ; The information of each channel of the feature map Y is compressed using global average pooling (GAP) and represented as follows: ; in: The feature map space size; The compressed feature map is input into two fully connected layers for dimensionality reduction, dimensionality increase, and nonlinear mapping to generate attention weight vectors. , represented as: ; in: and These are the weight matrices for dimensionality reduction and dimensionality increase, respectively. It is the ReLU activation function. For the Sigmoid function, To achieve compression ratio; the feature map of each channel is divided according to its corresponding attention weight. Scaling is performed to achieve weighted adjustment of feature channels, specifically expressed as follows: ; Channel-wise convolution for each input channel Using independent convolution kernels Local feature extraction is performed, represented as: ; Pointwise convolution The convolutional kernel performs channel fusion on the output of the depthwise convolution to form the final output feature map. , represented as: ; in: Indicates the first Passage to the Channel fusion weights; the feature map This is a spatial feature map.

[0010] Preferably, the geometric constraints of the P-MIoU loss function include: The center offset is quantized using the normalized Euclidean distance and expressed as: ; Normalization was performed using the diagonal length of the minimum bounding rectangle, and it is represented as: ; in: w c and h c These represent the average width and height of the predicted bounding box and the ground truth bounding box, respectively; The center point position penalty is represented as: ; Where: b represents the prediction box B; b gt Represents a real box B gt The center point; By comparing the w / h of the predicted bounding box and the ground truth bounding box... w gt / h gt The difference is penalized by squaring, thereby compressing the scale difference between the boxes, as shown in: ; in: is the weight hyperparameter for the loss term; w and h are the width and height of the prediction box, respectively; w gt , h gt These are the width and height of the actual bounding box, respectively; ε To avoid the error term from division by zero; Difference penalty is applied using the arctangent of the aspect ratio, expressed as: ; in: This represents the structural representation of the prediction box in angle space. Represents the angular structure of the actual bounding box.

[0011] This invention also provides a small target detection device for ships, comprising: The image module is used to acquire SAR images of small targets such as ships on the sea surface; The channel calibration module is used to extract global channel features of SAR images after passing through multiple channels of different dimensions, as well as extract global channel information of multiple channels of different dimensions. Based on the global channel information, channel descriptors representing the relationship between the corresponding channel and other channels are obtained. Based on the channel descriptors, the nonlinear dependencies between channels of different dimensions are captured, and attention weights for each channel are generated based on the dependencies. The global channel features are multiplied by the attention weights of each channel to obtain a preliminary feature map. The transformation module is used to transform the initial feature map into different dimensional channels to generate multiple real feature maps with different dimensional channels. For each real feature map, the real feature map is linearly transformed into different dimensional channels to obtain multiple associated feature maps of channel features. The channel weights of each associated feature map under different dimensional channels are generated, and the spatial features of each associated feature map are extracted channel by channel. Based on the channel weights, the spatial features are weighted and fused channel by channel to generate a spatial feature map and obtain multiple spatial feature maps. The detection module is used to fuse multiple spatial feature maps to obtain a target feature map; identify targets in the target feature map to achieve the detection of small targets on ships.

[0012] This invention also provides an electronic device, including a memory and a processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the ship small target detection method described above.

[0013] This invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of a small target detection method for ships as described above.

[0014] This invention provides a method, apparatus, equipment, and medium for detecting small targets on ships. Compared with the prior art, its advantages are as follows: This invention replaces the C3 module between the convolutional layers of the backbone network in a lightweight detection model with a GCCR-GhostNet module. The GCCR-GhostNet module embeds a channel attention mechanism into the feature transformation process to capture the nonlinear dependencies between channels and generate attention weights for each channel. Features are extracted based on these attention weights. This mechanism weakens the nonlinear expressive power through linear features, thereby improving the multi-scale correlation and spatial semantic relationship modeling ability of the feature space, thus enhancing the extraction capability of small target morphological features. Then, the improved LSD-Head detection head is directly used to generate the final feature map. The LSD-Head detection head performs linear transformations on the features of each channel in the feature map to generate channel weights for each channel. Spatial features are then extracted and fused channel by channel. This mechanism achieves direct weighted modulation of feature channels through linear operations, avoiding complex nonlinear transformations. This improves network efficiency while enhancing the recognition accuracy of small target locations. As a result, accurate feature recognition is achieved in both the morphology and location of small targets, ultimately improving the detection and recognition accuracy of small targets.

[0015] Furthermore, based on the center distance constraint, aspect ratio penalty and angle restriction mechanism, the present invention corrects the shape, scale and angle deviation of spatial features during the training process of the lightweight detection model, so as to restrict the geometric structure constraints in three dimensions, thereby further improving the recognition accuracy of the lightweight detection model for small target shapes. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of a SAR image scene for a small target detection method for ships provided in an embodiment of the present invention; where (a) and (b) are open water and port operation scenes in the HRSID dataset, respectively, and the green arrows mark small target ships; (c) and (d) are coastal zone and bay composite scenes in the SSDD dataset, respectively. Figure 2 This is a schematic diagram of the overall data flow of a small target detection method for ships provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the network architecture of a small target detection method for ships provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the GCCR-GhostNet module architecture for a small target detection method for ships provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the working architecture of the LSD-Head module of a small target detection method for ships provided in an embodiment of the present invention; Figure 6 This is a schematic diagram comparing CIoU and P-MIoU in target localization for a small target detection method for ships provided in an embodiment of the present invention; Figure 7 The test performance of a small target detection method for ships provided in this embodiment of the invention on the HRSID dataset; wherein (a) and (b) contain multiple ships with different target shapes, some of which are close to the shoreline and have complex background textures, and (c) is a typical complex background scene at the land-sea junction; Figure 8 The test performance of a small ship target detection method provided in this embodiment of the invention on the SSDD dataset is shown; (a) shows a multi-target dispersion scene, including multiple scattered small ship targets, (b) shows a near-shore single target scene, and (c) shows a complex port scene, including densely moored ship targets. Detailed Implementation

[0017] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0018] See Figure 1 This invention provides a method for detecting small targets on ships. Currently, to comprehensively address the challenges of sparse features of small targets, high-frequency noise interference, and limited edge computing resources, the key to solving these problems lies in enhancing traction capability and achieving model lightweighting. Regarding enhancing traction capability, methods mainly include multi-scale feature fusion, attention mechanisms, and their mutual fusion. Wang et al. achieved accurate recognition of objects of different sizes and distances by extracting features from different network layers and fusing receptive fields of different sizes. Similarly, Liu et al. proposed the Feature Pyramid Network (FPN), which ensures effective representation of multi-scale objects by generating multi-level feature maps at different layers and fusing them. Integrating the attention mechanism into the multi-scale feature fusion module can further improve the focusing ability on small target features and enhance the distinction between targets and backgrounds. Therefore, Yang et al. and Yang et al. both improved the accuracy of small target detection by integrating region focusing and attention mechanisms. Li introduced the CBAM fusion attention mechanism into the shallow layers of the YOLOv7 backbone network, enabling the model to better focus on the target region and improving the accuracy of small target localization. He et al. al. proposed a target detector that incorporates multi-head self-attention and multi-scale fusion, which can effectively extract internal features of targets. Although attention mechanisms and multi-scale feature fusion have achieved significant results in small target detection, they also face some challenges. In particular, when processing high-resolution data (such as remote sensing images), multi-scale feature extraction and QKV calculation in the attention mechanism not only consume a lot of GPU memory but also require a large amount of computational resources, resulting in a complex model training process and low inference efficiency, which limits the feasibility of real-time detection applications.

[0019] Target detection in resource-constrained environments requires a careful trade-off between accuracy and computational efficiency. Existing lightweight object detection methods generally predict target location and category directly through regression, eliminating the step of generating target pre-selection boxes. This significantly improves detection efficiency while maintaining high detection accuracy. Therefore, one-stage lightweight object detection methods have become a promising solution, reducing model complexity through architectural optimization without significantly impacting performance. For example, Li et al. effectively achieved structural lightweighting and computational resource optimization by adopting a lightweight MobileNet-V2 backbone network and introducing dynamic semantic matching and edge self-alignment modules. Peng et al. achieved excellent detection accuracy and running speed while significantly reducing the number of parameters and computational complexity by introducing an enhanced ShuffleNetV2 backbone, a structurally reparameterized feature pyramid, and a simplified detection head. Although lightweight object detection methods have significant advantages in reducing computational overhead, they often sacrifice accuracy and robustness. This is particularly evident in small target detection on ships, where feature representations may lose semantic meaning. Therefore, such lightweight models usually perform poorly under complex conditions, making it difficult to achieve the best balance between efficiency and performance in practical applications.

[0020] To better address the issues of feature redundancy and computational inefficiency in SAR small target ship detection models, this invention proposes a lightweight network structure, LWSARDet. Regarding the structure of this lightweight detection network: firstly, to address the shortcomings of the original Ghostnet feature extraction module in terms of nonlinear expression capabilities, a feature extraction module, GCCR-GhostNet, is constructed using a channel attention mechanism. This effectively improves the network's feature extraction capability and its ability to suppress high-frequency information while reducing model computational costs. Secondly, to address the issues of feature dilution and computational redundancy in traditional detection heads when processing small targets, a lightweight LSD-Head detection head is designed by replacing traditional convolution with a simple linear transformation, further improving network efficiency. Furthermore, a novel position and shape matching loss function, P-MIoU, is designed to constrain ship shape features through center distance constraints, aspect ratio penalties, and angle limitations, thereby improving the positioning accuracy of SAR small target ships under complex conditions.

[0021] like Figure 2 As shown, the method of this patent flows along a seven-level chain: "remote sensing data acquisition → preprocessing → feature extraction → feature fusion → detection output → postprocessing → result output". The remote sensing data acquisition module receives spaceborne / airborne SAR images in real time; Preprocessing completes normalization and lightweight enhancement; The feature extraction module (GCCR-GhostNet) embeds global channel attention in each stage of GhostNetv2 to output high-discriminative features in a way that combines weak feature enhancement with noise suppression. Feature fusion aggregates features across multiple scales; The detection output module (LSD-Head) adopts a three-layer structure of "linear transformation + SE attention + depthwise separable convolution" to directly generate SAR small boat target boxes; Post-processing involves removing redundancy through NMS and confidence filtering; The final detection information is then transmitted back as the output. The entire process achieves low-latency, high-precision small target recognition at the edge.

[0022] Specifically: like Figure 3 As shown, this invention is based on the YOLOv5 architecture. The GCCR-GhostNet module enhances the ability to capture weak features by embedding a channel attention mechanism, while reducing the number of parameters. The LSD-Head detection head replaces traditional convolution with a simple linear transformation, further improving network efficiency. P-MIoU optimizes shape matching accuracy. In the LWSARDet backbone, this invention develops a feature extraction module, GCCR-GhostNet, specifically designed to reduce model computational cost while enhancing high-frequency noise suppression and improving feature representation efficiency. By integrating the channel attention mechanism, GCCR-GhostNet significantly reduces... The original network's shortcomings in nonlinear expression capabilities are effectively addressed by this invention, which improves the network's feature extraction capabilities and its ability to suppress high-frequency information. Simultaneously, this invention replaces traditional convolution with a simple linear transformation, designing a lightweight LSD-Head detection head, further enhancing the efficiency of feature and model computation costs when processing small targets. Furthermore, to further improve the localization accuracy of small targets, a morphological matching loss function, P-MIoU, is introduced, which combines center distance constraints, aspect ratio penalties, and angle limiting mechanisms. These components enable LWSARDet to effectively balance detection accuracy and computational efficiency in complex SAR imaging environments.

[0023] 1. GCCR-GhostNet module.

[0024] like Figure 4The diagram illustrates the overall workflow of the GCCR-GhostNet module, which embeds a global channel attention mechanism to address the limited nonlinear representation capabilities of the original network. By simplifying channel information extraction through global average pooling layers and combining it with 1×1 convolutions (with two ReLU activation functions), it can simultaneously capture nonlinear dependencies between channels and generate attention weights using the Sigmoid function. This enhances feature extraction capabilities and improves high-frequency noise suppression while also reducing computational costs.

[0025] In SAR small target detection, traditional lightweight networks struggle to handle weak features and background clutter. YOLOv5's C3 module enhances multi-scale perception, but it has limitations: deep stacking weakens small target features, residual connections may amplify noise, and its high parameter count restricts its applicability for edge deployment. While GhostNetv2 effectively reduces computational complexity through linear feature mapping, its ghost feature generation mechanism has a key limitation: the linear operations it employs cannot capture nonlinear inter-channel dependencies, thus limiting the network's ability to adaptively emphasize weak target features amidst background clutter. To overcome this drawback, this invention proposes a novel feature extraction module, GCCR-GhostNet. By incorporating a channel attention mechanism, GCCR-GhostNet maintains a low parameter count while significantly enhancing high-frequency noise suppression and improving feature representation efficiency, making it suitable for deployment on resource-constrained platforms.

[0026] In GCCR-GhostNet, the Global Context Channel Calibration (GCCR) module is integrated into each transformation stage of GhostNetv2, enhancing the attention to weak objects through channel attention. The GCCR module works as follows: First, global channel information is extracted through global average pooling (GAP) to generate channel descriptors; then, two consecutive 1×1 convolutions are performed with a ReLU activation function inserted in between to capture the non-linear dependencies between channels; finally, the sigmoid function generates attention weights to calibrate channel features. like Figure 4 As shown, the GCCR module first uses global average pooling (GAP) to extract global channel information and generate channel descriptors; then, two consecutive 1×1 convolutions with intermediate ReLU nonlinear activation explicitly capture the nonlinear correlation between channels; finally, the sigmoid function generates channel attention weights to recalibrate the channel information.

[0027] Given input feature map Applying Global Average Pooling (GAP) to generate the channel descriptor vector Z∈ℝ^(C×1×1) is: .

[0028] descriptor Z c Subsequently, two consecutive 1×1 convolutional layers are applied, with the ReLU activation function used in between, to generate channel attention weights W∈ℝ^(C×1×1), which can be expressed as: .

[0029] Finally, the output feature map is obtained by multiplying the input feature map by the attention weights channel by channel. Y c : .

[0030] The integration of the GCCR module significantly enhances GhostNetv2's feature extraction capabilities, improving the sensitivity and accuracy of detecting weak targets in SAR images.

[0031] 2. LSD-Head, a detection head structure that combines attention and lightweight convolution.

[0032] In SAR small target detection tasks, the structure of the detection head plays a crucial role in preserving and enhancing weak features. Traditional detection algorithms typically use a fully convolutional stacking approach for feature processing. While this approach offers multi-scale prediction capabilities, it suffers from the following problems when dealing with small targets: First, continuous convolutional operations can easily lead to the dilution and loss of small target feature information, especially in deep networks, where semantic information gradually becomes abstract while fine-grained spatial details are lost. Second, traditional detection heads lack modeling of the differences in importance between feature channels, failing to effectively highlight key feature channels and resulting in insensitivity to weak targets in complex SAR scenarios. Furthermore, fully convolutional structures often involve high computational overhead and parameter redundancy, which is detrimental to the practical deployment and application of models in resource-constrained environments.

[0033] To further enhance the expressive power and computational efficiency of the detection head, this invention proposes a lightweight detection head module, LSD-Head, with a simple structure and enhanced perception. Its overall architecture is as follows: Figure 5 As shown, to address the feature dilution and computational redundancy issues inherent in traditional detection heads for small target detection, a simple linear transformation replaces traditional convolution. This linear transformation is combined with a SE channel attention mechanism (squeezing and activation), and depthwise convolution is used to achieve direct weighted modulation of feature channels through element-wise multiplication. This avoids complex nonlinear transformations and redundant parameter mappings, improving responsiveness to weak target features while ensuring a lightweight design. Integrating the SE channel attention mechanism and depthwise separable convolution enhances feature processing efficiency and responsiveness to weak targets.

[0034] First, input the feature map. First, a 1×1 pointwise convolution with n channels is performed to generate m true feature maps. ;in The input feature map and the output feature map have the same height and width; this process can be represented as: .

[0035] Then, the feature map of each channel in the feature map Y generated by its convolution kernel. Through a series of inexpensive linear transformations feature maps generated by s linear transformations for: .

[0036] in: It is the i-th original feature map; This is the j-th linear transformation; the final φ_{i,s} is the identity mapping used to preserve the intrinsic feature map; finally, the feature maps generated by the m convolutional kernels and the feature maps generated by the linear transformation are concatenated to obtain the output feature map: .

[0037] This linear transformation method can expand the expressive power of feature maps with extremely low computational overhead and fully explore the intrinsic relationships between features.

[0038] Subsequently, the feature map Y is fed into the SE module to adaptively generate channel weights and recalibrate.

[0039] First, the information for each channel is compressed using Global Average Pooling (GAP), as follows: .

[0040] in: The feature map space size; through the above global pooling, The overall response of each channel is extracted as a real number, which reflects the global semantic information and importance distribution of the channel.

[0041] then, Input two fully connected layers and perform dimensionality reduction, dimensionality increase, and nonlinear mapping to generate attention weight vectors. ,calculate The form is: .

[0042] in: and These are the weight matrices for dimensionality reduction and dimensionality increase, respectively. It is the ReLU activation function. For the Sigmoid function, To achieve compression ratio, the feature map of each channel is divided according to its corresponding attention weight. Scaling is performed to achieve weighted adjustment of feature channels, specifically expressed as follows:

[0043] .

[0044] Finally, feature maps The input channels are fed into a depthwise separable convolution module to further extract discriminative features and reduce model complexity; first, a channel-wise convolution is performed on each input channel. Using independent convolution kernels Local feature extraction is performed, represented as: .

[0045] Subsequently, pointwise convolution is used The convolutional kernel performs channel fusion on the output of the depthwise convolution to form the final output feature map. The calculation formula is as follows: .

[0046] in: Indicates the first Passage to the Channel fusion weights; through this decomposition strategy, depthwise separable convolution significantly reduces the number of parameters and computational overhead, while maintaining the ability to model fine-grained spatial features.

[0047] In summary, the LSD-Head structure utilizes standard convolution to extract spatial structure information, leverages the SE attention module for channel weight modeling, and improves efficiency and expressive power through depthwise separable convolution, achieving efficient and accurate detection of small SAR targets. It is particularly suitable for edge deployment scenarios with limited computing resources.

[0048] 3. P-MIoU of position-morphology matching intersection.

[0049] Traditional IoU-based methods face significant limitations in small object detection. Because small objects are highly sensitive to positional deviations, IoU values ​​often exhibit considerable instability, leading to poor model convergence. Furthermore, due to the lack of sufficient positional constraints, even bounding boxes with high IoU scores can generate false positives if they are misaligned, especially for small objects. Additionally, traditional IoU metrics are insensitive to aspect ratio differences, making it difficult to distinguish objects with different shapes (e.g., elongated and compact shapes), which is particularly important in tasks such as anomalous object detection.

[0050] To this end, this invention introduces geometric constraints in three dimensions—center point offset, aspect ratio difference, and angle limitation—based on the degree of target overlap, and constructs a position shape matching penalty IoU (P-MIoU).

[0051] ①Loss constraints based on the location of the center point.

[0052] From an intuitive geometric perspective, the distance between the center points of the predicted bounding box and the ground truth bounding box is an important indicator of positioning accuracy; therefore, this invention first uses standardized Euclidean distance to quantify the center offset, expressed as: .

[0053] To address the issue of target scale differences, the diagonal length of the minimum bounding rectangle was used for normalization: .

[0054] in: w c and h c These represent the average width and height of the predicted bounding box and the ground truth bounding box, respectively.

[0055] Based on the above definition, the center point location penalty term in this study can be defined as: .

[0056] Where: b represents the prediction box B; b gt Represents a real box B gt The center point.

[0057] The Ppos, constructed from the position matching loss, can effectively measure the degree of center point offset of the predicted box relative to the ground truth box. The greater the center point offset, the more significant the impact of the penalty term on the loss, thus prompting the model to regress the position more accurately.

[0058] ②Loss constraints based on shape matching.

[0059] To address the issue of misalignment in the detection box, this invention, based on the center point offset constraint, further introduces aspect ratio difference and angle offset terms, thereby decomposing the shape inconsistency between the predicted box and the true box into two independent structural components.

[0060] Specifically, to address the potential inconsistency in aspect ratio between the predicted and ground truth bounding boxes, this invention further considers the scale ratio relationship between them; that is, considering the differences in the shape of the target at different scales, the invention adjusts the w / h ratio of the predicted and ground truth bounding boxes accordingly. w gt / h gt The difference is penalized by squaring the dimensions, thereby compressing the scale differences between the boxes, as shown in the following formula: .

[0061] in: is the weight hyperparameter for the loss term; w and h are the width and height of the prediction box, respectively; w gt , h gt These are the width and height of the actual bounding box, respectively; ε To avoid the error term of division by zero.

[0062] On the other hand, to address the potential inconsistency in angular proportions between the predicted and ground truth bounding boxes, this invention applies a difference penalty to the arctangent value of the aspect ratio, enabling the model to more accurately understand the degree of skewness of the box shape in the angular dimension, expressed as: .

[0063] in: This represents the structural representation of the prediction box in angle space. Represents the angular structure of the actual bounding box.

[0064] By designing the above two sub-items, the structural inconsistencies between the predicted bounding box and the ground truth bounding box can be quantified and penalized in two dimensions: scale ratio and angular direction. This effectively reduces the impact of structural differences in the bounding box on detection accuracy. Finally, P-MIoU combines the above structural penalty terms into a unified composite penalty term and introduces a weight hyperparameter to adjust its influence ratio in the overall loss.

[0065] The complete P-MIoU formulation integrates these components with the standard IoU, as shown below: .

[0066] Numerical stability is ensured through the following methods: .

[0067] like Figure 6As shown, in the traditional CIoU method without confidence position constraints, there is a significant deviation between the center point of the target and the predicted bounding box, making it difficult to accurately match the center position of the actual target. However, the P-MIoU method used in this invention introduces a center distance penalty term when constructing the loss function, which effectively corrects this deviation. In addition, the added morphological loss term also enhances the matching degree between the bounding box shape and the real target, avoiding boundary tilting or mismatch problems caused by the lack of shape constraints. Therefore, this invention achieves a better balance between center positioning accuracy and morphological fitting, and is particularly suitable for edge computing scenarios with high matching consistency requirements, such as small target detection.

[0068] This invention addresses the shortcomings of the original network in terms of nonlinear expression capabilities by embedding a global channel attention mechanism to construct a feature extraction module (GCCR-GhostNet). This significantly reduces the scale of network training parameters while improving the multi-scale correlation and spatial semantic relationship modeling capabilities of feature space representation, achieving an optimized balance between model capacity and computational efficiency. To address the shortcomings of traditional detection heads in handling small targets due to feature sparsity and computational cost, a lightweight LSD-Head detection head is designed by replacing traditional convolution with a simple linear transformation, further improving network efficiency. To address the issue of mismatch between localization accuracy and shape, a matching loss function (P-MIoU) is proposed by integrating center distance constraints and aspect ratio penalties. This function combines center distance constraints, aspect ratio penalties, and angle limitations to accurately reflect positional and morphological deviations, improving the accuracy of small target localization.

[0069] In the experiment, this invention selected two typical SAR ship detection datasets: HRSID and SSDD. Each has its own advantages in terms of scene complexity, target scale and data size, and comprehensively verified the detection performance.

[0070] On the HRSID dataset, the LWSARDet-Nano model of this invention requires only 3.4 GFLOPs, reducing the computational cost by 78.6% compared to YOLOv5-Small, significantly outperforming classic models such as SSD. Its mAP reaches 94.2%, 3.4 percentage points higher than YOLOv5 and 50.9% higher than CenterNet, while maintaining strong robustness in mAP50-90 and recall. Through feature reparameterization, the model size is compressed to 6.45M parameters, a reduction of 25.6% compared to YOLOv3-Tiny. Notably, compared to YOLOv3-CSP, the model of this invention achieves slightly higher accuracy while reducing computational cost by 91.8%, demonstrating the effectiveness of feature fusion in balancing performance and efficiency.

[0071] Detection results under different scenarios and noise conditions, such as Figure 7As shown; in scenarios (a) and (b), the CenterNet detection box is small, some targets are not fully covered, and the boundary integrity is poor; SSD and YOLOv3-Tiny are severely affected by noise, with a large number of false alarms or complete missed detections; although YOLOv8 and YOLOv10 maintain good recognition performance on large targets, they still have some target localization deviations when dealing with close areas and complex backgrounds. Meanwhile, in terms of confidence in small target detection, the LWSARDet-Small and LWSARDet-Nano proposed in this invention have a significant improvement; in scenario (c), the YOLO series and CenterNet methods are prone to... Background misidentification as targets and insensitivity to potentially overlapping targets, or failure to detect real targets close to the shore; while LWSARDet-Small and LWSARDet-Nano demonstrate stronger anti-interference capabilities, accurately distinguishing multiple adjacent and overlapping small targets, showing good detection accuracy and discrimination ability. It is worth noting that LWSARDet-Small and LWSARDet-Nano can comprehensively capture all small-scale targets without missing any, and the predicted box boundaries are clear. Especially in the case of multiple closely adjacent targets, their discrimination ability and spatial separation performance are significantly better than other methods, demonstrating excellent small target modeling ability.

[0072] On the SSDD dataset, the Ours-Small model of this invention requires only 12.8 GFLOPs, reducing computational cost by 96.4% compared to the traditional detector SSD, and by more than 91% compared to the YOLOv3 series models; this model achieves an mAP of 92.1%, surpassing all compared methods; compared to other lightweight models, Ours-Small is 3.0% higher than YOLOv5-Small and 2.9% higher than YOLOv9-Tiny; in terms of parameter efficiency, this model has only 6.45M parameters, a reduction of 89.5% compared to YOLOv3; even more impressive is the Ours-Nano model, which requires only 3.4 GFLOPs. GFLOP achieved a mAP of 90.4%; compared to similar lightweight models, it reduced computation by 58.5% compared to YOLOv10-Nano while improving accuracy by 4.3%; the model has only 1.63M parameters, making it the lightest architecture in the table; notably, this invention excels in recall (90.5% for Ours-Small and 89.7% for Ours-Nano), demonstrating its sensitivity to small SAR targets; meanwhile, the accuracy metrics (81.2% and 78.2%, respectively) reflect the feature representation characteristics of the lightweight architecture in complex SAR scenarios. Even though the model's accuracy decreased on the SSDD dataset, this performance distribution reflects the model's optimization orientation for small target detection tasks: prioritizing comprehensive target acquisition under resource constraints, which is crucial for SAR applications where critical targets cannot be missed; the significant improvement in overall mAP performance fully validates the superior performance of this invention in ultra-lightweight scenarios.

[0073] like Figure 8As shown, the performance of various models was compared on SSDD; in scenario (a), CenterNet and SSD only detected some targets, showing obvious missed detections; YOLOv3-Tiny completely missed all targets; in contrast, YOLOv8 and YOLOv10 detected some targets, but their confidence levels were generally low; while the LWSARDet-Small and LWSARDet-Nano of this invention not only successfully detected multiple targets, but also significantly improved their confidence levels, fully demonstrating the algorithm's sensitivity to small targets; in scenario (b), all algorithms could detect the main targets, but the confidence levels differed; traditional The confidence scores of the methods and earlier versions of the YOLO series were generally between 0.52 and 0.63, while LWSARDet-Small and LWSARDet-Nano of this invention both achieved a high confidence score of 0.92, demonstrating the algorithm's advantage in target recognition certainty. In scenario (c), although YOLOv8 and YOLOv10 have improved detection performance, their confidence scores are still relatively low (0.27-0.37). In contrast, LWSARDet-Small and LWSARDet-Nano not only accurately located the main target, but also demonstrated excellent target separation ability and anti-interference performance in dense target areas.

[0074] LWSARDet, based on the YOLOv5 framework, embeds GCCR-GhostNet into the feature extraction stage. It refines channel descriptors through global average pooling, and then generates attention weights through two 1×1 convolutions and sigmoid, recalibrating the channel features to enhance weak ship echoes and suppress high-frequency sea clutter while maintaining extremely low computational cost. Subsequently, multi-scale features are fused in the original aggregation path to continue to convey semantic and spatial information. At the output end, LSD-Head replaces the traditional convolution stacking with "linear transformation + SE attention + depthwise separable convolution". It first generates the core feature map with 1×1 convolution, and then expands and concatenates the Ghost features with a channel-wise linear mapping. After SE reweighting, the predicted box is obtained by depthwise separable convolution, which significantly reduces the computational cost. Finally, P-MIoU loss is used to jointly constrain the localization and shape errors by combining center distance, aspect ratio, and angle penalty. The four-step process enables real-time and accurate SAR small boat target detection on edge devices. Extensive experiments on the High Resolution SAR Image Dataset (HRSID) and the SAR Ship Detection Dataset (SSDD) demonstrate that LWSARDet achieves superior overall performance compared to existing state-of-the-art (SOTA) methods, thus validating its effectiveness for real-time detection on edge devices.

[0075] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A method for detecting small targets on ships, characterized in that, Includes the following steps: Acquire SAR images of small targets such as ships on the sea surface; Global channel features of SAR images after passing through multiple channels of different dimensions are extracted, as well as global channel information of multiple channels of different dimensions are extracted. Based on the global channel information, channel descriptors representing the relationship between the corresponding channel and other channels are obtained. Based on the channel descriptors, the nonlinear dependencies between channels of different dimensions are captured, and attention weights of each channel are generated based on the dependencies. The global channel features are multiplied by the attention weights of each channel to obtain a preliminary feature map; The initial feature map is transformed into multiple real feature maps with different dimensions and channels. For each real feature map, a linear transformation of different dimensional channels is performed on the real feature map to obtain multiple associated feature maps of channel feature association. Channel weights of each associated feature map under different dimensional channels are generated, and spatial features of each associated feature map are extracted channel by channel. Based on the channel weights, the spatial features are weighted and fused channel by channel to generate a spatial feature map and obtain multiple spatial feature maps. Multiple spatial feature maps are fused to obtain the target feature map; Identify targets in the target feature map to achieve the detection of small targets on ships.

2. The method for detecting small targets on ships according to claim 1, characterized in that, The target feature map is obtained through a lightweight detection model. The lightweight detection model is based on the YOLOv5 architecture. The C3 module between the convolutional layers in the YOLOv5 backbone network is replaced with the GCCR-GhostNet module. An upsampling module is cascaded between the convolutional layers in the YOLOv5 neck network. An LSD-Head detection head is used in the YOLOv5 head. The GCCR-GhostNet module includes a GhostNetv2 network and a Global Context Channel Calibration (GCCR) module, which is cascaded in each transformation stage of the GhostNetv2 network. The GCCR module includes Global Average Pooling (GAP), 1×1 convolution, ReLU activation function, and Sigmoid function. The Global Average Pooling (GAP) is used to extract global channel information and generate channel descriptors; the non-linear dependencies between channels of different dimensions are captured by two consecutive 1×1 convolutions and the ReLU activation function; the Sigmoid function is used to generate attention weights for each channel based on the dependencies. The LSD-Head detection head includes a linear transformation module, an SE channel attention mechanism, and a depthwise separable convolution, which are cascaded in sequence. The linear transformation module is used to perform linear transformations on the real feature map in different dimensions and channels to generate multiple associated feature maps with channel features; the SE channel attention mechanism is used to generate channel weights for each associated feature map in different dimensions and channels; the depthwise separable convolution is used to weight and fuse spatial features channel by channel. The lightweight detection model is trained using the P-MIoU loss function, which is constructed by introducing geometric constraints in IoU, including center point offset, aspect ratio difference, and angle limitation.

3. The method for detecting small targets on ships according to claim 2, characterized in that, The acquisition of the preliminary feature map includes: Global channel features of SAR images are extracted using the GhostNetv2 network to obtain feature maps. ; For the input feature map The channel descriptor vector Z∈ℝ^(C×1×1) generated using global average pooling (GAP) is: ; descriptor Z c Subsequently, two consecutive 1×1 convolutional layers are passed, and the ReLU activation function is used to generate channel attention weights W∈ℝ^(C×1×1), which are expressed as: ; The output feature map is obtained by multiplying the input feature map by the attention weights channel by channel. Y c , represented as: ; The feature map Y c This is a preliminary feature map.

4. The method for detecting small targets on ships according to claim 2, characterized in that, The acquisition of the spatial feature map includes: Input feature map After pointwise convolution of size 1×1 with n channels, m true feature maps are generated. , represented as: ; Feature map of each channel in the feature map Y generated by its convolution kernel Through linear transformation feature maps generated by s linear transformations for: ; in: It is the i-th original feature map; This is the j-th linear transformation; the final φ_{i,s} is the identity mapping used to preserve the intrinsic feature map; concatenating the feature maps generated by the m convolutional kernels and the feature maps generated by the linear transformation yields the output feature map: ; The information of each channel of the feature map Y is compressed using global average pooling (GAP) and represented as follows: ; in: The feature map space size; The compressed feature map is input into two fully connected layers for dimensionality reduction, dimensionality increase, and nonlinear mapping to generate attention weight vectors. , represented as: ; in: and These are the weight matrices for dimensionality reduction and dimensionality increase, respectively. It is the ReLU activation function. For the Sigmoid function, To achieve compression ratio; the feature map of each channel is divided according to its corresponding attention weight. Scaling is performed to achieve weighted adjustment of feature channels, specifically expressed as follows: ; Channel-wise convolution for each input channel Using independent convolution kernels Local feature extraction is performed, represented as: ; Pointwise convolution The convolutional kernel performs channel fusion on the output of the depthwise convolution to form the final output feature map. , represented as: ; in: Indicates the first Passage to the Channel fusion weights; the feature map This is a spatial feature map.

5. The method for detecting small targets on ships according to claim 2, characterized in that, The geometric constraints of the P-MIoU loss function include: The center offset is quantized using the normalized Euclidean distance and expressed as: ; Normalization was performed using the diagonal length of the minimum bounding rectangle, and it is represented as: ; in: w c and h c These represent the average width and height of the predicted bounding box and the ground truth bounding box, respectively; The center point position penalty is represented as: ; Where: b represents the prediction box B; b gt Represents a real box B gt The center point; By comparing the w / h of the predicted bounding box and the ground truth bounding box... w gt / h gt The difference is penalized by squaring, thereby compressing the scale difference between the boxes, as shown in: ; in: is the weight hyperparameter for the loss term; w and h are the width and height of the prediction box, respectively; w gt , h gt These are the width and height of the actual bounding box, respectively; ε To avoid the error term from division by zero; Difference penalty is applied using the arctangent of the aspect ratio, expressed as: ; in: This represents the structural representation of the prediction box in angle space. Represents the angular structure of the actual bounding box.

6. A small target detection device for ships, characterized in that, include: The image module is used to acquire SAR images of small targets such as ships on the sea surface; The channel calibration module is used to extract global channel features of SAR images after passing through multiple channels of different dimensions, as well as extract global channel information of multiple channels of different dimensions. Based on the global channel information, channel descriptors representing the relationship between the corresponding channel and other channels are obtained. Based on the channel descriptors, the nonlinear dependencies between channels of different dimensions are captured, and attention weights for each channel are generated based on the dependencies. The global channel features are multiplied by the attention weights of each channel to obtain a preliminary feature map; The transformation module is used to transform the initial feature map into different dimensional channels to generate multiple real feature maps with different dimensional channels. For each real feature map, a linear transformation of different dimensional channels is performed on the real feature map to obtain multiple associated feature maps of channel feature association. Channel weights of each associated feature map under different dimensional channels are generated, and spatial features of each associated feature map are extracted channel by channel. Based on the channel weights, the spatial features are weighted and fused channel by channel to generate a spatial feature map and obtain multiple spatial feature maps. The detection module is used to fuse multiple spatial feature maps to obtain the target feature map; Identify targets in the target feature map to achieve the detection of small targets on ships.

7. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the ship small target detection method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the steps of a small target detection method for ships as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multi-scale feature enhanced deep learning SAR ship detection method

    CN118628905A