CN114926693A - SAR image small sample identification method and device based on weighted distance - Google Patents

SAR image small sample identification method and device based on weighted distance Download PDF

Info

Publication number
CN114926693A
CN114926693A CN202210618273.7A CN202210618273A CN114926693A CN 114926693 A CN114926693 A CN 114926693A CN 202210618273 A CN202210618273 A CN 202210618273A CN 114926693 A CN114926693 A CN 114926693A
Authority
CN
China
Prior art keywords
training
feature extraction
extraction network
feature
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210618273.7A
Other languages
Chinese (zh)
Inventor
高飞
徐景铭
王俊
罗喜伶
许小剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Innovation Research Institute of Beihang University
Original Assignee
Hangzhou Innovation Research Institute of Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Innovation Research Institute of Beihang University filed Critical Hangzhou Innovation Research Institute of Beihang University
Priority to CN202210618273.7A priority Critical patent/CN114926693A/en
Publication of CN114926693A publication Critical patent/CN114926693A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for identifying SAR image small samples based on weighted distance, wherein the method comprises the following steps: acquiring small sample data of the SAR image, and dividing the small sample data of the SAR image into a training set and a test set; performing iterative training on a preset feature extraction network through a training set based on preset iterative times so as to obtain the trained feature extraction network, wherein parameters in the feature extraction network are updated through a preset loss function in each iterative training; the invention inputs the test set into the trained feature extraction network to obtain the recognition result, and the invention fuses the multi-scale features of the convolutional neural network in the feature network by adding a channel attention mechanism in the feature extraction network, thereby improving the expression capability of the features and effectively increasing the differentiable degree of the features of different types of samples through the weight generator.

Description

