[go: up one dir, main page]

WO2022111688A1 - Face liveness detection method and apparatus, and storage medium - Google Patents

Face liveness detection method and apparatus, and storage medium Download PDF

Info

Publication number
WO2022111688A1
WO2022111688A1 PCT/CN2021/134018 CN2021134018W WO2022111688A1 WO 2022111688 A1 WO2022111688 A1 WO 2022111688A1 CN 2021134018 W CN2021134018 W CN 2021134018W WO 2022111688 A1 WO2022111688 A1 WO 2022111688A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
information
value
living body
difference
Prior art date
Application number
PCT/CN2021/134018
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 WO2022111688A1 publication Critical patent/WO2022111688A1/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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection

Definitions

  • the present application relates to the field of artificial intelligence, and in particular, to a method, a device and a storage medium for detecting a living body of a human face.
  • Face liveness detection determines whether the current face is a live face, so as to resist the attack of fake faces. Face liveness detection is an important step before face recognition. With the application of face recognition in many important fields such as face unlocking and face payment, the problem of using counterfeit faces to attack face recognition has become increasingly prominent. Face liveness detection is the main technical path to resist counterfeit face attacks.
  • an image corresponding to an object to be detected is collected, and a living body detection of the object to be detected is performed based on the collected image to obtain a living body detection result of the object to be detected.
  • this kind of living body detection method only pays attention to the information of the image, and the information concerned is limited and easy to be attacked, the accuracy of the living body detection result is low, and the effect of the living body detection is not good.
  • a method, device and storage medium for face liveness detection are proposed, which can use multimodal information (including face image, ambient light information and face posture information) to perform liveness detection to obtain liveness detection results, which can improve Accuracy of liveness test results.
  • an embodiment of the present application provides a face liveness detection method, which includes:
  • the multi-modal information corresponding to the object to be detected is obtained, and the multi-modal information includes a face image, ambient light information and face posture information;
  • the living body detection result is obtained by performing the living body detection according to the multimodal information, and the living body detection result is used to indicate whether the object to be detected is a living body.
  • the multimodal information corresponding to the object to be detected is obtained, and the living body detection result is obtained by performing living body detection according to the multimodal information.
  • Information and face pose information make the input parameters of the living body detection more abundant in feature information in various dimensions, and improve the accuracy of the living body detection results.
  • the face image includes an initial first face image and a second face image after image signal processing
  • the ambient light information includes a first illumination Intensity information
  • the face posture information includes the first face posture angle value.
  • the multi-modal information includes the initial first face image, the second face image after image signal processing, the first illumination intensity information, and the first face attitude angle value.
  • These kinds of information are composed of Multimodal information is used as the input parameter of live detection.
  • it can reduce the attack range, increase the difficulty of attack, and reduce the probability of being attacked.
  • the attacker needs to obtain a specific posture (such as the front) or a photo under specific lighting conditions to attack. It is successful, and it also avoids the delay caused by the need to process multiple frames of images; on the other hand, the input parameters of the living body detection are richer in feature information in each dimension, and the accuracy of the living body detection results is improved.
  • performing in vivo detection according to multimodal information to obtain in vivo detection results including:
  • the living body detection result is obtained by performing living body detection according to the second light intensity information, the second face attitude angle value and the multimodal information.
  • the third face image is obtained according to the region where the face is located in the second face image;
  • the second light intensity information is obtained by predicting the light intensity of the third face image, and the third face image is Predict the face attitude angle to obtain the second face attitude angle value; perform living body detection according to the second light intensity information, the second face attitude angle value and the multimodal information to obtain the living body detection result, and based on the obtained multimodality Information, the predicted second light intensity information, and the predicted second face posture angle value are used for living body detection, which further ensures the detection effect of the living body detection result.
  • the first illumination intensity information includes a first illumination intensity value
  • the second illumination intensity information includes a second illumination intensity value , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
  • the absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
  • the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
  • the difference between the first light intensity value and the second light intensity value, and the difference between the second face pose angle value and the second face pose angle value are first judged. If the difference is small, the subsequent face liveness detection is performed according to the first face image and the second face image, which improves the liveness detection efficiency and further ensures the accuracy of the liveness detection result.
  • the first illumination intensity information includes a first illumination intensity value
  • the second illumination intensity information includes a second illumination intensity value , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
  • the absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
  • the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
  • the difference between the first light intensity value and the second light intensity value, and the difference between the second face pose angle value and the second face pose angle value are judged, if one of the differences If it is larger, it is determined that the object to be detected is not a living body, and the living body detection result is directly output, which improves the living body detection efficiency and further ensures the accuracy of the living body detection result.
  • the first illumination intensity information includes a first illumination intensity level
  • the second illumination intensity information includes a second illumination intensity level , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
  • the first face The image and the second face image are input to the trained single-frame in vivo detection model, and the output is to obtain the in vivo detection result.
  • the difference between the first light intensity level and the second light intensity level, and the difference between the second face pose angle value and the second face pose angle value are judged first. If the difference is small, the subsequent face liveness detection is performed according to the first face image and the second face image, which improves the liveness detection efficiency and further ensures the accuracy of the liveness detection result.
  • the first illumination intensity information includes a first illumination intensity level
  • the second illumination intensity information includes a second illumination intensity level , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
  • the output obtains the first A detection result, the first detection result is used to indicate that the object to be detected is not a living body.
  • the difference between the first light intensity level and the second light intensity level, and the difference between the second face posture angle value and the second face posture angle value are judged, if one of the differences If it is larger, it is determined that the object to be detected is not a living body, and the living body detection result is directly output, which improves the living body detection efficiency and further ensures the accuracy of the living body detection result.
  • the method before performing the in vivo detection on the multimodal information to obtain the in vivo detection result, the method further includes:
  • the scene information is used to indicate the current detection scene
  • pre-interception processing is performed on the multi-modal information.
  • a preprocessing process is added before the multimodal information is detected in vivo, and the preset attack scenarios are pre-intercepted, the attack scope is narrowed, the interception efficiency is enhanced, and the single-frame living body is compensated. Detect model deficiencies.
  • an embodiment of the present application provides a face liveness detection device, the device includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above-mentioned first when executing the instructions.
  • a face liveness detection device the device includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above-mentioned first when executing the instructions.
  • an embodiment of the present application provides a face liveness detection device, the device includes at least one module, and the at least one module is used to implement the first aspect or any one of the possible implementations of the first aspect.
  • embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying the computer-readable codes, when the computer-readable codes run in an electronic device At the time, the processor in the electronic device executes the method provided by the first aspect or any one of the possible implementation manners of the first aspect.
  • embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the first aspect or any of the first aspects can be implemented A possible implementation of the provided method.
  • FIG. 1 shows a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application.
  • FIG. 2 shows a flowchart of a method for detecting a face living body provided by an exemplary embodiment of the present application.
  • FIG. 3 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
  • FIG. 4 shows a flowchart of a method for detecting a human face liveness provided by another exemplary embodiment of the present application.
  • FIG. 5 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
  • FIG. 6 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
  • FIG. 7 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
  • FIG. 8 shows a block diagram of a face liveness detection apparatus provided by an exemplary embodiment of the present application.
  • An embodiment of the present application provides a method for detecting a face living body, and the execution body is a computer device. Please refer to FIG. 1 , which shows a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application.
  • the computer equipment may be a terminal or a server.
  • the terminal includes a mobile terminal or a stationary terminal, for example, the terminal may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, and the like.
  • the server can be one server, or a server cluster composed of several servers, or a cloud computing service center.
  • the computer device includes a processor 10 , a memory 20 and a communication interface 30 .
  • the structure shown in FIG. 1 does not constitute a limitation on the computer device, and may include more or less components than the one shown, or combine some components, or arrange different components. in:
  • the processor 10 is the control center of the computer equipment, using various interfaces and lines to connect various parts of the entire computer equipment, by running or executing the software programs and/or modules stored in the memory 20, and calling the data stored in the memory 20. , perform various functions of computer equipment and process data, so as to carry out overall control of computer equipment.
  • the processor 10 may be implemented by a CPU, or may be implemented by a graphics processor (Graphics Processing Unit, GPU).
  • the memory 20 may be used to store software programs and modules.
  • the processor 10 executes various functional applications and data processing by executing software programs and modules stored in the memory 20 .
  • the memory 20 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system 21, an acquisition module 22, a detection module 23, and an application program 24 (such as neural network training, etc.) required for at least one function;
  • the storage data area may store data or the like created according to the use of the computer device.
  • the memory 20 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable).
  • SRAM Static Random Access Memory
  • Electrically Erasable Programmable Read-Only Memory Electrically Erasable
  • memory 20 may also include a memory controller to provide processor 10 access to memory 20 .
  • the processor 20 performs the following functions by running the acquisition module 22: after the computer device starts the face recognition function, it acquires multimodal information corresponding to the object to be detected, and the multimodal information includes a face image, ambient light information and human face posture information; the processor 20 performs the following functions by running the detection module 23: performing living body detection according to the multimodal information to obtain a living body detection result used to indicate whether the object to be detected is a living body.
  • the method provided by the embodiment of the present application can be applied to any detection scenario of face liveness detection.
  • face liveness detection in the financial field, there is a demand for face liveness detection.
  • Users can perform operations that require authentication, such as transfers, payments, or modification of account information through their smartphones.
  • the smartphone can use the face liveness detection method provided in this application to identify the identity of user A, so as to determine whether the operation is initiated by user A himself of.
  • self-service customs clearance equipment can be used for customs clearance inspection.
  • user B conducts customs clearance inspection through self-service customs clearance equipment.
  • the self-service customs clearance equipment can use the face liveness detection method provided in this application to conduct liveness detection on the collected avatar of user B to identify whether the identity is fraudulently used.
  • the face liveness detection method provided in this application to conduct liveness detection on the collected avatar of user B to identify whether the identity is fraudulently used.
  • it can be applied to face punch cards or face access control systems. For example, when user C punches in or unlocks the access control, his face is detected to prevent him from punching in on behalf of others or unrelated persons from fraudulently using their identities.
  • the methods provided in the embodiments of the present application can also be applied to other face unlocking or face payment scenarios, and the retrieval scenarios are not exhaustively described here.
  • FIG. 2 shows a flowchart of a method for detecting a face liveness provided by an exemplary embodiment of the present application. This embodiment is illustrated by using the method in the computer device shown in FIG. 1 . The method includes the following steps.
  • Step 201 after the face recognition function is activated, obtain multimodal information corresponding to the object to be detected, where the multimodal information includes a face image, ambient light information and face posture information.
  • the face recognition function is activated to obtain multimodal information corresponding to the object to be detected.
  • the preset trigger signal is a user operation signal that triggers the activation of the face recognition function.
  • the preset trigger signal includes any one or a combination of a click operation signal, a slide operation signal, a double-click operation signal, and a long-press operation signal.
  • the preset trigger signal may also be implemented in the form of voice.
  • a computer device receives a voice signal input by a user, and analyzes the voice signal to obtain voice content.
  • a preset keyword exists in the voice content, it means that the terminal receives a preset trigger signal and activates the face recognition function.
  • acquiring the multimodal information corresponding to the object to be detected by the computer device includes: collecting a face image through a camera, and collecting ambient light information and face posture information through a sensor.
  • the computer device collects the ambient light information and the face posture information in real time through sensors or at preset time intervals.
  • the preset time interval is a default setting or a self-defined setting, which is not limited in this embodiment.
  • the following description only takes the real-time collection of ambient light information and face posture information by sensors, that is, the ambient light information and the face posture information are both real-time information as an example for description.
  • the computer device collects real-time ambient light information through a light sensor, and collects real-time face posture information through a direction sensor.
  • the embodiment of the present application does not limit the type of the sensor.
  • the face image includes an initial first face image and a second face image after image signal processing (Image Signal Processing, ISP).
  • the first face image is also called a face RAW image
  • the first face image is an original image including the face of the object to be detected.
  • the second face image is an image after passing through the ISP based on the first face image.
  • the ambient light information is used to indicate the lighting situation corresponding to the face of the object to be detected
  • the face posture information is used to indicate the orientation of the face of the object to be detected.
  • the ambient light information includes first illumination intensity information
  • the first illumination intensity information includes a first illumination intensity value or a first illumination intensity level.
  • the face pose information includes a first face pose angle value
  • the first face pose angle value is an angle value of the face orientation of the object to be detected.
  • Step 202 performing living body detection according to the multimodal information to obtain a living body detection result, and the living body detection result is used to indicate whether the object to be detected is a living body.
  • the computer device performs a living body detection according to the multimodal information to obtain a living body detection result, and the living body detection result is used to indicate whether the object to be detected is a living body.
  • the computer device invokes the trained target in vivo detection model to perform in vivo detection on the multimodal information, and outputs the in vivo detection result.
  • the target living detection model is a model obtained by training a neural network based on the multimodal information of the sample and the correct detection result. That is, the target living detection model is determined according to the multimodal information of the sample and the correct detection result.
  • the correct detection result is a pre-marked correct living body detection result corresponding to the multimodal information of the sample.
  • the target liveness detection model is used to indicate the correlation between the multimodal information and the liveness detection results.
  • the target living body detection model is a preset mathematical model, and the target living body detection model includes a model coefficient between the multimodal information and the living body detection result.
  • the model coefficient may be a fixed value, a value that is dynamically modified with time, or a value that is dynamically modified with the detection scene.
  • the target live detection model includes a deep neural network (Deep Neural Network, DNN) model, a recurrent neural network (Recurrent Neural Networks, RNN) model, an embedding (embedding) model, and a gradient boosting decision tree (Gradient Boosting Decision Tree, GBDT) ) model and at least one of a logistic regression (Logistic Regression, LR) model.
  • DNN Deep Neural Network
  • RNN recurrent neural network
  • RNN recurrent Neural Networks
  • embedding embedding
  • GBDT gradient boosting decision tree
  • the living body detection result includes one of a first detection result and a second detection result
  • the first detection result is used to indicate that the object to be detected is a non-living body
  • the second detection result is used to indicate that the object to be detected is a living body.
  • the first detection result is the first identification
  • the second detection result is the second identification
  • the second identification is different from the first identification. This embodiment of the present application does not limit this.
  • the mobile terminal is in an off-screen state, and when the mobile terminal detects a double-click operation signal acting on the screen or a click operation signal acting on the power-on button, the face unlocking process is started,
  • the mobile terminal collects the initial first face image 31 and the second face image 32 after ISP through the camera, and collects the ambient light information 33 and the face posture information 34 in real time through the sensor, and the first face image 31, the first face image 31, the second face
  • the two face images 32 , ambient light information 33 and face posture information 34 are input into the target living body detection model 35 and output to obtain a living body detection result.
  • the living body detection result includes one of a living body identification and a non-living body identification.
  • the method for detecting a living body of a face obtains the multimodal information corresponding to the object to be detected after the face recognition function is activated, and performs the living body detection according to the multimodal information to obtain the living body detection result.
  • the state information includes face image, ambient light information and face pose information, which enriches the feature information of input parameters of living body detection in various dimensions and improves the accuracy of living body detection results.
  • FIG. 4 shows a flowchart of a method for detecting a face liveness provided by another exemplary embodiment of the present application. This embodiment is exemplified by using the method in the computer device shown in FIG. 1 . The method includes the following steps.
  • Step 401 after the face recognition function is activated, obtain the multimodal information corresponding to the object to be detected, and the multimodal information includes the initial first face image, the second face image after ISP, and the first light intensity information and the first face pose angle value.
  • the first light intensity information includes a first light intensity value or a first light intensity level.
  • the process of acquiring the multimodal information corresponding to the object to be detected may refer to the relevant details in the above-mentioned embodiments, which will not be repeated here.
  • any preprocessing process can be added to pre-intercept the preset attack scenarios.
  • the computer device inputs the multimodal information into the preprocessing model and outputs the scene information, where the scene information is used to indicate the current detection scene; when the scene information is used to indicate that the current detection scene is a preset attack scene, state information for pre-interception processing.
  • the preprocessing model is a model obtained by training a neural network based on sample multimodal information and correct scene information. That is, the preprocessing model is determined according to the sample multimodal information and the correct scene information. The correct scene information is pre-marked correct scene information corresponding to the sample multimodal information.
  • the preprocessing model is used to indicate the correlation between multimodal information and scene information.
  • the preprocessing model reference can be made to the relevant description of the above-mentioned target living body detection model, which will not be repeated here.
  • the scene information is used to indicate the current detection scene.
  • the computer device determines whether the current detection scene is a preset attack scene, and if the current detection scene is a preset attack scene, pre-interception processing is performed on the multi-modal information, and subsequent living body detection steps are not performed, and prompt information is output, and the prompt information is used for Indicates that the current detection scene is a preset attack scene; or, outputs a first detection result, where the first detection result is used to indicate that the object to be detected is a non-living body.
  • the computer device continues to perform the subsequent living body detection steps.
  • Step 402 Obtain a third face image according to the region where the face is located in the second face image.
  • the computer device performs face detection and alignment on the second face image to obtain a face region in the second face image, and performs clipping processing on the face region to obtain a third face image.
  • the third face image is a valid face image obtained by cutting out the second face image after face detection and alignment.
  • Step 403 predicting the illumination intensity of the third face image to obtain second illumination intensity information, and predicting the face attitude angle of the third face image to obtain the second face attitude angle value.
  • the computer device predicts the illumination intensity of the third face image by the prediction tool to obtain the predicted second illumination intensity information, and predicts the face posture angle of the third face image to obtain the predicted second face posture angle value.
  • the computer device predicts the illumination intensity of the third face image based on a neural network classifier to obtain the second illumination intensity information.
  • the computer device performs face key point calculation on the third face image, and determines the pitch value in the Euler angle as the second face pose angle value.
  • the embodiment of the present application does not limit the prediction manner.
  • Step 404 Perform living body detection according to the second illumination intensity information, the second face attitude angle value and the multimodal information to obtain a living body detection result.
  • the computer device performs living body detection according to the predicted second light intensity information, the predicted second face attitude angle value and the collected multimodal information to obtain a living body detection result.
  • the first illumination intensity information includes a first illumination intensity value
  • the second illumination intensity information includes a second illumination intensity value.
  • Step 501 Determine the absolute value of the difference between the first light intensity value and the second light intensity value as the first difference value, and determine the absolute value of the difference between the first face posture angle value and the second face posture angle value. is the second difference.
  • the computer device determines the absolute value of the difference between the first light intensity value and the second light intensity value as the first difference, and determines the absolute value of the difference between the first face pose angle value and the second face pose angle value as second difference.
  • Step 502 determine whether the first difference value and the second difference value satisfy a preset condition, and the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
  • the computer device determines whether the first difference is smaller than the first preset threshold and whether the second difference is smaller than the second preset threshold, and if the first difference is smaller than the first preset threshold and the second difference is smaller than the second preset threshold, That is, if the first difference and the second difference satisfy the preset condition, step 503 is executed; if the first difference is greater than or equal to the first preset threshold, or the second difference is greater than or equal to the second preset threshold, that is, the first difference is greater than or equal to the second preset threshold. The first difference and the second difference do not meet the preset condition, and step 504 is executed.
  • the first preset threshold value is the threshold value of the absolute value of the difference between the preset first illumination intensity value and the second illumination intensity value.
  • the second preset threshold is the threshold of the absolute value of the difference between the preset first face attitude angle value and the second face attitude angle value.
  • Step 503 when the first difference value and the second difference value satisfy the preset condition, input the first face image and the second face image into the trained single-frame living body detection model, and output the living body detection result.
  • the computer device needs to continue to perform liveness detection based on the first face image and the second face image.
  • the computer device obtains the trained single-frame living body detection model, inputs the first face image and the second face image into the single-frame living body detection model, and outputs the living body detection result.
  • the single-frame living detection model is a model obtained by training the neural network based on the first face image of the sample, the second face image of the sample and the correct detection result. That is, the single-frame living detection model is determined according to the first face image of the sample, the second face image of the sample and the correct detection result.
  • the sample first face image is the original image of the sample face image
  • the sample second face image is an image based on the sample first face image after ISP.
  • the correct detection result is a pre-marked correct living body detection result corresponding to the first face image of the sample and the second face image of the sample.
  • the single-frame living body detection model is used to indicate the correlation between the first face image, the second face image and the living body detection result.
  • the relevant details of the single-frame living body detection model can be analogously referred to the relevant description of the above-mentioned target living body detection model, which will not be repeated here.
  • the single-frame living detection model is obtained by training according to at least one set of sample data sets, and each set of sample data sets includes: a first sample face image, a second sample face image, and a pre-labeled correct detection result.
  • the terminal needs to train the single-frame living body detection model.
  • the training process of the single-frame living body detection model includes: the server obtains a training sample set, the training sample set includes at least one set of sample data sets; and the error back propagation algorithm is used to train the at least one set of sample data sets to obtain a single-frame living body detection model.
  • Step 504 when the first difference value and the second difference value do not meet the preset conditions, output a first detection result, and the first detection result is used to indicate that the object to be detected is a non-living body.
  • the first difference value and the second difference value do not meet the preset conditions, it means that the difference between the first light intensity value and the second light intensity value is large or the difference between the first face posture angle value and the second face posture angle value If the difference is large, the first detection result is directly output, and the first detection result is used to indicate that the object to be detected is not a living body.
  • the first detection result includes a non-living body identifier.
  • the first illumination intensity information includes a first illumination intensity level
  • the second illumination intensity information includes a second illumination intensity level.
  • Step 601 Determine whether the first light intensity level and the second light intensity level are the same level, and whether the absolute value of the difference between the first face pose angle value and the second face pose angle value is less than a second preset threshold.
  • the computer device determines whether the first light intensity level and the second light intensity level are the same level, and whether the absolute value of the difference between the first face posture angle value and the second face posture angle value is less than the second preset threshold, if the first A light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is smaller than the second preset threshold, then go to step 602, if the first If the light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second preset threshold, step 603 is executed.
  • Step 602 when the first light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is less than the second preset threshold
  • the face image and the second face image are input into the trained single-frame living detection model, and the output is to obtain the living body detection result.
  • the computer equipment needs to continue to perform the in vivo process based on the first face image and the second face image. detection.
  • the computer device obtains the trained single-frame living body detection model, inputs the first face image and the second face image into the single-frame living body detection model, and outputs the living body detection result.
  • the computer equipment inputs the first face image and the second face image into the single-frame living body detection model, and the process of outputting the living body detection result can be analogous to the relevant description in the above-mentioned embodiment, which will not be repeated here. .
  • Step 603 when the first light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second preset threshold, A first detection result is outputted, and the first detection result is used to indicate that the object to be detected is a non-living body.
  • the first detection result includes a non-living body identifier.
  • the mobile terminal collects the RAW image of the face, namely the first face image 71 and the normal face image after ISP, namely the second face Image 72, and obtain real-time ambient light information 73 and face posture information 74 through the sensor at the same time, wherein the ambient light information 73 includes the first light intensity value, namely lux_real-time, and the face posture information 74 includes the first face posture angle value i.e. pitch_realtime.
  • the mobile terminal performs face detection and alignment on the second face image 72, after the redundant parts are removed, the remaining valid face image is the third face image 75, and the illumination intensity of the third face image 75 is predicted to obtain the second face image.
  • the light intensity value is lux_prediction
  • the face pose angle is predicted on the third face image to obtain the second face pose angle value, which is pitch_prediction.
  • the directly output living body detection result is a non-living body identification, which is used to indicate that the object to be detected is a non-living body .
  • the algorithm flow of single-frame face living detection is triggered.
  • the first face image 71 and the second face image 72 are input to the single-frame living body detection model 76 and output to obtain a living body detection result, and the living body detection result includes one of a living body identification and a non-living body identification.
  • the method for detecting a face living body also obtains the multimodal information corresponding to the object to be detected after the face recognition function is activated, and the multimodal information includes the initial first face image, the The second face image after ISP, the first light intensity information, and the first face attitude angle value, these kinds of information form multi-modal information as the input parameters of living body detection.
  • the attack range can be narrowed and the attack can be increased.
  • the attacker needs to obtain a specific posture (such as the front) or a photo under specific lighting conditions to attack successfully, and also avoids the delay caused by the need to process multiple frames of images; in another
  • the feature information of the input parameters of the living body detection in each dimension is more abundant, and the accuracy of the living body detection result is improved.
  • the method for detecting a living body of a face further obtains a third face image by performing face detection and alignment on the second face image and then extracting the third face image; and predicting the light intensity of the third face image to obtain the second light intensity information , and predict the face attitude angle of the third face image to obtain the second face attitude angle value; according to the second light intensity information, the second face attitude angle value and the multimodal information, perform living body detection to obtain the living body detection result , based on the acquired multi-modal information, the predicted second light intensity information and the predicted second face attitude angle value, the living body detection is performed, which further ensures the detection effect of the living body detection result.
  • the method for detecting a living body of a face further analyzes the difference between the first light intensity information and the second light intensity information, and the difference between the second face pose angle value and the second face pose angle value. Judgment, if one of the differences is large, it is determined that the object to be detected is a non-living body, and the living body detection result is directly output; if both differences are small, then follow-up is performed according to the first face image and the second face image. Face liveness detection improves the efficiency of liveness detection and further ensures the accuracy of liveness detection results.
  • the face liveness detection method provided by the present application also pre-intercepts preset attack scenarios by adding a preprocessing process before performing liveness detection on multi-modal information after the face recognition function is activated, narrowing the attack range and strengthening the interception. Efficiency and make up for the shortcomings of the single-frame live detection model.
  • FIG. 8 shows a block diagram of a face liveness detection apparatus provided by an exemplary embodiment of the present application.
  • the face liveness detection apparatus can be implemented by software, hardware or a combination of the two to become all or a part of the computer equipment shown in FIG. 1 .
  • the face liveness detection apparatus may include: an acquisition module 810 and a detection module 820 .
  • the obtaining module 810 is configured to obtain multi-modal information corresponding to the object to be detected after the face recognition function is activated, and the multi-modal information includes a face image, ambient light information and face posture information;
  • the detection module 820 is configured to perform living body detection according to the multimodal information to obtain a living body detection result, and the living body detection result is used to indicate whether the object to be detected is a living body.
  • the face image includes an initial first face image and a second face image after image signal processing
  • the ambient light information includes first illumination intensity information
  • the face posture information includes the first The face pose angle value
  • the detection module 820 is further configured to:
  • the living body detection result is obtained by performing living body detection according to the second light intensity information, the second face attitude angle value and the multimodal information.
  • the first illumination intensity information includes a first illumination intensity value
  • the second illumination intensity information includes a second illumination intensity value
  • the detection module 820 is further configured to:
  • the absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
  • the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
  • the first illumination intensity information includes a first illumination intensity value
  • the second illumination intensity information includes a second illumination intensity value
  • the detection module 820 is further configured to:
  • the absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
  • the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
  • the first illumination intensity information includes a first illumination intensity level
  • the second illumination intensity information includes a second illumination intensity level.
  • the detection module 820 is further configured to:
  • the first face The image and the second face image are input to the trained single-frame in vivo detection model, and the output is to obtain the in vivo detection result.
  • the first illumination intensity information includes a first illumination intensity level
  • the second illumination intensity information includes a second illumination intensity level.
  • the detection module 820 is further configured to:
  • the output obtains the first A detection result, the first detection result is used to indicate that the object to be detected is not a living body.
  • the apparatus further includes: a preprocessing module; the preprocessing module is used for:
  • the scene information is used to indicate the current detection scene
  • pre-interception processing is performed on the multi-modal information.
  • An embodiment of the present application provides a computer device, the computer device includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions.
  • the computer device is a terminal or a server. This embodiment does not limit this.
  • Embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are executed in a processor of an electronic device , the processor in the electronic device executes the above method.
  • Embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • a computer-readable storage medium may be a tangible device that retains and stores instructions for use by the instruction execution device.
  • examples of computer-readable storage media include, but are not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing.
  • Computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (Electrically Programmable Read-Only-Memory, EPROM or flash memory), static random access memory (Static Random-Access Memory, SRAM), portable compact disk read-only memory (Compact Disc Read-Only Memory, CD - ROM), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices, such as punch cards or raised structures in grooves on which instructions are stored, and any suitable combination of the foregoing .
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read-only memory
  • EPROM Errically Programmable Read-Only-Memory
  • SRAM static random access memory
  • portable compact disk read-only memory Compact Disc Read-Only Memory
  • CD - ROM Compact Disc Read-Only Memory
  • DVD Digital Video Disc
  • memory sticks floppy disks
  • the computer readable program instructions or code described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present application may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, can be connected to an external computer (e.g. use an internet service provider to connect via the internet).
  • electronic circuits such as programmable logic circuits, Field-Programmable Gate Arrays (FPGA), or Programmable Logic Arrays (Programmable Logic Arrays), are personalized by utilizing state information of computer-readable program instructions.
  • Logic Array, PLA the electronic circuit can execute computer readable program instructions to implement various aspects of the present application.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in hardware (eg, circuits or ASICs (Application) that perform the corresponding functions or actions. Specific Integrated Circuit, application-specific integrated circuit)), or can be implemented by a combination of hardware and software, such as firmware.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The present application relates to the field of artificial intelligence, and in particular, to a face liveness detection method and apparatus, and a storage medium. The method comprises: after enabling a face recognition function, obtaining multimodal information corresponding to an object to be detected, the multimodal information comprising a face image, ambient light information and face gesture information; and performing liveness detection according to the multimodal information to obtain the liveness detection result, the liveness detection result being used for indicating whether said object is a living body. According to embodiments of the present application, liveness detection is performed according to the multimodal information corresponding to said object, and the multimodal information comprises the face image, ambient light information and face gesture information, such that feature information of input parameters of liveness detection in each dimension is more abundant, improving the accuracy of the liveness detection result.

