Small sample face recognition method based on prototype calibration and adaptive fine tuning

By pre-training the encoder on a large-scale face database and initializing the classifier weights using the weight blotting method, combining prototype calibration and fine-tuning strategies of adaptive interval loss function, the problems of new category feature calibration and model fine-tuning in small-sample face recognition are solved, and high recognition accuracy and good rejection ability are achieved.

CN119649423AActive Publication Date: 2025-03-18NANCHANG UNIV

Patent Information

Application Number
CN202411661913.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-18
Estimated Expiration
2044-11-20

AI Technical Summary

Technical Problem

The existing technology has shortcomings in the calibration of new category features, model fine-tuning and unknown category refusal in small sample face recognition. Especially when data is scarce, it is difficult for the model to effectively learn the distinguishing characteristics of new categories, resulting in a degradation of recognition performance.

Method used

A small sample face recognition method based on prototype calibration and adaptive fine-tuning is used to pre-train the encoder on a large-scale face database, classifier weights are initialized using the weight blotting method, and calibrated by calculating the cosine similarity between the fine-tuning class prototype and the pre-trained prototype. At the same time, an adaptive interval loss function is introduced for selective fine-tuning, and unknown category rejection is used in the evaluation stage.

Benefits of technology

It effectively avoids model overfitting in small sample situations, improves recognition accuracy, and enhances the ability to distinguish new categories and reject unknown categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649423A_ABST
    Figure CN119649423A_ABST
Patent Text Reader

Abstract

The invention discloses a small sample face recognition method based on prototype calibration and adaptive fine tuning, which comprises the following steps: 1) pre-training an encoder on a large-scale face database, capturing rich semantic information and class distribution, constructing an evaluation set, and ensuring that training identity information is not overlapped with the constructed evaluation set; 2) initializing the weight of the classifier through a weight imprinting method, ensuring smooth transition, and inducing a discrimination structure of the encoder; 3) calculating the cosine similarity between the fine-tuning prototype and the pre-training prototype, fusing the pre-training information through weighted average, and calibrating the fine-tuning prototype with deviation; 4) introducing an adaptive interval loss function, adjusting the penalty intensity of the sample, and performing selective fine adjustment on the BatchNorm layer and the classifier weight; 5) using the domain perception similarity NAC to calibrate unknown category rejection, enhancing the similarity relation with the domain sample, and obtaining the final matching score. The method can improve the recognition precision and rejection capability of the model in a few-sample learning scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of face recognition, and in particular relates to a small sample face recognition method based on prototype calibration and adaptive fine-tuning. Background Art

[0002] In recent years, deep learning research has made significant progress in face recognition technology, especially deep neural network encoders pre-trained on large-scale face datasets, which enable the model to extract highly discriminative facial features. These pre-trained models have demonstrated strong generalization capabilities in various scenarios by capturing rich semantic information and class distribution. However, despite the excellent performance of pre-trained models on large-scale datasets, when faced with new categories with small samples or small amounts of data, the existing technology still has some obvious shortcomings:

[0003] (1) Existing face recognition methods rely on a large amount of labeled data. Traditional deep learning methods require a large amount of labeled training data to achieve good recognition performance. However, in practical applications, it is often difficult to collect enough labeled face data, especially when new identities or categories are involved. This problem is more prominent. In small sample scenarios, the model cannot effectively learn the distinguishing features of new categories, resulting in a significant decrease in classification performance.

[0004] (2) Existing fine-tuning strategies often destroy the feature expression ability of pre-trained models. When fine-tuning on a new task, directly fine-tuning all layers or parameters of the pre-trained model may lead to overfitting, especially when there are very few training samples. This overfitting problem is particularly obvious. In addition, adjusting all parameters during the fine-tuning process will affect the original discriminative structure of the model, destroying the rich semantic information and inter-class relationships of the pre-training, affecting the performance of the model in the new task.

[0005] (3) Existing loss functions have limited ability to distinguish between small sample categories. Most standard loss functions (such as cross entropy loss) cannot fully adjust the inter-class and intra-class distances when faced with new categories, especially when faced with categories with sparse data, and cannot provide an effective class prototype calibration mechanism. This causes deviations in the feature representation of new categories, further reducing recognition accuracy.

[0006] (4) Existing technologies are insufficient in dealing with the problem of unknown category rejection. In open-set face recognition tasks, the model not only needs to recognize known categories, but also needs to reject misidentification when unknown categories appear. Existing methods usually rely on a fixed similarity threshold. However, this strategy is difficult to flexibly adjust according to the distribution of different scenes or neighborhood samples, resulting in low accuracy of unknown category rejection.