SAR image small sample identification method and device based on weighted distance
Technical Field
The invention relates to the technical field of SAR image processing, in particular to a SAR image small sample identification method and device based on weighted distance.
Background
Synthetic Aperture Radar (SAR) is a high-resolution imaging Radar, is an active sensor for sensing by using microwaves, is not limited by conditions such as weather and illumination, and can perform all-weather and all-day reconnaissance on an interested target to obtain a high-resolution Radar image similar to an optical image.
In the field of SAR image interpretation application, Automatic Target Recognition (ATR) has been a research focus and focus in this field. The SAR image target identification is an important stage of SAR image interpretation, and the basic flow of the SAR image target identification can be divided into three parts: image preprocessing, feature extraction and classification and identification. Wherein feature extraction is a key step.
At present, the most widely applied SAR image target recognition method is a recognition algorithm based on deep learning, the methods use CNN to extract the features of the SAR image, and the method is a data-driven algorithm, the method can obtain ideal recognition accuracy only under the condition of using a large amount of data for training, however, a large amount of clutter and speckle noise exist in the SAR image, so that the cost for obtaining the SAR target image with marks is high, and the recognition performance is influenced. Meanwhile, the targets in the same category have different backscattering behaviors in different azimuth angles, so that the targets in the same category have various forms, and the targets in different categories look very similar, so that the SAR targets are easy to be confused during classification, and further challenges are brought to the identification of the SAR targets.
Disclosure of Invention
The invention aims to provide a method and a device for identifying a small sample of an SAR (synthetic aperture radar) image based on a weighted distance, and aims to solve the problems in the prior art.
The invention provides a SAR image small sample identification method based on weighted distance, which comprises the following steps:
s1, acquiring SAR image small sample data, and dividing the SAR image small sample data into a training set and a testing set;
s2, carrying out iterative training on a preset feature extraction network through a training set based on preset iteration times so as to obtain the trained feature extraction network, and updating parameters in the feature extraction network through a preset loss function in each iterative training, wherein a channel attention mechanism and a multi-scale feature fusion structure are added in the preset feature extraction network;
and S3, inputting the test set into the trained feature extraction network to obtain a recognition result.
The invention provides a SAR image small sample recognition device based on weighted distance, comprising:
the SAR image small sample data acquisition module is used for acquiring SAR image small sample data and dividing the SAR image small sample data into a training set and a testing set;
the training module is used for carrying out iterative training on a preset feature extraction network through a training set based on preset iteration times so as to obtain the trained feature extraction network, and parameters in the feature extraction network are updated through a preset loss function in each iterative training, wherein a channel attention mechanism and a multi-scale feature fusion structure are added into the preset feature extraction network;
and the test module is used for inputting the test set into the trained feature extraction network to obtain the recognition result.
By adopting the embodiment of the invention, the channel attention mechanism is added into the feature extraction network to redistribute the weights of different features, so that the useful channel features can be enhanced, the redundant channel features can be inhibited, the expression capability of the features can be improved, and meanwhile, too much calculation complexity can not be brought; the multi-scale features of the CNN in the feature extraction network are fused, so that shallow features containing a large amount of local information and deep features containing a large amount of global information can be fused, complementary information in different levels of features can be better utilized, and the expression capability of the features is improved.
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description so as to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method of biological domain knowledge map construction according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a training process and a testing process of a small sample recognition model according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a feature extraction network according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a convolutional neural network according to an embodiment of the present invention;
FIG. 5 is a schematic illustration of a process for processing a feature map of an attention mechanism according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a SAR image small sample identification method based on weighted distance designed by the present invention;
FIG. 7 is a graph of the results of an embodiment of the invention using the MSTAR dataset to validate the invention;
fig. 8 is a schematic view of a biological domain knowledge map constructing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Method embodiment one
According to an embodiment of the present invention, a method for identifying a small sample of an SAR image based on a weighted distance is provided, fig. 1 is a flowchart of the method for identifying a small sample of an SAR image based on a weighted distance according to an embodiment of the present invention, and as shown in fig. 1, the method for identifying a small sample of an SAR image based on a weighted distance according to an embodiment of the present invention specifically includes:
s101, acquiring small sample data of an SAR image, and dividing the small sample data of the SAR image into a training set and a testing set;
step S102, carrying out iterative training on a preset feature extraction network through a training set based on preset iteration times so as to obtain the trained feature extraction network, wherein parameters in the feature extraction network are updated through a preset loss function in each iterative training, and a channel attention mechanism and a multi-scale feature fusion structure are added in the preset feature extraction network; the step S102 of performing iterative training on the feature extraction network specifically includes:
s21, dividing a training set into a training support set and a training query set;
s22, extracting features of a training support set through a preset feature extraction network, carrying out average value operation on samples of the same category of the training support set to obtain a category prototype, and extracting features of a training query set through the preset feature extraction network to obtain a training query set feature vector;
s23, calculating Euclidean distances between feature vectors of the training query set and various category prototypes;
s24, calculating the weight between the feature vector of the training query set and each class prototype through a weight generator, multiplying the weight by the Euclidean distance of the class prototype to obtain a weighted Euclidean distance, wherein the weight generator is a multilayer learnable neural network, and continuously updating parameters in training to generate the most appropriate weight value so as to obtain the trained weight generator;
s25, classifying the weighted Euclidean distance through a classifier to obtain a classification result;
s26, optimizing parameters of the SAR image small sample recognition model based on the weighted distance through a loss function;
and S27, judging whether the iteration times reach the preset iteration times, if not, repeatedly executing the steps S21 to S26, and if so, ending the training.
Further, the preset feature extraction network construction steps are as follows:
s31, constructing a convolutional neural network, and obtaining a characteristic diagram through the convolutional neural network, wherein the convolutional neural network comprises: the device comprises a two-dimensional convolution layer, a down-sampling layer, a batch normalization layer and a nonlinear activation function;
s32, adding a channel attention mechanism into the characteristic diagram for processing to obtain an attention value, wherein the processing process of the channel attention mechanism comprises the following steps:
compressing the spatial features in a single channel of the feature map through a global average pooling operation to obtain a global feature descriptor S c
Figure BDA0003674141550000051
Wherein H, W represent the length and width of the feature map, respectively, f c Representing an input characteristic diagram, i represents the ith pixel point in the horizontal direction, and j represents the jth pixel point in the vertical direction
Obtaining the relation between different channels in the characteristic diagram through two full-connection layers, predicting the importance of each channel, processing the channel by using a Sigmoid activation function to obtain an attention value U,
U=Sigmoid(FC 2 (ReLU(FC 1 (S))) formula 2;
therein, FC 1 (. cndot.) and FC 2 (. to) denotes two fully-connected layers, one before the other, and S ═ S 1 ,s 2 ,…,s C ]∈R C×1×1 ReLU (·) represents a ReLU activation function, Sigmoid (·) represents a Sigmoid activation function, obtained U is an attention value, and finally the attention value and the original feature F are combined l Multiplying the vectors by elements to obtain a feature map F after the attention of the channel is optimized al
S33, performing multi-scale feature fusion on the feature map after the channel attention optimization, specifically comprising the following steps:
and performing up-sampling from the characteristic diagram with the lowest resolution at the tail end of the convolutional neural network, and adding the characteristic diagram obtained after the up-sampling and the channel attention mechanism processing with an adjacent characteristic diagram with a specific resolution.
S33, performing multi-scale feature fusion on the feature graph after the channel attention optimization, specifically comprising the following steps:
and performing up-sampling starting from the characteristic diagram with the lowest resolution at the tail end of the convolutional neural network, and adding the characteristic diagram obtained after the up-sampling and the channel attention mechanism processing with an adjacent characteristic diagram with a specific resolution.
Step S103, inputting the test set into the trained feature extraction network to obtain a recognition result, wherein the step S103 specifically comprises the following steps:
dividing a test set into a test support set and a test query set, respectively carrying out feature extraction on samples in the test support set and the test query set through a trained feature extraction network, carrying out class mean processing on the sample features in the test support set to obtain prototype vectors of new classes, calculating Euclidean distances between the sample vectors in the test query set and the prototype vectors of the new classes, sending the Euclidean distances between the sample vectors in the test query set and the prototype vectors of the new classes into a trained weight generator to obtain various weight values, correspondingly multiplying the weight values by the Euclidean distances, and outputting an identification result through a classifier.
By adopting the embodiment of the invention, the following beneficial effects are achieved:
1. according to the method, a channel attention mechanism is added in each layer of the convolutional neural network, weights of different characteristics are redistributed, useful channel characteristics can be enhanced, redundant channel characteristics are inhibited, the expression capability of the characteristics is improved, and meanwhile too much calculation complexity is not brought;
2. the invention constructs a cascade multi-scale feature fusion structure, fuses the multi-scale features in the CNN, so that shallow features containing a large amount of local information and deep features containing a large amount of global information can be fused, complementary information in different levels of features can be better utilized, and the expression capability of the features is further improved;
3. the invention provides a small sample classification method based on weighting distance, which generates a weight value through a weight generator, weights Euclidean distance between a query concentrated sample and each type of prototype point by using the weight value, can effectively increase differentiable degree of different types of sample characteristics, and relieves the problems that SAR targets of different types are easy to confuse and difficult to differentiate. On the basis, the invention also designs the weight generation loss which is used for restricting the distance weight generation module, and further improves the identification accuracy of the model.
Method embodiment two
Fig. 2 is a schematic diagram illustrating a training process and a testing process of a small sample recognition model according to an embodiment of the present invention, where the left side of fig. 2 is a training process of a feature extraction network, and the right side of fig. 2 is a flow chart of the testing process;
as shown in fig. 2, the specific implementation steps of the embodiment of the present invention are as follows:
step 1, dividing MSTAR data set into training set D with disjoint label space Base And test set D Novel
Training set D Base The test set D comprises 6 types of targets such as T62, T72, BRDM2, BTR60, BTR70 and ZIL13L Novel Including 4 types of samples such as BMP2, D7, 2S1 and ZSU 234; training set D Base Contains a large number of imagesAnd the samples are labeled data and are used for training a feature extraction network and a classifier. Test set D Novel Only a very small number of samples are labeled, and this part of the samples is called a test support set S n While a large amount of data is tag-unknown, called test query set Q n And the method is used for testing the performance of the model.
And 2, constructing a feature extraction network.
The feature extraction network comprises three parts, namely a Convolutional Neural Network (CNN), a channel attention mechanism and a multi-scale feature fusion module, and the structural relationship of the feature extraction network is shown in figure 3.
(2a) Constructing a convolutional neural network:
as shown in fig. 4, each convolution block includes a three-layer structure and an activation function, where Conv2D represents a two-dimensional convolution layer, MaxPooling2D represents a down-sampling layer, BN represents a bulk normalization layer, and ReLU represents a non-linear activation function. The input SAR image or the characteristic diagram sequentially passes through the structure to obtain the characteristic diagram output by the convolutional layer;
the number of channels of the output characteristic diagram of each two-dimensional convolution layer is 64, the size of a convolution kernel is 3 multiplied by 3, the moving step length is 1, the edge filling is 1, each downsampling layer adopts a maximum pooling mode, the size of a pooling convolution kernel is set to be 2 multiplied by 2, and the moving step length is 2;
the whole convolutional neural network comprises more than 3 convolutional blocks with structures.
(2b) Adding a channel attention mechanism:
the processing procedure of feature map by attention mechanism is shown in fig. 5, and spatial features in a single channel are compressed through a global average pooling operation to obtain a global feature descriptor S c
Figure BDA0003674141550000081
Wherein H, W represents the length and width of the feature map, respectively, and f c Representing input characteristic diagram, i represents the ith pixel point in the horizontal direction, and j represents the jth pixel point in the vertical directionAnd (6) pixel points.
And then obtaining the relationship between different channels by using two full-connection layers, predicting the importance of each channel, and then processing the relationship by using a Sigmoid activation function to obtain an attention value U, wherein the neuron numbers contained in the two full-connection layers are respectively 64 and 8:
U=Sigmoid(FC 2 (ReLU(FC 1 (S)))
wherein, FC 1 (. o) and FC 2 (. to) denotes two fully-connected layers, one before and one after, respectively, S ═ S 1 ,s 2 ,…,s C ]∈R C×1×1 ReLU (·) represents a ReLU activation function, Sigmoid (·) represents a Sigmoid activation function, obtained U is an attention value, and finally the attention value and the original feature F are combined l Multiplying the vectors by elements to obtain a feature map F after the attention of the channel is optimized al
(2c) Performing multi-scale feature fusion:
the multi-scale feature fusion module is shown in the right half of FIG. 3, and the feature of each layer optimized by using the channel attention mechanism is F al =[F a1 ,F a2 ,F a3 ]Carrying out representation;
performing up-sampling on the feature map with the lowest resolution from the tail end of the convolutional neural network, then performing addition operation on the feature map obtained after the up-sampling and attention mechanism processing and the adjacent feature map with higher resolution, and processing the feature map by using the channel attention mechanism in the step 2b after each up-sampling to realize feature fusion between the deep layer and the shallow layer;
specifically, first, F is a3 2 times upsampling was performed, after passing through the attention structure, with F a2 Carrying out addition fusion; the fused result is up-sampled by 2 times, and passes through the attention structure, and then is compared with F a1 Carrying out addition fusion;
in the rightmost portion of FIG. 3, after the fusion of deep and shallow features is achieved, the features in the fusion process are aggregated, for F a3 Up-sampling by 4 times for F a2 And F a3 2 times up-sampling of fusion resultsThen, the three layers of characteristics are added and fused;
feature F after multi-scale fusion s The characteristics after being fused are finely adjusted by the adjusting block, redundant information in the characteristics is removed, the characteristics after being fused are easier to classify, and the adjusting block consists of three parts: 1 × 1 convolution, RELU function, and global average pooling layer.
And 3, constructing a loss function in the training process.
The loss function consists of two parts, one is a cross entropy loss function:
Figure BDA0003674141550000091
wherein (x) i ,y i ) The loss function is used for measuring the difference between the predicted label and the real label.
The second part is the weight generation penalty for constraining the weight generator so that the weights generated by this module can maximize the inter-class distance:
Figure BDA0003674141550000092
finally, combining the two loss functions, the total loss function of the model is:
Figure BDA0003674141550000093
and 4, randomly selecting a small number of samples from each category of the training set to form a training support set S in each round by adopting a round training mode b Selecting a certain number of samples to form a training query set Q b
Step 5, using the feature extraction network constructed in the step 2 to train the support set S b The images in the image processing system are subjected to feature extraction, and the samples in the same category are characterizedAnd performing mean operation to obtain a class prototype.
After completing the feature extraction, the training support set S b The image features in (2) are subjected to mean value calculation according to categories to obtain category prototype vectors:
Figure BDA0003674141550000094
wherein x is ij Is the ith sample in the jth class of the training support set. M denotes the number of training support set samples in the jth class,
Figure BDA0003674141550000101
the expression feature extraction module is used for extracting input feature vectors,
Figure BDA0003674141550000102
representing parameters that can be learned in the network.
Step 6, utilizing the characteristic extraction network constructed in the step 2 to carry out a training query set Q b And (4) performing feature extraction on the images to obtain a training query set feature vector.
Step 7, calculating a training query set Q b Euclidean distances between the feature vectors in (a) and the respective class prototypes.
After the prototype of each category is obtained, a set of training queries Q is obtained b The feature vector of the image in (1) is measured with the prototype vector between each category. For a given sample (x) of a training query set i ,y i )∈Q b Features that are mapped to the embedding space through a multi-feature fusion network are available
Figure BDA0003674141550000105
Representation of it to a certain prototype point c j The euclidean distance of (a) may be expressed as:
Figure BDA0003674141550000103
and 8, inputting the feature vector and the class prototype into a weight generator, calculating the weight between the feature vector and each class, correspondingly multiplying the weight by the Euclidean distance calculated in the step 7, and obtaining a classification result of the training query set sample by using a Softmax classifier.
As shown in fig. 6, after the distance calculation is completed, the query vector and the prototype vectors of each category are vector-spliced and sent to the weight generator. The weight generator is a multi-layer learnable neural network, and can continuously update parameters in training to generate the most appropriate weight value:
Figure BDA0003674141550000104
wherein w ij Refers to sample x i For the weight of class j, cat (-) denotes the vector splicing operation, g ψ (. cndot.) represents a weight generator, where ψ refers to a learnable parameter. And after the weight is obtained, multiplying the weight value by the corresponding Euclidean distance to obtain the weighted Euclidean distance. Through weighting, the distance between the query sample and the prototype of the non-category can be effectively increased, and the distinguishability is increased.
Then, using Softmax function to normalize the weighted Euclidean distances from the sample to all the class prototypes, so as to obtain the sample x q The probability of belonging to category j is:
Figure BDA0003674141550000111
and 9, training and optimizing the feature extraction network and the weight generator.
Updating the parameters of the model by using an Adam optimization algorithm according to the loss function constructed in the step 3; and returning to the step 4, performing a new one-time iteration process, performing feature extraction, weight generation and weighted distance calculation on the image by using the model with the updated parameters, continuously repeating the process until the set iteration times are met, and finishing the training process.
And step 10, performing feature extraction on the sample to be tested through the trained feature extraction network, performing small sample target identification on the image in the test set, and outputting an identification result.
First, the test set is divided into test support sets S in step 1 n And test query set Q n Wherein the test support set S n Containing a small number of tagged samples, test query set Q n A test support set S containing a large number of unknown label samples and using the trained feature extraction network model in the step 9 n And test query set Q n The sample in (1) is subjected to feature extraction. To test support set S n Carrying out class mean processing on the sample characteristics to obtain a prototype vector of a new class, and calculating a test query set Q n Euclidean distances between the sample vectors in (a) and the prototype vectors in (b); then, splicing the query vector and the prototype vectors of each category, sending the spliced query vector and prototype vectors of each category into a trained weight generator model to obtain each weighted value, and correspondingly multiplying the weighted value by the Euclidean distance; and finally, outputting the recognition result by using a Softmax classifier.
Fig. 7 shows the results of the verification of the validity of the present invention using MSTAR dataset, where fig. 7 shows the confusion matrix of the recognition result on the left side and fig. 7 shows the t-SNE diagram of the recognition result on the right side.
As can be seen from the confusion matrix, the invention rarely has the condition of wrong classification in the identification process, and has high identification accuracy; according to the method, the test samples of different categories can be effectively distinguished through a weighted distance strategy, the distinguishing degree and difference among the categories are increased, and the difficulty brought to classification and identification by the characteristic that SAR targets are easy to be confused among the different categories is greatly relieved.
By adopting the embodiment of the invention, the following beneficial effects are achieved:
1. according to the method, a channel attention mechanism is added in each layer of the convolutional neural network, weights of different characteristics are redistributed, useful channel characteristics can be enhanced, redundant channel characteristics are inhibited, the expression capability of the characteristics is improved, and meanwhile too much calculation complexity is not brought;
2. the invention constructs a cascade multi-scale feature fusion structure, fuses the multi-scale features in the CNN, so that shallow features containing a large amount of local information and deep features containing a large amount of global information can be fused, complementary information in different levels of features can be better utilized, and the expression capability of the features is further improved;
3. the invention provides a small sample classification method based on weighting distance, which generates a weight value through a weight generator, and weights Euclidean distance between a query concentrated sample and each class of prototype point by using the weight value, so that differentiable degree of different classes of sample characteristics can be effectively increased, and the problems of easy confusion and difficult differentiation between different classes of SAR targets are solved. On the basis, the invention also designs the weight generation loss which is used for restricting the distance weight generation module, and further improves the identification accuracy of the model.
Device embodiment
According to an embodiment of the present invention, a weighted distance-based SAR image small sample recognition apparatus is provided, fig. 8 is a schematic diagram of the weighted distance-based SAR image small sample recognition apparatus according to the embodiment of the present invention, and as shown in fig. 8, the weighted distance-based SAR image small sample recognition apparatus according to the embodiment of the present invention specifically includes:
a sample obtaining module 80, configured to obtain small sample data of the SAR image, and divide the small sample data of the SAR image into a training set and a test set;
the training module 82 is used for carrying out iterative training on a preset feature extraction network through a training set based on preset iterative times so as to obtain the trained feature extraction network, and parameters in the feature extraction network are updated through a preset loss function in each iterative training, wherein a channel attention mechanism and a multi-scale feature fusion structure are added into the preset feature extraction network; the training module specifically comprises:
the division submodule is used for dividing the training set into a training support set and a training query set;
the extraction submodule is used for extracting the features of the training support set through a preset feature extraction network, carrying out average value operation on samples of the same category of the training support set to obtain a category prototype, and carrying out feature extraction on the training query set through the preset feature extraction network to obtain a training query set feature vector;
the calculation submodule is used for calculating the Euclidean distance between the feature vector of the training query set and the class prototype;
the weighting submodule is used for calculating the weight between the feature vector of the training query set and the class prototype through the weight generator and multiplying the weight by the Euclidean distance of the class prototype to obtain the weighted Euclidean distance, wherein the weight generator is a multilayer learnable neural network, and the parameters are continuously updated in the training process to generate the most appropriate weight value so as to obtain the trained weight generator;
the classification submodule is used for classifying the weighted Euclidean distance through the classifier to obtain a classification result;
the optimization submodule is used for optimizing parameters of the SAR image small sample identification model based on the weighted distance through a loss function;
and the judging module is used for judging whether the iteration times reach the preset iteration times, if not, the dividing submodule, the extracting submodule, the calculating submodule, the weighting submodule, the classifying submodule and the optimizing submodule are called, and if the iteration times reach the preset iteration times, the training is finished.
The feature extraction network preset in the training module is specifically configured to:
constructing a convolutional neural network, and obtaining a characteristic diagram through the convolutional neural network, wherein the convolutional neural network comprises the following components: the device comprises a two-dimensional convolution layer, a down-sampling layer, a batch normalization layer and a nonlinear activation function;
and adding a channel attention mechanism into the characteristic diagram for processing to obtain an attention value, wherein the channel attention mechanism processing process comprises the following steps:
compressing the spatial features in a single channel of the feature map through a global average pooling operation to obtain a global feature descriptor S c
Figure BDA0003674141550000131
Wherein H, W represent the length and width of the feature map, respectively, f c Representing an input characteristic diagram, wherein i represents the ith pixel point in the horizontal direction, and j represents the jth pixel point in the vertical direction;
obtaining the relation between different channels in the characteristic diagram through two full-connection layers, predicting the importance of each channel, processing the channel by using a Sigmoid activation function to obtain an attention value U,
U=Sigmoid(FC 2 (ReLU(FC 1 (S))) formula 2;
wherein, FC 1 (. o) and FC 2 (. to) denotes two fully-connected layers, one before and one after, respectively, S ═ S 1 ,s 2 ,…,s C ]∈R C×1×1 ReLU (-) represents a ReLU activation function, Sigmoid (-) represents a Sigmoid activation function, obtained U is an attention value, and finally the attention value and the original feature F are combined l Multiplying the vectors by elements to obtain a feature map F after the attention of the channel is optimized al
Performing multi-scale feature fusion on the feature map after the channel attention optimization, specifically comprising:
and performing up-sampling from the characteristic diagram with the lowest resolution at the tail end of the convolutional neural network, and adding the characteristic diagram obtained after the up-sampling and the channel attention mechanism processing with the adjacent characteristic diagram with the specific resolution.
The preset loss function in the training module is specifically configured to:
the cross entropy loss function is obtained by equation 3,
Figure BDA0003674141550000141
wherein (x) i ,y i ) Samples representing a training query set and true labels, N represents the number of samples of the entire training query set, and the loss functionThe function is to measure the difference between the predicted label and the real label;
the weight generation loss function is obtained by equation 4,
Figure BDA0003674141550000142
wherein C represents the number of categories, w ij Representing the weight of the jth class corresponding to the ith training query set sample generated by the weight generator,
obtaining the loss function by equation 5
Figure BDA0003674141550000151
A test module 84, configured to input the test set into the trained feature extraction network to obtain a recognition result, where the test module 84 is specifically configured to:
dividing a test set into a test support set and a test query set, respectively carrying out feature extraction on samples in the test support set and the test query set through a trained feature extraction network, carrying out class mean processing on sample features in the test support set to obtain prototype vectors of new classes, calculating Euclidean distances between the sample vectors in the test query set and the prototype vectors of the new classes, sending the sample vectors in the test query set and the prototype vectors of the new classes into a trained weight generator to obtain weighted values, correspondingly multiplying the weighted values by the Euclidean distances, and outputting a recognition result through a classifier.
By adopting the embodiment of the invention, the following beneficial effects are achieved:
1. according to the method, a channel attention mechanism is added in each layer of the convolutional neural network, weights of different characteristics are redistributed, useful channel characteristics can be enhanced, redundant channel characteristics are inhibited, the expression capability of the characteristics is improved, and meanwhile too much calculation complexity is not brought;
2. the invention constructs a cascade multi-scale feature fusion structure, fuses the multi-scale features in the CNN, so that shallow features containing a large amount of local information and deep features containing a large amount of global information can be fused, complementary information in different levels of features can be better utilized, and the expression capability of the features is further improved;
3. the invention provides a small sample classification method based on weighting distance, which generates a weight value through a weight generator, weights Euclidean distance between a query concentrated sample and each type of prototype point by using the weight value, can effectively increase differentiable degree of different types of sample characteristics, and relieves the problems that SAR targets of different types are easy to confuse and difficult to differentiate. On the basis, the invention also designs the weight generation loss which is used for restricting the distance weight generation module, and further improves the identification accuracy of the model.
The above description is only an example of this document and is not intended to limit this document. Various modifications and changes may occur to those skilled in the art from this document. Any modifications, equivalents, improvements, etc. which come within the spirit and principle of the disclosure are intended to be included within the scope of the claims of this document.

