SAR ship target detection method based on multi-task reinforcement learning automatic pruning method

By introducing a multi-task reinforcement learning automatic pruning method with model channel entropy, the problem of resource limitation of deep learning SAR object detection model at edge devices is solved, and efficient model compression and performance retention are achieved to adapt to edge device deployment.

CN118941973BActive Publication Date: 2024-12-13ANHUI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411434113.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-12-13
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

The high demand for computing resources and storage space in resource-constrained edge device environments of deep learning SAR object detection models leads to limited application capabilities of the model. The existing pruning method ignores the unique properties of SAR images, causing the model to prune in the channel. The input and output are out of order and cannot be adapted.

Method used

Using the automatic pruning method based on multi-task reinforcement learning, the entropy-guided multi-task reward function is designed and the pruning strategy is optimized, and the end-to-end full-link universal pruning of deep learning SAR object detection model is realized. , retain the intensity information and diversity characteristics of the target feature channel to adapt to edge device resources.

Benefits of technology

It realizes that while maintaining detection performance, it greatly reduces the amount of model parameters and calculations, improves the portability and practical application capabilities of the model, ensures that the pruned model is effectively deployed on edge devices, and significantly reduces the model volume. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941973B_ABST
    Figure CN118941973B_ABST
Patent Text Reader

Abstract

The present invention discloses a SAR ship target detection method and system based on a multi-task reinforcement learning automatic pruning method, which relates to the field of SAR ship target detection, wherein the method comprises: collecting SAR images containing target ships to be detected; designing a multi-task reinforcement learning automatic pruning method; based on the multi-task reinforcement learning automatic pruning method, improving the traditional SAR ship target detection model to obtain a final model; using the final model to detect the SAR image and identify the ship therein. The present invention optimizes SAR ship target detection through a multi-task reinforcement learning automatic pruning method, effectively reduces the amount of model parameters and calculation, while maintaining high detection accuracy, and enhancing the application capability of the model on edge devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of SAR ship target detection, and in particular to a SAR ship target detection method based on a multi-task reinforcement learning automatic pruning method. Background Art

[0002] At present, the SAR target detection method based on convolutional neural network is one of the most commonly used deep learning models in SAR target detection tasks. It extracts hierarchical and robust features from the input image through structures such as convolutional layers and pooling layers. With the continuous development of deep learning technology, deep learning SAR target detection models have shown obvious advantages in feature extraction, robustness, and end-to-end detection capabilities. Therefore, the application of deep learning SAR target detection models has become the current development trend. Although the detection performance of deep learning SAR target detection models is relatively high, the training and reasoning of deep learning models usually require a lot of computing resources and energy, which is a huge challenge for resource-constrained edge device environments. This shortcoming limits the actual scene application capabilities of deep learning models. Therefore, it is of great significance to develop a detection method that balances accuracy, speed, and portability to increase the actual application capabilities of the model.

[0003] In order to solve the problem of computing resources and storage space, researchers have tried different methods to solve this problem. Model pruning is an important method to compress the volume of deep learning SAR target detection models. It reduces the amount of calculation and parameters by removing non-critical redundant parameters while maintaining the good performance of the pruned SAR target detection model. Pruning methods can be divided into structured pruning and unstructured pruning. Compared with unstructured pruning, structured pruning does not require specific underlying hardware or special computing acceleration libraries to achieve the desired effect. Therefore, structured pruning has been widely used in practical engineering. However, the structured pruning SAR target detection model still has the following problems:

[0004] (1) The basic modules of the deep learning SAR target detection model, such as the convolution layer and batch normalization layer, are relatively complex. When performing channel pruning on a certain layer of the network structure of the deep learning SAR target detection model, the network structure that depends on it must be pruned according to a consistent pruning layout, otherwise the shallow and deep channels of the pruned SAR target detection model will not be able to adapt, resulting in misalignment between the input and output of the model;

[0005] (2) Channel pruning based on deep learning for SAR target detection mainly draws on pruning methods in the field of natural scenes, while ignoring the unique properties of SAR images. The intensity values ​​of the target area in SAR images are often significantly different from the background, and the entropy value in the target area is usually higher, reflecting more details and changes. Most pruning methods based on deep learning for SAR target detection models only consider the complexity and accuracy of the model, while ignoring the different responses of different channels to the target. Channels with larger entropy better capture the intensity information and diversity characteristics of the target. Summary of the invention

[0006] In order to solve the technical problems in the above background, the present invention combines the characteristics of large SAR target intensity value, introduces model channel entropy into the multi-task loss function, and designs a SAR ship target detection method and system based on multi-task reinforcement learning automatic pruning method.