Description

人脸活体检测方法、装置及存储介质Face liveness detection method, device and storage medium
本申请要求于2020年11月30日提交中国专利局、申请号为202011380265.0、申请名称为“人脸活体检测方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011380265.0 and the application title "Facial Liveness Detection Method, Device and Storage Medium" filed with the China Patent Office on November 30, 2020, the entire contents of which are incorporated by reference in in this application.
技术领域technical field
本申请涉及人工智能领域,尤其涉及一种人脸活体检测方法、装置及存储介质。The present application relates to the field of artificial intelligence, and in particular, to a method, a device and a storage medium for detecting a living body of a human face.
背景技术Background technique
人脸活体检测的主要目的是判断当前的人脸是否为活体人脸,以抵挡假人脸的攻击。人脸活体检测是进行人脸识别之前的重要步骤。随着人脸识别在人脸解锁以及人脸支付等诸多重要领域的应用,采用仿冒人脸来攻击人脸识别的问题日益凸显,人脸活体检测是抵挡仿冒人脸攻击的主要技术路径。The main purpose of face liveness detection is to determine whether the current face is a live face, so as to resist the attack of fake faces. Face liveness detection is an important step before face recognition. With the application of face recognition in many important fields such as face unlocking and face payment, the problem of using counterfeit faces to attack face recognition has become increasingly prominent. Face liveness detection is the main technical path to resist counterfeit face attacks.
相关技术中,采集待检测对象对应的图像,基于采集的图像对待检测对象进行活体检测,得到待检测对象的活体检测结果。然而,该种活体检测方法仅关注图像方面的信息,关注的信息较局限,容易被攻击,活体检测结果的准确度较低,活体检测的效果不佳。In the related art, an image corresponding to an object to be detected is collected, and a living body detection of the object to be detected is performed based on the collected image to obtain a living body detection result of the object to be detected. However, this kind of living body detection method only pays attention to the information of the image, and the information concerned is limited and easy to be attacked, the accuracy of the living body detection result is low, and the effect of the living body detection is not good.
发明内容SUMMARY OF THE INVENTION
有鉴于此,提出了一种人脸活体检测方法、装置及存储介质,可以利用多模态信息(包括人脸图像、环境光信息和人脸姿态信息)进行活体检测得到活体检测结果,可提高活体检测结果的准确度。In view of this, a method, device and storage medium for face liveness detection are proposed, which can use multimodal information (including face image, ambient light information and face posture information) to perform liveness detection to obtain liveness detection results, which can improve Accuracy of liveness test results.
第一方面,本申请实施例提供了一种人脸活体检测方法,该方法包括:In a first aspect, an embodiment of the present application provides a face liveness detection method, which includes:
在启动人脸识别功能后,获取待检测对象对应的多模态信息,多模态信息包括人脸图像、环境光信息和人脸姿态信息;After the face recognition function is activated, the multi-modal information corresponding to the object to be detected is obtained, and the multi-modal information includes a face image, ambient light information and face posture information;
根据多模态信息进行活体检测得到活体检测结果,活体检测结果用于指示待检测对象是否为活体。The living body detection result is obtained by performing the living body detection according to the multimodal information, and the living body detection result is used to indicate whether the object to be detected is a living body.
在该实现方式中,在启动人脸识别功能后获取待检测对象对应的多模态信息,根据多模态信息进行活体检测得到活体检测结果,由于该多模态信息包括人脸图像、环境光信息和人脸姿态信息,使得活体检测的输入参数在各个维度的特征信息更加丰富,提高了活体检测结果的准确度。In this implementation, after the face recognition function is activated, the multimodal information corresponding to the object to be detected is obtained, and the living body detection result is obtained by performing living body detection according to the multimodal information. Information and face pose information make the input parameters of the living body detection more abundant in feature information in various dimensions, and improve the accuracy of the living body detection results.
结合第一方面,在第一方面的第一种可能的实现方式中,人脸图像包括初始的第一人脸图像和经过图像信号处理后的第二人脸图像,环境光信息包括第一光照强度信息,人脸姿态信息包括第一人脸姿态角度值。With reference to the first aspect, in a first possible implementation manner of the first aspect, the face image includes an initial first face image and a second face image after image signal processing, and the ambient light information includes a first illumination Intensity information, the face posture information includes the first face posture angle value.
在该实现方式中,多模态信息包括初始的第一人脸图像、经过图像信号处理后的第二人脸图像、第一光照强度信息和第一人脸姿态角度值,这几种信息组成多模态信息作为活体检测的输入参数,在一方面,可以缩小攻击范围,增加攻击难度,降低被 攻击的概率,攻击者需要获取特定姿态(比如正面)或者是特定光照条件下的照片才能攻击成功,同时也避免了因需要处理多帧图像而导致时延的情况;在另一方面,使得活体检测的输入参数在各个维度的特征信息更加丰富,提高了活体检测结果的准确度。In this implementation, the multi-modal information includes the initial first face image, the second face image after image signal processing, the first illumination intensity information, and the first face attitude angle value. These kinds of information are composed of Multimodal information is used as the input parameter of live detection. On the one hand, it can reduce the attack range, increase the difficulty of attack, and reduce the probability of being attacked. The attacker needs to obtain a specific posture (such as the front) or a photo under specific lighting conditions to attack. It is successful, and it also avoids the delay caused by the need to process multiple frames of images; on the other hand, the input parameters of the living body detection are richer in feature information in each dimension, and the accuracy of the living body detection results is improved.
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,根据多模态信息进行活体检测得到活体检测结果,包括:In combination with the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, performing in vivo detection according to multimodal information to obtain in vivo detection results, including:
根据第二人脸图像中人脸所在区域,得到第三人脸图像;obtaining a third face image according to the region where the face is located in the second face image;
对第三人脸图像进行光照强度的预测得到第二光照强度信息,并对第三人脸图像进行人脸姿态角度的预测得到第二人脸姿态角度值;Predicting the light intensity of the third face image to obtain the second light intensity information, and predicting the face attitude angle of the third face image to obtain the second face attitude angle value;
根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果。The living body detection result is obtained by performing living body detection according to the second light intensity information, the second face attitude angle value and the multimodal information.
在该实现方式中,根据第二人脸图像中人脸所在区域,得到第三人脸图像;对第三人脸图像进行光照强度的预测得到第二光照强度信息,并对第三人脸图像进行人脸姿态角度的预测得到第二人脸姿态角度值;根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果,基于获取到的多模态信息、预测的第二光照强度信息和预测的第二人脸姿态角度值进行活体检测,进一步保证了活体检测结果的检测效果。In this implementation, the third face image is obtained according to the region where the face is located in the second face image; the second light intensity information is obtained by predicting the light intensity of the third face image, and the third face image is Predict the face attitude angle to obtain the second face attitude angle value; perform living body detection according to the second light intensity information, the second face attitude angle value and the multimodal information to obtain the living body detection result, and based on the obtained multimodality Information, the predicted second light intensity information, and the predicted second face posture angle value are used for living body detection, which further ensures the detection effect of the living body detection result.
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,第一光照强度信息包括第一光照强度值,第二光照强度信息包括第二光照强度值,根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果,包括:With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the first illumination intensity information includes a first illumination intensity value, and the second illumination intensity information includes a second illumination intensity value , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
将第一光照强度值与第二光照强度值的差值绝对值确定为第一差值,并将第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值确定为第二差值;The absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
当第一差值和第二差值满足预设条件时,将第一人脸图像和第二人脸图像输入至训练好的单帧活体检测模型中,输出得到活体检测结果;When the first difference and the second difference meet the preset conditions, input the first face image and the second face image into the trained single-frame living detection model, and output the living body detection result;
其中,预设条件包括第一差值小于第一预设阈值且第二差值小于第二预设阈值。Wherein, the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
在该实现方式中,先对第一光照强度值与第二光照强度值之间的差异,以及第二人脸姿态角度值与第二人脸姿态角度值之间的差异进行判断,若两个差异都较小,则再根据第一人脸图像和第二人脸图像进行后续的人脸活体检测,提高了活体检测效率,进一步保证了活体检测结果的准确度。In this implementation manner, the difference between the first light intensity value and the second light intensity value, and the difference between the second face pose angle value and the second face pose angle value are first judged. If the difference is small, the subsequent face liveness detection is performed according to the first face image and the second face image, which improves the liveness detection efficiency and further ensures the accuracy of the liveness detection result.
结合第一方面的第二种可能的实现方式,在第一方面的第四种可能的实现方式中,第一光照强度信息包括第一光照强度值,第二光照强度信息包括第二光照强度值,根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果,包括:With reference to the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the first illumination intensity information includes a first illumination intensity value, and the second illumination intensity information includes a second illumination intensity value , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
将第一光照强度值与第二光照强度值的差值绝对值确定为第一差值,并将第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值确定为第二差值;The absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
当第一差值和第二差值不满足预设条件时,输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体;When the first difference and the second difference do not meet the preset condition, outputting a first detection result, where the first detection result is used to indicate that the object to be detected is a non-living body;
其中,预设条件包括第一差值小于第一预设阈值且第二差值小于第二预设阈值。Wherein, the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
在该实现方式中,对第一光照强度值与第二光照强度值之间的差异,以及第二人脸姿态角度值与第二人脸姿态角度值之间的差异进行判断,若其中一个差异较大则确定待检测对象为非活体,直接输出活体检测结果,提高了活体检测效率,进一步保证了活体检测结果的准确度。In this implementation, the difference between the first light intensity value and the second light intensity value, and the difference between the second face pose angle value and the second face pose angle value are judged, if one of the differences If it is larger, it is determined that the object to be detected is not a living body, and the living body detection result is directly output, which improves the living body detection efficiency and further ensures the accuracy of the living body detection result.
结合第一方面的第二种可能的实现方式,在第一方面的第五种可能的实现方式中,第一光照强度信息包括第一光照强度等级,第二光照强度信息包括第二光照强度等级,根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果,包括:With reference to the second possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the first illumination intensity information includes a first illumination intensity level, and the second illumination intensity information includes a second illumination intensity level , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
当第一光照强度等级与第二光照强度等级为同一等级,且第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值小于第二预设阈值时,将第一人脸图像和第二人脸图像输入至训练好的单帧活体检测模型,输出得到活体检测结果。When the first light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is smaller than the second preset threshold, the first face The image and the second face image are input to the trained single-frame in vivo detection model, and the output is to obtain the in vivo detection result.
在该实现方式中,先对第一光照强度等级与第二光照强度等级之间的差异,以及第二人脸姿态角度值与第二人脸姿态角度值之间的差异进行判断,若两个差异都较小,则再根据第一人脸图像和第二人脸图像进行后续的人脸活体检测,提高了活体检测效率,进一步保证了活体检测结果的准确度。In this implementation manner, the difference between the first light intensity level and the second light intensity level, and the difference between the second face pose angle value and the second face pose angle value are judged first. If the difference is small, the subsequent face liveness detection is performed according to the first face image and the second face image, which improves the liveness detection efficiency and further ensures the accuracy of the liveness detection result.
结合第一方面的第二种可能的实现方式,在第一方面的第六种可能的实现方式中,第一光照强度信息包括第一光照强度等级,第二光照强度信息包括第二光照强度等级,根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果,包括:With reference to the second possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the first illumination intensity information includes a first illumination intensity level, and the second illumination intensity information includes a second illumination intensity level , according to the second light intensity information, the second face attitude angle value and the multimodal information, performing live detection to obtain a living body detection result, including:
当第一光照强度等级与第二光照强度等级不是同一等级,或者第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值大于或者等于第二预设阈值时,输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体。When the first light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second preset threshold, the output obtains the first A detection result, the first detection result is used to indicate that the object to be detected is not a living body.
在该实现方式中,对第一光照强度等级与第二光照强度等级之间的差异,以及第二人脸姿态角度值与第二人脸姿态角度值之间的差异进行判断,若其中一个差异较大则确定待检测对象为非活体,直接输出活体检测结果,提高了活体检测效率,进一步保证了活体检测结果的准确度。In this implementation, the difference between the first light intensity level and the second light intensity level, and the difference between the second face posture angle value and the second face posture angle value are judged, if one of the differences If it is larger, it is determined that the object to be detected is not a living body, and the living body detection result is directly output, which improves the living body detection efficiency and further ensures the accuracy of the living body detection result.
结合第一方面,在第一方面的第七种可能的实现方式中,对多模态信息进行活体检测得到活体检测结果之前,还包括:With reference to the first aspect, in a seventh possible implementation manner of the first aspect, before performing the in vivo detection on the multimodal information to obtain the in vivo detection result, the method further includes:
将多模态信息输入至预处理模型中输出得到场景信息,场景信息用于指示当前检测场景;Inputting the multimodal information into the preprocessing model and outputting the scene information, the scene information is used to indicate the current detection scene;
当场景信息用于指示当前检测场景为预设攻击场景时,对多模态信息进行预拦截处理。When the scene information is used to indicate that the current detection scene is a preset attack scene, pre-interception processing is performed on the multi-modal information.
在该实现方式中,在启动人脸识别功能后,在对多模态信息进行活体检测之前加入预处理流程,对预设攻击场景进行预拦截,缩小攻击范围,加强拦截效率和弥补单帧活体检测模型的不足。In this implementation, after the face recognition function is activated, a preprocessing process is added before the multimodal information is detected in vivo, and the preset attack scenarios are pre-intercepted, the attack scope is narrowed, the interception efficiency is enhanced, and the single-frame living body is compensated. Detect model deficiencies.
第二方面,本申请实施例提供了一种人脸活体检测装置,该装置包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行指令时实现上述第一方面或第一方面中的任意一种可能的实现方式所提供的方法。In a second aspect, an embodiment of the present application provides a face liveness detection device, the device includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above-mentioned first when executing the instructions. A method provided by any one of the possible implementations of the aspect or the first aspect.
第三方面,本申请实施例提供了一种人脸活体检测装置,该装置包括至少一个模 块,至少一个模块用于实现上述第一方面或第一方面中的任意一种可能的实现方式所提供的方法。In a third aspect, an embodiment of the present application provides a face liveness detection device, the device includes at least one module, and the at least one module is used to implement the first aspect or any one of the possible implementations of the first aspect. Methods.
第四方面,本申请实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当计算机可读代码在电子设备中运行时,电子设备中的处理器执行上述第一方面或者第一方面中的任意一种可能的实现方式所提供的方法。In a fourth aspect, embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying the computer-readable codes, when the computer-readable codes run in an electronic device At the time, the processor in the electronic device executes the method provided by the first aspect or any one of the possible implementation manners of the first aspect.
第五方面,本申请实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,计算机程序指令被处理器执行时实现上述第一方面或者第一方面中的任意一种可能的实现方式所提供的方法。In a fifth aspect, embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the first aspect or any of the first aspects can be implemented A possible implementation of the provided method.
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本申请的示例性实施例、特征和方面,并且用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features and aspects of the application and together with the description, serve to explain the principles of the application.
图1示出了本申请一个示例性实施例提供的计算机设备的结构示意图。FIG. 1 shows a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application.
图2示出了本申请一个示例性实施例提供的人脸活体检测方法的流程图。FIG. 2 shows a flowchart of a method for detecting a face living body provided by an exemplary embodiment of the present application.
图3示出了本申请另一个示例性实施例提供的人脸活体检测方法的流程图。FIG. 3 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
图4示出了本申请另一个示例性实施例提供的人脸活体检测方法的流程图。FIG. 4 shows a flowchart of a method for detecting a human face liveness provided by another exemplary embodiment of the present application.
图5示出了本申请另一个示例性实施例提供的人脸活体检测方法的流程图。FIG. 5 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
图6示出了本申请另一个示例性实施例提供的人脸活体检测方法的流程图。FIG. 6 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
图7示出了本申请另一个示例性实施例提供的人脸活体检测方法的流程图。FIG. 7 shows a flowchart of a method for detecting a face living body provided by another exemplary embodiment of the present application.
图8示出了本申请一个示例性实施例提供的人脸活体检测装置的框图。FIG. 8 shows a block diagram of a face liveness detection apparatus provided by an exemplary embodiment of the present application.
具体实施方式Detailed ways
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。In addition, in order to better illustrate the present application, numerous specific details are given in the following detailed description. It should be understood by those skilled in the art that the present application may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present application.
首先,对本申请涉及的应用场景进行介绍。First, the application scenarios involved in this application are introduced.
本申请实施例提供了一种人脸活体检测方法,执行主体为计算机设备。请参考图1,其示出了本申请一个示例性实施例提供的计算机设备的结构示意图。An embodiment of the present application provides a method for detecting a face living body, and the execution body is a computer device. Please refer to FIG. 1 , which shows a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application.
该计算机设备可以是终端或者服务器。终端包括移动终端或者固定终端,比如终端可以是手机、平板电脑、膝上型便携计算机和台式计算机等等。服务器可以是一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算服务中心。The computer equipment may be a terminal or a server. The terminal includes a mobile terminal or a stationary terminal, for example, the terminal may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, and the like. The server can be one server, or a server cluster composed of several servers, or a cloud computing service center.
如图1所示,计算机设备包括处理器10、存储器20以及通信接口30。本领域技术人员可以理解,图1中示出的结构并不构成对该计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:As shown in FIG. 1 , the computer device includes a processor 10 , a memory 20 and a communication interface 30 . Those skilled in the art can understand that the structure shown in FIG. 1 does not constitute a limitation on the computer device, and may include more or less components than the one shown, or combine some components, or arrange different components. in:
处理器10是计算机设备的控制中心,利用各种接口和线路连接整个计算机设备的各个部分,通过运行或执行存储在存储器20内的软件程序和/或模块,以及调用存储在存储器20内的数据,执行计算机设备的各种功能和处理数据,从而对计算机设备进行整体控制。处理器10可以由CPU实现,也可以由图形处理器(Graphics Processing Unit,GPU)实现。The processor 10 is the control center of the computer equipment, using various interfaces and lines to connect various parts of the entire computer equipment, by running or executing the software programs and/or modules stored in the memory 20, and calling the data stored in the memory 20. , perform various functions of computer equipment and process data, so as to carry out overall control of computer equipment. The processor 10 may be implemented by a CPU, or may be implemented by a graphics processor (Graphics Processing Unit, GPU).
存储器20可用于存储软件程序以及模块。处理器10通过运行存储在存储器20的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器20可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统21、获取模块22、检测模块23和至少一个功能所需的应用程序24(比如神经网络训练等)等;存储数据区可存储根据计算机设备的使用所创建的数据等。存储器20可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM),可编程只读存储器(Programmable Read-Only Memory,PROM),只读存储器(Read Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。相应地,存储器20还可以包括存储器控制器,以提供处理器10对存储器20的访问。The memory 20 may be used to store software programs and modules. The processor 10 executes various functional applications and data processing by executing software programs and modules stored in the memory 20 . The memory 20 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system 21, an acquisition module 22, a detection module 23, and an application program 24 (such as neural network training, etc.) required for at least one function; The storage data area may store data or the like created according to the use of the computer device. The memory 20 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable). Programmable Read-Only Memory, EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read Only Memory (Read Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk. Accordingly, memory 20 may also include a memory controller to provide processor 10 access to memory 20 .
其中,处理器20通过运行获取模块22执行以下功能:该计算机设备在启动人脸识别功能后,获取待检测对象对应的多模态信息,多模态信息包括人脸图像、环境光信息和人脸姿态信息;处理器20通过运行检测模块23执行以下功能:根据多模态信息进行活体检测得到用于指示待检测对象是否为活体的活体检测结果。Wherein, the processor 20 performs the following functions by running the acquisition module 22: after the computer device starts the face recognition function, it acquires multimodal information corresponding to the object to be detected, and the multimodal information includes a face image, ambient light information and human face posture information; the processor 20 performs the following functions by running the detection module 23: performing living body detection according to the multimodal information to obtain a living body detection result used to indicate whether the object to be detected is a living body.
本申请实施例提供的方法,可以应用于人脸活体检测的任一检测场景下。示意性的,在金融领域中,存在对于人脸活体检测的需求。用户可以通过智能手机进行转账、支付或修改账户信息等需要进行身份验证的操作。比如,当通过智能手机采集到用户的多个人脸图像时,该智能手机可以采用本申请提供的人脸活体检测方法,对用户甲的身份进行识别,从而判定本次操作是否由用户甲本人发起的。示意性的,在安防领域中,可以利用自助通关设备进行通关检查。比如,用户乙通过自助通关设备进行通关检查,该自助通关设备可以采用本申请提供的人脸活体检测方法,对采集到的用户乙头像进行活体检测,以识别是否冒用身份。示意性的,在考勤领域中,可以应用于人脸打卡机或人脸门禁系统中。比如,用户丙在打卡或者解锁门禁时对其进行人脸活体检测,以防止代他人打卡或无关人员冒用身份。本申请实施例提供的方法还可以应用于其他的人脸解锁或者人脸支付场景,此处不对检索场景进行穷举。The method provided by the embodiment of the present application can be applied to any detection scenario of face liveness detection. Illustratively, in the financial field, there is a demand for face liveness detection. Users can perform operations that require authentication, such as transfers, payments, or modification of account information through their smartphones. For example, when multiple face images of a user are collected through a smartphone, the smartphone can use the face liveness detection method provided in this application to identify the identity of user A, so as to determine whether the operation is initiated by user A himself of. Illustratively, in the security field, self-service customs clearance equipment can be used for customs clearance inspection. For example, user B conducts customs clearance inspection through self-service customs clearance equipment. The self-service customs clearance equipment can use the face liveness detection method provided in this application to conduct liveness detection on the collected avatar of user B to identify whether the identity is fraudulently used. Illustratively, in the field of attendance, it can be applied to face punch cards or face access control systems. For example, when user C punches in or unlocks the access control, his face is detected to prevent him from punching in on behalf of others or unrelated persons from fraudulently using their identities. The methods provided in the embodiments of the present application can also be applied to other face unlocking or face payment scenarios, and the retrieval scenarios are not exhaustively described here.
下面,采用几个示例性实施例对本申请实施例提供的人脸活体检测方法的进行介绍。Hereinafter, several exemplary embodiments are used to introduce the face liveness detection method provided by the embodiments of the present application.
请参考图2,其示出了本申请一个示例性实施例提供的人脸活体检测方法的流程 图,本实施例以该方法用于图1所示的计算机设备中来举例说明。该方法包括以下几个步骤。Please refer to FIG. 2 , which shows a flowchart of a method for detecting a face liveness provided by an exemplary embodiment of the present application. This embodiment is illustrated by using the method in the computer device shown in FIG. 1 . The method includes the following steps.
步骤201,在启动人脸识别功能后,获取待检测对象对应的多模态信息,多模态信息包括人脸图像、环境光信息和人脸姿态信息。 Step 201 , after the face recognition function is activated, obtain multimodal information corresponding to the object to be detected, where the multimodal information includes a face image, ambient light information and face posture information.
可选地,当计算机设备接收到预设触发信号时启动人脸识别功能,获取待检测对象对应的多模态信息。Optionally, when the computer device receives the preset trigger signal, the face recognition function is activated to obtain multimodal information corresponding to the object to be detected.
示意性的,预设触发信号为触发启动人脸识别功能的用户操作信号。比如,预设触发信号包括点击操作信号、滑动操作信号、双击操作信号、长按操作信号中的任意一种或多种的组合。Illustratively, the preset trigger signal is a user operation signal that triggers the activation of the face recognition function. For example, the preset trigger signal includes any one or a combination of a click operation signal, a slide operation signal, a double-click operation signal, and a long-press operation signal.
在其它可能的实现方式中,预设触发信号也可以语音形式实现。比如,计算机设备接收用户输入的语音信号,对该语音信号进行解析获取语音内容,当语音内容中存在预设关键字词时,表示终端接收到预设触发信号,启动人脸识别功能。In other possible implementation manners, the preset trigger signal may also be implemented in the form of voice. For example, a computer device receives a voice signal input by a user, and analyzes the voice signal to obtain voice content. When a preset keyword exists in the voice content, it means that the terminal receives a preset trigger signal and activates the face recognition function.
可选地,计算机设备获取待检测对象对应的多模态信息包括:通过摄像头采集人脸图像,并通过传感器采集环境光信息和人脸姿态信息。Optionally, acquiring the multimodal information corresponding to the object to be detected by the computer device includes: collecting a face image through a camera, and collecting ambient light information and face posture information through a sensor.
可选地,计算机设备通过传感器实时采集或者每隔预设时间间隔采集环境光信息和人脸姿态信息。其中,预设时间间隔为默认设置的,或者自定义设置的,本实施例对此不加以限定。为了方便介绍,下面仅以通过传感器实时采集环境光信息和人脸姿态信息,即环境光信息和人脸姿态信息均为实时的信息为例进行说明。Optionally, the computer device collects the ambient light information and the face posture information in real time through sensors or at preset time intervals. The preset time interval is a default setting or a self-defined setting, which is not limited in this embodiment. For the convenience of introduction, the following description only takes the real-time collection of ambient light information and face posture information by sensors, that is, the ambient light information and the face posture information are both real-time information as an example for description.
示意性的,计算机设备通过光线传感器采集实时的环境光信息,通过方向传感器采集实时的人脸姿态信息。本申请实施例对传感器的类型不加以限定。Illustratively, the computer device collects real-time ambient light information through a light sensor, and collects real-time face posture information through a direction sensor. The embodiment of the present application does not limit the type of the sensor.
可选地,人脸图像包括初始的第一人脸图像和经过图像信号处理(Image Signal Processing,ISP)后的第二人脸图像。其中,第一人脸图像也称人脸RAW图,第一人脸图像为包括待检测对象的人脸的原始图像。第二人脸图像为基于第一人脸图像经过ISP后的图像。Optionally, the face image includes an initial first face image and a second face image after image signal processing (Image Signal Processing, ISP). The first face image is also called a face RAW image, and the first face image is an original image including the face of the object to be detected. The second face image is an image after passing through the ISP based on the first face image.
其中,环境光信息用于指示待检测对象的人脸对应的光照情况,人脸姿态信息用于指示待检测对象的人脸朝向情况。The ambient light information is used to indicate the lighting situation corresponding to the face of the object to be detected, and the face posture information is used to indicate the orientation of the face of the object to be detected.
可选地,环境光信息包括第一光照强度信息,第一光照强度信息包括第一光照强度值或第一光照强度等级。Optionally, the ambient light information includes first illumination intensity information, and the first illumination intensity information includes a first illumination intensity value or a first illumination intensity level.
可选地,人脸姿态信息包括第一人脸姿态角度值,第一人脸姿态角度值为待检测对象的人脸朝向的角度值。Optionally, the face pose information includes a first face pose angle value, and the first face pose angle value is an angle value of the face orientation of the object to be detected.
步骤202,根据多模态信息进行活体检测得到活体检测结果,活体检测结果用于指示待检测对象是否为活体。 Step 202 , performing living body detection according to the multimodal information to obtain a living body detection result, and the living body detection result is used to indicate whether the object to be detected is a living body.
计算机设备根据多模态信息进行活体检测得到活体检测结果,活体检测结果用于指示待检测对象是否为活体。The computer device performs a living body detection according to the multimodal information to obtain a living body detection result, and the living body detection result is used to indicate whether the object to be detected is a living body.
可选地,计算机设备调用训练好的目标活体检测模型对多模态信息进行活体检测,输出得到活体检测结果。Optionally, the computer device invokes the trained target in vivo detection model to perform in vivo detection on the multimodal information, and outputs the in vivo detection result.
其中,目标活体检测模型是基于样本多模态信息和正确检测结果对神经网络进行训练得到的模型。即目标活体检测模型是根据样本多模态信息和正确检测结果所确定的。其中,正确检测结果为预先标注的与样本多模态信息对应的正确的活体检测结果。Among them, the target living detection model is a model obtained by training a neural network based on the multimodal information of the sample and the correct detection result. That is, the target living detection model is determined according to the multimodal information of the sample and the correct detection result. The correct detection result is a pre-marked correct living body detection result corresponding to the multimodal information of the sample.
目标活体检测模型用于指示多模态信息与活体检测结果之间的相关关系。The target liveness detection model is used to indicate the correlation between the multimodal information and the liveness detection results.
目标活体检测模型为预设的数学模型,该目标活体检测模型包括多模态信息与活体检测结果之间的模型系数。模型系数可以为固定值,也可以是随时间动态修改的值,还可以是随着检测场景动态修改的值。The target living body detection model is a preset mathematical model, and the target living body detection model includes a model coefficient between the multimodal information and the living body detection result. The model coefficient may be a fixed value, a value that is dynamically modified with time, or a value that is dynamically modified with the detection scene.
可选的,目标活体检测模型包括深度神经网络(Deep Neural Network,DNN)模型、循环神经网络(Recurrent Neural Networks,RNN)模型、嵌入(embedding)模型、梯度提升决策树(Gradient Boosting Decision Tree,GBDT)模型、逻辑回归(Logistic Regression,LR)模型中的至少一种。Optionally, the target live detection model includes a deep neural network (Deep Neural Network, DNN) model, a recurrent neural network (Recurrent Neural Networks, RNN) model, an embedding (embedding) model, and a gradient boosting decision tree (Gradient Boosting Decision Tree, GBDT) ) model and at least one of a logistic regression (Logistic Regression, LR) model.
可选地,活体检测结果包括第一检测结果和第二检测结果中的一种,第一检测结果用于指示待检测对象为非活体,第二检测结果用于指示待检测对象为活体。比如,第一检测结果为第一标识,第二检测结果为第二标识,第二标识不同于第一标识。本申请实施例对此不加以限定。Optionally, the living body detection result includes one of a first detection result and a second detection result, the first detection result is used to indicate that the object to be detected is a non-living body, and the second detection result is used to indicate that the object to be detected is a living body. For example, the first detection result is the first identification, the second detection result is the second identification, and the second identification is different from the first identification. This embodiment of the present application does not limit this.
在一个示意性的例子中,如图3所示,移动终端处于息屏状态,当移动终端检测到作用于屏幕的双击操作信号或者作用于开机按键的点击操作信号时,启动人脸解锁流程,移动终端通过摄像头采集初始的第一人脸图像31和经过ISP后的第二人脸图像32,并通过传感器实时采集环境光信息33和人脸姿态信息34,将第一人脸图像31、第二人脸图像32、环境光信息33和人脸姿态信息34输入至目标活体检测模型35中输出得到活体检测结果,活体检测结果包括活体标识和非活体标识中的一种。In a schematic example, as shown in FIG. 3 , the mobile terminal is in an off-screen state, and when the mobile terminal detects a double-click operation signal acting on the screen or a click operation signal acting on the power-on button, the face unlocking process is started, The mobile terminal collects the initial first face image 31 and the second face image 32 after ISP through the camera, and collects the ambient light information 33 and the face posture information 34 in real time through the sensor, and the first face image 31, the first face image 31, the second face The two face images 32 , ambient light information 33 and face posture information 34 are input into the target living body detection model 35 and output to obtain a living body detection result. The living body detection result includes one of a living body identification and a non-living body identification.
综上所述,本申请提供的人脸活体检测方法,在启动人脸识别功能后获取待检测对象对应的多模态信息,根据多模态信息进行活体检测得到活体检测结果,由于该多模态信息包括人脸图像、环境光信息和人脸姿态信息,使得活体检测的输入参数在各个维度的特征信息更加丰富,提高了活体检测结果的准确度。To sum up, the method for detecting a living body of a face provided by the present application obtains the multimodal information corresponding to the object to be detected after the face recognition function is activated, and performs the living body detection according to the multimodal information to obtain the living body detection result. The state information includes face image, ambient light information and face pose information, which enriches the feature information of input parameters of living body detection in various dimensions and improves the accuracy of living body detection results.
请参考图4,其示出了本申请另一个示例性实施例提供的人脸活体检测方法的流程图,本实施例以该方法用于图1所示的计算机设备中来举例说明。该方法包括以下几个步骤。Please refer to FIG. 4 , which shows a flowchart of a method for detecting a face liveness provided by another exemplary embodiment of the present application. This embodiment is exemplified by using the method in the computer device shown in FIG. 1 . The method includes the following steps.
步骤401,在启动人脸识别功能后,获取待检测对象对应的多模态信息,多模态信息包括初始的第一人脸图像、经过ISP后的第二人脸图像、第一光照强度信息和第一人脸姿态角度值。 Step 401, after the face recognition function is activated, obtain the multimodal information corresponding to the object to be detected, and the multimodal information includes the initial first face image, the second face image after ISP, and the first light intensity information and the first face pose angle value.
可选地,第一光照强度信息包括第一光照强度值或第一光照强度等级。Optionally, the first light intensity information includes a first light intensity value or a first light intensity level.
需要说明的是,计算机设备在启动人脸识别功能后,获取待检测对象对应的多模态信息的过程可参考上述实施例中的相关细节,在此不再赘述。It should be noted that, after the computer device starts the face recognition function, the process of acquiring the multimodal information corresponding to the object to be detected may refer to the relevant details in the above-mentioned embodiments, which will not be repeated here.
计算机设备对多模态信息进行活体检测得到活体检测结果之前,还可以加入任意一种预处理流程,对预设攻击场景进进行预拦截。可选地,计算机设备将多模态信息输入至预处理模型中输出得到场景信息,场景信息用于指示当前检测场景;当场景信息用于指示当前检测场景为预设攻击场景时,对多模态信息进行预拦截处理。Before the computer equipment performs liveness detection on the multimodal information to obtain the liveness detection result, any preprocessing process can be added to pre-intercept the preset attack scenarios. Optionally, the computer device inputs the multimodal information into the preprocessing model and outputs the scene information, where the scene information is used to indicate the current detection scene; when the scene information is used to indicate that the current detection scene is a preset attack scene, state information for pre-interception processing.
其中,预处理模型为基于样本多模态信息和正确场景信息对神经网络进行训练得到的模型。即预处理模型是根据样本多模态信息和正确场景信息所确定的。其中,正确场景信息为预先标注的与样本多模态信息对应的正确的场景信息。Among them, the preprocessing model is a model obtained by training a neural network based on sample multimodal information and correct scene information. That is, the preprocessing model is determined according to the sample multimodal information and the correct scene information. The correct scene information is pre-marked correct scene information corresponding to the sample multimodal information.
预处理模型用于指示多模态信息与场景信息之间的相关关系。预处理模型的相关细节可类比参考上述目标活体检测模型的相关描述,在此不再赘述。The preprocessing model is used to indicate the correlation between multimodal information and scene information. For the relevant details of the preprocessing model, reference can be made to the relevant description of the above-mentioned target living body detection model, which will not be repeated here.
其中,场景信息用于指示当前检测场景。计算机设备判断当前检测场景是否为预设攻击场景,若当前检测场景为预设攻击场景,则对多模态信息进行预拦截处理,不进行后续的活体检测步骤,输出提示信息,提示信息用于指示当前检测场景为预设攻击场景;或者,输出第一检测结果,第一检测结果用于指示待检测对象为非活体。The scene information is used to indicate the current detection scene. The computer device determines whether the current detection scene is a preset attack scene, and if the current detection scene is a preset attack scene, pre-interception processing is performed on the multi-modal information, and subsequent living body detection steps are not performed, and prompt information is output, and the prompt information is used for Indicates that the current detection scene is a preset attack scene; or, outputs a first detection result, where the first detection result is used to indicate that the object to be detected is a non-living body.
若当前检测场景不是预设攻击场景,则计算机设备继续执行后续的活体检测步骤。If the current detection scene is not the preset attack scene, the computer device continues to perform the subsequent living body detection steps.
步骤402,根据第二人脸图像中人脸所在区域,得到第三人脸图像。Step 402: Obtain a third face image according to the region where the face is located in the second face image.
可选的,计算机设备对第二人脸图像进行人脸检测对齐得到第二人脸图像中的人脸区域,对人脸区域进行剪裁处理得到第三人脸图像。其中,第三人脸图像是第二人脸图像经过人脸检测对齐后抠出得到的有效人脸图像。Optionally, the computer device performs face detection and alignment on the second face image to obtain a face region in the second face image, and performs clipping processing on the face region to obtain a third face image. Wherein, the third face image is a valid face image obtained by cutting out the second face image after face detection and alignment.
步骤403,对第三人脸图像进行光照强度的预测得到第二光照强度信息,并对第三人脸图像进行人脸姿态角度的预测得到第二人脸姿态角度值。 Step 403 , predicting the illumination intensity of the third face image to obtain second illumination intensity information, and predicting the face attitude angle of the third face image to obtain the second face attitude angle value.
计算机设备通过预测工具对第三人脸图像进行光照强度的预测得到预测的第二光照强度信息,并对第三人脸图像进行人脸姿态角度的预测得到预测的第二人脸姿态角度值。The computer device predicts the illumination intensity of the third face image by the prediction tool to obtain the predicted second illumination intensity information, and predicts the face posture angle of the third face image to obtain the predicted second face posture angle value.
可选地,计算机设备基于神经网络的分类器,对第三人脸图像进行光照强度的预测得到第二光照强度信息。可选地,计算机设备对第三人脸图像进行人脸关键点计算,将欧拉角中的pitch值确定为第二人脸姿态角度值。本申请实施例对预测方式不加以限定。Optionally, the computer device predicts the illumination intensity of the third face image based on a neural network classifier to obtain the second illumination intensity information. Optionally, the computer device performs face key point calculation on the third face image, and determines the pitch value in the Euler angle as the second face pose angle value. The embodiment of the present application does not limit the prediction manner.
步骤404,根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果。Step 404: Perform living body detection according to the second illumination intensity information, the second face attitude angle value and the multimodal information to obtain a living body detection result.
计算机设备根据预测的第二光照强度信息、预测的第二人脸姿态角度值和采集的多模态信息进行活体检测得到活体检测结果。The computer device performs living body detection according to the predicted second light intensity information, the predicted second face attitude angle value and the collected multimodal information to obtain a living body detection result.
在一种可能的实现方式中,第一光照强度信息包括第一光照强度值,第二光照强度信息包括第二光照强度值,上述步骤404可以被替换实现成为如下步骤,如图5所示:In a possible implementation manner, the first illumination intensity information includes a first illumination intensity value, and the second illumination intensity information includes a second illumination intensity value. The above step 404 can be replaced by the following steps, as shown in FIG. 5 :
步骤501,将第一光照强度值与第二光照强度值的差值绝对值确定为第一差值,并将第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值确定为第二差值。Step 501: Determine the absolute value of the difference between the first light intensity value and the second light intensity value as the first difference value, and determine the absolute value of the difference between the first face posture angle value and the second face posture angle value. is the second difference.
计算机设备将第一光照强度值与第二光照强度值的差值绝对值确定为第一差值,并将第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值确定为第二差值。The computer device determines the absolute value of the difference between the first light intensity value and the second light intensity value as the first difference, and determines the absolute value of the difference between the first face pose angle value and the second face pose angle value as second difference.
步骤502,判断第一差值和第二差值是否满足预设条件,预设条件包括第一差值小于第一预设阈值且第二差值小于第二预设阈值。 Step 502 , determine whether the first difference value and the second difference value satisfy a preset condition, and the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
计算机设备判断第一差值是否小于第一预设阈值且第二差值是否小于第二预设阈值,若第一差值小于第一预设阈值且第二差值小于第二预设阈值,即第一差值和第二差值满足预设条件,执行步骤503;若第一差值大于或等于第一预设阈值,或者,第二差值大于或等于第二预设阈值,即第一差值和第二差值不满足预设条件,执行步骤504。The computer device determines whether the first difference is smaller than the first preset threshold and whether the second difference is smaller than the second preset threshold, and if the first difference is smaller than the first preset threshold and the second difference is smaller than the second preset threshold, That is, if the first difference and the second difference satisfy the preset condition, step 503 is executed; if the first difference is greater than or equal to the first preset threshold, or the second difference is greater than or equal to the second preset threshold, that is, the first difference is greater than or equal to the second preset threshold. The first difference and the second difference do not meet the preset condition, and step 504 is executed.
其中,第一预设阈值为预设的第一光照强度值与第二光照强度值的差值绝对值的 阈值。,第二预设阈值为预设的第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值的阈值。Wherein, the first preset threshold value is the threshold value of the absolute value of the difference between the preset first illumination intensity value and the second illumination intensity value. , and the second preset threshold is the threshold of the absolute value of the difference between the preset first face attitude angle value and the second face attitude angle value.
步骤503,当第一差值和第二差值满足预设条件时,将第一人脸图像和第二人脸图像输入至训练好的单帧活体检测模型中,输出得到活体检测结果。 Step 503, when the first difference value and the second difference value satisfy the preset condition, input the first face image and the second face image into the trained single-frame living body detection model, and output the living body detection result.
当第一差值和第二差值满足预设条件时,表示第一光照强度值与第二光照强度值的差异较小且第一人脸姿态角度值与第二人脸姿态角度值的差异较小,计算机设备需要基于第一人脸图像和第二人脸图像继续进行活体检测。When the first difference value and the second difference value satisfy the preset condition, it means that the difference between the first light intensity value and the second light intensity value is small and the difference between the first face pose angle value and the second face pose angle value Smaller, the computer device needs to continue to perform liveness detection based on the first face image and the second face image.
可选地,计算机设备获取训练好的单帧活体检测模型,将第一人脸图像和第二人脸图像输入至单帧活体检测模型中,输出得到活体检测结果。Optionally, the computer device obtains the trained single-frame living body detection model, inputs the first face image and the second face image into the single-frame living body detection model, and outputs the living body detection result.
单帧活体检测模型是基于样本第一人脸图像、样本第二人脸图像和正确检测结果对神经网络进行训练得到的模型。即单帧活体检测模型是根据样本第一人脸图像、样本第二人脸图像和正确检测结果所确定的。其中,样本第一人脸图像为样本人脸图像的原始图像、样本第二人脸图像为基于样本第一人脸图像经过ISP后的图像。正确检测结果为预先标注的与样本第一人脸图像、样本第二人脸图像对应的正确的活体检测结果。The single-frame living detection model is a model obtained by training the neural network based on the first face image of the sample, the second face image of the sample and the correct detection result. That is, the single-frame living detection model is determined according to the first face image of the sample, the second face image of the sample and the correct detection result. The sample first face image is the original image of the sample face image, and the sample second face image is an image based on the sample first face image after ISP. The correct detection result is a pre-marked correct living body detection result corresponding to the first face image of the sample and the second face image of the sample.
单帧活体检测模型用于指示第一人脸图像、第二人脸图像与活体检测结果之间的相关关系。单帧活体检测模型的相关细节可类比参考上述目标活体检测模型的相关描述,在此不再赘述。The single-frame living body detection model is used to indicate the correlation between the first face image, the second face image and the living body detection result. The relevant details of the single-frame living body detection model can be analogously referred to the relevant description of the above-mentioned target living body detection model, which will not be repeated here.
可选地,单帧活体检测模型是根据至少一组样本数据组训练得到的,每组样本数据组包括:样本第一人脸图像、样本第二人脸图像和预先标注的正确检测结果。Optionally, the single-frame living detection model is obtained by training according to at least one set of sample data sets, and each set of sample data sets includes: a first sample face image, a second sample face image, and a pre-labeled correct detection result.
可选的,在计算机设备获取单帧活体检测模型之前,终端需要对单帧活体检测模型进行训练。单帧活体检测模型的训练过程包括:服务器获取训练样本集,训练样本集包括至少一组样本数据组;对至少一组样本数据组采用误差反向传播算法进行训练,得到单帧活体检测模型。Optionally, before the computer device acquires the single-frame living body detection model, the terminal needs to train the single-frame living body detection model. The training process of the single-frame living body detection model includes: the server obtains a training sample set, the training sample set includes at least one set of sample data sets; and the error back propagation algorithm is used to train the at least one set of sample data sets to obtain a single-frame living body detection model.
步骤504,当第一差值和第二差值不满足预设条件时,输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体。 Step 504, when the first difference value and the second difference value do not meet the preset conditions, output a first detection result, and the first detection result is used to indicate that the object to be detected is a non-living body.
当第一差值和第二差值不满足预设条件时,表示第一光照强度值与第二光照强度值的差异较大或者第一人脸姿态角度值与第二人脸姿态角度值的差异较大,直接输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体。比如,第一检测结果包括非活体标识。When the first difference value and the second difference value do not meet the preset conditions, it means that the difference between the first light intensity value and the second light intensity value is large or the difference between the first face posture angle value and the second face posture angle value If the difference is large, the first detection result is directly output, and the first detection result is used to indicate that the object to be detected is not a living body. For example, the first detection result includes a non-living body identifier.
在另一种可能的实现方式中,第一光照强度信息包括第一光照强度等级,第二光照强度信息包括第二光照强度等级,上述步骤404可以被替换实现成为如下步骤,如图6所示:In another possible implementation manner, the first illumination intensity information includes a first illumination intensity level, and the second illumination intensity information includes a second illumination intensity level. The above step 404 may be replaced by the following steps, as shown in FIG. 6 . :
步骤601,判断第一光照强度等级与第二光照强度等级是否为同一等级,且第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值是否小于第二预设阈值。Step 601: Determine whether the first light intensity level and the second light intensity level are the same level, and whether the absolute value of the difference between the first face pose angle value and the second face pose angle value is less than a second preset threshold.
计算机设备判断第一光照强度等级与第二光照强度等级是否为同一等级,且第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值是否小于第二预设阈值,若第一光照强度等级与第二光照强度等级为同一等级,且第一人脸姿态角度值与第二人脸姿 态角度值的差值绝对值小于第二预设阈值,则执行步骤602,若第一光照强度等级与第二光照强度等级不是同一等级,或者第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值大于或者等于第二预设阈值,则执行步骤603。The computer device determines whether the first light intensity level and the second light intensity level are the same level, and whether the absolute value of the difference between the first face posture angle value and the second face posture angle value is less than the second preset threshold, if the first A light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is smaller than the second preset threshold, then go to step 602, if the first If the light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second preset threshold, step 603 is executed.
步骤602,当第一光照强度等级与第二光照强度等级为同一等级,且第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值小于第二预设阈值时,将第一人脸图像和第二人脸图像输入至训练好的单帧活体检测模型中,输出得到活体检测结果。 Step 602, when the first light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is less than the second preset threshold The face image and the second face image are input into the trained single-frame living detection model, and the output is to obtain the living body detection result.
当第一光照强度等级与第二光照强度等级为同一等级,且第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值小于第二预设阈值时,表示第一光照强度值与第二光照强度值的差异较小且第一人脸姿态角度值与第二人脸姿态角度值的差异较小,计算机设备需要基于第一人脸图像和第二人脸图像继续进行活体检测。When the first light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is smaller than the second preset threshold, it indicates that the first light intensity The difference between the value and the second light intensity value is small, and the difference between the first face posture angle value and the second face posture angle value is small, and the computer equipment needs to continue to perform the in vivo process based on the first face image and the second face image. detection.
可选地,计算机设备获取训练好的单帧活体检测模型,将第一人脸图像和第二人脸图像输入至单帧活体检测模型,输出得到活体检测结果。Optionally, the computer device obtains the trained single-frame living body detection model, inputs the first face image and the second face image into the single-frame living body detection model, and outputs the living body detection result.
需要说明的是,计算机设备将第一人脸图像和第二人脸图像输入至单帧活体检测模型,输出得到活体检测结果的过程可类比参考上述实施例中的相关描述,在此不再赘述。It should be noted that, the computer equipment inputs the first face image and the second face image into the single-frame living body detection model, and the process of outputting the living body detection result can be analogous to the relevant description in the above-mentioned embodiment, which will not be repeated here. .
步骤603,当第一光照强度等级与第二光照强度等级不是同一等级,或者第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值大于或者等于第二预设阈值时,输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体。 Step 603, when the first light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second preset threshold, A first detection result is outputted, and the first detection result is used to indicate that the object to be detected is a non-living body.
当第一光照强度等级与第二光照强度等级不是同一等级,或者第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值大于或者等于第二预设阈值时,表示第一光照强度值与第二光照强度值的差异较大或者第一人脸姿态角度值与第二人脸姿态角度值的差异较大,直接输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体。比如,第一检测结果包括非活体标识。When the first light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second preset threshold, it means that the first The difference between the light intensity value and the second light intensity value is large or the difference between the first face attitude angle value and the second face attitude angle value is large, and the first detection result is directly output, and the first detection result is used to indicate the waiting The detection object is a non-living body. For example, the first detection result includes a non-living body identifier.
在一个示意性的例子中,如图7所示,移动终端在启动人脸识别功能后,采集人脸RAW图即第一人脸图像71和经过ISP后的正常人脸图像即第二人脸图像72,并同时通过传感器获取实时的环境光信息73和人脸姿态信息74,其中环境光信息73包括第一光照强度值即lux_实时,人脸姿态信息74包括第一人脸姿态角度值即pitch_实时。移动终端对第二人脸图像72进行人脸检测对齐后,被抠除多余部位后剩余有效人脸图像即第三人脸图像75,对第三人脸图像75进行光照强度的预测得到第二光照强度值即lux_预测,并对第三人脸图像进行人脸姿态角度的预测得到第二人脸姿态角度值即pitch_预测。将lux_实时与lux_预测的差值绝对值确定为第一差值即lux_差值,并将pitch_实时与pitch_预测的差值绝对值确定为pitch_差值,判断lux_差值是否小于第一预设阈值且pitch_差值是否小于第二预设阈值。当lux_差值大于或等于第一预设阈值,或者,pitch_差值大于或等于第二预设阈值时,直接输出的活体检测结果为非活体标识,用于指示待检测对象为非活体。当lux_差值小于第一预设阈值且pitch_差值小于第二预设阈值时,触发单帧人脸活体检测算法流程。将第一人脸图像71和第二人脸图像72输入至单帧活体检测模型76输出得到活体检测结果,活体检测结果包括活体标识和非活体标识中的一种。In a schematic example, as shown in FIG. 7 , after starting the face recognition function, the mobile terminal collects the RAW image of the face, namely the first face image 71 and the normal face image after ISP, namely the second face Image 72, and obtain real-time ambient light information 73 and face posture information 74 through the sensor at the same time, wherein the ambient light information 73 includes the first light intensity value, namely lux_real-time, and the face posture information 74 includes the first face posture angle value i.e. pitch_realtime. After the mobile terminal performs face detection and alignment on the second face image 72, after the redundant parts are removed, the remaining valid face image is the third face image 75, and the illumination intensity of the third face image 75 is predicted to obtain the second face image. The light intensity value is lux_prediction, and the face pose angle is predicted on the third face image to obtain the second face pose angle value, which is pitch_prediction. Determine the absolute value of the difference between lux_real time and lux_prediction as the first difference, that is, lux_difference, and determine the absolute value of the difference between pitch_realtime and pitch_prediction as pitch_difference, and judge lux_difference Whether the value is less than the first preset threshold and whether the pitch_difference is less than the second preset threshold. When the lux_difference is greater than or equal to the first preset threshold, or the pitch_difference is greater than or equal to the second preset threshold, the directly output living body detection result is a non-living body identification, which is used to indicate that the object to be detected is a non-living body . When the lux_difference is less than the first preset threshold and the pitch_difference is less than the second preset threshold, the algorithm flow of single-frame face living detection is triggered. The first face image 71 and the second face image 72 are input to the single-frame living body detection model 76 and output to obtain a living body detection result, and the living body detection result includes one of a living body identification and a non-living body identification.
综上所述,本申请提供的人脸活体检测方法,还通过在启动人脸识别功能后,获 取待检测对象对应的多模态信息,多模态信息包括初始的第一人脸图像、经过ISP后的第二人脸图像、第一光照强度信息和第一人脸姿态角度值,这几种信息组成多模态信息作为活体检测的输入参数,在一方面,可以缩小攻击范围,增加攻击难度,降低被攻击的概率,攻击者需要获取特定姿态(比如正面)或者是特定光照条件下的照片才能攻击成功,同时也避免了因需要处理多帧图像而导致时延的情况;在另一方面,使得活体检测的输入参数在各个维度的特征信息更加丰富,提高了活体检测结果的准确度。To sum up, the method for detecting a face living body provided by the present application also obtains the multimodal information corresponding to the object to be detected after the face recognition function is activated, and the multimodal information includes the initial first face image, the The second face image after ISP, the first light intensity information, and the first face attitude angle value, these kinds of information form multi-modal information as the input parameters of living body detection. On the one hand, the attack range can be narrowed and the attack can be increased. Difficulty, reduce the probability of being attacked, the attacker needs to obtain a specific posture (such as the front) or a photo under specific lighting conditions to attack successfully, and also avoids the delay caused by the need to process multiple frames of images; in another On the one hand, the feature information of the input parameters of the living body detection in each dimension is more abundant, and the accuracy of the living body detection result is improved.
本申请提供的人脸活体检测方法,还通过对第二人脸图像进行人脸检测对齐后抠出得到第三人脸图像;对第三人脸图像进行光照强度的预测得到第二光照强度信息,并对第三人脸图像进行人脸姿态角度的预测得到第二人脸姿态角度值;根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果,基于获取到的多模态信息、预测的第二光照强度信息和预测的第二人脸姿态角度值进行活体检测,进一步保证了活体检测结果的检测效果。The method for detecting a living body of a face provided by the present application further obtains a third face image by performing face detection and alignment on the second face image and then extracting the third face image; and predicting the light intensity of the third face image to obtain the second light intensity information , and predict the face attitude angle of the third face image to obtain the second face attitude angle value; according to the second light intensity information, the second face attitude angle value and the multimodal information, perform living body detection to obtain the living body detection result , based on the acquired multi-modal information, the predicted second light intensity information and the predicted second face attitude angle value, the living body detection is performed, which further ensures the detection effect of the living body detection result.
本申请提供的人脸活体检测方法,还通过先对第一光照强度信息与第二光照强度信息之间的差异,以及第二人脸姿态角度值与第二人脸姿态角度值之间的差异进行判断,若其中一个差异较大则确定待检测对象为非活体,直接输出活体检测结果;若两个差异都较小,则再根据第一人脸图像和第二人脸图像进行后续的人脸活体检测,提高了活体检测效率,进一步保证了活体检测结果的准确度。The method for detecting a living body of a face provided by the present application further analyzes the difference between the first light intensity information and the second light intensity information, and the difference between the second face pose angle value and the second face pose angle value. Judgment, if one of the differences is large, it is determined that the object to be detected is a non-living body, and the living body detection result is directly output; if both differences are small, then follow-up is performed according to the first face image and the second face image. Face liveness detection improves the efficiency of liveness detection and further ensures the accuracy of liveness detection results.
本申请提供的人脸活体检测方法,还通过在启动人脸识别功能后,在对多模态信息进行活体检测之前加入预处理流程,对预设攻击场景进行预拦截,缩小攻击范围,加强拦截效率和弥补单帧活体检测模型的不足。The face liveness detection method provided by the present application also pre-intercepts preset attack scenarios by adding a preprocessing process before performing liveness detection on multi-modal information after the face recognition function is activated, narrowing the attack range and strengthening the interception. Efficiency and make up for the shortcomings of the single-frame live detection model.
请参考图8,其示出了本申请一个示例性实施例提供的人脸活体检测装置的框图。该人脸活体检测装置可以通过软件、硬件或者两者的结合实现成为图1所示的计算机设备的全部或者一部分。该人脸活体检测装置可以包括:获取模块810和检测模块820。Please refer to FIG. 8 , which shows a block diagram of a face liveness detection apparatus provided by an exemplary embodiment of the present application. The face liveness detection apparatus can be implemented by software, hardware or a combination of the two to become all or a part of the computer equipment shown in FIG. 1 . The face liveness detection apparatus may include: an acquisition module 810 and a detection module 820 .
获取模块810,用于在启动人脸识别功能后,获取待检测对象对应的多模态信息,多模态信息包括人脸图像、环境光信息和人脸姿态信息;The obtaining module 810 is configured to obtain multi-modal information corresponding to the object to be detected after the face recognition function is activated, and the multi-modal information includes a face image, ambient light information and face posture information;
检测模块820,用于根据多模态信息进行活体检测得到活体检测结果,活体检测结果用于指示待检测对象是否为活体。The detection module 820 is configured to perform living body detection according to the multimodal information to obtain a living body detection result, and the living body detection result is used to indicate whether the object to be detected is a living body.
在一种可能的实现方式中,人脸图像包括初始的第一人脸图像和经过图像信号处理后的第二人脸图像,环境光信息包括第一光照强度信息,人脸姿态信息包括第一人脸姿态角度值。In a possible implementation manner, the face image includes an initial first face image and a second face image after image signal processing, the ambient light information includes first illumination intensity information, and the face posture information includes the first The face pose angle value.
在另一种可能的实现方式中,检测模块820,还用于:In another possible implementation manner, the detection module 820 is further configured to:
根据第二人脸图像中人脸所在区域,得到第三人脸图像;obtaining a third face image according to the region where the face is located in the second face image;
对第三人脸图像进行光照强度的预测得到第二光照强度信息,并对第三人脸图像进行人脸姿态角度的预测得到第二人脸姿态角度值;Predicting the light intensity of the third face image to obtain the second light intensity information, and predicting the face attitude angle of the third face image to obtain the second face attitude angle value;
根据第二光照强度信息、第二人脸姿态角度值和多模态信息进行活体检测得到活体检测结果。The living body detection result is obtained by performing living body detection according to the second light intensity information, the second face attitude angle value and the multimodal information.
在另一种可能的实现方式中,第一光照强度信息包括第一光照强度值,第二光照 强度信息包括第二光照强度值,检测模块820,还用于:In another possible implementation manner, the first illumination intensity information includes a first illumination intensity value, the second illumination intensity information includes a second illumination intensity value, and the detection module 820 is further configured to:
将第一光照强度值与第二光照强度值的差值绝对值确定为第一差值,并将第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值确定为第二差值;The absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
当第一差值和第二差值满足预设条件时,将第一人脸图像和第二人脸图像输入至训练好的单帧活体检测模型中,输出得到活体检测结果;When the first difference and the second difference meet the preset conditions, input the first face image and the second face image into the trained single-frame living detection model, and output the living body detection result;
其中,预设条件包括第一差值小于第一预设阈值且第二差值小于第二预设阈值。Wherein, the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
在另一种可能的实现方式中,第一光照强度信息包括第一光照强度值,第二光照强度信息包括第二光照强度值,检测模块820,还用于:In another possible implementation manner, the first illumination intensity information includes a first illumination intensity value, and the second illumination intensity information includes a second illumination intensity value, and the detection module 820 is further configured to:
将第一光照强度值与第二光照强度值的差值绝对值确定为第一差值,并将第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值确定为第二差值;The absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is determined as the second difference;
当第一差值和第二差值不满足预设条件时,输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体;When the first difference and the second difference do not meet the preset condition, outputting a first detection result, where the first detection result is used to indicate that the object to be detected is a non-living body;
其中,预设条件包括第一差值小于第一预设阈值且第二差值小于第二预设阈值。Wherein, the preset condition includes that the first difference value is smaller than the first preset threshold value and the second difference value is smaller than the second preset threshold value.
在另一种可能的实现方式中,第一光照强度信息包括第一光照强度等级,第二光照强度信息包括第二光照强度等级,检测模块820,还用于:In another possible implementation manner, the first illumination intensity information includes a first illumination intensity level, and the second illumination intensity information includes a second illumination intensity level. The detection module 820 is further configured to:
当第一光照强度等级与第二光照强度等级为同一等级,且第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值小于第二预设阈值时,将第一人脸图像和第二人脸图像输入至训练好的单帧活体检测模型,输出得到活体检测结果。When the first light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is smaller than the second preset threshold, the first face The image and the second face image are input to the trained single-frame in vivo detection model, and the output is to obtain the in vivo detection result.
在另一种可能的实现方式中,第一光照强度信息包括第一光照强度等级,第二光照强度信息包括第二光照强度等级,检测模块820,还用于:In another possible implementation manner, the first illumination intensity information includes a first illumination intensity level, and the second illumination intensity information includes a second illumination intensity level. The detection module 820 is further configured to:
当第一光照强度等级与第二光照强度等级不是同一等级,或者第一人脸姿态角度值与第二人脸姿态角度值的差值绝对值大于或者等于第二预设阈值时,输出得到第一检测结果,第一检测结果用于指示待检测对象为非活体。When the first light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second preset threshold, the output obtains the first A detection result, the first detection result is used to indicate that the object to be detected is not a living body.
在另一种可能的实现方式中,该装置还包括:预处理模块;该预处理模块,用于:In another possible implementation manner, the apparatus further includes: a preprocessing module; the preprocessing module is used for:
将多模态信息输入至预处理模型中输出得到场景信息,场景信息用于指示当前检测场景;Inputting the multimodal information into the preprocessing model and outputting the scene information, the scene information is used to indicate the current detection scene;
当场景信息用于指示当前检测场景为预设攻击场景时,对多模态信息进行预拦截处理。When the scene information is used to indicate that the current detection scene is a preset attack scene, pre-interception processing is performed on the multi-modal information.
需要说明的是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that when the device provided in the above embodiment realizes its functions, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated to different functional modules according to actual needs. The content structure of the device is divided into different functional modules to complete all or part of the functions described above.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
本申请实施例提供了一种计算机设备,该计算机设备包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行指令时实现上述的方法。可选地,计算机设备为终端或者服务器。本实施例对此不加以限定。An embodiment of the present application provides a computer device, the computer device includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions. Optionally, the computer device is a terminal or a server. This embodiment does not limit this.
本申请实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计 算机可读代码的非易失性计算机可读存储介质,当计算机可读代码在电子设备的处理器中运行时,电子设备中的处理器执行上述方法。Embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are executed in a processor of an electronic device , the processor in the electronic device executes the above method.
本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,计算机程序指令被处理器执行时实现上述方法。Embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
计算机可读存储介质可以是保持和存储由指令执行设备使用的指令的有形设备。比如,计算机可读存储介质例包括但不限于:电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Electrically Programmable Read-Only-Memory,EPROM或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。A computer-readable storage medium may be a tangible device that retains and stores instructions for use by the instruction execution device. For example, examples of computer-readable storage media include, but are not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (Electrically Programmable Read-Only-Memory, EPROM or flash memory), static random access memory (Static Random-Access Memory, SRAM), portable compact disk read-only memory (Compact Disc Read-Only Memory, CD - ROM), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices, such as punch cards or raised structures in grooves on which instructions are stored, and any suitable combination of the foregoing .
这里所描述的计算机可读程序指令或代码可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions or code described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本申请的各个方面。The computer program instructions used to perform the operations of the present application may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, can be connected to an external computer (e.g. use an internet service provider to connect via the internet). In some embodiments, electronic circuits, such as programmable logic circuits, Field-Programmable Gate Arrays (FPGA), or Programmable Logic Arrays (Programmable Logic Arrays), are personalized by utilizing state information of computer-readable program instructions. Logic Array, PLA), the electronic circuit can execute computer readable program instructions to implement various aspects of the present application.
这里参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本申请的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程 数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本申请的多个实施例的装置、系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of apparatuses, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行相应的功能或动作的硬件(例如电路或ASIC(Application Specific Integrated Circuit,专用集成电路))来实现,或者可以用硬件和软件的组合,如固件等来实现。It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in hardware (eg, circuits or ASICs (Application) that perform the corresponding functions or actions. Specific Integrated Circuit, application-specific integrated circuit)), or can be implemented by a combination of hardware and software, such as firmware.
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其它变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其它单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the application is described herein in conjunction with the various embodiments, those skilled in the art will understand and understand from a review of the drawings, the disclosure, and the appended claims in practicing the claimed application. Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.
以上已经描述了本申请的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present application have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.