Claims (10)

1. A SAR image small sample identification method based on weighted distance is characterized by comprising the following steps:
s1, acquiring SAR image small sample data, and dividing the SAR image small sample data into a training set and a test set;
s2, carrying out iterative training on a preset feature extraction network through a training set based on preset iteration times so as to obtain the trained feature extraction network, wherein parameters in the feature extraction network are updated through a preset loss function in each iterative training, and a channel attention mechanism and a multi-scale feature fusion structure are added in the preset feature extraction network;
and S3, inputting the test set into the trained feature extraction network to obtain a recognition result.
2. The method according to claim 1, wherein the step S2 of iteratively training a preset feature extraction network through a training set based on a predetermined number of iterations specifically includes:
s21, dividing the training set into a training support set and a training query set;
s22, extracting features of the training support set through a preset feature extraction network, carrying out average value operation on samples of the same category of the training support set to obtain a category prototype, and extracting features of the query set through the preset feature extraction network to obtain a query set feature vector;
s23, calculating Euclidean distances between the feature vectors of the query set and the prototype of each category;
s24, calculating the weight between the query set feature vector and each class prototype through a weight generator, multiplying the weight by the Euclidean distance of the class prototype to obtain a weighted Euclidean distance, wherein the weight generator is a multilayer learnable neural network, and continuously updating parameters in training to generate the most appropriate weight value so as to obtain the trained weight generator;
s25, classifying the weighted Euclidean distance through a classifier to obtain a classification result;
s26, optimizing parameters of the SAR image small sample recognition model based on the weighted distance through the loss function;
s27, judging whether the iteration times reach the preset iteration times or not, if not, repeatedly executing the step S21 to the step S26, and if so, ending the training.
3. The method according to claim 1, wherein the step of constructing the preset feature extraction network in step S2 specifically includes:
s31, constructing a convolutional neural network, and obtaining a characteristic diagram through the convolutional neural network, wherein the convolutional neural network comprises: the device comprises a two-dimensional convolution layer, a down-sampling layer, a batch normalization layer and a nonlinear activation function;
s32, adding a channel attention mechanism into the characteristic diagram for processing to obtain an attention value, wherein the channel attention mechanism processing process comprises the following steps:
compressing the spatial features in a single channel of the feature map through a global average pooling operation to obtain a global feature descriptor S c
Figure FDA0003674141540000021
Wherein H, W represents the length and width of the feature map, respectively, and f c Representing an input characteristic diagram, wherein i represents the ith pixel point in the horizontal direction, and j represents the jth pixel point in the vertical direction;
obtaining the relation between different channels in the characteristic diagram through two full-connection layers, predicting the importance of each channel, then processing the channel by using a Sigmoid activation function to obtain an attention value U,
U=Sigmoid(FC 2 (ReLU(FC 1 (S))) equation 2;
therein, FC 1 (. o) and FC 2 (. to) denotes two fully-connected layers, one before and one after, respectively, S ═ S 1 ,s 2 ,…,s C ]∈R C×1×1 ReLU (-) represents a ReLU activation function, Sigmoid (-) represents a Sigmoid activation function, obtained U is an attention value, and finally the attention value and the original feature F are combined l Multiplying the vectors by elements to obtain a feature map F after the attention of the channel is optimized al
S33, performing multi-scale feature fusion on the feature graph after the channel attention optimization, specifically comprising:
performing up-sampling from the end of the convolutional neural network, starting from the characteristic diagram with the lowest resolution, and performing addition operation on the characteristic diagram obtained after the up-sampling and the channel attention mechanism processing and the adjacent characteristic diagram with the specific resolution;
processing the multi-scale fused features by using an adjusting block, wherein the adjusting block comprises three parts: the 1 × 1 convolution, the RELU function and the global average pooling layer, and the features output by the adjusting block are used as the output of the feature extraction network.
4. The method according to claim 1, wherein the preset loss function constructing step in step S2 specifically includes:
acquiring a cross entropy loss function and a weight generation loss function, and combining the cross entropy loss function and the weight generation loss function to acquire a loss function, specifically comprising:
the cross entropy loss function is obtained by equation 3:
Figure FDA0003674141540000031
wherein (x) i ,y i ) Representing samples and real labels of a query set, N represents the number of samples of all the query sets, and the loss function has the function of measuring the difference between a predicted label and a real label;
the weight generation loss function is obtained by equation 4:
Figure FDA0003674141540000032
wherein C represents the number of categories, w ij Representing the weight of the ith query set sample corresponding to the jth class generated by the weight generator;
the loss function is obtained by equation 5:
Figure FDA0003674141540000033
5. the method according to claim 2, wherein the inputting the test set into a trained feature extraction network to obtain a recognition result specifically comprises:
dividing a test set into a test support set and a test query set, respectively carrying out feature extraction on samples in the test support set and the test query set through a trained feature extraction network, carrying out class mean processing on sample features in the test support set to obtain prototype vectors of new classes, calculating Euclidean distances between the sample vectors in the test query set and the prototype vectors of the new classes, sending the sample vectors in the test query set and the prototype vectors of the new classes into a trained weight generator to obtain various weight values, correspondingly multiplying the various weight values by the Euclidean distances, and outputting an identification result through a classifier.
6. A SAR image small sample recognition device based on weighted distance is characterized by comprising:
the SAR image small sample data acquisition module is used for acquiring SAR image small sample data and dividing the SAR image small sample data into a training set and a testing set;
the training module is used for carrying out iterative training on a preset feature extraction network through a training set based on preset iterative times so as to obtain the trained feature extraction network, and parameters in the feature extraction network are updated through a preset loss function in each iterative training, wherein a channel attention mechanism and a multi-scale feature fusion structure are added into the preset feature extraction network;
and the test module is used for inputting the test set into the trained feature extraction network to obtain a recognition result.
7. The apparatus of claim 1, wherein the training module specifically comprises:
the division submodule is used for dividing the training set into a training support set and a training query set;
the extraction submodule is used for extracting the features of the training support set through a preset feature extraction network, carrying out average value operation on the same type samples of the training support set to obtain a type prototype, and extracting the features of the training query set through the preset feature extraction network to obtain a training query set feature vector;
the calculation submodule is used for calculating the Euclidean distance between the feature vector of the training query set and each category prototype;
the weighting submodule is used for calculating the weight between the training query set feature vector and each class prototype through a weight generator and multiplying the weight by the Euclidean distance of the class prototype to obtain a weighted Euclidean distance, wherein the weight generator is a multilayer learnable neural network, and parameters are continuously updated in the training process to generate the most appropriate weight value so as to obtain the trained weight generator;
the classification submodule is used for classifying the weighted Euclidean distance through a classifier to obtain a classification result;
the optimization submodule is used for optimizing parameters of the SAR image small sample recognition model based on the weighted distance through the loss function;
and the judging module is used for judging whether the iteration times reach the preset iteration times, if not, the dividing submodule, the extracting submodule, the calculating submodule, the weighting submodule, the classifying submodule and the optimizing submodule are called, and if the preset iteration times are reached, the training is finished.
8. The apparatus according to claim 6, wherein the feature extraction network preset in the training module is specifically configured to:
constructing a convolutional neural network, and obtaining a feature map through the convolutional neural network, wherein the convolutional neural network comprises: the device comprises a two-dimensional convolution layer, a down-sampling layer, a batch normalization layer and a nonlinear activation function;
adding a channel attention mechanism into the characteristic diagram to process the characteristic diagram to obtain an attention value, wherein the channel attention mechanism processing process comprises the following steps:
for the bit by a global average pooling operationCompressing the spatial features in a single channel of the feature map to obtain a global feature descriptor S c
Figure FDA0003674141540000051
Wherein H, W represents the length and width of the feature map, respectively, and f c Representing an input characteristic diagram, wherein i represents the ith pixel point in the horizontal direction, and j represents the jth pixel point in the vertical direction;
obtaining the relation between different channels in the characteristic diagram through two full-connection layers, predicting the importance of each channel, then processing the channel by using a Sigmoid activation function to obtain an attention value U,
U=Sigmoid(FC 2 (ReLU(FC 1 (S))) formula 2;
therein, FC 1 (. cndot.) and FC 2 (. to) denotes two fully-connected layers, one before the other, and S ═ S 1 ,s 2 ,…,s C ]∈R C×1×1 ReLU (·) represents a ReLU activation function, Sigmoid (·) represents a Sigmoid activation function, obtained U is an attention value, and finally the attention value and the original feature F are combined l Multiplying the vectors by elements to obtain a feature map F after the attention of the channel is optimized al
Performing multi-scale feature fusion on the feature map after the channel attention optimization, specifically comprising:
performing up-sampling from the end of the convolutional neural network, starting from the characteristic diagram with the lowest resolution, and performing addition operation on the characteristic diagram obtained after the up-sampling and the channel attention mechanism processing and the adjacent characteristic diagram with the specific resolution;
processing the multi-scale fused features by using an adjusting block, wherein the adjusting block comprises three parts: the 1 × 1 convolution, the RELU function and the global average pooling layer, and the features output by the adjusting block are used as the output of the feature extraction network.
9. The apparatus of claim 6, wherein the preset loss function in the training module is specifically configured to:
the cross entropy loss function is obtained by equation 3,
Figure FDA0003674141540000061
wherein (x) i ,y i ) The loss function is used for measuring the difference between a predicted label and a real label;
the weight generation loss function is obtained by equation 4,
Figure FDA0003674141540000062
wherein C represents the number of categories, w ij Representing the weight of the ith training query set sample corresponding to the jth class generated by the weight generator
Obtaining the loss function by equation 5
Figure FDA0003674141540000071
10. The apparatus of claim 7, wherein the testing module is specifically configured to:
dividing a test set into a test support set and a test query set, respectively carrying out feature extraction on samples in the test support set and the test query set through a trained feature extraction network, carrying out class mean processing on sample features in the test support set to obtain prototype vectors of new classes, calculating Euclidean distances between the sample vectors in the test query set and the prototype vectors of the new classes, sending the sample vectors in the test query set and the prototype vectors of the new classes into a trained weight generator to obtain various weight values, correspondingly multiplying the various weight values by the Euclidean distances, and outputting an identification result through a classifier.
CN202210618273.7A 2022-06-01 2022-06-01 SAR image small sample identification method and device based on weighted distance Pending CN114926693A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210618273.7A CN114926693A (en) 2022-06-01 2022-06-01 SAR image small sample identification method and device based on weighted distance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210618273.7A CN114926693A (en) 2022-06-01 2022-06-01 SAR image small sample identification method and device based on weighted distance