[0007] To achieve the above object, the present invention provides a SAR ship target detection method based on a multi-task reinforcement learning automatic pruning method, the steps comprising:

[0008] Acquire SAR images containing the target ship to be detected;

[0009] A multi-task reinforcement learning automatic pruning method is designed, the steps of which include: grouping the network structure based on the traditional SAR model target detection model to obtain a grouping result; based on the grouping result, using a multi-task reinforcement learning pruning strategy automatic search method to output a pruning strategy; using an entropy-based multi-task reward function to optimize the pruning strategy;

[0010] Based on the multi-task reinforcement learning automatic pruning method, the traditional SAR ship target detection model is improved to obtain a final model; the method comprises: using the optimized pruning strategy to repeatedly prune the traditional SAR ship target detection model to obtain an optimal pruning strategy; pruning the SAR target detection model by the optimal pruning strategy, and training the pruned network model to obtain the final model;

[0011] The final model is used to detect the SAR image and identify the ships therein.

[0012] Preferably, a pre-trained traditional SAR target detection model is loaded, and GSP is used to automatically analyze the intricate connections between network structures in the deep learning SAR target detection model, and the mutually coupled network structures are divided into the same group according to the analysis results to obtain the grouping result.

[0013] Preferably, the RLAS framework is used to automatically output a pruning strategy according to each group of network structure state characteristics in the grouping results, and the redundant channels of the network structure are pruned according to the pruning strategy; after the pruning is completed, the detection performance, sparsity and model entropy of the pruned SAR target detection model are used to derive rewards to guide the RLAS update process; during the update process, RLAS optimizes the pruning strategy by maximizing the entropy of the model channel, minimizing the number of parameters and the amount of calculation of the model, and adaptively adjusting the sparsity.

[0014] Preferably, an entropy-based multi-task reward function MOR is constructed to guide RLAS to search for the optimal pruning strategy under the indicators of edge accuracy, sparsity and model channel entropy; the multi-task reward function MOR derives rewards through the detection performance, sparsity and model entropy of the pruned SAR target detection model to guide the RLAS update process.

[0015] Preferably, the RLAS is continuously updated and the SAR target detection model is repeatedly pruned using a multi-task reinforcement learning automatic pruning method until an optimal pruning strategy is obtained; the SAR target detection model is pruned using the optimal pruning strategy, and the pruned network model is trained to complete convergence to obtain the final model.

[0016] The present invention also provides a SAR ship target detection system based on a multi-task reinforcement learning automatic pruning method, wherein the system is used to implement the above method and comprises: an acquisition module, a design module, an optimization module and a recognition module;

[0017] The acquisition module is used to acquire SAR images containing the target ship to be detected;

[0018] The design module is used to design a multi-task reinforcement learning automatic pruning method, and the steps include: on the basis of a traditional SAR model target detection model, grouping the network structure to obtain a grouping result; based on the grouping result, using a multi-task reinforcement learning pruning strategy automatic search method to output a pruning strategy; using an entropy-based multi-task reward function to optimize the pruning strategy;

[0019] The optimization module is used to improve the traditional SAR ship target detection model based on the multi-task reinforcement learning automatic pruning method to obtain a final model; the method includes: repeatedly pruning the traditional SAR ship target detection model using the optimized pruning strategy to obtain an optimal pruning strategy; pruning the SAR target detection model using the optimal pruning strategy, and training the pruned network model to obtain the final model;

[0020] The recognition module is used to detect the SAR image using the final model and identify the ships therein.

[0021] Preferably, the process of obtaining the grouping result includes: loading a pre-trained traditional SAR target detection model, automatically analyzing the intricate connections between network structures in the deep learning SAR target detection model through GSP, and dividing the mutually coupled network structures into the same group according to the analysis results to obtain the grouping result.

[0022] Preferably, the process of optimizing the pruning strategy includes: using the RLAS framework to automatically output a pruning strategy according to each group of network structure state characteristics in the grouping results, and pruning redundant channels of the network structure according to the pruning strategy; after pruning is completed, rewards are obtained through the detection performance, sparsity and model entropy of the pruned SAR target detection model to guide the RLAS update process; during the update process, RLAS optimizes the pruning strategy by maximizing the entropy of the model channel, minimizing the number of parameters and the amount of calculation of the model, and adaptively adjusting the sparsity.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] (1) Design an end-to-end full-link universal pruning method for any deep learning SAR target detector. SARRLP can automatically group the network structure coupling according to the deep learning SAR target detector, and the network structures in the same group have a consistent pruning layout to ensure the integrity of the detector network structure after pruning; secondly, the coupling groups are sorted according to the maximum entropy principle, so that the SAR target detector can achieve end-to-end full-link pruning according to the principle of retaining the maximum channel entropy.

