Facial recognition model training method, device and equipment

Through the combination of semi-supervised learning and dynamic confidence thresholds, the face recognition model is jointly trained by using labeled and unlabeled datasets, the problem of insufficient recognition accuracy in face recognition is solved, and higher recognition accuracy and robustness are achieved.

CN119672779APending Publication Date: 2025-03-21AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411740220.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art has the problem of insufficient recognition accuracy in facial recognition, especially in the case of facial features diversity and environmental changes.

Method used

The iterative training method of semi-supervised learning is adopted to train the facial recognition model with labeled data sets and unlabeled data sets, and the pseudo-label samples with confidence meet the conditions are filtered through the dynamic confidence threshold to generate pseudo-labels to enhance model training.

Benefits of technology

It improves the recognition accuracy and robustness of the facial recognition model, can better adapt to the changes in data distribution and dynamic training conditions, and enhances the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672779A_ABST
    Figure CN119672779A_ABST
Patent Text Reader

Abstract

The invention discloses a face recognition model training method, device and equipment, which are used for improving the recognition accuracy of a face recognition model. The method comprises the following steps: training an initial face recognition model by using a labeled data set; performing image feature extraction and identification prediction on unlabeled samples in the unlabeled data set by using the initial face identification model to obtain unlabeled sample features and a prediction result, the unlabeled samples being unlabeled face images; according to the label-free sample features and the prediction result, screening a pseudo label sample with the confidence coefficient meeting the condition from the label-free data set, and generating a pseudo label corresponding to the pseudo label sample; training an initial face recognition model by using the labeled data set and a pseudo-label data set, wherein the pseudo-label data set comprises pseudo-label samples and corresponding pseudo-labels;
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and specifically to a training method, device and equipment for a facial recognition model. Background Art

[0002] In the current Internet era, online banking has become an indispensable part of people's daily lives. In this business model, customer identity verification is an important part of ensuring account security. Among traditional identity verification methods, facial recognition technology plays a key role. However, this technology faces a series of challenges, one of which is to accurately identify the customer's identity in the facial image provided by the customer, especially considering the diversity of facial features and changes in environmental conditions.

[0003] The advancement of face recognition technology comes from the continuous development of computer vision and deep learning. Although deep learning has performed well in the field of face recognition, in practical applications, it is still sensitive to different facial features and environmental changes.

[0004] Therefore, how to further improve the recognition accuracy of facial recognition models is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a method, apparatus and device for training a facial recognition model to improve the recognition accuracy of the facial recognition model.

[0006] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:

[0007] A method for training a facial recognition model, the method comprising:

[0008] Train an initial facial recognition model using a labeled dataset;

[0009] Using the initial facial recognition model to perform image feature extraction and recognition prediction on unlabeled samples in an unlabeled data set to obtain unlabeled sample features and prediction results, wherein the unlabeled samples are unlabeled facial images;

[0010] According to the unlabeled sample features and the prediction results, pseudo-label samples with confidence levels that meet the conditions are selected from the unlabeled data set, and pseudo-labels corresponding to the pseudo-label samples are generated;

[0011] The initial face recognition model is trained using the labeled data set and the pseudo-label data set, wherein the pseudo-label data set includes the pseudo-label samples and corresponding pseudo-labels.

[0012] In a possible implementation, the method further includes:

[0013] Reusing the facial recognition model obtained by training the initial facial recognition model with the labeled data set and the pseudo-labeled data set as the initial facial recognition model;

[0014] Repeat the steps of extracting image features and predicting recognition of unlabeled samples in an unlabeled data set using the initial facial recognition model to obtain unlabeled sample features and prediction results and subsequent steps until a preset condition is met.

[0015] In a possible implementation, the step of screening pseudo-label samples whose confidences meet the conditions from the unlabeled data set according to the unlabeled sample features and the prediction results, and generating pseudo-labels corresponding to the pseudo-label samples, includes:

[0016] Calculate the similarity between each unlabeled sample feature and each labeled sample feature, and determine the label of the target labeled sample feature with the highest similarity as the pseudo label of the unlabeled sample feature;

[0017] Compare the prediction result of each unlabeled sample with the corresponding pseudo label. If they are inconsistent, filter the unlabeled sample.

[0018] Compare the predicted probability of the prediction result of each unlabeled sample with the dynamic confidence threshold. If it is lower than the dynamic confidence threshold, filter the unlabeled sample.

[0019] The unlabeled samples that are not filtered are determined as pseudo-labeled samples whose confidence meets the conditions.

