CN114758397A - Model training method and device, face recognition method and device and storage medium - Google Patents

Model training method and device, face recognition method and device and storage medium Download PDF

Info

Publication number
CN114758397A
CN114758397A CN202210444675.XA CN202210444675A CN114758397A CN 114758397 A CN114758397 A CN 114758397A CN 202210444675 A CN202210444675 A CN 202210444675A CN 114758397 A CN114758397 A CN 114758397A
Authority
CN
China
Prior art keywords
face
quality
model
training
face recognition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210444675.XA
Other languages
Chinese (zh)
Inventor
王军
张阳
戴汉彬
于伟
王林芳
杨琛
梅涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202210444675.XA priority Critical patent/CN114758397A/en
Publication of CN114758397A publication Critical patent/CN114758397A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure relates to a model training method and device, a face recognition method and device, and a storage medium. The model training method comprises the following steps: generating a face quality score for each face picture in the training set based on the pre-training face recognition model; training a quality model by using the face quality score as supervision information; and training a quality-related face recognition model by using the face quality score as supervision information so as to enable the trained quality-related face recognition model to be matched with the quality model to recognize the input face picture. The method and the device can define the face quality from the angle of the model, thereby improving the reliability and robustness of the face recognition model.

Description

Model training method and device, face recognition method and device and storage medium
Technical Field
The present disclosure relates to the field of face recognition, and in particular, to a model training method and apparatus, a face recognition method and apparatus, and a storage medium.
Background
In recent years, the face recognition technology is rapidly developed, and the face recognition is almost indispensable in the industries of security monitoring, intelligent retail and the like. The face recognition technology of the related art is mainly based on deep learning, and although the deep learning has more remarkable advantages in the aspects of generalization, learning ability and the like compared with the traditional machine learning method, some risks still exist in the aspects of interpretability, robustness and the like.
Disclosure of Invention
The inventor discovers through research that: in the prior art, the face recognition technology based on quality judgment usually considers the face quality judgment and the face recognition as two separate processes, namely, firstly, the quality of a face picture is judged by a certain method, and then, a picture with high quality score is selected for face recognition so as to prevent the problem that a face recognition model is mistakenly matched or cannot be recalled 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 define the quality labels through artificial subjectivity and then train the quality models, so that the quality models actually learn the quality which is considered by the subjectivity of people, but the quality is considered by human eyes to be good, the quality is not necessarily considered by the models to be good, the quality is considered by the human eyes to be poor, and the quality is not necessarily considered by the models to be poor.
In view of at least one of the above technical problems, the present disclosure provides a model training method and apparatus, a face recognition method and apparatus, and a storage medium, which define face quality from the perspective of a model, thereby improving reliability and robustness of a face recognition model.
According to an aspect of the present disclosure, there is provided a model training method, including:
Generating a face quality score for each face picture in the training set based on the pre-training face recognition model;
training a quality model by using the face quality score as supervision information;
and training a quality-related face recognition model by using the face quality score as supervision information so as to match the trained quality-related face recognition model with the quality model and recognize the input face picture.
In some embodiments of the present disclosure, the generating a face quality score for each face picture in the training set based on the pre-trained face recognition model comprises:
for each face picture in the training set, adopting a pre-training face recognition model to predict the probability of the face picture belonging to each category;
determining the information entropy of the face picture according to the probability that the face picture belongs to each category;
and determining the face quality score of the face picture according to the information entropy of the face picture.
In some embodiments of the present disclosure, the generating a face quality score for each face picture in the training set based on the pre-trained face recognition model comprises:
for each face picture in the training set, respectively adopting each pre-training face recognition model in a plurality of pre-training face recognition models, and determining a corresponding face quality score;
And weighting the face quality scores corresponding to the pre-trained face recognition models to obtain the final face quality score.
In some embodiments of the present disclosure, said training a quality-related face recognition model using said face quality score as supervised information comprises:
in the training process of the quality-related face recognition model, correcting a boundary constant item according to the face quality score;
performing boundary constraint on an included angle between the positive sample and the center of the positive sample class according to the modified boundary constant term;
and determining an objective function of the quality-related face recognition model according to the included angle after the boundary constraint.
In some embodiments of the present disclosure, said modifying a boundary constant term according to the face quality score includes:
in the initial training stage, taking a first preset value as a boundary constant term;
and in a training convergence stage, determining a boundary constant term according to the face quality score and a second preset value, wherein the second preset value is larger than the first preset value.
In some embodiments of the present disclosure, said training a quality model using said face quality score as supervised information comprises:
and determining an objective function of the quality model according to the face quality fraction and the mean square error output by the quality model.
According to another aspect of the present disclosure, there is provided a face recognition method, including:
inputting the face pictures into a quality model for screening, and screening out the face pictures with the face quality scores larger than a preset value, wherein the quality model is obtained by adopting the model training method in any embodiment;
inputting the screened face picture into a quality-related face recognition model, and extracting features to realize recognition of the screened face picture, wherein the quality-related face recognition model is obtained by training by adopting the model training method of any one of the above embodiments.
According to another aspect of the present disclosure, there is provided a model training apparatus including:
the quality score generation module is used for generating a face quality score for each face picture in the training set based on the pre-training face recognition model;
the first model training module is used for training a quality model by taking the face quality score as supervision information;
and the second model training module is used for training the quality-related face recognition model by using the face quality score as supervision information so as to ensure that the trained quality-related face recognition model is matched with the quality model to recognize the input face picture.
In some embodiments of the present disclosure, the model training apparatus is configured to perform operations for implementing the model training method according to any of the above embodiments.
According to another aspect of the present disclosure, there is provided a face recognition apparatus including:
the image screening module is used for inputting the face images into a quality model for screening to screen out the face images with the face quality scores larger than a preset value, wherein the quality model is obtained by adopting the model training method in any one of the embodiments;
and the face recognition module is used for inputting the screened face pictures into a quality-related face recognition model and extracting features to realize recognition of the screened face pictures, wherein the quality-related face recognition model is obtained by training by adopting the model training method in any embodiment.
According to another aspect of the present disclosure, there is provided a computer apparatus comprising:
a memory to store instructions;
a processor configured to execute the instructions to enable the computer device to perform operations of implementing 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.
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, which 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.
The face quality can be defined from the angle of the model, so that the reliability and robustness of the face recognition model are improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that 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 efforts.
Fig. 1 is a schematic diagram of related art face recognition. Fig. 1 includes fig. 1a, 1b and 1 c.
FIG. 2 is a schematic diagram of some embodiments of a model training method of the present disclosure.
FIG. 3 is a schematic diagram of additional embodiments of a model training method of the present disclosure.
Fig. 4 is a schematic diagram of some embodiments of the face recognition method of the present disclosure.
FIG. 5 is a schematic diagram of some embodiments of a model training apparatus of the present disclosure.
Fig. 6 is a schematic diagram of some embodiments of a face recognition apparatus of the present disclosure.
FIG. 7 is a schematic block diagram of some embodiments of a computer apparatus according to the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The inventor finds out through research that: in the prior art, the face recognition technology based on quality judgment usually considers the face quality judgment and the face recognition as two separate processes, namely, firstly, the quality of a face picture is judged by a certain method, and then, a picture with high quality score is selected for face recognition so as to prevent the problem that a face recognition model is mistakenly matched or cannot be recalled 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 define the quality labels through artificial subjectivity and then train the quality models, so that the quality models actually learn the quality which is considered by the subjectivity of people, but the quality is considered by human eyes to be good, the quality is not necessarily considered by the models to be good, the quality is considered by the human eyes to be poor, and the quality is not necessarily considered by the models to be poor.
Fig. 1 is a schematic diagram of related art face recognition. Fig. 1 includes fig. 1a, 1b and 1c, in which fig. 1a is a base library picture of face recognition. Fig. 1b and 1c show images to be recognized. The human eye of FIG. 1b subjectively looks very good, but most recognition models are difficult to recall, and the human eye of FIG. 1c subjectively looks very poor, but recognition models are easier to recall.
In view of at least one of the above technical problems, the present disclosure provides a model training method and apparatus, a face recognition method and apparatus, and a storage medium, and the present disclosure is described below with specific embodiments.
FIG. 2 is a schematic diagram of some embodiments of a model training method of the present disclosure. FIG. 3 is a schematic diagram of additional embodiments of a model training method of the present disclosure. Preferably, the present embodiment can be performed by the model training apparatus of the present disclosure. As shown in fig. 2 and 3, the method may include at least one of the following steps 21-23, wherein:
and step 21, generating a face quality score for each face picture in the training set based on the pre-training face recognition model.
In some embodiments of the present disclosure, the face quality score should not be generated based on human eye subjective judgments, and the present disclosure proposes to generate the face quality score from a model perspective using a pre-trained face recognition model.
In some embodiments of the present disclosure, step 21 may comprise: and acquiring the quality scores of the pictures in the training set.
In some embodiments of the present disclosure, step 21 may include at least one of steps 210-213, wherein:
in step 210, in order to train the face quality evaluation model, a quality score label is marked on the face in the training set, and as shown in fig. 3, a corresponding quality score label is marked on each face picture in the test set.
And step 211, adopting a pre-training face recognition model to predict the probability that each face picture belongs to each category for each face picture in the training set.
In some embodiments of the present disclosure, the pre-trained model is a face recognition model obtained by training on a training set by using a conventional face recognition training method. For a trained face recognition model, the quality of an input picture is good, the probability that the picture is predicted to be in a correct category by the model is inevitably higher and even infinitely close to 1, and the probability that the picture is predicted to be in a wrong category is extremely low; similarly, if the quality of the input picture is poor, the probability that the model predicts the picture as the correct category is relatively small, and the probability that the picture is predicted as each of the other categories is relatively large.
Table 1 is the probability that a high quality sample and a low quality sample belong to each category in some embodiments of the present disclosure. As shown in Table 1, for both high-quality and low-quality samples belonging to the same category CT, the model predicts the high-quality samples as category CTProbability P (C) ofT) 0.999, the probability of predicting other samples is extremely small; the prediction probability of the model for the low-quality samples is distributed uniformly, and the probability of predicting the low-quality samples into the correct category is also small.
TABLE 1
P(C1) P(C2) P(CT) P(CN-1) P(CN)
High quality samples 1e-6 1e-6 0.999 1e-7 1e-6
Low quality samples 0.12 0.14 0.37 0.19 0.14
And 212, determining the information entropy of the face picture according to the probability that the face picture belongs to each category.
In some embodiments of the present disclosure, step 212 may comprise: based on the 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.
In some embodiments of the present disclosure, step 212 may comprise: for a system comprising N classes C1To CNThe probability that the pre-training model predicts a sample S as a class i is P (C)i) Then the information entropy h (c) of the sample for the pre-trained model is as shown in equation (1).
Figure BDA0003616158770000071
In some embodiments of the present disclosure, if the calculated information entropy of the 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 that the sample is predicted as various incorrect categories is large, so that the quality of the sample is poor. For example: table 1 low quality samples in N classes C 1To CNTends to be higher than for high quality samples in the N classes C1To CNTends to be more uniform.
And step 213, determining the face quality score of the face picture according to the information entropy of the face picture.
In some embodiments of the present disclosure, step 213 may include normalizing the information entropy h (c) to a mass fraction, as shown in equation (2), since it has a value range of [0, log2N ].
Figure BDA0003616158770000072
Wherein Q isiAnd (S) is the quality score of the sample S under the current pre-training model.
In the embodiment of the disclosure, since the score is calculated by a certain model, there may be a deviation of the model, and when other pre-training models are adopted, different quality scores can be calculated.
In order to remove the model deviation, the embodiment of the disclosure uses a large number of pre-training models to calculate the quality score, and weights to obtain the final quality score.
In some embodiments of the present disclosure, step 21 may further include at least one of step 214-step 215, wherein:
and 214, determining a corresponding face quality score by respectively adopting each pre-training face recognition model in the plurality of pre-training face recognition models for each face picture in the training set.
In some embodiments of the present disclosure, as shown in fig. 3, two different pre-trained face recognition models (pre-trained models) respectively obtain corresponding class probability distributions, and then determine a face quality score corresponding to each face picture under each pre-trained model.
Step 215, weighting the face quality scores corresponding to the pre-trained face recognition models to obtain the final face quality score.
In some embodiments of the present disclosure, to ensure the diversity of the models, the pre-training model selects various models of different network structures and different loss functions for supervised training.
In some embodiments of the present disclosure, the plurality of network structures may include: ResNet (Residual Neural Network) 50, ResNet101, ResNet152, MobileFaceNet (mobile end face recognition model), AttentionNet (attention Network), RepVGG-B0, and so on.
In some embodiments of the present disclosure, the plurality of loss functions may include: SoftMax, AM-SoftMax, ArcFace (Additive Angular spacing Loss function), CosFace, MV-SoftMax, and the like.
In some embodiments of the present disclosure, step 215 may comprise: assuming that the number of the finally adopted pre-training models is m, the quality fraction q (S) of the final sample S is shown in formula (3).
Figure BDA0003616158770000081
Through the above steps of the present disclosure, each sample in the training set obtains 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.
And step 22, training a quality model by using the face quality score as supervision information.
In some embodiments of the present disclosure, step 22 may comprise: and (5) training a quality evaluation model.
In some embodiments of the present disclosure, step 22 may comprise: and determining an objective function L of the quality model according to the face quality fraction and the mean square error output by the quality model.
In some embodiments of the present disclosure, step 22 may comprise: training a regression model as a final quality evaluation model by using a training set picture as input and a quality score as supervision information, wherein the final objective function L is shown as a formula (4) by adding a weight attenuation term to prevent overfitting by adopting a traditional mean square error as an objective function, and f (x) is shown asi) For input sample xiModel output of time, quality score predicted for model, QiIs a sample xiM is the number of samples of a training batch, n is the number of model parameters, thetajFor the jth parameter, λ is the parameter weight,
Figure BDA0003616158770000091
Is a weighted decay term.
Figure BDA0003616158770000092
The above embodiment of the present disclosure obtains the quality score of each face sample by using the pre-training model in step 21, and obtains the quality evaluation model (quality model) by using the quality score training in step 22. In order to keep consistency between the final recognition model and the quality evaluation model, the embodiment of the disclosure provides that the quality score is further used in the supervision information of the final face recognition model, so that the model has stronger recognition capability on a picture with good quality, and meanwhile, the problem that a part of pictures with poor quality cannot be recognized can be tolerated.
And step 23, training a quality-related face recognition model by using the face quality score as supervision information so that the trained quality-related face recognition model is matched with the quality model to recognize the input face picture.
In some embodiments of the present disclosure, step 23 may include at least one of steps 231-233, wherein:
and 231, correcting a boundary constant item according to the face quality score in the training process of the quality-related face recognition model.
In some embodiments of the present disclosure, in step 231, the step of modifying a boundary constant term according to the face quality score may include: in the initial training period, a first preset value m1 is used as a boundary constant term; in the training convergence stage, a boundary constant term is determined according to the face quality score and a second preset value m2, wherein the second preset value m2 is larger than the first preset value m 1.
In some embodiments of the present disclosure, in the step 231, the step of modifying the boundary constant term according to the face quality score may include: on the premise that the sample quality is known, the patent proposes to correct margin by the sample quality fraction in the training process. In the early training stage, a uniform small margin equal to m1 is set for all samples for fast model convergence (m1 can be empirically set to be 0.3), after model training is basically converged, margin is set to be a large value m2(m2 can be empirically set to be 0.8), and the value is multiplied by the sample intrinsic quantity fraction to obtain a final quality-related margin, wherein the calculation formula is shown as formula (5).
Figure BDA0003616158770000101
And 232, performing boundary constraint on an included angle between the positive sample and the class center of the positive sample according to the modified boundary constant term margin.
In some embodiments of the present disclosure, step 232 may comprise: in a classical face recognition model loss function (such as ArcFace), the distance in a sample class is as small as possible, the distance between classes is as large as possible, and an included angle between a positive sample and the class center of the positive sample is often included
Figure BDA0003616158770000102
Adding stronger boundary constraint, namely adding a constant term margin, wherein margin (Q)i) Is in the unit of angle in degrees,
Figure BDA0003616158770000103
Meaning sample yiAnd category j.
And 233, determining an objective function of the quality-related face recognition model according to the included angle after the boundary constraint.
In some embodiments of the present disclosure, steps 232 and 233 may include: based on the quality-related margin, an objective function L of the final training face recognition model is shown in formula (6). Where M is the number of samples sampled per training batch, θj,iThe angle between sample i and class j,
Figure BDA0003616158770000104
meaning sample yiAnd the angle, y, between category jiRepresents the class corresponding to the current sample i, j is the class number, j! Y ═ yiIndicates that the class is not the class corresponding to the current sample i, QiIs the mass fraction of sample i, C is the total number of classes, and s is a constant hyper-parameter (typically set to 32 or 64).
Figure BDA0003616158770000105
As shown in fig. 2 and 3, the model training method of the present disclosure includes three steps: step 21, acquiring the quality fraction of the training set pictures; step 22, training a quality evaluation model; and step 23, training a quality-related recognition model. After the three steps are finished, a quality model M for evaluating the quality of the face picture is obtainedqA quality dependent face recognition model Mr
Based on the model training method provided by the embodiment of the disclosure, the sample quality is represented by using the information entropy of the sample prediction probability, and the quality-related face recognition model is trained based on the sample quality. The above embodiments of the present disclosure provide a robust method for defining face quality from a model perspective, so that the finally obtained sample quality score is a reliable and objective score obtained from the model perspective, rather than a score defined subjectively by a human. In addition, based on the quality score, the embodiment of the disclosure provides a method for training a quality-related face recognition model, so that the final recognition model can be well matched with the quality model, and the reliability and robustness of the face recognition system are improved.
Fig. 4 is a schematic diagram of some embodiments of the face recognition method of the present disclosure. Fig. 3 also shows schematic diagrams of other embodiments of the face recognition method of the present disclosure. Preferably, the present embodiment may be performed by the face recognition apparatus of the present disclosure. As shown in fig. 4 and 3, the method may comprise at least one of the following steps 41-42, wherein:
step 41, inputting the face picture (test picture) into a quality model for screening, and screening out the face picture with the face quality score larger than a predetermined value, wherein the quality model is obtained by training with the model training method according to any one of the embodiments (for example, the embodiment of fig. 2 or fig. 3).
Step 42, inputting the screened face picture into a quality-related face recognition model, and extracting features to realize recognition of the screened face picture, wherein the quality-related face recognition model is obtained by training with the model training method according to any one of the embodiments (for example, the embodiment shown in fig. 2 or fig. 3).
In the above embodiment of the present disclosure, the test picture (face picture) first passes through the quality model MqScreening, and sending into recognition model MrAnd extracting features for final comparison and identification.
According to the embodiment of the invention, the quality-related face recognition model is trained, so that the final recognition model can be well matched with the quality model, and the reliability and robustness of the face recognition equipment are improved.
FIG. 5 is a schematic diagram of some embodiments of a model training apparatus of the present disclosure. As shown in fig. 5, the disclosed model training apparatus may include a quality score generation module 51, a first model training module 52, and a second model training module 53, wherein:
and a quality score generation module 51, configured to generate a face quality score for each face picture in the training set based on the pre-trained face recognition model.
In some embodiments of the present disclosure, the quality score generating module 51 may be configured to, for each face picture in the training set, respectively adopt each pre-training face recognition model in the plurality of pre-training face recognition models to determine a corresponding face quality score; and weighting the face quality scores corresponding to the pre-trained face recognition models to obtain the final face quality score.
And the first model training module 52 is used for training a quality model by using the face quality scores as supervision information.
In some embodiments of the present disclosure, the first model training module 52 may be configured to determine an objective function of the quality model according to the face quality score and a mean square error output by the quality model.
And the second model training module 53 is configured to train a quality-related face recognition model using the face quality score as the supervision information, so that the trained quality-related face recognition model cooperates with the quality model to recognize the input face picture.
In some embodiments of the present disclosure, the second model training module 53 may be configured to modify a boundary constant term according to the face quality score during training of the quality-related face recognition model; performing boundary constraint on an included angle between the positive sample and the center of the positive sample class according to the modified boundary constant term; and determining an objective function of the quality-related face recognition model according to the included angle after the boundary constraint.
In some embodiments of the present disclosure, the second model training module 53, in case of modifying the boundary constant term according to the face quality score, may be configured to use a first predetermined value as the boundary constant term at an early stage of training; and in a training convergence stage, determining a boundary constant term according to the face quality score and a second preset value, wherein the second preset value is larger than the first preset value.
In some embodiments of the present disclosure, the model training apparatus may be configured to perform operations for implementing the model training method according to any of the embodiments (e.g., the embodiments of fig. 2 or fig. 3).
Based on the model training device provided by the embodiment of the disclosure, the sample quality is represented by using the information entropy of the sample prediction probability, and the quality-related face recognition model is trained based on the sample quality. The above embodiments of the present disclosure provide a robust apparatus for defining the quality of a human face from the perspective of a model, so that the finally obtained sample quality score is a reliable and objective score obtained from the perspective of the model, rather than a score defined subjectively by a human. In addition, based on the quality score, the embodiment of the disclosure provides a device for training a quality-related face recognition model, so that the final recognition model can be well matched with the quality model, and the reliability and robustness of the face recognition system are improved.
Fig. 6 is a schematic diagram of some embodiments of a face recognition apparatus of the present disclosure. As shown in fig. 6, the face recognition apparatus of the present disclosure may include a picture screening module 61 and a face recognition module 62, wherein:
the image screening module 61 is configured to input the face image into a quality model for screening, and screen out a face image with a face quality score greater than a predetermined value, where the quality model is obtained by training using the model training method according to any one of the embodiments (for example, the embodiment shown in fig. 2 or fig. 3).
The face recognition module 62 is configured to input the filtered face image into a quality-related face recognition model, and extract features to realize recognition of the filtered face image, where the quality-related face recognition model is obtained by training using the model training method according to any one of the embodiments (for example, the embodiment shown in fig. 2 or fig. 3).
In some embodiments of the present disclosure, the face recognition apparatus of the present disclosure may include the model training device described in any of the above embodiments of the present disclosure (e.g., the embodiment of fig. 5).
In the above embodiments of the present disclosure, the test picture (face picture) first passes through the quality model MqScreening, and sending into recognition model MrExtracting features and carrying out final comparison and identification.
According to the embodiment of the invention, the quality-related face recognition model is trained, so that the final recognition model can be well matched with the quality model, and the reliability and robustness of the face recognition equipment are improved.
FIG. 7 is a schematic block diagram of some embodiments of a computer apparatus according to the present disclosure. As shown in fig. 7, the computer apparatus includes a memory 71 and a processor 72.
The memory 71 is used for storing instructions, the processor 72 is coupled to the memory 71, and the processor 72 is configured to execute the method related to implementing the above-mentioned embodiments based on the instructions stored in the memory.
As shown in fig. 7, the computer apparatus further comprises a communication interface 73 for information interaction with other devices. The computer device also includes a bus 74, and the processor 72, the communication interface 73, and the memory 71 communicate with each other via the bus 74.
The memory 71 may comprise a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 71 may also be a memory array. The storage 71 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules.
Further, the processor 72 may be a central processing unit CPU, or may be an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present disclosure.
Based on the computer device provided by the embodiment of the disclosure, the sample quality is represented by the information entropy of the sample prediction probability, and the quality-related face recognition model is trained based on the sample quality. The above embodiments of the present disclosure provide a robust scheme for defining the quality of a human face from the perspective of a model, so that the finally obtained 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 embodiment of the disclosure provides a scheme for training the quality-related face recognition model, so that the final recognition model can be well matched with the quality model, and the reliability and robustness of the face recognition system are improved.
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, which when executed by a processor, implement the model training method according to any one of the embodiments (e.g., the embodiment of fig. 2 or fig. 3) above, and/or the face recognition method according to any one of the embodiments (e.g., the embodiment of fig. 4 or fig. 3) above.
As will be appreciated by one of skill in the art, embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The model training apparatus and face recognition device described above may 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 device, discrete gate or transistor logic, discrete hardware components, or any suitable combination thereof designed to perform the functions described herein.
Thus far, the present disclosure has been described in detail. Some details well known in the art have not been described in order to avoid obscuring the concepts of the present disclosure. Those skilled in the art can now fully appreciate how to implement the teachings disclosed herein, in view of the foregoing description.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware to implement the steps.
The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (12)