[0025] (2) Design a method for automatically searching pruning strategies, RLAS. We construct a new RLAS state space. By introducing indicators such as model accuracy, parameters, computational complexity, and entropy into the state space, we can fully reflect the current network state and ensure the effectiveness of the pruning strategy search process. In addition, RLAS automatically outputs pruning strategies based on each set of network structure state features in the deep learning SAR target detector through a continuous action space, achieving more fine-grained and accurate model compression.

[0026] (3) Design a multi-task reward function MOR that maximizes the channel entropy of the SAR target feature model. The high intensity of the SAR target is a prominent feature of SAR images. MOR maximizes the entropy of the model during the pruning process to retain the intensity information and diversity characteristics of the target feature channel, so that the pruned model retains the ability to enhance the extraction of SAR target intensity features. At the same time, MOR optimizes the accuracy, parameter amount, and computational complexity of the detector by constructing accuracy, parameter amount, and computational complexity losses. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0028] Figure 1 Schematic diagram of the dependency relationship between different convolutions in an embodiment of the present invention;

[0029] Figure 2 A schematic diagram of the RLAS framework of an embodiment of the present invention;

[0030] Figure 3 A schematic diagram of an update strategy according to an embodiment of the present invention;

[0031] Figure 4 Schematic diagram of the final model of the embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0034] Embodiment 1

[0035] The following will describe in detail the SAR ship target detection method based on the multi-task reinforcement learning automatic pruning method provided by the present invention in combination with this embodiment, and the steps include:

[0036] S1. Acquire a SAR image containing a target ship to be detected.

[0037] For ease of explanation, the present invention uses the public SSDD and HRSID data sets as the original data of this embodiment. These images have coherent speckle noise and poor visual separability of targets under complex backgrounds. Therefore, the detection method of this embodiment is used to detect the target ship.

[0038] Before detection, the image needs to be standardized, and then the SSDD dataset is divided into training set and test set in a ratio of 80%:20%; the HRSID dataset is divided into training set and test set in a ratio of 65%:35%.

[0039] S2. Design an automatic pruning method for multi-task reinforcement learning.

[0040] Firstly, a deep learning SAR target detection model network structure automatic grouping strategy GSP is designed. GSP is used to automatically analyze the network structure, and the network structure of the traditional SAR target detection model is coupled with the group. The same group of network structures has a unified pruning layout, and the grouping results are obtained. The grouping results are sorted according to the maximum entropy principle to achieve end-to-end full-link pruning of the SAR target detection model. Then the parameter quantity, calculation amount and entropy of each group of features in the grouping results are analyzed, and the state characteristics of each group of network structures in the grouping results are generated. Finally, the Actor generates a pruning strategy based on the state characteristics of each group of network structures, and then the Critic is used to evaluate the effect of the pruning strategy output by the Actor. The two continuously update the parameters through the adversarial training method, continuously prune and optimize the model, and finally select the optimal lightweight SAR target detection model.

[0041] The specific construction steps include:

[0042] S201. Based on the traditional SAR model target detection model, the network structure is grouped to obtain a grouping result.

[0043] First, the pre-trained traditional SAR target detection model is loaded, and GSP is used to automatically analyze the intricate connections between network structures in the deep learning SAR target detection model. Based on the analysis results, the mutually coupled network structures are divided into the same group to obtain the grouping results.

[0044] like Figure 1 As shown in the figure, there may be multiple dependencies between different convolution modules of the deep learning SAR target detection model, such as the input channel of Conv5 has dependencies with Conv3 and Conv4. When pruning Conv5 channels, the channels of Conv3 and Conv4 that have dependencies with it must be pruned according to a consistent pruning layout. Based on this, this embodiment proposes an automatic grouping strategy GSP to calculate the coupled channels of the network, and prunes the coupled channels consistently through a pruning strategy.

[0045] Given a network computation graph containing convolution (Conv), batch normalization (BN), ReLU and pooling (Pool) layers , the proposed layer grouping algorithm is used to find the coupling channels. First, the parent node of each Conv layer is found using depth-first search (DFS) Since channel pruning only affects the channel dimension, all layers except the Conv layer are ignored in the layer grouping process. Then, given the parent node of each layer, recursion is performed based on the dependency relationship; Figure 1As shown in the figure, there is a dependency between Conv5 and Conv4, and there is a dependency between Conv4 and Conv1, and it can be known that there is also a dependency between Conv5 and Conv1. Based on this, it can be known that when pruning channels of Conv5, Conv4 and Conv1 also need to be pruned according to the consistent pruning layout.