Publications (1)

Publication Number Publication Date
CN114926693A true CN114926693A (en) 2022-08-19

Family

ID=82813351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210618273.7A Pending CN114926693A (en) 2022-06-01 2022-06-01 SAR image small sample identification method and device based on weighted distance

Country Status (1)

Country Link
CN (1) CN114926693A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115452957A (en) * 2022-09-01 2022-12-09 北京航空航天大学 Small sample metal damage identification method based on attention prototype network
CN115754108A (en) * 2022-11-23 2023-03-07 福建省杭氟电子材料有限公司 Acidity measuring system and method for electronic-grade hexafluorobutadiene
CN116188875A (en) * 2023-03-29 2023-05-30 北京百度网讯科技有限公司 Image classification method, device, electronic equipment, medium and product
CN116561322A (en) * 2023-06-30 2023-08-08 鹏城实验室 Relation extracting method, relation extracting device and medium for network information

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115452957A (en) * 2022-09-01 2022-12-09 北京航空航天大学 Small sample metal damage identification method based on attention prototype network
CN115452957B (en) * 2022-09-01 2024-04-12 北京航空航天大学 Small sample metal damage identification method based on attention prototype network
CN115754108A (en) * 2022-11-23 2023-03-07 福建省杭氟电子材料有限公司 Acidity measuring system and method for electronic-grade hexafluorobutadiene
CN116188875A (en) * 2023-03-29 2023-05-30 北京百度网讯科技有限公司 Image classification method, device, electronic equipment, medium and product
CN116188875B (en) * 2023-03-29 2024-03-01 北京百度网讯科技有限公司 Image classification method, device, electronic equipment, medium and product
CN116561322A (en) * 2023-06-30 2023-08-08 鹏城实验室 Relation extracting method, relation extracting device and medium for network information
CN116561322B (en) * 2023-06-30 2023-09-12 鹏城实验室 Relation extracting method, relation extracting device and medium for network information

