A method for ship target individual recognition based on feature decoupling
By introducing a feature decoupling method in the identification of individuals in ship targets, using a multi-scale feature learning module and a category feature decoupling module, the problem of low recognition accuracy in the prior art is solved, and the recognition effect of individual recognition from a longer distance and high accuracy is achieved.
Patent Information
- Application Number
- CN202411272830.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-09-11
AI Technical Summary
In the prior art, in the identification of individual targets of ships, it is difficult to increase the characteristic differences between different identity samples and reduce the characteristic differences between identical identity samples, resulting in low recognition accuracy and difficult to realize individual recognition based on the appearance characteristics of ships from a longer distance.
A ship target individual recognition method based on feature decoupling is proposed. By constructing multiple sample data blocks and individual recognition models, multi-scale feature learning modules and category feature decoupling modules are used to enhance feature differences and improve recognition accuracy.
The individual recognition based on the shape characteristics of the ship from a longer distance is achieved, which significantly improves the accuracy of the identification of the target individual in the ship, increases the characteristic differences between different identity samples, and reduces the characteristic differences between the same identity samples.
Smart Images

Figure CN119091225B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer technology, and in particular relates to a method for identifying a ship target identity. Background Art
[0002] Image-based ship target analysis is one of the research hotspots in the field of machine learning. At present, the research on related methods mainly focuses on image-based ship target detection and category recognition, and pays less attention to individual recognition tasks. A few methods are mainly based on the analysis and recognition of target visual features, but these methods are time-consuming and have low accuracy. With the development of deep learning technology, ship target recognition methods based on convolutional neural networks have gradually attracted more attention. Some studies have introduced deep learning methods into the recognition of individual ship targets. For example, the Chinese invention patent application "A method and system for intelligent recognition of ship identity integrating category features" with publication number CN112232269A produced a data set containing ship name image samples, and used the data set to train the twin network, which can achieve accurate matching and recognition of ship name information. This method is based on the recognition of hull number text, so it needs to collect hull number images at close range, and does not pay attention to the information of the hull image itself, and has a narrow application range. The Chinese invention patent application "An Image-Based Intelligent Ship Identification Method" with publication number CN114519669A proposes to reconstruct the target image and realize the individual identification of the ship target based on the reconstructed image. This method mainly focuses on the process design of individual identification, and does not focus on how to design algorithms to improve the accuracy of individual identification. Due to the slender shape of the hull, the images taken at different angles are quite different, which increases the feature difference of the same sample and reduces the feature difference of different samples, resulting in reduced distinguishability. Therefore, this method needs to adjust the direction of the image acquisition device during the image reconstruction process so that the target hull is in a specific position in the image, which has great limitations in practical applications.
[0003] Therefore, how to increase the feature differences between samples with different identities, reduce the feature differences between samples with the same identity, improve the accuracy of individual identification of ship targets, and realize individual identification based on ship appearance characteristics from a long distance is a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention proposes a method for identifying individual ship targets based on feature decoupling, the purpose of which is to increase the feature differences between samples with different identities, reduce the feature differences between samples with the same identity, improve the accuracy of individual ship target identification, and realize individual identification based on ship appearance features from a long distance.
[0005] The technical solution of the present invention is as follows:
[0006] A method for identifying individual ship targets based on feature decoupling, the steps are as follows:
[0007] Step 1: construct multiple sample data blocks;
[0008] The construction rule of the sample data block is as follows: each sample data block contains two sample pairs, and the sample pair contains a database image and a real sample image; for the two sample pairs, the ship in the database image of the first sample pair has the same identity as the ship in the real sample image, the ship in the database image of the second sample pair has a different identity from the ship in the real sample image, and the ship in the database image of the first sample pair has the same identity as the ship in the database image of the second sample pair;
[0009] Step 2: Construct an individual recognition model;
[0010] The individual recognition model includes two parallel, weight-sharing multi-scale feature learning modules and two parallel category feature decoupling modules, and an identity fusion recognition module;
[0011] The category feature decoupling module includes two parallel branches, namely a category feature learning branch and an identity feature learning branch;
[0012] One of the multi-scale feature learning modules is used to input the real image in the sample pair, and its output features are reshaped and then input into one of the category feature decoupling modules;
[0013] Another multi-scale feature learning module is used to input the database image in the sample pair, and its output features are reshaped and then input into another category feature decoupling module;
[0014] The outputs of the two category feature decoupling modules are simultaneously input into the identity fusion recognition module to obtain the identity similarity and difference prediction values of the input sample pairs containing the real image and the database image;
[0015] Step 3: Perform model training;
[0016] Inputting the sample data block into the individual recognition model, and training the individual recognition model according to the output result of the individual recognition model;
[0017] Step 4: For each image in the database, the category feature D6 and the identity feature D8 are extracted through the multi-scale feature learning module and the category feature decoupling module. For the image to be identified, the category feature D2 and the identity feature D4 are extracted through the multi-scale feature learning module and the category feature decoupling module. Then, D2 and D4 are grouped with the features D6 and D8 extracted from different images in the database and input into the trained identity fusion recognition module respectively. According to the output result of the identity fusion recognition module, it is determined whether the identity of the image to be identified is consistent with the identity of each database image, and then the individual recognition result of the image to be identified is obtained.
[0018] As a further improvement of the ship target individual identification method, the specific method of step 1 is as follows:
[0019] Step 1.1, collect SAR ship target images, and uniformly crop the target images into a specified size using the bicubic interpolation method;
[0020] Step 1.2: Expand the training data to balance the number of images of different categories.
[0021] Step 1.3: Construct a sample data block that complies with the construction rules by random sampling.
[0022] As a further improvement of the ship target individual recognition method: the multi-scale feature learning module includes a feature extraction module, a deep-to-shallow fusion network and a shallow-to-deep fusion network;
[0023] The feature extraction module sequentially performs 4 layers of convolution operations, and the height and width of the feature graph output by the 4 layers of convolution operations gradually decrease, and the depth gradually increases; the outputs of the 4 layers of convolution operations are A1, A2, A3 and A4 respectively;
[0024] The deep-to-shallow fusion network is composed of four fusion layers connected in sequence. Suppose the outputs of the four fusion layers are B1, B2, B3 and B4 respectively:
[0025] ;
[0026] express After a layer of convolution kernel is 1×1, step size =1 is the result of the conv convolution operation of the convolutional layer;
[0027] express After a layer of convolution kernel is 1×1, step size = 1, the result after the conv convolution operation of the convolution layer is the same as Add element by element;
[0028] The shallow-to-deep fusion network is composed of four fusion layers connected in sequence. Suppose the outputs of the four fusion layers are C1, C2, C3 and C4 respectively:
[0029] ;
[0030] express After a layer of convolution kernel is 1×1, step size =1 is the result of the conv convolution operation of the convolutional layer;
[0031] express After a layer of convolution kernel is 1×1, step size = 1, the result after the conv convolution operation of the convolution layer is the same as Add element by element;
[0032] C4 is the output of the multi-scale feature learning module.
[0033] As a further improvement of the ship target individual recognition method: in the reshape process, the features output by the multi-scale feature learning module are expanded into vectors;
[0034] The category feature learning branch includes two first fully connected layers and second fully connected layers connected in sequence; the number of nodes in the first fully connected layer is the total number of ship categories N, which is used for category prediction; the second fully connected layer is used to integrate the category information extracted by the first fully connected layer into the subsequent identity fusion recognition module;
[0035] The identity feature learning branch includes two sequentially connected third fully connected layers and fourth fully connected layers, which are used to obtain identity feature information from the vector obtained by reshaping and pass it to the subsequent identity fusion recognition module.
[0036] As a further improvement of the ship target individual recognition method, the output of the multi-scale feature learning module of the input real-time image is assumed to be ,The output of the multi-scale feature learning module of the input database image is ;
[0037] The output of the first fully connected layer corresponding to the input is D1, the output of the second fully connected layer corresponding to the input is D2, the output of the third fully connected layer is D3, and the output of the fourth fully connected layer is D4;
[0038] The output of the first fully connected layer corresponding to the input is D5, the output of the second fully connected layer corresponding to the input is D6, the output of the third fully connected layer is D7, and the output of the fourth fully connected layer is D8;
[0039] The identity fusion recognition module includes a fusion layer, a feature learning convolution layer and a fifth fully connected layer connected in sequence; the fusion layer is used to splice D2, D4, D6 and D8 into a result E1, and the feature learning convolution layer obtains an output result E2 containing the identity features of the two input images and related information of the distance between the identity features based on E1; the fifth fully connected layer outputs a binary classification result E3 based on E2, that is, the identity difference prediction value.
[0040] As a further improvement of the method for identifying individual ship targets, step 3 includes:
[0041] Step 3.1, the corresponding multi-scale feature learning module and the category feature learning branch of the category feature decoupling module constitute a classifier; the real image and the database image are respectively input into the two parallel classifiers above to obtain corresponding outputs D1 and D5, which are the category prediction results of the real image and the category prediction results of the database image respectively;
[0042] The parameters of the above two classifiers are updated respectively. The specific methods are as follows:
[0043] For a classifier, use the category prediction result output by it and the category label corresponding to the input image sample to calculate the cross entropy loss according to the following formula:
[0044] ;
[0045] Among them, m is the number of a batch of image samples input into the classifier; i is the serial number of the image sample, c is the serial number of the ship category, when the i-th image sample is the c-th ship category is 1, otherwise it is 0. is the probability of the i-th image sample belonging to the c-th ship category as indicated by the category prediction result;
[0046] Then, according to the cross entropy loss Update the parameters in the multi-scale feature learning module and the category feature learning branch of the classifier.
[0047] As a further improvement of the method for identifying individual ship targets, step 3 further includes:
[0048] Step 3.2: All sample pairs contained in all sample data blocks are randomly arranged and input into the individual recognition model in sequence; for each sample pair, the identity determination loss is calculated after the corresponding binary classification result E3 is obtained, and then the parameters of the multi-scale feature learning module, the category feature decoupling module and the identity fusion recognition module are updated according to the identity determination loss;
[0049] Specifically, the identity determination loss is calculated according to the following formula:
[0050] ;
[0051] in, It is the predicted probability value used to indicate that the input real image and the database image have the same identity in the identity binary classification result. Indicates whether the actual identity of the input real image and the database image is the same, 1 if they are the same, and 0 if they are different.
[0052] As a further improvement of the method for identifying individual ship targets, step 3 further includes:
[0053] Step 3.3, randomly arrange all sample data blocks and input them into the individual recognition model in sequence; for each sample data block, calculate the triplet loss respectively, and then update the parameters of the multi-scale feature learning module, the category feature decoupling module and the identity fusion recognition module according to the triplet loss;
[0054] Specifically, the triplet loss is calculated according to the following formula:
[0055] ;
[0056] in, The database image in the first sample pair in the current sample data block With real-time image The output E2 obtained in the feature learning convolutional layer; The database image in the second sample pair in the current sample data block With real-time image The output E2 obtained in the feature learning convolutional layer; is a hyperparameter.
[0057] As a further improvement of the method for identifying individual ship targets, step 3 further includes:
[0058] Step 3.4: Randomly arrange the images in all sample data blocks and input them into the individual recognition model in pairs. Update the hyperparameters according to the features learned by the individual recognition model. ;
[0059] Step 3.5: Repeat steps 3.1 to 3.4 until the training times are reached.
[0060] As a further improvement of the ship target individual recognition method: Update hyperparameters The method is:
[0061] The image samples in all the sample data blocks in step 1 are combined into a data set, wherein the data set is divided into multiple groups according to the identities corresponding to the images;
[0062] For a certain identity , k=1,...,K, where K is the total number of identities: Assume that the number of image samples of the kth identity in the dataset is In step 1, ensure If is an even number, it is constructed by random sampling The jth sample pair with the same identity is recorded as ,j={1,..., }; Then the above sample pairs with the same identity are input into the model, and the corresponding output E2, and the output obtained from the j-th sample pair with the same identity is recorded as ; For the kth identity, due to the above The samples have the same identity, so the features learned by the model should be closer than those of samples with different identities. Assuming the above The feature space where the samples are located is H, and the average distance between the samples of this identity is: ; According to the above method, the samples in each identity in the entire data set are calculated to obtain the average distance of the samples in each identity, and then the hyperparameter Updated to the average distance of all identity samples, that is, .
[0063] Compared with the prior art, the present invention has the following beneficial effects:
[0064] 1. This model can use the multi-scale feature learning module to more fully learn the identity characteristics of ships, and by introducing category information, it can eliminate the influence of ship targets with different categories but similar individual characteristics, and better assist in identity recognition. At the same time, it uses the improved triple function to adaptively obtain a more discriminative identity discrimination feature space, increase the feature differences between samples with different identities, and reduce the feature differences between samples with the same identity, so as to realize individual recognition based on ship appearance characteristics from a long distance and significantly improve the accuracy of individual recognition of ship targets.
[0065] 2. The multi-scale feature learning module constructed by the present invention can learn the features of a given target from four scales, which helps to fully extract and fuse identity-related features and improve the accuracy of category and individual recognition.
[0066] 3. The present invention separates category-related features by constructing a category feature decoupling module to achieve category recognition, and further integrates the category features as prior expert knowledge into the identity feature learning network to guide the individual recognition model to exclude the influence of ship targets with similar features but different categories, thereby improving the individual recognition effect.
[0067] 4. The present invention can increase the intra-class similarity and inter-class difference of the identity features learned by the model through the individual recognition model and the improved triplet loss function, and better learn the discriminative features related to the identity to improve the discrimination of different ship targets.
[0068] 5 The present invention increases the diversity of sample distribution by amplifying samples and constructing sample data blocks with specified rules, can better construct triple data pairs, and reduces the impact of sample imbalance on the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is a schematic diagram of the overall framework of the individual recognition model in the present invention;
[0070] Figure 2 is a schematic diagram of a multi-scale feature learning module in the present invention;
[0071] Figure 3 Schematic diagram of triplet loss in the present invention, where the solid origin represents the features learned by the sample, and the dotted circle represents the feature space H composed of samples with the same identity, whose feature distance is relatively close. For different identity samples The distance For the same identity sample The distance between samples is shown in Figure 2. (a) is the sample distance before optimization, and (b) is the sample distance after optimization. DETAILED DESCRIPTION
[0072] The technical solution of the present invention is described in detail below with reference to the accompanying drawings:
[0073] like Figure 1 , a method for identifying individual ship targets based on feature decoupling, the steps are as follows:
[0074] Step 1: Construct multiple sample data blocks.
[0075] The construction rule of the sample data block is as follows: each sample data block contains two sample pairs, and the sample pair contains a database image and a real sample image; for the two sample pairs, the ship in the database image of the first sample pair has the same identity as the ship in the real sample image, the ship in the database image of the second sample pair has a different identity from the ship in the real sample image, and the ship in the database image of the first sample pair has the same identity as the ship in the database image of the second sample pair.
[0076] The specific method is:
[0077] Step 1.1, collect SAR ship target images, and use the bicubic interpolation method to uniformly crop the target images into 64×64×3 sizes, and divide the training data and test data into 8:2 ratios.
[0078] Step 1.2: Use translation, rotation and other methods to expand the training data samples so that the number of images of different categories is balanced;
[0079] Step 1.3: Construct a sample data block that complies with the construction rules by random sampling.
[0080] Step 2: Build an individual recognition model and an identity fusion recognition module.
[0081] The individual recognition model includes two parallel, weight-sharing multi-scale feature learning modules and two parallel category feature decoupling modules.
[0082] In order to better extract the multi-scale features of ship targets, two weight-shared multi-scale feature learning modules are introduced for the two input branches to extract and fuse feature information of different scales layer by layer, thereby assisting the model to better learn identity-related features.
[0083] like Figure 2 The multi-scale feature learning module includes a feature extraction module, a deep-to-shallow fusion network and a shallow-to-deep fusion network.
[0084] The feature extraction module sequentially performs 4 layers of convolution operations, and the height and width of the feature graph output by the 4 layers of convolution operations gradually decrease, and the depth gradually increases; the outputs of the 4 layers of convolution operations are A1, A2, A3 and A4 respectively;
[0085] The deep-to-shallow fusion network is composed of four fusion layers connected in sequence. Suppose the outputs of the four fusion layers are B1, B2, B3 and B4 respectively:
[0086] ;
[0087] express After a layer of convolution kernel is 1×1, step size =1 is the result of the conv convolution operation of the convolutional layer.
[0088] express After a layer of convolution kernel is 1×1, step size = 1, the result after the conv convolution operation of the convolution layer is the same as Add element by element.
[0089] The shallow-to-deep fusion network is composed of four fusion layers connected in sequence. Suppose the outputs of the four fusion layers are C1, C2, C3 and C4 respectively:
[0090] ;
[0091] express After a layer of convolution kernel is 1×1, step size =1 is the result of the conv convolution operation of the convolutional layer.
[0092] express After a layer of convolution kernel is 1×1, step size = 1, the result after the conv convolution operation of the convolution layer is the same as Add element by element.
[0093] C4 is the output of the multi-scale feature learning module.
[0094] In order to eliminate the interference of similar ship targets of other categories and improve the accuracy of individual recognition, a multi-task learning structure is designed to realize category classification, and then its output is incorporated into the individual recognition branch as prior information.
[0095] like Figure 1 The category feature decoupling module includes two parallel branches, namely, a category feature learning branch and an identity feature learning branch. The category feature learning branch is trained to classify the input image to learn category-related information, and then the output of the category feature learning branch is fused with the output of the identity feature learning branch to introduce category information into the individual recognition task, thereby improving the individual recognition accuracy.
[0096] One of the multi-scale feature learning modules is used to input the real image in the sample pair, and its output features are reshaped and then input into one of the category feature decoupling modules.
[0097] Another multi-scale feature learning module is used to input the database image in the sample pair, and its output features are reshaped and then input into another category feature decoupling module.
[0098] The outputs of the two category feature decoupling modules are simultaneously input into the identity fusion recognition module to obtain the identity similarity and difference prediction values of the input sample pairs containing the real image and the database image.
[0099] Specifically, during the reshape process, the features output by the multi-scale feature learning module are expanded into vectors.
[0100] The category feature learning branch includes two sequentially connected first fully connected layers and second fully connected layers; the number of nodes in the first fully connected layer is the total number of ship categories N, which is used for category prediction; the second fully connected layer is used to integrate the category information extracted by the first fully connected layer into the subsequent identity fusion recognition module.
[0101] The identity feature learning branch includes two sequentially connected third fully connected layers and fourth fully connected layers, which are used to obtain identity feature information from the vector obtained by reshaping and pass it to the subsequent identity fusion recognition module.
[0102] Furthermore, let the output of the multi-scale feature learning module of the input real-sampled image be ,The output of the multi-scale feature learning module of the input database image is .
[0103] The output of the first fully connected layer corresponding to the input is D1, the output of the second fully connected layer corresponding to the input is D2, the output of the third fully connected layer is D3, and the output of the fourth fully connected layer is D4.
[0104] The output of the first fully connected layer corresponding to the input is D5, the output of the second fully connected layer corresponding to the input is D6, the output of the third fully connected layer is D7, and the output of the fourth fully connected layer is D8.
[0105] The identity fusion recognition module includes a fusion layer, a feature learning convolution layer and a fifth fully connected layer connected in sequence; the fusion layer is used to splice D2, D4, D6 and D8 into a result E1, and the feature learning convolution layer obtains an output result E2 containing the identity features of the two input images and related information of the distance between the identity features based on E1; the fifth fully connected layer outputs a binary classification result E3 based on E2, that is, the identity difference prediction value.
[0106] Step 3: Perform model training.
[0107] The sample data block is input into the individual recognition model, and the individual recognition model is trained according to the output result of the individual recognition model.
[0108] Use Adam as the optimizer for the model and train the model as follows:
[0109] Step 3.1, the corresponding multi-scale feature learning module and the category feature learning branch of the category feature decoupling module constitute a classifier; the actual image and the database image are respectively input into the two parallel classifiers mentioned above to obtain corresponding outputs D1 and D5, which are the category prediction results of the actual image and the database image, respectively.
[0110] The parameters of the above two classifiers are updated respectively. The specific methods are as follows:
[0111] For a classifier, use the category prediction result output by it and the category label corresponding to the input image sample to calculate the cross entropy loss according to the following formula:
[0112] ;
[0113] Among them, m is the number of a batch of image samples input into the classifier; i is the serial number of the image sample, c is the serial number of the ship category, when the i-th image sample is the c-th ship category is 1, otherwise it is 0. is the probability that the i-th image sample belongs to the c-th ship category as indicated by the category prediction result of the i-th image sample.
[0114] Then, according to the cross entropy loss Update the parameters in the multi-scale feature learning module and the category feature learning branch of the classifier.
[0115] Step 3.2: All sample pairs contained in all sample data blocks are randomly arranged and input into the individual recognition model in sequence; for each sample pair, the identity determination loss is calculated after the corresponding binary classification result E3 is obtained, and then the parameters of the multi-scale feature learning module, the category feature decoupling module and the identity fusion recognition module are updated according to the identity determination loss.
[0116] Specifically, the identity determination loss is calculated according to the following formula:
[0117] ;
[0118] in, It is the predicted probability value used to indicate that the input real image and the database image have the same identity in the identity binary classification result. Indicates whether the actual identity of the input real image and the database image is the same, 1 if they are the same, and 0 if they are different.
[0119] Step 3.3, randomly arrange all sample data blocks and input them into the individual recognition model in sequence; for each sample data block, calculate the triplet loss respectively, and then update the parameters of the multi-scale feature learning module, the category feature decoupling module and the identity fusion recognition module according to the triplet loss;
[0120] Specifically, the triplet loss is calculated according to the following formula:
[0121] ;
[0122] in, The database image in the first sample pair in the current sample data block Real-life images with the same identity The output E2 obtained in the feature learning convolutional layer contains the identity features of the two images and the information related to the distance between the identity features; The database image in the second sample pair in the current sample data block Real images with different identities The output E2 obtained in the feature learning convolutional layer contains the identity features of the two images and the information related to the distance between the identity features; is a hyperparameter.
[0123] Step 3.4: Randomly arrange the images in all sample data blocks and input them into the individual recognition model in pairs. Update the hyperparameters according to the features learned by the individual recognition model. .
[0124] Update hyperparameters The method is:
[0125] The image samples in all the sample data blocks in step 1 are combined into a data set, and the data set is divided into multiple groups according to the identities corresponding to the images.
[0126] For a certain identity , k=1,...,K, where K is the total number of identities: Assume that the number of image samples of the kth identity in the dataset is In step 1, ensure If is an even number, it is constructed by random sampling The jth sample pair with the same identity is recorded as ,j={1,..., }; Then the above sample pairs with the same identity are input into the model, and the corresponding output E2, and the output obtained from the j-th sample pair with the same identity is recorded as , the output feature contains both identity feature information and identity feature distance related information; for the kth identity, due to the above The samples have the same identity, so the features learned by the model should be closer than those of samples with different identities. Assuming the above The feature space where the samples are located is H, and the average distance between the samples of this identity is: ; According to the above method, the samples in each identity in the entire data set are calculated to obtain the average distance of the samples in each identity, and then the hyperparameter Updated to the average distance of all identity samples, that is, .
[0127] Hyperparameters The relative size of the distance to the feature distribution has an impact on the algorithm effect. This method can adaptively increase the feature distance of target samples with different identities to more than 1 times the average feature distance of samples with the same identity, thereby ensuring smaller intra-class differences and larger inter-class differences.
[0128] Step 3.5: Repeat steps 3.1 to 3.4 until the training times are reached.
[0129] Furthermore, after training is completed, a given test sample and each ship image sample in the database can be combined into a data pair and input into the model, and the identity determination result E3, i.e., the probability that the two samples are targets with the same identity, can be output to test the model.
[0130] Step 4: For each image in the database, the category feature D6 and the identity feature D8 are extracted through the multi-scale feature learning module and the category feature decoupling module. For the image to be identified, the category feature D2 and the identity feature D4 are extracted through the multi-scale feature learning module and the category feature decoupling module. Then, D2 and D4 are grouped with the features D6 and D8 extracted from different images in the database and input into the trained identity fusion recognition module respectively. According to the output result of the identity fusion recognition module, it is determined whether the identity of the image to be identified is consistent with the identity of each database image, and then the individual recognition result of the image to be identified is obtained.
Claims
1. A method for identifying individual ship targets based on feature decoupling, characterized in that Here are the steps: Step 1: construct multiple sample data blocks; The construction rule of the sample data block is as follows: each sample data block contains two sample pairs, and the sample pair contains a database image and a real sample image; for the two sample pairs, the ship in the database image of the first sample pair has the same identity as the ship in the real sample image, the ship in the database image of the second sample pair has a different identity from the ship in the real sample image, and the ship in the database image of the first sample pair has the same individual identity as the ship in the database image of the second sample pair; Step 2: Construct an individual recognition model; The individual recognition model includes two parallel, weight-sharing multi-scale feature learning modules and two parallel category feature decoupling modules, and an identity fusion recognition module; The category feature decoupling module includes two parallel branches, namely a category feature learning branch and an identity feature learning branch; One of the multi-scale feature learning modules is used to input the real image in the sample pair, and its output features are reshaped and then input into one of the category feature decoupling modules; Another multi-scale feature learning module is used to input the database image in the sample pair, and its output features are reshaped and then input into another category feature decoupling module; The outputs of the two category feature decoupling modules are simultaneously input into the identity fusion recognition module to obtain the identity similarity and difference prediction values of the input sample pairs containing the real image and the database image; Step 3: Perform model training; Inputting the sample data block into the individual recognition model, and training the individual recognition model according to the output result of the individual recognition model; Step 4: For each image in the database, the category feature D6 and the identity feature D8 are extracted through the multi-scale feature learning module and the category feature decoupling module. For the image to be identified, the category feature D2 and the identity feature D4 are extracted through the multi-scale feature learning module and the category feature decoupling module. Then, D2 and D4 are grouped with the features D6 and D8 extracted from different images in the database and input into the trained identity fusion recognition module respectively. According to the output result of the identity fusion recognition module, it is determined whether the identity of the image to be identified is consistent with the identity of each database image, and then the individual recognition result of the image to be identified is obtained.
2. The method for identifying individual ship targets based on feature decoupling according to claim 1, characterized in that The specific method of step 1 is: Step 1.1, collect SAR ship target images, and uniformly crop the target images into a specified size using the bicubic interpolation method; Step 1.2: Expand the training data to balance the number of images of different categories. Step 1.3: Construct a sample data block that complies with the construction rules by random sampling.
3. The method for identifying individual ship targets based on feature decoupling according to claim 1 or 2, characterized in that: The multi-scale feature learning module includes a feature extraction module, a deep-to-shallow fusion network and a shallow-to-deep fusion network; The feature extraction module sequentially performs 4 layers of convolution operations, and the height and width of the feature graph output by the 4 layers of convolution operations gradually decrease, and the depth gradually increases; the outputs of the 4 layers of convolution operations are A1, A2, A3 and A4 respectively; The deep-to-shallow fusion network is composed of four fusion layers connected in sequence. Suppose the outputs of the four fusion layers are B1, B2, B3 and B4 respectively: ; express After a layer of convolution kernel is 1×1, step size =1 is the result of the conv convolution operation of the convolutional layer; express After a layer of convolution kernel is 1×1, step size = 1, the result after the conv convolution operation of the convolution layer is the same as Add element by element; The shallow-to-deep fusion network is composed of four fusion layers connected in sequence. Suppose the outputs of the four fusion layers are C1, C2, C3 and C4 respectively: ; express After a layer of convolution kernel is 1×1, step size =1 is the result of the conv convolution operation of the convolutional layer; express After a layer of convolution kernel is 1×1, step size = 1, the result after the conv convolution operation of the convolution layer is the same as Add element by element; C4 is the output of the multi-scale feature learning module.
4. The method for identifying individual ship targets based on feature decoupling according to claim 3, characterized in that: During the reshape process, the features output by the multi-scale feature learning module are expanded into vectors; The category feature learning branch includes two first fully connected layers and second fully connected layers connected in sequence; the number of nodes in the first fully connected layer is the total number of ship categories N, which is used for category prediction; the second fully connected layer is used to integrate the category information extracted by the first fully connected layer into the subsequent identity fusion recognition module; The identity feature learning branch includes two sequentially connected third fully connected layers and fourth fully connected layers, which are used to obtain identity feature information from the vector obtained by reshaping and pass it to the subsequent identity fusion recognition module.
5. The method for identifying individual ship targets based on feature decoupling according to claim 4, characterized in that: Assume that the output of the multi-scale feature learning module of the input real-sampled image is ,The output of the multi-scale feature learning module of the input database image is ; The output of the first fully connected layer corresponding to the input is D1, the output of the second fully connected layer corresponding to the input is D2, the output of the third fully connected layer is D3, and the output of the fourth fully connected layer is D4; The output of the first fully connected layer corresponding to the input is D5, the output of the second fully connected layer corresponding to the input is D6, the output of the third fully connected layer is D7, and the output of the fourth fully connected layer is D8; The identity fusion recognition module includes a fusion layer, a feature learning convolution layer and a fifth fully connected layer connected in sequence; the fusion layer is used to splice D2, D4, D6 and D8 into a result E1, and the feature learning convolution layer obtains an output result E2 containing the identity features of the two input images and related information of the distance between the identity features based on E1; the fifth fully connected layer outputs a binary classification result E3 based on E2, that is, the identity difference prediction value.
6. The method for identifying individual ship targets based on feature decoupling as claimed in claim 5, characterized in that Step 3 includes: Step 3.1, the corresponding multi-scale feature learning module and the category feature learning branch of the category feature decoupling module constitute a classifier; the real image and the database image are respectively input into the two parallel classifiers above to obtain corresponding outputs D1 and D5, which are the category prediction results of the real image and the category prediction results of the database image respectively; The parameters of the above two classifiers are updated respectively. The specific methods are as follows: For a classifier, use the category prediction result output by it and the category label corresponding to the input image sample to calculate the cross entropy loss according to the following formula: ; Among them, m is the number of a batch of image samples input into the classifier; i is the serial number of the image sample, and c is the serial number of the ship category. When the i-th image sample is the c-th ship category, is 1, otherwise it is 0. is the probability of the i-th image sample belonging to the c-th ship category as indicated by the category prediction result; Then, according to the cross entropy loss Update the parameters in the multi-scale feature learning module and the category feature learning branch in the classifier.
7. The method for identifying individual ship targets based on feature decoupling according to claim 6, characterized in that Step 3 also includes: Step 3.2: All sample pairs contained in all sample data blocks are randomly arranged and input into the individual recognition model in sequence; for each sample pair, the identity determination loss is calculated after the corresponding binary classification result E3 is obtained, and then the parameters of the multi-scale feature learning module, the category feature decoupling module and the identity fusion recognition module are updated according to the identity determination loss; Specifically, the identity determination loss is calculated according to the following formula: ; in, It is the predicted probability value used to indicate that the input real image and the database image have the same identity in the identity binary classification result. Indicates whether the actual identity of the input real image and the database image is the same, 1 if they are the same, and 0 if they are different.
8. The method for identifying individual ship targets based on feature decoupling according to claim 7, characterized in that Step 3 also includes: Step 3.3, randomly arrange all sample data blocks and input them into the individual recognition model in sequence; for each sample data block, calculate the triplet loss respectively, and then update the parameters of the multi-scale feature learning module, the category feature decoupling module and the identity fusion recognition module according to the triplet loss; Specifically, the triplet loss is calculated according to the following formula: ; in, The database image in the first sample pair in the current sample data block With real-time image The output E2 obtained in the feature learning convolutional layer; The database image in the second sample pair in the current sample data block With real-time image The output E2 obtained in the feature learning convolutional layer; is a hyperparameter.
9. The method for identifying individual ship targets based on feature decoupling as claimed in claim 8, characterized in that Step 3 also includes: Step 3.4: Randomly arrange the images in all sample data blocks and input them into the individual recognition model in pairs. Update the hyperparameters according to the features learned by the individual recognition model. ; Step 3.5: Repeat steps 3.1 to 3.4 until the training times are reached.
10. The method for identifying individual ship targets based on feature decoupling according to claim 9, characterized in that: Update hyperparameters The method is: The image samples in all the sample data blocks in step 1 are combined into a data set, wherein the data set is divided into multiple groups according to the identities corresponding to the images; For a certain identity , k=1,...,K, where K is the total number of identities: Assume that the number of image samples of the kth identity in the dataset is In step 1, ensure If is an even number, it is constructed by random sampling The jth sample pair with the same identity is recorded as ,j={1,..., }; Then the above sample pairs with the same identity are input into the model, and the corresponding output E2, and the output obtained from the j-th sample pair with the same identity is recorded as ; For the kth identity, the average distance between samples of the identity is: ; According to the above method, the samples in each identity in the entire data set are calculated to obtain the average distance of the samples in each identity, and then the hyperparameter Updated to the average distance of all identity samples, that is, .
Citation Information
Patent Citations
Intelligent ship identity recognition method and system based on twin network
CN112232269A
Image-based intelligent ship identity recognition method
CN114519669A
U-shaped cavity full-convolution integral segmentation network identification model based on remote sensing image
CN111160276A
Open scene camouflage personnel small target detection method based on deep learning
CN116824485A