[0046] After obtaining the coupled channels through layer grouping, the overall entropy of the coupled channels is then calculated. First, the pixel values ​​of the feature map are uniformly mapped to This embodiment uses Representation feature map All elements are mapped from 0 to Integer:

[0047] , (1)

[0048] In the formula, It means that the pixel values ​​in the feature map are uniformly mapped to the integer range from 0 to K−1, which is a discretized integer; Round down; interval represents the width of dividing the pixel value range into K uniform intervals; Indicates taking the minimum value.

[0049] , (2)

[0050] In the formula, Indicates taking the maximum value; Represents the feature value at a specific position (a, b) in the feature map;

[0051] Therefore, according to the information entropy theory, the entropy of the jth feature map of the i-th convolutional layer can be calculated by formula (3): :

[0052] , (3)

[0053] In the formula, i represents a natural number; w i represents the weight associated with the i-th group of convolution; represents the size of the i-th group of convolution kernels; a represents the convolution feature map channel index; represents the conditional function, that is:

[0054] (4)

[0055] Different coupling channel groups contain channel features of different layers, and the amount of information contained in the deep feature map is usually less than that of the shallow feature. Therefore, it is unfair to directly sum and compare the entropy of the coupling channel groups. Therefore, this embodiment uses formula (5) to normalize the information entropy of each layer of feature map: :

[0056] , (5)

[0057] Where n i represents the i-th group of features.

[0058] S202. Based on the grouping results, a pruning strategy automatic search method of multi-task reinforcement learning (RLAS) is used to output a pruning strategy.

[0059] The RLAS framework is used to automatically output pruning strategies based on the state characteristics of each group of network structures in the grouping results, and the redundant channels of the network structure are pruned according to the pruning strategy; after pruning, the detection performance, sparsity and model entropy of the pruned SAR target detection model are used to obtain rewards to guide the RLAS update process. During the update process, by maximizing the entropy of the model channel and minimizing the number of model parameters and calculations, RLAS can adaptively adjust the sparsity and optimize the pruning strategy.

[0060] The following is a detailed introduction to the above RLAS framework:

[0061] (1) RLAS state space

[0062] The design of the state space determines the sensitivity of the pruning decision module to the state of the network structure in the SAR target detection model, which in turn affects the effectiveness of the pruning strategy search process. RLAS receives a feature vector s as input, which represents the state characteristics of the current network structure. The feature vector s is specifically expressed as follows:

[0063] , (6)

[0064] In the formula, Indicates the index of each group of network structures; the positions given by the network structures in the SAR target detection model are different; the parameter redundancy of the same network structure is not necessarily the same; Indicates the number of channels; express The number of parameters of the group network structure; Indicates the amount of parameters that have been pruned; express The computational effort of the group network structure; Indicates the amount of computation that has been pruned; express Entropy of the group network structure; Indicates the entropy of the pruned channel; Indicates the pruning rate of the previous set of network structures. Before being passed into RLAS, the data in the feature vector s will be normalized to between.

[0065] (2) RLAS Action Space

[0066] In the SAR target detection model, the sparsity of the network structure depends on the actions in the action space, which determines the amount of pruning for each layer. In traditional methods, the use of coarse-grained discrete space as the action space simplifies the search process, but it usually fails to achieve the desired effect due to the strong sensitivity of channel pruning to sparsity. On the contrary, although fine-grained discrete space can provide more accurate pruning decisions, it is difficult to effectively search for pruning strategies due to the large action space, which may cause the problem of a surge in the number of discrete actions.

[0067] To solve this problem, RLAS adopts a continuous action space approach, which allows for more fine-grained and precise model compression. Continuous action spaces allow agents to fine-tune over a wider range, rather than being limited to discrete pruning decisions, thereby maximizing compression while ensuring model performance. This approach not only improves the flexibility of pruning strategies, but also avoids the inefficient search problem caused by an overly large action space, making the pruning process more efficient.

[0068] S203. Use an entropy-based multi-task reward function to optimize the pruning strategy.

[0069] A multi-task reward function MOR based on entropy is constructed to guide RLAS to search for the optimal pruning strategy under the indicators of edge accuracy, sparsity and model channel entropy. Specifically, the reward function obtains rewards through the detection performance, sparsity and model entropy of the pruned SAR target detection model to guide the RLAS update process. During the update process, by maximizing the entropy of the model channel and minimizing the number of model parameters and computation, RLAS can adaptively adjust the sparsity and optimize the pruning strategy.

