A single-sample face recognition method based on prototype and adversarial learning
By using prototype and adversarial learning methods in single-sample face recognition to extract and enrich face features, the problems of high quality requirements for training samples and lack of high-quality training sets in single-sample face recognition are solved, and higher recognition accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202111386834.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-11-22
AI Technical Summary
The existing single-sample face recognition method is difficult to effectively recognize faces when the training sample quality requirements are high and the lack of high-quality training sets, especially when facing noise such as expressions, lighting changes and occlusion.
Using a method based on prototype and adversarial learning, by fine-tuning the pre-trained network, extracting face features, and using the prototype network to learn the mapping of single-sample features to the class feature center, the design feature generator adds random noise to generate new features based on the prototype features, and introduces feature authenticity and false discriminators and change discriminators to enrich feature information, and ultimately corrects the classifier's decision-making boundary.
It improves the robustness and recognition accuracy of single-sample face recognition, can effectively deal with noise such as expressions, lighting changes and occlusion, and provides a more general classification method.
Smart Images

Figure CN114093002B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a single-sample face recognition method based on prototype and adversarial learning, and belongs to the technical field of face recognition. Background Art
[0002] Face recognition has always been a research hotspot in the field of computer vision and pattern recognition, and has broad application prospects in information security, access control, human-computer interaction, entertainment and other fields. In the past two decades, face recognition technology has made significant progress, such as the discriminant subspace learning method (PN Belhumeur, JP Hespanha. Kriegman, DJ "Eigenfaces vs. Fisherfaces: Recognition using class specific linear projection," IEEE Transactions on Pattern Analysis and Machine Intelligence, 1997, 19 (7): 711-720), the classification method based on sparse representation (J. Wright,, AY Yang, A. Ganesh,, SS Sastry, Y. Ma. "Robust face recognition via sparse representation," IEEE transactions on pattern analysis and machine intelligence, 2008, 31 (2), 210-227.), and at the same time, the rapid development of deep learning has brought new breakthroughs in face recognition tasks. Among the above methods, most of them require a large number of training samples to make the model robust. However, in many real-world scenarios, such as passport verification and ID card recognition, there is usually only one training sample, the so-called Single Sample Per Person (SSPP) problem. In this case, the classic face recognition method will face the situation where the recognition effect is degraded or even fails to work. In addition, the image to be recognized may contain many face variations, such as lighting, expression, and occlusion, which further increases the difficulty of solving the problem.
[0003] Among the many existing face recognition methods, the two most important parts are face feature extraction and feature-based classifier training. As one of the face recognition problems, single-sample face recognition is no exception, but the limited number of samples in each class and the complex intra-class face changes make this process more difficult. Image generation at the face image level can theoretically achieve the transition from single-sample face problems to multiple face recognition problems. However, due to the small sample problem, the generated images are disturbed by image noise and unstable face identity information, and cannot effectively improve the recognition accuracy. At the face image feature level, on the one hand, the features of a single training sample of each class cannot divide the feature space well; on the other hand, in practical applications, there are often problems where some categories have multiple samples and some categories have only single samples. This class imbalance problem also affects recognition. Multiple features in each class of multiple samples will squeeze the feature space of single-sample categories. Summary of the invention
[0004] The technical problem to be solved by the present invention is: to provide a single-sample face recognition method based on prototype and adversarial learning, to perform feature center correction on a single-sample training set, to design a feature generator to enrich the training samples, and to solve the problem that the current single-sample face recognition has high requirements on the quality of training samples and lacks high-quality training sets.
[0005] The technical solution of the present invention is a single-sample face recognition method based on prototype and adversarial learning, which comprises the following steps:
[0006] Step 1: Fine-tune the pre-trained network using all the face training data in the Baseset to obtain a network feature extraction model suitable for the target data set. During the fine-tuning process, the network input is a face image x, and the label is y. The pre-trained network is fine-tuned using the cross entropy loss to obtain a feature representation model φ(·) that maps the face image x to the feature space;
[0007] Step 2: Extract facial features based on feature representation model φ(·) With the help of the idea of prototype network, Baseset is used to learn a mapping from single sample features in Novelset to class feature centers to obtain the prototype features of Novelset;
[0008] Step 3: Based on the prototype features extracted in step 2, a prototype-guided feature generator is trained. Random noise is added as the input of the feature generator to generate new features. A feature true and false discriminator and a change discriminator are introduced to guide the feature generator to generate facial features with rich change information.
[0009] Step 4: Use the feature representation model to extract the real features And the facial features generated by the feature generator Train the classifier based on the features generated by the feature generator Correct the decision boundary of the classifier, and use the corrected classifier as the final test classifier;
[0010] Step 5: Test image x p Input into the feature representation model φ(·) to obtain the feature representation Then the feature representation Input into the final classifier to get the classification result.
[0011] The present invention discloses a single-sample face recognition method based on prototype and adversarial learning. The method uses Baseset (multiple samples per class) to fine-tune the pre-trained model to obtain a face feature representation model, and proposes to use the idea of prototype network to find the class feature center of a single sample in Novelset (single sample per class); then, a feature generator guided by prototype is trained according to the extracted features, random noise is added on the basis of the prototype feature center to generate new features, a feature true and false discriminator and a change discriminator are introduced to guide the feature generator to generate real features with rich change information, and a classifier is fused for multi-task learning to correct the decision boundary of the classifier. The present invention has good robustness to noises such as expression, illumination change and occlusion in face recognition, and has high recognition accuracy.
[0012] The present invention has the following beneficial effects:
[0013] 1) On the one hand, the present invention introduces feature prototypes to guide the feature generator to enhance the stability of the generated features, and on the other hand, introduces a change discriminator to enhance the richness of the generated features, thereby having a better correction effect on the decision boundary of the final classifier;
[0014] 2) The classifier proposed in the present invention for simultaneously classifying multiple sample categories and single sample categories is a more general classification method;
[0015] 3) The present invention has good robustness against noises such as expression, illumination change and occlusion in face recognition and has high recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings:
[0017] Figure 1 It is an algorithm flow chart of the single sample face recognition method based on prototype and adversarial learning of the present invention.
[0018] Figure 2 It is a schematic diagram of feature space expansion of the present invention.
[0019] Figure 3 It is a structural schematic diagram of the single-sample face recognition method based on prototype and adversarial learning of the present invention. DETAILED DESCRIPTION
[0020] See attached Figure 1-3 , a single sample face recognition method based on prototype and adversarial learning, the method comprises the following steps:
[0021] Step 1: Fine-tune the pre-trained network using all the face training data in the Baseset to obtain a network feature extraction model suitable for the target data set. During the fine-tuning process, the network input is a face image x, and the label is y. The pre-trained network is fine-tuned using the cross entropy loss to obtain a feature representation model φ(·) that maps the face image x to the feature space;
[0022] Step 2: Extract facial features based on feature representation model φ(·) With the help of the idea of prototype network, Baseset is used to learn a mapping from single sample features in Novelset to class feature centers to obtain the prototype features of Novelset;
[0023] Step 3: Based on the prototype features extracted in step 2, a prototype-guided feature generator is trained. Random noise is added as the input of the feature generator to generate new features. A feature true and false discriminator and a change discriminator are introduced to guide the feature generator to generate facial features with rich change information.
[0024] Step 4: Use the feature representation model to extract the real features And the facial features generated by the feature generator Train the classifier based on the features generated by the feature generator Correct the decision boundary of the classifier, and use the corrected classifier as the final test classifier;
[0025] Step 5: Test image x p Input into the feature representation model φ(·) to obtain the feature representation Then the feature representation Input into the final classifier to get the classification result.
[0026] Furthermore, the specific process of step 1 includes:
[0027] 1.1 Given a Baseset (multiple samples per class) {x b ,y b}b=1,2,...B, contains B samples in total, Novelset (single training sample per class) {x n ,yn}, n = 1, 2, ... N, containing N samples in total; fine-tune the pre-trained model using all samples in Baseset;
[0028] 1.2 Use cross entropy loss to fine-tune the pre-trained network and adjust the network weights. The network loss function is specifically expressed as:
[0029]
[0030] Among them, φ(·) represents the feature representation model, W is the classifier parameter, N is the total number of training samples, and y i Represents the input face image x i The corresponding identity tag.
[0031] 1.3 After the pre-trained network is fine-tuned, input the face image x i , take the output of the previous layer of the fine-tuned network classification layer as the input face image x i The feature embedding of
[0032] Furthermore, the specific process of step 2 includes:
[0033] In order to obtain the class feature center of the single sample category in Novelset, Baseset is used to learn a mapping from single sample features to class feature centers. Denoted as f(·); the standard sample feature of each class in Baseset is There are M categories in total, and the other sample features are marked as Its corresponding identity label is y t , based on softmax, the distance measurement is performed in the feature space to calculate the distance relationship between features.
[0034]
[0035] Where d(·) is the Euclidean distance function and the learning process is to minimize the loss function
[0036]
[0037] Among them, the first item represents the reduction of the k-th sample feature and the k-th feature center The Euclidean distance between them, the second term represents the expansion and contraction of the k-th sample features With other categories of centers After the training is completed, a mapping f(·) from standard sample features to class center features is obtained.
[0038] Furthermore, the specific process of step 3 is as follows:
[0039] 3.1 Given a Baseset (multiple samples per class) and a Novelset (single training sample per class), after the feature representation model trained in the first stage, we can get their feature representation in the feature space and their labels Random noise z randomly sampled from a standard normal distribution.
[0040] The feature generator combines the class center features of each class and random noise to synthesize effective features, where d is the feature dimension. The feature generator G(·) is defined as:
[0041]
[0042] in f l (·) represents a nonlinear activation function such as LeakyReLU, and the generated feature is Its essence is to expand the feature space of the class by generating intra-class changes through random noise. This further explains the role of the feature center. If the generation is done on the boundary of the class, plus random noise W z z can easily be generated into other categories and mislead the training of the classifier.
[0043] 3.2 The feature true and false discriminator is used to distinguish the generated features from the real features and guide the feature generator to obtain better generation capabilities. The input of the discriminator is the generated features. and real characteristics The feature true and false discriminator D(·) can be written as:
[0044]
[0045] in, Include the true features of the input and the generated features W d ∈R 1*d are the parameters of the discriminator, f s (·) is the nonlinear activation function sigmoid, which constrains the output of the discriminator to be between 0 and 1.
[0046] 3.3 The face change discriminator D v The main purpose is to guide the feature generator to generate features with changes, mark the face features with changes in the Baseset as 1, and the ones without changes as 0, and input them into the face change discriminator D v(·) and mark the generated features as 0. The face change discriminator D v (·) can be expressed as:
[0047]
[0048] in, are the input features, including the real features and the generated features W dv ∈R 1*d are the parameters of the discriminator, f s (·) is the nonlinear activation function sigmoid, which constrains the output of the face change discriminator to between 0 and 1.
[0049] 3.4 During the training process, the feature generator and the two discriminators are trained iteratively in turn; the true and false discriminator can well distinguish whether the input features are generated or real by using a binary classifier. The face change discriminator is also a binary classifier, which is used to identify whether the generated features have changed; the feature generator hopes to "confuse" the face change discriminator and the feature true and false discriminator through the features generated by the class center and random noise so that they cannot distinguish. The objective function of the feature true and false discriminator is written as:
[0050]
[0051]
[0052] Face change discriminator writing:
[0053]
[0054]
[0055] in represents the class feature center, Represents features without changes, Represents features with face changes. When training the feature generator, the parameters of the discriminator are fixed. The goal of the feature generator is to make the generated features similar to the real features. In other words, it is to "confuse" the discriminator so that it cannot distinguish, that is, to optimize the parameters of the feature generator to minimize the loss function When training the true and false discriminator, the feature generator is fixed. The goal of the true and false discriminator is to be able to distinguish the real features from the generated false features, that is, to optimize the parameters of the true and false discriminator and maximize the loss function Similarly, when training the variation discriminator, the parameters of the feature generator are fixed. The goal of the variation discriminator is to be able to distinguish the changes in the features well, that is, to optimize the parameters of the variation discriminator to maximize the loss function
[0056] Furthermore, the specific process of step 4 includes:
[0057] For the classifier C(·), its parameters are trained by two parts of data. One part of the data is the features extracted from the training data in Baseset and Novelset. The other part of the data is the features generated by the feature generator Inputting two parts of data into the classifier can be expressed as:
[0058]
[0059]
[0060] Where W k is the weight vector of the classifier parameters corresponding to the kth class, and It represents the probability that the training features and the generated features belong to the kth class, and then the network is trained with cross entropy loss. The loss function is specifically defined as:
[0061]
[0062]
[0063] where t k,n ∈{0,1} is a one-hot encoding, indicating that the nth input feature belongs to the kth class.
[0064] Furthermore, the specific process of step 5 is as follows:
[0065] The test image x p Input into the feature representation model φ(·) to obtain the feature representation Then the test sample features Input into the classifier C(·) to get the test image x p The classification results.
[0066] The present invention is applicable to a single-sample face recognition method in which each object to be recognized has only one training image.
[0067] Example 1
[0068] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0069] The core challenge of the single-sample face recognition problem is still the lack of data. Therefore, the most direct method is to generate more meaningful data to enhance the classification performance of the classifier. Compared with the high-dimensional image space, generating effective data in the low-dimensional feature space is theoretically more reliable. In recent years, adversarial generative networks have achieved success in the synthesis of virtual data. Therefore, this embodiment proposes a feature generation method based on prototype and adversarial learning to solve the single-sample face recognition problem.
[0070] Combination Figure 1 As shown, the single-sample face recognition method based on prototype and adversarial learning of the present invention comprises the following steps:
[0071] 1. Use Baseset to fine-tune the pre-trained model. The specific steps are as follows:
[0072] (1) Given a Baseset (multiple samples per class) {x b ,y b}b=1,2,...B, contains B samples in total, Novelset (single training sample per class) {x n ,y n}, n = 1, 2, ... N, containing N samples in total; fine-tune the pre-trained model using all samples in Baseset;
[0073] (2) Use cross entropy loss to fine-tune the pre-trained network and adjust the network weights. The network loss function is specifically expressed as:
[0074]
[0075] Among them, φ(·) represents the feature representation model, W is the classifier parameter, N is the total number of training samples, and y i Represents the input face image x i The corresponding identity tag.
[0076] (3) After the pre-trained network is fine-tuned, input the face image x i , take the output of the previous layer of the fine-tuned network classification layer as the input face image x i The feature embedding of
[0077] 2. Use Baseset to learn the single sample feature center mapping. The specific steps are as follows:
[0078] (1) In order to obtain the class feature center of the single sample category in Novelset, use Baseset to learn a mapping from single sample features to class feature centers Denoted as f(·); the standard sample feature of each class in Baseset is There are M categories in total, and the other sample features are marked as Its corresponding identity label is y t , based on softmax, distance measurement is performed in the feature space, that is, the distance relationship between features is calculated.
[0079]
[0080] Where d(·) is the Euclidean distance function and the learning process is to minimize the loss function
[0081]
[0082] Among them, the first item represents the reduction of the k-th sample feature and the k-th feature center The Euclidean distance between them, the second term represents the expansion and contraction of the k-th sample features With other categories of centers After the training is completed, a mapping f(·) from standard sample features to class center features is obtained.
[0083] 3. Feature generation based on prototype and adversarial learning. The specific steps are as follows:
[0084] (1) Given a Baseset (multiple samples per class) and a Novelset (single training sample per class), after the feature representation model trained in the first stage, we can obtain their feature representations in the feature space. and their labels Random noise z randomly sampled from a standard normal distribution. For the feature generator, it hopes to combine the class center feature x of each class c ∈R d and random noise to synthesize effective features, where d is the feature dimension. The feature generator G(·) is defined as:
[0085]
[0086] in f l (·) represents a nonlinear activation function such as LeakyReLU, and the generated feature is Its essence is to expand the feature space of the class by generating intra-class changes through random noise. This further explains the role of the feature center. If the generation is done on the boundary of the class, plus random noise W z z can easily be generated into other categories and mislead the training of the classifier.
[0087] (2) For the true and false discriminator D, it is used to distinguish the generated features from the real features and guide the feature generator to obtain better generation capabilities. The input of the discriminator is the generated features (true and false labels are 0) and the real features (true and false labels are 1). The true and false discriminator D(·) can be written as:
[0088]
[0089] in, Include the true features of the input and the generated features W d ∈R 1*d are the parameters of the discriminator, f s (·) is the nonlinear activation function sigmoid, which constrains the output of the discriminator to be between 0 and 1.
[0090] (3) For the face change discriminator D v , its main purpose is to guide the feature generator to generate features with changes. We mark the facial features with changes in the Baseset as 1, and the ones without changes as 0, and input them into the face change discriminator Dv(·) for training. At the same time, the generated features are marked as 0. The face change discriminator Dv(·) can be expressed as:
[0091]
[0092] Among them, among them, are the input features, including the real features and the generated features W dv ∈R 1*d are the parameters of the discriminator, f s (·) is the nonlinear activation function sigmoid, which constrains the output of the face change discriminator to between 0 and 1.
[0093] (4) During the training process, the feature generator and the two discriminators are trained iteratively in turn. The true and false discriminator hopes to be able to distinguish whether the input features are generated or real through a binary classifier. The face change discriminator is also a binary classifier, which is used to identify whether the generated features have changed; the feature generator hopes to "confuse" the two discriminators through the features generated by the class center and random noise so that they cannot distinguish. The objective function of the true and false discriminator is written as:
[0094]
[0095]
[0096] Face change discriminator writing:
[0097]
[0098]
[0099] in represents the class feature center, Represents features without changes, Represents features with face changes; when training the feature generator, the parameters of the discriminator are fixed. The goal of the feature generator is to make the generated features similar to the real features. In other words, it is to "confuse" the discriminator so that it cannot distinguish, that is, to optimize the parameters of the feature generator to minimize the loss function When training the true and false discriminator, the feature generator is fixed. The goal of the true and false discriminator is to be able to distinguish the real features from the generated false features, that is, to optimize the parameters of the feature true and false discriminator and maximize the loss function Similarly, when training the variation discriminator, the parameters of the feature generator are fixed. The goal of the variation discriminator is to be able to distinguish the changes in the features well, that is, to optimize the parameters of the variation discriminator to maximize the loss function
[0100] 4. Optimize the classifier decision boundary. The specific steps are as follows:
[0101] For the classifier C(·), its parameters are trained by two parts of data: one is the features extracted from the training data in Baseset and Novelset. The second is the features generated by the generator Inputting them into the classifier can be expressed as:
[0102]
[0103] Where W k is the weight vector of the classifier parameters corresponding to the kth class, and It represents the probability that the training features and the generated features belong to the kth class, and then the network is trained with cross entropy loss. The loss function is specifically defined as:
[0104]
[0105]
[0106] where t k,n ∈{0,1} is a one-hot encoding, indicating that the nth input feature belongs to the kth class.
[0107] 5. Test sample classification. The specific steps are as follows:
[0108] The test image xp Input into the feature representation model φ(·) to obtain the feature representation Then the test sample features Input into the classifier C(·) to get the test image x p The classification results.
Claims
1. A single-sample face recognition method based on prototype and adversarial learning, characterized in that: The steps include: Step 1: Fine-tune the pre-trained network using all the face training data in Baseset to obtain a network feature extraction model suitable for the target data set. During the fine-tuning process, the network input is the face image x and the label is y. The pre-trained network is fine-tuned using the cross entropy loss to obtain a feature representation model φ(·) that maps the face image x to the feature space. Step 2: Extract facial features based on feature representation model φ(·) With the help of the idea of prototype network, Baseset is used to learn a mapping from single sample features in Novelset to class feature centers to obtain the prototype features of Novelset; Step 3: Based on the prototype features extracted in step 2, a prototype-guided feature generator is trained. Random noise is added as the input of the feature generator to generate new features. A feature true and false discriminator and a change discriminator are introduced to guide the feature generator to generate facial features with rich change information. Step 4: Use the feature representation model to extract the real features And the facial features generated by the feature generator Train the classifier based on the features generated by the feature generator Correct the decision boundary of the classifier, and use the corrected classifier as the final test classifier; Step 5: Test image x p Input into the feature representation model φ(·) to obtain the feature representation Then the feature representation φ(t i ) is input into the final classifier to obtain the classification result; The specific process described in step 3 is: (3.1) Given a Baseset and a Novelset, after the feature representation model trained in the first stage, their feature representation in the feature space can be obtained and their labels Random noise z randomly sampled from a standard normal distribution; Baseset is multiple samples of each category, and Novelset is a single training sample of each category; For the feature generator, it hopes to combine the class center features of each class and random noise To synthesize effective features, where d is the feature dimension, the feature generator G(·) is defined as: in f l (·) represents a nonlinear activation function LeakyReLU, and the generated feature is Its essence is to expand the feature space of a class by generating intra-class changes through random noise, which further explains the role of the feature center. If the generation is done on the boundary of the class, adding random noise Wzz will easily generate it into other categories and mislead the training of the classifier. (3.2) For the true and false discriminator D, it is used to distinguish the generated features from the real features and guide the feature generator to obtain better generation ability. The input of the discriminator is the generated features, the true and false labels are 0, and the real features, the true and false labels are 1. The true and false discriminator D(·) can be written as: in, Include the true features of the input and the generated features Wd∈R 1 *d is the parameter of the discriminator, f s (·) is the nonlinear activation function sigmoid, which constrains the output of the discriminator to between 0 and 1; (3.3) For the face change discriminator D v Its main purpose is to guide the feature generator to generate features with changes. The face features with changes in the Baseset are marked as 1, and the ones without changes are marked as 0. They are input into the face change discriminator Dv(·) for training, and the generated features are marked as 0. The face change discriminator Dv(·) can be expressed as: in, are the input features, including the real features and the generated features Wdv∈R 1 *d is the parameter of the discriminator, f s (·) is the nonlinear activation function sigmoid, which limits the output of the face change discriminator to between 0 and 1; (3.4) During the training process, the feature generator and the two discriminators are trained iteratively in turn. The feature true and false discriminator hopes to be able to distinguish whether the input feature is generated or real through a binary classifier. The face change discriminator is also a binary classifier, which is used to identify whether the generated feature has changed. The feature generator hopes to "confuse" the two discriminators through the features generated by the class center and random noise so that they cannot distinguish. The objective function of the feature true and false discriminator is written as: Face change discriminator writing: in represents the class feature center, Represents features without changes, Represents features with face changes; when training the feature generator, the parameters of the discriminator are fixed. The goal of the feature generator is to make the generated features similar to the real features. In other words, it is to "confuse" the discriminator so that it cannot distinguish, that is, to optimize the parameters of the feature generator to minimize the loss function When training the feature true and false discriminator, the feature generator is fixed. The goal of the feature true and false discriminator is to be able to distinguish the real features from the generated false features, that is, to optimize the parameters of the feature true and false discriminator and maximize the loss function Similarly, when training the variation discriminator, the parameters of the feature generator are fixed. The goal of the variation discriminator is to be able to distinguish the changes in the features well, that is, to optimize the parameters of the variation discriminator to maximize the loss function 2. The single-sample face recognition method based on prototype and adversarial learning according to claim 1 is characterized in that: The specific process of step 1 is as follows: (1.1) Given Baseset{x b ,y b }b=1,2,...B, contains B samples in total, Novelset{x n ,y n }, n = 1, 2, ... N, containing N samples in total; use all samples in Baseset to fine-tune the pre-trained model; Baseset has multiple samples per category, and Novelset has a single training sample per category; (1.2) Use cross entropy loss to fine-tune the pre-trained network and adjust the network weights. The network loss function is specifically expressed as: Among them, φ(·) represents the feature representation model, W is the classifier parameter, N is the total number of training samples, and y i Represents the input face image x i The corresponding identity tag; (1.3) After the pre-trained network is fine-tuned, input the face image x i , take the output of the previous layer of the fine-tuned network classification layer as the input face image x i The feature embedding of 3. The single-sample face recognition method based on prototype and adversarial learning according to claim 1 is characterized in that: The specific process of step 2 is: In order to obtain the class feature center of the single sample category in Novelset, Baseset is used to learn a mapping from single sample features to class feature centers. Denoted as f(·); the standard sample feature of each class in Baseset is There are M categories in total, and the other sample features are marked as Its corresponding identity label is y t , based on softmax, the distance measurement is performed in the feature space to calculate the distance relationship between features. Where d(·) is the Euclidean distance function and the learning process is to minimize the loss function Among them, the first item represents the reduction of the k-th sample feature and the k-th feature center The Euclidean distance between them, the second term represents the expansion and contraction of the k-th sample features With other categories of centers After the training is completed, a mapping f(·) from standard sample features to class center features is obtained.
4. The single-sample face recognition method based on prototype and adversarial learning according to claim 1, characterized in that: The specific process of step 4 is as follows: For the classifier C(·), its parameters are trained by two parts of data: one is the features extracted from the training data in Baseset and Novelset. The second is the features generated by the feature generator Inputting them into the classifier can be expressed as: Where W k is the weight vector of the classifier parameters corresponding to the kth class, and It represents the probability that the training features and the generated features belong to the kth class, and then the network is trained with cross entropy loss. The loss function is specifically defined as: Where tk,n∈{0,1} is a one-hot encoding, indicating that the nth input feature belongs to the kth class.
5. The single-sample face recognition method based on prototype and adversarial learning according to claim 1, characterized in that: The specific process of step 5 is as follows: The test image x p Input into the feature representation model φ(·) to obtain the feature representation Then the test sample features Input into the classifier C(·) to get the test image x p The classification results.