[0007] Therefore, for small sample face recognition, the existing technology still has a lot of room for improvement in terms of feature calibration of new categories, model fine-tuning, and rejection of unknown categories. There is an urgent need for a small sample face recognition method that can smoothly transition between pre-trained models and new categories and adaptively adjust classification decisions to meet the complex needs in a small sample data environment. Summary of the invention

[0008] The purpose of the present invention is to provide a small sample face recognition method based on prototype calibration and adaptive fine-tuning in view of the deficiencies in the prior art. The method has high recognition accuracy and good rejection ability for open set unknown faces.

[0009] In order to achieve the above object, the present invention adopts the following technical solution.

[0010] A small sample face recognition method based on prototype calibration and adaptive fine-tuning comprises the following steps:

[0011] Step S1, pre-train the encoder on a large-scale face database to capture rich semantic information and class distribution, construct an evaluation set, and ensure that the training identity information does not overlap with the constructed evaluation set;

[0012] Defining an encoder The encoder is pre-trained on a large-scale face database so that its identity information does not overlap with the evaluation set constructed later; the evaluation set consists of a gallery and a detection set Q, where the detection set Q is further divided into known detection sets and unknown detection set The gallery G and the known detection set K have no overlapping images x, but they share the same identity labels y∈{1,...,C}, while the unknown detection set U has labels that do not overlap with the known identities, i.e. The number of images corresponding to each identity information is fixed to 3;

[0013] Step S2, initializing the classifier weights by the weight imprinting method to ensure a smooth transition and induce the discriminant structure of the encoder;

[0014] The weight imprinting method is used to initialize the weight of the classifier to the weight of the pre-trained class prototype corresponding to the fine-tuning class prototype. The specific formula is expressed as:

[0015]

[0016] In formula (1), w c is the weight vector of the cth class; represents the prototype of the cth class obtained after calculation; φ(x) is the embedding function of the encoder, which is used to convert the input sample x into a feature representation; Indicates the label of the sample in the gallery; represents the input feature of the i-th sample in the gallery; m is the number of samples belonging to the c-th class; ||·||2 is the l2 norm, and the embedded feature φ(x) is unit normalized, so ||φ(x)||2=1;

[0017] Step S3, calculating the cosine similarity between the fine-tuning prototype and the pre-training prototype, fusing the pre-training information by weighted average, and calibrating the deviation of the fine-tuning prototype;

[0018] Step S4, introducing an adaptive margin loss function, adjusting the sample penalty intensity, and selectively fine-tuning the BatchNorm layer and classifier weights;

[0019] Step S5: In the evaluation phase, domain-aware similarity NAC is used to calibrate the rejection of unknown categories, enhance the similarity relationship with domain samples, and obtain the final matching score.

[0020] Specifically, the prototype in step S3 is defined as follows: suppose there is a class B in the pre-training data set, a class C in the fine-tuning stage, and a prototype of the calibration deviation in the fine-tuning data set. Given a calibrated new class prototype, it is expressed as:

[0021]

[0022] In formula (2), w n (B≤n≤B+C-1) is the prototype of the fine-tuning class; is the new prototype after calibration; Δw n It is a component of the pre-training class; α is a hyperparameter that controls the calibration strength of the deviation prototype. A larger α means that the calibrated prototype retains more of the original deviation prototype, and a smaller α means that the calibrated prototype integrates more of the pre-training class prototype.

[0023] Furthermore, the calculation formula of the cosine similarity between the fine-tuning prototype and the pre-trained prototype in step S3 is as follows:

[0024]

[0025] In formula (3), τ (τ > 0) is a scaling hyperparameter that controls the clarity of the weight distribution; S b,n is the similarity between the prototype of the pre-trained class and the prototype of the fine-tuned class; w b is the prototype of the pre-trained class; w n To fine-tune the prototype of the class;

[0026] The fine-tuning prototype of the calibration deviation is fused by weighted average pre-training class information, and only S is selected for each fine-tuning class. b,nThe top_k pre-trained classes are used for calibration. The weight of the fine-tuning class prototype relative to the pre-training class prototype is given by the softmax result on the top_k pre-trained classes. The formula is as follows:

[0027]

[0028] The deviation calibration formula of the fine-tuning prototype is expressed as:

[0029]

