A ship target classification method for SAR images based on multi-task learning
SAR images are scale-enhanced through multi-task learning and scale-unified network, combined with cyclic attention convolution neural network and triple loss function, and the problem of difficult to distinguish small targets in SAR images is solved, significantly improving the classification effect of ship targets .
Patent Information
- Application Number
- CN202311039369.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-17
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2043-08-17
AI Technical Summary
The spatial resolution of small targets in SAR images is low, resulting in small differences between target classes and large differences within classes, making it difficult to learn discriminatory features, which limits the improvement of the algorithm's effect.
Using multi-task learning method, by building a scale unified network and discriminator network, small-objective images are scale-enhanced, and key areas and discriminatory features are learned by using cyclic attention convolution neural networks, combined with triple loss function increase Spacing between major categories and reduce spacing within categories.
It improves the amount of information and characteristics of small target images and improves the classification effect of ship targets.
Smart Images

Figure CN117152500B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a SAR image ship target classification method. Background Art
[0002] In recent years, with the rapid development of remote sensing technology, Synthetic Aperture Radar (SAR) has become one of the most important means of detecting and identifying maritime targets, and has been widely used in military, security, ocean monitoring and other fields. With the development of deep learning-related technologies, deep learning methods based on deep neural networks have been widely used to identify maritime targets in SAR images, achieving the best results to date. However, the large size variation of targets in SAR images, the low spatial resolution of small targets, and the lack of image information result in small inter-class differences and large intra-class differences among small targets, making it difficult for algorithms to learn class-related discriminative features, limiting the effectiveness and practical application of related algorithms.
[0003] To address this problem, using the attention mechanism to guide the model to focus on discriminative features is a more effective solution. For example, RACNN designs a recurrent attention method, which gradually learns the discriminative features most relevant to classification through the cycle of attention areas and classification (Jianlong Fu et al., Look Closer to See Better: Recurrent Attention Convolutional Neural Network for Fine-grained Image Recognition, CVPR 2017.). However, the small target image itself has weak signals, and the attention mechanism has poor detection capabilities for small target areas, resulting in a weak correlation between the extracted features and the small target area of interest, making it difficult for the learned features to effectively discriminate the target type. Therefore, how to enhance the information of small target images and guide the model to focus on the small target area of interest to better extract discriminative features is a technical problem that needs to be solved urgently. Summary of the Invention
[0004] The present invention proposes a ship target classification method for SAR images based on multi-task learning, which aims to solve the problem that the discriminative features of small targets at sea, such as ships, are difficult to learn due to low image resolution, and overcome the influence of scale differences on the classification of small targets.
[0005] The technical solutions of the present invention are as follows:
[0006] A SAR image ship target classification method based on multi-task learning. Step 1: Construct a classification dataset:
[0007] Images containing ship targets are acquired and labeled by type, resulting in a source domain dataset X and a target domain dataset Y with the same image pixel size. Ship targets smaller than a preset size are identified as small-sized targets, while ship targets larger than or equal to the preset size are identified as large-sized targets. The source domain dataset X contains all images consisting of both large-sized and small-sized target images, while the target domain dataset Y contains only large-sized target images.
[0008] Step 2: construct a feature learning network, which is used to obtain a feature map from the input image;
[0009] Step 3: construct a scale-unified network, which is used to reconstruct the image so that the size distribution of the target ships in the reconstructed image is aligned with the size distribution of the target ships in the target domain dataset Y image;
[0010] Step 4: Construct a discriminator network, which is used to distinguish between the image generated by the scale-unified network and the original image in the target domain dataset Y that has not been scaled, and output the discrimination result;
[0011] Step 5: Construct a fine-grained classification network. The fine-grained classification network is used to find key areas from the feature map output by the feature learning network, then crop and amplify the key areas to obtain fine-grained features, and then classify the ship target based on the fine-grained features.
[0012] Step 6: Train the model, including:
[0013] Step 6.1: Randomly select a training set Xtr from the source domain dataset X;
[0014] Step 6.2: Construct triplets from the training set Xtr and update the feature learning network and fine-grained classification network through triplet loss training.
[0015] Step 6.3: After the images of the source domain dataset X are processed by the feature learning network and the scale unification network, they are mixed with the images of the target domain dataset Y and input into the discriminator network for discrimination. The feature learning network, scale unification network, and discriminator network are updated based on the discrimination results.
[0016] Repeat steps 6.2 and 6.3 until the number of training times is reached;
[0017] Step 7: Use the updated feature learning network and fine-grained classification network to classify ship targets: input the SAR image into the feature learning network to obtain a feature map, and then input the feature map into the fine-grained classification network to obtain the classification result.
[0018] As a further improvement of the SAR image ship target classification method based on multi-task learning, step 1 specifically includes:
[0019] Step 1.1, collect the target SAR image, detect the ship target in the image, and obtain a detection frame with a length of l and a width of w; for the diagonal length of the detection frame For ship targets smaller than or equal to 64 pixels, the center of the detection frame is used as the cutting center, and a 64×64 pixel block is vertically cut as the collected image; For ship targets larger than 64 pixels, the center of the detection frame is used as the cutting center and the target is cut vertically. The pixel blocks of size are taken as the collected images;
[0020] Step 1.2: Label the ship targets in all the images collected in step 1.1, and obtain the <image, type> data pairs of the ship targets to form the initial source domain dataset X_0;
[0021] Step 1.3: Filter out images with ship target length l ≥ 50 in the initial source domain dataset X_0 and construct the initial target domain dataset Y_0;
[0022] Step 1.4: All images of ship targets with length l>64 in the initial source domain dataset X_0 and the initial target domain dataset Y_0 are uniformly resized to 64×64 pixels using the bicubic interpolation method to obtain the source domain dataset X and the target domain dataset Y.
[0023] As a further improvement of the SAR image ship target classification method based on multi-task learning: the feature learning network is a Wide ResNet network.
[0024] As a further improvement of the SAR image ship target classification method based on multi-task learning: the scale unified network includes three decoding modules and one convolutional layer connected in sequence, wherein the decoding module is composed of one deconvolution layer DeConv and two convolutional layers Conv.
[0025] As a further improvement of the SAR image ship target classification method based on multi-task learning: the discriminator network includes three decoding modules, one convolutional layer and one fully connected layer connected in sequence, and each decoding module uses 64, 128, and 256 convolution kernels in sequence.
[0026] As a further improvement of the SAR image ship target classification method based on multi-task learning: the fine-grained classification network includes a global classification subnetwork, a local classification subnetwork and an attention proposal subnetwork;
[0027] The feature map output by the feature learning network is input into the global classification sub-network to obtain the global category recognition result. The features learned by the global classification sub-network are then input into the attention suggestion sub-network to obtain the position of the key area. The key area is then cropped from the feature map output by the feature learning network and enlarged to the same size as the feature map output by the feature learning network through cubic linear interpolation. It is then input into the local classification sub-network to obtain the classification result.
[0028] As a further improvement of the SAR image ship target classification method based on multi-task learning: the global classification subnetwork and the local classification subnetwork both adopt the Wide ResNet network structure.
[0029] As a further improvement to the multi-task learning-based SAR image ship target classification method: in step 6.2, n sample blocks in the form of triples are selected from the training set Xtr, each sample block includes an anchor sample, a positive sample, and a negative sample;
[0030] The sample blocks are sequentially fed into the feature learning network and the fine-grained classification network. Then, for each sample block, the loss value J is calculated as follows. Then, with the goal of minimizing the loss value J, the feature learning network and the fine-grained classification network are optimized and updated:
[0031]
[0032]
[0033]
[0034] J=λ1L cls +λ2L rank +λ3L triplet ;
[0035] Among them, L cls is the classification loss function value, L CE is the cross entropy loss function, is the type predicted by the i-th classification subnetwork for sample j. When i=1, it represents the global classification subnetwork, when i=2, it represents the local classification subnetwork, when j=a, it represents the anchor sample, when j=p, it represents the positive sample, and when j=n, it represents the negative sample. is the true type of sample j; L rank is the ranking loss function value, is the type probability value predicted by the i-th classification subnetwork for sample j, m1 is the interval hyperparameter; L triplet is the triple loss function value, d is the function for solving the Euclidean distance, is the feature vector extracted by the i-th classification sub-network for sample j, m2 is the interval hyperparameter; λ1, λ2, and λ3 are the weight hyperparameters of the three loss functions.
[0036] As a further improvement of the SAR image ship target classification method based on multi-task learning: the specific steps of step 6.2 are: select m samples from the source domain dataset X: {X k}, k = 1, 2, ..., m, the m samples are input into the feature learning network and the scale unification network in sequence, and m pseudo images {X′ k}, then m pseudo images and m randomly selected samples from the target domain dataset Y are combined into m sample blocks <X′ k , Y k >, then input the m sample blocks into the discriminator network for authenticity discrimination, and calculate the adversarial loss value L based on the discrimination results D :
[0037]
[0038] Among them, the result values of functions F, G, and D represent the output results of feature learning network, scale unification network, and discriminator network respectively. G(F(X k )) is the corresponding X′ k ;
[0039] Then, according to L D Update the feature learning network, scale unification network, and discriminator network.
[0040] As a further improvement to the multi-task learning-based SAR image ship target classification method, when training the model, the source domain dataset X is divided into a training set Xtr and a test dataset Xte. The training set Xtr is used to train the feature learning network and the fine-grained classification network, and the source domain dataset X and the target domain dataset Y are used to train the feature learning network, the scale unification network, and the discriminator network. After the model is trained, the images in the test dataset Xte are sequentially input into the feature learning network and the fine-grained classification network.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] The present invention uses a scale-unified network and a discriminator network to align low-resolution small target images with high-resolution large target images through adversarial training, and increases the information content of small target images. At the same time, it learns key areas and discriminative features based on a recurrent attention convolutional neural network, and uses a triplet loss function to increase the inter-class spacing and reduce the intra-class spacing, further improving the discriminability of features, thereby achieving better classification results.
[0043] Specifically:
[0044] (1) The present invention prepares for subsequent resolution enhancement by constructing a source domain dataset X with a wide distribution of object sizes and a target domain dataset Y with large object sizes and concentrated distribution.
[0045] (2) By constructing a feature learning network, a scale unification network and a discriminator network, the present invention can generate corresponding target domain images with larger target sizes and concentrated distribution based on source domain images with a wide target size distribution, which can not only increase the size of small-sized ship targets, but also achieve the uniformity of target size distribution.
[0046] (3) The present invention constructs a feature learning network and a fine-grained classification network, and uses a recurrent attention method to achieve fine-grained classification of the input image.
[0047] (4) The present invention as a whole uses a feature learning network as the backbone, and a scale-unified network and a fine-grained classification network as two branches, forming a multi-task learning network. Through the iterative optimization of the scale-unified network and the fine-grained classification network, the scale-unified network can be used to map small-sized ships to large-sized ones to increase the detailed information of small target ships. The optimization of the fine-grained classification network can also prompt the feature learning network to learn fine-grained features that are suitable for classification. Finally, through the joint optimization of the two branches, the fine-grained classification effect of ship targets is improved from both the data and model perspectives. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is the overall framework diagram of the present invention;
[0049] Figure 2 A schematic diagram of the process of detecting, cropping and resizing the original image;
[0050] Figure 3 This is a diagram of the feature learning network framework constructed by the present invention;
[0051] Figure 4 This is a diagram of the scale-unified network framework constructed by the present invention;
[0052] Figure 5 Diagram of the discriminator network framework constructed for the present invention;
[0053] Figure 6 This is a diagram of the fine-grained classification network framework constructed by the present invention. DETAILED DESCRIPTION
[0054] The technical solution of the present invention is described in detail below with reference to the accompanying drawings:
[0055] like Figure 1 A SAR image ship target classification method based on multi-task learning includes the following steps:
[0056] Step 1: Build a classification dataset:
[0057] Images containing ship targets are acquired and labeled by type, resulting in a source domain dataset X and a target domain dataset Y with the same pixel size. Ship targets smaller than a preset size are identified as small targets, while those larger than or equal to the preset size are identified as large targets. The source domain dataset X contains all images consisting of both large and small target images, while the target domain dataset Y contains only large target images.
[0058] Specifically, such as Figure 2 :
[0059] Step 1.1, collect the target SAR image, use the target detection method such as Yolo to detect the ship target in the image, and obtain a detection frame with a length of l and a width of w; for the diagonal length of the detection frame For ship targets smaller than or equal to 64 pixels, the center of the detection frame is used as the cutting center, and a 64×64 pixel block is vertically cut as the collected image; For ship targets larger than 64 pixels, the center of the detection frame is used as the cutting center and the target is cut vertically. The pixel blocks of size are taken as the collected images.
[0060] Step 1.2: Label the ship targets in all the images collected in step 1.1 to obtain the <image, type> data pairs for the ship targets, which constitute the initial source domain dataset X_0. Alternatively, you can directly use the SAR image ship target classification dataset to construct the initial source domain dataset X_0.
[0061] Step 1.3: Filter out images of ship targets with length l ≥ 50 (i.e., large-size targets) in the initial source domain dataset X_0 to construct the initial target domain dataset Y_0.
[0062] Step 1.4: All images of ship targets with length l>64 in the initial source domain dataset X_0 and the initial target domain dataset Y_0 are uniformly resized to 64×64 pixels using the bicubic interpolation method to obtain the source domain dataset X and the target domain dataset Y.
[0063] Step 2: Construct a feature learning network, which is used to obtain a feature map from the input image.
[0064] Specifically, such as Figure 3The feature learning network is a Wide ResNet. The designed network consists of two encoding modules and one convolutional layer. The encoding module consists of three convolutional layers, Conv, where Conv(k,s,n) represents a convolution operation with a kernel size of k×k, a stride of s, and n kernels. To enhance information transfer, the output of the first convolutional layer in the encoding module is concatenated with the output of the last convolutional layer, ultimately obtaining an 8×8×256 feature map f.
[0065] Step 3: Construct a scale-unified network. The scale-unified network is used to reconstruct the image and generate an image X' so that the size distribution of the target ships in the reconstructed image is aligned with the size distribution of the target ships in the target domain dataset Y image.
[0066] Small-scale ship targets contain little information and their sizes vary widely in the captured images, hindering subsequent fine-grained classification tasks. To enrich the information in small-scale images and unify the scales of different ship targets, thereby helping the classification network more robustly learn discriminative features, a scale unification network G is designed to reconstruct input images containing ship targets of varying sizes into images containing large targets of similar size. This network takes as input the feature map f learned by the feature learning network and outputs a generated image X' of size 64×64. Combined with the discriminator network designed in step 4, the distribution of ship target sizes in the generated image X' is aligned with the distribution of ship target sizes in the target domain image Y constructed in step 1. Since the ship target length l ≥ 50 in the target domain dataset Y constructed in step 1, after the training network aligns the generated image X' with the target domain dataset Y, the inconsistent ship targets in the source domain dataset X are unified to a size l ≥ 50, and the size of small targets is also increased to this size.
[0067] Specifically, such as Figure 4 The scale-unified network includes three decoding modules and one convolutional layer connected in sequence, wherein the decoding module consists of one deconvolution layer DeConv and two convolutional layers Conv. Both the deconvolution layer and the convolution layer contain three parameters (k, s, n), where k is the convolution kernel size, s is the step size, and n is the number of convolution kernels. In order to enhance the complementarity of features in different layers, a cross-layer connection is added after the deconvolution layer, and the output of the deconvolution layer is spliced with the output of the two convolution layers and then input into the next decoding module. The convolution kernel size k = 3 and the step size s = 1 used by the three decoding modules are respectively set to 256, 128, and 64 for each module. The number of convolution kernels of the last convolution layer of the network is 1, and the generated image X' containing large-sized targets is finally obtained.
[0068] Step 4: Construct a discriminator network, which is used to distinguish between the image generated by the scale-unified network and the original image in the target domain dataset Y that has not been scale-unified, and output the discrimination result.
[0069] Because the length of the ship objects in the target domain dataset Y is l ≥ 50, while the ship objects in the source domain dataset X vary in size, the generated image X' differs from the real image Y in terms of both image quality and object size. Therefore, the discriminator is used for training optimization. When equilibrium is reached and training is complete, the size of the ship objects in the image X' generated by the scale-unified network is increased to be similar to that in Y, thus achieving scale unification.
[0070] Specifically, such as Figure 5 The discriminator network contains three decoding modules, one convolutional layer and one fully connected layer connected in sequence. Each decoding module uses 64, 128 and 256 convolution kernels in sequence.
[0071] Step 5: Construct a fine-grained classification network. The fine-grained classification network is used to find the location of the key area from the feature map output by the feature learning network, then crop the key area and enlarge it to obtain fine-grained features, and then obtain the classification of the ship target based on the fine-grained features.
[0072] Specifically, such as Figure 6 The fine-grained classification network includes a global classification subnetwork, a local classification subnetwork, and an attention proposal subnetwork. Both the global classification subnetwork and the local classification subnetwork adopt the Wide ResNet network structure.
[0073] The feature map output by the feature learning network is input into the global classification subnetwork to obtain the global category recognition result. The features learned by the global classification subnetwork are then input into the attention suggestion subnetwork to obtain the key area. The key area is then cropped from the feature map output by the feature learning network and enlarged to the same size as the feature map output by the feature learning network through cubic linear interpolation. It is then input into the local classification subnetwork to obtain the classification result.
[0074] Step 6: Train the model. The multi-task model designed in this paper includes two branches: classification and scale unification. Therefore, different data are used to train each branch separately. Specifically, the training set Xtr and corresponding type labels are used to train the feature learning network and the fine-grained classification network to achieve fine-grained classification of the input image. The source domain dataset X and the target domain dataset Y are used to train the feature learning network, the scale unification network, and the discrimination network to increase the size of small objects and unify ships with large size differences in X to ships of similar size.
[0075] In this example, Adam is used as the model optimizer, the learning rate is set to 0.0002, the batch size is m = 128, the number of training times is set to epoch = 500, and the two task branch models are trained cyclically according to the following steps:
[0076] Step 6.1: Randomly divide the source domain dataset X into an 80% training set Xtr and a 20% test dataset Xte.
[0077] Step 6.2: Construct triplets from the training set Xtr and update the feature learning network and fine-grained classification network through triplet loss training.
[0078] Specifically, n sample blocks in the form of triples are selected from the training set Xtr, and each sample block includes an anchor sample, a positive sample, and a negative sample.
[0079] The sample blocks are sequentially fed into the feature learning network and the fine-grained classification network. Then, for each sample block, the loss value J is calculated as follows. Then, with the goal of minimizing the loss value J, the feature learning network and the fine-grained classification network are optimized and updated:
[0080]
[0081]
[0082]
[0083] J=λ1L cls +λ2L rank +λ3L triplet ;
[0084] Among them, L cls is the classification loss function value, L CE is the cross entropy loss function, is the type predicted by the i-th classification subnetwork for sample j. When i=1, it represents the global classification subnetwork, when i=2, it represents the local classification subnetwork, when j=a, it represents the anchor sample, when j=p, it represents the positive sample, and when j=n, it represents the negative sample. is the true type of sample j; L rank is the ranking loss function value, is the type probability value predicted by the i-th classification subnetwork for sample j, m1 is the interval hyperparameter; L triplet is the triple loss function value, d is the function for solving the Euclidean distance, is the feature vector extracted by the i-th classification sub-network for sample j, m2 is the interval hyperparameter; λ1, λ2, and λ3 are the weight hyperparameters of the three loss functions, and are all 1 in this embodiment.
[0085] Step 6.3: After the images of the source domain dataset X are processed by the feature learning network and the scale unification network in sequence, they are confused with the images in the target domain dataset Y and input into the discriminator network for discrimination. The feature learning network, scale unification network, and discriminator network are updated according to the discrimination results.
[0086] Specifically, m samples are selected from the source domain dataset X: {X k}, k = 1, 2, ..., m, the m samples are input into the feature learning network and the scale unification network in sequence, and m pseudo images {X′ k}, then m pseudo images and m randomly selected samples from the target domain dataset Y are combined into m sample blocks <X′ k , Y k >, then input the m sample blocks into the discriminator network for authenticity discrimination, and calculate the adversarial loss value L based on the discrimination results D :
[0087]
[0088] Among them, the result values of functions F, G, and D represent the output results of feature learning network, scale unification network, and discriminator network respectively. G(F(X k )) is the corresponding X′ k .
[0089] Then, according to L D Update the feature learning network, scale unification network, and discriminator network.
[0090] Repeat steps 6.2 and 6.3 until the number of training times is reached.
[0091] After training the model, the images in the test dataset Xte are input into the feature learning network and the fine-grained classification network in sequence.
[0092] Step 7: Use the updated feature learning network and fine-grained classification network to classify ship targets: input the SAR image into the feature learning network to obtain a feature map, and then input the feature map into the fine-grained classification network to obtain the classification result.
Claims
1. A SAR image ship target classification method based on multi-task learning, characterized in that The following steps are involved: Step 1: Build a classification dataset: An image containing a ship target is acquired and the image is labeled for type, so as to obtain a source domain dataset X and a target domain dataset Y with the same image pixel size; a ship target smaller than a preset size value is positioned as a small-size target, and a ship target greater than or equal to a preset size value is positioned as a large-size target; the source domain dataset X contains all images consisting of large-size target images and small-size target images, and the target domain dataset Y contains only large-size target images; Step 1 specifically includes: Step 1.1, collect the target SAR image, detect the ship target in the image, and obtain a detection frame with a length of l and a width of w; for the diagonal length of the detection frame For ship targets with a size of less than or equal to 64 pixels, the center of the detection frame is used as the cutting center, and a 64×64 pixel block is vertically cut as the collected image; For ship targets larger than 64 pixels, the center of the detection frame is used as the cutting center and the target is cut vertically. The pixel blocks of size are taken as the collected images; Step 1.2, label the ship targets in all the images collected in step 1.1 respectively, and obtain the <image, type> data pairs of the ship targets to form the initial source domain data set X_0; Step 1.3, filter out images with ship target length l ≥ 50 in the initial source domain dataset X_0, and construct the initial target domain dataset Y_0; Step 1.4, all images of ship targets with length l>64 in the initial source domain dataset X_0 and the initial target domain dataset Y_0 are uniformly resized to 64×64 pixels using the bicubic interpolation method, thereby obtaining the source domain dataset X and the target domain dataset Y; Step 2: construct a feature learning network, wherein the feature learning network is used to obtain a feature map from an input image; Step 3: construct a scale-unified network, wherein the scale-unified network is used to reconstruct the image so that the size distribution of the target ship in the reconstructed image is aligned with the size distribution of the target ship in the target domain dataset Y image; Step 4: construct a discriminator network, which is used to discriminate between the image generated by the scale-unified network and the original image in the target domain dataset Y that has not been scale-unified, and output the discrimination result; Step 5: construct a fine-grained classification network, which is used to find the key area from the feature map output by the feature learning network, then cut out the key area and enlarge it to obtain fine-grained features, and then obtain the classification of the ship target according to the fine-grained features; Step 6: Training the model, including: Step 6.1, randomly select a training set Xtr from the source domain dataset X; Step 6.2: Construct triplets from the training set Xtr, and update the feature learning network and the fine-grained classification network by triplet loss training; Step 6.3, after the images of the source domain dataset X are processed by the feature learning network and the scale unification network in turn, they are confused with the images in the target domain dataset Y and input into the discriminator network for discrimination, and the feature learning network, the scale unification network and the discriminator network are updated according to the discrimination results; Repeat steps 6.2 and 6.3 until the number of training times is reached; Step 7: Use the updated feature learning network and fine-grained classification network to classify ship targets: input the SAR image into the feature learning network to obtain a feature map, and then input the feature map into the fine-grained classification network to obtain the classification result.
2. The SAR image ship target classification method based on multi-task learning as claimed in claim 1, characterized in that: The feature learning network is a Wide ResNet network.
3. The SAR image ship target classification method based on multi-task learning as claimed in claim 1, characterized in that: The scale-unified network includes three decoding modules and one convolutional layer connected in sequence, wherein the decoding module is composed of one deconvolutional layer DeConv and two convolutional layers Conv.
4. The SAR image ship target classification method based on multi-task learning as claimed in claim 1, characterized in that: The discriminator network includes three decoding modules, one convolutional layer and one fully connected layer connected in sequence, and each decoding module uses 64, 128, and 256 convolution kernels in sequence.
5. The SAR image ship target classification method based on multi-task learning as claimed in claim 1, characterized in that: The fine-grained classification network includes a global classification subnetwork, a local classification subnetwork and an attention proposal subnetwork; The feature map output by the feature learning network is input into the global classification subnetwork to obtain the global category recognition result. The features learned by the global classification subnetwork are then input into the attention suggestion subnetwork to obtain the position of the key area. The key area is then cropped from the feature map output by the feature learning network and enlarged to the same size as the feature map output by the feature learning network through cubic linear interpolation. It is then input into the local classification subnetwork to obtain the classification result.
6. The SAR image ship target classification method based on multi-task learning as claimed in claim 5, characterized in that: The global classification subnetwork and the local classification subnetwork both adopt the Wide ResNet network structure.
7. The SAR image ship target classification method based on multi-task learning as claimed in claim 5, characterized in that: In step 6.2, n sample blocks in the form of triples are selected from the training set Xtr, each of which includes an anchor sample, a positive sample, and a negative sample; the sample blocks are sent to the feature learning network and the fine-grained classification network in turn, and then for each sample block, the loss value J is calculated in the following way, and then the feature learning network and the fine-grained classification network are optimized and updated with the goal of minimizing the loss value J: J=λ1L cls +λ2L rank +λ3L triplet ; Among them, L cls is the classification loss function value, L CE is the cross entropy loss function, is the type predicted by the i-th classification subnetwork for sample j. When i=1, it represents the global classification subnetwork; when i=2, it represents the local classification subnetwork; when j=a, it represents the anchor sample; when j=p, it represents the positive sample; when j=n, it represents the negative sample. is the true type of sample j; L rank is the ranking loss function value, is the type probability value predicted by the i-th classification subnetwork for sample j, m1 is the interval hyperparameter; L triplet is the triple loss function value, d is the function for solving the Euclidean distance, is the feature vector extracted by the i-th classification sub-network for sample j, m2 is the interval hyperparameter; λ1, λ2, λ3 are the weight hyperparameters of the three loss functions.
8. The SAR image ship target classification method based on multi-task learning as claimed in claim 1, characterized in that: The specific steps of step 6.2 are: select m samples from the source domain dataset X: {X k }, k = 1, 2, ..., m, and the m samples are input into the feature learning network and the scale unification network in turn to obtain m pseudo images {X′ k }, then m pseudo images and m randomly selected samples from the target domain dataset Y are combined into m sample blocks <X′ k , Y k >, then input the m sample blocks into the discriminator network for authenticity discrimination, and calculate the adversarial loss value L based on the discrimination results D : Among them, the result values of functions F, G, and D represent the output results of the feature learning network, the scale unification network, and the discriminator network, respectively. G(F(X k )) is the corresponding X′ k ; Then, according to L D Update the feature learning network, scale unification network, and discriminator network.
9. The SAR image ship target classification method based on multi-task learning according to any one of claims 1 to 8, characterized in that: When training the model, the source domain dataset X is divided into a training set Xtr and a test dataset Xte. The training set Xtr is used to train the feature learning network and the fine-grained classification network. The source domain dataset X and the target domain dataset Y are used to train the feature learning network, the scale unification network, and the discriminator network. After training the model, the images in the test dataset Xte are input into the feature learning network and the fine-grained classification network in sequence.