Claims (10)

  1. 一种人脸活体检测方法,其特征在于,所述方法包括:A face liveness detection method, characterized in that the method comprises:
    在启动人脸识别功能后,获取待检测对象对应的多模态信息,所述多模态信息包括人脸图像、环境光信息和人脸姿态信息;After starting the face recognition function, obtain multimodal information corresponding to the object to be detected, where the multimodal information includes a face image, ambient light information and face posture information;
    根据所述多模态信息进行活体检测得到活体检测结果,所述活体检测结果用于指示所述待检测对象是否为活体。A living body detection result is obtained by performing a living body detection according to the multimodal information, and the living body detection result is used to indicate whether the object to be detected is a living body.
  2. 根据权利要求1所述的方法,其特征在于,所述人脸图像包括初始的第一人脸图像和经过图像信号处理后的第二人脸图像,所述环境光信息包括第一光照强度信息,所述人脸姿态信息包括第一人脸姿态角度值。The method according to claim 1, wherein the face image includes an initial first face image and a second face image after image signal processing, and the ambient light information includes first illumination intensity information , the face posture information includes a first face posture angle value.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述多模态信息进行活体检测得到活体检测结果,包括:The method according to claim 2, wherein the obtaining the result of the in vivo detection by performing the in vivo detection according to the multimodal information comprises:
    根据所述第二人脸图像中人脸所在区域,得到第三人脸图像;Obtain a third face image according to the region where the face is located in the second face image;
    对所述第三人脸图像进行光照强度的预测得到第二光照强度信息,并对所述第三人脸图像进行人脸姿态角度的预测得到第二人脸姿态角度值;Performing light intensity prediction on the third face image to obtain second light intensity information, and performing a face attitude angle prediction on the third face image to obtain a second face attitude angle value;
    根据所述第二光照强度信息、所述第二人脸姿态角度值和所述多模态信息进行活体检测得到所述活体检测结果。The living body detection result is obtained by performing living body detection according to the second illumination intensity information, the second face attitude angle value and the multimodal information.
  4. 根据权利要求3所述的方法,其特征在于,所述第一光照强度信息包括第一光照强度值,所述第二光照强度信息包括第二光照强度值,所述根据所述第二光照强度信息、所述第二人脸姿态角度值和所述多模态信息进行活体检测得到所述活体检测结果,包括:The method according to claim 3, wherein the first illumination intensity information includes a first illumination intensity value, the second illumination intensity information includes a second illumination intensity value, and the second illumination intensity information includes a second illumination intensity value. Information, the second face attitude angle value and the multimodal information are subjected to living body detection to obtain the living body detection result, including:
    将所述第一光照强度值与所述第二光照强度值的差值绝对值确定为第一差值,并将所述第一人脸姿态角度值与所述第二人脸姿态角度值的差值绝对值确定为第二差值;The absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference value, and the difference between the first face posture angle value and the second face posture angle value is determined. The absolute value of the difference is determined as the second difference;
    当所述第一差值和所述第二差值满足预设条件时,将所述第一人脸图像和所述第二人脸图像输入至训练好的单帧活体检测模型中,输出得到所述活体检测结果;When the first difference and the second difference meet the preset conditions, the first face image and the second face image are input into the trained single-frame living detection model, and the output is the biopsy result;
    其中,所述预设条件包括所述第一差值小于第一预设阈值且所述第二差值小于第二预设阈值。Wherein, the preset condition includes that the first difference value is smaller than a first preset threshold value and the second difference value is smaller than a second preset threshold value.
  5. 根据权利要求3所述的方法,其特征在于,所述第一光照强度信息包括第一光照强度值,所述第二光照强度信息包括第二光照强度值,所述根据所述第二光照强度信息、所述第二人脸姿态角度值和所述多模态信息进行活体检测得到所述活体检测结果,包括:The method according to claim 3, wherein the first illumination intensity information includes a first illumination intensity value, the second illumination intensity information includes a second illumination intensity value, and the second illumination intensity information includes a second illumination intensity value. Information, the second face attitude angle value and the multimodal information are subjected to living body detection to obtain the living body detection result, including:
    将所述第一光照强度值与所述第二光照强度值的差值绝对值确定为第一差值,并将所述第一人脸姿态角度值与所述第二人脸姿态角度值的差值绝对值确定为第二差值;The absolute value of the difference between the first light intensity value and the second light intensity value is determined as the first difference value, and the difference between the first face posture angle value and the second face posture angle value is determined. The absolute value of the difference is determined as the second difference;
    当所述第一差值和所述第二差值不满足预设条件时,输出得到第一检测结果,所 述第一检测结果用于指示所述待检测对象为非活体;When the first difference value and the second difference value do not meet the preset conditions, the output obtains a first detection result, and the first detection result is used to indicate that the object to be detected is a non-living body;
    其中,所述预设条件包括所述第一差值小于第一预设阈值且所述第二差值小于第二预设阈值。Wherein, the preset condition includes that the first difference value is smaller than a first preset threshold value and the second difference value is smaller than a second preset threshold value.
  6. 根据权利要求3所述的方法,其特征在于,所述第一光照强度信息包括第一光照强度等级,所述第二光照强度信息包括第二光照强度等级,所述根据所述第二光照强度信息、所述第二人脸姿态角度值和所述多模态信息进行活体检测得到所述活体检测结果,包括:The method according to claim 3, wherein the first illumination intensity information includes a first illumination intensity level, the second illumination intensity information includes a second illumination intensity level, and the second illumination intensity information includes a second illumination intensity level. Information, the second face attitude angle value and the multimodal information are subjected to living body detection to obtain the living body detection result, including:
    当所述第一光照强度等级与所述第二光照强度等级为同一等级,且所述第一人脸姿态角度值与所述第二人脸姿态角度值的差值绝对值小于第二预设阈值时,将所述第一人脸图像和所述第二人脸图像输入至训练好的单帧活体检测模型,输出得到所述活体检测结果。When the first light intensity level and the second light intensity level are the same level, and the absolute value of the difference between the first face pose angle value and the second face pose angle value is smaller than the second preset When the threshold is set, the first face image and the second face image are input into the trained single-frame living detection model, and the living body detection result is obtained by outputting.
  7. 根据权利要求3所述的方法,其特征在于,所述第一光照强度信息包括第一光照强度等级,所述第二光照强度信息包括第二光照强度等级,所述根据所述第二光照强度信息、所述第二人脸姿态角度值和所述多模态信息进行活体检测得到所述活体检测结果,包括:The method according to claim 3, wherein the first illumination intensity information includes a first illumination intensity level, the second illumination intensity information includes a second illumination intensity level, and the second illumination intensity information includes a second illumination intensity level. Information, the second face attitude angle value and the multimodal information are subjected to living body detection to obtain the living body detection result, including:
    当所述第一光照强度等级与所述第二光照强度等级不是同一等级,或者所述第一人脸姿态角度值与所述第二人脸姿态角度值的差值绝对值大于或者等于第二预设阈值时,输出得到第一检测结果,所述第一检测结果用于指示所述待检测对象为非活体。When the first light intensity level and the second light intensity level are not the same level, or the absolute value of the difference between the first face pose angle value and the second face pose angle value is greater than or equal to the second When the threshold is preset, a first detection result is output, and the first detection result is used to indicate that the object to be detected is a non-living body.
  8. 根据权利要求1所述的方法,其特征在于,所述对所述多模态信息进行活体检测得到活体检测结果之前,还包括:The method according to claim 1, characterized in that, before performing the in vivo detection on the multimodal information to obtain the in vivo detection result, the method further comprises:
    将所述多模态信息输入至预处理模型中输出得到场景信息,所述场景信息用于指示当前检测场景;Inputting the multimodal information into the preprocessing model and outputting scene information, the scene information is used to indicate the current detection scene;
    当所述场景信息用于指示所述当前检测场景为预设攻击场景时,对所述多模态信息进行预拦截处理。When the scene information is used to indicate that the current detection scene is a preset attack scene, pre-interception processing is performed on the multimodal information.
  9. 一种人脸活体检测装置,其特征在于,所述装置包括:A face liveness detection device, characterized in that the device comprises:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为执行所述指令时实现权利要求1-8任意一项所述的方法。Wherein, the processor is configured to implement the method of any one of claims 1-8 when executing the instructions.
  10. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1-8中任意一项所述的方法。A non-volatile computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are executed by a processor, the method of any one of claims 1-8 is implemented.