[0020] In a possible implementation, calculating the similarity between each unlabeled sample feature and each labeled sample feature, and determining the label of the target labeled sample feature with the highest similarity as the pseudo label of the unlabeled sample feature includes:

[0021] Using the initial facial recognition model to extract image features from the labeled samples in the labeled data set to obtain labeled sample features;

[0022] The cosine similarity between each unlabeled sample feature and each labeled sample feature is calculated to obtain the similarity set of the unlabeled sample;

[0023] The label of the target labeled sample feature with the highest similarity in the similarity set is determined as the pseudo label of the unlabeled sample feature.

[0024] In a possible implementation, before comparing the prediction probability of the prediction result of each unlabeled sample with the dynamic confidence threshold and filtering the unlabeled sample if the prediction probability is lower than the dynamic confidence threshold, the method further includes:

[0025] Calculate the mean of the predicted probabilities of the predicted results of the unlabeled samples;

[0026] The dynamic confidence threshold is determined according to the mean, the difference between the pseudo label of the unlabeled sample and the pseudo label of the unlabeled sample in the previous training, and the difference between the predicted probability of the predicted result of the unlabeled sample and the predicted probability of the predicted result of the unlabeled sample in the previous training.

[0027] In a possible implementation, the initial face recognition model is a width-enhanced residual network.

[0028] A training device for a facial recognition model, the method comprising:

[0029] A first training unit, for training an initial face recognition model using a labeled data set;

[0030] A prediction unit, configured to extract image features and perform recognition prediction on unlabeled samples in an unlabeled data set using the initial facial recognition model to obtain unlabeled sample features and prediction results, wherein the unlabeled samples are unlabeled facial images;

[0031] A screening unit, configured to screen pseudo-label samples whose confidences meet the conditions from the unlabeled data set according to the unlabeled sample features and the prediction results, and generate pseudo-labels corresponding to the pseudo-label samples;

[0032] The second training unit is used to train the initial face recognition model using the labeled data set and the pseudo-label data set, where the pseudo-label data set includes the pseudo-label samples and corresponding pseudo-labels.

[0033] A facial recognition model training device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the facial recognition model training method as described in any one of the above items is implemented.

[0034] A computer-readable storage medium stores instructions, which, when executed on a terminal device, enable the terminal device to execute a facial recognition model training method as described in any one of the above items.

[0035] A computer program product comprises computer program instructions, which, when executed on a computer, enable the computer to execute the training method for a facial recognition model as described in any one of the above items.

[0036] It can be seen that the embodiments of the present application have the following beneficial effects:

[0037] The embodiment of the present application uses a labeled data set to train an initial facial recognition model, and then uses the initial facial recognition model to extract image features and perform recognition prediction on unlabeled samples, and screens out unlabeled samples that meet the confidence requirements, and jointly trains the facial recognition model. The iterative training model method using semi-supervised learning can better utilize the labeled customer data retained in the customer files and the unlabeled customer data that has been identified to more effectively train the customer facial recognition model. When screening unlabeled samples that meet the confidence requirements, the dynamic confidence threshold selection used has greater flexibility and can be adjusted according to the performance of the facial recognition model on actual data. This enables the facial recognition model to better adapt to the ever-changing data distribution and dynamic training conditions, thereby improving the robustness and accuracy of semi-supervised learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of an exemplary application scenario provided for an embodiment of the present application;

[0039] Figure 2 A flowchart of a method for training a facial recognition model provided in an embodiment of the present application;

[0040] Figure 3 A flowchart of a method for training a facial recognition model in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of a facial recognition model training device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0043] In order to facilitate the understanding and interpretation of the technical solutions provided by the embodiments of the present application, the technical terms that may be involved in the embodiments of the present application are explained below.

[0044] Customer Profile: A customer profile is a complete record of the personal information that a customer chooses to submit at a bank branch or through a mobile banking application. During this process, the system guides the customer to upload documents such as ID cards with the user's permission, and simultaneously collects real-time facial images. This information is securely stored in the bank's database to form a customer profile. The profile contains multiple individual images, each of which is labeled with the corresponding individual identity, providing comprehensive and secure customer information.

[0045] Machine Learning: Machine learning is a branch of artificial intelligence that aims to develop systems that can learn through experience without being explicitly programmed. Machine learning systems automatically learn patterns, regularities, and knowledge in data and make decisions and predictions based on the experience gained.

[0046] Deep learning: Deep learning is a branch of machine learning that focuses on learning and inference using neural network models. The core idea is to simulate the connection and information transfer between neurons in the human brain by building a multi-level (deep) structured neural network, thereby achieving learning of complex patterns and features. The present application embodiment can use the WideResNet-28 (width enhanced residual network) deep learning model to train the customer facial image dataset to improve the expressiveness of the model.