[0030] Specifically, the formula of the adaptive interval loss function AML in step S4 is expressed as:

[0031]

[0032] In formula (6), is the cosine similarity of the positive sample; cosθ j is the cosine similarity of negative samples; cos z is the maximum value of all cosine similarities of negative samples; m is the margin of positive samples; m′ is the adaptive margin of negative samples; β is the adaptive weight of positive samples; s is the scaling factor; t is the threshold used to control the margin of negative samples; a and mul are hyperparameters used to adjust the margin of negative samples and the weight of positive samples.

[0033] Furthermore, the BatchNorm layer and classifier weights are selectively fine-tuned as described in step S4. First, the network parameter is defined as θ, and all the parameters of the model are divided into two parts, θ BN is the BatchNorm layer parameter, θ rest For other network parameters, during fine-tuning, θ rest Fixed not participating in gradient update, only updating θ BN , using AML as the loss function to measure the difference between the model prediction output and the true label, and optimize the BatchNorm layer parameters and classifier weights.

[0034] Specifically, in step S5, domain-aware similarity NAC is used to calibrate the rejection of unknown categories and enhance the similarity relationship with domain samples. The formula of domain-aware similarity NAC is expressed as:

[0035]

[0036] In formula (7), N k is the index set of the k gallery prototypes closest to the probe feature p; 1[i∈N k] is the indicator function; the evaluation adopts the detection and recognition rate DIR@FAR under a certain false alarm rate; when DIR@FAR=1, it means that no detection samples are rejected and only the DIR of the rank-1 recognition rate is considered; that is, DIR@FAR=1 represents the accuracy of rank-1 closed set recognition.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] 1. The method of the present invention captures rich semantic information and class distribution by pre-training on a large-scale face database, and initializes the classifier weights through the weight imprinting method. This mechanism effectively avoids the problem of model overfitting in small sample scenarios, thereby improving the accuracy of small sample recognition.

[0039] 2. The method of the present invention induces the discriminative structure of the encoder through the effective fusion of weight imprinting technology and pre-training class information, ensuring a smooth transition from large-scale pre-training models to small sample task models. It not only retains the rich semantic information and inter-class relationships of the pre-training model, but also prevents the common feature destruction problem in traditional fine-tuning strategies, making the feature structure more robust.

[0040] 3. The method of the present invention calculates the cosine similarity between the fine-tuning class prototype and the pre-training class prototype, and uses weighted average to fuse the pre-training class information to calibrate the class prototype deviation in the fine-tuning process. This process can effectively reduce the class representation deviation caused by small samples, ensure that the feature expression of the new class is more robust and accurate, and thus enhance the model's ability to distinguish new categories.

[0041] 4. The method of the present invention introduces an adaptive interval loss function and adjusts the sample penalty intensity to achieve selective fine-tuning of the BatchNorm layer and classifier weights. This adaptive fine-tuning mechanism allows the model to flexibly adjust the weights according to the sample distribution, avoiding the overfitting problem that may be caused by global fine-tuning, and further improving the generalization performance in small sample tasks.

[0042] 5. In the evaluation stage, the method of the present invention introduces neighborhood-aware similarity (NAC) to calibrate the rejection problem of unknown categories. By enhancing the similarity relationship between the model and neighborhood samples, the model can more accurately distinguish between known categories and unknown categories, effectively reducing the false recognition rate and improving the rejection ability in open set tasks. This mechanism is particularly prominent in open set face recognition tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present disclosure and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 is a flow chart of a small sample face recognition method based on prototype calibration and adaptive fine-tuning of the present invention;

[0045] Figure 2 This is a model architecture diagram of the small sample face recognition method based on prototype calibration and adaptive fine-tuning of the present invention. DETAILED DESCRIPTION

[0046] In order to facilitate those of ordinary skill in the art to understand and implement the present invention, the following detailed description is given to each step of the method proposed by the present invention, and it should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of the present application.

[0047] Example

[0048] like Figure 1 and Figure 2 As shown, the present invention discloses a small sample face recognition method based on prototype calibration and adaptive fine-tuning, comprising the following steps:

[0049] Step S1, pre-train the encoder on a large-scale face database to capture rich semantic information and class distribution, construct an evaluation set, and ensure that the training identity information does not overlap with the constructed evaluation set;

[0050] Defining an encoder The encoder is pre-trained on a large-scale face database so that its identity information does not overlap with the evaluation set constructed later; the evaluation set consists of a gallery and a detection set Q, where the detection set Q is further divided into known detection sets and unknown detection set The gallery G and the known detection set K have no overlapping images x, but they share the same identity labels y∈{1,...,C}, while the unknown detection set U has labels that do not overlap with the known identities, i.e. In this implementation, the number of images corresponding to each identity information is fixed to 3 to meet the constraints of few-shot learning;

[0051] Step S2, initializing the classifier weights by the weight imprinting method to ensure a smooth transition and induce the discriminant structure of the encoder;

[0052] The weight imprinting method is used to initialize the weight of the classifier to the weight of the pre-trained class prototype corresponding to the fine-tuning class prototype. The specific formula is expressed as:

[0053]

[0054] In formula (1), w c is the weight vector of the cth class; represents the prototype of the cth class obtained after calculation; φ(x) is the embedding function of the encoder, which is used to convert the input sample x into a feature representation; Indicates the label of the sample in the gallery; represents the input feature of the i-th sample in the gallery; m is the number of samples belonging to the c-th class; ||·||2 is the l2 norm, and the embedded feature φ(x) is unit normalized, so ||φ(x)||2=1;

[0055] Step S3, calculating the cosine similarity between the fine-tuning prototype and the pre-training prototype, fusing the pre-training information by weighted average, and calibrating the deviation of the fine-tuning prototype;

[0056] Step S4, introducing an adaptive margin loss function, adjusting the sample penalty intensity, and selectively fine-tuning the BatchNorm layer and classifier weights;

[0057] Step S5: In the evaluation phase, domain-aware similarity NAC is used to calibrate the rejection of unknown categories, enhance the similarity relationship with domain samples, and obtain the final matching score.

[0058] Specifically, the prototype in step S3 is defined as follows: Assume that there are B categories in the pre-training data set and C categories in the fine-tuning stage. In this embodiment, the processed pre-training data set Vggface2 is taken as an example, where B=8749 and the fine-tuning data set CASIA has C=5287 categories. The empirical prototype of the i-th category can be expressed as w i Therefore, the prototype of the pre-trained class is w b (0≤b≤B-1), the prototype of the fine-tuning class is w n (B≤n≤B+C-1); Since the pre-training dataset contains enough classes and samples, the model trained based on this dataset can well capture the distribution of the pre-training class and obtain a well-calibrated pre-training class prototype. Based on the analysis of the prototype, only the prototypes of these deviations are calibrated in the fine-tuning dataset, and then a calibrated new class prototype is given. The calibrated new class prototype is expressed as:

[0059]

[0060] In formula (2), w n (B≤n≤B+C-1) is the prototype of the fine-tuning class; is the new prototype after calibration; Δw n is a calibration item, which is a component of the pre-training class; α is a hyperparameter that controls the calibration strength of the deviation prototype. A larger α means that the calibrated prototype retains more of the original deviation prototype, and a smaller α means that the calibrated prototype integrates more of the pre-training class prototype.

[0061] Furthermore, the calculation formula of the cosine similarity between the fine-tuning prototype and the pre-trained prototype in step S3 is as follows:

[0062]

[0063] In formula (3), τ (τ > 0) is a scaling hyperparameter that controls the clarity of the weight distribution; S b,n is the similarity between the prototype of the pre-trained class and the prototype of the fine-tuned class; w b is the prototype of the pre-trained class; w n To fine-tune the prototype of the class;

[0064] The fine-tuning prototype of the calibration deviation is fused by weighted average pre-training class information, and only S is selected for each fine-tuning class. b,n The top_k pre-trained classes are used for calibration. The weight of the fine-tuning class prototype relative to the pre-training class prototype is given by the softmax result on the top_k pre-trained classes. The formula is as follows:

[0065]

[0066] The deviation calibration formula of the fine-tuning prototype is expressed as:

[0067]

[0068] Specifically, the formula of the adaptive interval loss function AML in step S4 is expressed as:

[0069]

[0070] In formula (6), is the cosine similarity of the positive sample; cosθ j is the cosine similarity of negative samples; cos z is the maximum value of all cosine similarities of negative samples; m is the margin of positive samples; m′ is the adaptive margin of negative samples; β is the adaptive weight of positive samples; s is the scaling factor; t is the threshold used to control the margin of negative samples; a and mul are hyperparameters used to adjust the margin of negative samples and the weight of positive samples.

[0071] Furthermore, the BatchNorm layer and classifier weights are selectively fine-tuned as described in step S4. First, the network parameter is defined as θ, and all the parameters of the model are divided into two parts, θ BN is the BatchNorm layer parameter, θ rest For other network parameters, during fine-tuning, θ rest Fixed not participating in gradient update, only updating θ BN , using AML as the loss function to measure the difference between the model prediction output and the true label, and optimize the BatchNorm layer parameters and classifier weights.

[0072] Specifically, in step S5, domain-aware similarity NAC is used to calibrate the rejection of unknown categories and enhance the similarity relationship with domain samples. The formula of domain-aware similarity NAC is expressed as:

[0073]

[0074] In formula (7), N k is the index set of the k gallery prototypes closest to the probe feature p; 1[i∈N k ] is the indicator function; the evaluation adopts the detection and recognition rate DIR@FAR under a certain false alarm rate; when DIR@FAR=1, it means that no detection sample is rejected, and only the DIR of the rank-1 recognition rate is considered; that is, DIR@FAR=1 represents the accuracy of rank-1 closed set recognition;; for example, DIR@FAR=0.01 represents the recognition rate under the false alarm rate of 0.01 (i.e., 1% false alarm rate). This means that among 100 detection samples, only 1 sample may be mistakenly accepted as a known identity, and the recognition accuracy of the model under such strict conditions; DIR@FAR=10.0 represents the recognition rate under the false alarm rate of 10.0 (i.e., 10% false alarm rate). This means that among 100 detection samples, at most 10 samples may be mistakenly accepted as known identities, and the recognition accuracy of the model in this case; DIR@FAR=100.0: represents the recognition rate under the false alarm rate of 100.0 (i.e., 100% false alarm rate). In this case, all probe samples are accepted as known identities and no samples are rejected.

[0075] The superiority of the method of the present invention is further illustrated by a specific experimental comparison.

[0076] Experimental settings: This experiment uses VGG19 and ResNet-50 as encoders, with a feature dimension of 512 and CosFac e Loss function in webfac ePre-training is performed on a large dataset, with a fixed training time of 20 epochs, a batch_size of 128, an optimizer of Adam with cosine annealing, and an initial learning rate of 1e-3. Data augmentation includes random horizontal flipping and random cropping, with cropping ratios between 0.7 and 1.0. In prototype calibration and loss function configuration, the hyperparameters (mul, a, t) of AML and the prototype calibration parameters select the best values ​​according to different encoder-dataset combinations, and the optimal configuration of these parameters is determined during fine-tuning.

[0077] Experimental results: The following Table 1 shows the comparison results of the recognition accuracy and rejection ability of the method of the present invention and the traditional method in the few-sample learning scenario. The results show that the method of the present invention is more effective in improving the recognition accuracy and rejection ability of the model in the few-sample learning scenario.

[0078] Table 1. Comparison of recognition accuracy and rejection ability in few-shot learning scenarios

[0079]

[0080] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. A small sample face recognition method based on prototype calibration and adaptive fine-tuning, characterized in that: The following steps are involved: Step S1, pre-train the encoder on a large-scale face database to capture rich semantic information and class distribution, construct an evaluation set, and ensure that the training identity information does not overlap with the constructed evaluation set; Step S2, initializing the classifier weights by the weight imprinting method to ensure a smooth transition and induce the discriminant structure of the encoder; Step S3, calculating the cosine similarity between the fine-tuning prototype and the pre-training prototype, fusing the pre-training information by weighted average, and calibrating the deviation of the fine-tuning prototype; Step S4, introducing an adaptive margin loss function, adjusting the sample penalty intensity, and selectively fine-tuning the BatchNorm layer and classifier weights; Step S5: In the evaluation phase, domain-aware similarity NAC is used to calibrate the rejection of unknown categories, enhance the similarity relationship with domain samples, and obtain the final matching score.

2. The small sample face recognition method based on prototype calibration and adaptive fine-tuning according to claim 1, characterized in that: The specific content of step S1 is as follows: Defining an encoder The encoder is pre-trained on a large-scale face database so that its identity information does not overlap with the evaluation set constructed later; the evaluation set consists of a gallery and a detection set Q, where the detection set Q is further divided into known detection sets and unknown detection set The gallery G and the known detection set K have no overlapping images x, but they share the same identity labels y∈{1,…,C}, while the unknown detection set U has labels that do not overlap with the known identities, i.e. The number of images corresponding to each identity information is fixed to 3.