1. A method of model training, comprising:
Generating a face quality score for each face picture in the training set based on the pre-training face recognition model;
training a quality model by using the face quality score as supervision information;
and training a quality-related face recognition model by using the face quality score as supervision information so as to enable the trained quality-related face recognition model to be matched with the quality model to recognize the input face picture.
2. The model training method of claim 1, wherein the generating a face quality score for each face picture in the training set based on the pre-trained face recognition model comprises:
for each face picture in the training set, adopting a pre-training face recognition model to predict the probability of the face picture belonging to each category;
determining the information entropy of the face picture according to the probability that the face picture belongs to each category;
and 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 generating a face quality score for each face picture in the training set based on the pre-trained face recognition model comprises:
for each face picture in the training set, respectively adopting each pre-training face recognition model in a plurality of pre-training face recognition models to determine a corresponding face quality score;
And weighting the face quality scores corresponding to the pre-training face recognition models to obtain the final face quality score.
4. The model training method according to any one of claims 1-3, wherein the training of the quality-related face recognition model using the face quality score as the supervised information comprises:
in the training process of the quality-related face recognition model, correcting a boundary constant item according to the face quality score;
performing boundary constraint on an included angle between the positive sample and the center of the positive sample class according to the modified boundary constant term;
and determining an objective function of the quality-related face recognition model according to the included angle after the boundary constraint.
5. The model training method of claim 4, wherein the modifying the boundary constant term according to the face quality score comprises:
in the initial training stage, taking a first preset value as a boundary constant term;
and in a training convergence stage, determining a boundary constant term according to the face quality score and a second preset value, wherein the second preset value is larger than the first preset value.
6. The model training method according to any one of claims 1-3, wherein the training of the quality model using the face quality score as the supervised information comprises:
And determining an objective function of the quality model according to the face quality fraction and the mean square error output by the quality model.
7. A face recognition method, comprising:
inputting the human face pictures into a quality model for screening, and screening out the human face pictures with the human face quality score larger than a preset value, wherein the quality model is obtained by training by adopting the model training method according to any one of claims 1-6;
inputting the screened face picture into a quality-related face recognition model, and extracting features to realize recognition of the screened face picture, wherein the quality-related face recognition model is obtained by training by using the model training method according to any one of claims 1 to 6.
8. A model training apparatus, comprising:
the quality score generation module is used for generating a face quality score for each face picture in the training set based on the pre-training face recognition model;
the first model training module is used for training a quality model by taking the face quality score as supervision information;
and the second model training module is used for training the quality-related face recognition model by using the face quality score as supervision information so as to ensure that the trained quality-related face recognition model is matched with the quality model to recognize the input face picture.
9. The model training apparatus according to claim 8, wherein the model training apparatus is configured to perform operations to implement the model training method according to any one of claims 1 to 6.
10. A face recognition device, comprising:
the image screening module is used for inputting the human face image into a quality model for screening to screen out the human face image with the human face quality score larger than a preset value, wherein the quality model is obtained by adopting the model training method as claimed in any one of claims 1 to 6;
a face recognition module, configured to input the filtered face image into a quality-related face recognition model, and extract features to realize recognition of the filtered face image, where the quality-related face recognition model is obtained by training according to the model training method of any one of claims 1 to 6.
11. A computer device, comprising:
a memory to store instructions;
a processor for executing the instructions to cause the computer apparatus to perform operations to implement the model training method of any one of claims 1-6 and/or the face recognition method of claim 7.
12. A non-transitory computer readable storage medium storing computer instructions which, when executed by a processor, implement the model training method of any one of claims 1-6 and/or the face recognition method of claim 7.
CN202210444675.XA 2022-04-26 2022-04-26 Model training method and device, face recognition method and device and storage medium Pending CN114758397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210444675.XA CN114758397A (en) 2022-04-26 2022-04-26 Model training method and device, face recognition method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210444675.XA CN114758397A (en) 2022-04-26 2022-04-26 Model training method and device, face recognition method and device and storage medium

Publications (1)

Publication Number Publication Date
CN114758397A true CN114758397A (en) 2022-07-15

Family

ID=82333521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210444675.XA Pending CN114758397A (en) 2022-04-26 2022-04-26 Model training method and device, face recognition method and device and storage medium

Country Status (1)

Country Link
CN (1) CN114758397A (en)

Similar Documents

Publication Publication Date Title
CN109376615B (en) Method, device and storage medium for improving prediction performance of deep learning network
TWI677852B (en) A method and apparatus, electronic equipment, computer readable storage medium for extracting image feature
CN109117380B (en) Software quality evaluation method, device, equipment and readable storage medium
CN108334910B (en) Event detection model training method and event detection method
CN111260620B (en) Image anomaly detection method and device and electronic equipment
CN111783505A (en) Method and device for identifying forged faces and computer-readable storage medium
CN112668809B (en) Method for establishing autism children rehabilitation effect prediction model
CN111834010A (en) COVID-19 detection false negative identification method based on attribute reduction and XGboost
CN110516697A (en) Statement verification method and system based on evidence figure polymerization and reasoning
CN112668698A (en) Neural network training method and system
JP2019152964A (en) Learning method and learning device
CN111144296B (en) Retina fundus picture classification method based on improved CNN model
CN111275780B (en) Character image generation method and device
CN113506186B (en) Method and device for screening disturbed track of power system, electronic equipment and storage medium
CN109101984B (en) Image identification method and device based on convolutional neural network
CN113761026A (en) Feature selection method, device, equipment and storage medium based on conditional mutual information
CN109934352B (en) Automatic evolution method of intelligent model
CN111414930B (en) Deep learning model training method and device, electronic equipment and storage medium
CN114758397A (en) Model training method and device, face recognition method and device and storage medium
CN114387524B (en) Image identification method and system for small sample learning based on multilevel second-order representation
CN115410250A (en) Array type human face beauty prediction method, equipment and storage medium
CN115757112A (en) Test subset construction method based on variation analysis and related equipment
CN115713669A (en) Image classification method and device based on inter-class relation, storage medium and terminal
CN115063374A (en) Model training method, face image quality scoring method, electronic device and storage medium
CN114463574A (en) Scene classification method and device for remote sensing image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination