A Gaussian prototype network model based on capsule
Through the capsule-based Gaussian prototype network model, the problems of poor detection of spatial relationships and feature loss in SAR image target recognition in the existing technology are solved. The capsule embedding network is used to capture the advantages of visual features such as the shape, size and posture of the object. Combined with the attention mechanism to learn deeper features, the influence of difference samples on the model recognition effect is alleviated, and the influence of the visual features of the shape, size and position of the object in the existing technology is solved. The problems of poor detection and feature loss of visual features such as the shape, size and posture of the object in the existing technology are solved, and better visual feature extraction and classification performance are achieved.
Patent Information
- Application Number
- CN202411329011.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Although the existing CNN-based image recognition and classification methods have improved the accuracy in SAR image target recognition, they perform poorly in detecting the spatial relationship between different parts of SAR images, and important detail feature information is lost after the pooling operation in the network.
A capsule-based Gaussian prototype network model is adopted, and the capsule embedding network is used to capture visual features such as the shape, size, and posture of objects. The attention mechanism is combined to learn deeper features, and the Gaussian prototype learning module is used to generate Gaussian prototypes for each category to alleviate the impact of different samples on the model recognition effect.
It improves the accuracy of SAR image target recognition, reduces the loss of feature information, can better capture the spatial relationship of objects, and achieves effective feature learning with a small amount of data, similar to the way the human brain thinks, thereby improving the classification performance of the model.
Smart Images