3. The small sample face recognition method based on prototype calibration and adaptive fine-tuning according to claim 1, characterized in that: The specific content of step S2 is as follows: The weight imprinting method is used to initialize the weight of the classifier to the weight of the pre-trained class prototype corresponding to the fine-tuning class prototype. The specific formula is expressed as: In formula (1), w c is the weight vector of the cth class; represents the prototype of the cth class obtained after calculation; φ(x) is the embedding function of the encoder, which is used to convert the input sample x into a feature representation; Indicates the label of the sample in the gallery; Represents the input features of the i-th sample in the gallery; m is the number of samples belonging to the cth class; ||·||2 is the l2 norm, and the embedded feature φ(x) is unit normalized, so ||φ(x)||2=1.

4. The small sample face recognition method based on prototype calibration and adaptive fine-tuning according to claim 1, characterized in that: The definition of the prototype in step S3 is: suppose there is class B in the pre-training data set, class C in the fine-tuning stage, and the prototype of the calibration deviation in the fine-tuning data set, given a calibrated new class prototype, it is expressed as: In formula (2), w n (B≤n≤B+C-1) is the prototype of the fine-tuning class; It is the prototype of the new class after calibration; Δw n It is a component of the pre-training class; α is a hyperparameter that controls the calibration strength of the deviation prototype. A larger α means that the calibrated prototype retains more of the original deviation prototype, and a smaller α means that the calibrated prototype integrates more of the pre-training class prototype.

5. The small sample face recognition method based on prototype calibration and adaptive fine-tuning according to claim 1, characterized in that: The calculation formula of the cosine similarity between the fine-tuning prototype and the pre-trained prototype in step S3 is as follows: In formula (3), τ (τ>0) is a scaling hyperparameter that controls the clarity of the weight distribution; S b,n is the similarity between the prototype of the pre-trained class and the prototype of the fine-tuned class; w b is the prototype of the pre-trained class; w n To fine-tune the prototype of the class; The fine-tuning prototype of the calibration deviation is fused by weighted average pre-training class information, and only S is selected for each fine-tuning class. b,n The top_k pre-trained classes are used for calibration. The weight of the fine-tuning class prototype relative to the pre-training class prototype is given by the softmax result on the top_k pre-trained classes. The formula is as follows: The deviation calibration formula of the fine-tuning prototype is expressed as:

6. The small sample face recognition method based on prototype calibration and adaptive fine-tuning according to claim 1, characterized in that: The formula of the adaptive margin loss function AML in step S4 is expressed as: In formula (6), is the cosine similarity of the positive sample; cosθ j is the cosine similarity of negative samples; cos z is the maximum value of the cosine similarities of all negative samples; m is the margin of positive samples; m′ is the adaptive margin of negative samples; β is the adaptive weight of positive samples; s is the scaling factor; t is the threshold used to control the margin of negative samples; a and mul are hyperparameters used to adjust the margin of negative samples and the weight of positive samples.

7. The small sample face recognition method based on prototype calibration and adaptive fine-tuning according to claim 1, characterized in that: As described in step S4, the BatchNorm layer and classifier weights are selectively fine-tuned. First, the network parameter is defined as θ, and all the parameters of the model are divided into two parts, θ BN is the BatchNorm layer parameter, θ rest For other network parameters, during fine-tuning, θ rest Fixed not participating in gradient update, only updating θ BN , using AML as the loss function to measure the difference between the model prediction output and the true label, and optimize the BatchNorm layer parameters and classifier weights.

8. The small sample face recognition method based on prototype calibration and adaptive fine-tuning according to claim 1, characterized in that: In step S5, domain-aware similarity NAC is used to calibrate the rejection of unknown categories and enhance the similarity relationship with domain samples. The formula of domain-aware similarity NAC is expressed as: In formula (7), N k is the index set of the k gallery prototypes closest to the probe feature p; 1[i∈N k ] is the indicator function; the evaluation adopts the detection and recognition rate DIR@FAR under a certain false alarm rate; when DIR@FAR=1, it means that no detection sample is rejected and only the DIR of the rank-1 recognition rate is considered; That is, DIR@FAR=1 indicates the accuracy of rank-1 closed set recognition.

Citation Information

Patent Citations

  • Lightweight prototype container-based small sample class incremental learning system

    CN116229151A

  • Cross-domain small sample relation extraction method and system based on enhanced contrast learning fine tuning

    CN116561308A

  • System and method for laterality adjusted identification of human attraction compatibility

    US9824262B1

Cited By

  • Personnel posture intelligent estimation method for complex industrial scene

    CN120032394A