[0070] During the update process of RLAS search pruning strategy, RLAS performs channel pruning on the network structure in the deep learning SAR target detection model by outputting pruning strategy. After the network model pruning is completed, the pruned network model will pass rewards to RLAS, and the rewards represent the performance of the current behavior of RLAS. The purpose of model compression is not only to ensure accuracy, but also to ensure that the pruned SAR target detection model can be effectively deployed in edge devices. During the update period, in order to encourage RLAS to build a SAR target detection model with excellent performance and faster speed. This embodiment uses , , and As an important component of the multi-task reward function MOR.

[0071] The specific formula is as follows:

[0072] , (7)

[0073] in, Represents the accuracy of the SAR target detection model after pruning; represents the accuracy of the initial SAR target detection model; therefore This corresponds to the degradation of the mAP accuracy of the SAR target detection model.

[0074] The specific formula is as follows:

[0075] , (8)

[0076] in, Represents the number of parameters of the SAR target detection model after pruning; represents the number of parameters of the initial SAR target detection model; therefore Represents the sparsity of SAR target detection model parameters.

[0077] The specific formula is as follows:

[0078] , (9)

[0079] represents the computational effort of the SAR target detection model after pruning; represents the computational effort of the initial SAR target detection model; therefore Represents the computational sparsity of the SAR target detection model.

[0080] The specific formula is as follows:

[0081] , (10)

[0082] In the formula, represents the entropy of the initial SAR target detection model; represents the entropy of the SAR target detection model after pruning; therefore Represents the change in model entropy after pruning the SAR target detection model.

[0083] SARRLP uses the multi-task reward function MOR to guide RLAS to search for the optimal pruning strategy. The goal is to reduce as much as possible during the update while maximizing the model entropy. ,improve and .

[0084] In order to ensure that RLAS can take into account the accuracy of the network model, the sparsity of the number of parameters, and the sparsity of the amount of computation, and can have better scalability between their importance. The specific formula of the multi-task reward function MOR is as follows:

[0085] , (11)

[0086] in, , , , Respectively , , , The weight factor of .

[0087] During the search process, you can set the resource capacity and accuracy indicators of the edge device. , , and The importance between the network model accuracy, parameter sparsity, computational sparsity and model entropy is adjusted by the size of . SARRLP uses the multi-task reward function MOR to guide the RLAS update process, which can optimize the accuracy, parameter amount and computational amount of the SAR target detection model while retaining the extracted SAR intensity and diversified feature channels through model entropy.

[0088] S3. Based on the multi-task reinforcement learning automatic pruning method, the traditional SAR ship target detection model is improved to obtain the final model.

[0089] The multi-task reinforcement learning automatic pruning method is used to continuously update RLAS and repeatedly prune the SAR target detection model until the optimal pruning strategy is obtained; the SAR target detection model is pruned using the optimal pruning strategy, and the pruned network model is trained to complete convergence. While ensuring the performance indicators, a SAR target detection model (i.e., the final model) that adapts to the resource capacity of the edge device is obtained.

[0090] The structure and update process of the RLAS implemented in this embodiment will be described in detail below.

[0091] (1) Actor-Critic Network

[0092] like Figure 2As shown in Figure 3, the Actor network and Critic network of RLAS are both composed of three layers of MLP. As shown in Figure 3, the input of the Actor network is the network structure state feature vector, and the output represents the pruning strategy of the network structure. The input of the Critic network is the connection between the state feature vector and the pruning strategy, and the output represents the evaluation of the Actor network action.

[0093] This embodiment uses deep deterministic policy gradient DDPG to update RLAS. DDPG uses four networks during the update process: Actor network, Actor target network, Critic network, and Critic target network. The network structure of the Actor network and the Actor target network is the same, and the network structure of the Critic network and the Critic target network is the same. Its specific functions are as follows:

[0094] Actor network: First, in the process of collecting sample data, according to the current network structure status characteristics Output pruning strategy , used to interact with the environment to derive the next set of network structure state characteristics And rewards ; Second, responsible for the Actor network model Medium Parameters Iterative updates.

[0095] Critic network: First, responsible for calculating the current value Used to evaluate the pruning strategy of the Actor network output; second, responsible for the Critic network model Medium Parameters Iterative updates.

[0096] Actor target network: First, it is responsible for the next set of network structure state features sampled in the experience playback pool To output the optimal next set of network structure pruning strategies ; Second, regularly according to the parameters To update the Actor target network model Parameters in , the specific formula is as follows:

[0097] , (12)

[0098] in, Represents the update amplitude, which is a hyperparameter between 0 and 1. The smaller the value, the slower the update speed and the higher the stability of the update.

