Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a training method of a human face living body detection model, which comprises the following steps: inputting a plurality of training images into a human face living body detection model, wherein the plurality of training images comprise human face living body images and N types of attack images, the human face living body detection model comprises N sub-models, the N sub-models correspond to the N types of attack images one by one, and N is an integer greater than or equal to 2. Then, aiming at each submodel in the N submodels, the submodel is used for identifying the face living body image and the attack image corresponding to the submodel to obtain a first identification result. Next, based on at least the first recognition result, model parameters of the face in-vivo detection model are adjusted to obtain a trained face in-vivo detection model.
Fig. 1 schematically illustrates a training method of a face in-vivo detection model and an application scenario of the face in-vivo detection method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 of an embodiment of the present disclosure includes, for example, a living human face detection model 110 to be trained and a trained living human face detection model 120.
In the embodiment of the present disclosure, the plurality of training images 111 include, for example, a living human face image and an attack image, and the attack image is a non-living human face image. The living human face detection model 110 to be trained is trained with a plurality of training images 111 to obtain a trained living human face detection model 120.
Next, the trained living human face detection model 120 may be utilized to perform image recognition on the human face image 121 to be recognized. For example, the face image 121 to be recognized is input into the trained face living body detection model 120 for image recognition, and a recognition result 122 for the face image 121 to be recognized is obtained, where the recognition result 122 is used to characterize whether the face image 121 to be recognized is a face living body image, for example.
The face living body detection model of the embodiment of the disclosure can be applied to face recognition systems under various scenes, including attendance scenes, financial payment scenes and the like.
The embodiment of the present disclosure provides a training method for a face living body detection model, and the following describes the training method for the face living body detection model according to an exemplary embodiment of the present disclosure with reference to fig. 2 to 5 in combination with the application scenario of fig. 1.
Fig. 2 schematically shows a flowchart of a training method of a face in-vivo detection model according to an embodiment of the present disclosure.
As shown in fig. 2, the training method 200 of the living human face detection model according to the embodiment of the present disclosure may include operations S210 to S230, for example.
In operation S210, a plurality of training images are input into a face live detection model.
In operation S220, for each of the N submodels, the face living body image and the attack image corresponding to the submodel are identified by using the submodel, and a first identification result is obtained.
In operation S230, model parameters of the living human face detection model are adjusted based on at least the first recognition result to obtain a trained living human face detection model.
For example, the plurality of training images include a living human face image and N types of attack images, where N is an integer greater than or equal to 2. Taking N as an example, the first type of attack image is, for example, a non-human face living image obtained by a first attack manner, the second type of attack image is, for example, a non-human face living image obtained by a second attack manner, the third type of attack image is, for example, a non-human face living image obtained by a third attack manner, and the fourth type of attack image is, for example, a non-human face living image obtained by a fourth attack manner.
The plurality of training images includes, for example, M training images, M being, for example, an integer greater than N. M training images, for example, include M0Individual face living body image, m1A first type attack image m2A second type attack image m3A third type attack image and m4A fourth type attack image, wherein m0、m1、m2、m3、m4Are all integers greater than 1, M ═ M0+m1+m2+m3+m4。
Illustratively, the face living body detection model includes, for example, N sub-models, and the N sub-models correspond to the N types of attack images one to one, for example, the face living body detection model includes 4 sub-models.
Illustratively, a first submodel pair m is utilized0At least part of the sum m in the living body image of the individual face1And identifying the first type of attack image to obtain a first identifier result. Using the second submodel to pair m0At least part of the sum m in the living body image of the individual face2And identifying the second type of attack image to obtain a second identifier result. Using the third submodel to pair m0At least part of the sum m in the living body image of the individual face3And identifying the second type of attack image to obtain a third identifier result. Using the fourth submodel to pair m0At least part of the sum m in the living body image of the individual face4And identifying the fourth type of attack image to obtain a fourth identifier result. The first recognizer result, the second recognizer result, the third recognizer result and the fourth recognizer result may all represent whether the recognized image is a living human face image.
For example, the first recognition result of the embodiment of the present disclosure includes a first recognizer result, a second recognizer result, a third recognizer result, and a fourth recognizer result. Embodiments of the present disclosure may adjust model parameters of a living human face detection model based on at least the first recognition result to obtain a trained living human face detection model.
For example, each training image includes a label that characterizes whether the training image is a live image of a human face. After the first recognition result is obtained, the model parameters of the living human face detection model can be adjusted at least based on the first recognition result and the label to obtain a trained living human face detection model. And adjusting the model parameters to enable the recognition result obtained by subsequent training to be closer to the corresponding label.
In adjusting model parameters based on the first recognition result, in one example, parameters of a first sub-model may be adjusted based on the first recognition result, parameters of a second sub-model may be adjusted based on the second recognition result, parameters of a third sub-model may be adjusted based on the third recognition result, and parameters of a fourth sub-model may be adjusted based on the fourth recognition result. Of course, in another example, if there is a correlation between the sub-models, the model parameters of the sub-models may be adjusted globally based on the first recognition result.
According to the embodiment of the disclosure, each sub-model is used for carrying out independent training aiming at each attack mode, so that the face living body detection model can rapidly and accurately learn the specific characteristics of each attack mode, and the identification accuracy of the face living body detection model is improved. It can be understood that the characteristics of different attack modes are extracted through different sub-models, so that the identification accuracy and the generalization of the face living body detection model are improved, and the generalization refers to the capability of the face living body detection model for identifying unknown images except training images.
Fig. 3 schematically shows a schematic diagram of a face live detection model according to an embodiment of the present disclosure.
As shown in fig. 3, the living human face detection model 320 of the embodiment of the present disclosure includes, for example, 4 sub-models, where the 4 sub-models are a first sub-model 321, a second sub-model 322, a third sub-model 323, and a fourth sub-model 324, respectively.
Illustratively, the M training images include MoIndividual face living body image 315, m1First type attack image 311, m2A second type attack image 312, m3Third type attack images 313 and m4And a fourth type attack image 314. In an example, in order to ensure the training uniformity of each sub-model in the face living body detection model, m can be made0=m1=m2=m3=m4。
Illustratively, the living human face image 315 and the first type attack image 311 are input into a first sub-model 321 for training, and a first recognition sub-result 331 is obtained. The living human face image 315 and the second type attack image 312 are input into a second sub-model 322 for training, and a second recognizer result 332 is obtained. The living human face image 315 and the third type attack image 313 are input into a third sub-model 323 for training, and a third recognition sub-result 333 is obtained. The living human face image 315 and the fourth type attack image 314 are input into the fourth sub-model 324 for training, and a fourth recognizer result 334 is obtained. The first recognizer result 331, the second recognizer result 332, the third recognizer result 333, and the fourth recognizer result 334 constitute the first recognition result 330 according to the embodiment of the disclosure.
Illustratively, each sub-model includes a feature extraction network and a recognition network. And for each sub-model, extracting the image characteristics of the face living body image and the image characteristics of the attack image corresponding to the sub-model by using the characteristic extraction network of the sub-model, and then inputting the image characteristics of the face living body image and the image characteristics of the attack image corresponding to the sub-model into the identification network of the corresponding sub-model for identification. For ease of understanding, taking the first sub-model 321 as an example, the living human face image 315 and the first type attack image 311 are input to a feature extraction network in the first sub-model 321, the feature extraction network extracts image features of each image, and then the extracted image features are input to a recognition network in the first sub-model 321 to recognize whether each image is a living human face image through the recognition network.
In the embodiment of the present disclosure, the first-type attack image 311 includes an image captured for a human face displayed on an electronic screen. The second type of attack image 312 includes an image taken of a paper photograph having a human face. The third type of attack image 313 includes images acquired for a planar mask having facial features. The fourth type of attack image 314 includes images collected for a stereoscopic face model including a 3D mask, a 3D head model, a 3D headgear, etc.
Fig. 4 schematically shows a schematic diagram of a face live detection model according to another embodiment of the present disclosure.
As shown in fig. 4, the living face detection model 420 of the embodiment of the present disclosure may further include an overall recognition network 425 in addition to the first sub-model 421, the second sub-model 422, the third sub-model 423, and the fourth sub-model 424.
Illustratively, each sub-model includes, for example, a feature extraction network and a recognition network. When the face living body detection model 420 is trained for each training image, the image features of the training image are extracted by using the feature extraction network of each sub-model, and N image features corresponding to N-4 sub-models are obtained. Then, the N image features are subjected to stitching processing to obtain overall image features, and the overall image features are input into the overall recognition network 425 for recognition.
Taking one face living body image 415 as an example, the image features of the face living body image 415 are respectively extracted by using a feature extraction network of 4 sub-models, and image features a, image features b, image features c and image features d which are in one-to-one correspondence with the 4 sub-models are obtained. The image feature a is input to the recognition network of the first submodel 421 for recognition, the image feature b is input to the recognition network of the second submodel 422 for recognition, the image feature c is input to the recognition network of the third submodel 423 for recognition, and the image feature d is input to the recognition network of the fourth submodel 424 for recognition. The output of the plurality of submodels is a first recognition result 430. In addition, the image features a, b, c and d may be spliced to obtain overall image features, and the overall image features may be input into the overall recognition network 425 for recognition, so as to obtain the second recognition result 440. Next, based on the first recognition result 430 and the second recognition result 440, model parameters of the living human face detection model 420 are adjusted, for example, model parameters of each sub-model are adjusted and model parameters of the global recognition network 425 are adjusted.
Taking a first-class attack image 411 as an example, the image features of the first-class attack image 411 are respectively extracted by using a feature extraction network of 4 sub-models, so as to obtain image features a, image features b, image features c and image features d which are in one-to-one correspondence with the 4 sub-models. The image feature a is input to the recognition network of the first submodel 421 for recognition, and the output of the first submodel 421 is the first recognition result 430. In addition, the image features a, b, c and d may be spliced to obtain overall image features, and the overall image features may be input into the overall recognition network 425 for recognition, so as to obtain the second recognition result 440. Next, based on the first recognition result 430 and the second recognition result 440, model parameters of the living human face detection model 420 are adjusted, for example, model parameters of the first sub-model 421 are adjusted and model parameters of the global recognition network 425 are adjusted. It is understood that the process of the face living body detection model 420 training the second sub-model 422 using the second type attack image 412, training the third sub-model 423 using the third type attack image 413, and training the fourth sub-model 424 using the fourth type attack image 414 is similar to the process of training the first sub-model 421 using the first type attack image 411, and details are not repeated here.
Illustratively, the image feature a is, for example, a feature map of 64 × 4, the image feature b is, for example, a feature map of 64 × 4, the image feature c is, for example, a feature map of 64 × 4, the image feature d is, for example, a feature map of 64 × 4, the overall image feature obtained after the stitching is, for example, a feature map of 256 × 4, and the feature maps of 256 × 4 are input into the overall recognition network 425 for recognition.
In one example, the face liveness detection model may further include a processing module, and the processing module may be configured to stitch a plurality of image features.
In the embodiment of the disclosure, each sub-model is used for training each attack mode independently, so that the face living body detection model can rapidly and accurately learn the specific characteristics of each attack mode, and the identification accuracy of the face living body detection model is improved. The image features extracted by each sub-model can be spliced and then subjected to overall recognition of the image through an overall recognition network, and the parameters of the model are adjusted based on the recognition results of the sub-models and the recognition results of the overall recognition network, so that the model has the capability of individually recognizing each attack mode and the capability of comprehensively recognizing various attack modes, and the recognition accuracy of the model is improved.
Fig. 5 schematically shows a schematic diagram of a face live detection model according to another embodiment of the present disclosure.
As shown in fig. 5, the living human face detection model 520 of the embodiment of the disclosure may further include a basic feature extraction network 526, in addition to the first sub-model 521, the second sub-model 522, the third sub-model 523, the fourth sub-model 524, and the overall recognition network 525.
Illustratively, the feature extraction network of each submodel comprises, for example, 5 convolutional layers, and the identification network of each submodel comprises, for example, 1 fully-connected layer and one softmax layer. The ensemble identifying network 526 includes, for example, 1 fully connected layer and one softmax layer.
For example, before the training images 510 are input into the sub-model, each training image 510 may be subjected to a feature extraction process by using the underlying feature extraction network 526, resulting in a processed training image, so that the processed training image may be input into the sub-model. The underlying feature extraction network 526 includes, for example, various types of convolutional neural networks. In one embodiment, the base feature extraction network 526 includes a deep separable convolutional network MobileNet V2. For example, the last convolutional layer of MobileNet V2 is connected to each submodel, i.e., the output of the last convolutional layer of MobileNet V2 is used as input for each submodel. The MobileNet V2 is a lightweight network, and the MobileNet V2 has the advantages of ensuring model accuracy and greatly reducing calculated amount and memory consumption. Embodiments of the present disclosure first perform a preliminary feature extraction process on the training image 510 using MobileNet V2, and then input the processed training image (extracted image features) into a sub-model for further processing. It can be understood that the training images are processed through the basic feature extraction network 526 in the embodiment of the disclosure, so that the training speed of the model is increased, and the calculated amount and memory consumption of model training are reduced.
In an embodiment of the present disclosure, the training image 510 may be obtained, for example, by acquiring the initial image 510A and then preprocessing the initial image 510A, the process of preprocessing being described as follows.
For example, a face detection model is used to perform face detection on the initial image 510A, detect an approximate region of a face, and then extract an image of the region of the initial image 510A where the face is located as the training image 510.
Or after the area where the face is located is determined, the coordinate values of the face key points can be detected through the face key point detection model. For example, a face may be defined to include 72 key points (x)1,y1)……(x72,y72) After 72 key points are detected, performing face alignment on the face image based on the coordinate values of the key points to obtain a training image 510. For example, the minimum and maximum values x of x and y are determined based on the coordinate values of 72 key pointsmin、xmax、ymin、ymaxBased on xmin、xmax、ymin、ymaxThe human face detection frame is enlarged by three times to obtain a larger area, the area where the human face is located is intercepted after the affine transformation is carried out on the larger area, the size of the intercepted human face area is adjusted to 224 x 224, and the human face area with the size of 224 x 224 is used as a training image 510. The affine transformation is used for performing posture correction on the face image so as to perform face alignment.
Alternatively, the pixel value of each pixel in the initial image 510A (or the face region image) may be normalized, and the normalized image may be used as the training image 510. The normalization process includes subtracting 128 from the pixel value of each pixel and dividing by 256 to bring the pixel value of each pixel between the intervals [ -0.5, 0.5 ].
Alternatively, the initial image 510A (or normalized image) is subjected to a random data enhancement process to increase the number of images. Taking the random enhancement processing on one initial image 510A as an example, the initial image 510A is horizontally flipped to obtain another initial image, and the initial image 510A and the another initial image are used as training images.
In the embodiment of the disclosure, the initial images are preprocessed, so that the image quality of the training images is improved, the number of images of the training images is increased, the model is trained based on the high-quality training images and the training images with more numbers, and the precision of model training is improved.
Fig. 6 schematically shows a flowchart of a face liveness detection method according to an embodiment of the present disclosure.
As shown in fig. 6, the living human face detection method 600 of the embodiment of the present disclosure may include, for example, operations S610 to S620.
In operation S610, a face image to be recognized is acquired.
In operation S620, a face image to be recognized is recognized using the living face detection model to determine whether the face image to be recognized is a living face image.
Illustratively, the face liveness detection model is trained using the method described above.
According to the embodiment of the disclosure, each submodel in the face living body detection model is used for carrying out independent training aiming at each attack mode, so that the face living body detection model can rapidly and accurately learn the specific characteristics of each attack mode, the image characteristics extracted by each submodel are spliced and then are subjected to overall recognition of the image through an overall recognition network, whether the face image to be recognized is the face living body image is determined based on the recognition result of the submodel and the recognition result of the overall recognition network, and the accuracy of face living body recognition is improved.
Fig. 7 schematically shows a schematic diagram of a face liveness detection method according to an embodiment of the present disclosure.
As shown in fig. 7, after the face image 710 to be recognized is input into the basic feature extraction network 726 for processing, the processing results are respectively input into N (N is equal to 4, for example) sub-models for recognition. For example, feature extraction is respectively performed on the face image to be recognized by using a feature extraction network in the N sub-models to obtain N image features corresponding to the N sub-models, then the N image features are respectively recognized by using a recognition network in the N sub-models to obtain N first probabilities corresponding to the N sub-models, and each first probability represents a probability that the corresponding sub-model recognizes the face image to be recognized as the living face image.
For example, the first sub-model 721 outputs the recognition result as a first probability 731, and the first probability 731 represents the probability that the face image 710 to be recognized is a living face image. The recognition result output by the second submodel 722 is a first probability 732, and the first probability 732 represents the probability that the face image 710 to be recognized is a living face image. The recognition result output by the third sub-model 723 is a first probability 733, and the first probability 733 represents the probability that the face image 710 to be recognized is a living face image. The recognition result output by the fourth submodel 724 is a first probability 734, and the first probability 734 represents the probability that the face image 710 to be recognized is a living face image.
In addition, the N image features respectively output by the N sub-models are spliced to obtain an overall image feature, the overall image feature is identified by using the overall identification network 725 to obtain a second probability 740, and the second probability 740 represents, for example, the probability that the overall identification network identifies the face image to be identified as the living face image.
Next, the maximum probability 735 of the first probability 731, the first probability 732, the first probability 733, and the first probability 734 is determined, and an average 750 of the maximum probability 735 and the second probability 740 is determined. Then, the average value 750 is taken as the final probability that the face image 710 to be recognized is a living face image.
According to the embodiment of the disclosure, the images generated by various attack modes are respectively identified based on a plurality of sub-models, the images generated by various attack modes are integrally identified by using the overall identification network, and then the probability that the face image to be identified is the living face image is finally determined by combining the maximum probability in the output probabilities of the plurality of sub-models and the probability output by the overall identification network, so that the accuracy of the living face identification is improved.
Fig. 8 schematically shows a block diagram of a training apparatus for a face in-vivo detection model according to an embodiment of the present disclosure.
As shown in fig. 8, the training apparatus 800 for a living human face detection model according to an embodiment of the present disclosure includes, for example, an image input module 810, a first recognition module 820, and a parameter adjustment module 830.
The image input module 810 may be configured to input a plurality of training images into a living human face detection model, where the plurality of training images include a living human face image and N types of attack images, the living human face detection model includes N sub-models, the N sub-models are in one-to-one correspondence with the N types of attack images, and N is an integer greater than or equal to 2. According to the embodiment of the present disclosure, the image input module 810 may perform, for example, the operation S210 described above with reference to fig. 2, which is not described herein again.
The first identification module 820 may be configured to identify, for each sub-model of the N sub-models, the living face image and the attack image corresponding to the sub-model by using the sub-model, to obtain a first identification result. According to the embodiment of the present disclosure, the first identifying module 820 may perform, for example, the operation S220 described above with reference to fig. 2, which is not described herein again.
The parameter adjusting module 830 may be configured to adjust model parameters of the living human face detection model based on at least the first recognition result to obtain a trained living human face detection model. According to the embodiment of the present disclosure, the parameter adjustment module 830 may perform the operation S230 described above with reference to fig. 2, for example, and is not described herein again.
According to an embodiment of the present disclosure, the face in-vivo detection model further includes an overall recognition network; each sub-model of the N sub-models comprises a feature extraction network; wherein the apparatus 800 may further include, before adjusting the model parameters of the living human face detection model based on at least the first recognition result: the feature extraction module is used for extracting the image features of the training images by using the feature extraction network of each sub-model aiming at each training image to obtain N image features corresponding to the N sub-models; the splicing module is used for splicing the N image characteristics to obtain the overall image characteristics; and the characteristic input module is used for inputting the overall image characteristics into the overall recognition network for recognition to obtain a second recognition result. Wherein, the parameter adjusting module 830 is further configured to: and adjusting the model parameters of the human face living body detection model based on the first recognition result and the second recognition result.
According to an embodiment of the present disclosure, each of the N sub-models comprises a feature extraction network and a recognition network; wherein the first recognition module 820 comprises: a first feature extraction sub-module and a feature input sub-module. And the first feature extraction submodule is used for extracting the image features of the face living body image and the image features of the attack image corresponding to the submodel by utilizing the feature extraction network of the submodel aiming at each submodel in the N submodels. And the characteristic input submodule is used for inputting the image characteristics of the face living body image and the image characteristics of the attack image corresponding to the sub-model into the identification network of the sub-model for identification.
According to the embodiment of the disclosure, the human face living body detection model further comprises a basic feature extraction network; the apparatus 800 may further include, before identifying the living face image and the attack image corresponding to the sub-model by using the sub-model: and the image processing module is used for respectively carrying out feature extraction processing on the face living body image and the attack image corresponding to the sub-model by utilizing a basic feature extraction network to obtain a processed face living body image and a processed attack image so as to input the processed face living body image and the processed attack image into the sub-model, wherein the basic feature extraction network comprises a depth separable convolutional network MobileNet V2.
According to an embodiment of the present disclosure, the feature extraction network of each submodel includes 5 convolutional layers, and the identification network of each submodel includes 1 fully-connected layer and one softmax layer.
According to an embodiment of the present disclosure, the overall identification network includes 1 fully connected layer and one softmax layer.
According to an embodiment of the present disclosure, the N-type attack image includes at least two of: an image collected for a face displayed on an electronic screen; an image collected for a paper photograph having a human face; an image collected for a planar mask having facial features; images collected for a stereoscopic face model.
According to an embodiment of the present disclosure, the apparatus 800 may further include a training image obtaining module for obtaining a plurality of training images; wherein the training image acquisition module comprises at least one of: an extraction submodule, wherein Oenon also obtains an initial image, and extracts an area image of the face in the initial image as a training image; the alignment operation submodule is used for acquiring an initial image and performing face alignment operation on a face in the initial image to obtain a training image; the normalization processing submodule is used for acquiring an initial image and normalizing the pixel value of each pixel in the initial image; and the enhancement processing submodule is used for acquiring an initial image, performing random data enhancement processing on the initial image, and taking the initial image and the processed initial image as training images.
Fig. 9 schematically shows a block diagram of a living human face detection apparatus according to an embodiment of the present disclosure.
As shown in fig. 9, the living human face detection apparatus 900 according to the embodiment of the present disclosure includes, for example, an image acquisition module 910 and a second recognition module 920.
The image obtaining module 910 may be configured to obtain a face image to be recognized. According to an embodiment of the present disclosure, the image obtaining module 910 may perform, for example, operation S610 described above with reference to fig. 6, which is not described herein again.
The second identification module 920 may be configured to identify the face image to be identified by using the living human face detection model to determine whether the face image to be identified is a living human face image. According to the embodiment of the present disclosure, the second identifying module 920 may perform, for example, operation S620 described above with reference to fig. 6, which is not described herein again.
According to an embodiment of the present disclosure, the second identifying module 920 includes: the device comprises a second feature extraction submodule, a first identification submodule, a splicing submodule, a second identification submodule and a determination submodule. The second feature extraction submodule is used for respectively extracting features of the face image to be recognized by utilizing a feature extraction network in the N submodels to obtain N image features corresponding to the N submodels; the first identification submodule is used for respectively identifying the N image characteristics by utilizing an identification network in the N submodels to obtain N first probabilities corresponding to the N submodels, and each first probability represents the probability that the corresponding submodel identifies the face image to be identified as the face living body image; the splicing submodule is used for splicing the N image characteristics to obtain the overall image characteristics; the second recognition submodule is used for recognizing the overall image characteristics by using the overall recognition network to obtain a second probability, and the second probability represents the probability that the overall recognition network recognizes the face image to be recognized as the living face image; and the determining submodule is used for determining whether the face image to be recognized is a living face image or not based on the N first probabilities and the second probabilities.
According to an embodiment of the present disclosure, determining the sub-module includes: a first determination unit and a second determination unit. A first determining unit, configured to determine a maximum probability of the N first probabilities; and the second determining unit is used for determining whether the face image to be recognized is the living face image or not based on the average value of the maximum probability and the second probability.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
Fig. 10 is a block diagram of an electronic device for implementing a training method of a face live detection model according to an embodiment of the present disclosure.
FIG. 10 illustrates a schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure. The electronic device 1000 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the apparatus 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the device 1000 can also be stored. The calculation unit 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
A number of components in device 1000 are connected to I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and a communication unit 1009 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 1009 allows the device 1000 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
Computing unit 1001 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 1001 executes the respective methods and processes described above, such as a training method of a face live detection model. For example, in some embodiments, the training method of the face liveness detection model may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1000 via ROM 1002 and/or communications unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the training method of the living human face detection model described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured by any other suitable means (e.g. by means of firmware) to perform a training method of the face liveness detection model.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
The electronic device may be used to perform a face liveness detection method. The electronic device may comprise, for example, a computing unit, a ROM, a RAM, an I/O interface, an input unit, an output unit, a storage unit and a communication unit. The computing unit, the ROM, the RAM, the I/O interface, the input unit, the output unit, the storage unit, and the communication unit in the electronic device have the same or similar functions as the computing unit, the ROM, the RAM, the I/O interface, the input unit, the output unit, the storage unit, and the communication unit of the electronic device shown in fig. 10, for example, and are not described again here.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.