[0047] Semi-supervised learning: Semi-supervised learning is a method that combines supervised learning and unsupervised learning. During the training phase, the model uses both labeled and unlabeled data to learn the structure and characteristics of the data more comprehensively.

[0048] Labeled dataset: A labeled dataset refers to data samples that clearly belong to a certain category or specific label. The embodiment of the present application uses facial images reserved by customers as labeled datasets to fit the customer's facial recognition model, so that the model can show accurate recognition capabilities.

[0049] Unlabeled dataset: An unlabeled dataset refers to a dataset in which data samples have no clear category or label association. The embodiment of the present application uses facial images provided by customers when handling business as an unlabeled dataset.

[0050] WideResNet-28: WideResNet-28 (width-enhanced residual network) is an improved version of the ResNet (residual network) deep neural network architecture. ResNet (residual network) solves the problems of gradient vanishing and gradient exploding in deep neural network training by introducing residual blocks. On this basis, WideResNet-28 (width-enhanced residual network) improves the expressiveness of the model by increasing the number of channels (the number of feature maps in each layer), further optimizing the performance of deep learning.

[0051] Confidence threshold: The confidence threshold is a threshold used to evaluate the credibility of a model's prediction or estimate, and is mainly used for classification problems. In classification tasks, when a trained model makes predictions for new input data, it generates a confidence or probability distribution that reflects the degree to which the sample belongs to a certain category. By setting the confidence threshold, you can decide whether the model accepts the prediction result, thereby improving the accuracy and reliability of the prediction.

[0052] Hard labels and soft labels: In neural networks, classification prediction probabilities involve two main label representations, namely hard labels and soft labels. A hard label is a discrete, specific category label, usually represented by One-Hot Encoding: that is, in multi-category classification problems, only one element in the hard label of each sample is 1, indicating that the sample belongs to a specific category, and the other elements are 0. A soft label is a label in the form of a probability distribution, indicating the probability of each category. Unlike a hard label, the probability value of each category in a soft label can be continuous, not necessarily 0 or 1.

[0053] Pseudo labeling: Pseudo labeling is a generative method in semi-supervised learning that uses an existing model to predict unlabeled data, uses high-confidence prediction results as pseudo labels, and then uses these pseudo labels together with labeled data to train the model.

[0054] In order to facilitate understanding and explanation of the technical solution provided by the embodiments of the present application, the background technology of the embodiments of the present application will be described below.

[0055] When customers use the banking system to conduct business, they need to collect customer information to confirm their identity. As an important means, face recognition has the characteristics of being unforgeable and unique. However, in traditional methods, customers face the limitations of face recognition technology, such as poor recognition effect and long time, which are mainly due to changes in facial features (such as age changes, wearing facial decorations, etc.) and the diversity of the surrounding environment (such as light, background).

[0056] To further improve the performance of deep learning models, supervised learning and unsupervised learning have become the focus of research. Supervised learning uses labeled data sets for training, while unsupervised learning attempts to learn patterns from unlabeled data. However, in actual banking applications, both face some problems, such as insufficient labeled data and unsatisfactory recognition accuracy of unsupervised learning.

[0057] Specifically, the prior art has technical problems in the following aspects:

[0058] Constraints of training data dependency: The limitation of existing technologies is that they are highly dependent on labeled customer facial images. This dependency makes the training ability of facial recognition models limited by the quality and diversity of labeled data. If the training data cannot fully cover the changes in various facial features, the generalization ability of the model will be restricted, affecting its accuracy in practical applications.

[0059] Adaptability limitations of supervised learning: Existing technologies use supervised learning methods, that is, training with labeled data. This makes the facial recognition model more inclined to learn facial features that appear frequently in the training set, and it is difficult to adapt to unknown or highly variable facial features. The facial recognition model may not be able to accurately identify the identity when the customer's face changes, limiting its adaptability in dynamic environments. Secondly, if the labeled data is not representative or sufficient, it may cause the facial recognition model to be biased during the learning process. In particular, when there are fewer samples in certain categories, the facial recognition model may not learn enough features of these categories, affecting the accurate recognition of these categories.

[0060] Increased risk of overfitting: Supervised learning methods are prone to overfitting problems, especially when labeled data is limited or unbalanced. Facial recognition models may rely too much on noisy or unrepresentative samples in the training set, and thus perform worse than expected in real applications. This increases the uncertainty of the model's generalization performance and affects its robustness in complex scenarios.

[0061] Existing technologies face challenges in dealing with training data dependency, supervised learning, label data limitations, imbalanced data, and overfitting risks, which negatively impact the performance and robustness of face recognition for banking customers.

[0062] Based on this, the embodiments of the present application provide a method, device and equipment for training a facial recognition model. By adopting a deep neural network, such as WideResNet-28 (width enhanced residual network), it is used to train a customer facial recognition model, which can effectively extract features from photos provided by customers and perform recognition. Through a multi-layer confidence threshold filtering method, credible samples with high thresholds can be screened out, thereby improving the recognition accuracy. The semi-supervised learning method can effectively utilize customer facial images retained by the bank and customer facial images that have been screened.

[0063] The embodiment of the present application introduces semi-supervised learning and confidence threshold filtering technology to solve the problems existing in traditional face recognition technology in bank identity authentication. Semi-supervised learning gives full play to the advantages of supervised learning and unsupervised learning, and flexibly utilizes labeled and unlabeled customer facial image data to improve the accuracy and generalization ability of the model. The purpose of introducing the confidence threshold is to further improve the accuracy of facial recognition. The threshold acts as an intelligent filter to evaluate the credibility of the facial image provided by the customer. Through this mechanism, the system effectively reduces the risk of misidentification while increasing the verification speed, making the entire identity authentication process more intelligent and reliable.

[0064] In order to facilitate understanding of the training method of the face recognition model provided in the embodiment of the present application, the following is combined with Figure 1 See the example scenario shown in the figure. Figure 1 As shown, this figure is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application.

[0065] The basic technical solutions of the embodiments of the present application include:

[0066] Using the labeled data set in the customer file, the customer's facial image data is input into a deep neural network, such as WideResNet-28 (width enhanced residual network), and trained to obtain an initial facial recognition model.

[0067] The trained model is used to extract feature images and perform recognition prediction on the facial images (i.e., unlabeled samples) currently provided by the customer. If the predicted probability is greater than or equal to the set confidence threshold, the facial image is considered to have passed the verification and the customer can conduct subsequent transactions; if the predicted probability is less than the confidence threshold, the facial image is considered to have failed the verification and the customer is not allowed to conduct subsequent transactions.

[0068] The verified customer facial images (i.e., pseudo-label samples) and pseudo-labels are added to the training set for further training of the facial recognition model.

[0069] Repeat the above steps until the face recognition model converges. In each iteration, the face recognition model gradually improves its performance by learning information from the pseudo-labeled dataset and the labeled dataset.

[0070] The embodiments of the present application can provide more powerful and efficient overall account security for banking services, promote innovation in banking services, and provide customers and banks with a smarter and more reliable identity authentication experience.

[0071] Those skilled in the art will understand that Figure 1 The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.

[0072] To facilitate understanding of the embodiments of the present application, a training method for a facial recognition model provided in the embodiments of the present application is described below in conjunction with the accompanying drawings.

[0073] See also Figure 2 As shown in FIG. 1 , this figure is a flow chart of a method for training a facial recognition model provided in an embodiment of the present application, such as Figure 2 As shown, the method may include S201-S204:

[0074] S201: Train an initial face recognition model using a labeled dataset.

[0075] The initial labeled dataset contains labeled facial image samples of customers in the bank's reserved information, providing initial training data for the model. The label can be customer identity information, such as ID number, etc. The initial labeled dataset is used to train the initial facial recognition model.

[0076] In one possible implementation, the initial face recognition model is a wide-enhanced residual network, such as a deep neural network WideResNet-28.

[0077] S202: Using the initial facial recognition model, extracting image features and performing recognition prediction on unlabeled samples in the unlabeled data set to obtain unlabeled sample features and prediction results, where the unlabeled samples are unlabeled facial images.

[0078] In practical applications, unlabeled datasets contain facial image samples provided by customers when handling banking transactions, which can be used by facial recognition models to make predictions and verify customer identities.

[0079] Use the initial facial recognition model to extract image features and perform recognition prediction on the unlabeled dataset. Image recognition can be understood as a special type of image classification. For example, if there are 10,000 customers, each customer can correspond to multiple facial images, and there can be 10,000 categories. Recognize which category a facial image belongs to to achieve facial recognition. Then perform recognition prediction on the unlabeled samples, and the prediction results obtained can include the prediction probability of each category. Usually, the category with the highest prediction probability can be considered to be the category to which the unlabeled sample belongs.

[0080] S203: According to the unlabeled sample features and the prediction results, pseudo-label samples with confidence levels that meet the requirements are selected from the unlabeled data set, and pseudo-labels corresponding to the pseudo-label samples are generated.

[0081] According to the unlabeled sample characteristics and prediction results, high-confidence customer facial image samples (pseudo-label samples) can be screened out.

[0082] In a possible implementation, S203 screens pseudo-label samples with confidence levels that meet the requirements from the unlabeled data set according to the unlabeled sample features and the prediction results, and generates pseudo-labels corresponding to the pseudo-label samples. The specific implementation may include:

[0083] A1: Calculate the similarity between each unlabeled sample feature and each labeled sample feature, and determine the label of the target labeled sample feature with the highest similarity as the pseudo label of the unlabeled sample feature.

[0084] In the embodiment of the present application, pseudo-label samples can be screened out through three filtering steps. The first step is feature filtering, setting a feature similarity threshold, calculating the similarity between each unlabeled sample feature and each labeled sample feature, and matching the pseudo-label of the unlabeled sample. For the convenience of subsequent explanation, this process can be referred to as screening 1.

[0085] A2: Compare the prediction result of each unlabeled sample with the corresponding pseudo label. If they are inconsistent, filter the unlabeled sample.

[0086] Then comes category filtering. The unlabeled samples filtered out by screening 1 are labeled with the category of the closest labeled sample feature as a pseudo label (hard label). For each unlabeled sample, the category of the maximum predicted probability of its classification prediction probability (soft label) is compared to see if it is consistent with the category of the pseudo label (hard label). If the categories are inconsistent, the unlabeled sample will be filtered out. This process can be called screening 2.

[0087] A3: Compare the predicted probability of the prediction result of each unlabeled sample with the dynamic confidence threshold. If it is lower than the dynamic confidence threshold, filter the unlabeled sample.

[0088] Finally, prediction probability filtering is performed, and a dynamic confidence threshold is set to filter out unlabeled samples whose maximum prediction probability is lower than the dynamic confidence threshold. This process can be called screening 3.

[0089] A4: Determine the unfiltered unlabeled samples as pseudo-labeled samples with qualified confidence levels.

[0090] For the high-confidence samples that pass the three screenings and their pseudo labels, a pseudo-label dataset is formed.

[0091] S204: Train an initial face recognition model using a labeled dataset and a pseudo-label dataset, where the pseudo-label dataset includes pseudo-label samples and corresponding pseudo-labels.

[0092] The pseudo-labeled dataset is merged with the labeled dataset to form a new labeled dataset for the next model iteration.

[0093] In a possible implementation, the following may also be included:

[0094] The facial recognition model obtained by training the initial facial recognition model with the labeled data set and the pseudo-labeled data set is used again as the initial facial recognition model;

[0095] Repeat the process of using the initial facial recognition model to extract image features and perform recognition prediction on the unlabeled samples in the unlabeled dataset to obtain the unlabeled sample features and prediction results as well as subsequent steps until the preset conditions are met.

[0096] Repeat the above steps S202-S204 until a preset stop condition is reached, such as the model performance no longer improving or the maximum number of iterations is reached. In each iteration, the facial recognition model is trained with more and more labeled data, gradually improving performance.

[0097] The embodiment of the present application uses a labeled data set to train an initial facial recognition model, and then uses the initial facial recognition model to extract image features and perform recognition prediction on unlabeled samples, and screens out unlabeled samples that meet the confidence requirements, and jointly trains the facial recognition model. The iterative training model method using semi-supervised learning can better utilize the labeled customer data retained in the customer files and the unlabeled customer data that has been identified to more effectively train the customer facial recognition model. When screening unlabeled samples that meet the confidence requirements, the dynamic confidence threshold selection used has greater flexibility and can be adjusted according to the performance of the facial recognition model on actual data. This enables the facial recognition model to better adapt to the ever-changing data distribution and dynamic training conditions, thereby improving the robustness and accuracy of semi-supervised learning.

[0098] See also Figure 3 As shown, a flowchart of the training method of the facial recognition model in an embodiment of the present application is shown.

[0099] Use the face samples reserved by customers to build an initial labeled dataset Among them, x i Indicates labeled samples, y i ={y i,c |c=1,2,L,C}, indicating that there are C types of tags. i,c Indicates that the i-th sample belongs to class c. Using a labeled sample dataset Train a feature extractor and classifier To obtain an initial facial recognition model Among them, θ and ω are the parameters of the feature extractor and classifier respectively, which need to be iteratively tuned to improve the accuracy of facial recognition.

[0100] In a possible implementation, A1 calculates the similarity between each unlabeled sample feature and each labeled sample feature, and determines the label of the target labeled sample feature with the highest similarity as the pseudo label of the unlabeled sample feature. The specific implementation may include:

[0101] B1: Use the initial face recognition model to extract image features from labeled samples in the labeled dataset to obtain labeled sample features.

[0102] B2: Calculate the cosine similarity between each unlabeled sample feature and each labeled sample feature to obtain the similarity set of the unlabeled samples.

[0103] B3: Determine the label of the target labeled sample feature with the highest similarity in the similarity set as the pseudo label of the unlabeled sample feature.

[0104] In practical applications, unlabeled datasets are constructed using customer facial image samples provided by customers when handling banking services. enter To the initial customer facial recognition model (When using the initial customer facial recognition model for the first time ) to extract image features and classify unlabeled samples. Assuming that this iteration is t rounds, use Extract features from labeled samples At the same time, extract the features of unlabeled samples calculate and The cosine similarity value between So we get the unlabeled sample x j The similarity set with each labeled sample Select the maximum similarity The label y of the labeled sample i i,c As x j The pseudo label y j,c Then, filter 2. Input classifier Get the predicted probability or confidence score calculate The maximum value in Whether the category belongs to the same as the pseudo label y j,c If they are consistent, keep x j The next step is label filtering, otherwise the unlabeled sample is filtered. The pseudo-label dataset obtained at this stage is recorded as

[0105] In a possible implementation, before A3 compares the prediction probability of the prediction result of each unlabeled sample with the dynamic confidence threshold, if the prediction probability is lower than the dynamic confidence threshold, filtering the unlabeled sample may further include:

[0106] C1: Calculate the mean of the predicted probabilities of the predicted results for the unlabeled samples.

[0107] C2: Determine the dynamic confidence threshold based on the mean, the difference between the pseudo-label of the unlabeled sample and the pseudo-label of the unlabeled sample in the previous training, and the difference between the predicted probability of the predicted result of the unlabeled sample and the predicted probability of the predicted result of the unlabeled sample in the previous training.

[0108] Next, we need to Perform screening 3 to remove unreliable labels. First, calculate the mean of the maximum confidence scores of the unlabeled samples Then calculate the dynamic filtering threshold τ for round t t , the calculation process is as follows: Among them, τ 0 represents the initial threshold, represents the hard label corresponding to the pseudo label of the tth round, and ò is a very small constant to avoid division by zero. Represents the unlabeled sample x in round t j The size of the difference between the pseudo-label of t-1 rounds of training and the pseudo-label of t-1 rounds of training. The size of the difference can be understood as the difference between the vectors composed of labels corresponding to all categories. It represents the difference between the confidence score (prediction probability of the prediction result) of the jth unlabeled sample in round t and round t-1. The size of this difference can be understood as the difference between the vectors composed of the confidence scores corresponding to all categories. Unlabeled samples constitute a pseudo-label dataset

[0109] Merge labeled datasets And the resulting pseudo-labeled dataset Get the labeled dataset for round t+1 and unlabeled datasets Right now: use Update the model parameters θ, ω. This process first requires calculating the loss value Where L CE represents the cross entropy loss function. Then the parameters θ, ω are optimized by the stochastic gradient descent algorithm to minimize L t , narrowing the gap between recognition results and real information.

[0110] Repeat the above steps to gradually increase the size of the labeled dataset to improve the performance of the facial recognition model until the preset stopping condition is reached and the process ends.

[0111] The embodiment of the present application adopts a training method of a semi-supervised facial recognition model based on a confidence threshold, combined with technical means such as a deep neural network model WideResNet-28, semi-supervised learning, and confidence threshold, aiming to effectively extract facial features and improve recognition accuracy.

[0112] First, by using the WideResNet-28 deep neural network to train the facial recognition model, the direct result is that the facial recognition model can more effectively extract features from customer facial images, thereby improving the accuracy of facial recognition. This technical effect solves the problem of poor recognition effect in traditional machine learning methods and lays the foundation for improving overall performance.

[0113] Secondly, the introduction of semi-supervised learning makes full use of labeled and unlabeled data sets, making up for the neglect of unlabeled data in traditional supervised learning and the lack of label guidance model learning in unsupervised learning. This technical effect directly improves the performance of the facial recognition model and makes more full use of unlabeled data.

[0114] Furthermore, the concept of confidence threshold is introduced, which directly has the effect of screening out high-confidence reliable samples, expanding the labeled data set, and effectively improving the recognition accuracy of the facial recognition model. By solving the problem of generalizing all samples in traditional methods, the robustness of the facial recognition model is improved.