Similar Documents

Publication Publication Date Title
CN110135267B (en) Large-scene SAR image fine target detection method
CN111160311B (en) Yellow river ice semantic segmentation method based on multi-attention machine system double-flow fusion network
CN110443143B (en) Multi-branch convolutional neural network fused remote sensing image scene classification method
Kang et al. Graph relation network: Modeling relations between scenes for multilabel remote-sensing image classification and retrieval
CN108764063B (en) Remote sensing image time-sensitive target identification system and method based on characteristic pyramid
Wang et al. Few-shot SAR automatic target recognition based on Conv-BiLSTM prototypical network
CN114926693A (en) SAR image small sample identification method and device based on weighted distance
CN111259930A (en) General target detection method of self-adaptive attention guidance mechanism
CN113392931B (en) Hyperspectral open set classification method based on self-supervision learning and multitask learning
CN110309868A (en) In conjunction with the hyperspectral image classification method of unsupervised learning
CN109375186A (en) Radar target identification method based on the multiple dimensioned one-dimensional convolutional neural networks of depth residual error
US20210097344A1 (en) Target identification in large image data
CN103714148B (en) SAR image search method based on sparse coding classification
Fan et al. A novel sonar target detection and classification algorithm
CN110705600A (en) Cross-correlation entropy based multi-depth learning model fusion method, terminal device and readable storage medium
CN111639697B (en) Hyperspectral image classification method based on non-repeated sampling and prototype network
CN110245683A (en) The residual error relational network construction method that sample object identifies a kind of less and application
Franchi et al. Latent discriminant deterministic uncertainty
CN116342894A (en) GIS infrared feature recognition system and method based on improved YOLOv5
CN116630700A (en) Remote sensing image classification method based on introduction channel-space attention mechanism
CN116665153A (en) Road scene segmentation method based on improved deep bv3+ network model
CN114973031A (en) Visible light-thermal infrared image target detection method under view angle of unmanned aerial vehicle
CN114973019A (en) Deep learning-based geospatial information change detection classification method and system
CN113392876B (en) Small sample image classification method based on graph neural network
CN113239895A (en) SAR image change detection method of capsule network based on attention mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination