WO2018054283A1 - Face model training method and device, and face authentication method and device - Google Patents

Face model training method and device, and face authentication method and device Download PDF

Info

Publication number
WO2018054283A1
WO2018054283A1 PCT/CN2017/102255 CN2017102255W WO2018054283A1 WO 2018054283 A1 WO2018054283 A1 WO 2018054283A1 CN 2017102255 W CN2017102255 W CN 2017102255W WO 2018054283 A1 WO2018054283 A1 WO 2018054283A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
model
training
feature
image data
Prior art date
Application number
PCT/CN2017/102255
Other languages
French (fr)
Chinese (zh)
Inventor
王洋
张伟琳
陆小军
Original Assignee
北京眼神科技有限公司
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 北京眼神科技有限公司 filed Critical 北京眼神科技有限公司
Publication of WO2018054283A1 publication Critical patent/WO2018054283A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Definitions

  • the embodiments of the present application relate to the technical field of biological data, and in particular, to a training method for a face model, a face authentication method based on a face model, a training device for a face model, and a face model based on a face model. Face authentication device.
  • Face authentication has the characteristics of low user cooperation, non-contact, and non-mandatory in use. Face authentication assists in the verification of documents in the fields of finance and commerce.
  • face authentication is also highly susceptible to the external environment (such as lighting, gestures, expressions, etc.), and the images in the document are compressed, the resolution is low, and the age difference between the current video image is large, and the background difference is obvious.
  • the method of authentication processing based on documents is mainly based on traditional statistical learning and machine learning methods, for example, MMP-PCA method, LGBP-PCA-LDA method, BSF-PCA-LDA method, and the like.
  • the embodiment of the present application proposes a training method of the face model, a face authentication method based on the face model and a corresponding training of the face model.
  • a training method for a face model including:
  • the training sample including training image data and document image data
  • the face feature model is adjusted by using a paired training face image and a document face image.
  • the embodiment of the present application further discloses a face authentication method based on a face model, wherein the face model is a face model obtained by the above training method, and the face model includes a face feature model, and the face is Certification methods include:
  • the authentication process is performed according to the target face feature and the specified document image data.
  • the embodiment of the present application further discloses a training device for a face model, including:
  • a training sample obtaining module configured to acquire a training sample, where the training sample includes training image data and document image data;
  • a sample face image extraction module configured to obtain a training face image and a document face image according to the training image data and the document image data
  • a face model training module configured to train a face feature model by using the trained face image
  • Face model adjustment module for pairing training face images and document face images, The face feature model is adjusted.
  • the embodiment of the present application further discloses a face authentication device based on a face model, wherein the face model is a face model obtained by the training device, and the face model includes a face feature model, and the face is
  • the authentication device includes:
  • a target image data module configured to collect target image data when receiving an instruction for face authentication
  • a target face image extraction module configured to extract a target face image in the target image data
  • a target facial feature extraction module configured to input the target facial image into a pre-trained facial feature model to extract a target facial feature
  • the authentication processing module is configured to perform an authentication process according to the target facial feature and the specified document image data.
  • an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • a memory for storing a computer program
  • the training method of the face model according to any one of the embodiments of the present application is implemented when the processor is configured to execute a computer program stored in the memory.
  • the embodiment of the present application provides a computer program for a training method that is executed to perform the face model according to any one of the embodiments of the present application.
  • an embodiment of the present application provides a storage medium for storing a computer program, which is executed to perform training of a face model according to any one of the embodiments of the present application. method.
  • an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • a memory for storing a computer program
  • the face recognition method based on any of the face models provided by the embodiments of the present application is implemented when the processor is configured to execute a computer program stored in the memory.
  • the embodiment of the present application provides a computer program, which is used to execute a face-based face authentication method according to any one of the embodiments of the present application.
  • the embodiment of the present application provides a storage medium, where the storage medium is used to store a computer program, and the computer program is executed to execute the face model based on any of the embodiments provided by the embodiments of the present application. Face authentication method.
  • the training face image and the document face image are extracted from the training image data and the document image data, and the face model is trained by training the face image, and the paired training face image and the document face image are used to
  • the face feature model is adjusted to identify the signal training model for pre-training and authentication signal fine-tuning, to solve the problem of unbalanced sample quantity, improve the performance of the model, and thus improve the accuracy of face authentication.
  • the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
  • FIG. 1 is a flow chart of steps of an embodiment of a training method for a face model according to an embodiment of the present application
  • FIG. 2 is a diagram showing an example of a training sample according to an embodiment of the present application.
  • FIG. 3 is a flow chart showing the steps of an embodiment of a training method for a face model according to an embodiment of the present application
  • FIG. 4 is a flowchart of processing of a convolutional neural network according to an embodiment of the present application.
  • FIG. 5 is a diagram showing an example of the structure of an Inception according to an embodiment of the present application.
  • FIG. 6 is a flow chart of steps of an embodiment of a face authentication method based on a face model according to an embodiment of the present application
  • FIGS. 7A-7D are diagrams showing an example of an image of a database according to an embodiment of the present application.
  • FIG. 8 is a comparison diagram of a test ROC curve according to an embodiment of the present application.
  • FIG. 9 is a structural block diagram of an embodiment of a training apparatus for a face model according to an embodiment of the present application.
  • FIG. 10 is a structural block diagram of an embodiment of a face authentication device based on a face model according to an embodiment of the present application
  • FIG. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • FIG. 1 a flow chart of steps of a method for training a face model of the present application is shown, which may specifically include the following steps:
  • step 101 a training sample is obtained.
  • the training samples include training image data and document image data.
  • the document image data may be image data stored in a certain document, for example, a second-generation ID card, a residence permit, a driver's license, etc., and the image data of the certificate is generally subjected to high-intensity compression, the resolution is low, and the number is generally Less, usually only one pair of documents, the background is relatively pure (such as white, blue, red, etc.).
  • the training image data may be image data different from the document image data, such as video image data.
  • the training image data is generally not subjected to high-intensity compression, and the resolution is higher than the document image data, and may be collected by a camera or the like, and the number is generally There are many image data in the certificate, and the background is more complicated (such as containing environmental information).
  • the leftmost image data is the document image data
  • the remaining image data is the training image data
  • Step 102 Obtain a training face image and a document face image according to the training image data and the document image data.
  • the training image data and the document image data generally have a user's face, from which the training face image and the document face image are extracted, and the face feature model is trained.
  • step 102 may include the following sub-steps:
  • Sub-step S11 performing face detection on the training image data and the document image data respectively, and determining the training face image and the document face image;
  • Sub-step S12 performing face feature point positioning in the training face image and the document face image respectively, and determining training eye data and document eye data;
  • Sub-step S13 aligning the position of the training eye data and the position of the document eye data with the preset template position
  • Sub-step S14 performing similar transformation on the training face image other than the training eye data according to the positional relationship of the training eye data, to obtain a normalized training face image
  • Sub-step S15 similarly transforming the document face image other than the document eye data according to the positional relationship of the document eye data to obtain a normalized document face image.
  • AdaBoost Adaptive Lifting Method
  • CF cascading depth model
  • step 103 the face feature model is trained by training the face image.
  • the trained face model includes a face feature model, which may be a model for extracting face features.
  • step 103 may include the following sub-steps:
  • Sub-step S21 training the face feature model based on face recognition using the trained face image to train the initial parameter values of the model parameters of the face feature model.
  • neural network models such as convolutional neural network models
  • the quantity and quality of training data often directly affect the ability of the model to extract features and the effect of classification.
  • the embodiment of the present application uses a method of identifying signal pre-training and authentication signal fine-tuning to train the model, thereby solving the problem of imbalance in the number of samples.
  • the face feature model is first trained based on the training face image as the identification signal, and subsequently, the training face image and the document face image as the pairing of the authentication signal are used, and the training result is obtained.
  • the face feature model is adjusted, and then the face model is obtained based on the adjusted face feature model. That is, the embodiment of the present application uses a method of identifying signal pre-training and authentication signal fine-tuning to train the model, thereby solving the problem of imbalance in the number of samples.
  • the face feature model can be trained by random gradient descent, the minibatch (training batch) size is 64, and the impulse is 0.9.
  • the goal is to obtain the model parameters of the face feature model through dual-signal supervised training. ⁇ c .
  • the training face image is used for the identification signal to be supervised and trained to obtain the model parameter ⁇ id , which is the initial parameter of the second stage.
  • sub-step S21 may include the following sub-steps:
  • Sub-step S211 randomly extracting a training face image
  • Sub-step S212 the randomly extracted training face image is input into the preset facial feature model to extract the training facial feature
  • Sub-step S214 it is determined whether the first loss rate converges; if not, then sub-step S215 is performed, after which, return to the execution sub-step S216;
  • Sub-step S215 taking the parameter value of the model parameter of the current iteration as the initial parameter value
  • Sub-step S216 calculating a first gradient by using a first loss rate
  • Sub-step S217 the parameter value of the model parameter is decreased by using the first gradient and the preset learning rate, and the process returns to the sub-step S211.
  • the parameter values of the first phase are initialized to random parameters obeying the Gaussian distribution N(0, ⁇ 2 ), where
  • the model parameters ⁇ id (where id represents the initial parameter value), the learning rate ⁇ (t), and the number of iterations t are initialized in the face feature model, and the initial values are configured, such as the learning rate ⁇ (t).
  • the initial value is 0.1, and the initial value of t is 0 (t ⁇ 0).
  • the training process is as follows:
  • the training samples ⁇ (x i , y i ) ⁇ are randomly extracted from the training data set.
  • Conv () represents the face feature model.
  • IdentificationLoss represents the first loss rate when training face features for face recognition.
  • the probability that the training facial feature f i belongs to the preset user tag is calculated by means of multiple regression.
  • the first loss rate IdentificationLoss for face recognition using the probabilistic calculation to train the face features.
  • p i is the probability distribution of the target (ie, the probability distribution of the target user tag)
  • the probability distribution for the prediction ie, the probability distribution of the predicted user labels
  • the model parameters of the face feature model are updated for the next iteration:
  • the training is ended and the model parameter ⁇ id is output.
  • the judgment condition of the iteration may be used as the judgment condition of the iteration, such as whether the first gradient converges, whether the number of iterations reaches the iteration threshold, and the like. There is no restriction on this.
  • step 104 the face feature model is adjusted by using the paired training face image and the document face image.
  • the face feature model can be adaptively adjusted according to the characteristics of the face image of the document.
  • the adjusted face feature model can be obtained.
  • the adjusted person The face feature model belongs to the face model, that is, the face model includes the above-mentioned adjusted face feature model.
  • step 104 may include the following sub-steps:
  • Sub-step S31 using the paired training face image and the document face image to train the face feature model based on face authentication to adjust the model parameter from the initial parameter value to the target parameter value.
  • sub-step S31 may include the following sub-steps:
  • Sub-step S311 pairing the training face image and the document face image belonging to the same user
  • Sub-step S312 randomly extracting the paired training face image and the document face image
  • Sub-step S313 the randomly extracted, paired training face image and the document face image are input into the face feature model to extract the training face feature and the document face feature;
  • Sub-step S314 calculating a training face feature and a document face feature for the second face authentication Loss rate
  • Sub-step S315 it is determined whether the second loss rate converges; if so, sub-step S316 is performed, and if not, sub-step S317 is performed;
  • Sub-step S316 taking the parameter value of the model parameter of the current iteration as the target parameter value
  • Sub-step S317 calculating a second gradient by using a second loss rate
  • Sub-step S318, the parameter value of the model parameter is decreased by using the second gradient and the preset learning rate, and the process returns to the sub-step S312.
  • the facial feature model can be trained by random gradient descent.
  • lij is a binary label
  • l ij is a classification label
  • l ij -1 indicates training the face.
  • Image and document face images come from different people.
  • the first document face image and the second training face image can be paired, and the first document face image and the third training face image can be paired, first The image of the document face and the image of the training face of the fourth frame can be paired, and so on.
  • the initial value of the learning rate ⁇ (t) is 0.1, and the initial value of t is 0 (t ⁇ 0).
  • the adjustment process is as follows:
  • the training samples ⁇ (X ij , l ij ) ⁇ are randomly extracted from the training data set.
  • Conv () represents the face feature model.
  • VerificationLoss indicates the second loss rate when the face feature is used for face authentication.
  • the distance between the training face feature and the document face feature can be calculated.
  • the model parameters of the face feature model are updated for the next iteration:
  • the second loss rate converges as an iterative judgment condition
  • other conditions may be used as the judgment condition of the iteration, such as whether the second gradient converges, whether the number of iterations reaches the iteration threshold, and the like. There is no restriction on this.
  • the training face image and the document face image are extracted from the training image data and the document image data, and the face model is trained by training the face image, and the paired training face image and the document face image are used to
  • the face feature model is adjusted to identify the signal training model for pre-training and authentication signal fine-tuning, to solve the problem of unbalanced sample quantity, improve the performance of the model, and thus improve the accuracy of face authentication.
  • the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
  • FIG. 3 a flow chart of steps of a method for training a face model of another application of the present application is shown, which may specifically include the following steps:
  • step 301 a training sample is obtained.
  • the training samples include training image data and document image data.
  • Step 302 extracting a training face image and a document face image in the training image data and the document image data.
  • step 303 the face feature model is trained by training the face image.
  • step 304 the face feature model is adjusted by using the paired training face image and the document face image.
  • Step 305 using the paired training face image and the document face image, and training the face authentication model according to the joint Bayesian.
  • the trained face model includes a face authentication model, which may be used to calculate similarities between facial features.
  • the trained face model may include not only a face feature model but also a face authentication model.
  • the Joint Bayesian (JB, Joint Bayesian) classifier may be trained by training the face image and the document face image.
  • the joint Bayesian is a classifier based on the Bayesian method.
  • the inter-class error can be increased and the intra-class error can be reduced.
  • the training process is as follows:
  • Sub-step S41 initializing the covariance matrices S ⁇ and S ⁇ :
  • Sub-step S42 calculating matrices F and G:
  • Sub-step S44 updating the covariance matrices S ⁇ and S ⁇ :
  • Sub-step S44 it is judged whether S ⁇ and S ⁇ converge, and if so, sub-step S45 is performed, and if not, the execution sub-step S42 is returned.
  • Sub-step S46 outputting a face authentication model r(x 1 , x 2 )
  • the face feature model includes a network model such as a Convolutional Neural Network (CNN) or a Deep Neural Networks (DNN).
  • CNN Convolutional Neural Network
  • DNN Deep Neural Networks
  • the facial feature model may be a network model such as a Convolutional Neural Network (CNN) model or a Deep Neural Networks (DNN) model.
  • CNN Convolutional Neural Network
  • DNN Deep Neural Networks
  • convolutional neural networks introduce convolutional structures in artificial neural networks.
  • the amount of computation can be reduced, and on the other hand, more abstract features can be extracted.
  • the convolutional neural network model can include an input layer, one or more convolutional layers, one or more sampling layers, and an output layer.
  • Each layer of a convolutional neural network is generally composed of multiple maps.
  • Each map is composed of multiple neural units. All neural units of the same map share a convolution kernel (ie, weight), and the convolution kernel often represents a feature. For example, if a convolution kernel represents an arc, then the convolution kernel is rolled over the entire picture, and the area with a larger convolution value is likely to be an arc.
  • a convolution kernel ie, weight
  • the input layer has no input value and has an output vector.
  • the size of this vector is the size of the tiled face image, such as a matrix of 100 ⁇ 100.
  • Convolutional layer The input of the convolutional layer can be derived from the input layer and can be derived from the sampling layer. Each map of the convolutional layer has a convolution kernel of the same size.
  • the sampling layer is a sampling process of the upper layer map.
  • the sampling method is to collect statistics on adjacent small areas of the upper layer map.
  • the model parameters of the convolutional neural network model include a convolution kernel whose parameter value is a value of a convolution kernel, that is, when the face feature model is trained and adjusted, the value of the convolution kernel can be performed. Training and adjustment.
  • FIG. 4 a processing flowchart of a convolutional neural network model of an embodiment of the present application is shown, which may specifically include the following steps:
  • Step 401 When the convolutional layer belongs to the first depth range, the convolution operation is performed by using the specified single convolution kernel.
  • the face image may be input into the convolutional neural network model, and the face image may include a training face image during offline training, a document face image, and may also include a target person in online face authentication. Face images can also include other face images, and so on.
  • convolution kernels can be directly used for convolution, reducing the amount of calculation.
  • the normalization operation and the activation operation may be performed by means of a BN (Batch Normalization) operator, a ReLU (Rectified Linear Units) function, or the like.
  • Step 402 When the convolutional layer belongs to the second depth range, the convolution operation is performed by using the hierarchical linear model Inception.
  • the number of layers in the second depth range is greater than the number of layers in the first depth range.
  • Inception can be used for convolution in the deep layer (ie, the second depth range).
  • the width and depth of the convolutional neural network model can be increased under the condition of constant calculation, thereby enhancing convolution.
  • the performance of the neural network model; on the other hand, multi-scale facial features can be extracted due to the use of convolution kernels of different sizes (eg, 1 ⁇ 1, 3 ⁇ 3, 5 ⁇ 5).
  • the hierarchical linear model Inception includes a first layer, a second layer, a third layer, and a fourth layer in parallel.
  • step 402 may include the following sub-steps:
  • Sub-step S51 in the first layer, performing convolution operation on the image data input to the hierarchical linear model Inception by using the specified first convolution kernel and the first step length to obtain first feature image data;
  • the first feature image data can be normalized by means of a BN operator or the like. Work.
  • the face image of the input convolutional neural network model may be a training face image or a document face image during offline training, it may also be a target face image during online face authentication, and therefore, the input point is
  • the image data of the layer linear model Inception also differs in these cases.
  • Sub-step S52 in the second layer, performing convolution operation on the image data of the hierarchical linear model Inception by using the specified second convolution kernel and the second step to obtain second feature image data;
  • the second feature image data may be normalized and activated by a BN operator, a ReLU function, or the like.
  • Sub-step S53 performing convolution operation on the second feature image data by using the specified third convolution kernel and the third step to obtain third feature image data
  • the third feature image data may be normalized by a BN operator or the like.
  • Sub-step S54 in the third layer, performing convolution operation on the image data input to the hierarchical linear model Inception by using the specified fourth convolution kernel and the fourth step to obtain fourth feature image data;
  • the fourth feature image data can be normalized and activated by a BN operator, a ReLU function, or the like.
  • Sub-step S55 performing a convolution operation on the fourth feature image data by using the specified fifth convolution kernel and the fifth step to obtain the fifth feature image data;
  • the fifth feature image data may be normalized by a BN operator or the like.
  • Sub-step S56 in the fourth layer, performing convolution operation on the image data of the input hierarchical linear model Inception by using the specified sixth convolution kernel and the sixth step to obtain the sixth feature image data;
  • the sixth feature image data can be normalized by a BN operator or the like.
  • Sub-step S57 performing a maximum downsampling operation on the sixth feature image data to obtain seventh feature image data
  • the eighth feature image data activation operation may be performed by a ReLU function or the like.
  • Sub-step S58 connecting the first feature image data, the third feature image data, the fifth feature image data, and the seventh feature image data to obtain the eighth feature image data.
  • the sizes of the first convolution kernel, the second convolution kernel, the third convolution kernel, the fourth convolution kernel, the fifth convolution kernel, and the sixth convolution kernel may be the same or different;
  • the size of the first step, the second step, the third step, the fourth step, the fifth step, and the sixth step may be the same or different, and the comparison of the embodiments of the present application is not limited.
  • the processing of the fourth layer (sub-step S56 and sub-step S57) can be performed in parallel, regardless of the order.
  • a 1 ⁇ 1 convolution kernel can be used, a convolution operation is performed with a step size of 1, and then BN normalization is performed.
  • a 1 ⁇ 1 convolution kernel can be used, the convolution operation is performed with a step size of 1, and then BN normalization and ReLU activation are performed.
  • the convolution operation is performed with a step size of 1, and then BN normalization is performed.
  • a 1 ⁇ 1 convolution kernel can be used, the convolution operation is performed with a step size of 1, and then BN normalization and ReLU activation are performed.
  • the convolution operation is performed with a step size of 1, and then BN normalization is performed.
  • a 1 ⁇ 1 convolution kernel can be used, the convolution operation is performed with a step size of 1, and the BN normalization is performed, followed by maximization (Max) downsampling.
  • the image data outputted from the first layer to the fourth layer are connected together, and then ReLu is activated to obtain the output of Inception.
  • step 403 maximum downsampling is performed in the sampling layer.
  • Step 404 Obtain a feature vector according to the plurality of image data outputted by the convolutional neural network model as a face feature of the face image.
  • step 401 there is no fixed execution order between step 401, step 402 and step 403, and the execution order may be determined according to the actual structure of the convolutional neural network.
  • the convolutional neural network has 17 convolutional layers and a sampling layer, of which 1, 3, 4, 6, 7, 9, 10, 11, 12, 13, 15 16 layers are convoluted layers, and the first, third, and fourth layers are shallow, the sixth, seventh, ninth, tenth, eleventh, eleventh, thirteenth, and thirteenth, and sixteenth; Pick Sample layer.
  • a 100 ⁇ 100 gray-scale block face image is normalized after inputting a frame.
  • a 5 ⁇ 5 convolution kernel is used, and the step size is 2, which is convolved to obtain 64 50 ⁇ 50 feature images.
  • the 64 50 ⁇ 50 feature images are first BN normalized, and then ReLU is activated.
  • the 64 50 ⁇ 50 feature images outputted by the convolutional layer 1 are subjected to 3 ⁇ 3 maximization downsampling with a step size of 2 to obtain 64 14 ⁇ 14 feature images.
  • a 1 ⁇ 1 convolution kernel is used, and a convolution operation is performed with a step size of 1, to obtain 64 14 ⁇ 14 feature images, and then the 64 frames 14 ⁇
  • the feature image of 14 is first normalized by BN, and then ReLU is activated.
  • a 3 ⁇ 3 convolution kernel is used, and a convolution operation is performed with a step size of 1, to obtain 92 14 ⁇ 14 feature images, and then to the 92 frames 14
  • the feature image of ⁇ 14 is first normalized by BN, and then ReLU is activated.
  • the 92 14 ⁇ 14 feature images outputted by the convolution layer 3 are subjected to 3 ⁇ 3 maximization downsampling with a step size of 1, and 92 14 ⁇ 14 feature images are obtained.
  • Step 1 using a 1 ⁇ 1 convolution kernel for 92 14 ⁇ 14 feature images output by the sampling layer 2, performing a convolution operation with a step size of 1, obtaining 64 14 ⁇ 14 feature images, and then 64 The feature image of 14 ⁇ 14 is subjected to BN normalization.
  • Step 2 using a 1 ⁇ 1 convolution kernel for 92 14 ⁇ 14 feature images output by the sampling layer 2,
  • the convolution operation is performed with a step size of 1, and 96 14 ⁇ 14 feature images are obtained.
  • the 96 14 ⁇ 14 feature images are first BN normalized, and then ReLU is activated.
  • the convolution operation is performed with a step size of 1, and 128 14 ⁇ 14 feature images are obtained, and then the 128 14 ⁇ 14 feature images are BN normalized.
  • Step 3 Using a 1 ⁇ 1 convolution kernel for 92 14 ⁇ 14 feature images output by the sampling layer 2, performing a convolution operation with a step size of 1, obtaining 16 14 ⁇ 14 feature images, and then 16 The feature image of 14 ⁇ 14 is first normalized by BN, and then ReLU is activated.
  • the convolution operation is performed with a step size of 1, and 32 14 ⁇ 14 feature images are obtained, and then the 32 14 ⁇ 14 feature images are BN normalized.
  • Step 4 Using a 1 ⁇ 1 convolution kernel for 92 14 ⁇ 14 feature images output by the sampling layer 2, performing a convolution operation with a step size of 1, obtaining 32 14 ⁇ 14 feature images, and then 32 The feature image of 14 ⁇ 14 is subjected to BN normalization.
  • the maximum downsampling operation is performed on the 32 14 ⁇ 14 feature images to obtain 32 14 ⁇ 14 feature images.
  • Step 5 Connect the feature images output in steps 1 to 4 to obtain 256 14 ⁇ 14 feature images, and perform ReLu activation on the connected 256 14 ⁇ 14 feature images to obtain the output of the convolution layer 4. .
  • sampling layer 3-sampling layer 5 For the operation of the convolutional layer 5-convolution layer 12, the sampling layer 3-sampling layer 5, the processes of convolutional layer 1-4, sampling layer 1-2 can be referred to.
  • the sampling layer 15 outputs 1024 1 ⁇ 1 feature images, and sequentially arranges the 1024 1 ⁇ 1 feature images into a feature vector with a dimension of 1024 dimensions, which is a frame 100 ⁇ 100 person.
  • the original face feature of the face image through the convolution network.
  • the face model includes a face feature model, and the method may specifically include the following steps:
  • Step 601 When receiving an instruction of face authentication, collecting target image data.
  • the embodiment of the present application can be applied to a face recognition system, such as an access control system, a monitoring system, a payment system, etc., to perform authentication processing on a user.
  • a face recognition system such as an access control system, a monitoring system, a payment system, etc.
  • the target image data can be acquired by a camera or the like.
  • Step 602 Extract a target face image in the target image data.
  • step 602 can include the following sub-steps:
  • Sub-step S61 performing face detection in the target image data to determine a target face image
  • Sub-step S62 performing face feature point positioning in the target face image to determine target eye data
  • Sub-step S63 aligning the target eye data
  • Sub-step S64 the target face image other than the target eye data is similarly transformed according to the positional relationship of the target eye data, and the normalized target face image is obtained.
  • AdaBoost may be used to perform face detection on the target image data, and the target face image is mapped on the detected target face image by using a cadosto-fine method, and the target eye data after the positioning is utilized.
  • the position coordinates are normalized by a similar transformation.
  • the normalized target face image has a size of 100 ⁇ 100.
  • Step 603 Input the target face image into the pre-trained face feature model to extract the target face feature.
  • the face feature model can be trained as follows:
  • Sub-step 6031 acquiring training samples, where the training samples include training image data and document image data;
  • Sub-step 6032 extracting a training face image and a document face image in the training image data and the document image data
  • Sub-step 6033 training the face feature model by training the face image
  • Sub-step 6034 the face feature model is adjusted by using the paired training face image and the document face image.
  • Step 604 performing authentication processing according to the target facial feature and the specified document image data.
  • step 604 can include the following sub-steps:
  • Sub-step S71 acquiring the document face feature of the document face image in the specified document image data
  • the document image data may be image data in a user ID that needs to be authenticated.
  • the certificate image data of the ID card of the user to which the account belongs is specified to perform authentication processing.
  • the document face features of the document face image can be extracted in advance and stored in the database, and can be directly extracted when the face is authenticated.
  • Sub-step S72 the target face feature and the document face feature are input according to the face authentication model of the joint Bayesian training, and the similarity is obtained;
  • the face model may further include a face authentication model, and the target face feature and the document face feature may be input according to the face recognition model of the joint Bayesian training to obtain the similarity.
  • the face authentication model can be trained as follows:
  • Sub-step S721 using the paired training face image and the document face image, and training the face authentication model according to the joint Bayesian;
  • Sub-step S73 it is determined whether the similarity is greater than or equal to the preset similarity threshold; if so, sub-step S74 is performed, and if not, sub-step S75 is performed;
  • Sub-step S74 determining that the target face image and the document face image belong to the same person
  • Sub-step S75 determining that the target face image and the document face image do not belong to the same person.
  • a similarity threshold T may be preset.
  • the target face image is similar to the document face image, and the larger one may come from the same person, and the face authentication is successful.
  • the training methods of the face feature model and the face authentication model are basically similar to the application method of the face model training method, the description is relatively simple, and the related method can be found in the training method of the face model.
  • the description of the embodiments may be omitted, and the embodiments of the present application are not described in detail herein.
  • the database used in the training of the embodiment of the present application is the NEU_Web database as shown in FIG. 7A.
  • the databases used in the tests were three ID database databases ID_454, ID_55, and ID_229, that is, the database used during training did not overlap with the database used during the test.
  • ID_454 is a database constructed of 445 video images and corresponding ID images collected in an indoor environment, and has strong control over changes in illumination, posture, and expression.
  • ID_55 is an identity card database of 55 people, and each person in the database contains 9 different photos, different facial expressions and corresponding ID photos.
  • ID_229 is an ID card database collected under the bank usage scenario, and has more complicated illumination, posture and expression changes.
  • the EBGM Elastic Bunch Graph Matching
  • LGBP Large Gabor Binary Patterns
  • BSF Block Statistical Features
  • the curve 801 is the ROC curve of the embodiment of the present application
  • the curve 802 is the ROC curve of the BSF
  • the curve 803 is the ROC curve of the LGBP
  • the curve 804 is the ROC curve of the EBGM.
  • the ROC curve of the embodiment of the present application is closer to the upper left corner than the EBGM, LGBP, and BSF algorithms, that is, the face of the embodiment of the present application is compared with the three algorithms of EBGM, LGBP, and BSF. The accuracy of the certification is higher.
  • FIG. 9 a structural block diagram of an embodiment of a training apparatus for a face model of the present application is shown, which may specifically include the following modules:
  • a training sample obtaining module 901 configured to acquire training samples, where the training samples include training image data and document image data;
  • the sample face image extraction module 902 is configured to obtain a training face image and a document face image according to the training image data and the document image data;
  • a face model training module 903 configured to train a face feature model by using the trained face image
  • the face model adjustment module 904 is configured to adjust the face feature model by using the paired training face image and the document face image.
  • the sample face image extraction module 902 may include:
  • a sample face detection sub-module configured to perform face detection on the training image data and the document image data respectively, and determine a training face image and a document face image
  • a sample face positioning sub-module for use in the training face image and the document face image Perform facial feature point positioning separately to determine training eye data and document eye data;
  • a sample face alignment submodule configured to align a position of the training eye data and a position of the document eye data with a preset template position
  • the document face normalization sub-module is configured to perform a similar transformation on the document face image other than the document eye data according to the positional relationship of the document eye data to obtain a normalized document face image.
  • the face model training module 903 includes:
  • the training sub-module is configured to train the preset facial feature model based on the face recognition using the trained facial image to train an initial parameter value of the model parameter of the facial feature model.
  • the face model adjustment module 904 includes:
  • the authentication training sub-module is configured to train the facial feature model based on face authentication by using the paired training face image and the document face image to adjust the model parameter from an initial parameter value to a target parameter value.
  • the identifying the training submodule includes:
  • a first random sampling unit configured to randomly extract a training face image
  • a first sample face feature extraction unit configured to input a randomly extracted training face image into a preset face feature model to extract a trained face feature
  • a first loss rate calculation unit configured to calculate a first loss rate when the training face feature is used for face recognition
  • a first convergence determining unit configured to determine whether the first loss rate converges; if yes, call an initial parameter value setting unit, and if not, invoke a first gradient calculating module;
  • An initial parameter value setting unit configured to use a parameter value of the model parameter of the current iteration as an initial parameter value
  • a first gradient calculating unit configured to calculate a first gradient by using the first loss rate
  • the first gradient descent sub-module is configured to: use the first gradient and the preset learning rate to decrease a parameter value of the model parameter, and return to invoke the first random sampling sub-module.
  • the first loss rate calculation unit includes:
  • a probability calculation subunit configured to calculate a probability that the training face feature belongs to a preset user tag
  • a face recognition loss rate calculation subunit is configured to calculate a first loss rate for face recognition using the probability to calculate the training face feature.
  • the authentication training sub-module includes:
  • a data matching unit configured to pair the training face image and the document face image belonging to the same user
  • a second random sampling unit configured to randomly extract the paired training face image and the document face image
  • a second sample face feature extraction unit configured to input a randomly extracted, paired training face image and a document face image into the face feature model to extract a training face feature and a document face feature;
  • a second loss rate calculation unit configured to calculate a loss rate when the training face feature and the document face feature are used for face authentication
  • a second convergence determining unit configured to determine whether the second loss rate converges; if yes, the target parameter value setting unit is called, and if not, the second gradient calculating unit is invoked;
  • a target parameter value setting unit configured to use a parameter value of the model parameter of the current iteration as a target parameter value
  • a second gradient calculating unit configured to calculate a second gradient by using the second loss rate
  • a second gradient descent sub-module configured to decrease a parameter value of the model parameter by using the second gradient and a preset learning rate, and return to call the second random sampling sub-module.
  • the second loss rate calculation submodule includes:
  • a distance calculation unit configured to calculate a distance between the training face feature and the document face feature
  • a second authentication loss rate calculation unit configured to calculate, by using the distance, the second loss rate for the face authentication of the training face feature and the document face feature.
  • the method further includes:
  • the face authentication model training module is used to train the face authentication model according to the joint Bayesian training face image and the document face image.
  • the face feature model may be a convolutional neural network model
  • the convolutional neural network model may include one or more convolution layers, one or more sampling layers, and the volume
  • the model parameters of the product neural network include a convolution kernel
  • the convolutional neural network model can include:
  • a shallow convolution module configured to perform a convolution operation by using a specified single convolution kernel when the convolutional layer belongs to a first depth range
  • a deep convolution module configured to perform a convolution operation using a hierarchical linear model Inception when the convolutional layer belongs to a second depth range, wherein a number of layers of the second depth range is greater than the first depth range Number of layers
  • a feature obtaining module configured to obtain a feature vector according to the plurality of image data output by the convolutional neural network model, as a face feature of the face image.
  • the convolutional neural network model may further include:
  • the first convolution auxiliary module is configured to perform normalization operation and activation operation after the first depth range convolution is completed.
  • the hierarchical linear model Inception includes a first layer, a second layer, a third layer, and a fourth layer;
  • the deep convolution module can include:
  • a first convolution sub-module configured to perform a convolution operation on the image data input to the hierarchical linear model Inception by using a specified first convolution kernel and a first step length in the first layer to obtain a first feature map Like data;
  • a second convolution sub-module configured to perform convolution operation on the image data input to the hierarchical linear model Inception by using the specified second convolution kernel and the second step in the second layer to obtain the second feature image data;
  • a third convolution sub-module configured to perform a convolution operation on the second feature image data by using a specified third convolution kernel and a third step size to obtain third feature image data
  • a fourth convolution sub-module configured to perform a convolution operation on the image data input to the hierarchical linear model Inception by using a specified fourth convolution kernel and a fourth step length in the third layer to obtain a fourth characteristic image data
  • a fifth convolution sub-module configured to perform a convolution operation on the fourth feature image data by using a specified fifth convolution kernel and a fifth step to obtain fifth feature image data
  • a sixth convolution sub-module configured to perform a convolution operation on the image data input to the hierarchical linear model Inception by using a specified sixth convolution kernel and a sixth step length in the fourth layer to obtain a sixth characteristic image data
  • a sampling sub-module configured to perform a maximum downsampling operation on the sixth feature image data to obtain seventh feature image data
  • an image connection submodule configured to connect the first feature image data, the third feature image data, the fifth feature image data, and the seventh feature image data to obtain eighth feature image data.
  • the deep convolution module may further include:
  • a second convolution auxiliary submodule configured to perform normalization operation on the first feature image data in the first layer
  • a third convolution auxiliary submodule configured to perform normalization operation and an activation operation on the second feature image data in the second layer
  • a fourth convolution auxiliary submodule configured to perform normalization operation on the third feature image data
  • a fifth convolution auxiliary submodule configured to perform the fourth feature image data in the third layer Normalized operations and activation operations
  • a sixth convolution auxiliary submodule configured to perform normalization operation on the fifth feature image data
  • a seventh convolution auxiliary submodule configured to perform normalization operation on the sixth feature image data in the fourth layer
  • an eighth convolution auxiliary submodule configured to activate the eighth feature image data.
  • the face model includes a face feature model, and the device may specifically include the following modules:
  • the target image data module 1001 is configured to collect target image data when receiving an instruction of face authentication
  • a target face image extraction module 1002 configured to extract a target face image in the target image data
  • the target facial feature extraction module 1003 is configured to input the target facial image into the pre-trained facial feature model to extract the target facial feature;
  • the authentication processing module 1004 is configured to perform an authentication process according to the target facial feature and the specified document image data
  • the face model invokes the following module training:
  • a training sample obtaining module configured to acquire a training sample, where the training sample includes training image data and document image data;
  • a sample face image extraction module configured to extract a training face image and a document face image in the training image data and the document image data
  • a face model training module configured to train a face feature model by using the trained face image
  • the face model adjustment module is configured to adjust the face feature model by using the paired training face image and the document face image.
  • the target face image extraction module 1002 may include:
  • a target face detection sub-module configured to perform face detection in the target image data to determine a target face image
  • a target face positioning sub-module configured to perform face feature point positioning in the target face image to determine target eye data
  • a target face alignment submodule for aligning the target eye data
  • the target face normalization sub-module is configured to perform similar transformation on the target facial image other than the target eye data according to the positional relationship of the target eye data to obtain a normalized target facial image.
  • the face model further includes a face authentication model
  • the authentication processing module 1004 may include:
  • a document face feature acquisition sub-module configured to obtain a document face feature of the document face image in the specified document image data
  • a similarity calculation sub-module configured to input the target facial feature and the document face feature according to a face authentication model of joint Bayesian training to obtain a similarity
  • a similarity threshold determining sub-module configured to determine whether the similarity is greater than or equal to a preset similarity threshold; if yes, calling the first determining sub-module; if not, calling the second determining sub-module;
  • a first determining submodule configured to determine that the target face image and the document face image belong to the same person
  • a second determining submodule configured to determine that the target face image and the document face image do not belong to the same person.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 11, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114.
  • the processor 111, the communication interface 112, and the memory 113 pass through the communication bus 114. Completing communication with each other; a memory 113 for storing a computer program;
  • the processor 111 is configured to implement the training method of any face model provided by the embodiment of the present application, where the training method of the face model may include the following steps:
  • the training sample including training image data and document image data
  • the face feature model is adjusted by using a paired training face image and a document face image.
  • the processor of the electronic device runs the computer program stored in the memory to perform the training method of any face model provided by the embodiment of the present application, thereby achieving the problem of solving the problem of imbalance in the number of samples and improving The performance of the model improves the accuracy of face authentication.
  • the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
  • the embodiment of the present application further provides a computer program for a training method that is executed to perform any of the face models provided by the embodiments of the present application, wherein the training method of the face model may include the following steps:
  • the training sample including training image data and document image data
  • the face feature model is adjusted by using a paired training face image and a document face image.
  • the computer program can execute the training method of any face model provided by the embodiment of the present application at runtime, so that the problem of unbalanced sample quantity can be solved, and the performance of the model is improved, thereby improving the person.
  • the accuracy of face authentication Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows the factors such as age, posture and illumination. Good robustness.
  • the embodiment of the present application provides a storage medium for storing a computer program, where the computer program is executed to perform a training method for any face model provided by the embodiment of the present application, wherein the face model
  • the training method can include the steps of:
  • the training sample including training image data and document image data
  • the face feature model is adjusted by using a paired training face image and a document face image.
  • the storage medium stores a computer program that executes the training method of any of the face models provided by the embodiments of the present application at runtime, and thus can solve the problem of unbalanced sample quantity and improve the performance of the model. Thereby improving the accuracy of face authentication.
  • the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 12, including a processor 121, a communication interface 122, a memory 123, and a communication bus 124.
  • the processor 121, the communication interface 122, and the memory 123 pass through the communication bus 124. Completing communication with each other; a memory for storing computer programs;
  • the processor 121 is configured to implement the face authentication method based on the face model provided by the embodiment of the present application when the computer program stored in the memory 123 is executed, wherein the face authentication method based on the face model can be Including steps:
  • the authentication process is performed according to the target face feature and the specified document image data.
  • the processor of the electronic device runs the computer program stored in the memory
  • the face authentication method based on the face model provided by the embodiment of the present application
  • the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
  • the embodiment of the present application further provides a computer program for executing a face authentication method based on a face model provided by an embodiment of the present application, wherein the face model based person
  • the face authentication method may include the steps of:
  • the authentication process is performed according to the target face feature and the specified document image data.
  • the computer program can execute any face authentication method based on the face model provided by the embodiment of the present application at runtime, so that the problem of unbalanced sample quantity can be solved, and the performance of the model is improved. Thereby improving the accuracy of face authentication.
  • the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
  • the embodiment of the present application provides a storage medium, where the storage medium is used to execute a computer face program, and the computer program is executed to execute any face recognition method based on the face model provided by the embodiment of the present application, where
  • the face authentication method based on the face model may include the steps of:
  • the authentication process is performed according to the target face feature and the specified document image data.
  • the storage medium stores a computer program for executing the face authentication method based on the face model provided by the embodiment of the present application at the time of running, thereby implementing the problem of solving the problem of imbalance in the number of samples and improving the problem.
  • the performance of the model which improves the accuracy of face authentication.
  • the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
  • embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

A face model training method and device, and a face authentication method and device. The training method comprises: obtaining a training sample (101), the training sample comprising training image data and credential image data; obtaining a training face image and a credential face image according to the training image data and the credential image data (102); training a face feature model by using the training face image (103); and adjusting the face feature model by using the paired training face image and credential face image (104). A model is trained by means of a method for pre-training an identification signal and fine-adjusting an authentication signal, the problem of unbalanced number of samples is solved, and the performance of the model is improved, thereby improving the accuracy of face authentication.

Description

人脸模型的训练方法和装置、人脸认证方法和装置Face model training method and device, face authentication method and device
本申请要求于2016年9月23日提交中国专利局、申请号为201610848965.5发明名称为“人脸模型的训练方法和装置、人脸认证方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201610848965.5, entitled "Surface Model Training Method and Apparatus, Face Authentication Method and Apparatus", filed on September 23, 2016, the entire contents of which are hereby incorporated by reference. This is incorporated herein by reference.
技术领域Technical field
本申请实施例涉及生物数据的技术领域,特别是涉及一种人脸模型的训练方法、一种基于人脸模型的人脸认证方法、一种人脸模型的训练装置和一种基于人脸模型的人脸认证装置。The embodiments of the present application relate to the technical field of biological data, and in particular, to a training method for a face model, a face authentication method based on a face model, a training device for a face model, and a face model based on a face model. Face authentication device.
背景技术Background technique
随着第二代身份证、居住证等证件在金融、商业等领域的广泛应用,出现了越来越多如盗用证件、伪造证件等问题。With the widespread application of second-generation ID cards, residence permits and other documents in the fields of finance and commerce, there have been more and more problems such as theft of documents and forgery of documents.
人脸认证在使用中具有用户配合度低、非接触、非强制等特点,人脸认证在金融、商业等领域辅助进行证件的验证。Face authentication has the characteristics of low user cooperation, non-contact, and non-mandatory in use. Face authentication assists in the verification of documents in the fields of finance and commerce.
但是,人脸认证也极易受到外界环境(如光照,姿态,表情等)的影响,并且,证件中的图像经过压缩,分辨率较低,与当前视频图像年龄差异大,背景差别明显。However, face authentication is also highly susceptible to the external environment (such as lighting, gestures, expressions, etc.), and the images in the document are compressed, the resolution is low, and the age difference between the current video image is large, and the background difference is obvious.
目前,基于证件进行认证处理的方法主要是基于传统的统计学习和机器学习的方法,例如,MMP-PCA方法、LGBP-PCA-LDA方法、BSF-PCA-LDA方法等等。At present, the method of authentication processing based on documents is mainly based on traditional statistical learning and machine learning methods, for example, MMP-PCA method, LGBP-PCA-LDA method, BSF-PCA-LDA method, and the like.
这些人脸认证的方法采用的大多为人工设计(hand-crafted)特征,该特征对光照、姿态、年龄变化鲁棒性较差,并且,训练过程需要大量的证件照片和视频照片作为样本,但是,证件照片一般数量很少,往往只有一张,出现训练过程中样本图像的数量不平衡的问题,即视频照片数量多,证件照片数量少,利用上述数量不平衡的样本图像对模型进行训练,导致训练的模型性能较差,人脸认证的准确率较低。Most of these face authentication methods use hand-crafted features, which are less robust to illumination, attitude, and age changes, and the training process requires a large number of ID photos and video photos as samples, but The number of photo IDs is generally small, often only one, and there is a problem of the imbalance of the number of sample images during the training process, that is, the number of video photos is large, and the number of photo photos is small. The model is trained by using the above-mentioned number of unbalanced sample images. The performance of the model leading to training is poor, and the accuracy of face authentication is low.
发明内容Summary of the invention
鉴于上述问题,为了解决上述特征鲁棒性较差、样本数量较多、模型性 能差、人脸认证的准确率较低的问题,本申请实施例提出了一种人脸模型的训练方法、一种基于人脸模型的人脸认证方法和相应的一种人脸模型的训练装置、一种基于人脸模型的人脸认证装置。In view of the above problems, in order to solve the above features, the robustness is poor, the number of samples is large, and the model is The problem that the accuracy of the difference and the face authentication is low, the embodiment of the present application proposes a training method of the face model, a face authentication method based on the face model and a corresponding training of the face model. A device, a face authentication device based on a face model.
为了解决上述问题,本申请实施例公开了一种人脸模型的训练方法,包括:In order to solve the above problem, the embodiment of the present application discloses a training method for a face model, including:
获取训练样本,所述训练样本包括训练图像数据和证件图像数据;Obtaining a training sample, the training sample including training image data and document image data;
根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;Obtaining a training face image and a document face image according to the training image data and the document image data;
采用所述训练人脸图像训练人脸特征模型;Training the facial feature model by using the trained face image;
采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face feature model is adjusted by using a paired training face image and a document face image.
本申请实施例还公开了一种基于人脸模型的人脸认证方法,所述人脸模型为如上述训练方法得到的人脸模型,所述人脸模型包括人脸特征模型,所述人脸认证方法包括:The embodiment of the present application further discloses a face authentication method based on a face model, wherein the face model is a face model obtained by the above training method, and the face model includes a face feature model, and the face is Certification methods include:
当接收到人脸认证的指令时,采集目标图像数据;Collecting target image data when receiving an instruction for face authentication;
在所述目标图像数据中提取目标人脸图像;Extracting a target face image in the target image data;
将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;Extracting the target face image into a pre-trained face feature model to extract a target face feature;
根据所述目标人脸特征与指定的证件图像数据进行认证处理。The authentication process is performed according to the target face feature and the specified document image data.
本申请实施例还公开了一种人脸模型的训练装置,包括:The embodiment of the present application further discloses a training device for a face model, including:
训练样本获取模块,用于获取训练样本,所述训练样本包括训练图像数据和证件图像数据;a training sample obtaining module, configured to acquire a training sample, where the training sample includes training image data and document image data;
样本人脸图像提取模块,用于根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;a sample face image extraction module, configured to obtain a training face image and a document face image according to the training image data and the document image data;
人脸模型训练模块,用于采用所述训练人脸图像训练人脸特征模型;a face model training module, configured to train a face feature model by using the trained face image;
人脸模型调整模块,用于采用配对的训练人脸图像和证件人脸图像,对 所述人脸特征模型进行调整。Face model adjustment module for pairing training face images and document face images, The face feature model is adjusted.
本申请实施例还公开了一种基于人脸模型的人脸认证装置,所述人脸模型为如上述训练装置得到的人脸模型,所述人脸模型包括人脸特征模型,所述人脸认证装置包括:The embodiment of the present application further discloses a face authentication device based on a face model, wherein the face model is a face model obtained by the training device, and the face model includes a face feature model, and the face is The authentication device includes:
目标图像数据模块,用于在接收到人脸认证的指令时,采集目标图像数据;a target image data module, configured to collect target image data when receiving an instruction for face authentication;
目标人脸图像提取模块,用于在所述目标图像数据中提取目标人脸图像;a target face image extraction module, configured to extract a target face image in the target image data;
目标人脸特征提取模块,用于将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;a target facial feature extraction module, configured to input the target facial image into a pre-trained facial feature model to extract a target facial feature;
认证处理模块,用于根据所述目标人脸特征与指定的证件图像数据进行认证处理。The authentication processing module is configured to perform an authentication process according to the target facial feature and the specified document image data.
另一方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;On the other hand, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
存储器,用于存放计算机程序;a memory for storing a computer program;
处理器,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的任一所述的人脸模型的训练方法。The training method of the face model according to any one of the embodiments of the present application is implemented when the processor is configured to execute a computer program stored in the memory.
另一方面,本申请实施例提供了一种计算机程序,所述计算机程序用于被运行以执行本申请实施例所提供的任一所述的人脸模型的训练方法。On the other hand, the embodiment of the present application provides a computer program for a training method that is executed to perform the face model according to any one of the embodiments of the present application.
另一方面,本申请实施例提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行本申请实施例所提供的任一所述的人脸模型的训练方法。On the other hand, an embodiment of the present application provides a storage medium for storing a computer program, which is executed to perform training of a face model according to any one of the embodiments of the present application. method.
另一方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;On the other hand, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
存储器,用于存放计算机程序; a memory for storing a computer program;
处理器,用于执行存储器上所存放的计算机程序时,实现本申请实施例所提供的任一所述的基于人脸模型的人脸认证方法。The face recognition method based on any of the face models provided by the embodiments of the present application is implemented when the processor is configured to execute a computer program stored in the memory.
另一方面,本申请实施例提供了一种计算机程序,所述计算机程序用于被运行以执行本申请实施例所提供的任一所述的基于人脸模型的人脸认证方法。On the other hand, the embodiment of the present application provides a computer program, which is used to execute a face-based face authentication method according to any one of the embodiments of the present application.
另一方面,本申请实施例提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行本申请实施例所提供的任一所述的基于人脸模型的人脸认证方法。On the other hand, the embodiment of the present application provides a storage medium, where the storage medium is used to store a computer program, and the computer program is executed to execute the face model based on any of the embodiments provided by the embodiments of the present application. Face authentication method.
本申请实施例包括以下优点:Embodiments of the present application include the following advantages:
本申请实施例在训练图像数据和证件图像数据中提取训练人脸图像和证件人脸图像,采用训练人脸图像训练人脸特征模型,采用配对的训练人脸图像和证件人脸图像,对人脸特征模型进行调整,识别信号预训练和认证信号微调的方法训练模型,解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。In the embodiment of the present application, the training face image and the document face image are extracted from the training image data and the document image data, and the face model is trained by training the face image, and the paired training face image and the document face image are used to The face feature model is adjusted to identify the signal training model for pre-training and authentication signal fine-tuning, to solve the problem of unbalanced sample quantity, improve the performance of the model, and thus improve the accuracy of face authentication.
并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较好的鲁棒性。Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
附图说明DRAWINGS
图1是本申请实施例的一种人脸模型的训练方法实施例的步骤流程图;1 is a flow chart of steps of an embodiment of a training method for a face model according to an embodiment of the present application;
图2是本申请实施例的一种训练样本的示例图;2 is a diagram showing an example of a training sample according to an embodiment of the present application;
图3是本申请实施例的另一种人脸模型的训练方法实施例的步骤流程图;3 is a flow chart showing the steps of an embodiment of a training method for a face model according to an embodiment of the present application;
图4是本申请实施例的一种卷积神经网络的处理流程图;4 is a flowchart of processing of a convolutional neural network according to an embodiment of the present application;
图5是本申请实施例的一种Inception的结构示例图;FIG. 5 is a diagram showing an example of the structure of an Inception according to an embodiment of the present application; FIG.
图6是本申请实施例的一种基于人脸模型的人脸认证方法实施例的步骤流程图;6 is a flow chart of steps of an embodiment of a face authentication method based on a face model according to an embodiment of the present application;
图7A-图7D是本申请实施例的一种数据库的图像示例图;7A-7D are diagrams showing an example of an image of a database according to an embodiment of the present application;
图8是本申请实施例的一种测试ROC曲线对比图; 8 is a comparison diagram of a test ROC curve according to an embodiment of the present application;
图9是本申请实施例的一种人脸模型的训练装置实施例的结构框图;9 is a structural block diagram of an embodiment of a training apparatus for a face model according to an embodiment of the present application;
图10是本申请实施例的一种基于人脸模型的人脸认证装置实施例的结构框图;10 is a structural block diagram of an embodiment of a face authentication device based on a face model according to an embodiment of the present application;
图11为本申请实施例所提供的一种电子设备的结构示意图;FIG. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
图12为本申请实施例所提供的另一种电子设备的结构示意图。FIG. 12 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
具体实施方式detailed description
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。The above described objects, features and advantages of the present application will become more apparent and understood.
参照图1,示出了本申请的一种人脸模型的训练方法实施例的步骤流程图,具体可以包括如下步骤:Referring to FIG. 1 , a flow chart of steps of a method for training a face model of the present application is shown, which may specifically include the following steps:
步骤101,获取训练样本。In step 101, a training sample is obtained.
在一种实现方式中,训练样本包括训练图像数据和证件图像数据。In one implementation, the training samples include training image data and document image data.
其中,证件图像数据可以为某个证件中存储的图像数据,例如,二代身份证、居住证、驾驶证等等,证件图像数据一般经过高强度的压缩,分辨率低,而且,数量一般很少,通常一个证件只有一副,背景较为纯净(如白色、蓝色、红色等)。The document image data may be image data stored in a certain document, for example, a second-generation ID card, a residence permit, a driver's license, etc., and the image data of the certificate is generally subjected to high-intensity compression, the resolution is low, and the number is generally Less, usually only one pair of documents, the background is relatively pure (such as white, blue, red, etc.).
训练图像数据可以为与证件图像数据不同的图像数据,如视频图像数据,训练图像数据一般未经过高强度的压缩,分辨率比证件图像数据高,而且,可以通过摄像头等方式采集,数量一般比证件图像数据多,背景较为复杂(如包含环境信息)。The training image data may be image data different from the document image data, such as video image data. The training image data is generally not subjected to high-intensity compression, and the resolution is higher than the document image data, and may be collected by a camera or the like, and the number is generally There are many image data in the certificate, and the background is more complicated (such as containing environmental information).
例如,如图2所示,最左侧的图像数据为证件图像数据,其余的图像数据为训练图像数据。For example, as shown in FIG. 2, the leftmost image data is the document image data, and the remaining image data is the training image data.
步骤102,根据训练图像数据和证件图像数据获得训练人脸图像和证件人脸图像。Step 102: Obtain a training face image and a document face image according to the training image data and the document image data.
在训练图像数据和证件图像数据中一般具有用户的人脸,从其中提取训练人脸图像和证件人脸图像,进行人脸特征模型的训练。 The training image data and the document image data generally have a user's face, from which the training face image and the document face image are extracted, and the face feature model is trained.
在本申请的一个实施例中,步骤102可以包括如下子步骤:In an embodiment of the present application, step 102 may include the following sub-steps:
子步骤S11,在训练图像数据和证件图像数据中分别进行人脸检测,确定训练人脸图像和证件人脸图像;Sub-step S11, performing face detection on the training image data and the document image data respectively, and determining the training face image and the document face image;
子步骤S12,在训练人脸图像和证件人脸图像中分别进行人脸特征点定位,确定训练眼睛数据和证件眼睛数据;Sub-step S12, performing face feature point positioning in the training face image and the document face image respectively, and determining training eye data and document eye data;
子步骤S13,将训练眼睛数据的位置和证件眼睛数据的位置与预设模板位置进行对齐;Sub-step S13, aligning the position of the training eye data and the position of the document eye data with the preset template position;
子步骤S14,对除训练眼睛数据之外的训练人脸图像,根据训练眼睛数据的位置关系进行相似变换,获得归一化后的训练人脸图像;Sub-step S14, performing similar transformation on the training face image other than the training eye data according to the positional relationship of the training eye data, to obtain a normalized training face image;
子步骤S15,对除证件眼睛数据之外的证件人脸图像,根据证件眼睛数据的位置关系进行相似变换,获得归一化后的证件人脸图像。Sub-step S15, similarly transforming the document face image other than the document eye data according to the positional relationship of the document eye data to obtain a normalized document face image.
在本申请实施例中,可以采取AdaBoost(自适应提升方法)对训练样本进行人脸检测,在检测出的人脸图像(即训练人脸图像和证件人脸图像)上采用coase-to-fine(CF,级联深度模型)方法对人脸图像进行定位,并利用定位后眼睛数据的位置坐标,采用相似变换进行归一化,例如,归一化后人脸图像的大小为100×100。In the embodiment of the present application, AdaBoost (Adaptive Lifting Method) may be used to perform face detection on the training samples, and coase-to-fine is adopted on the detected face images (ie, training face images and document face images). The (CF, cascading depth model) method locates the face image and normalizes it using the similarity transformation using the position coordinates of the positioned eye data. For example, the normalized face image has a size of 100×100.
步骤103,采用训练人脸图像训练人脸特征模型。In step 103, the face feature model is trained by training the face image.
在一种实现方式中,训练的人脸模型包括人脸特征模型,该人脸特征模型可以为用于提取人脸特征的模型。In one implementation, the trained face model includes a face feature model, which may be a model for extracting face features.
在本申请的一个实施例中,步骤103可以包括如下子步骤:In an embodiment of the present application, step 103 may include the following sub-steps:
子步骤S21,采用训练人脸图像基于人脸识别对人脸特征模型进行训练,以训练出人脸特征模型的模型参数的初始参数值。Sub-step S21, training the face feature model based on face recognition using the trained face image to train the initial parameter values of the model parameters of the face feature model.
对于卷积神经网络模型等神经网络模型来说,训练数据的数量和质量往往直接影响模型提取特征的能力和分类的效果。For neural network models such as convolutional neural network models, the quantity and quality of training data often directly affect the ability of the model to extract features and the effect of classification.
但是,由于身份证等证件的证件图像数据多为单样本,即一个身份证中只存储有一副人脸图像,在构造数据集时,会出现训练图像数据与证件图像 数据的数量不平衡的问题。However, since the image data of the ID card and other documents are mostly single samples, that is, only one face image is stored in one ID card, and the training image data and the ID image appear when the data set is constructed. The problem of an imbalance in the amount of data.
因此,本申请实施例采用识别信号预训练和认证信号微调的方法训练模型,从而解决样本数量不平衡的问题。Therefore, the embodiment of the present application uses a method of identifying signal pre-training and authentication signal fine-tuning to train the model, thereby solving the problem of imbalance in the number of samples.
也就是说,本申请实施例中首先基于作为识别信号的训练人脸图像训练人脸特征模型,后续的,利用作为认证信号的配对的训练人脸图像和证件人脸图像,对上述训练所得的人脸特征模型进行调整,进而基于调整后的人脸特征模型,得到人脸模型。即本申请实施例采用识别信号预训练和认证信号微调的方法训练模型,从而解决样本数量不平衡的问题。That is to say, in the embodiment of the present application, the face feature model is first trained based on the training face image as the identification signal, and subsequently, the training face image and the document face image as the pairing of the authentication signal are used, and the training result is obtained. The face feature model is adjusted, and then the face model is obtained based on the adjusted face feature model. That is, the embodiment of the present application uses a method of identifying signal pre-training and authentication signal fine-tuning to train the model, thereby solving the problem of imbalance in the number of samples.
在一种实现方式中,可以通过随机梯度下降的方式训练人脸特征模型,minibatch(训练批次)大小为64,冲量为0.9,目标是通过双信号有监督训练得到人脸特征模型的模型参数θcIn one implementation, the face feature model can be trained by random gradient descent, the minibatch (training batch) size is 64, and the impulse is 0.9. The goal is to obtain the model parameters of the face feature model through dual-signal supervised training. θ c .
在第一个阶段使用训练人脸图像进行识别信号有监督训练得到模型参数θid,该参数为第二个阶段的初始参数。In the first stage, the training face image is used for the identification signal to be supervised and trained to obtain the model parameter θ id , which is the initial parameter of the second stage.
在本申请的一个实施例中,子步骤S21可以包括如下子步骤:In an embodiment of the present application, sub-step S21 may include the following sub-steps:
子步骤S211,随机提取训练人脸图像;Sub-step S211, randomly extracting a training face image;
子步骤S212,将随机提取的训练人脸图像输入预置的人脸特征模型中提取训练人脸特征;Sub-step S212, the randomly extracted training face image is input into the preset facial feature model to extract the training facial feature;
子步骤S213,计算训练人脸特征用于人脸识别时的第一损失率;Sub-step S213, calculating a first loss rate when the training face feature is used for face recognition;
子步骤S214,判断第一损失率是否收敛;若否,则执行子步骤S215,之后,返回执行子步骤S216;Sub-step S214, it is determined whether the first loss rate converges; if not, then sub-step S215 is performed, after which, return to the execution sub-step S216;
子步骤S215,以当前迭代的模型参数的参数值作为初始参数值;Sub-step S215, taking the parameter value of the model parameter of the current iteration as the initial parameter value;
子步骤S216,采用第一损失率计算第一梯度;Sub-step S216, calculating a first gradient by using a first loss rate;
子步骤S217,采用第一梯度与预设的学习率对模型参数的参数值进行下降,返回执行子步骤S211。Sub-step S217, the parameter value of the model parameter is decreased by using the first gradient and the preset learning rate, and the process returns to the sub-step S211.
第一个阶段的参数值初始化为服从高斯分布N(0,σ2)的随机参数,其中,
Figure PCTCN2017102255-appb-000001
The parameter values of the first phase are initialized to random parameters obeying the Gaussian distribution N(0, σ 2 ), where
Figure PCTCN2017102255-appb-000001
在第一阶段中,输入的训练数据集为{(xi,yi),i=1,2,…,N},其中xi表示训练人脸图像,yi是用户标签(即类别标签,表示属于哪个用户)。In the first phase, the input training data set is {(x i , y i ), i=1, 2,..., N}, where x i represents the training face image and y i is the user tag (ie the category tag) , which user belongs to).
在训练前,对人脸特征模型中的模型参数θid(其中,id表示初始参数值)、学习率η(t)、迭代次数t进行初始化,配置初始的值,如对学习率η(t)初始的值为0.1,t初始的值为0(t←0)。Before training, the model parameters θ id (where id represents the initial parameter value), the learning rate η(t), and the number of iterations t are initialized in the face feature model, and the initial values are configured, such as the learning rate η(t The initial value is 0.1, and the initial value of t is 0 (t←0).
训练过程如下:The training process is as follows:
在第t+1次迭代中(t←t+1),从训练数据集中随机提取训练样本{(xi,yi)}。In the t+1th iteration (t←t+1), the training samples {(x i , y i )} are randomly extracted from the training data set.
计算前向过程,获得训练人脸特征:Calculate the forward process and obtain training face features:
fi=Conv(xiid)f i =Conv(x iid )
其中,Conv()表示人脸特征模型。Among them, Conv () represents the face feature model.
计算训练人脸特征用于人脸识别时的第一损失率,通过采用第一损失率对模型参数求偏导的方式计算第一梯度:Calculating the first loss rate when the trained face feature is used for face recognition, and calculating the first gradient by using the first loss rate to derive the partial deviation of the model parameters:
Figure PCTCN2017102255-appb-000002
Figure PCTCN2017102255-appb-000002
其中,IdentificationLoss表示训练人脸特征用于人脸识别时的第一损失率。Among them, IdentificationLoss represents the first loss rate when training face features for face recognition.
在一种实现方式中,通过多元回归的方式计算训练人脸特征fi属于预设的用户标签的概率。In one implementation, the probability that the training facial feature f i belongs to the preset user tag is calculated by means of multiple regression.
采用概率计算训练人脸特征的用于人脸识别时的第一损失率IdentificationLoss。The first loss rate IdentificationLoss for face recognition using the probabilistic calculation to train the face features.
Figure PCTCN2017102255-appb-000003
Figure PCTCN2017102255-appb-000003
其中,pi为目标的概率分布(即目标的用户标签的概率分布),
Figure PCTCN2017102255-appb-000004
为预测的概率分布(即预测的用户标签的概率分布)。
Where p i is the probability distribution of the target (ie, the probability distribution of the target user tag),
Figure PCTCN2017102255-appb-000004
The probability distribution for the prediction (ie, the probability distribution of the predicted user labels).
如果第一损失率未收敛(如多个连续的第一损失率之间的差异大于或等 于预设的差异阈值),则更新人脸特征模型的模型参数,进行下一轮迭代:If the first loss rate does not converge (eg, the difference between multiple consecutive first loss rates is greater than or equal to At the preset difference threshold), the model parameters of the face feature model are updated for the next iteration:
Figure PCTCN2017102255-appb-000005
Figure PCTCN2017102255-appb-000005
反之,如果第一损失率收敛(如多个连续的第一损失率之间的差异小于预设的差异阈值),则结束训练,输出模型参数θidConversely, if the first loss rate converges (eg, the difference between the plurality of consecutive first loss rates is less than the preset difference threshold), the training is ended and the model parameter θ id is output.
当然,除了第一损失率是否收敛作为迭代的判断条件之外,还可以采用其他条件作为迭代的判断条件,如第一梯度是否收敛、迭代的次数是否达到迭代阈值,等等,本申请实施例对此不加以限制。Of course, in addition to whether the first loss rate converges as an iterative judgment condition, other conditions may be used as the judgment condition of the iteration, such as whether the first gradient converges, whether the number of iterations reaches the iteration threshold, and the like. There is no restriction on this.
步骤104,采用配对的训练人脸图像和证件人脸图像,对人脸特征模型进行调整。In step 104, the face feature model is adjusted by using the paired training face image and the document face image.
在一种实现方式中,可以根据证件人脸图像的特性,对人脸特征模型进行适应性调整。In an implementation manner, the face feature model can be adaptively adjusted according to the characteristics of the face image of the document.
在一种实现方式中,采用配对的训练人脸图像和证件人脸图像,对人脸特征模型进行调整后,可以得到调整后的人脸特征模型,在一种情况中,该调整后的人脸特征模型属于人脸模型,即人脸模型包括上述调整后的人脸特征模型。In an implementation manner, after the face model is adjusted by using the paired training face image and the document face image, the adjusted face feature model can be obtained. In one case, the adjusted person The face feature model belongs to the face model, that is, the face model includes the above-mentioned adjusted face feature model.
在本申请的一个实施例中,步骤104可以包括如下子步骤:In an embodiment of the present application, step 104 may include the following sub-steps:
子步骤S31,采用配对的训练人脸图像和证件人脸图像基于人脸认证对人脸特征模型进行训练,以将模型参数从初始参数值调整为目标参数值。Sub-step S31, using the paired training face image and the document face image to train the face feature model based on face authentication to adjust the model parameter from the initial parameter value to the target parameter value.
第二阶段采用训练人脸图像和证件人脸图像配对样本进行认证信号有监督训练得到最终的模型参数θc=θveIn the second stage, the training face image and the fingerprint face image paired sample are used for the authentication signal to be supervised and trained to obtain the final model parameter θ c = θ ve .
在本申请的一个实施例中,子步骤S31可以包括如下子步骤:In an embodiment of the present application, sub-step S31 may include the following sub-steps:
子步骤S311,将属于同一用户的训练人脸图像和证件人脸图像进行配对;Sub-step S311, pairing the training face image and the document face image belonging to the same user;
子步骤S312,随机提取配对的训练人脸图像和证件人脸图像;Sub-step S312, randomly extracting the paired training face image and the document face image;
子步骤S313,将随机提取的、配对的训练人脸图像和证件人脸图像输入人脸特征模型中提取训练人脸特征和证件人脸特征;Sub-step S313, the randomly extracted, paired training face image and the document face image are input into the face feature model to extract the training face feature and the document face feature;
子步骤S314,计算训练人脸特征和证件人脸特征用于人脸认证时的第二 损失率;Sub-step S314, calculating a training face feature and a document face feature for the second face authentication Loss rate
子步骤S315,判断第二损失率是否收敛;若是,则执行子步骤S316,若否,则执行子步骤S317;Sub-step S315, it is determined whether the second loss rate converges; if so, sub-step S316 is performed, and if not, sub-step S317 is performed;
子步骤S316,以当前迭代的模型参数的参数值作为目标参数值;Sub-step S316, taking the parameter value of the model parameter of the current iteration as the target parameter value;
子步骤S317,采用第二损失率计算第二梯度;Sub-step S317, calculating a second gradient by using a second loss rate;
子步骤S318,采用第二梯度与预设的学习率对模型参数的参数值进行下降,返回执行子步骤S312。Sub-step S318, the parameter value of the model parameter is decreased by using the second gradient and the preset learning rate, and the process returns to the sub-step S312.
在一种实现方式中,可以通过随机梯度下降的方式训练人脸特征模型。In one implementation, the facial feature model can be trained by random gradient descent.
在第二阶段中,输入的训练数据集为{(Xij,lij),i=1,2,…,M,j=1,2,…,N,其中,Xij=xi,xj表示一对训练人脸图像和证件人脸图像,lij为二进制标签,lij为分类标签,lij=1表示训练人脸图像和证件人脸图像来源于同一个人,lij=-1表示训练人脸图像和证件人脸图像来自于不同人。In the second phase, the input training data set is {(X ij , l ij ), i=1, 2, . . . , M, j=1, 2, . . . , N, where Xij=xi, xj represents a For training face images and document face images, lij is a binary label, l ij is a classification label, l ij =1 indicates that the training face image and the document face image are from the same person, and l ij =-1 indicates training the face. Image and document face images come from different people.
例如,如图2所示,第一幅的证件人脸图像和第二幅的训练人脸图像可以配对,第一幅的证件人脸图像和第三幅的训练人脸图像可以配对,第一幅的证件人脸图像和第四幅的训练人脸图像可以配对,等等。For example, as shown in FIG. 2, the first document face image and the second training face image can be paired, and the first document face image and the third training face image can be paired, first The image of the document face and the image of the training face of the fourth frame can be paired, and so on.
在调整前,对人脸特征模型中的模型参数θve(其中,ve为目标参数值)、学习率η(t)、迭代次数t进行初始化,配置初始的值,如θve=θid,对学习率η(t)初始的值为0.1,t初始的值为0(t←0)。Before the adjustment, the model parameters θ ve (where ve is the target parameter value), the learning rate η(t), and the number of iterations t in the face feature model are initialized, and the initial values, such as θ ve = θ id , are configured. The initial value of the learning rate η(t) is 0.1, and the initial value of t is 0 (t←0).
调整过程如下:The adjustment process is as follows:
在第t+1次迭代中(t←t+1),从训练数据集中随机提取训练样本{(Xij,lij)}。In the t+1th iteration (t←t+1), the training samples {(X ij , l ij )} are randomly extracted from the training data set.
计算前向过程,获得训练人脸特征和证件人脸特征:Calculate the forward process to obtain training face features and document face features:
fij=Conv(Xijve)f ij =Conv(X ij , θ ve )
其中,Conv()表示人脸特征模型。Among them, Conv () represents the face feature model.
计算训练人脸特征和证件人脸特用于人脸认证时的第二损失率,通过采用第二损失率对模型参数求偏导的方式计算第二梯度: Calculate the second loss rate of the face features and the face of the document specially used for face authentication, and calculate the second gradient by using the second loss rate to obtain the partial deviation of the model parameters:
Figure PCTCN2017102255-appb-000006
Figure PCTCN2017102255-appb-000006
其中,VerificationLoss表示人脸特征用于人脸认证时的第二损失率。Among them, VerificationLoss indicates the second loss rate when the face feature is used for face authentication.
在一种实现方式中,可以计算训练人脸特征和证件人脸特征之间的距离。In one implementation, the distance between the training face feature and the document face feature can be calculated.
采用距离计算训练人脸特征和证件人脸特征的用于人脸认证时的损失率VerificationLoss。The loss rate VerificationLoss for face authentication using distance calculation to train face features and document face features.
Figure PCTCN2017102255-appb-000007
Figure PCTCN2017102255-appb-000007
其中,
Figure PCTCN2017102255-appb-000008
表示训练人脸特征fi和证件人脸特征fj之间的距离,σ表示权重,w表示斜率,b表示截距。
among them,
Figure PCTCN2017102255-appb-000008
Represents the distance between the training face feature f i and the document face feature f j , σ represents the weight, w represents the slope, and b represents the intercept.
如果第二损失率未收敛(如多个连续的第二损失率之间的差异大于或等于预设的差异阈值),则更新人脸特征模型的模型参数,进行下一轮迭代:If the second loss rate does not converge (eg, the difference between the plurality of consecutive second loss rates is greater than or equal to the preset difference threshold), the model parameters of the face feature model are updated for the next iteration:
Figure PCTCN2017102255-appb-000009
Figure PCTCN2017102255-appb-000009
反之,如果第二损失率收敛(如多个连续的第二损失率之间的差异小于预设的差异阈值),则结束调整,输出模型参数θc=θveConversely, if the second loss rate converges (eg, the difference between the plurality of consecutive second loss rates is less than the preset difference threshold), the adjustment is ended and the model parameter θ c = θ ve is output.
当然,除了第二损失率是否收敛作为迭代的判断条件之外,还可以采用其他条件作为迭代的判断条件,如第二梯度是否收敛、迭代的次数是否达到迭代阈值,等等,本申请实施例对此不加以限制。Of course, in addition to whether the second loss rate converges as an iterative judgment condition, other conditions may be used as the judgment condition of the iteration, such as whether the second gradient converges, whether the number of iterations reaches the iteration threshold, and the like. There is no restriction on this.
本申请实施例在训练图像数据和证件图像数据中提取训练人脸图像和证件人脸图像,采用训练人脸图像训练人脸特征模型,采用配对的训练人脸图像和证件人脸图像,对人脸特征模型进行调整,识别信号预训练和认证信号微调的方法训练模型,解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。In the embodiment of the present application, the training face image and the document face image are extracted from the training image data and the document image data, and the face model is trained by training the face image, and the paired training face image and the document face image are used to The face feature model is adjusted to identify the signal training model for pre-training and authentication signal fine-tuning, to solve the problem of unbalanced sample quantity, improve the performance of the model, and thus improve the accuracy of face authentication.
并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较好的鲁棒性。 Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
参照图3,示出了本申请的另一种人脸模型的训练方法实施例的步骤流程图,具体可以包括如下步骤:Referring to FIG. 3, a flow chart of steps of a method for training a face model of another application of the present application is shown, which may specifically include the following steps:
步骤301,获取训练样本。In step 301, a training sample is obtained.
其中,上述训练样本包括训练图像数据和证件图像数据。Wherein, the training samples include training image data and document image data.
步骤302,在训练图像数据和证件图像数据中提取训练人脸图像和证件人脸图像。Step 302, extracting a training face image and a document face image in the training image data and the document image data.
步骤303,采用训练人脸图像训练人脸特征模型。In step 303, the face feature model is trained by training the face image.
步骤304,采用配对的训练人脸图像和证件人脸图像,对人脸特征模型进行调整。In step 304, the face feature model is adjusted by using the paired training face image and the document face image.
步骤305,采用配对的训练人脸图像和证件人脸图像,按照联合贝叶斯训练人脸认证模型。 Step 305, using the paired training face image and the document face image, and training the face authentication model according to the joint Bayesian.
在一种实现方式中,训练的人脸模型包括人脸认证模型,该人脸认证模型可以为用于计算人脸特征之间的相似度。In one implementation, the trained face model includes a face authentication model, which may be used to calculate similarities between facial features.
也就是说,在一种实现方式中,上述训练的人脸模型不仅可以包括人脸特征模型,还可以包括人脸认证模型。That is to say, in one implementation manner, the trained face model may include not only a face feature model but also a face authentication model.
在本申请的一个实施例中,为进一步增强人脸特征的判别性并进行认证处理,可以采用训练人脸图像和证件人脸图像训练Joint Bayesian(JB,联合贝叶斯)分类器。In an embodiment of the present application, in order to further enhance the discriminability of the face feature and perform the authentication process, the Joint Bayesian (JB, Joint Bayesian) classifier may be trained by training the face image and the document face image.
其中,联合贝叶斯是基于贝叶斯方法的一种分类器,通过两个后验概率的比值的对数对一对特征进行打分,可以增大类间误差,缩小类内误差。Among them, the joint Bayesian is a classifier based on the Bayesian method. By classifying a pair of features by the logarithm of the ratio of the two posterior probabilities, the inter-class error can be increased and the intra-class error can be reduced.
在训练时,输入的训练数据集为{(fij,lij)}(i=1,2,…,mi,j=1,2,…,N),其中,fij=Conv(xij;θconv),Xij=(xi,xj)表示一对训练人脸图像和证件人脸图像,Conv()表示人脸特征模型,lij为分类标签,lij=1表示训练人脸图像和证件人脸图像来源于同一个人,lij=-1表示训练人脸图像和证件人脸图像来自于不同人。 At training, the input training data set is {(f ij ,l ij )}(i=1,2,...,m i ,j=1,2,...,N), where f ij =Conv(x Ij ; θ conv ), X ij = (x i , x j ) represents a pair of trained face images and document face images, Conv () represents a face feature model, l ij is a classification label, and l ij =1 represents training The face image and the document face image are from the same person, and l ij = -1 indicates that the training face image and the document face image are from different people.
训练过程如下:The training process is as follows:
子步骤S41,初始化协方差矩阵Sμ和Sε:Sub-step S41, initializing the covariance matrices S μ and S ε :
Figure PCTCN2017102255-appb-000010
Figure PCTCN2017102255-appb-000010
Figure PCTCN2017102255-appb-000011
Figure PCTCN2017102255-appb-000011
子步骤S42,计算矩阵F和G:Sub-step S42, calculating matrices F and G:
F=Sε -1 F=S ε -1
G=-(miSμ+Sε)-1SμSε -1 G=-(m i S μ +S ε ) -1 S μ S ε -1
子步骤S43,计算μi和εij:Sub-step S43, calculating μ i and ε ij :
Figure PCTCN2017102255-appb-000012
Figure PCTCN2017102255-appb-000012
Figure PCTCN2017102255-appb-000013
Figure PCTCN2017102255-appb-000013
子步骤S44,更新协方差矩阵Sμ和Sε:Sub-step S44, updating the covariance matrices S μ and S ε :
Figure PCTCN2017102255-appb-000014
Figure PCTCN2017102255-appb-000014
Figure PCTCN2017102255-appb-000015
Figure PCTCN2017102255-appb-000015
子步骤S44,判断Sμ和Sε是否收敛,若是,则执行子步骤S45,若否,则返回执行子步骤S42。Sub-step S44, it is judged whether S μ and S ε converge, and if so, sub-step S45 is performed, and if not, the execution sub-step S42 is returned.
子步骤S45,按照如下公式分别计算矩阵F,G和A: Sub-step S45, the matrices F, G and A are respectively calculated according to the following formula:
F=Sε -1 F=S ε -1
G=-(2Sμ+Sε)-1SμSε -1 G=-(2S μ +S ε ) -1 S μ S ε -1
A=(Sμ+Sε)-1-(F+G)A=(S μ +S ε ) -1 -(F+G)
子步骤S46,输出人脸认证模型r(x1,x2)Sub-step S46, outputting a face authentication model r(x 1 , x 2 )
Figure PCTCN2017102255-appb-000016
Figure PCTCN2017102255-appb-000016
在本申请实施例中,人脸特征模型包括卷积神经网络(Convolutional Neural Network,CNN)、深层神经网络(Deep Neural Networks,DNN)等网路模型。In the embodiment of the present application, the face feature model includes a network model such as a Convolutional Neural Network (CNN) or a Deep Neural Networks (DNN).
在本申请实施例中,上述人脸特征模型可以为卷积神经网络(Convolutional Neural Network,CNN)模型或深层神经网络(Deep Neural Networks,DNN)模型等网络模型。In the embodiment of the present application, the facial feature model may be a network model such as a Convolutional Neural Network (CNN) model or a Deep Neural Networks (DNN) model.
其中,卷积神经网络在人工神经网络中引入卷积结构,通过局部权重共享的方法,一方面可以减小计算量,另一方面可以抽取更加抽象的特征。Among them, convolutional neural networks introduce convolutional structures in artificial neural networks. By means of local weight sharing, on the one hand, the amount of computation can be reduced, and on the other hand, more abstract features can be extracted.
在一种实现方式中,卷积神经网络模型可以包括输入层、一个或多个卷积层、一个或多个采样层、输出层。In one implementation, the convolutional neural network model can include an input layer, one or more convolutional layers, one or more sampling layers, and an output layer.
卷积神经网络的每一层一般由多个map组成,每个map由多个神经单元组成,同一个map的所有神经单元共用一个卷积核(即权重),卷积核往往代表一个特征,比如某个卷积核代表一段弧,那么把这个卷积核在整个图片上滚一下,卷积值较大的区域就很有可能是一段弧。Each layer of a convolutional neural network is generally composed of multiple maps. Each map is composed of multiple neural units. All neural units of the same map share a convolution kernel (ie, weight), and the convolution kernel often represents a feature. For example, if a convolution kernel represents an arc, then the convolution kernel is rolled over the entire picture, and the area with a larger convolution value is likely to be an arc.
输入层:输入层没有输入值,有一个输出向量,这个向量的大小就是分块人脸图像的大小,如一个100×100的矩阵。Input layer: The input layer has no input value and has an output vector. The size of this vector is the size of the tiled face image, such as a matrix of 100×100.
卷积层:卷积层的输入可以来源于输入层,可以来源于采样层,卷积层的每一个map都有一个大小相同的卷积核。Convolutional layer: The input of the convolutional layer can be derived from the input layer and can be derived from the sampling layer. Each map of the convolutional layer has a convolution kernel of the same size.
采样层(subsampling,Pooling):采样层是对上一层map的一个采样处理,采样方式是对上一层map的相邻小区域进行聚合统计。 Subsampling (Pooling): The sampling layer is a sampling process of the upper layer map. The sampling method is to collect statistics on adjacent small areas of the upper layer map.
在本申请实施例中,卷积神经网络模型的模型参数包括卷积核,其参数值为卷积核的值,即在人脸特征模型进行训练和调整时,可以对卷积核的值进行训练和调整。In the embodiment of the present application, the model parameters of the convolutional neural network model include a convolution kernel whose parameter value is a value of a convolution kernel, that is, when the face feature model is trained and adjusted, the value of the convolution kernel can be performed. Training and adjustment.
参照图4,示出了本申请实施例的一种卷积神经网络模型的处理流程图,具体可以包括如下步骤:Referring to FIG. 4, a processing flowchart of a convolutional neural network model of an embodiment of the present application is shown, which may specifically include the following steps:
步骤401,当卷积层属于第一深度范围时,采用指定的单个卷积核进行卷积操作。Step 401: When the convolutional layer belongs to the first depth range, the convolution operation is performed by using the specified single convolution kernel.
在本申请实施例中,可以将人脸图像输入卷积神经网络模型中,人脸图像可以包括离线训练时的训练人脸图像、证件人脸图像,也可以包括在线人脸认证时的目标人脸图像,还可以包括其他人脸图像,等等。In the embodiment of the present application, the face image may be input into the convolutional neural network model, and the face image may include a training face image during offline training, a document face image, and may also include a target person in online face authentication. Face images can also include other face images, and so on.
在浅层(即第一深度范围)可以直接采用卷积核进行卷积,减少计算量。In the shallow layer (ie, the first depth range), convolution kernels can be directly used for convolution, reducing the amount of calculation.
在第一深度范围卷积完成之后,可以通过BN(Batch Normalization)算子、ReLU(Rectified Linear Units)函数等方式进行规范化操作和激活操作。After the first depth range convolution is completed, the normalization operation and the activation operation may be performed by means of a BN (Batch Normalization) operator, a ReLU (Rectified Linear Units) function, or the like.
步骤402,当卷积层属于第二深度范围时,采用分层线性模型Inception进行卷积操作。Step 402: When the convolutional layer belongs to the second depth range, the convolution operation is performed by using the hierarchical linear model Inception.
其中,第二深度范围的层数大于第一深度范围的层数。The number of layers in the second depth range is greater than the number of layers in the first depth range.
在本申请实施例中,在深层(即第二深度范围)可以采用Inception进行卷积,一方面,可以在计算量不变的情况下增加卷积神经网络模型的宽度和深度,从而增进卷积神经网络模型的性能;另一方面,由于使用不同大小的卷积核(如1×1、3×3、5×5)以可以提取多尺度的人脸特征。In the embodiment of the present application, Inception can be used for convolution in the deep layer (ie, the second depth range). On the one hand, the width and depth of the convolutional neural network model can be increased under the condition of constant calculation, thereby enhancing convolution. The performance of the neural network model; on the other hand, multi-scale facial features can be extracted due to the use of convolution kernels of different sizes (eg, 1×1, 3×3, 5×5).
在本申请的一个实施例中,分层线性模型Inception包括并联的第一层、第二层、第三层、第四层,则在本申请实施例中,步骤402可以包括如下子步骤:In an embodiment of the present application, the hierarchical linear model Inception includes a first layer, a second layer, a third layer, and a fourth layer in parallel. In the embodiment of the present application, step 402 may include the following sub-steps:
子步骤S51,在第一层中,采用指定的第一卷积核与第一步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第一特征图像数据;Sub-step S51, in the first layer, performing convolution operation on the image data input to the hierarchical linear model Inception by using the specified first convolution kernel and the first step length to obtain first feature image data;
在第一层中,可以通过BN算子等方式对第一特征图像数据进行规范化操 作。In the first layer, the first feature image data can be normalized by means of a BN operator or the like. Work.
需要说明的是,由于输入卷积神经网络模型的人脸图像可以是离线训练时的训练人脸图像、证件人脸图像,也可以是在线人脸认证时的目标人脸图像,因此,输入分层线性模型Inception的图像数据也在这几种情况中有所不同。It should be noted that, since the face image of the input convolutional neural network model may be a training face image or a document face image during offline training, it may also be a target face image during online face authentication, and therefore, the input point is The image data of the layer linear model Inception also differs in these cases.
子步骤S52,在第二层中,采用指定的第二卷积核与第二步长对所述分层线性模型Inception的图像数据进行卷积操作,获得第二特征图像数据;Sub-step S52, in the second layer, performing convolution operation on the image data of the hierarchical linear model Inception by using the specified second convolution kernel and the second step to obtain second feature image data;
在第二层中,可以通过BN算子、ReLU函数等方式对第二特征图像数据进行规范化操作和激活操作。In the second layer, the second feature image data may be normalized and activated by a BN operator, a ReLU function, or the like.
子步骤S53,采用指定的第三卷积核与第三步长对所述第二特征图像数据进行卷积操作,获得第三特征图像数据;Sub-step S53, performing convolution operation on the second feature image data by using the specified third convolution kernel and the third step to obtain third feature image data;
在一种实现方式中,可以BN算子等方式对所述第三特征图像数据进行规范化操作。In an implementation manner, the third feature image data may be normalized by a BN operator or the like.
子步骤S54,在第三层中,采用指定的第四卷积核与第四步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第四特征图像数据;Sub-step S54, in the third layer, performing convolution operation on the image data input to the hierarchical linear model Inception by using the specified fourth convolution kernel and the fourth step to obtain fourth feature image data;
在第三层中,可以通过BN算子、ReLU函数等方式对第四特征图像数据进行规范化操作和激活操作。In the third layer, the fourth feature image data can be normalized and activated by a BN operator, a ReLU function, or the like.
子步骤S55,采用指定的第五卷积核与第五步长对所述第四特征图像数据进行卷积操作,获得第五特征图像数据;Sub-step S55, performing a convolution operation on the fourth feature image data by using the specified fifth convolution kernel and the fifth step to obtain the fifth feature image data;
在一种实现方式中,可以通过BN算子等方式对第五特征图像数据进行规范化操作。In an implementation manner, the fifth feature image data may be normalized by a BN operator or the like.
子步骤S56,在第四层中,采用指定的第六卷积核与第六步长对输入分层线性模型Inception的图像数据进行卷积操作,获得第六特征图像数据;Sub-step S56, in the fourth layer, performing convolution operation on the image data of the input hierarchical linear model Inception by using the specified sixth convolution kernel and the sixth step to obtain the sixth feature image data;
在第四层中,可以通过BN算子等方式对第六特征图像数据进行规范化操作。In the fourth layer, the sixth feature image data can be normalized by a BN operator or the like.
子步骤S57,对第六特征图像数据进行最大化下采样操作,获得第七特征图像数据; Sub-step S57, performing a maximum downsampling operation on the sixth feature image data to obtain seventh feature image data;
在本申请实施例中,可以通过ReLU函数等方式对第八特征图像数据激活操作。In the embodiment of the present application, the eighth feature image data activation operation may be performed by a ReLU function or the like.
子步骤S58,连接第一特征图像数据、第三特征图像数据、第五特征图像数据和第七特征图像数据,获得第八特征图像数据。Sub-step S58, connecting the first feature image data, the third feature image data, the fifth feature image data, and the seventh feature image data to obtain the eighth feature image data.
在一种情况中,第一卷积核、第二卷积核、第三卷积核、第四卷积核、第五卷积核、第六卷积核的大小可以相同,也可以不同;第一步长、第二步长、第三步长、第四步长、第五步长、第六步长的大小可以相同,也可以不同,本申请实施例对比不加以限制。In one case, the sizes of the first convolution kernel, the second convolution kernel, the third convolution kernel, the fourth convolution kernel, the fifth convolution kernel, and the sixth convolution kernel may be the same or different; The size of the first step, the second step, the third step, the fourth step, the fifth step, and the sixth step may be the same or different, and the comparison of the embodiments of the present application is not limited.
此外,在分层线性模型Inception中,第一层的处理(子步骤S51),第二层的处理(子步骤S52与子步骤S53),第三层的处理(子步骤S54与子步骤S55),第四层的处理(子步骤S56与子步骤S57)可以并行执行,不分先后顺序。Further, in the hierarchical linear model Inception, the processing of the first layer (sub-step S51), the processing of the second layer (sub-step S52 and sub-step S53), processing of the third layer (sub-step S54 and sub-step S55) The processing of the fourth layer (sub-step S56 and sub-step S57) can be performed in parallel, regardless of the order.
为使本领域技术人员更好地理解本申请实施例,以下通过具体的示例来说明本申请实施例中的Inception。To enable a person skilled in the art to better understand the embodiments of the present application, the following examples are used to illustrate the Inception in the embodiments of the present application.
如图5所示,对于输入的图像数据(如分块人脸图像):As shown in Figure 5, for input image data (such as a tiled face image):
在第一层中,可以采用1×1的卷积核,以步长为1进行卷积操作,然后进行BN规范化。In the first layer, a 1×1 convolution kernel can be used, a convolution operation is performed with a step size of 1, and then BN normalization is performed.
在第二层中,可以采用1×1的卷积核,以步长为1进行卷积操作,然后进行BN规范化和ReLU激活。In the second layer, a 1×1 convolution kernel can be used, the convolution operation is performed with a step size of 1, and then BN normalization and ReLU activation are performed.
再采用使用5×5的卷积核,以步长为1进行卷积操作,然后进行BN规范化。Then, using a 5×5 convolution kernel, the convolution operation is performed with a step size of 1, and then BN normalization is performed.
在第三层中,可以采用1×1的卷积核,以步长为1进行卷积操作,然后进行BN规范化和ReLU激活。In the third layer, a 1×1 convolution kernel can be used, the convolution operation is performed with a step size of 1, and then BN normalization and ReLU activation are performed.
再采用使用3×3的卷积核,以步长为1进行卷积操作,然后进行BN规范化。Then, using a 3×3 convolution kernel, the convolution operation is performed with a step size of 1, and then BN normalization is performed.
在第四层中,可以采用1×1的卷积核,以步长为1进行卷积操作,再进行BN规范化,再进行最大化(Max)下采样。In the fourth layer, a 1×1 convolution kernel can be used, the convolution operation is performed with a step size of 1, and the BN normalization is performed, followed by maximization (Max) downsampling.
将第一层至第四层输出的图像数据连接在一起,再进行ReLu激活,得到Inception的输出。 The image data outputted from the first layer to the fourth layer are connected together, and then ReLu is activated to obtain the output of Inception.
步骤403,在采样层中进行最大化下采样。In step 403, maximum downsampling is performed in the sampling layer.
步骤404,根据卷积神经网络模型输出的多个图像数据获得特征向量,作为人脸图像的人脸特征。Step 404: Obtain a feature vector according to the plurality of image data outputted by the convolutional neural network model as a face feature of the face image.
在一种实现方式中,在本申请实施例中,步骤401、步骤402与步骤403之间并不具有固定的执行顺序,其执行顺序可以依据卷积神经网络的实际结构所决定。In an implementation manner, in the embodiment of the present application, there is no fixed execution order between step 401, step 402 and step 403, and the execution order may be determined according to the actual structure of the convolutional neural network.
为使本领域技术人员更好地理解本申请实施例,以下通过具体的示例来说明本申请实施例中的卷积神经网络模型。In order to enable those skilled in the art to better understand the embodiments of the present application, the convolutional neural network model in the embodiment of the present application is described below by way of specific examples.
表1Table 1
Figure PCTCN2017102255-appb-000017
Figure PCTCN2017102255-appb-000017
在本示例中,如表1所示,卷积神经网络的卷积层与采样层共17层,其中,第1、3、4、6、7、9、10、11、12、13、15、16层为卷积层,第1、3、4为浅层、第6、7、9、10、11、12、13、15、16深层;第2、5、8、14、17层为采 样层。In this example, as shown in Table 1, the convolutional neural network has 17 convolutional layers and a sampling layer, of which 1, 3, 4, 6, 7, 9, 10, 11, 12, 13, 15 16 layers are convoluted layers, and the first, third, and fourth layers are shallow, the sixth, seventh, ninth, tenth, eleventh, eleventh, thirteenth, and thirteenth, and sixteenth; Pick Sample layer.
卷积层1:Convolution layer 1:
假设输入一帧归一化后100×100的灰度分块人脸图像,首先采用5×5的卷积核,以步长为2对其进行卷积,得到64幅50×50的特征图像,然后对这64幅50×50的特征图像先进行BN规范化,再进行ReLU激活。Suppose that a 100×100 gray-scale block face image is normalized after inputting a frame. First, a 5×5 convolution kernel is used, and the step size is 2, which is convolved to obtain 64 50×50 feature images. Then, the 64 50×50 feature images are first BN normalized, and then ReLU is activated.
采样层1:Sampling layer 1:
对卷积层1输出的64幅50×50的特征图像进行步长为2的3×3最大化下采样,得到64幅14×14的特征图像。The 64 50×50 feature images outputted by the convolutional layer 1 are subjected to 3×3 maximization downsampling with a step size of 2 to obtain 64 14×14 feature images.
卷积层2:Convolution 2:
对采样层1输出的64幅14×14的特征图像采用1×1的卷积核,以步长为1进行卷积操作,得到64幅14×14的特征图像,然后对这64幅14×14的特征图像先进行BN规范化,再进行ReLU激活。For the 64 14×14 feature images output by the sampling layer 1, a 1×1 convolution kernel is used, and a convolution operation is performed with a step size of 1, to obtain 64 14×14 feature images, and then the 64 frames 14× The feature image of 14 is first normalized by BN, and then ReLU is activated.
卷积层3Convolution layer 3
对卷积层2输出的64幅14×14的特征图像采用3×3的卷积核,以步长为1进行卷积操作,得到92幅14×14的特征图像,然后对这92幅14×14的特征图像先进行BN规范化,再进行ReLU激活。For the 64 14×14 feature images outputted by the convolutional layer 2, a 3×3 convolution kernel is used, and a convolution operation is performed with a step size of 1, to obtain 92 14×14 feature images, and then to the 92 frames 14 The feature image of ×14 is first normalized by BN, and then ReLU is activated.
采样层2Sampling layer 2
对卷积层3输出的92幅14×14的特征图像进行步长为1的3×3最大化下采样,得到92幅14×14的特征图像。The 92 14×14 feature images outputted by the convolution layer 3 are subjected to 3×3 maximization downsampling with a step size of 1, and 92 14×14 feature images are obtained.
卷积层4Convolution layer 4
对采样层2输出的92幅14×14的特征图像,应用如图5所示的Inception进行如下操作,得到256幅14×14的特征图像:For the 92 14×14 feature images output by the sampling layer 2, the following operations are performed using Inception as shown in FIG. 5 to obtain 256 14×14 feature images:
步骤1,对采样层2输出的92幅14×14的特征图像使用1×1的卷积核,以步长为1进行卷积操作,得到64幅14×14的特征图像,然后对这64幅14×14的特征图像进行BN规范化。Step 1, using a 1×1 convolution kernel for 92 14×14 feature images output by the sampling layer 2, performing a convolution operation with a step size of 1, obtaining 64 14×14 feature images, and then 64 The feature image of 14×14 is subjected to BN normalization.
步骤2,对采样层2输出的92幅14×14的特征图像使用1×1的卷积核,以 步长为1进行卷积操作,得到96幅14×14的特征图像,然后对这96幅14×14的特征图像先进行BN规范化,再进行ReLU激活。Step 2, using a 1×1 convolution kernel for 92 14×14 feature images output by the sampling layer 2, The convolution operation is performed with a step size of 1, and 96 14×14 feature images are obtained. Then, the 96 14×14 feature images are first BN normalized, and then ReLU is activated.
接着使用3×3的卷积核,以步长为1进行卷积操作,得到128幅14×14的特征图像,然后对这128幅14×14的特征图像进行BN规范化。Then, using a 3×3 convolution kernel, the convolution operation is performed with a step size of 1, and 128 14×14 feature images are obtained, and then the 128 14×14 feature images are BN normalized.
步骤3,对采样层2输出的92幅14×14的特征图像使用1×1的卷积核,以步长为1进行卷积操作,得到16幅14×14的特征图像,然后对这16幅14×14的特征图像先进行BN规范化,再进行ReLU激活。Step 3: Using a 1×1 convolution kernel for 92 14×14 feature images output by the sampling layer 2, performing a convolution operation with a step size of 1, obtaining 16 14×14 feature images, and then 16 The feature image of 14×14 is first normalized by BN, and then ReLU is activated.
接着使用5×5的卷积核,以步长为1进行卷积操作,得到32幅14×14的特征图像,然后对这32幅14×14的特征图像进行BN规范化。Then, using a 5×5 convolution kernel, the convolution operation is performed with a step size of 1, and 32 14×14 feature images are obtained, and then the 32 14×14 feature images are BN normalized.
步骤4,对采样层2输出的92幅14×14的特征图像使用1×1的卷积核,以步长为1进行卷积操作,得到32幅14×14的特征图像,然后对这32幅14×14的特征图像进行BN规范化。Step 4: Using a 1×1 convolution kernel for 92 14×14 feature images output by the sampling layer 2, performing a convolution operation with a step size of 1, obtaining 32 14×14 feature images, and then 32 The feature image of 14×14 is subjected to BN normalization.
接着对这32幅14×14特征图像采用最大化下采样操作,得到32幅14×14的特征图像。Then, the maximum downsampling operation is performed on the 32 14×14 feature images to obtain 32 14×14 feature images.
步骤5,将步骤1-步骤4输出的特征图像连接在一起,得到256幅14×14的特征图像,对连接后的256幅14×14的特征图像进行ReLu激活,得到卷积层4的输出。Step 5: Connect the feature images output in steps 1 to 4 to obtain 256 14×14 feature images, and perform ReLu activation on the connected 256 14×14 feature images to obtain the output of the convolution layer 4. .
对于卷积层5-卷积层12、采样层3-采样层5的操作,可以参考卷积层1-4、采样层1-2的过程。For the operation of the convolutional layer 5-convolution layer 12, the sampling layer 3-sampling layer 5, the processes of convolutional layer 1-4, sampling layer 1-2 can be referred to.
最后,采样层15输出1024幅1×1的特征图像,将这1024幅1×1的特征图像顺序排列,拉成一个维度为1024维的特征向量,该向量即为一帧100×100的人脸图像通过该卷积网络运算的到的原始人脸特征。Finally, the sampling layer 15 outputs 1024 1×1 feature images, and sequentially arranges the 1024 1×1 feature images into a feature vector with a dimension of 1024 dimensions, which is a frame 100×100 person. The original face feature of the face image through the convolution network.
参照图6,示出了本申请的一种基于人脸模型的人脸认证方法实施例的步骤流程图,所述人脸模型包括人脸特征模型,该方法具体可以包括如下步骤:Referring to FIG. 6 , a flow chart of a method for a face authentication method based on a face model of the present application is shown. The face model includes a face feature model, and the method may specifically include the following steps:
步骤601,当接收到人脸认证的指令时,采集目标图像数据。 Step 601: When receiving an instruction of face authentication, collecting target image data.
在实际应用中,本申请实施例可以应用在人脸识别系统中,如门禁系统、监控系统、支付系统等等,对用户进行认证处理。In an actual application, the embodiment of the present application can be applied to a face recognition system, such as an access control system, a monitoring system, a payment system, etc., to perform authentication processing on a user.
若在人脸识别系统中接收到人脸认证的指令时,可以通过摄像头等方式采集到目标图像数据。If an instruction for face authentication is received in the face recognition system, the target image data can be acquired by a camera or the like.
步骤602,在目标图像数据中提取目标人脸图像。Step 602: Extract a target face image in the target image data.
在本申请的一个实施例中,步骤602可以包括如下子步骤:In one embodiment of the present application, step 602 can include the following sub-steps:
子步骤S61,在目标图像数据中进行人脸检测,确定目标人脸图像;Sub-step S61, performing face detection in the target image data to determine a target face image;
子步骤S62,在目标人脸图像中进行人脸特征点定位,确定目标眼睛数据;Sub-step S62, performing face feature point positioning in the target face image to determine target eye data;
子步骤S63,将目标眼睛数据进行对齐;Sub-step S63, aligning the target eye data;
子步骤S64,对除目标眼睛数据之外的目标人脸图像,根据目标眼睛数据的位置关系进行相似变换,获得归一化后的目标人脸图像。Sub-step S64, the target face image other than the target eye data is similarly transformed according to the positional relationship of the target eye data, and the normalized target face image is obtained.
在本申请实施例中,可以采取AdaBoost对目标图像数据进行人脸检测,在检测出的目标人脸图像上采用coase-to-fine方法对目标人脸图像进行定位,并利用定位后目标眼睛数据的位置坐标,采用相似变换进行归一化,例如,归一化后目标人脸图像的大小为100×100。In the embodiment of the present application, AdaBoost may be used to perform face detection on the target image data, and the target face image is mapped on the detected target face image by using a coase-to-fine method, and the target eye data after the positioning is utilized. The position coordinates are normalized by a similar transformation. For example, the normalized target face image has a size of 100×100.
步骤603,将目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征。Step 603: Input the target face image into the pre-trained face feature model to extract the target face feature.
应用本申请实施例,人脸特征模型可以通过如下方式进行训练:Applying the embodiment of the present application, the face feature model can be trained as follows:
子步骤6031,获取训练样本,训练样本包括训练图像数据和证件图像数据;Sub-step 6031, acquiring training samples, where the training samples include training image data and document image data;
子步骤6032,在训练图像数据和证件图像数据中提取训练人脸图像和证件人脸图像;Sub-step 6032, extracting a training face image and a document face image in the training image data and the document image data;
子步骤6033,采用训练人脸图像训练人脸特征模型;Sub-step 6033, training the face feature model by training the face image;
子步骤6034,采用配对的训练人脸图像和证件人脸图像,对人脸特征模型进行调整。 Sub-step 6034, the face feature model is adjusted by using the paired training face image and the document face image.
步骤604,根据目标人脸特征与指定的证件图像数据进行认证处理。 Step 604, performing authentication processing according to the target facial feature and the specified document image data.
在本申请的一个实施例中,步骤604可以包括如下子步骤:In one embodiment of the present application, step 604 can include the following sub-steps:
子步骤S71,获取指定的证件图像数据中证件人脸图像的证件人脸特征;Sub-step S71, acquiring the document face feature of the document face image in the specified document image data;
证件图像数据,可以为需要进行认证的用户证件中的图像数据。The document image data may be image data in a user ID that needs to be authenticated.
例如,在支付系统中,指定提取账户所属用户的身份证的证件图像数据进行认证处理。For example, in the payment system, the certificate image data of the ID card of the user to which the account belongs is specified to perform authentication processing.
证件人脸图像的证件人脸特征可以预先提取,并存储在数据库中,待人脸认证时直接提取即可。The document face features of the document face image can be extracted in advance and stored in the database, and can be directly extracted when the face is authenticated.
子步骤S72,将目标人脸特征和证件人脸特征输入按照联合贝叶斯训练的人脸认证模型,获得相似度;Sub-step S72, the target face feature and the document face feature are input according to the face authentication model of the joint Bayesian training, and the similarity is obtained;
在一种实现方式中,人脸模型还可以包括人脸认证模型,则可以将目标人脸特征和证件人脸特征输入按照联合贝叶斯训练的人脸认证模型,获得相似度。In an implementation manner, the face model may further include a face authentication model, and the target face feature and the document face feature may be input according to the face recognition model of the joint Bayesian training to obtain the similarity.
应用本申请实施例,人脸认证模型可以通过如下方式进行训练:Applying the embodiment of the present application, the face authentication model can be trained as follows:
子步骤S721,采用配对的训练人脸图像和证件人脸图像,按照联合贝叶斯训练人脸认证模型;Sub-step S721, using the paired training face image and the document face image, and training the face authentication model according to the joint Bayesian;
子步骤S73,判断相似度是否大于或等于预设的相似度阈值;若是,则执行子步骤S74,若否,则执行子步骤S75;Sub-step S73, it is determined whether the similarity is greater than or equal to the preset similarity threshold; if so, sub-step S74 is performed, and if not, sub-step S75 is performed;
子步骤S74,确定目标人脸图像和证件人脸图像属于同一个人;Sub-step S74, determining that the target face image and the document face image belong to the same person;
子步骤S75,确定目标人脸图像和证件人脸图像不属于同一个人。Sub-step S75, determining that the target face image and the document face image do not belong to the same person.
在本申请实施例中,可以预先设置一个相似度阈值T。In the embodiment of the present application, a similarity threshold T may be preset.
如果相似度≥T,则说明目标人脸图像与证件人脸图像较为相似,较大可能来自于同一个人,人脸认证成功。If the similarity ≥ T, the target face image is similar to the document face image, and the larger one may come from the same person, and the face authentication is successful.
如果相似度<T,则说明目标人脸图像与证件人脸图像相距较远,较大可能来自于不同人,人脸认证失败。 If the similarity <T, it means that the target face image is far away from the document face image, which may come from different people, and the face authentication fails.
在本申请实施例中,由于人脸特征模型和人脸认证模型的训练方法与人脸模型的训练方法实施例的应用基本相似,所以描述的比较简单,相关之处参见人脸模型的训练方法实施例的部分说明即可,本申请实施例在此不加以详述。In the embodiment of the present application, since the training methods of the face feature model and the face authentication model are basically similar to the application method of the face model training method, the description is relatively simple, and the related method can be found in the training method of the face model. The description of the embodiments may be omitted, and the embodiments of the present application are not described in detail herein.
本申请实施例在训练时使用的数据库为如图7A所示的NEU_Web数据库。The database used in the training of the embodiment of the present application is the NEU_Web database as shown in FIG. 7A.
在测试时使用的数据库分别是三个身份证数据库ID_454、ID_55和ID_229,即在训练时使用的数据库与在测试时使用的数据库没有重叠。The databases used in the tests were three ID database databases ID_454, ID_55, and ID_229, that is, the database used during training did not overlap with the database used during the test.
其中,如图7B所示,ID_454为在室内环境下采集的445人视频图像与相应的身份证图像构造的数据库,对光照、姿态和表情的变化有较强的控制。As shown in FIG. 7B, ID_454 is a database constructed of 445 video images and corresponding ID images collected in an indoor environment, and has strong control over changes in illumination, posture, and expression.
如图7C所示,ID_55为55人的身份证数据库,该数据库每个人包含9张不同姿态、不同表情的视频照与相应的身份证照片。As shown in FIG. 7C, ID_55 is an identity card database of 55 people, and each person in the database contains 9 different photos, different facial expressions and corresponding ID photos.
如图7D所示,ID_229为银行使用场景下采集的身份证数据库,具有更为复杂的光照,姿态和表情变化。As shown in FIG. 7D, ID_229 is an ID card database collected under the bank usage scenario, and has more complicated illumination, posture and expression changes.
计算在等误率为1%时,三个数据库上的认证率,如表2所示Calculate the authentication rate on the three databases when the equal error rate is 1%, as shown in Table 2.
表2 二代身份证人脸认证率(FRR=1%)Table 2 Face recognition rate of second generation ID card (FRR=1%)
Figure PCTCN2017102255-appb-000018
Figure PCTCN2017102255-appb-000018
此外,本申请实施例分别对比EBGM(Elastic Bunch Graph Matching,弹性图匹配)算法、LGBP(Local Gabor Binary Patterns,局部Gabo二值模式)算法、BSF(Block Statistical Features,块的统计特性)算法三种算法,在等误率为1%时,结果如表3所示,对应的ROC(receiver operating characteristic curve,受试者工作特征曲线)曲线如图8所示。In addition, the EBGM (Elastic Bunch Graph Matching) algorithm, the LGBP (Local Gabor Binary Patterns) algorithm, and the BSF (Block Statistical Features) algorithm are respectively used in the embodiments of the present application. The algorithm, when the equal error rate is 1%, the results are shown in Table 3, and the corresponding ROC (receiver operating characteristic curve) curve is shown in Fig. 8.
表3 认证结果比较(FRR=1%)Table 3 Comparison of certification results (FRR=1%)
Figure PCTCN2017102255-appb-000019
Figure PCTCN2017102255-appb-000019
Figure PCTCN2017102255-appb-000020
Figure PCTCN2017102255-appb-000020
其中,曲线801为本申请实施例的ROC曲线,曲线802为BSF的ROC曲线,曲线803为LGBP的ROC曲线,曲线804为EBGM的ROC曲线。The curve 801 is the ROC curve of the embodiment of the present application, the curve 802 is the ROC curve of the BSF, the curve 803 is the ROC curve of the LGBP, and the curve 804 is the ROC curve of the EBGM.
由图8可见,本申请实施例的ROC曲线相比EBGM、LGBP、BSF三种算法于的ROC曲线更靠近左上角,即相比EBGM、LGBP、BSF三种算法,本申请实施例的人脸认证的准确性更高。It can be seen from FIG. 8 that the ROC curve of the embodiment of the present application is closer to the upper left corner than the EBGM, LGBP, and BSF algorithms, that is, the face of the embodiment of the present application is compared with the three algorithms of EBGM, LGBP, and BSF. The accuracy of the certification is higher.
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should understand that the embodiments of the present application are not limited by the described action sequence, because In accordance with embodiments of the present application, certain steps may be performed in other sequences or concurrently. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required in the embodiments of the present application.
参照图9,示出了本申请的一种人脸模型的训练装置实施例的结构框图,具体可以包括如下模块:Referring to FIG. 9, a structural block diagram of an embodiment of a training apparatus for a face model of the present application is shown, which may specifically include the following modules:
训练样本获取模块901,用于获取训练样本,所述训练样本包括训练图像数据和证件图像数据;a training sample obtaining module 901, configured to acquire training samples, where the training samples include training image data and document image data;
样本人脸图像提取模块902,用于根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;The sample face image extraction module 902 is configured to obtain a training face image and a document face image according to the training image data and the document image data;
人脸模型训练模块903,用于采用所述训练人脸图像训练人脸特征模型;a face model training module 903, configured to train a face feature model by using the trained face image;
人脸模型调整模块904,用于采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face model adjustment module 904 is configured to adjust the face feature model by using the paired training face image and the document face image.
在本申请的一个实施例中,所述样本人脸图像提取模块902可以包括:In an embodiment of the present application, the sample face image extraction module 902 may include:
样本人脸检测子模块,用于在所述训练图像数据和所述证件图像数据中分别进行人脸检测,确定训练人脸图像和证件人脸图像;a sample face detection sub-module, configured to perform face detection on the training image data and the document image data respectively, and determine a training face image and a document face image;
样本人脸定位子模块,用于在所述训练人脸图像和所述证件人脸图像中 分别中进行人脸特征点定位,确定训练眼睛数据和证件眼睛数据;a sample face positioning sub-module for use in the training face image and the document face image Perform facial feature point positioning separately to determine training eye data and document eye data;
样本人脸对齐子模块,用于将所述训练眼睛数据的位置和所述证件眼睛数据的位置与预设模板位置进行对齐;a sample face alignment submodule, configured to align a position of the training eye data and a position of the document eye data with a preset template position;
训练人脸归一化子模块,用于对除所述训练眼睛数据之外的训练人脸图像,根据所述训练眼睛数据的位置关系进行相似变换,获得归一化后的训练人脸图像;Training a face normalization sub-module for performing a similar transformation on the training face image other than the training eye data according to the positional relationship of the training eye data to obtain a normalized training face image;
证件人脸归一化子模块,用于对除所述证件眼睛数据之外的证件人脸图像,根据所述证件眼睛数据的位置关系进行相似变换,获得归一化后的证件人脸图像。The document face normalization sub-module is configured to perform a similar transformation on the document face image other than the document eye data according to the positional relationship of the document eye data to obtain a normalized document face image.
在本申请的一个实施例中,所述人脸模型训练模块903包括:In an embodiment of the present application, the face model training module 903 includes:
识别训练子模块,用于采用所述训练人脸图像基于人脸识别对预置的人脸特征模型进行训练,以训练出所述人脸特征模型的模型参数的初始参数值。The training sub-module is configured to train the preset facial feature model based on the face recognition using the trained facial image to train an initial parameter value of the model parameter of the facial feature model.
在本申请的一个实施例中,所述人脸模型调整模块904包括:In an embodiment of the present application, the face model adjustment module 904 includes:
认证训练子模块,用于采用配对的训练人脸图像和证件人脸图像基于人脸认证对所述人脸特征模型进行训练,以将所述模型参数从初始参数值调整为目标参数值。The authentication training sub-module is configured to train the facial feature model based on face authentication by using the paired training face image and the document face image to adjust the model parameter from an initial parameter value to a target parameter value.
在本申请的一个实施例中,所述识别训练子模块包括:In an embodiment of the present application, the identifying the training submodule includes:
第一随机取样单元,用于随机提取训练人脸图像;a first random sampling unit, configured to randomly extract a training face image;
第一样本人脸特征提取单元,用于将随机提取的训练人脸图像输入预置的人脸特征模型中提取训练人脸特征;a first sample face feature extraction unit, configured to input a randomly extracted training face image into a preset face feature model to extract a trained face feature;
第一损失率计算单元,用于计算所述训练人脸特征用于人脸识别时的第一损失率;a first loss rate calculation unit, configured to calculate a first loss rate when the training face feature is used for face recognition;
第一收敛判断单元,用于判断所述第一损失率是否收敛;若是,则调用初始参数值设置单元,若否,则调用第一梯度计算模块;a first convergence determining unit, configured to determine whether the first loss rate converges; if yes, call an initial parameter value setting unit, and if not, invoke a first gradient calculating module;
初始参数值设置单元,用于以当前迭代的所述模型参数的参数值作为初始参数值; An initial parameter value setting unit, configured to use a parameter value of the model parameter of the current iteration as an initial parameter value;
第一梯度计算单元,用于采用所述第一损失率计算第一梯度;a first gradient calculating unit, configured to calculate a first gradient by using the first loss rate;
第一梯度下降子模块,用于采用所述第一梯度与预设的学习率对所述模型参数的参数值进行下降,返回调用所述第一随机取样子模块。The first gradient descent sub-module is configured to: use the first gradient and the preset learning rate to decrease a parameter value of the model parameter, and return to invoke the first random sampling sub-module.
在本申请的一个实施例中,所述第一损失率计算单元包括:In an embodiment of the present application, the first loss rate calculation unit includes:
概率计算子单元,用于计算所述训练人脸特征属于预设的用户标签的概率;a probability calculation subunit, configured to calculate a probability that the training face feature belongs to a preset user tag;
人脸识别损失率计算子单元,用于采用所述概率计算所述训练人脸特征的用于人脸识别时的第一损失率。A face recognition loss rate calculation subunit is configured to calculate a first loss rate for face recognition using the probability to calculate the training face feature.
在本申请的一个实施例中,所述认证训练子模块,包括:In an embodiment of the present application, the authentication training sub-module includes:
数据配对单元,用于将属于同一用户的训练人脸图像和证件人脸图像进行配对;a data matching unit, configured to pair the training face image and the document face image belonging to the same user;
第二随机取样单元,用于随机提取配对的训练人脸图像和证件人脸图像;a second random sampling unit, configured to randomly extract the paired training face image and the document face image;
第二样本人脸特征提取单元,用于将随机提取的、配对的训练人脸图像和证件人脸图像输入所述人脸特征模型中提取训练人脸特征和证件人脸特征;a second sample face feature extraction unit, configured to input a randomly extracted, paired training face image and a document face image into the face feature model to extract a training face feature and a document face feature;
第二损失率计算单元,用于计算所述训练人脸特征和证件人脸特征用于人脸认证时的损失率;a second loss rate calculation unit, configured to calculate a loss rate when the training face feature and the document face feature are used for face authentication;
第二收敛判断单元,用于判断所述第二损失率是否收敛;若是,则调用目标参数值设置单元,若否,则调用第二梯度计算单元;a second convergence determining unit, configured to determine whether the second loss rate converges; if yes, the target parameter value setting unit is called, and if not, the second gradient calculating unit is invoked;
目标参数值设置单元,用于以当前迭代的所述模型参数的参数值作为目标参数值;a target parameter value setting unit, configured to use a parameter value of the model parameter of the current iteration as a target parameter value;
第二梯度计算单元,用于采用所述第二损失率计算第二梯度;a second gradient calculating unit, configured to calculate a second gradient by using the second loss rate;
第二梯度下降子模块,用于采用所述第二梯度与预设的学习率对所述模型参数的参数值进行下降,返回调用所述第二随机取样子模块。And a second gradient descent sub-module, configured to decrease a parameter value of the model parameter by using the second gradient and a preset learning rate, and return to call the second random sampling sub-module.
在本申请的一个实施例中,所述第二损失率计算子模块包括: In an embodiment of the present application, the second loss rate calculation submodule includes:
距离计算单元,用于计算所述训练人脸特征和证件人脸特征之间的距离;a distance calculation unit, configured to calculate a distance between the training face feature and the document face feature;
第二认证损失率计算单元,用于采用所述距离计算所述训练人脸特征和证件人脸特征的用于人脸认证时的第二损失率。And a second authentication loss rate calculation unit, configured to calculate, by using the distance, the second loss rate for the face authentication of the training face feature and the document face feature.
在本申请的一个实施例中,还包括:In an embodiment of the present application, the method further includes:
人脸认证模型训练模块,用于采用配对的训练人脸图像和证件人脸图像,按照联合贝叶斯训练人脸认证模型。The face authentication model training module is used to train the face authentication model according to the joint Bayesian training face image and the document face image.
在本申请的一个实施例中,所述人脸特征模型可以为卷积神经网络模型,所述卷积神经网络模型可以包括一个或多个卷积层、一个或多个采样层,所述卷积神经网络的模型参数包括卷积核;In an embodiment of the present application, the face feature model may be a convolutional neural network model, and the convolutional neural network model may include one or more convolution layers, one or more sampling layers, and the volume The model parameters of the product neural network include a convolution kernel;
所述卷积神经网络模型可以包括:The convolutional neural network model can include:
浅层卷积模块,用于在所述卷积层属于第一深度范围时,采用指定的单个卷积核进行卷积操作;a shallow convolution module, configured to perform a convolution operation by using a specified single convolution kernel when the convolutional layer belongs to a first depth range;
深层卷积模块,用于在所述卷积层属于第二深度范围时,采用分层线性模型Inception进行卷积操作,其中,所述第二深度范围的层数大于所述第一深度范围的层数;a deep convolution module, configured to perform a convolution operation using a hierarchical linear model Inception when the convolutional layer belongs to a second depth range, wherein a number of layers of the second depth range is greater than the first depth range Number of layers
最大化下采样模块,用于在人所述采样层中,进行最大化下采样;Maximizing the downsampling module for maximizing downsampling in the sampling layer of the person;
特征获得模块,用于根据所述卷积神经网络模型输出的多个图像数据获得特征向量,作为人脸图像的人脸特征。And a feature obtaining module, configured to obtain a feature vector according to the plurality of image data output by the convolutional neural network model, as a face feature of the face image.
在本申请的一个实施例中,所述卷积神经网络模型还可以包括:In an embodiment of the present application, the convolutional neural network model may further include:
第一卷积辅助模块,用于在第一深度范围卷积完成之后,进行规范化操作和激活操作。The first convolution auxiliary module is configured to perform normalization operation and activation operation after the first depth range convolution is completed.
在本申请的一个实施例中,所述分层线性模型Inception包括第一层、第二层、第三层、第四层;In an embodiment of the present application, the hierarchical linear model Inception includes a first layer, a second layer, a third layer, and a fourth layer;
所述深层卷积模块可以包括:The deep convolution module can include:
第一卷积子模块,用于在第一层中,采用指定的第一卷积核与第一步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第一特征图 像数据;a first convolution sub-module, configured to perform a convolution operation on the image data input to the hierarchical linear model Inception by using a specified first convolution kernel and a first step length in the first layer to obtain a first feature map Like data;
第二卷积子模块,用于在第二层中,采用指定的第二卷积核与第二步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第二特征图像数据;a second convolution sub-module, configured to perform convolution operation on the image data input to the hierarchical linear model Inception by using the specified second convolution kernel and the second step in the second layer to obtain the second feature image data;
第三卷积子模块,用于采用指定的第三卷积核与第三步长对所述第二特征图像数据进行卷积操作,获得第三特征图像数据;a third convolution sub-module, configured to perform a convolution operation on the second feature image data by using a specified third convolution kernel and a third step size to obtain third feature image data;
第四卷积子模块,用于在第三层中,采用指定的第四卷积核与第四步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第四特征图像数据;a fourth convolution sub-module, configured to perform a convolution operation on the image data input to the hierarchical linear model Inception by using a specified fourth convolution kernel and a fourth step length in the third layer to obtain a fourth characteristic image data;
第五卷积子模块,用于采用指定的第五卷积核与第五步长对所述第四特征图像数据进行卷积操作,获得第五特征图像数据;a fifth convolution sub-module, configured to perform a convolution operation on the fourth feature image data by using a specified fifth convolution kernel and a fifth step to obtain fifth feature image data;
第六卷积子模块,用于在第四层中,采用指定的第六卷积核与第六步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第六特征图像数据;a sixth convolution sub-module, configured to perform a convolution operation on the image data input to the hierarchical linear model Inception by using a specified sixth convolution kernel and a sixth step length in the fourth layer to obtain a sixth characteristic image data;
采样子模块,用于对所述第六特征图像数据进行最大化下采样操作,获得第七特征图像数据;a sampling sub-module, configured to perform a maximum downsampling operation on the sixth feature image data to obtain seventh feature image data;
图像连接子模块,用于连接所述第一特征图像数据、所述第三特征图像数据、所述第五特征图像数据和所述第七特征图像数据,获得第八特征图像数据。And an image connection submodule, configured to connect the first feature image data, the third feature image data, the fifth feature image data, and the seventh feature image data to obtain eighth feature image data.
在本申请的一个实施例中,所述深层卷积模块还可以包括:In an embodiment of the present application, the deep convolution module may further include:
第二卷积辅助子模块,用于在第一层中,对所述第一特征图像数据进行规范化操作;a second convolution auxiliary submodule, configured to perform normalization operation on the first feature image data in the first layer;
第三卷积辅助子模块,用于在第二层中,对所述第二特征图像数据进行规范化操作和激活操作;a third convolution auxiliary submodule, configured to perform normalization operation and an activation operation on the second feature image data in the second layer;
第四卷积辅助子模块,用于对所述第三特征图像数据进行规范化操作;a fourth convolution auxiliary submodule, configured to perform normalization operation on the third feature image data;
第五卷积辅助子模块,用于在第三层中,对所述第四特征图像数据进行 规范化操作和激活操作;a fifth convolution auxiliary submodule, configured to perform the fourth feature image data in the third layer Normalized operations and activation operations;
第六卷积辅助子模块,用于对所述第五特征图像数据进行规范化操作;a sixth convolution auxiliary submodule, configured to perform normalization operation on the fifth feature image data;
第七卷积辅助子模块,用于在第四层中,对所述第六特征图像数据进行规范化操作;a seventh convolution auxiliary submodule, configured to perform normalization operation on the sixth feature image data in the fourth layer;
第八卷积辅助子模块,用于对所述第八特征图像数据激活操作。And an eighth convolution auxiliary submodule, configured to activate the eighth feature image data.
参照图10,示出了本申请的一种基于人脸模型的人脸认证装置实施例的结构框图,人脸模型包括人脸特征模型,该装置具体可以包括如下模块:Referring to FIG. 10, a block diagram of a face face device-based face authentication device according to the present application is shown. The face model includes a face feature model, and the device may specifically include the following modules:
目标图像数据模块1001,用于在接收到人脸认证的指令时,采集目标图像数据;The target image data module 1001 is configured to collect target image data when receiving an instruction of face authentication;
目标人脸图像提取模块1002,用于在所述目标图像数据中提取目标人脸图像;a target face image extraction module 1002, configured to extract a target face image in the target image data;
目标人脸特征提取模块1003,用于将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;The target facial feature extraction module 1003 is configured to input the target facial image into the pre-trained facial feature model to extract the target facial feature;
认证处理模块1004,用于根据所述目标人脸特征与指定的证件图像数据进行认证处理;The authentication processing module 1004 is configured to perform an authentication process according to the target facial feature and the specified document image data;
在一种实现方式中,所述人脸模型调用如下模块训练:In one implementation, the face model invokes the following module training:
训练样本获取模块,用于获取训练样本,所述训练样本包括训练图像数据和证件图像数据;a training sample obtaining module, configured to acquire a training sample, where the training sample includes training image data and document image data;
样本人脸图像提取模块,用于在所述训练图像数据和所述证件图像数据中提取训练人脸图像和证件人脸图像;a sample face image extraction module, configured to extract a training face image and a document face image in the training image data and the document image data;
人脸模型训练模块,用于采用所述训练人脸图像训练人脸特征模型;a face model training module, configured to train a face feature model by using the trained face image;
人脸模型调整模块,用于采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face model adjustment module is configured to adjust the face feature model by using the paired training face image and the document face image.
在本申请的一个实施例中,所述目标人脸图像提取模块1002可以包括: In an embodiment of the present application, the target face image extraction module 1002 may include:
目标人脸检测子模块,用于在所述目标图像数据中进行人脸检测,确定目标人脸图像;a target face detection sub-module, configured to perform face detection in the target image data to determine a target face image;
目标人脸定位子模块,用于在所述目标人脸图像中进行人脸特征点定位,确定目标眼睛数据;a target face positioning sub-module, configured to perform face feature point positioning in the target face image to determine target eye data;
目标人脸对齐子模块,用于将所述目标眼睛数据进行对齐;a target face alignment submodule for aligning the target eye data;
目标人脸归一化子模块,用于对除所述目标眼睛数据之外的目标人脸图像,根据所述目标眼睛数据的位置关系进行相似变换,获得归一化后的目标人脸图像。The target face normalization sub-module is configured to perform similar transformation on the target facial image other than the target eye data according to the positional relationship of the target eye data to obtain a normalized target facial image.
在本申请的一个实施例中,所述人脸模型还包括人脸认证模型,所述认证处理模块1004可以包括:In an embodiment of the present application, the face model further includes a face authentication model, and the authentication processing module 1004 may include:
证件人脸特征获取子模块,用于获取指定的证件图像数据中证件人脸图像的证件人脸特征;a document face feature acquisition sub-module, configured to obtain a document face feature of the document face image in the specified document image data;
相似度计算子模块,用于将所述目标人脸特征和所述证件人脸特征输入按照联合贝叶斯训练的人脸认证模型,获得相似度;a similarity calculation sub-module, configured to input the target facial feature and the document face feature according to a face authentication model of joint Bayesian training to obtain a similarity;
相似度阈值判断子模块,用于判断所述相似度是否大于或等于预设的相似度阈值;若是,则调用第一确定子模块,若否,则调用第二确定子模块;a similarity threshold determining sub-module, configured to determine whether the similarity is greater than or equal to a preset similarity threshold; if yes, calling the first determining sub-module; if not, calling the second determining sub-module;
第一确定子模块,用于确定所述目标人脸图像和所述证件人脸图像属于同一个人;a first determining submodule, configured to determine that the target face image and the document face image belong to the same person;
第二确定子模块,用于确定所述目标人脸图像和所述证件人脸图像不属于同一个人。And a second determining submodule, configured to determine that the target face image and the document face image do not belong to the same person.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
本申请实施例还提供了一种电子设备,如图11所示,包括处理器111、通信接口112、存储器113和通信总线114,其中,处理器111,通信接口112,存储器113通过通信总线114完成相互间的通信;存储器113,用于存放计算机程序; The embodiment of the present application further provides an electronic device, as shown in FIG. 11, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114. The processor 111, the communication interface 112, and the memory 113 pass through the communication bus 114. Completing communication with each other; a memory 113 for storing a computer program;
处理器111,用于执行存储器113上所存放的计算机程序时,实现本申请实施例所提供的任一人脸模型的训练方法,其中,该人脸模型的训练方法可以包括步骤:The processor 111 is configured to implement the training method of any face model provided by the embodiment of the present application, where the training method of the face model may include the following steps:
获取训练样本,所述训练样本包括训练图像数据和证件图像数据;Obtaining a training sample, the training sample including training image data and document image data;
根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;Obtaining a training face image and a document face image according to the training image data and the document image data;
采用所述训练人脸图像训练人脸特征模型;Training the facial feature model by using the trained face image;
采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face feature model is adjusted by using a paired training face image and a document face image.
应用本申请实施例,该电子设备的处理器运行存储器中存储的计算机程序,以执行本申请实施例所提供的任一人脸模型的训练方法,因此能够实现:解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较好的鲁棒性。Applying the embodiment of the present application, the processor of the electronic device runs the computer program stored in the memory to perform the training method of any face model provided by the embodiment of the present application, thereby achieving the problem of solving the problem of imbalance in the number of samples and improving The performance of the model improves the accuracy of face authentication. Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
本申请实施例还提供了一种计算机程序,所述计算机程序用于被运行以执行本申请实施例所提供的任一人脸模型的训练方法,其中,该人脸模型的训练方法可以包括步骤:The embodiment of the present application further provides a computer program for a training method that is executed to perform any of the face models provided by the embodiments of the present application, wherein the training method of the face model may include the following steps:
获取训练样本,所述训练样本包括训练图像数据和证件图像数据;Obtaining a training sample, the training sample including training image data and document image data;
根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;Obtaining a training face image and a document face image according to the training image data and the document image data;
采用所述训练人脸图像训练人脸特征模型;Training the facial feature model by using the trained face image;
采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face feature model is adjusted by using a paired training face image and a document face image.
应用本申请实施例,可计算机程序在运行时执行本申请实施例所提供的任一人脸模型的训练方法,因此能够实现:解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较 好的鲁棒性。Applying the embodiment of the present application, the computer program can execute the training method of any face model provided by the embodiment of the present application at runtime, so that the problem of unbalanced sample quantity can be solved, and the performance of the model is improved, thereby improving the person. The accuracy of face authentication. Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows the factors such as age, posture and illumination. Good robustness.
本申请实施例提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行本申请实施例所提供的任一人脸模型的训练方法,其中,该人脸模型的训练方法可以包括步骤:The embodiment of the present application provides a storage medium for storing a computer program, where the computer program is executed to perform a training method for any face model provided by the embodiment of the present application, wherein the face model The training method can include the steps of:
获取训练样本,所述训练样本包括训练图像数据和证件图像数据;Obtaining a training sample, the training sample including training image data and document image data;
根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;Obtaining a training face image and a document face image according to the training image data and the document image data;
采用所述训练人脸图像训练人脸特征模型;Training the facial feature model by using the trained face image;
采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face feature model is adjusted by using a paired training face image and a document face image.
应用本申请实施例,存储介质存储有在运行时执行本申请实施例所提供的任一人脸模型的训练方法的计算机程序,因此能够实现:解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较好的鲁棒性。Applying the embodiment of the present application, the storage medium stores a computer program that executes the training method of any of the face models provided by the embodiments of the present application at runtime, and thus can solve the problem of unbalanced sample quantity and improve the performance of the model. Thereby improving the accuracy of face authentication. Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
本申请实施例还提供了一种电子设备,如图12所示,包括处理器121、通信接口122、存储器123和通信总线124,其中,处理器121,通信接口122,存储器123通过通信总线124完成相互间的通信;存储器,用于存放计算机程序;The embodiment of the present application further provides an electronic device, as shown in FIG. 12, including a processor 121, a communication interface 122, a memory 123, and a communication bus 124. The processor 121, the communication interface 122, and the memory 123 pass through the communication bus 124. Completing communication with each other; a memory for storing computer programs;
处理器121,用于执行存储器123上所存放的计算机程序时,实现本申请实施例所提供的任一基于人脸模型的人脸认证方法,其中,该基于人脸模型的人脸认证方法可以包括步骤:The processor 121 is configured to implement the face authentication method based on the face model provided by the embodiment of the present application when the computer program stored in the memory 123 is executed, wherein the face authentication method based on the face model can be Including steps:
当接收到人脸认证的指令时,采集目标图像数据;Collecting target image data when receiving an instruction for face authentication;
在所述目标图像数据中提取目标人脸图像;Extracting a target face image in the target image data;
将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;Extracting the target face image into a pre-trained face feature model to extract a target face feature;
根据所述目标人脸特征与指定的证件图像数据进行认证处理。The authentication process is performed according to the target face feature and the specified document image data.
应用本申请实施例,该电子设备的处理器运行存储器中存储的计算机程 序,以执行本申请实施例所提供的任一基于人脸模型的人脸认证方法,因此能够实现:解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较好的鲁棒性。Applying the embodiment of the present application, the processor of the electronic device runs the computer program stored in the memory In order to implement the face authentication method based on the face model provided by the embodiment of the present application, it is possible to solve the problem of unbalanced sample quantity and improve the performance of the model, thereby improving the accuracy of face authentication. . Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
本申请实施例还提供了一种计算机程序,所述计算机程序用于被运行以执行本申请实施例所提供的任一基于人脸模型的人脸认证方法,其中,该基于人脸模型的人脸认证方法可以包括步骤:The embodiment of the present application further provides a computer program for executing a face authentication method based on a face model provided by an embodiment of the present application, wherein the face model based person The face authentication method may include the steps of:
当接收到人脸认证的指令时,采集目标图像数据;Collecting target image data when receiving an instruction for face authentication;
在所述目标图像数据中提取目标人脸图像;Extracting a target face image in the target image data;
将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;Extracting the target face image into a pre-trained face feature model to extract a target face feature;
根据所述目标人脸特征与指定的证件图像数据进行认证处理。The authentication process is performed according to the target face feature and the specified document image data.
应用本申请实施例,可计算机程序在运行时执行本申请实施例所提供的任一基于人脸模型的人脸认证方法,因此能够实现:解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较好的鲁棒性。Applying the embodiment of the present application, the computer program can execute any face authentication method based on the face model provided by the embodiment of the present application at runtime, so that the problem of unbalanced sample quantity can be solved, and the performance of the model is improved. Thereby improving the accuracy of face authentication. Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
本申请实施例提供了一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行本申请实施例所提供的任一基于人脸模型的人脸认证方法,其中,该基于人脸模型的人脸认证方法可以包括步骤:The embodiment of the present application provides a storage medium, where the storage medium is used to execute a computer face program, and the computer program is executed to execute any face recognition method based on the face model provided by the embodiment of the present application, where The face authentication method based on the face model may include the steps of:
当接收到人脸认证的指令时,采集目标图像数据;Collecting target image data when receiving an instruction for face authentication;
在所述目标图像数据中提取目标人脸图像;Extracting a target face image in the target image data;
将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;Extracting the target face image into a pre-trained face feature model to extract a target face feature;
根据所述目标人脸特征与指定的证件图像数据进行认证处理。The authentication process is performed according to the target face feature and the specified document image data.
应用本申请实施例,存储介质存储有在运行时执行本申请实施例所提供的任一基于人脸模型的人脸认证方法的计算机程序,因此能够实现:解决样本数量不平衡的问题,提高了模型的性能,从而提高了人脸认证的准确率。 并且,对人脸进行特征表达,不依赖于人工对特征的选择,并且对年龄,姿态和光照等因素表现出较好的鲁棒性。Applying the embodiment of the present application, the storage medium stores a computer program for executing the face authentication method based on the face model provided by the embodiment of the present application at the time of running, thereby implementing the problem of solving the problem of imbalance in the number of samples and improving the problem. The performance of the model, which improves the accuracy of face authentication. Moreover, the feature expression of the face does not depend on the artificial selection of features, and shows good robustness to factors such as age, posture and illumination.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in the present specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments can be referred to each other.
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the embodiments of the present application can be provided as a method, apparatus, or computer program product. Therefore, the embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, embodiments of the present application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device such that a series of operational steps are performed on the computer or other programmable terminal device to produce computer-implemented processing, such that the computer or other programmable terminal device The instructions executed above provide steps for implementing the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。While a preferred embodiment of the embodiments of the present application has been described, those skilled in the art can make further changes and modifications to the embodiments once they are aware of the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including all the modifications and the modifications
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities. There is any such actual relationship or order between operations. Furthermore, the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, or terminal device that includes a plurality of elements includes not only those elements but also Other elements that are included, or include elements inherent to such a process, method, article, or terminal device. An element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that comprises the element, without further limitation.
以上对本申请所提供的一种人脸模型的训练方法、一种基于人脸模型的人脸认证方法、一种人脸模型的训练装置和一种基于人脸模型的人脸认证装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The above is a training method for a face model provided by the present application, a face authentication method based on a face model, a training device for a face model, and a face authentication device based on a face model. DETAILED DESCRIPTION OF THE INVENTION The principles and embodiments of the present application have been described with reference to specific examples. The description of the above embodiments is only for helping to understand the method of the present application and its core ideas. Meanwhile, for those skilled in the art, In view of the idea of the present application, there are variations in the specific embodiments and the scope of application, and the contents of the present specification should not be construed as limiting the present application.

Claims (20)

  1. 一种人脸模型的训练方法,其特征在于,包括:A training method for a face model, comprising:
    获取训练样本,所述训练样本包括训练图像数据和证件图像数据;Obtaining a training sample, the training sample including training image data and document image data;
    根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;Obtaining a training face image and a document face image according to the training image data and the document image data;
    采用所述训练人脸图像训练人脸特征模型;Training the facial feature model by using the trained face image;
    采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face feature model is adjusted by using a paired training face image and a document face image.
  2. 根据权利要求1所述的方法,其特征在于,所述采用所述训练人脸图像训练人脸特征模型的步骤包括:The method according to claim 1, wherein the step of training the facial feature model using the trained face image comprises:
    采用所述训练人脸图像基于人脸识别对预置的人脸特征模型进行训练,以训练出所述人脸特征模型的模型参数的初始参数值。The preset face feature model is trained based on face recognition using the trained face image to train an initial parameter value of the model parameter of the face feature model.
  3. 根据权利要求2所述的方法,其特征在于,所述采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整的步骤包括:The method according to claim 2, wherein the step of adjusting the face feature model by using the paired training face image and the document face image comprises:
    采用配对的训练人脸图像和证件人脸图像基于人脸认证对所述人脸特征模型进行训练,以将所述模型参数从初始参数值调整为目标参数值。The face feature model is trained based on face authentication using the paired training face image and the document face image to adjust the model parameter from the initial parameter value to the target parameter value.
  4. 根据权利要求2所述的方法,其特征在于,所述采用所述训练人脸图像基于人脸识别对所述人脸特征模型进行训练,以训练出所述人脸特征模型的模型参数的初始参数值训练人脸图像的步骤包括:The method according to claim 2, wherein the training the face feature model based on face recognition using the trained face image to train an initial model parameter of the face feature model The parameter values for training the face image include:
    随机提取训练人脸图像;Randomly extract training face images;
    将随机提取的训练人脸图像输入预置的人脸特征模型中提取训练人脸特征;Extracting the trained face image into the preset face feature model to extract the trained face feature;
    计算所述训练人脸特征用于人脸识别时的第一损失率;Calculating a first loss rate when the training face feature is used for face recognition;
    判断所述第一损失率是否收敛;Determining whether the first loss rate converges;
    若是,则以当前迭代的所述模型参数的参数值作为初始参数值; If yes, the parameter value of the model parameter of the current iteration is used as the initial parameter value;
    若否,则采用所述第一损失率计算第一梯度;采用所述第一梯度与预设的学习率对所述模型参数的参数值进行下降,返回执行所述随机提取训练人脸图像的步骤。If not, calculating the first gradient by using the first loss rate; using the first gradient and the preset learning rate to decrease the parameter value of the model parameter, and returning to performing the random extraction training face image step.
  5. 根据权利要求4所述的方法,其特征在于,所述计算所述训练人脸特征用于人脸识别时的第一损失率的步骤包括:The method according to claim 4, wherein the step of calculating the first loss rate when the training face feature is used for face recognition comprises:
    计算所述训练人脸特征属于预设的用户标签的概率;Calculating a probability that the training face feature belongs to a preset user tag;
    采用所述概率计算所述训练人脸特征的用于人脸识别时的第一损失率。The first loss rate for face recognition of the trained face feature is calculated using the probability.
  6. 根据权利要求3所述的方法,其特征在于,所述采用所述配对的训练人脸图像和证件人脸图像基于人脸认证对所述人脸特征模型进行训练,以将所述模型参数从初始参数值调整为目标参数值的步骤包括:The method according to claim 3, wherein said training of the face image and the document face image using the pairing are performed based on face authentication to train the face feature model to The steps of adjusting the initial parameter values to the target parameter values include:
    将属于同一用户的训练人脸图像和证件人脸图像进行配对;Pairing training face images and document face images belonging to the same user;
    随机提取配对的训练人脸图像和证件人脸图像;Randomly extracting paired training face images and document face images;
    将随机提取的、配对的训练人脸图像和证件人脸图像输入所述人脸特征模型中提取训练人脸特征和证件人脸特征;Importing the randomly extracted, paired training face image and the document face image into the face feature model to extract the training face feature and the document face feature;
    计算所述训练人脸特征和证件人脸特征用于人脸认证时的第二损失率;Calculating a second loss rate when the training face feature and the document face feature are used for face authentication;
    判断所述第二损失率是否收敛;Determining whether the second loss rate converges;
    若是,则以当前迭代的所述模型参数的参数值作为目标参数值;If yes, the parameter value of the model parameter of the current iteration is taken as the target parameter value;
    若否,则采用所述第二损失率计算第二梯度;If not, calculating the second gradient by using the second loss rate;
    采用所述第二梯度与预设的学习率对所述模型参数的参数值进行下降,返回执行所述随机提取配对的训练人脸图像和证件人脸图像的步骤。And decreasing the parameter value of the model parameter by using the second gradient and the preset learning rate, and returning to the step of performing the random extraction pairing of the training face image and the document face image.
  7. 根据权利要求6所述的方法,其特征在于,所述计算所述训练人脸特征和证件人脸特征用于人脸认证时的第二损失率的步骤包括:The method according to claim 6, wherein the step of calculating the second loss rate when the training face feature and the document face feature are used for face authentication comprises:
    计算所述训练人脸特征和证件人脸特征之间的距离;Calculating a distance between the training face feature and the document face feature;
    采用所述距离计算所述训练人脸特征和证件人脸特征的用于人脸认证时的第二损失率。 The second loss rate for face authentication of the training face feature and the document face feature is calculated using the distance.
  8. 根据权利要求1-6任一项所述的方法,其特征在于,还包括:The method of any of claims 1-6, further comprising:
    采用配对的训练人脸图像和证件人脸图像,按照联合贝叶斯训练人脸认证模型。The paired training face image and the document face image are used to train the face authentication model according to the joint Bayesian.
  9. 根据权利要求1-6任一项所述的方法,其特征在于,所述人脸特征模型为卷积神经网络模型,所述卷积神经网络模型包括一个或多个卷积层、一个或多个采样层,所述卷积神经网络的模型参数包括卷积核;The method according to any one of claims 1 to 6, wherein the face feature model is a convolutional neural network model, the convolutional neural network model comprising one or more convolution layers, one or more a sampling layer, the model parameters of the convolutional neural network including a convolution kernel;
    所述卷积神经网络模型对输入的人脸图像的处理如下:The convolutional neural network model processes the input face image as follows:
    当所述卷积层属于第一深度范围时,采用指定的单个卷积核进行卷积操作;When the convolutional layer belongs to the first depth range, the convolution operation is performed using the specified single convolution kernel;
    当所述卷积层属于第二深度范围时,采用分层线性模型Inception进行卷积操作,其中,所述第二深度范围的层数大于所述第一深度范围的层数;When the convolutional layer belongs to the second depth range, the convolution operation is performed by using a hierarchical linear model Inception, wherein the number of layers of the second depth range is greater than the number of layers of the first depth range;
    在所述采样层中,进行最大化下采样;In the sampling layer, performing maximum downsampling;
    根据所述卷积神经网络模型输出的多个图像数据获得特征向量,作为人脸图像的人脸特征。A feature vector is obtained from the plurality of image data output from the convolutional neural network model as a face feature of the face image.
  10. 根据权利要求9所述的方法,其特征在于,所述分层线性模型Inception包括第一层、第二层、第三层、第四层;The method according to claim 9, wherein the hierarchical linear model Inception comprises a first layer, a second layer, a third layer, and a fourth layer;
    所述采用分层线性模型Inception进行卷积操作的步骤包括:The steps of performing a convolution operation using a hierarchical linear model Inception include:
    在第一层中,采用指定的第一卷积核与第一步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第一特征图像数据;In the first layer, performing convolution operation on the image data input to the hierarchical linear model Inception by using the specified first convolution kernel and the first step length to obtain first feature image data;
    在第二层中,采用指定的第二卷积核与第二步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第二特征图像数据;采用指定的第三卷积核与第三步长对所述第二特征图像数据进行卷积操作,获得第三特征图像数据;In the second layer, convoluting the image data input to the hierarchical linear model Inception with a specified second convolution kernel and a second step to obtain second feature image data; using the specified third convolution Performing a convolution operation on the second feature image data by the core and the third step to obtain third feature image data;
    在第三层中,采用指定的第四卷积核与第四步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第四特征图像数据;采用指定的第五卷积核与第五步长对所述第四特征图像数据进行卷积操作,获得第五特征 图像数据;In the third layer, the image data input to the hierarchical linear model Inception is convoluted by using the specified fourth convolution kernel and the fourth step to obtain the fourth feature image data; and the specified fifth convolution is adopted. Performing a convolution operation on the fourth feature image data by the kernel and the fifth step to obtain the fifth feature Image data
    在第四层中,采用指定的第六卷积核与第六步长对输入所述分层线性模型Inception的图像数据进行卷积操作,获得第六特征图像数据;In the fourth layer, performing convolution operation on the image data input to the hierarchical linear model Inception by using the specified sixth convolution kernel and the sixth step to obtain the sixth feature image data;
    对所述第六特征图像数据进行最大化下采样操作,获得第七特征图像数据;Performing a maximum downsampling operation on the sixth feature image data to obtain seventh feature image data;
    连接所述第一特征图像数据、所述第三特征图像数据、所述第五特征图像数据和所述第七特征图像数据,获得第八特征图像数据。The first feature image data, the third feature image data, the fifth feature image data, and the seventh feature image data are connected to obtain eighth feature image data.
  11. 一种基于人脸模型的人脸认证方法,其特征在于,所述人脸模型为如权利要求1-10任一项所述的训练方法得到的人脸模型,所述人脸模型包括人脸特征模型,所述人脸认证方法包括:A face authentication method based on a face model, wherein the face model is a face model obtained by the training method according to any one of claims 1 to 10, wherein the face model includes a face a feature model, the face authentication method includes:
    当接收到人脸认证的指令时,采集目标图像数据;Collecting target image data when receiving an instruction for face authentication;
    在所述目标图像数据中提取目标人脸图像;Extracting a target face image in the target image data;
    将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;Extracting the target face image into a pre-trained face feature model to extract a target face feature;
    根据所述目标人脸特征与指定的证件图像数据进行认证处理。The authentication process is performed according to the target face feature and the specified document image data.
  12. 根据权利要求11所述的方法,其特征在于,所述人脸模型还包括人脸认证模型,所述根据所述目标人脸特征与指定的证件图像数据进行认证处理的步骤包括:The method according to claim 11, wherein the face model further comprises a face authentication model, and the step of performing authentication processing according to the target face feature and the specified document image data comprises:
    获取指定的证件图像数据中证件人脸图像的证件人脸特征;Obtaining a document face feature of the document face image in the specified document image data;
    将所述目标人脸特征和所述证件人脸特征输入按照联合贝叶斯训练的人脸认证模型,获得相似度;And inputting the target facial feature and the document face feature according to a face authentication model of joint Bayesian training to obtain a similarity;
    判断所述相似度是否大于或等于预设的相似度阈值;Determining whether the similarity is greater than or equal to a preset similarity threshold;
    若是,则确定所述目标人脸图像和所述证件人脸图像属于同一个人;If yes, determining that the target face image and the document face image belong to the same person;
    若否,则确定所述目标人脸图像和所述证件人脸图像不属于同一个人。 If not, it is determined that the target face image and the document face image do not belong to the same person.
  13. 一种人脸模型的训练装置,其特征在于,包括:A training device for a face model, comprising:
    训练样本获取模块,用于获取训练样本,所述训练样本包括训练图像数据和证件图像数据;a training sample obtaining module, configured to acquire a training sample, where the training sample includes training image data and document image data;
    样本人脸图像提取模块,用于根据所述训练图像数据和所述证件图像数据获得训练人脸图像和证件人脸图像;a sample face image extraction module, configured to obtain a training face image and a document face image according to the training image data and the document image data;
    人脸模型训练模块,用于采用所述训练人脸图像训练人脸特征模型;a face model training module, configured to train a face feature model by using the trained face image;
    人脸模型调整模块,用于采用配对的训练人脸图像和证件人脸图像,对所述人脸特征模型进行调整。The face model adjustment module is configured to adjust the face feature model by using the paired training face image and the document face image.
  14. 一种基于人脸模型的人脸认证装置,其特征在于,所述人脸模型为如权利要求13所述的训练装置得到的人脸模型,所述人脸模型包括人脸特征模型,所述人脸认证装置包括:A face authentication device based on a face model, wherein the face model is a face model obtained by the training device according to claim 13, the face model includes a face feature model, The face authentication device includes:
    目标图像数据模块,用于在接收到人脸认证的指令时,采集目标图像数据;a target image data module, configured to collect target image data when receiving an instruction for face authentication;
    目标人脸图像提取模块,用于在所述目标图像数据中提取目标人脸图像;a target face image extraction module, configured to extract a target face image in the target image data;
    目标人脸特征提取模块,用于将所述目标人脸图像输入预先训练的人脸特征模型中提取目标人脸特征;a target facial feature extraction module, configured to input the target facial image into a pre-trained facial feature model to extract a target facial feature;
    认证处理模块,用于根据所述目标人脸特征与指定的证件图像数据进行认证处理。The authentication processing module is configured to perform an authentication process according to the target facial feature and the specified document image data.
  15. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;An electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
    存储器,用于存放计算机程序;a memory for storing a computer program;
    处理器,用于执行存储器上所存放的计算机程序时,实现权利要求1-10任一项所述的人脸模型的训练方法。A training method for implementing the face model according to any one of claims 1 to 10 when the processor is configured to execute a computer program stored on the memory.
  16. 一种计算机程序,其特征在于,所述计算机程序用于被运行以执行权利要求1-10任一项所述的人脸模型的训练方法。 A computer program for use in a training method executed to perform the face model of any of claims 1-10.
  17. 一种存储介质,其特征在于,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行权利要求1-10任一项所述的人脸模型的训练方法。A storage medium, characterized in that the storage medium is for storing a computer program, the computer program being executed to perform the training method of the face model according to any one of claims 1-10.
  18. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;An electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
    存储器,用于存放计算机程序;a memory for storing a computer program;
    处理器,用于执行存储器上所存放的计算机程序时,实现权利要求11或12所述的基于人脸模型的人脸认证方法。The face recognition method based on the face model according to claim 11 or 12 is implemented when the processor is configured to execute a computer program stored on the memory.
  19. 一种计算机程序,其特征在于,所述计算机程序用于被运行以执行权利要求11或12所述的基于人脸模型的人脸认证方法。A computer program, characterized in that the computer program is used to execute a face model based face authentication method according to claim 11 or 12.
  20. 一种存储介质,其特征在于,所述存储介质用于存储计算机程序,所述计算机程序被运行以执行权利要求11或12所述的基于人脸模型的人脸认证方法。 A storage medium, characterized in that the storage medium is for storing a computer program, the computer program being executed to execute the face model based face authentication method according to claim 11 or 12.
PCT/CN2017/102255 2016-09-23 2017-09-19 Face model training method and device, and face authentication method and device WO2018054283A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610848965.5A CN107871100B (en) 2016-09-23 2016-09-23 Training method and device of face model, and face authentication method and device
CN201610848965.5 2016-09-23

Publications (1)

Publication Number Publication Date
WO2018054283A1 true WO2018054283A1 (en) 2018-03-29

Family

ID=61689348

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/102255 WO2018054283A1 (en) 2016-09-23 2017-09-19 Face model training method and device, and face authentication method and device

Country Status (2)

Country Link
CN (1) CN107871100B (en)
WO (1) WO2018054283A1 (en)

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108846340A (en) * 2018-06-05 2018-11-20 腾讯科技(深圳)有限公司 Face identification method, device and disaggregated model training method, device, storage medium and computer equipment
CN108921782A (en) * 2018-05-17 2018-11-30 腾讯科技(深圳)有限公司 A kind of image processing method, device and storage medium
CN109034078A (en) * 2018-08-01 2018-12-18 腾讯科技(深圳)有限公司 Training method, age recognition methods and the relevant device of age identification model
CN109389551A (en) * 2018-10-08 2019-02-26 清华大学 Neutral expression's forward direction face picture method and device
CN109543526A (en) * 2018-10-19 2019-03-29 谢飞 True and false facial paralysis identifying system based on depth difference opposite sex feature
CN109766764A (en) * 2018-12-17 2019-05-17 平安普惠企业管理有限公司 Facial recognition data processing method, device, computer equipment and storage medium
CN110059652A (en) * 2019-04-24 2019-07-26 腾讯科技(深圳)有限公司 Face image processing process, device and storage medium
CN110110611A (en) * 2019-04-16 2019-08-09 深圳壹账通智能科技有限公司 Portrait attribute model construction method, device, computer equipment and storage medium
CN110232722A (en) * 2019-06-13 2019-09-13 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN110353693A (en) * 2019-07-09 2019-10-22 中国石油大学(华东) A kind of hand-written Letter Identification Method and system based on WiFi
CN110929569A (en) * 2019-10-18 2020-03-27 平安科技(深圳)有限公司 Face recognition method, device, equipment and storage medium
CN110956615A (en) * 2019-11-15 2020-04-03 北京金山云网络技术有限公司 Image quality evaluation model training method and device, electronic equipment and storage medium
CN111062362A (en) * 2019-12-27 2020-04-24 上海闻泰信息技术有限公司 Face living body detection model, method, device, equipment and storage medium
CN111091089A (en) * 2019-12-12 2020-05-01 新华三大数据技术有限公司 Face image processing method and device, electronic equipment and storage medium
CN111104988A (en) * 2019-12-28 2020-05-05 Oppo广东移动通信有限公司 Image recognition method and related device
CN111259698A (en) * 2018-11-30 2020-06-09 百度在线网络技术(北京)有限公司 Method and device for acquiring image
CN111291765A (en) * 2018-12-07 2020-06-16 北京京东尚科信息技术有限公司 Method and device for determining similar pictures
CN111353943A (en) * 2018-12-20 2020-06-30 杭州海康威视数字技术股份有限公司 Face image recovery method and device and readable storage medium
CN111488857A (en) * 2020-04-29 2020-08-04 北京华捷艾米科技有限公司 Three-dimensional face recognition model training method and device
CN111539246A (en) * 2020-03-10 2020-08-14 西安电子科技大学 Cross-spectrum face recognition method and device, electronic equipment and storage medium thereof
CN111783607A (en) * 2020-06-24 2020-10-16 北京百度网讯科技有限公司 Training method and device of face recognition model, electronic equipment and storage medium
CN111814553A (en) * 2020-06-08 2020-10-23 浙江大华技术股份有限公司 Face detection method, model training method and related device
CN111914658A (en) * 2020-07-06 2020-11-10 浙江大华技术股份有限公司 Pedestrian identification method, device, equipment and medium
CN111914908A (en) * 2020-07-14 2020-11-10 浙江大华技术股份有限公司 Image recognition model training method, image recognition method and related equipment
CN112001204A (en) * 2019-05-27 2020-11-27 北京君正集成电路股份有限公司 Training method of network model for secondary face detection
CN112183213A (en) * 2019-09-02 2021-01-05 沈阳理工大学 Facial expression recognition method based on Intra-Class Gap GAN
CN112861079A (en) * 2021-03-26 2021-05-28 中国科学技术大学 Normalization method with certificate identification function
CN112989869A (en) * 2019-12-02 2021-06-18 深圳云天励飞技术有限公司 Optimization method, device and equipment of face quality detection model and storage medium
CN113496174A (en) * 2020-04-07 2021-10-12 北京君正集成电路股份有限公司 Method for improving recall rate and accuracy rate of three-level cascade detection
CN113569789A (en) * 2019-07-30 2021-10-29 北京市商汤科技开发有限公司 Image processing method and device, processor, electronic device and storage medium
CN113642415A (en) * 2021-07-19 2021-11-12 南京南瑞信息通信科技有限公司 Face feature expression method and face recognition method
CN113808062A (en) * 2019-04-28 2021-12-17 深圳市商汤科技有限公司 Image processing method and device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805048B (en) * 2018-05-25 2020-01-31 腾讯科技(深圳)有限公司 face recognition model adjusting method, device and storage medium
CN110554780A (en) * 2018-05-30 2019-12-10 北京搜狗科技发展有限公司 sliding input method and device
CN112912887A (en) * 2018-11-08 2021-06-04 北京比特大陆科技有限公司 Processing method, device and equipment based on face recognition and readable storage medium
CN111860077A (en) * 2019-04-30 2020-10-30 北京眼神智能科技有限公司 Face detection method, face detection device, computer-readable storage medium and equipment
CN111783505A (en) * 2019-05-10 2020-10-16 北京京东尚科信息技术有限公司 Method and device for identifying forged faces and computer-readable storage medium
CN110110811A (en) * 2019-05-17 2019-08-09 北京字节跳动网络技术有限公司 Method and apparatus for training pattern, the method and apparatus for predictive information
CN111325107B (en) * 2020-01-22 2023-05-23 广州虎牙科技有限公司 Detection model training method, device, electronic equipment and readable storage medium
CN112651372B (en) * 2020-12-31 2024-08-02 北京眼神智能科技有限公司 Age judgment method and device based on face image, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751140A (en) * 2015-03-30 2015-07-01 常州大学 Three-dimensional face recognition algorithm based on deep learning SDAE theory and application thereof in field of finance
CN104751143A (en) * 2015-04-02 2015-07-01 北京中盾安全技术开发公司 Person and credential verification system and method based on deep learning
CN105447532A (en) * 2015-03-24 2016-03-30 北京天诚盛业科技有限公司 Identity authentication method and device
CN105701482A (en) * 2016-02-29 2016-06-22 公安部第研究所 Face recognition algorithm configuration based on unbalance tag information fusion

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8379940B2 (en) * 2009-06-02 2013-02-19 George Mason Intellectual Properties, Inc. Robust human authentication using holistic anthropometric and appearance-based features and boosting
CN102163285A (en) * 2011-03-09 2011-08-24 北京航空航天大学 Cross-domain video semantic concept detection method based on active learning
CN103679158B (en) * 2013-12-31 2017-06-16 北京天诚盛业科技有限公司 Face authentication method and device
US9400918B2 (en) * 2014-05-29 2016-07-26 Beijing Kuangshi Technology Co., Ltd. Compact face representation
CN105069400B (en) * 2015-07-16 2018-05-25 北京工业大学 Facial image gender identifying system based on the sparse own coding of stack
CN105138968A (en) * 2015-08-05 2015-12-09 北京天诚盛业科技有限公司 Face authentication method and device
CN105138972B (en) * 2015-08-11 2020-05-19 北京眼神智能科技有限公司 Face authentication method and device
CN105426917A (en) * 2015-11-23 2016-03-23 广州视源电子科技股份有限公司 Element classification method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447532A (en) * 2015-03-24 2016-03-30 北京天诚盛业科技有限公司 Identity authentication method and device
CN104751140A (en) * 2015-03-30 2015-07-01 常州大学 Three-dimensional face recognition algorithm based on deep learning SDAE theory and application thereof in field of finance
CN104751143A (en) * 2015-04-02 2015-07-01 北京中盾安全技术开发公司 Person and credential verification system and method based on deep learning
CN105701482A (en) * 2016-02-29 2016-06-22 公安部第研究所 Face recognition algorithm configuration based on unbalance tag information fusion

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SUN, YI ET AL.: "Hybrid Deep Learning for Face Verification", COMPUTER VISION (ICCV 2013), 3 March 2014 (2014-03-03), pages 1489 - 1496, XP055398089 *

Cited By (54)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108921782A (en) * 2018-05-17 2018-11-30 腾讯科技(深圳)有限公司 A kind of image processing method, device and storage medium
CN108921782B (en) * 2018-05-17 2023-04-14 腾讯科技(深圳)有限公司 Image processing method, device and storage medium
CN108846340B (en) * 2018-06-05 2023-07-25 腾讯科技(深圳)有限公司 Face recognition method and device, classification model training method and device, storage medium and computer equipment
CN108846340A (en) * 2018-06-05 2018-11-20 腾讯科技(深圳)有限公司 Face identification method, device and disaggregated model training method, device, storage medium and computer equipment
CN109034078A (en) * 2018-08-01 2018-12-18 腾讯科技(深圳)有限公司 Training method, age recognition methods and the relevant device of age identification model
CN109389551B (en) * 2018-10-08 2023-04-07 清华大学 Neutral expression forward face picture method and device
CN109389551A (en) * 2018-10-08 2019-02-26 清华大学 Neutral expression's forward direction face picture method and device
CN109543526A (en) * 2018-10-19 2019-03-29 谢飞 True and false facial paralysis identifying system based on depth difference opposite sex feature
CN111259698A (en) * 2018-11-30 2020-06-09 百度在线网络技术(北京)有限公司 Method and device for acquiring image
CN111259698B (en) * 2018-11-30 2023-10-13 百度在线网络技术(北京)有限公司 Method and device for acquiring image
CN111291765A (en) * 2018-12-07 2020-06-16 北京京东尚科信息技术有限公司 Method and device for determining similar pictures
CN109766764A (en) * 2018-12-17 2019-05-17 平安普惠企业管理有限公司 Facial recognition data processing method, device, computer equipment and storage medium
CN111353943A (en) * 2018-12-20 2020-06-30 杭州海康威视数字技术股份有限公司 Face image recovery method and device and readable storage medium
CN111353943B (en) * 2018-12-20 2023-12-26 杭州海康威视数字技术股份有限公司 Face image recovery method and device and readable storage medium
CN110110611A (en) * 2019-04-16 2019-08-09 深圳壹账通智能科技有限公司 Portrait attribute model construction method, device, computer equipment and storage medium
CN110059652A (en) * 2019-04-24 2019-07-26 腾讯科技(深圳)有限公司 Face image processing process, device and storage medium
CN110059652B (en) * 2019-04-24 2023-07-25 腾讯科技(深圳)有限公司 Face image processing method, device and storage medium
CN113808062A (en) * 2019-04-28 2021-12-17 深圳市商汤科技有限公司 Image processing method and device
CN112001204A (en) * 2019-05-27 2020-11-27 北京君正集成电路股份有限公司 Training method of network model for secondary face detection
CN112001204B (en) * 2019-05-27 2024-04-02 北京君正集成电路股份有限公司 Training method of network model for secondary face detection
CN110232722B (en) * 2019-06-13 2023-08-04 腾讯科技(深圳)有限公司 Image processing method and device
CN110232722A (en) * 2019-06-13 2019-09-13 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN110353693A (en) * 2019-07-09 2019-10-22 中国石油大学(华东) A kind of hand-written Letter Identification Method and system based on WiFi
CN113569789B (en) * 2019-07-30 2024-04-16 北京市商汤科技开发有限公司 Image processing method and device, processor, electronic equipment and storage medium
CN113569789A (en) * 2019-07-30 2021-10-29 北京市商汤科技开发有限公司 Image processing method and device, processor, electronic device and storage medium
CN112183213B (en) * 2019-09-02 2024-02-02 沈阳理工大学 Facial expression recognition method based on Intril-Class Gap GAN
CN112183213A (en) * 2019-09-02 2021-01-05 沈阳理工大学 Facial expression recognition method based on Intra-Class Gap GAN
CN110929569B (en) * 2019-10-18 2023-10-31 平安科技(深圳)有限公司 Face recognition method, device, equipment and storage medium
CN110929569A (en) * 2019-10-18 2020-03-27 平安科技(深圳)有限公司 Face recognition method, device, equipment and storage medium
CN110956615A (en) * 2019-11-15 2020-04-03 北京金山云网络技术有限公司 Image quality evaluation model training method and device, electronic equipment and storage medium
CN110956615B (en) * 2019-11-15 2023-04-07 北京金山云网络技术有限公司 Image quality evaluation model training method and device, electronic equipment and storage medium
CN112989869A (en) * 2019-12-02 2021-06-18 深圳云天励飞技术有限公司 Optimization method, device and equipment of face quality detection model and storage medium
CN112989869B (en) * 2019-12-02 2024-05-07 深圳云天励飞技术有限公司 Optimization method, device, equipment and storage medium of face quality detection model
CN111091089A (en) * 2019-12-12 2020-05-01 新华三大数据技术有限公司 Face image processing method and device, electronic equipment and storage medium
CN111091089B (en) * 2019-12-12 2022-07-29 新华三大数据技术有限公司 Face image processing method and device, electronic equipment and storage medium
CN111062362A (en) * 2019-12-27 2020-04-24 上海闻泰信息技术有限公司 Face living body detection model, method, device, equipment and storage medium
CN111062362B (en) * 2019-12-27 2023-10-10 上海闻泰信息技术有限公司 Face living body detection model, method, device, equipment and storage medium
CN111104988B (en) * 2019-12-28 2023-09-29 Oppo广东移动通信有限公司 Image recognition method and related device
CN111104988A (en) * 2019-12-28 2020-05-05 Oppo广东移动通信有限公司 Image recognition method and related device
CN111539246A (en) * 2020-03-10 2020-08-14 西安电子科技大学 Cross-spectrum face recognition method and device, electronic equipment and storage medium thereof
CN113496174B (en) * 2020-04-07 2024-01-23 北京君正集成电路股份有限公司 Method for improving recall rate and accuracy rate of three-stage cascade detection
CN113496174A (en) * 2020-04-07 2021-10-12 北京君正集成电路股份有限公司 Method for improving recall rate and accuracy rate of three-level cascade detection
CN111488857A (en) * 2020-04-29 2020-08-04 北京华捷艾米科技有限公司 Three-dimensional face recognition model training method and device
CN111814553A (en) * 2020-06-08 2020-10-23 浙江大华技术股份有限公司 Face detection method, model training method and related device
CN111814553B (en) * 2020-06-08 2023-07-11 浙江大华技术股份有限公司 Face detection method, training method of model and related devices thereof
CN111783607A (en) * 2020-06-24 2020-10-16 北京百度网讯科技有限公司 Training method and device of face recognition model, electronic equipment and storage medium
CN111783607B (en) * 2020-06-24 2023-06-27 北京百度网讯科技有限公司 Training method and device of face recognition model, electronic equipment and storage medium
CN111914658B (en) * 2020-07-06 2024-02-02 浙江大华技术股份有限公司 Pedestrian recognition method, device, equipment and medium
CN111914658A (en) * 2020-07-06 2020-11-10 浙江大华技术股份有限公司 Pedestrian identification method, device, equipment and medium
CN111914908B (en) * 2020-07-14 2023-10-24 浙江大华技术股份有限公司 Image recognition model training method, image recognition method and related equipment
CN111914908A (en) * 2020-07-14 2020-11-10 浙江大华技术股份有限公司 Image recognition model training method, image recognition method and related equipment
CN112861079A (en) * 2021-03-26 2021-05-28 中国科学技术大学 Normalization method with certificate identification function
CN113642415A (en) * 2021-07-19 2021-11-12 南京南瑞信息通信科技有限公司 Face feature expression method and face recognition method
CN113642415B (en) * 2021-07-19 2024-06-04 南京南瑞信息通信科技有限公司 Face feature expression method and face recognition method

Also Published As

Publication number Publication date
CN107871100A (en) 2018-04-03
CN107871100B (en) 2021-07-06

Similar Documents

Publication Publication Date Title
WO2018054283A1 (en) Face model training method and device, and face authentication method and device
WO2021120752A1 (en) Region-based self-adaptive model training method and device, image detection method and device, and apparatus and medium
Ozbulak et al. How transferable are CNN-based features for age and gender classification?
Huang et al. Face recognition on large-scale video in the wild with hybrid Euclidean-and-Riemannian metric learning
Zhan et al. Face detection using representation learning
Tao et al. Biometric authentication system on mobile personal devices
Li et al. Overview of principal component analysis algorithm
Han et al. Face recognition with contrastive convolution
US20150235073A1 (en) Flexible part-based representation for real-world face recognition apparatus and methods
WO2017088432A1 (en) Image recognition method and device
Kozakaya et al. Facial feature localization using weighted vector concentration approach
Chai et al. Boosting palmprint identification with gender information using DeepNet
CN105138972A (en) Face authentication method and device
US20120057763A1 (en) method for recognizing the identity of user by biometrics of palm vein
Pang et al. Simultaneously learning neighborship and projection matrix for supervised dimensionality reduction
Dong et al. Finger vein verification based on a personalized best patches map
Chu et al. Gender classification from unaligned facial images using support subspaces
Dave et al. Face recognition in mobile phones
Bąk et al. Person re-identification using deformable patch metric learning
Rakshit et al. Cross-resolution face identification using deep-convolutional neural network
EP2641212A1 (en) Systems and methods for robust pattern classification
Kocjan et al. Face recognition in unconstrained environment
Folego et al. Cross-domain face verification: matching ID document and self-portrait photographs
Ali et al. Periocular recognition using uMLBP and attribute features
Nikisins Weighted multi-scale local binary pattern histograms for face recognition

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17852351

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17852351

Country of ref document: EP

Kind code of ref document: A1