[0115] Finally, the dynamic optimization of the facial recognition model. Through iterative learning, the facial recognition model gradually improves its performance. In each round of iteration, by learning information from unlabeled and labeled datasets, the facial recognition model parameters are continuously optimized, which directly promotes the improvement of overall performance.

[0116] Through the layer-by-layer superposition of the above technical effects, the embodiment of the present application finally achieves the goal of comprehensively improving the performance of the facial recognition model, from improving accuracy, reducing time costs to improving model robustness and efficiency, solving the shortcomings of traditional methods.

[0117] Based on the training method of a facial recognition model provided by the above method embodiment, the embodiment of the present application also provides a training device for a facial recognition model, and the training device for the facial recognition model will be described below in conjunction with the accompanying drawings.

[0118] See also Figure 4 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a training device for a facial recognition model provided in an embodiment of the present application. Figure 4 As shown, the training device of the facial recognition model includes:

[0119] A first training unit 401 is used to train an initial face recognition model using a labeled data set;

[0120] A prediction unit 402 is used to extract image features and perform recognition prediction on unlabeled samples in an unlabeled data set using the initial facial recognition model to obtain unlabeled sample features and prediction results, wherein the unlabeled samples are unlabeled facial images;

[0121] A screening unit 403 is used to screen pseudo-label samples with confidence levels that meet the conditions from the unlabeled data set according to the unlabeled sample features and the prediction results, and generate pseudo-labels corresponding to the pseudo-label samples;

[0122] The second training unit 404 is configured to train the initial face recognition model using the labeled data set and the pseudo-label data set, wherein the pseudo-label data set includes the pseudo-label samples and corresponding pseudo-labels.

[0123] In a possible implementation manner, the device further includes:

[0124] a determining unit, configured to use the facial recognition model obtained by training the initial facial recognition model with the labeled data set and the pseudo-labeled data set as the initial facial recognition model;

[0125] The trigger unit is used to return to the prediction unit to execute the image feature extraction and recognition prediction of the unlabeled samples in the unlabeled data set using the initial facial recognition model to obtain the unlabeled sample features and prediction results until the preset conditions are met.

[0126] In a possible implementation, the screening unit includes:

[0127] The first calculation subunit is used to calculate the similarity between each unlabeled sample feature and each labeled sample feature, and determine the label of the target labeled sample feature with the highest similarity as the pseudo label of the unlabeled sample feature;

[0128] A first filtering subunit is used to compare the prediction result of each unlabeled sample with the corresponding pseudo label, and if they are inconsistent, filter the unlabeled sample;

[0129] A second filtering subunit is used to compare the prediction probability of the prediction result of each unlabeled sample with the dynamic confidence threshold, and if it is lower than the dynamic confidence threshold, filter the unlabeled sample;

[0130] The first determination subunit is used to determine the unfiltered unlabeled samples as pseudo-labeled samples with confidence levels that meet the conditions.

[0131] In a possible implementation manner, the first computing subunit is specifically configured to:

[0132] Using the initial facial recognition model to extract image features from the labeled samples in the labeled data set to obtain labeled sample features;

[0133] The cosine similarity between each unlabeled sample feature and each labeled sample feature is calculated to obtain the similarity set of the unlabeled sample;

[0134] The label of the target labeled sample feature with the highest similarity in the similarity set is determined as the pseudo label of the unlabeled sample feature.

[0135] In a possible implementation, the screening unit further includes:

[0136] The second calculation subunit is used to calculate the mean of the prediction probabilities of the prediction results of the unlabeled samples;

[0137] The second determination subunit is used to determine the dynamic confidence threshold according to the mean, the difference between the pseudo label of the unlabeled sample and the pseudo label of the unlabeled sample in the previous training, and the difference between the predicted probability of the predicted result of the unlabeled sample and the predicted probability of the predicted result of the unlabeled sample in the previous training.

[0138] In a possible implementation, the initial face recognition model is a width-enhanced residual network.

[0139] In addition, an embodiment of the present application also provides a facial recognition model training device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the facial recognition model training method as described in any one of the above items is implemented.

[0140] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the training method of the facial recognition model as described in any one of the above items.

[0141] An embodiment of the present application also provides a computer program product, including computer program instructions, which, when executed on a computer, enable the computer to execute the facial recognition model training method as described in any one of the above items.