[0099] Critic target network: First, responsible for calculating the target value , the specific formula is as follows:

[0100] , (13)

[0101] in, Represents the sample data reward sampled from the experience replay pool; represents the discount factor; Indicates the target Value network.

[0102] Second, regularly according to the parameters To update the Critic target network model Parameters in , the specific formula is as follows:

[0103] , (14)

[0104] in, Indicates the update amplitude.

[0105] (2) Sample data

[0106] Since DDPG is updated through off-policy data, it is necessary to collect sample data and put it into the experience replay pool before updating. The specific process is as follows:

[0107] Step 1: SARRLP first models the network structure according to the dependency relationship in the SAR target detection model, divides the mutually coupled network structures into the same group, and obtains the groups of network structures that need to be pruned in the network model.

[0108] Step 2: Starting from the first set of network structures, provide the current state characteristics to the Actor network The Actor network then outputs the pruning strategy of the current network structure through state features In order to enhance the randomness of the update process, improve robustness and generalization ability, the pruning strategy Add random noise that follows truncated normal distribution. The specific formula is as follows:

[0109] , (15)

[0110] Among them, noise It will gradually decay during the update process; TN means truncated normal distribution.

[0111] Step 3: After completing the SAR target detection model pruning, fine-tune it immediately; then, the reward is calculated based on the accuracy and sparsity of the pruned network model. ; Finally, all sample data Put it into the experience replay pool.

[0112] (3) Update strategy

[0113] like Figure 3 As shown, the RLAS update strategy is shown. The specific process is as follows:

[0114] Step 1: Sample data from the experience replay pool ; Then the current state characteristics and pruning strategies Input into the Critic network to calculate the current value .

[0115] Step 2: The next state feature Input into the Actor target network to calculate the next optimal pruning strategy The specific formula is as follows:

[0116] , (16)

[0117] in, represents the policy function; Represents the parameters of the target policy network.

[0118] Step 3: Then add the state feature and pruning strategies At the same time, it is input into the Critic target network to calculate the target value , the specific formula is shown in formula (13).

[0119] Step 4: Based on the current value and goals value , and the loss of the Critic network is obtained , the specific formula is as follows:

[0120] , (17)

[0121] Next, the Critic network parameters to update.

[0122] Step 5: Based on the current value , and the Actor network loss is obtained , the specific formula is as follows:

[0123] , (18)

[0124] Next, the Actor network parameters to update.

[0125] Step 6: To improve the stability of the update, Actor target network parameters and Critic target network parameters All parameters are soft updated. That is, in the process of regular update, only a small part is updated in proportion. The specific formulas are shown in equations (12) and (14).

[0126] S4. Using the final model to detect the SAR image and identify the ships therein.

[0127] After the above steps, the improved final model is obtained, such as Figure 4 As shown in FIG. 4 , the final model is used to identify ships in SAR images.

[0128] Embodiment 2

[0129] The advantages of the present invention compared with the prior art will be described in detail below in conjunction with this embodiment.

[0130] In order to improve the actual deployment capability of the model, the present invention designs an automatic pruning method SARRLP of SAR target detector based on multi-task reinforcement learning from the perspective of model pruning. SARRLP can realize the optimal end-to-end full-link pruning of any deep learning SAR target detector according to the computing resources and accuracy indicators of the edge device. First, SARRLP groups the network structure of the SAR target detector through the network structure automatic grouping strategy GSP, and the network structure in the same group has a consistent pruning layout to realize the end-to-end full-link pruning of the SAR target detector; secondly, a method RLAS for automatic search of pruning strategies is designed, which can fully reflect the current network state by introducing indicators such as model accuracy, parameters, computational amount, entropy, etc. into the state space, and ensure the effectiveness of the pruning strategy search process; finally, a multi-task reward function MOR that maximizes the entropy of the SAR target feature model channel is designed. MOR retains the intensity information and diversity characteristics of the target feature channel by maximizing the entropy of the model during the pruning process, so that the pruned model retains the ability to enhance the extraction of SAR target intensity features. Using YOLOv5s as the baseline, the mAP50 reaches 98.1 and 93.0 on the SSDD and HRISD datasets with a pruning rate of 75%, respectively. Compared with the baseline YOLOv5s, the model parameters and computational complexity are reduced by 4 times, while the model accuracy is almost not lost, which shows the effectiveness of the proposed method.

[0131] This embodiment also provides two experiments to prove the above advantages.

[0132] Experiment 1:

[0133] This embodiment uses yolov5s as the benchmark model, and verifies the model parameter amount and model performance of different pruning rates on SSDD and HRSID data sets respectively. As shown in Table 1, this embodiment sets the pruning rate from 0 to 15% increments until 90%. Whether on SSDD or HRSID data, when the model pruning rate is below 60%, compared with the benchmark model yolov5s, the model accuracy and reasoning speed are improved, indicating that the method proposed in the present invention can effectively remove unimportant feature channels in the model. In addition, when the model pruning rate is 75%, the model accuracy is 98.1 on the SSDD data set, which is comparable to the performance of yolov5s, but the reasoning speed increases by nearly one time; the model accuracy is 93.0 on the HRSID data set, which is 0.4 less than yolov5s, and the reasoning speed increases by 106.2 pictures per second. Therefore, it can be considered that when the pruning rate of the model is 75%, the model size is greatly reduced while maintaining the accuracy, and the inference speed is greatly improved. At this time, a good balance is achieved between the model accuracy and speed. Therefore, this embodiment uses a pruning rate of 75% for performance comparison and model analysis experiments. It is worth noting that the percentage of model parameter reduction and the percentage of model FLOPs reduction are not uniform. The reason is that the pruned model channels are generally relatively weak channels, and the model calculation amount is low. For example, when the model pruning rate is 30%, the model FLOPs reduction may be about 20%.

[0134] Table 1

[0135] .

[0136] Embodiment 2:

[0137] In order to further verify whether the method proposed in the present invention effectively retains the channels for extracting SAR target intensity and diversified features from the features, we conducted a comparative experiment based on our method by retaining the maximum entropy and random entropy of the channels. The experimental results are shown in Table 2. This embodiment compares pruning models with pruning rates of 30%, 60% and 90% on the SSDD and HRSID data sets. It can be found that in the three pruning strategies, the accuracy of the model retaining the maximum entropy of the channel is generally higher than the accuracy of the model retaining the random entropy, and the performance of the pruning model based on the maximum entropy may exceed the benchmark model at a lower pruning rate, but the pruning model based on the random entropy lacks this effect. It shows that the pruning strategy based on the maximum entropy is conducive to the model retaining the channels that extract the SAR target intensity and diversified features, and these channels have a greater role in reasoning and detecting targets.

[0138] Table 2

[0139] .

[0140] Embodiment 3

[0141] This embodiment also provides a SAR ship target detection system based on a multi-task reinforcement learning automatic pruning method, including: an acquisition module, a design module, an optimization module and a recognition module;

[0142] Among them, the acquisition module is used to acquire SAR images containing target ships to be detected; the design module is used to design a multi-task reinforcement learning automatic pruning method, and the steps include: on the basis of the traditional SAR model target detection model, the network structure is grouped to obtain the grouping result; based on the grouping result, the pruning strategy automatic search method of multi-task reinforcement learning is adopted to output the pruning strategy; the entropy-based multi-task reward function is adopted to optimize the pruning strategy; the optimization module is used to improve the traditional SAR ship target detection model based on the multi-task reinforcement learning automatic pruning method to obtain the final model; the method includes: using the optimized pruning strategy to repeatedly prune the traditional SAR ship target detection model to obtain the optimal pruning strategy; pruning the SAR target detection model by the optimal pruning strategy, and training the pruned network model to obtain the final model; the recognition module is used to detect the SAR image using the final model to identify the ships therein.

[0143] Specifically, the workflow of the design module includes: first loading a pre-trained traditional SAR target detection model, automatically analyzing the intricate connections between network structures in the deep learning SAR target detection model through GSP, and dividing the mutually coupled network structures into the same group according to the analysis results to obtain the grouping results.

[0144] Afterwards, the RLAS framework is used to automatically output a pruning strategy according to the state characteristics of each group of network structures in the grouping results, and the redundant channels of the network structure are pruned according to the pruning strategy; after pruning, the detection performance, sparsity and model entropy of the pruned SAR target detection model are used to derive rewards to guide the RLAS update process; during the update process, RLAS optimizes the pruning strategy by maximizing the entropy of the model channel, minimizing the number of model parameters and the amount of calculation.

[0145] Afterwards, an entropy-based multi-task reward function MOR is constructed to guide RLAS to search for the optimal pruning strategy under the indicators of edge accuracy, sparsity and model channel entropy; the multi-task reward function MOR derives rewards through the detection performance, sparsity and model entropy of the pruned SAR target detection model to guide the RLAS update process.

[0146] The workflow of the optimization module includes: using a multi-task reinforcement learning automatic pruning method to continuously update the RLAS and repeatedly prune the SAR target detection model until the optimal pruning strategy is obtained; pruning the SAR target detection model through the optimal pruning strategy, and training the pruned network model to complete convergence to obtain the final model.

