SAR (Synthetic Aperture Radar) vessel target lightweight detection system and method
By designing a lightweight backbone network GGSNet and combining BiFPN and Shape-IoU loss functions, the problem of high model complexity in SAR ship image detection is solved, achieving a balance between high accuracy and fast detection. It is suitable for Rockchip RK3588 development board.
Patent Information
- Application Number
- CN202610057127.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-16
- Publication Date
- 2026-02-13
AI Technical Summary
Existing SAR ship image target detection methods, while maintaining high detection accuracy, have a large number of model parameters and computational load, making it difficult to meet the needs of real-time detection. In particular, they are prone to false alarms and missed detections in complex environments and under different weather conditions.
A lightweight backbone network, GGSNet, is designed. By introducing lightweight G-Ghost stage modules and CSP-Ghost modules, combined with SPPF modules, the computational burden and number of parameters are reduced. Furthermore, BiFPN feature fusion network and Shape-IoU loss function are adopted to improve feature fusion capability and small target detection accuracy.
It achieves a significant reduction in the number of model parameters and computational load while maintaining high detection accuracy, thus improving the balance between detection speed and accuracy. It is suitable for real-time target detection on the Rockchip RK3588 development board.
Smart Images

Figure CN121527633A_ABST
Abstract
Description
Technical Field
[0001] This application mainly relates to the field of remote sensing detection, specifically to a lightweight SAR ship target detection system and method. Background Technology
[0002] Currently, in the field of remote sensing, Synthetic Aperture Radar (SAR) technology has become a key tool for target identification and detection on spaceborne, airborne, and missile-borne platforms. These platforms leverage SAR's penetrating power and environmental adaptability to provide strong support for topographic mapping, environmental monitoring, disaster assessment, and military reconnaissance. With the continuous development of SAR technology, its detection performance is becoming increasingly powerful, and the requirements for real-time processing of SAR images and target detection and identification capabilities are also increasing. At the same time, considering the stringent payload capacity and computational resource limitations of spaceborne, airborne, and missile-borne platforms, the system needs to employ efficient algorithms and optimized data processing flows to reduce reliance on hardware resources and achieve system lightweighting.
[0003] Traditional SAR ship image target detection methods rely on complex feature extraction processes and manual parameter tuning, which are not only inefficient but also difficult to adapt to changing environments and scenarios. Furthermore, these methods are prone to generating numerous false alarms and missed detections under varying weather conditions and complex backgrounds, severely impacting detection accuracy and reliability. The existing YOLOv5 is a relatively efficient real-time target detection algorithm that achieves fast detection speed and high accuracy by transforming the target detection task into a single forward pass regression problem. In SAR image ship detection, YOLOv5 can effectively locate and identify ships in images, outputting accurate ship bounding boxes and category information. However, its model complexity and computational cost are generally high, making it difficult to meet the demands of real-time detection. This is particularly important for applications requiring rapid response, such as disaster monitoring and military operations.
[0004] Therefore, how to significantly reduce the number of model parameters and computational load while ensuring high detection accuracy of SAR ship images is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] To address the aforementioned technical issues, this application aims to provide a lightweight SAR ship target detection system and method. By designing a lightweight backbone network GGSNet, the system significantly reduces the number of model parameters and computational load while maintaining high detection accuracy, achieving a good balance between detection speed and accuracy. Deployment and testing have been completed on a domestic development version based on Rockchip RK3588.
[0006] To achieve the above objectives, this application provides a lightweight SAR ship target detection system and method: The aforementioned objective of this application is achieved through the following technical solution: A lightweight SAR ship target detection system includes a model acquisition module, a feature extraction module, a feature fusion module, and a feature detection module, wherein: The model acquisition module is used to acquire a pre-trained GGS-YOLO detection model, wherein the GGS-YOLO detection model includes a GGSNet network, a Neck network, and a prediction network; the GGSNet network consists of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected in sequence. The first CSP-Ghost module, the second CSP-Ghost module, and the third CSP-Ghost module each include: a first branch network, a second branch network, and an output network; The first branch network includes a convolutional layer; The second branch network includes convolutional layers and two G-Ghost stage modules connected in sequence; The output network includes a convolutional layer, which takes as input the concatenated features obtained by concatenating the output of the convolutional layer in the first branch network with the output of the second G-Ghost stage module in the second branch network, and outputs the fused features. The feature extraction module is used to obtain high-dimensional features of the SAR ship image to be detected, and to extract features from the SAR ship image using the GGSNet network to obtain the extracted features. The feature fusion module is used to perform feature fusion on the extracted features using the Neck network to obtain fused features; The feature detection module is used to output target detection results based on the fused features using the prediction network.
[0007] Preferably, the Neck network is a BiFPN network.
[0008] Preferably, the model acquisition module, when performing the acquisition of the pre-trained GGS-YOLO detection model, is specifically used for: Acquire SAR ship image samples, and train the GGS-YOLO detection model using the SAR ship image samples and the Shape-IoU loss function to obtain the trained GGS-YOLO detection model. The Shape-IoU loss function is as follows:
[0009] In the formula, IOU is the intersection-union ratio. As a scale factor, This is the shape factor.
[0010] Preferably, the formula for calculating the scale factor is: ; In the formula, This represents the weighting coefficient in the vertical direction. These are the weighting coefficients in the horizontal direction. and The coordinates of the center point of the prediction box. and The coordinates of the center point of the ground truth bounding box. This represents the distance between the ground truth bounding box and the predicted bounding box.
[0011] Preferably, the formula for calculating the shape factor is: ; In the formula, It is a natural constant. and These are the width and height of the prediction box, respectively. To control the model's focus on shape loss, middle The value is or , , These represent the relative differences in width or height between the ground truth bounding box and the predicted bounding box, respectively.
[0012] Preferably, the formula for calculating the relative difference between the width or height of the ground truth bounding box and the predicted bounding box is: ; In the formula, This represents the weighting coefficient in the vertical direction. These are the weighting coefficients in the horizontal direction. The width of the GT frame. This is the height of the GT frame.
[0013] Preferably, the SAR ship detection system further includes: The user interaction module is used to visualize the target detection results, display them to the user through a GUI interface, and provide corresponding communication interfaces.
[0014] Preferably, the GUI interface includes: Input boxes for IP address and port number; A control for selecting the path of the SAR ship image data to be detected; A control for selecting the model file path; Controls used to initiate Ethernet transmission; A control used to stop detection; Controls for viewing SAR ship images that have been detected; A display window used to show the number of ships, real-time detection rate, and average detection rate.
[0015] Preferably, the target detection system for the SAR ship image is deployed in Rockchip RK3588 and uses an NPU processor for accelerated inference.
[0016] The second objective of this application is to provide a lightweight SAR method for detecting ship targets.
[0017] The second objective of this application is achieved through the following technical solution: A lightweight SAR ship target detection method includes: Obtain a pre-trained GGS-YOLO detection model, wherein the GGS-YOLO detection model includes a GGSNet network, a Neck network, and a prediction network; the GGSNet network consists of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected in sequence; The first CSP-Ghost module, the second CSP-Ghost module, and the third CSP-Ghost module each include: a first branch network, a second branch network, and an output network; The first branch network includes a convolutional layer; The second branch network includes convolutional layers and two G-Ghost stage modules connected in sequence; The output network includes a convolutional layer, which takes as input the concatenated features obtained by concatenating the output of the convolutional layer in the first branch network with the output of the second G-Ghost stage module in the second branch network, and outputs the fused features. The GGSNet network is used to extract features from SAR ship images to obtain the extracted features; Using the Neck network, the extracted features are fused to obtain fused features; Using the prediction network, the target detection result is output based on the fused features.
[0018] This application provides a lightweight SAR ship target detection system and method. It designs a lightweight backbone network, GGSNet, consisting of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected sequentially. It reduces the computational burden and number of parameters by introducing a lightweight G-Ghost stage module, and adds SPPF to capture features at different scales to enhance the model's understanding of image content. While maintaining high detection accuracy, it significantly reduces the number of model parameters and computational cost, achieving a good balance between detection speed and accuracy.
[0019] This application employs a BiFPN feature fusion network and introduces learnable feature weights, enabling the model to learn the importance of each input feature. With a slight increase in the number of parameters, it significantly improves detection accuracy and demonstrates stronger feature fusion capabilities.
[0020] This application also introduces Shape-IoU to construct a new loss function, which comprehensively considers the influence of bounding box scale and shape on the loss, balances the influence of bounding box shape on regression, thereby improving the model's attention to small targets and enhancing the target detection capability in SAR ship images.
[0021] This application also used Rockchip's domestic development board for model deployment, converting the trained GGS-YOLO model into an RKNN format weight file and deploying it on the development board. A multi-threaded NPU was used to accelerate inference, further improving the inference speed of the SAR ship target detection algorithm.
[0022] This application also features a GUI interface that allows users to select the dataset to be tested and the trained detection model, and returns the detection results for each image and the overall dataset in real time, making it convenient and intuitive to use and operate. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the structure of a lightweight SAR ship target detection system according to an embodiment of this application; Figure 2 This is a schematic diagram of the GGSNet network structure in an embodiment of this application; Figure 3 This is a schematic diagram of the improved BiFPN structure Neck structure in the embodiments of this application; Figure 4 This is the GUI interface of the target detection system for SAR ship images in this application embodiment; Figure 5 This is a flowchart illustrating a lightweight SAR ship target detection method according to an embodiment of this application. Among them, 101-model acquisition module; 102-feature extraction module; 103-feature fusion module; 104-feature detection module. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Furthermore, the technical features in the various embodiments or individual embodiments provided in this application can be arbitrarily combined with each other to form a feasible technical solution. Such combination is not constrained by the order of steps and / or the structural composition mode, but must be based on the ability of a person skilled in the art to implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0027] In the embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described below are merely illustrative. For example, the division of units and modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or modules can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, and can be electrical, mechanical, or other forms.
[0028] In addition, each functional unit in the various embodiments of this application can be integrated into a single processor, or each unit can be a separate device, or two or more units can be integrated into a single device; each functional unit in the various embodiments of this application can be implemented in hardware or in the form of hardware plus software functional units.
[0029] Those skilled in the art will understand that all or part of the steps of the following method embodiments can be implemented by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, they perform the steps of the following method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0030] It should be understood that the use of terms such as "system," "device," "unit," and / or "module" in this application is merely one method of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.
[0031] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "a plurality of" or "several" means two or more, unless otherwise explicitly specified.
[0032] It should be noted that the structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which this application can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size should still fall within the scope of the technical content disclosed in this application, provided that they do not affect the effects and purposes that this application can produce.
[0033] If a flowchart is used in this application, it is used to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0034] It should also be noted that, in this document, terms such as “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the article or device that includes the aforementioned element.
[0035] The implementation method of this application is written in a progressive manner.
[0036] like Figure 1 As shown in the figure, this application provides a lightweight SAR ship target detection system, including: a model acquisition module 101, a feature extraction module 102, a feature fusion module 103, and a feature detection module 104, wherein: The model acquisition module 101 is used to acquire a pre-trained GGS-YOLO detection model, wherein the GGS-YOLO detection model includes a GGSNet network, a Neck network, and a prediction network; the GGSNet network consists of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected in sequence; The first CSP-Ghost module, the second CSP-Ghost module, and the third CSP-Ghost module each include: a first branch network, a second branch network, and an output network; The first branch network consists of a convolutional layer; The second branch network consists of sequentially connected convolutional layers and two G-Ghost stage modules; The output network includes a convolutional layer that takes as input the concatenated features obtained by concatenating the output of the convolutional layer in the first branch network with the output of the second G-Ghost stage module in the second branch network, and outputs the fused features. Specifically, the model acquisition module 101 is used to acquire a pre-trained GGS-YOLO detection model; In real-world SAR ship target detection systems, targets are often small. While YOLOv5 can be used for detection, its CSPDarknet53 backbone remains complex for SAR images, resulting in slow detection speeds that cannot meet real-time target detection requirements. For lightweight convolutions, MobieNet, ShuffleNet, and GhostNet are among the most commonly used lightweight backbone networks. They utilize numerous depthwise separable convolutions to replace traditional convolutional blocks, reducing computation and parameter count and thus making the model lightweight. However, inference speed depends not only on the number of parameters and computation but also on memory usage. Low-computational-density depthwise separable convolutions are suitable for serially running devices with limited computing power, such as CPUs. The hardware architectures of GPUs, NPUs and CPUs are different. For these computing units, because their computing power is very strong, computing power is not the main factor affecting inference speed. On the contrary, the introduction of more convolutional layers due to depthwise separable convolution leads to an increase in memory access, resulting in a lower ratio of computation to memory operation. This makes it impossible to fully utilize parallel computing capabilities, which in turn leads to a decrease in inference speed. With the development of hardware technology, a large number of embedded devices are now equipped with parallel computing units such as GPUs and NPUs. G-GhostNet, proposed by Huawei Noah's Ark Lab in 2022, is a lightweight object detection network backbone suitable for GPUs. G-GhostNet improves upon GhostNet for GPU inference by no longer using depthwise separable convolutions. It reduces inference latency by removing some feature maps and activations. In the original CNN network structure, it includes... Each block is represented as The convolutional neural network, G-GhostNet module output and input The relationship can be represented as: ; G-Ghost continues GhostNet's approach of reducing computation through channel redundancy. In G-GhostNet, feature maps for some channels are generated by multiple blocks, while other feature maps are obtained through simple transformations of shallow features. For a given... The stage has blocks, and its output is Representing complex features as ,in: ; Ghost features are represented as Complex features can be achieved through The number of blocks is obtained, where the number of channels in each block is... This represents the proportion of Ghost feature channels to the total number of channels. This indicates that all elements are a set of real numbers, and c is the number of channels in the feature map. , These represent the height and width of the feature map, respectively. It can then be obtained through a simplified 1x1 or 3x3 convolution. and The final output is obtained by concatenating the data along the channel dimension. To compensate for the information loss caused by the simplification operation, GGhost-Block adds a Mix operation, which uses intermediate features generated during the complex feature generation process to make up for the missing information.
[0037] The calculation process for the Mix operation is as follows: ; ; First, the intermediate features are concatenated along the channel dimension to obtain the feature map. Then use the conversion function right Transform and finally merge. and the transformed result. In G-GhostNet Instead of global average pooling and fully connected layers, the proposed model uses fully connected layers to improve feature fusion capabilities. Represents the weighting coefficient. This is a linear bias term.
[0038] Given a A network of blocks, , (i=1,...,n), representing the i-th,...,n-th elements in the original network respectively. G-GhostNet reduces the computational cost and parameter count of each block to [number missing]. , , The number of parameters was reduced to... , , . and To reduce the computational cost and parameter count of convolution operations, The proportion of feature map channels corresponding to simplified convolution operations to the total number of channels. Computational complexity of G-Ghoststage. and parameter quantity The reduction ratio relative to the original network can be obtained using the following formula: ; ; Therefore, the G-Ghost stage was used to modify the existing CNN architecture, resulting in the G-GhostNet architecture. Although the G-GhostNet network performs well in inference speed, its single network structure is insufficient to capture the multi-scale features required for SAR target detection.
[0039] To this end, this application draws on the idea of accelerating inference in G-GhostNet and constructs a novel multi-scale feature module, CSP-Ghost module. Combined with the multi-scale feature extraction capability of YOLOv5's CSPDarknet structure, a novel feature extraction backbone network is formed, named GGSNet, and its structure is as follows: Figure 2 As shown; GGSNet is an efficient deep learning network architecture designed to improve the efficiency and accuracy of feature extraction. It consists of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected in sequence. The CSP-Ghost module is one of the core components of GGSNet. It reduces the computational burden and number of parameters of the model by introducing the lightweight G-Ghost stage module. The G-Ghost stage uses inexpensive convolutions to reduce computational complexity, while the multi-branch network structure maintains the effectiveness of feature extraction.
[0040] Specifically, each of the multiple CSP-Ghost modules includes: a first branch network, a second branch network, and an output network; The first branch network consists of a convolutional layer; The second branch network consists of sequentially connected convolutional layers and two G-Ghost stage modules; The output network includes a convolutional layer that takes as input the concatenated features obtained by concatenating the outputs of the convolutional layers in the first branch network and the outputs of the second G-Ghost stage module in the second branch network, and outputs the fused features. This design allows the network to utilize features at different scales simultaneously, enhancing the model's ability to understand image content. The concatenated feature map is then passed through a 1x1 convolutional layer for channel number adjustment and further feature fusion to achieve more efficient feature representation. At the end of the GGSNet deep learning network, a Spatial Pyramid Pooling Fast (SPPF) module is added to capture features at different scales, enhancing the model's understanding of image content. The SPPF module first applies a convolutional layer to the input feature map, then feeds the extracted features into three max-pooling layers with different pooling window sizes (e.g., 5x5, 9x9, and 13x13). The output feature maps of these pooling layers are concatenated and fused through a convolutional layer to adjust the number of channels and further integrate multi-scale features, thereby increasing visual perception and improving detection accuracy.
[0041] The feature extraction module 102 is used to extract features from the preprocessed image using the GGSNet network to obtain the extracted features; Specifically, the feature extraction module 102 is used to acquire the SAR ship image to be detected, and to extract features from the SAR ship image using the GGSNet network to obtain the extracted features. In some embodiments, when the feature extraction module 102 acquires an image of the SAR ship to be detected and extracts features from the SAR ship image using the GGSNet network to obtain the extracted features, it is specifically used for: Acquire SAR ship images to be detected, and preprocess the SAR ship images to obtain preprocessed images; The GGSNet network is used to extract features from the preprocessed image to obtain the extracted features.
[0042] Specifically, SAR sensors are used to collect SAR ship image data to be detected, and necessary preprocessing operations are performed on the collected SAR ship images, including denoising, standardization and image enhancement, to improve the accuracy of subsequent processing.
[0043] The feature fusion module 103 is used to fuse the extracted features using the Neck network to obtain fused features; The feature detection module 104 is used to output target detection results based on the fused features using a prediction network.
[0044] Through the above modules, image features are extracted, fused, and detected after preprocessing such as denoising, thus achieving efficient and accurate location and recognition of target objects in images or videos.
[0045] Currently, in shipboard detection using SAR images, YOLOv5 can effectively locate and identify ships in the images, and output accurate ship bounding boxes and category information. However, the model complexity and computational load are generally high, making it difficult to meet the needs of real-time detection.
[0046] Therefore, in the above embodiments, this application provides a lightweight SAR ship target detection system and method. It designs a lightweight backbone network, GGSNet, which consists of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected sequentially. It reduces the computational burden and number of parameters by introducing a lightweight G-Ghost stage module, and adds SPPF to capture features at different scales to enhance the model's understanding of image content. While maintaining high detection accuracy, it significantly reduces the number of model parameters and computational load.
[0047] Preferably, the Neck network adopts a BiFPN network.
[0048] Specifically, in the EfficientDet network, Tan et al. proposed BiFPN to further optimize the PANet network. To improve the model's feature extraction capability, nodes with only one input edge in the feature fusion network are first removed. In the feature fusion network, nodes with only one input edge and whose output feature maps do not fuse with other features contribute little to feature information fusion. Then, to fully utilize the features of the input nodes, the features of the input nodes are fed into the feature map of the next level to obtain a higher level of feature fusion. In addition, skip connections are added between the input and output nodes of the same scale feature map. More feature information is retained in the input nodes, and the additional skip connections can enable the output nodes to fuse more features without increasing the computational cost too much, effectively mitigating the information loss problem caused by the increase in the number of network layers.
[0049] In this application, the Neck network incorporates BiFPN features to improve the fusion structure, as shown in the following structure: Figure 3 As shown: Remove one transmission processing node from the bottom and one from the top of the original YOLOv5 Neck network structure; The bottom layer receives features from the input nodes of its own layer or features from the intermediate layer feature maps after feature fusion through a weighted fusion operation. It then performs convolution to extract features and transmits the extracted features to the output nodes of the intermediate layer through a 3x3 / 2 Maxpool operation. The intermediate layer receives the features transmitted from the bottom layer through the output node of this layer. The features that are weighted and fused with this layer are extracted through convolution. Then, the extracted features are transmitted to the intermediate layer or directly output through a 3x3 / 2 Maxpool operation. The intermediate layer is also used to receive features from the input nodes of this layer or the top layer, perform convolution to extract features, perform feature fusion through weighted fusion operation, output nodes, or directly perform feature fusion operation with the features transmitted from the bottom layer. The topmost layer receives features transmitted from its own layer or intermediate layers through its output nodes, performs convolution to extract features, and then fuses the extracted features using a 3x3 / 2 Maxpool operation to output the final features. The original Neck network, after improvement, achieves bidirectional feature flow. This structure allows the network to effectively share information across different scales, thereby improving the accuracy of object detection.
[0050] Preferably, the model acquisition module 101, when acquiring the pre-trained GGS-YOLO detection model, is specifically used for: Acquire SAR ship image samples, and train the GGS-YOLO detection model using the SAR ship image samples and the Shape-IoU loss function to obtain the trained GGS-YOLO detection model. The Shape-IoU loss function is: ; In the formula, IoU is the crossover-union ratio. As a scale factor, This is the shape factor.
[0051] SAR target images contain significant differences in target scale and a large number of small targets. Existing IoU functions such as CIOU typically consider the geometric relationship between the ground truth bounding box and the predicted bounding box, using the relative position and shape of the bounding boxes to calculate the loss. However, they do not consider the influence of inherent properties such as the shape and scale of the bounding boxes on the bounding box regression, resulting in low accuracy when processing SAR images. To improve the target detection capability in SAR images, Shape-IoU was introduced to construct a new loss function.
[0052] The ground truth (GT) bounding box has a long side and a short side. When both the position offset and shape offset are the same and not all zero, the difference in the shape and scale of the bounding box in the regression samples will lead to differences in their IoU values. For bounding box regression samples of the same scale, when the position offset and shape offset of the regression sample are the same and not all zero, the shape of the bounding box will affect the IoU value of the regression sample. The change in IoU value corresponding to the position offset and shape offset along the direction of the short side of the bounding box is more significant. For bounding box regression samples with the same shape, when the position offset and shape offset of the regression sample are the same and not all zero, the IoU value of the smaller scale bounding box regression sample is more significantly affected by the shape of the GT bounding box than that of the larger scale regression sample.
[0053] Therefore, the Shape-IoU proposed in this application comprehensively considers the impact of bounding box scale and shape on the loss, and balances the impact of bounding box shape on regression to improve the model's attention to small targets.
[0054] Preferably, the formula for calculating the scale factor is: ; In the formula, This represents the weighting coefficient in the vertical direction. These are the weighting coefficients in the horizontal direction. and The coordinates of the center point of the prediction box. and The coordinates of the center point of the ground truth bounding box. This represents the distance between the ground truth bounding box and the predicted bounding box.
[0055] Preferably, the formula for calculating the shape factor is: ; In the formula, It is a natural constant. and These are the width and height of the prediction box, respectively. To control the model's focus on shape loss, middle The value is or , , These represent the relative differences in width or height between the ground truth bounding box and the predicted bounding box, respectively.
[0056] Preferably, the formula for calculating the relative difference between the width or height of the ground truth bounding box and the predicted bounding box is: ; In the formula, This represents the weighting coefficient in the vertical direction. These are the weighting coefficients in the horizontal direction. The width of the GT frame. This is the height of the GT frame.
[0057] In some embodiments, the target detection results are further subjected to non-maximum suppression (NMS) processing to obtain the final result.
[0058] Nonmaximum suppression is an algorithm widely used in computer vision and image processing. Its core idea is to retain the highest-scoring detection box in each target region while suppressing other low-scoring detection boxes that highly overlap with it. This removes redundant detection results, ensuring that the final output is the most representative target bounding box.
[0059] Preferably, the user interaction module is used to visualize the final result, display it to the user through a GUI interface, and provide corresponding communication interfaces.
[0060] Preferably, the GUI interface includes: input boxes for IP address and port number; controls for selecting the path of the SAR ship image to be detected; controls for selecting the path of the model file; controls for starting Ethernet transmission; controls for stopping detection; controls for viewing the SAR ship images that have been detected; and a display window for displaying the number of ships, real-time detection rate, and average detection rate. Specifically, to improve the system's usability, the GUI interface of the SAR target detection system can also be designed using the QT Creator development tool, such as... Figure 4 As shown, the IP address and port number input boxes are used to input the development board's Ethernet address and the port number used to receive image data. When using the Ethernet detection function, the corresponding address and port number are used to establish a connection. The image path and model path are used to select the path to the SAR ship image data to be detected and the model file to be used, respectively. The Ethernet transmission function is used to start the Ethernet reception of SAR image data and the inference process. In the system, to ensure inference speed, the UDP protocol is used for Ethernet transmission. The stop function is used to pause detection midway. The number of ships displays the number of ships detected by the model in the current image. The real-time detection rate is the average frame rate per 60 images processed during the detection process, used to measure the model's detection speed. The average detection rate is the average detection speed of the entire detection process. Finally, after detection is completed, the system retains the detected image data, and the detection history function allows viewing the SAR images that have been detected.
[0061] Preferably, the lightweight target detection system for SAR ship images is deployed in Rockchip RK3588 using an NPU processor to accelerate inference.
[0062] The NPU in the Rockchip RK3588 processor serves as a large-scale AI computing unit solution, consuming less than 1% of the power of a GPU. Its advantages of miniaturization, low power consumption, and low cost can accelerate the application of artificial intelligence technology. Addressing the weight and power consumption requirements of miniaturized devices such as drones, we deployed and analyzed the NPU on the RK3588 board. Using the NPU for inference on the development board requires the RKNPU tool, whose kernel driver handles the interaction with the NPU hardware. Before using the RKNPU, the RKNN-Toolkit2 tool must first be run on the computer to convert the trained model into an RKNN format model. Then, inference can be performed on the development board using the RKNN C API or Python API.
[0063] RKNN-Toolkit2 is a software development kit that enables model conversion, inference, and performance evaluation on PCs and Rockchip NPU platforms. RKNN-Toolkit-Lite2 provides both Python and C / C++ programming interfaces for the Rockchip NPU platform, helping users deploy RKNN models and accelerate the implementation of artificial intelligence applications.
[0064] In some embodiments, the algorithm model and the comparison algorithm model in this paper can be exported to a compatible ONNX format using the YOLOv5 model export script. Then, on the Ubuntu 20.04 system, the RKNN-Toolkit is used to convert them into an RKNN model supported by the RK3588 platform NPU. On the development board, image preprocessing is performed first, then the model is loaded using the RKNN C API, and finally post-processing is performed to obtain the detection results. Since the development board has a three-core NPU, a C++ multi-threading mechanism is used to fully utilize the three-core NPU for inference, achieving higher inference speed. Multi-threading improves resource utilization and increases the inference speed on the board. Depending on the application scenario, the input data source can be image files or image data received via Ethernet. Since SAR imaging equipment typically obtains high-resolution images in real-world scenarios, when the input image is a large-scale image, it is first sliced before inference. To improve the model's inference speed, multi-threaded inference is used in the inference thread, and a thread pool is used to manage the threads to reduce thread consumption, improve response speed, and enhance manageability. Image preprocessing, model inference, and post-processing are completed in the inference thread.
[0065] The GGS-YOLO model and YOLOv5s benchmark model proposed in this application were deployed on the Rockchip RK3588 platform. Since the RKNN-Toolkit tool does not have an interface for model accuracy testing, the AP value was obtained by exporting the detection results from the development board and writing a corresponding program to compare the detection results with the labeled data (see Table 1 below).
[0066] Table 1 Comparison of detection speeds of different models on the development board
[0067] After model transformation, the number of parameters is lower than that of the YOLOv5 network. Moreover, on the NPU, this embodiment has a detection speed 28 FPS higher than that of the YOLOv5 network, while the accuracy only decreases by 0.004, which demonstrates the effectiveness of this embodiment.
[0068] In some embodiments of this application, the hardware device may also be an Intel(R) Xeon(R) Platinum8255C CPU @ 2.50GHz, an RTX 2080 Ti, and a GPU with 11GB of video memory. The computer system is Ubuntu 20.04. The deep learning environment uses PyTorch 1.11.0, Python version 3.8, and CUDA 11.3 dependency libraries to call the GPU for training. The algorithm in this paper is an improvement on YOLOv5s, and YOLOv5s is selected as the baseline model. The initial learning rate is set to 0.01, and the optimization method is stochastic gradient descent (SGD). The model training epochs are set to 200 during model training.
[0069] The model's detection performance metrics on the SSDD and HRSID datasets (where P, R, and AP represent precision, recall, and mean precision, respectively): Table 2 Detection results of different models
[0070] Comparison of detection speeds for different models (where Params, FLOPs, and GPU inference refer to the number of parameters, floating-point executions per second, and GPU inference time, respectively): Table 3 Comparison of detection parameters and detection speed for each model
[0071] It can be seen that, compared with other models, the improved GGS-YOLO detection model has significantly reduced the number of model parameters and computational load while maintaining high detection accuracy.
[0072] This application proposes a lightweight SAR ship target detection system that draws on the ideas of G-GhostNet, using inexpensive operations to generate partial feature maps, thus reducing the computational and parameter count of the model. Furthermore, GGSNet employs the residual connection concept of CSPNet, improving feature reusability. This allows GGSNet to significantly reduce the number of model parameters and computational load while maintaining high detection accuracy, achieving a good balance between detection speed and accuracy.
[0073] like Figure 5 As shown, this application also provides a lightweight SAR ship target detection method; S1: Obtain the pre-trained GGS-YOLO detection model, which includes the GGSNet network, the Neck network, and the prediction network; the GGSNet network consists of the first convolutional layer, the second convolutional layer, the first CSP-Ghost module, the third convolutional layer, the second CSP-Ghost module, the fourth convolutional layer, the third CSP-Ghost module, and the SPPF module connected in sequence; The first CSP-Ghost module, the second CSP-Ghost module, and the third CSP-Ghost module each include: a first branch network, a second branch network, and an output network; The first branch network consists of a convolutional layer; The second branch network consists of sequentially connected convolutional layers and two G-Ghost stage modules; The output network includes a convolutional layer that takes as input the concatenated features obtained by concatenating the output of the convolutional layer in the first branch network with the output of the second G-Ghost stage module in the second branch network, and outputs the fused features. S2: Use the GGSNet network to extract features from the preprocessed image to obtain the extracted features; S3: Using the Neck network, the extracted features are fused to obtain fused features; S4: Using a prediction network, output the target detection results based on the fusion features.
[0074] This application provides a SAR ship target detection method. It employs a lightweight backbone network, GGSNet, composed of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected sequentially. By introducing a lightweight G-Ghost stage module, it reduces the computational burden and number of parameters in the model. The SPPF module is added to capture features at different scales, enhancing the model's understanding of image content. While maintaining high detection accuracy, it significantly reduces the number of model parameters and computational cost, achieving a good balance between detection speed and accuracy.
[0075] In some embodiments, the Neck network employs a BiFPN network.
[0076] In some embodiments, one implementation of the step of obtaining a pre-trained GGS-YOLO detection model specifically includes: Acquire SAR ship image samples, and train the GGS-YOLO detection model using the SAR ship image samples and the Shape-IoU loss function to obtain the trained GGS-YOLO detection model; The Shape-IoU loss function is: ; In the formula, IoU is the crossover-union ratio. As a scale factor, This is the shape factor.
[0077] Preferably, the formula for calculating the scale factor is: ; In the formula, This represents the weighting coefficient in the vertical direction. These are the weighting coefficients in the horizontal direction. and The coordinates of the center point of the prediction box. and The coordinates of the center point of the ground truth bounding box. This represents the distance between the ground truth bounding box and the predicted bounding box.
[0078] Preferably, the formula for calculating the shape factor is: ; In the formula, It is a natural constant. and These are the width and height of the prediction box, respectively. To control the model's focus on shape loss, middle The value is or , , These represent the relative differences in width or height between the ground truth bounding box and the predicted bounding box, respectively.
[0079] Preferably, the formula for calculating the relative difference between the width or height of the ground truth bounding box and the predicted bounding box is: ; In the formula, This represents the weighting coefficient in the vertical direction. These are the weighting coefficients in the horizontal direction. The width of the GT frame. This is the height of the GT frame.
[0080] In some embodiments, the target detection method for SAR ship images described above further includes visualizing the target detection results, displaying them to the user through a GUI interface, and providing corresponding communication interfaces.
[0081] Preferably, the GUI interface includes: Input boxes for IP address and port number; control for selecting the path of the SAR ship image to be detected; control for selecting the path of the model file; control for starting Ethernet transmission; control for stopping detection; control for viewing the SAR ship images that have been detected; display window for displaying the number of ships, real-time detection rate, and average detection rate.
[0082] In some embodiments, the target detection method for SAR ship images described above can be deployed in Rockchip RK3588 and use an NPU processor for accelerated inference.
[0083] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A lightweight SAR ship target detection system, characterized in that, It includes a model acquisition module, a feature extraction module, a feature fusion module, and a feature detection module, among which: The model acquisition module is used to acquire a pre-trained GGS-YOLO detection model, wherein the GGS-YOLO detection model includes a GGSNet network, a Neck network, and a prediction network; the GGSNet network consists of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected in sequence. The first CSP-Ghost module, the second CSP-Ghost module, and the third CSP-Ghost module each include: a first branch network, a second branch network, and an output network; The first branch network includes a convolutional layer; The second branch network includes convolutional layers and two G-Ghost stage modules connected in sequence; The output network includes a convolutional layer, which takes as input the concatenated features obtained by concatenating the output of the convolutional layer in the first branch network with the output of the second G-Ghost stage module in the second branch network, and outputs the fused features. The feature extraction module is used to obtain high-dimensional features of the SAR ship image to be detected, and to extract features from the SAR ship image using the GGSNet network to obtain the extracted features. The feature fusion module is used to perform feature fusion on the extracted features using the Neck network to obtain fused features; The feature detection module is used to output target detection results based on the fused features using the prediction network.
2. The SAR ship target lightweight detection system according to claim 1, characterized in that, The Neck network uses a BiFPN network.
3. The SAR ship target lightweight detection system according to claim 1, characterized in that, The model acquisition module, when performing the acquisition of the pre-trained GGS-YOLO detection model, is specifically used for: Acquire SAR ship image samples, and train the GGS-YOLO detection model using the SAR ship image samples and the Shape-IoU loss function to obtain the trained GGS-YOLO detection model. The Shape-IoU loss function is as follows: ; In the formula, IoU is the crossover-union ratio. As a scale factor, This is the shape factor.
4. The SAR ship target lightweight detection system according to claim 3, characterized in that, The formula for calculating the scale factor is as follows: ; In the formula, The weighting coefficient is for the vertical direction. These are the weighting coefficients in the horizontal direction. and The coordinates of the center point of the prediction box. and The coordinates of the center point of the ground truth bounding box. This represents the distance between the ground truth bounding box and the predicted bounding box.
5. The SAR ship target lightweight detection system according to claim 3, characterized in that, The formula for calculating the shape factor is: ; In the formula, It is a natural constant. and These are the width and height of the prediction box, respectively. To control the model's focus on shape loss, middle The value is or , , These represent the relative differences in width or height between the ground truth bounding box and the predicted bounding box, respectively.
6. The SAR ship target lightweight detection system according to claim 5, characterized in that, The formula for calculating the relative difference between the width or height of the ground truth bounding box and the predicted bounding box is as follows: ; In the formula, The weighting coefficient is for the vertical direction. These are the weighting coefficients in the horizontal direction. The width of the GT frame. This is the height of the GT frame.
7. The SAR ship target lightweight detection system according to claim 1, characterized in that, Also includes: The user interaction module is used to visualize the target detection results, display them to the user through a GUI interface, and provide corresponding communication interfaces.
8. The SAR ship target lightweight detection system according to claim 7, characterized in that, The GUI interface includes: Input boxes for IP address and port number; A control for selecting the path of the SAR ship image data to be detected; A control for selecting the model file path; Controls used to initiate Ethernet transmission; A control used to stop detection; Controls for viewing SAR ship images that have been detected; A display window used to show the number of ships, real-time detection rate, and average detection rate.
9. A lightweight SAR ship target detection system according to claim 1, characterized in that, The target detection system for SAR ship images is deployed in Rockchip RK3588 and uses an NPU processor for accelerated inference.
10. A lightweight SAR ship target detection method, characterized in that, include: Obtain a pre-trained GGS-YOLO detection model, wherein the GGS-YOLO detection model includes a GGSNet network, a Neck network, and a prediction network; the GGSNet network consists of a first convolutional layer, a second convolutional layer, a first CSP-Ghost module, a third convolutional layer, a second CSP-Ghost module, a fourth convolutional layer, a third CSP-Ghost module, and an SPPF module connected in sequence; The first CSP-Ghost module, the second CSP-Ghost module, and the third CSP-Ghost module each include: a first branch network, a second branch network, and an output network; The first branch network includes a convolutional layer; The second branch network includes convolutional layers and two G-Ghost stage modules connected in sequence; The output network includes a convolutional layer, which takes as input the concatenated features obtained by concatenating the output of the convolutional layer in the first branch network with the output of the second G-Ghost stage module in the second branch network, and outputs the fused features. The GGSNet network is used to extract features from SAR ship images to obtain the extracted features; Using the Neck network, the extracted features are fused to obtain fused features; Using the prediction network, the target detection result is output based on the fused features.
Citation Information
Patent Citations
Underwater small target sonar detection system and method based on computer vision
CN112526490A
Underwater low-resolution small-target biological detection method based on improved pyramid
CN120656050A
KR20240007457A