Figure CN119358598B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a capsule-based Gaussian prototype network model. Background Art
[0002] Due to the characteristics of SAR images being all-day, all-weather and highly penetrating, their target recognition task has high research and application value in both civilian and military fields. It aims to automatically locate and identify SAR targets from images in a short period of time. When performing target recognition on SAR images, CNN-based image recognition and classification methods are used. Although CNN-based image recognition and classification methods such as prototype networks have greatly improved the accuracy of small sample target recognition in SAR images, they perform poorly in detecting the spatial relationship between different parts of SAR images, and often lose a lot of important detail feature information after the pooling operation in the network. Summary of the Invention
[0003] In order to overcome the problem that CNN-based image recognition and classification methods are used when performing target recognition in SAR images, although CNN-based image recognition and classification methods such as prototype networks have greatly improved the accuracy of small sample target recognition in SAR images, they perform poorly in detecting the spatial relationship between different parts of SAR images, and often lose a lot of important detail feature information after the pooling operation in the network.
[0004] The technical solution of the present invention is: a capsule-based Gaussian prototype network model, comprising:
[0005] Belief network, used to distinguish the importance of different samples by calculating the Gaussian weights of generated support samples;
[0006] Capsule embedding network, which uses capsule network architecture to capture visual features such as shape, size, and pose of objects in SAR images;
[0007] The Gaussian prototype learning module is used to generate the Gaussian prototype of each category by learning the contribution of samples from different support sets, which can alleviate the impact of different samples on the model recognition effect.
[0008] Preferably, the model uses a capsule network as the feature embedding network of the prototype network, which not only takes advantage of the capsule embedding network's ability to better capture visual features such as the shape, size, and posture of objects, and combines the attention mechanism to learn deeper features of SAR images, but also abandons the complex and computationally intensive reconstruction network module of the capsule network and uses the classification network of the prototype network; the confidence network can distinguish the importance of different samples by calculating the Gaussian weights of the generated support samples; the Gaussian prototype learning module generates the Gaussian prototype of each category by learning the contribution degree of samples from different support sets, which can alleviate the influence of different samples on the model recognition effect and better solve the problem of excessive gaps between the same categories of SAR images.
[0009] Preferably, the belief network includes four convolution blocks and a softplus function, each convolution block includes a convolution layer and a maximum pooling layer with a window size of 2×2 and a step size of 2, wherein the principle formula of the softplus function is:
[0010] softplus(x)=1+log(1+e x ).
[0011] As a preference, the structures of the four convolutional blocks in the belief network are:
[0012] A11: {3×3-conv(in_channels=1, out_channels=32, stride=1), BatchNorm, ReLU};
[0013] A12: {3×3-conv(in_channels=32, out_channels=64, stride=1), BatchNorm, ReLU};
[0014] A13: {3×3-conv(in_channels=64, out_channels=128, stride=1), BatchNorm, ReLU};
[0015] A14: {3×3-conv(in_channels=128, out_channels=128, stride=1), BatchNorm, ReLU}.
[0016] Preferably, the capsule embedding network includes a first convolutional layer, a second convolutional layer, an SE module, a main capsule layer and a digital capsule layer. The first convolutional layer is used to extract the primary features of the SAR image, the SE module is used to strengthen the extraction of image features and perform weighted fusion, the second convolutional layer is used to further extract the high-level features of the target, the main capsule layer is used to extract the entity of the SAR target with the extracted high-level features as input, and the digital capsule layer is used to perform weighted fusion on the results of the main capsule layer.
[0017] Preferably, in the capsule embedding network, the structure of the first convolutional layer is:
[0018] {5×5-conv(in _ channels=1,out _ channels=128, stride=2, padding=0), ReLU};
[0019] The structure of the second convolutional layer is:
[0020] {3×3-conv(in _ channel s=128, out _ channels=128, stride=2, padding=1), ReLU}.
[0021] Preferably, in the capsule embedding network, the main capsule layer is a convolutional capsule layer, and the convolution structure of the main capsule layer is:
[0022] {3×3-conv(in _ channel s=128, out _ channels=128, stride=2, padding=1), ReLU};
[0023] The main capsule layer includes 16 main capsules, each of which is 12×12 in size, with a total of 16×12×12 primary capsules, and the dimension of each primary capsule is 8.
[0024] Preferably, the capsule embedding network includes the following steps when capturing visual features such as shape, size, and pose of objects in SAR images:
[0025] S11: Input a SAR image x of size 100×100 into the capsule embedding network. First, the first convolutional layer is used to extract the primary features of the SAR image x, and a feature map of size 48×48×128 is obtained:
[0026] F1=σ(W1(x));
[0027] Where W1 is the weight parameter of convolutional layer 1, σ(.) represents the ReLU activation function;
[0028] S12: The extracted primary features are passed through the SE module to enhance the extraction of image features and perform weighted fusion to obtain a new feature map:
[0029] F1 AA =att(F1);
[0030] Where, att(·) is the SE operation;
[0031] S13: Input the weighted feature map output by the SE module into the second convolutional layer to further extract high-level features of the target and obtain a feature map F2 of size 24×24×128;
[0032] S14: Then pass through an SE module and add a dropout layer to avoid network overfitting. During each training, 50% of the neurons are randomly selected and not involved in the training. The calculation principle formula is:
[0033] F2=dropout(att(σ(W2(F1 AA ))));
[0034] Where W2 is the weight parameter of convolutional layer 2, σ(·) represents the ReLU activation function;
[0035] S15: The high-level feature F2 is used as the input of the main capsule layer to extract the entity of the SAR target;
[0036] S16: The primary capsules in the main capsule layer enter the digital capsule layer through the routing mechanism. The digital capsule layer performs weighted fusion on the primary capsules to obtain N digital capsule layers, where N represents the number of categories in the task set, and the dimension of the digital capsule layer is 16. The length of the digital capsule layer represents the probability that the target belongs to each category.
[0037] Preferably, the primary capsules in the main capsule layer enter the digital capsule layer through the routing mechanism. The digital capsule layer performs weighted fusion on the primary capsules to obtain N digital capsule layers, including the following steps:
[0038] S21: randomly initialized weight matrix W ij The output u of primary capsule i i Converted to the prediction of digital capsule layer j The calculation principle formula is:
[0039]
[0040] S22: Prediction capsule The weight is used to determine which digital capsule layer the current capsule will be output to.
[0041] S23: Summing to obtain the input vector s of the digital capsule layer j j , where the calculation principle formula is:
[0042] Among them, c ij is the coupling coefficient between the two capsules;
[0043] S24: Use the nonlinear squash function as the activation function so that the output vector v j The length of v is reduced to between 0 and 1 and v j and s j The direction is consistent, and the calculation principle formula is:
[0044]
[0045] Here, ||·|| represents the L2 norm.
[0046] As a preference, the connection weights between the primary capsule and the digital capsule layer are calculated by the coefficient c in the dynamic routing algorithm. ij The update is performed, wherein the iterative update process includes the following steps:
[0047] S31: The connection probability b between the primary capsule i and the digital capsule layer j ij Initialized to 0;
[0048] S32: Calculate coefficient c through Softmax function ij , where the calculation principle formula is:
[0049]
[0050] S33: Perform weighted summation on all prediction capsules and obtain the output capsule v through the activation function squash j ;
[0051] S34: Convert all capsules in the lower layer into the input capsule With output capsule v j Do a dot multiplication and update b ij , where the calculation principle formula is:
[0052]
[0053] S35: When the predetermined number of routing iterations is reached, the loop stops; otherwise, the process jumps to step S32.
[0054] Preferably, compared with traditional CNN, CapsNet has the following advantages: (1) Deeper feature learning; CNN output is a scalar, which does not learn the relationship between features and the posture information of features; while CapsNet output is a vector, whose direction represents the instantiation parameter of the target and its length represents the probability of target prediction; it can not only discriminate features based on statistical information, but also learn deeper features of objects and improve classification performance; (2) Fewer training samples are required; CNN often requires a large number of training samples to extract image features through multi-layer convolution operations; while CapsNet uses capsule structure to more effectively extract effective image features, so it can generalize well without too many training samples; (3) Less feature information is lost;
[0055] Preferably, the pooling operation in the CNN model will lose a lot of important feature information, especially the maximum pooling operation; CapsNet replaces the pooling operation with a dynamic routing mechanism. Except for the last layer of capsules, all capsules are convolutional, and each capsule carries a large amount of different target information. The lower-level feature information will only be transmitted to the matching high-level features, thereby reducing the loss rate of important feature information.
[0056] Preferably, the Gaussian prototype learning module is generated by weighting the feature embedding vectors of the support set samples with Gaussian weights.
[0057] Preferably, a loss function is also included, and the loss function is a softmax function.
[0058] Preferably, by learning the contribution of samples from different support sets to generate Gaussian prototypes for each category, the impact of different samples on the model recognition effect can be alleviated, and the problem of large gaps between the same categories of SAR images can be better solved.
[0059] Preferably, the model is trained by the following steps:
[0060] S41: Data generation stage, the training set and test set are randomly sampled by the random generator to generate the corresponding support set and query set;
[0061] S42: Model training phase, the support set samples x of the training set are i and query set sample x j Input to the embedding network of the Caps-GPNet model respectively In the embedding vector and The support set samples x of the training set i Input to the belief network f ψ The image obtained is the Gaussian weight σ i Then and σ i Multiply element by element and learn the module g through Gaussian prototype G Get the Gaussian prototype of each category in the support set, and then calculate Label prediction is done based on the metric distance between each class’s Gaussian prototype;
[0062] S43: Back propagate the loss calculated based on the predicted label and the true label to update the network parameters.
[0063] Beneficial effects of the present invention:
[0064] 1. Compared with existing technologies, CNN-based image recognition and classification methods are used for target recognition in SAR images. Although CNN-based image recognition and classification methods such as prototype networks have greatly improved the accuracy of small-sample target recognition in SAR images, they perform poorly in detecting the spatial relationships between different parts of SAR images. In addition, a lot of important detailed feature information is often lost after the pooling operation in the network. This network model combines capsule networks with attention mechanisms to enhance the network's feature extraction capabilities for images, and improves the reconstruction network of capsule networks to increase training speed. It can achieve good representation effects by learning with only a small amount of data, which is closer to the way the human brain thinks. It can better model the hierarchical relationship of internal knowledge representation in neural networks, thereby better capturing visual features such as the shape, size, and pose of objects. Its multi-dimensional vector neurons can represent more features of the target.
[0065] 2. This model uses a capsule network as the feature embedding network for the prototype network. This not only leverages the capsule embedding network's ability to better capture visual features such as object shape, size, and pose, but also incorporates an attention mechanism to learn deeper features of SAR images. Furthermore, the model eliminates the computationally complex reconstruction network module of the capsule network and instead uses the prototype network's classification network. The confidence network distinguishes the importance of different samples by calculating the Gaussian weights of generated support samples. The Gaussian prototype learning module generates Gaussian prototypes for each category by learning the contribution of samples from different support sets. This mitigates the impact of different samples on model recognition and better addresses the issue of large discrepancies between the same categories in SAR images.
[0066] 3. The pooling operation in the CNN model will lose a lot of important feature information, especially the maximum pooling operation. CapsNet replaces the pooling operation with a dynamic routing mechanism. Except for the last layer of capsules, all capsules are convolutional, and each capsule carries a large amount of different target information. The lower-level feature information is only transmitted to the matching high-level features, thereby reducing the loss rate of important feature information.
[0067] 4. By learning the contribution of samples from different support sets to generate Gaussian prototypes for each category, the impact of different samples on the model recognition effect can be alleviated, and the problem of large gaps between the same categories of SAR images can be better solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 Shown is a schematic diagram of the structure of the capsule-based Gaussian prototype network model of the present invention;
[0069] Figure 2 Shown is a schematic diagram of the construction of a capsule embedding network in the capsule-based Gaussian prototype network model of the present invention;
[0070] Figure 3 Shown is a schematic diagram of the construction of a capsule structure in a capsule embedding network in the capsule-based Gaussian prototype network model of the present invention;
[0071] Figure 4 Shown is a schematic diagram of the dynamic routing process of the primary capsule and digital capsule layer in the capsule-based Gaussian prototype network model of the present invention;
[0072] Figure 5 Shown is a schematic diagram of the model training process in the capsule-based Gaussian prototype network model of the present invention. DETAILED DESCRIPTION
[0073] The present invention will be further described below with reference to the accompanying drawings and examples.
[0074] See also Figure 1-3 The present invention provides an embodiment: a capsule-based Gaussian prototype network model, including a capsule-based Gaussian prototype network model, including:
[0075] Belief network, used to distinguish the importance of different samples by calculating the Gaussian weights of generated support samples;
[0076] Capsule embedding network, which uses capsule network architecture to capture visual features such as shape, size, and pose of objects in SAR images;
[0077] The Gaussian prototype learning module is used to generate the Gaussian prototype of each category by learning the contribution of samples from different support sets, which can alleviate the impact of different samples on the model recognition effect.
[0078] Preferably, the model uses a capsule network as the feature embedding network of the prototype network, which not only takes advantage of the capsule embedding network's ability to better capture visual features such as the shape, size, and posture of objects, and combines the attention mechanism to learn deeper features of SAR images, but also abandons the complex and computationally intensive reconstruction network module of the capsule network and uses the classification network of the prototype network; the confidence network can distinguish the importance of different samples by calculating the Gaussian weights of the generated support samples; the Gaussian prototype learning module generates the Gaussian prototype of each category by learning the contribution degree of samples from different support sets, which can alleviate the influence of different samples on the model recognition effect and better solve the problem of excessive gaps between the same categories of SAR images.
[0079] Preferably, the belief network includes four convolution blocks and a softplus function, each convolution block includes a convolution layer and a maximum pooling layer with a window size of 2×2 and a step size of 2, wherein the principle formula of the softplus function is:
[0080] softplus(x)=1+log(1+e x ).
[0081] As a preference, the structures of the four convolutional blocks in the belief network are:
[0082] A11: {3×3-conv(in_channels=1, out_channels=32, stride=1), BatchNorm, ReLU};
[0083] A12: {3×3-conv(in_channels=32, out_channels=64, stride=1), BatchNorm, ReLU};
[0084] A13: {3×3-conv(in_channels=64, out_channels=128, stride=1), BatchNorm, ReLU};
[0085] A14: {3×3-conv(in_channels=128, out_channels=128, stride=1), BatchNorm, ReLU}.
[0086] See also Figure 4In this embodiment, the capsule embedding network includes a first convolutional layer, a second convolutional layer, an SE module, a main capsule layer and a digital capsule layer. The first convolutional layer is used to extract the primary features of the SAR image. The SE module is used to strengthen the extraction of image features and perform weighted fusion. The second convolutional layer is used to further extract the high-level features of the target. The main capsule layer is used to extract the entity of the SAR target using the extracted high-level features as input. The digital capsule layer is used to perform weighted fusion on the results of the main capsule layer.
[0087] Preferably, in the capsule embedding network, the structure of the first convolutional layer is:
[0088] {5×5-conv(in _ channels=1,out _ channels=128, stride=2, padding=0), ReLU};
[0089] The structure of the second convolutional layer is:
[0090] {3×3-conv(in _ channel s=128, out _ channels=128, stride=2, padding=1), ReLU}.
[0091] Preferably, in the capsule embedding network, the main capsule layer is a convolutional capsule layer, and the convolution structure of the main capsule layer is:
[0092] {3×3-conv(in _ channel s=128, out _ channels=128, stride=2, padding=1), ReLU};
[0093] The main capsule layer includes 16 main capsules, each of which is 12×12 in size, with a total of 16×12×12 primary capsules, and the dimension of each primary capsule is 8.
[0094] Preferably, the capsule embedding network includes the following steps when capturing visual features such as shape, size, and pose of objects in SAR images:
[0095] S11: Input a SAR image x of size 100×100 into the capsule embedding network. First, the first convolutional layer is used to extract the primary features of the SAR image x, and a feature map of size 48×48×128 is obtained:
[0096] F1=σ(W1(x));
[0097] Where W1 is the weight parameter of convolutional layer 1, σ(.) represents the ReLU activation function;
[0098] S12: The extracted primary features are passed through the SE module to enhance the extraction of image features and perform weighted fusion to obtain a new feature map:
[0099] F1 AA =att(F1);
[0100] Where, att(·) is the SE operation;
[0101] S13: Input the weighted feature map output by the SE module into the second convolutional layer to further extract high-level features of the target and obtain a feature map F2 of size 24×24×128;
[0102] S14: Then pass through an SE module and add a dropout layer to avoid network overfitting. During each training, 50% of the neurons are randomly selected and not involved in the training. The calculation principle formula is:
[0103] F2=dropout(att(σ(W2(F1 AA ))));
[0104] Where W2 is the weight parameter of convolutional layer 2, σ(·) represents the ReLU activation function;
[0105] S15: The high-level feature F2 is used as the input of the main capsule layer to extract the entity of the SAR target;
[0106] S16: The primary capsules in the main capsule layer enter the digital capsule layer through the routing mechanism. The digital capsule layer performs weighted fusion on the primary capsules to obtain N digital capsule layers, where N represents the number of categories in the task set, and the dimension of the digital capsule layer is 16. The length of the digital capsule layer represents the probability that the target belongs to each category.
[0107] Preferably, the primary capsules in the main capsule layer enter the digital capsule layer through the routing mechanism. The digital capsule layer performs weighted fusion on the primary capsules to obtain N digital capsule layers, including the following steps:
[0108] S21: randomly initialized weight matrix W ij The output u of primary capsule i i Converted to the prediction of digital capsule layer j The calculation principle formula is:
[0109]
[0110] S22: Prediction capsule The weight is used to determine which digital capsule layer the current capsule will be output to.
[0111] S23: Summing to obtain the input vector s of the digital capsule layer j j , where the calculation principle formula is:
[0112] Among them, c ij is the coupling coefficient between the two capsules;
[0113] S24: Use the nonlinear squash function as the activation function so that the output vector v j The length of v is reduced to between 0 and 1 and v j and s j The direction is consistent, and the calculation principle formula is:
[0114]
[0115] Here, ||·|| represents the L2 norm.
[0116] As a preference, the connection weights between the primary capsule and the digital capsule layer are calculated by the coefficient c in the dynamic routing algorithm. ij The update is performed, wherein the iterative update process includes the following steps:
[0117] S31: The connection probability b between the primary capsule i and the digital capsule layer j ij Initialized to 0;
[0118] S32: Calculate coefficient c through Softmax function ij , where the calculation principle formula is:
[0119]
[0120] S33: Perform weighted summation on all prediction capsules and obtain the output capsule v through the activation function squash j ;
[0121] S34: Convert all capsules in the lower layer into the input capsule With output capsule v j Do a dot multiplication and update b ij , where the calculation principle formula is:
[0122]
[0123] S35: When the predetermined number of routing iterations is reached, the loop stops; otherwise, the process jumps to step S32.
[0124] Preferably, compared with traditional CNN, CapsNet has the following advantages: (1) Deeper feature learning; CNN output is a scalar, which does not learn the relationship between features and the posture information of features; while CapsNet output is a vector, whose direction represents the instantiation parameter of the target and its length represents the probability of target prediction; it can not only discriminate features based on statistical information, but also learn deeper features of objects and improve classification performance; (2) Fewer training samples are required; CNN often requires a large number of training samples to extract image features through multi-layer convolution operations; while CapsNet uses capsule structure to more effectively extract effective image features, so it can generalize well without too many training samples; (3) Less feature information is lost;
[0125] Preferably, the pooling operation in the CNN model will lose a lot of important feature information, especially the maximum pooling operation; CapsNet replaces the pooling operation with a dynamic routing mechanism. Except for the last layer of capsules, all capsules are convolutional, and each capsule carries a large amount of different target information. The lower-level feature information will only be transmitted to the matching high-level features, thereby reducing the loss rate of important feature information.
[0126] Preferably, the Gaussian prototype learning module is generated by weighting the feature embedding vectors of the support set samples with Gaussian weights.
[0127] Preferably, a loss function is also included, and the loss function is a softmax function.
[0128] Preferably, by learning the contribution of samples from different support sets to generate Gaussian prototypes for each category, the impact of different samples on the model recognition effect can be alleviated, and the problem of large gaps between the same categories of SAR images can be better solved.
[0129] See also Figure 5 In this embodiment, the model is trained by the following steps:
[0130] S41: Data generation stage, the training set and test set are randomly sampled by the random generator to generate the corresponding support set and query set;
[0131] S42: Model training phase, the support set samples x of the training set are i and query set sample x j Input to the embedding network of the Caps-GPNet model respectively In the embedding vector and The support set samples x of the training set i Input to the belief network f ψ The image obtained is the Gaussian weight σ iThen and σ i Multiply element by element and learn the module g through Gaussian prototype G Get the Gaussian prototype of each category in the support set, and then calculate Label prediction is done based on the metric distance between each class’s Gaussian prototype;
[0132] S43: Back propagate the loss calculated based on the predicted label and the true label to update the network parameters.
[0133] Through the above steps, (a summary of the working principle part).
[0134] The embodiments of the present invention are described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Various changes can be made within the scope of knowledge of those skilled in the art without departing from the spirit of the present invention.
Claims
1. A capsule-based Gaussian prototype network model; characterized by: Includes: Belief network, used to distinguish the importance of different samples by calculating the Gaussian weights of generated support samples; Capsule embedding network, which uses capsule network architecture to capture the shape, size and pose visual features of objects in SAR images; The Gaussian prototype learning module is used to generate the Gaussian prototype of each category by learning the contribution of samples from different support sets, which can alleviate the impact of different samples on the model recognition effect; The capsule embedding network includes the first convolutional layer, the second convolutional layer, the SE module, the main capsule layer, and the digital capsule layer. The first convolutional layer is used to extract the primary features of the SAR image. The SE module is used to strengthen the extraction of image features and perform weighted fusion. The second convolutional layer is used to further extract the high-level features of the target. The main capsule layer is used to extract the entity of the SAR target using the extracted high-level features as input. The digital capsule layer is used to perform weighted fusion on the results of the main capsule layer. The model is trained by following the steps below: S41: Data generation stage, the training set and test set are randomly sampled by the random generator to generate the corresponding support set and query set; S42: Model training phase, the support set samples x of the training set are i and query set sample x j Input to the embedding network of the Caps-GPNet model respectively In the embedding vector and The support set samples x of the training set i Input to the belief network f ψ The image obtained is the Gaussian weight σ i ; then and σ i Multiply element by element and learn the module g through Gaussian prototype G Get the Gaussian prototype of each category in the support set, and then calculate Label prediction is done based on the metric distance between each class’s Gaussian prototype; S43: Back propagate the loss calculated based on the predicted label and the true label to update the network parameters.
2. The capsule-based Gaussian prototype network model according to claim 1, characterized in that: The belief network consists of four convolution blocks and a softplus function. Each convolution block contains a convolution layer and a maximum pooling layer with a window size of 2×2 and a stride of 2. The principle formula of the softplus function is: softplus(x)=1+log(1+e x )。 3. The capsule-based Gaussian prototype network model according to claim 2, characterized in that: The structures of the four convolutional blocks in the belief network are: A11: {3×3-conv(in_channels=1, out_channels=32, stride=1), BatchNorm, ReLU}; A12: {3×3-conv(in_channels=32, out_channels=64, stride=1), BatchNorm, ReLU}; A13: {3×3-conv(in_channels=64, out_channels=128, stride=1), BatchNorm, ReLU}; A14: {3×3-conv(in_channels=128, out_channels=128, stride=1), BatchNorm, ReLU}.
4. The capsule-based Gaussian prototype network model according to claim 3, characterized in that: In the capsule embedding network, the structure of the first convolutional layer is: {5×5-conv(in_channels=1, out_channels=128, stride=2, padding=0), ReLU}; The structure of the second convolutional layer is: {3×3-conv(in_channels=128, out_channels=128, stride=2, padding=1), ReLU}.
5. The capsule-based Gaussian prototype network model according to claim 4, characterized in that: In the capsule embedding network, the main capsule layer is a convolutional capsule layer, and the convolution structure of the main capsule layer is: {3×3-conv(in_channels=128, out_channels=128, stride=2, padding=1), ReLU}; The main capsule layer includes 16 main capsules, each of which is 12×12 in size, with a total of 16×12×12 primary capsules, and the dimension of each primary capsule is 8.
6. The capsule-based Gaussian prototype network model according to claim 5, characterized in that: The capsule embedding network captures the shape, size, and pose visual features of objects in SAR images by following these steps: S11: Input a SAR image x of size 100×100 into the capsule embedding network. First, the first convolutional layer is used to extract the primary features of the SAR image x, and a feature map of size 48×48×128 is obtained: F1=σ(W1(x)); Where W1 is the weight parameter of convolutional layer 1, σ(·) represents the ReLU activation function; S12: The extracted primary features are passed through the SE module to enhance the extraction of image features and perform weighted fusion to obtain a new feature map: F1 AA =that(F1); Where, att(·) is the SE operation; S13: Input the weighted feature map output by the SE module into the second convolutional layer to further extract high-level features of the target and obtain a feature map F2 of size 24×24×128; S14: Then pass through an SE module and add a dropout layer to avoid network overfitting. During each training, 50% of the neurons are randomly selected and not involved in the training. The calculation principle formula is: F2=dropout(att(σ(W2(F1 AA )))); Where W2 is the weight parameter of convolutional layer 2, σ(·) represents the ReLU activation function; S15: The high-level feature F2 is used as the input of the main capsule layer to extract the entity of the SAR target; S16: The primary capsules in the main capsule layer enter the digital capsule layer through the routing mechanism. The digital capsule layer performs weighted fusion on the primary capsules to obtain N digital capsule layers, where N represents the number of categories in the task set, and the dimension of the digital capsule layer is 16. The length of the digital capsule layer represents the probability that the target belongs to each category.
7. The capsule-based Gaussian prototype network model according to claim 6, characterized in that: The primary capsules in the main capsule layer enter the digital capsule layer through the routing mechanism. The digital capsule layer performs weighted fusion on the primary capsules to obtain N digital capsule layers, including the following steps: S21: randomly initialized weight matrix W ij The output u of primary capsule i i Converted to the prediction of digital capsule layer j The calculation principle formula is: S22: Prediction capsule The weight is used to determine which digital capsule layer the current capsule will be output to. S23: Summing to obtain the input vector s of the digital capsule layer j j , where the calculation principle formula is: Among them, c ij is the coupling coefficient between the two capsules; S24: Use the nonlinear compression function as the activation function so that the output capsule v j The length of v is reduced to between 0 and 1 and v j and s j The direction is consistent, and the calculation principle formula is: Here, ||·|| represents the L2 norm.
8. The capsule-based Gaussian prototype network model according to claim 7, characterized in that: The connection weight between the primary capsule and the digital capsule layer is calculated by the coefficient c in the dynamic routing algorithm. ij The update is performed, wherein the iterative update process includes the following steps: S31: The connection probability b between the primary capsule i and the digital capsule layer j ij Initialized to 0; S32: Calculate coefficient c through Softmax function ij , where the calculation principle formula is: S33: Perform weighted summation on all prediction capsules and obtain the output capsule v through the activation function squash j ; S34: Convert all capsules in the lower layer into the predicted capsules With output capsule v j Do a dot multiplication and update b ij , where the calculation principle formula is: S35: When the predetermined number of routing iterations is reached, the loop stops; otherwise, the process jumps to step S32.
Citation Information
Patent Citations
Hyperspectral intelligent classification method based on prototype learning mechanism and multi-dimensional residual network
CN110348399A
Small sample ISAR image target identification method based on Gaussian prototype
CN112052762A