[0147] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. SAR ship target detection method based on multi-task reinforcement learning automatic pruning method, It is characterized in that the steps include: Acquire SAR images containing the target ship to be detected; A multi-task reinforcement learning automatic pruning method is designed, the steps of which include: grouping the network structure based on the traditional SAR model target detection model to obtain a grouping result; based on the grouping result, using a multi-task reinforcement learning pruning strategy automatic search method to output a pruning strategy; using an entropy-based multi-task reward function to optimize the pruning strategy; Based on the multi-task reinforcement learning automatic pruning method, the traditional SAR ship target detection model is improved to obtain the final model; the method includes: using the optimized pruning strategy to repeatedly prune the traditional SAR ship target detection model to obtain the optimal pruning strategy; the method for optimizing the pruning strategy includes: loading a pre-trained traditional SAR target detection model, automatically analyzing the intricate connections between network structures in the deep learning SAR target detection model through GSP, and dividing the mutually coupled network structures into the same group according to the analysis results to obtain the grouping results; using the RLAS framework to automatically output the pruning strategy according to the state characteristics of each group of network structures in the grouping results, and pruning the redundant channels of the network structure according to the pruning strategy; after the pruning is completed, the detection performance, sparsity and model entropy of the pruned SAR target detection model are used to obtain rewards to guide the RLAS update process; during the update process, RLAS optimizes the pruning strategy by maximizing the entropy of the model channel, minimizing the number of parameters and the amount of calculation of the model, and adaptively adjusting the sparsity; Pruning the SAR target detection model using the optimal pruning strategy, and training the pruned network model to obtain the final model; The final model is used to detect the SAR image and identify the ships therein.

2. According to claim 1, the SAR ship target detection method based on the multi-task reinforcement learning automatic pruning method, It is characterized in that An entropy-based multi-task reward function MOR is constructed to guide RLAS to search for the optimal pruning strategy under the indicators of edge accuracy, sparsity and model channel entropy. The multi-task reward function MOR derives rewards through the detection performance, sparsity and model entropy of the pruned SAR target detection model to guide the RLAS update process.

3. According to claim 1, the SAR ship target detection method based on multi-task reinforcement learning automatic pruning method, It is characterized in that A multi-task reinforcement learning automatic pruning method is used to continuously update the RLAS and repeatedly prune the SAR target detection model until an optimal pruning strategy is obtained; the SAR target detection model is pruned using the optimal pruning strategy, and the pruned network model is trained to complete convergence to obtain the final model.

4. A SAR ship target detection system based on a multi-task reinforcement learning automatic pruning method, wherein the system is used to implement the method described in any one of claims 1 to 3, It is characterized in that include: Acquisition module, design module, optimization module and recognition module; The acquisition module is used to acquire SAR images containing the target ship to be detected; The design module is used to design a multi-task reinforcement learning automatic pruning method, and the steps include: on the basis of a traditional SAR model target detection model, grouping the network structure to obtain a grouping result; based on the grouping result, using a multi-task reinforcement learning pruning strategy automatic search method to output a pruning strategy; using an entropy-based multi-task reward function to optimize the pruning strategy; The optimization module is used to improve the traditional SAR ship target detection model based on the multi-task reinforcement learning automatic pruning method to obtain a final model; the method includes: repeatedly pruning the traditional SAR ship target detection model using the optimized pruning strategy to obtain an optimal pruning strategy; pruning the SAR target detection model using the optimal pruning strategy, and training the pruned network model to obtain the final model; The recognition module is used to detect the SAR image using the final model and identify the ships therein.

5. According to claim 4, the SAR ship target detection system based on the multi-task reinforcement learning automatic pruning method, It is characterized in that The process of obtaining the grouping result includes: loading a pre-trained traditional SAR target detection model, automatically analyzing the intricate connections between network structures in the deep learning SAR target detection model through GSP, and dividing the mutually coupled network structures into the same group according to the analysis results to obtain the grouping result.

6. The SAR ship target detection system based on the multi-task reinforcement learning automatic pruning method according to claim 5, It is characterized in that The process of optimizing the pruning strategy includes: using the RLAS framework to automatically output a pruning strategy according to each group of network structure state characteristics in the grouping results, and pruning redundant channels of the network structure according to the pruning strategy; after pruning, the detection performance, sparsity and model entropy of the pruned SAR target detection model are used to derive rewards to guide the RLAS update process; during the update process, RLAS optimizes the pruning strategy by maximizing the entropy of the model channel, minimizing the number of model parameters and the amount of calculation, and adaptively adjusting the sparsity.