PCT/CN2021/134018 2020-11-30 2021-11-29 Face liveness detection method and apparatus, and storage medium WO2022111688A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011380265.0A CN114596638A (en) 2020-11-30 2020-11-30 Face liveness detection method, device and storage medium
CN202011380265.0 2020-11-30

Publications (1)

Publication Number Publication Date
WO2022111688A1 true WO2022111688A1 (en) 2022-06-02

Family

ID=81754025

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134018 WO2022111688A1 (en) 2020-11-30 2021-11-29 Face liveness detection method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN114596638A (en)
WO (1) WO2022111688A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119360425A (en) * 2024-09-14 2025-01-24 大湾区大学(筹) Multimodal face anti-counterfeiting recognition method, device and medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115512447A (en) * 2022-10-10 2022-12-23 京东科技控股股份有限公司 Living body detection method and device
CN116052285A (en) * 2022-12-27 2023-05-02 展讯通信(天津)有限公司 Liveness detection method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107736874A (en) * 2017-08-25 2018-02-27 百度在线网络技术(北京)有限公司 A kind of method, apparatus of In vivo detection, equipment and computer-readable storage medium
US20180075295A1 (en) * 2016-09-14 2018-03-15 Kabushiki Kaisha Toshiba Detection apparatus, detection method, and computer program product
CN110516644A (en) * 2019-08-30 2019-11-29 深圳前海微众银行股份有限公司 A living body detection method and device
CN111639582A (en) * 2020-05-26 2020-09-08 清华大学 Living body detection method and apparatus
CN111767829A (en) * 2020-06-28 2020-10-13 京东数字科技控股有限公司 Living body detection method, device, system and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693698A (en) * 2012-06-25 2012-09-26 济南大学 Automatic adjusting method and automatic adjusting system for brightness of outdoor LED (Light-Emitting Diode) display screen based on environmental light change
CN104933414B (en) * 2015-06-23 2018-06-05 中山大学 A kind of living body faces detection method based on WLD-TOP
CN108875473A (en) * 2017-06-29 2018-11-23 北京旷视科技有限公司 Living body verification method, device and system and storage medium
CN107992794B (en) * 2016-12-30 2019-05-28 腾讯科技(深圳)有限公司 A kind of biopsy method, device and storage medium
CN107832712A (en) * 2017-11-13 2018-03-23 深圳前海微众银行股份有限公司 Biopsy method, device and computer-readable recording medium
US11804070B2 (en) * 2019-05-02 2023-10-31 Samsung Electronics Co., Ltd. Method and apparatus with liveness detection
CN111985400A (en) * 2020-08-20 2020-11-24 中国建设银行股份有限公司 Face living body identification method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180075295A1 (en) * 2016-09-14 2018-03-15 Kabushiki Kaisha Toshiba Detection apparatus, detection method, and computer program product
CN107736874A (en) * 2017-08-25 2018-02-27 百度在线网络技术(北京)有限公司 A kind of method, apparatus of In vivo detection, equipment and computer-readable storage medium
CN110516644A (en) * 2019-08-30 2019-11-29 深圳前海微众银行股份有限公司 A living body detection method and device
CN111639582A (en) * 2020-05-26 2020-09-08 清华大学 Living body detection method and apparatus
CN111767829A (en) * 2020-06-28 2020-10-13 京东数字科技控股有限公司 Living body detection method, device, system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119360425A (en) * 2024-09-14 2025-01-24 大湾区大学(筹) Multimodal face anti-counterfeiting recognition method, device and medium

