Model training method and device, face recognition method and equipment, and storage medium
By generating objective quality scores based on pre-trained models and training quality-related face recognition models, the problem of inconsistency between quality judgment and recognition in face recognition systems is solved, thereby improving the reliability and robustness of the system.
Patent Information
- Application Number
- CN202210444675.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-04-26
AI Technical Summary
In existing technologies, facial recognition systems suffer from insufficient interpretability and robustness in the quality judgment and recognition process, mainly due to the inconsistency between the model and human judgment caused by subjectively defined quality labels.
An objective quality score is generated by pre-training a face recognition model. The quality score of the face image is calculated using information entropy and multi-model weighting. This score is then used as supervised information to train the quality model and the face recognition model. Boundary constant terms and angle constraints are corrected to optimize the recognition process.
This improves the reliability and robustness of the face recognition model, enabling the recognition system to process face images of varying quality more accurately, thus enhancing the accuracy and stability of the recognition process.
Smart Images

Figure CN114758397B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of face recognition, and in particular, to a model training method and device, a face recognition method and equipment, and a storage medium. BACKGROUND
[0002] In recent years, face recognition technology has developed rapidly, and face recognition has become an indispensable ability in industries such as security monitoring and smart retail. Related face recognition technology is mainly based on deep learning. Although deep learning has more significant advantages in generalization and learning ability compared to traditional machine learning methods, it still has some risks in terms of explainability and robustness. SUMMARY
[0003] The inventors have found that related art face recognition technology based on quality judgment often treats face quality judgment and face recognition as two separate processes, i.e., first judging the quality of a face picture by a certain method, and then selecting a picture with a high quality score for face recognition to prevent the face recognition model from making incorrect matches or failing to recall due to quality problems. However, the quality scores generated by different quality models are obviously different, and the related art methods almost all define quality labels subjectively, and then train quality models. In this way, the quality model actually learns the quality that is subjectively considered by humans, but the model may not consider the quality to be good if the human eye considers it to be good, and the model may not consider the quality to be poor if the human eye considers it to be poor.
[0004] In view of at least one of the above technical problems, the present disclosure provides a model training method and device, a face recognition method and equipment, and a storage medium, which defines face quality from the perspective of the model, thereby improving the reliability and robustness of the face recognition model.
[0005] According to an aspect of the present disclosure, a model training method is provided, comprising:
[0006] generating a face quality score for each face picture in a training set based on a pre-trained face recognition model;
[0007] training a quality model using the face quality score as supervision information;
[0008] training a quality-related face recognition model using the face quality score as supervision information, so that the completed quality-related face recognition model cooperates with the quality model to recognize an input face picture.
[0009] In some embodiments of the present disclosure, the generating a face quality score for each face picture in a training set based on a pre-trained face recognition model comprises:
[0010] For each face picture in the training set, a pre-trained face recognition model is used to predict the probability of the face picture belonging to each class;
[0011] According to the probability of the face picture belonging to each class, the information entropy of the face picture is determined;
[0012] According to the information entropy of the face picture, the face quality score of the face picture is determined.
[0013] In some embodiments of the present disclosure, the generating of the face quality score for each face picture in the training set based on the pre-trained face recognition model comprises:
[0014] For each face picture in the training set, each pre-trained face recognition model in the plurality of pre-trained face recognition models is used to determine a corresponding face quality score;
[0015] The face quality scores corresponding to the plurality of pre-trained face recognition models are weighted to obtain a final face quality score.
[0016] In some embodiments of the present disclosure, the training of the quality-related face recognition model using the face quality score as supervision information comprises:
[0017] During the training process of the quality-related face recognition model, the boundary constant term is corrected according to the face quality score;
[0018] According to the corrected boundary constant term, the angle between the positive sample and the positive sample class center is boundary-constrained;
[0019] According to the boundary-constrained angle, the objective function of the quality-related face recognition model is determined.
[0020] In some embodiments of the present disclosure, the correcting of the boundary constant term according to the face quality score comprises:
[0021] In the initial training stage, a first predetermined value is used as the boundary constant term;
[0022] In the training convergence stage, the boundary constant term is determined according to the face quality score and a second predetermined value, wherein the second predetermined value is greater than the first predetermined value.
[0023] In some embodiments of the present disclosure, the training of the quality model using the face quality score as supervision information comprises:
[0024] According to the mean square error between the face quality score and the output of the quality model, the objective function of the quality model is determined.
[0025] According to another aspect of the present disclosure, a face recognition method is provided, comprising:
[0026] inputting the face picture into a quality model to perform screening, and screening a face picture with a face quality score greater than a predetermined value, wherein the quality model is trained by using the model training method in any one of the preceding embodiments;
[0027] inputting the screened face picture into a quality-related face recognition model to extract features and perform recognition on the screened face picture, wherein the quality-related face recognition model is trained by using the model training method in any one of the preceding embodiments.
[0028] According to another aspect of the present disclosure, a model training apparatus is provided, comprising:
[0029] a quality score generation module configured to generate a face quality score for each face picture in a training set based on a pre-trained face recognition model;
[0030] a first model training module configured to train a quality model by using the face quality score as supervision information;
[0031] a second model training module configured to train a quality-related face recognition model by using the face quality score as supervision information, so that the trained quality-related face recognition model cooperates with the quality model to perform recognition on an input face picture.
[0032] In some embodiments of the present disclosure, the model training apparatus is configured to perform operations to implement the model training method in any one of the preceding embodiments.
[0033] According to another aspect of the present disclosure, a face recognition device is provided, comprising:
[0034] a picture screening module configured to input a face picture into a quality model to perform screening, and screen a face picture with a face quality score greater than a predetermined value, wherein the quality model is trained by using the model training method in any one of the preceding embodiments;
[0035] a face recognition module configured to input the screened face picture into a quality-related face recognition model to extract features and perform recognition on the screened face picture, wherein the quality-related face recognition model is trained by using the model training method in any one of the preceding embodiments.
[0036] According to another aspect of the present disclosure, a computer apparatus is provided, comprising:
[0037] a memory configured to store instructions;
[0038] a processor configured to execute the instructions, so that the computer apparatus performs operations to implement the model training method and / or the face recognition method in any one of the preceding embodiments.
[0039] According to another aspect of the present disclosure, provided is a non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium stores computer instructions, and the instructions, when executed by a processor, implement the model training method according to any one of the above embodiments, and / or the face recognition method according to any one of the above embodiments.
[0040] The present disclosure can improve the reliability and robustness of a face recognition model by defining face quality from the perspective of a model. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0042] Figure 1 A schematic diagram of face recognition of the related art. Figure 1 Including Figure 1 a, Figure 1 b and Figure 1 c.
[0043] Figure 2 A schematic diagram of some embodiments of the model training method of the present disclosure.
[0044] Figure 3 A schematic diagram of other embodiments of the model training method of the present disclosure.
[0045] Figure 4 A schematic diagram of some embodiments of the face recognition method of the present disclosure.
[0046] Figure 5 A schematic diagram of some embodiments of the model training device of the present disclosure.
[0047] Figure 6 A schematic diagram of some embodiments of the face recognition device of the present disclosure.
[0048] Figure 7 A structural schematic diagram of some embodiments of the computer device of the present disclosure. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present disclosure will be described clearly and completely in combination with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The description of the at least one example embodiment is actually only illustrative, but not as any limitation on the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present disclosure.
[0050] Unless specifically stated, the relative arrangement of the components and steps, numerical expressions, and numerical values set forth in the various examples herein are not limiting of the scope of the present disclosure.
[0051] It should be understood that the sizes of the various portions shown in the drawings are not necessarily drawn to scale for ease of description.
[0052] Techniques, methods, and apparatus known to those of ordinary skill in the relevant art can not be discussed in detail in order to avoid obscuring the present disclosure.
[0053] In all the examples shown and discussed herein, any specific values should be interpreted as merely illustrative and not as a limitation. Thus, other examples of example embodiments can have different values.
[0054] It should be noted that like reference numerals and letters refer to like items in the following drawings, and thus, once an item is defined in one drawing, it need not be discussed further in subsequent drawings.
[0055] The inventors have found through research that the face recognition technology based on quality judgment in the related art often regards face quality judgment and face recognition as two separate processes, that is, first judging the quality of a face picture through a certain method, and then selecting a picture with a high quality score for face recognition to prevent the face recognition model from making an error match or failing to recall due to quality problems. However, the quality scores generated by different quality models are obviously different, and the existing methods in the related art almost all define quality labels subjectively, and then train quality models, so that the quality model actually learns the quality that is subjectively considered by people. However, the model does not necessarily consider the quality to be good when the human eye considers the quality to be good, and the model does not necessarily consider the quality to be poor when the human eye considers the quality to be poor.
[0056] Figure 1 A schematic diagram of face recognition in the related art. Figure 1 including Figure 1 a, Figure 1 b and Figure 1 c, wherein Figure 1a is a base library picture of face recognition. Figure 1 b and Figure 1 c is an image to be recognized. Figure 1 b The quality of the human eye looks good, but most recognition models are difficult to recall, Figure 1 c The quality of the human eye looks bad, but the recognition model is easier to recall.
[0057] In view of at least one of the above technical problems, the present disclosure provides a model training method and device, a face recognition method and equipment, and a storage medium. The present disclosure will be described below through specific embodiments.
[0058] Figure 2 The present disclosure is a schematic diagram of some embodiments of the model training method. Figure 3 The present disclosure is a schematic diagram of some other embodiments of the model training method. Preferably, the present embodiment can be executed by the model training device of the present disclosure. As shown in Figure 2 and Figure 3 The method can include at least one of steps 21-23, wherein:
[0059] Step 21, based on the pre-trained face recognition model, generate a face quality score for each face picture in the training set.
[0060] In some embodiments of the present disclosure, the face quality score should not be generated according to the subjective judgment of the human eye, and the present disclosure proposes to generate the face quality score from the perspective of the model using the pre-trained face recognition model.
[0061] In some embodiments of the present disclosure, step 21 can include training set picture quality score acquisition.
[0062] In some embodiments of the present disclosure, step 21 can include at least one of steps 210-213, wherein:
[0063] Step 210, in order to train the face quality evaluation model, first label the quality score of the face in the training set, as shown in Figure 3 Each face picture in the test set is labeled with a corresponding quality score label.
[0064] Step 211, for each face picture in the training set, use the pre-trained face recognition model to predict the probability of the face picture belonging to each class.
[0065] In some embodiments of the present disclosure, a pre-trained model is a face recognition model trained on a training set using conventional face recognition training methods. For a trained face recognition model, the higher the quality of the input image, the greater the probability that the model predicts the image as belonging to the correct category, even infinitely close to 1, while the probability of predicting it as belonging to the wrong category is extremely small. Similarly, if the input image quality is poor, the probability that the model predicts the image as belonging to the correct category is relatively small, while the probability of predicting it as belonging to other categories is relatively large.
[0066] Table 1 shows the probability of high-quality samples and low-quality samples belonging to each category in some embodiments of the present disclosure. As shown in Table 1, for high-quality samples and low-quality samples belonging to category CT, the model predicts the high-quality samples as category C. T The probability P(C T ) is 0.999, and the probability of predicting it as other samples is extremely small; however, the model's predicted probability for low-quality samples is more evenly distributed, and the probability of predicting it as the correct category is also small.
[0067] Table 1
[0068] [P(C1)] [P(C2)] … [P(C T )]]> … [P(C N-1 )]]> [P(C N )]]> High quality sample 1e-6 1e-6 … 0.999 … 1e-7 1e-6 Low quality sample 0.12 0.14 … 0.37 … 0.19 0.14
[0069] Step 212: Determine the information entropy of the face image based on the probability that the face image belongs to each category.
[0070] In some embodiments of the present disclosure, step 212 may include: based on the above observation results, the above embodiments of the present disclosure propose to use the information entropy of the sample prediction probability to characterize the sample quality.
[0071] In some embodiments of the present disclosure, step 212 may include: for N categories C1 to C N The training set D, the probability that the pre-trained model predicts a sample S as category i is P(C i ), then for the pre-trained model, the information entropy H(C) of the sample is as shown in formula (1).
[0072]
[0073] In some embodiments of the present disclosure, if the calculated information entropy of sample S is large, it means that the probability distribution of the sample predicted by the pre-training model tends to be uniform, that is, the probability of the sample being predicted as various incorrect categories is large, and therefore its quality is poor. For example: in Table 1, the low-quality samples in N categories C1 to C N The probability distribution of samples tends to be higher than that of high-quality samples in N categories C1 to C N The sample probability distribution tends to be more uniform.
[0074] Step 213, determining a face quality score of the face picture according to the information entropy of the face picture.
[0075] In some embodiments of the present disclosure, step 213 can include normalizing the information entropy H(C) to a quality score as shown in formula (2) since the value range of the information entropy H(C) is [0, log2N].
[0076]
[0077] wherein Q i (S) is a quality score of sample S under the current pre-trained model.
[0078] The above embodiments of the present disclosure may have model bias since the score is calculated by a certain model, and different quality scores can be calculated when other pre-trained models are used.
[0079] To remove the model bias, the above embodiments of the present disclosure use a large number of pre-trained models to calculate the quality score, and weight to obtain the final quality score.
[0080] In some embodiments of the present disclosure, step 21 can further include at least one of steps 214-215, wherein:
[0081] Step 214, for each face picture in the training set, respectively using each pre-trained face recognition model in the plurality of pre-trained face recognition models to determine a corresponding face quality score.
[0082] In some embodiments of the present disclosure, as shown in formula (3), two different pre-trained face recognition models (pre-trained models) respectively obtain corresponding class probability distributions, and then determine the face quality score corresponding to each face picture under each pre-trained model. Figure 3
[0083] Step 215, weighting the face quality scores corresponding to the plurality of pre-trained face recognition models to obtain a final face quality score.
[0084] In some embodiments of the present disclosure, to ensure the diversity of the models, the pre-trained models are selected from a plurality of models with different network structures and different loss function supervision training.
[0085] In some embodiments of the present disclosure, the plurality of network structures can include ResNet (Residual Neural Network, residual neural network) 50, ResNet101, ResNet152, MobileFaceNet (mobile face recognition model), AttentionNet (attention network), RepVGG-B0, etc.
[0086] In some embodiments of the present disclosure, the plurality of loss functions can include SoftMax, AM-SoftMax, ArcFace (Additive Angular Margin Loss), CosFace, MV-SoftMax, etc.
[0087] In some embodiments of the present disclosure, step 215 can include: assuming that the number of finally adopted pre-training models is m, then the quality score Q(S) of the final sample S is shown in formula (3).
[0088]
[0089] After the above steps of the present disclosure, each sample in the training set has a quality score between 0 and 1, where a score of 0 indicates the worst quality and a score of 1 indicates the best quality.
[0090] Step 22: training a quality model using the face quality score as supervision information.
[0091] In some embodiments of the present disclosure, step 22 can include quality evaluation model training.
[0092] In some embodiments of the present disclosure, step 22 can include: determining the objective function L of the quality model according to the mean square error between the face quality score and the output of the quality model.
[0093] In some embodiments of the present disclosure, step 22 can include: training a regression model as the final quality evaluation model using the training set pictures as input and the quality score as supervision information, and using the traditional mean square error as the objective function, and adding a weight decay term to prevent overfitting, and the final objective function L is shown in formula (4), where f(x i ) is the model output when the input sample x i is input, Q i is the quality score of the sample x i , m is the number of samples in a training batch, n is the number of model parameters, θ j is the jth parameter, λ is the parameter weight, is the weight decay term.
[0094]
[0095] The above embodiments of the present disclosure obtain the quality score of each face sample by using the pre-trained model in step 21, and obtain the quality evaluation model (quality model) by using the quality score in step 22. In order to keep consistency between the final recognition model and the quality evaluation model, the above embodiments of the present disclosure propose to further use the quality score as the supervision information of the final face recognition model, so that the model has stronger recognition ability for good quality pictures, and can tolerate the problem of not being able to recognize a part of poor quality pictures.
[0096] In step 23, the face quality score is used as supervision information to train the quality-related face recognition model, so that the trained quality-related face recognition model cooperates with the quality model to recognize the input face picture.
[0097] In some embodiments of the present disclosure, step 23 can include at least one of steps 231-233.
[0098] In step 231, during the training process of the quality-related face recognition model, the boundary constant term is corrected according to the face quality score.
[0099] In some embodiments of the present disclosure, in step 231, the step of correcting the boundary constant term according to the face quality score can include: in the early stage of training, a first predetermined value m1 is used as the boundary constant term; and in the convergence stage of training, the boundary constant term is determined according to the face quality score and a second predetermined value m2, where the second predetermined value m2 is greater than the first predetermined value m1.
[0100] In some embodiments of the present disclosure, in step 231, the step of correcting the boundary constant term according to the face quality score can include: under the premise of known sample quality, the present disclosure proposes to correct the margin by the sample quality score during the training process. In the early stage of training, a unified small margin equal to m1 (m1 can be empirically taken as 0.3) is set for all samples to make the model converge quickly, and after the model is basically converged, the margin is set to a larger value m2 (m2 can be empirically taken as 0.8). The final quality-related margin is obtained by multiplying the sample quality score by the value, and the calculation formula is shown in formula (5).
[0101]
[0102] In step 232, the angle between the positive sample and the positive sample class center is bound by the corrected boundary constant term margin.
[0103] In some embodiments of the present disclosure, step 232 may include: in the classic face recognition model loss function (such as ArcFace), in order to make the distance within the sample class as small as possible and the distance between the classes as large as possible, the angle between the positive sample and its class center is often Add a stronger boundary constraint, that is, add a constant term margin, where margin(Q i ) is the angle unit "degree", The meaning of sample y i and the angle between category j.
[0104] Step 233: Determine the objective function of the quality-related face recognition model based on the angle after boundary constraint.
[0105] In some embodiments of the present disclosure, steps 232 and 233 may include: based on the quality-related margin, the objective function L of the face recognition model is finally trained as shown in formula (6). Where M is the number of samples sampled in each training batch, θ j,i is the angle between sample i and category j, The meaning of sample y i The angle between y and category j, i represents the category corresponding to the current sample i, j is the category number, j! =y i Indicates that the category is not the category corresponding to the current sample i, Q i is the quality score of sample i, C is the total number of categories, and s is a constant hyperparameter (usually set to 32 or 64).
[0106]
[0107] like Figure 2 and Figure 3 As shown, the model training method disclosed in this disclosure includes three steps: step 21, obtaining the quality score of the training set image; step 22, training the quality assessment model; step 23, training the quality-related recognition model. After the three steps are completed, a quality model M for face image quality assessment will be obtained. q and a quality-related face recognition model M r .
[0108] Based on the model training method provided by the above embodiment of the present disclosure, the information entropy of the sample prediction probability is used to characterize the sample quality, and the quality-related face recognition model is trained based on the sample quality. The above embodiment of the present disclosure proposes a robust method for defining face quality from the perspective of the model, so that the sample quality score finally obtained is a reliable and objective score obtained from the perspective of the model, rather than a score defined subjectively by humans. In addition, based on the quality score, the above embodiment of the present disclosure proposes a method for training a quality-related face recognition model, so that the final recognition model can be well coordinated with the quality model, thereby improving the reliability and robustness of the face recognition system.
[0109] Figure 4 Schematic diagram of some embodiments of the face recognition method disclosed herein. Figure 3 Schematic diagrams of other embodiments of the face recognition method disclosed herein are also provided. Preferably, this embodiment can be executed by the face recognition device disclosed herein. Figure 4 and Figure 3 As shown, the method may include at least one of the following steps 41-42, wherein:
[0110] Step 41: Input the face picture (test picture) into the quality model for screening, and screen out the face pictures whose face quality scores are greater than a predetermined value, wherein the quality model is a model using any of the above embodiments (e.g. Figure 2 or Figure 3 The model is trained using the model training method described in Example 1.
[0111] Step 42: Input the screened face images into a quality-related face recognition model to extract features to realize recognition of the screened face images, wherein the quality-related face recognition model is a model using any of the above embodiments (e.g. Figure 2 or Figure 3 The model is trained using the model training method described in Example 1.
[0112] In the above embodiment of the present disclosure, the test image (face image) is first subjected to the quality model M q Filter and then feed into the recognition model M r Extract features for final comparison and recognition.
[0113] The above embodiments of the present disclosure train a quality-related face recognition model so that the final recognition model can be well matched with the quality model, thereby improving the reliability and robustness of the face recognition device.
[0114] Figure 5 Schematic diagram of some embodiments of the model training device disclosed herein. Figure 5 As shown, the model training device of the present disclosure may include a quality score generating module 51, a first model training module 52, and a second model training module 53, wherein:
[0115] The quality score generation module 51 is configured to generate a face quality score for each face image in the training set based on the pre-trained face recognition model.
[0116] In some embodiments of the present disclosure, the quality score generation module 51 can be configured to, for each face image in the training set, respectively adopt each pre-trained face recognition model in the plurality of pre-trained face recognition models to determine a corresponding face quality score; and weight the face quality scores corresponding to the plurality of pre-trained face recognition models to obtain a final face quality score.
[0117] The first model training module 52 is configured to train a quality model by using the face quality score as supervision information.
[0118] In some embodiments of the present disclosure, the first model training module 52 can be configured to determine a target function of the quality model according to a mean square error between the face quality score and an output of the quality model.
[0119] The second model training module 53 is configured to train a quality-related face recognition model by using the face quality score as supervision information, so that the trained quality-related face recognition model cooperates with the quality model to recognize an input face image.
[0120] In some embodiments of the present disclosure, the second model training module 53 can be configured to, in the training process of the quality-related face recognition model, correct a boundary constant term according to the face quality score; perform boundary constraint on an angle between a positive sample and a positive sample class center according to the corrected boundary constant term; and determine a target function of the quality-related face recognition model according to the angle after the boundary constraint.
[0121] In some embodiments of the present disclosure, in the case of correcting the boundary constant term according to the face quality score, the second model training module 53 can be configured to, in an initial training stage, take a first predetermined value as the boundary constant term; and in a training convergence stage, determine the boundary constant term according to the face quality score and a second predetermined value, where the second predetermined value is greater than the first predetermined value.
[0122] In some embodiments of the present disclosure, the model training apparatus can be configured to perform operations of the model training method as described in any one of the above embodiments (for example, the embodiments). Figure 2 or Figure 3 In some embodiments of the present disclosure, the model training apparatus can be configured to perform operations of the model training method as described in any one of the above embodiments (for example, the embodiments).
[0123] The model training apparatus provided by the above embodiments of the present disclosure adopts the information entropy of the sample prediction probability to represent the sample quality, and trains the quality-related face recognition model based on the sample quality. The above embodiments of the present disclosure propose a robust device for defining the face quality from the perspective of the model, so that the final sample quality score is a reliable and objective score obtained from the perspective of the model, rather than a score defined by human subjectivity. In addition, based on the quality score, the above embodiments of the present disclosure propose a device for training the quality-related face recognition model, so that the final recognition model can well cooperate with the quality model, thereby improving the reliability and robustness of the face recognition system.
[0124] Figure 6 A schematic diagram of some embodiments of the face recognition device of the present disclosure. As shown in Figure 6 , the face recognition device of the present disclosure can include a picture screening module 61 and a face recognition module 62, wherein:
[0125] The picture screening module 61 is configured to input the face picture into the quality model for screening, and screen out the face picture with a face quality score greater than a predetermined value, wherein the quality model is trained by the model training method of any one of the above embodiments (for example Figure 2 or Figure 3 the embodiment).
[0126] The face recognition module 62 is configured to input the screened face picture into the quality-related face recognition model to extract features and realize recognition of the screened face picture, wherein the quality-related face recognition model is trained by the model training method of any one of the above embodiments (for example Figure 2 or Figure 3 the embodiment).
[0127] In some embodiments of the present disclosure, the face recognition device of the present disclosure can include the model training apparatus of any one of the above embodiments of the present disclosure (for example Figure 5 the embodiment).
[0128] In the above embodiments of the present disclosure, the test picture (face picture) is first screened by the quality model M q , and then sent to the recognition model M r to extract features for final comparison and recognition.
[0129] The above embodiments of the present disclosure train the quality-related face recognition model, so that the final recognition model can well cooperate with the quality model, thereby improving the reliability and robustness of the face recognition device.
[0130] Figure 7 A structural schematic diagram of some embodiments of the computer device of the present disclosure. As shown in Figure 7 , the computer device includes a memory 71 and a processor 72.
[0131] The memory 71 is configured to store instructions, and the processor 72 is coupled to the memory 71 and is configured to execute the instructions stored in the memory to implement the method described in the above embodiments.
[0132] As shown in Figure 7 , the computer device further includes a communication interface 73 configured to interact with other devices. Meanwhile, the computer device further includes a bus 74, and the processor 72, the communication interface 73 and the memory 71 communicate with each other through the bus 74.
[0133] The memory 71 can include a high-speed RAM memory, and can further include a non-volatile memory, for example, at least one disk memory. The memory 71 can also be a memory array. The memory 71 can also be divided into blocks, and the blocks can be combined into a virtual volume according to certain rules.
[0134] In addition, the processor 72 can be a central processing unit CPU, or can be an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement the embodiments of the present disclosure.
[0135] Based on the computer device provided by the above embodiments of the present disclosure, the information entropy of the sample prediction probability is used to represent the sample quality, and the quality-related face recognition model is trained based on the sample quality. The above embodiments of the present disclosure propose a robust scheme for defining the face quality from the perspective of the model, so that the final sample quality score is a reliable and objective score obtained from the perspective of the model, rather than a score defined by human subjective. In addition, based on the quality score, the above embodiments of the present disclosure propose a scheme for training a quality-related face recognition model, so that the final recognition model can well cooperate with the quality model, thereby improving the reliability and robustness of the face recognition system.
[0136] According to another aspect of the present disclosure, a non-transitory computer readable storage medium is provided, wherein the non-transitory computer readable storage medium stores computer instructions, and the instructions are executed by a processor to implement the model training method according to any one of the above embodiments (for example Figure 2 or Figure 3 the face recognition method according to any one of the above embodiments (for example Figure 4 or Figure 3 ).
[0137] Those skilled in the art will appreciate that embodiments of the disclosure can be supplied as a method, an apparatus, or a computer program product. Thus, the disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the disclosure can take the form of a computer program product on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) having computer-usable program code embodied in the medium.
[0138] The disclosure is described in reference to the flowchart and / or block diagrams of the method, apparatus (system) and computer program product according to embodiments of the disclosure. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as a combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions, which are executed via the processor of the computer or other programmable data processing apparatus, generate a means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowchart and / or block diagram block or blocks.
[0139] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction apparatus that implements the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowchart and / or block diagram block or blocks.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to generate a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowchart and / or block diagram block or blocks.
[0141] The model training apparatus and face recognition device described above can be implemented as a general-purpose processor, a programmable logic controller (PLC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any appropriate combination thereof.
[0142] So far, the present disclosure has been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein according to the above description.
[0143] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing relevant hardware to complete, and the program can be stored in a non-transitory computer readable storage medium, which can be a read-only memory, a magnetic disk or an optical disk, etc.
[0144] The description of the present disclosure is given for the purpose of illustration and description, and is not exhaustive or limiting to the present disclosure. Many modifications and variations will be apparent to those skilled in the art. The embodiments are chosen and described in order to better illustrate the principles and practical application of the present disclosure, and to enable others skilled in the art to understand the present disclosure in order to design various embodiments with various modifications for specific use.
Claims
1. A model training method, characterized in that, The method comprises the following steps: generating a face quality score for each face picture in the training set based on a pre-trained face recognition model; training a quality model using the face quality score as supervision information; training a quality-related face recognition model using the face quality score as supervision information, so that the trained quality-related face recognition model cooperates with the quality model to recognize an input face picture; wherein the step of training the quality-related face recognition model using the face quality score as supervision information comprises the following steps: correcting a boundary constant term according to the face quality score during the training process of the quality-related face recognition model; performing boundary constraint on the included angle between the positive sample and the positive sample class center according to the corrected boundary constant term; determining a target function of the quality-related face recognition model according to the boundary-constrained included angle; wherein the step of correcting the boundary constant term according to the face quality score comprises the following steps: using a first predetermined value as the boundary constant term at the initial stage of training; determining the boundary constant term according to the product of the face quality score and a second predetermined value at the convergence stage of training, the second predetermined value being greater than the first predetermined value.
2. The model training method of claim 1, wherein, The step of generating a face quality score for each face picture in the training set based on a pre-trained face recognition model comprises the following steps: for each face picture in the training set, using a pre-trained face recognition model to predict the probability of the face picture belonging to each class; determining the information entropy of the face picture according to the probability of the face picture belonging to each class; determining the face quality score of the face picture according to the information entropy of the face picture.
3. The model training method of claim 2, wherein, The step of generating a face quality score for each face picture in the training set based on a pre-trained face recognition model comprises the following steps: for each face picture in the training set, using each pre-trained face recognition model in a plurality of pre-trained face recognition models to determine a corresponding face quality score; weighting the face quality scores corresponding to the plurality of pre-trained face recognition models to obtain a final face quality score.
4. The model training method of any one of claims 1-3, characterized in that, The step of training a quality model using the face quality score as supervision information comprises the following step: determining a target function of the quality model according to the mean square error between the face quality score and the output of the quality model.
5. A face recognition method, characterized by, The method comprises the following steps: inputting a face picture into a quality model for screening, and screening out a face picture with a face quality score greater than a predetermined value, wherein the quality model is trained by the model training method according to any one of claims 1-4; inputting the screened face picture into a quality-related face recognition model to extract features and realize recognition of the screened face picture, wherein the quality-related face recognition model is trained by the model training method according to any one of claims 1-4.
6. A model training apparatus characterized by comprising: The method comprises the following steps: a quality score generation module for generating a face quality score for each face picture in the training set based on a pre-trained face recognition model; a first model training module for training a quality model using the face quality score as supervision information; a second model training module for training a quality-related face recognition model using the face quality score as supervision information, so that the trained quality-related face recognition model cooperates with the quality model to recognize an input face picture. The quality-related face recognition model is trained by using the face quality score as supervision information, and the training method comprises the following steps. In the training process of the quality-related face recognition model, the boundary constant term is corrected according to the face quality score; The angle between the positive sample and the positive sample class center is boundary-constrained according to the corrected boundary constant term; The target function of the quality-related face recognition model is determined according to the boundary-constrained angle. The boundary constant term is corrected according to the face quality score, and the method comprises the following steps. In the initial training stage, a first predetermined value is used as the boundary constant term. In the training convergence stage, the boundary constant term is determined according to the product of the face quality score and a second predetermined value, and the second predetermined value is greater than the first predetermined value. 7.The model training apparatus of claim 6, wherein, The model training device is used to implement the model training method according to any one of claims 2-4.
8. A face recognition device, characterized by, The model training device comprises: a picture screening module, configured to input a face picture into a quality model for screening, and screen out a face picture with a face quality score greater than a predetermined value, wherein the quality model is trained by using the model training method according to any one of claims 1-4; a face recognition module, configured to input the screened face picture into a quality-related face recognition model, extract features, and implement recognition of the screened face picture, wherein the quality-related face recognition model is trained by using the model training method according to any one of claims 1-4.
9. A computer apparatus, comprising: The model training device comprises: a memory, configured to store instructions; a processor, configured to execute the instructions, so that the computer device implements the model training method according to any one of claims 1-4, and / or the face recognition method according to claim 5.
10. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions, and the instructions are executed by the processor to implement the model training method according to any one of claims 1-4, and / or the face recognition method according to claim 5.
Citation Information
Patent Citations
Image segmentation network training method and device, image segmentation method and device and storage medium
CN111199550A
Face quality evaluation method and device and computer storage medium
CN111582150A