[0142] The embodiment of the present application uses a labeled data set to train an initial facial recognition model, and then uses the initial facial recognition model to extract image features and perform recognition prediction on unlabeled samples, and screens out unlabeled samples that meet the confidence requirements, and jointly trains the facial recognition model. The iterative training model method using semi-supervised learning can better utilize the labeled customer data retained in the customer files and the unlabeled customer data that has been identified to more effectively train the customer facial recognition model. When screening unlabeled samples that meet the confidence requirements, the dynamic confidence threshold selection used has greater flexibility and can be adjusted according to the performance of the facial recognition model on actual data. This enables the facial recognition model to better adapt to the ever-changing data distribution and dynamic training conditions, thereby improving the robustness and accuracy of semi-supervised learning.

[0143] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0144] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0145] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0146] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0147] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for training a facial recognition model, characterized in that: The method comprises: Train an initial facial recognition model using a labeled dataset; Using the initial facial recognition model to perform image feature extraction and recognition prediction on unlabeled samples in an unlabeled data set to obtain unlabeled sample features and prediction results, wherein the unlabeled samples are unlabeled facial images; According to the unlabeled sample features and the prediction results, pseudo-label samples with confidence levels that meet the conditions are selected from the unlabeled data set, and pseudo-labels corresponding to the pseudo-label samples are generated; The initial face recognition model is trained using the labeled data set and the pseudo-label data set, wherein the pseudo-label data set includes the pseudo-label samples and corresponding pseudo-labels.

2. The method according to claim 1, characterized in that The method further comprises: Reusing the facial recognition model obtained by training the initial facial recognition model with the labeled data set and the pseudo-labeled data set as the initial facial recognition model; Repeat the steps of extracting image features and predicting recognition of unlabeled samples in an unlabeled data set using the initial facial recognition model to obtain unlabeled sample features and prediction results and subsequent steps until a preset condition is met.

3. The method according to claim 1, characterized in that The step of screening pseudo-label samples whose confidences meet the conditions from the unlabeled data set according to the unlabeled sample features and the prediction results, and generating pseudo-labels corresponding to the pseudo-label samples, includes: Calculate the similarity between each unlabeled sample feature and each labeled sample feature, and determine the label of the target labeled sample feature with the highest similarity as the pseudo label of the unlabeled sample feature; Compare the prediction result of each unlabeled sample with the corresponding pseudo label. If they are inconsistent, filter the unlabeled sample. Compare the predicted probability of the prediction result of each unlabeled sample with the dynamic confidence threshold. If it is lower than the dynamic confidence threshold, filter the unlabeled sample. The unlabeled samples that are not filtered are determined as pseudo-labeled samples whose confidence meets the conditions.

4. The method according to claim 3, characterized in that The calculating the similarity between each unlabeled sample feature and each labeled sample feature, and determining the label of the target labeled sample feature with the highest similarity as the pseudo label of the unlabeled sample feature, includes: Using the initial facial recognition model to extract image features from the labeled samples in the labeled data set to obtain labeled sample features; The cosine similarity between each unlabeled sample feature and each labeled sample feature is calculated to obtain the similarity set of the unlabeled sample; The label of the target labeled sample feature with the highest similarity in the similarity set is determined as the pseudo label of the unlabeled sample feature.

5. The method according to claim 3, characterized in that: Before comparing the predicted probability of the prediction result of each unlabeled sample with the dynamic confidence threshold and filtering the unlabeled sample if the predicted probability is lower than the dynamic confidence threshold, the method further includes: Calculate the mean of the predicted probabilities of the predicted results of the unlabeled samples; The dynamic confidence threshold is determined according to the mean, the difference between the pseudo label of the unlabeled sample and the pseudo label of the unlabeled sample in the previous training, and the difference between the predicted probability of the predicted result of the unlabeled sample and the predicted probability of the predicted result of the unlabeled sample in the previous training.

6. The method according to any one of claims 1 to 5, characterized in that: The initial face recognition model is a width-enhanced residual network.

7. A training device for a facial recognition model, characterized in that: The method comprises: A first training unit, for training an initial face recognition model using a labeled data set; A prediction unit, configured to extract image features and perform recognition prediction on unlabeled samples in an unlabeled data set using the initial facial recognition model to obtain unlabeled sample features and prediction results, wherein the unlabeled samples are unlabeled facial images; A screening unit, configured to screen pseudo-label samples whose confidences meet the conditions from the unlabeled data set according to the unlabeled sample features and the prediction results, and generate pseudo-labels corresponding to the pseudo-label samples; The second training unit is used to train the initial face recognition model using the labeled data set and the pseudo-label data set, where the pseudo-label data set includes the pseudo-label samples and corresponding pseudo-labels.

8. A training device for a facial recognition model, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the training method for the facial recognition model as described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the training method for a facial recognition model as described in any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer program instructions, which, when executed on a computer, enable the computer to execute the facial recognition model training method as described in any one of claims 1 to 6.