Also Published As

Publication number Publication date
CN114596638A (en) 2022-06-07

Similar Documents

Publication Publication Date Title
WO2022111688A1 (en) Face liveness detection method and apparatus, and storage medium
CN110741388B (en) Adversarial sample detection method, device, computing device and computer storage medium
CN109948408B (en) Activity test method and apparatus
US12165337B2 (en) Object detection based on pixel differences
CN110851835B (en) Image model detection method and device, electronic equipment and storage medium
US9619735B1 (en) Pure convolutional neural network localization
TWI470562B (en) Method, apparatus and computer-readable non-transitory storage medium for tracking and recognition of faces using selected region classification
KR20190072563A (en) Method and apparatus for detecting facial live varnish, and electronic device
WO2020019591A1 (en) Method and device used for generating information
JP2015215876A (en) Liveness inspection method and apparatus, and video processing method and apparatus
US20200265238A1 (en) Methods and Systems for Identification and Augmentation of Video Content
CN115424335B (en) Living body recognition model training method, living body recognition method and related equipment
CN112395979A (en) Image-based health state identification method, device, equipment and storage medium
CN112507090B (en) Method, apparatus, device and storage medium for outputting information
CN111898561B (en) Face authentication method, device, equipment and medium
WO2021128846A1 (en) Electronic file control method and apparatus, and computer device and storage medium
CN107766868A (en) A kind of classifier training method and device
CN107111761A (en) Technology for providing machine language translation of the user images seizure feedback to be improved
CN110008997A (en) Image texture similarity recognition method, device and computer readable storage medium
CN118762377B (en) Multi-mode false news detection method, device, equipment and medium
WO2023173686A1 (en) Detection method and apparatus, electronic device, and storage medium
CN114245232A (en) Video abstract generation method and device, storage medium and electronic equipment
Maheswaran et al. A Perspective way of designing Intelligent systems with Face Detection and Recognition using Artificial Intelligence for Authentication
Ju et al. DeepFake-O-Meter v2. 0: An open platform for DeepFake detection
CN116563898A (en) Palm vein image recognition method, device, equipment and medium based on GhostNet network

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: 21897188

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: 21897188

Country of ref document: EP

Kind code of ref document: A1