CN112800997B - Living body detection method, device and equipment - Google Patents

Living body detection method, device and equipment Download PDF

Info

Publication number
CN112800997B
CN112800997B CN202110157641.8A CN202110157641A CN112800997B CN 112800997 B CN112800997 B CN 112800997B CN 202110157641 A CN202110157641 A CN 202110157641A CN 112800997 B CN112800997 B CN 112800997B
Authority
CN
China
Prior art keywords
image
living body
probability value
model
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110157641.8A
Other languages
Chinese (zh)
Other versions
CN112800997A (en
Inventor
曹佳炯
李亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110157641.8A priority Critical patent/CN112800997B/en
Publication of CN112800997A publication Critical patent/CN112800997A/en
Application granted granted Critical
Publication of CN112800997B publication Critical patent/CN112800997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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
    • G06V40/45Detection of the body part being alive

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the specification discloses a living body detection method, a living body detection device and living body detection equipment. The scheme comprises the following steps: acquiring an image to be detected; extracting a target face image in the image to be detected; classifying the target face image by using a first classification model to obtain a first non-living body probability value; classifying the image to be detected by using a second classification model to obtain a second non-living body probability value; and generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.

Description

Living body detection method, device and equipment
Technical Field
One or more embodiments of the present disclosure relate to the field of computer technology, and in particular, to a living body detection method, apparatus, and device.
Background
With the development of computer technology and optical imaging technology, user identification methods based on face recognition technology are becoming popular. In the face recognition application process, whether the user is a true living body is usually verified to be operated so as to discriminate the fraudulent conduct in face recognition, and the benefit of the user is ensured. Currently, there are many methods for controlling the flow of liquid. In living body detection, analysis and detection are generally performed on a face region of a user to generate a living body recognition result. Because the living body detection mode does not comprehensively consider factors such as the environment of a user, the accuracy of living body detection results is affected.
In summary, how to improve the accuracy and effectiveness of the generated living body detection result has become a technical problem to be solved.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide a living body detection method, apparatus, and device for improving the accuracy and effectiveness of the generated living body detection result.
In order to solve the above technical problems, the embodiments of the present specification are implemented as follows:
the living body detection method provided by the embodiment of the specification comprises the following steps:
acquiring an image to be detected;
extracting a target face image in the image to be detected;
classifying the target face image by using a first classification model to obtain a first non-living body probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image;
classifying the image to be detected by using a second classification model to obtain a second non-living body probability value; the second classification model is obtained by acquiring an image by using the equipment and training a second convolutional neural network model;
And generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
The method for generating the living body detection model provided by the embodiment of the specification comprises the following steps:
acquiring a first classification model, wherein the first classification model is used for classifying a target face image extracted from an image to be detected so as to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image;
acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected so as to obtain a second non-living probability value; the second classification model is obtained by acquiring an image by using the equipment and training a second convolutional neural network model;
obtaining a detection result generation model, wherein the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the second non-living body probability value;
and generating a living body detection model according to the first classification model, the second classification model and the detection result generation model.
The embodiment of the present specification provides a living body detection apparatus, including:
the acquisition module is used for acquiring the image to be detected;
the first extraction module is used for extracting a target face image in the image to be detected;
the first classification module is used for classifying the target face image by using a first classification model to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image;
the second classification module is used for classifying the image to be detected by using a second classification model to obtain a second non-living probability value; the second classification model is obtained by acquiring an image by using the equipment and training a second convolutional neural network model;
and the living body detection result generation module is used for generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
The generation device of the living body detection model provided in the embodiment of the specification comprises:
the first acquisition module is used for acquiring a first classification model, and the first classification model is used for classifying the target face image extracted from the image to be detected so as to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image;
The second acquisition module is used for acquiring a second classification model, and the second classification model is used for classifying the image to be detected so as to obtain a second non-living probability value; the second classification model is obtained by acquiring an image by using the equipment and training a second convolutional neural network model;
the third acquisition module is used for acquiring a detection result generation model, and the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the second non-living body probability value;
and the living body detection model generation module is used for generating a living body detection model according to the first classification model, the second classification model and the detection result generation model.
The embodiment of the present specification provides a living body detection apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring an image to be detected;
Extracting a target face image in the image to be detected;
classifying the target face image by using a first classification model to obtain a first non-living body probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image;
classifying the image to be detected by using a second classification model to obtain a second non-living body probability value; the second classification model is obtained by acquiring an image by using the equipment and training a second convolutional neural network model;
and generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
The generation device of the living body detection model provided in the embodiment of the specification comprises:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a first classification model, wherein the first classification model is used for classifying a target face image extracted from an image to be detected so as to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image;
Acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected so as to obtain a second non-living probability value; the second classification model is obtained by acquiring an image by using the equipment and training a second convolutional neural network model;
obtaining a detection result generation model, wherein the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the second non-living body probability value;
and generating a living body detection model according to the first classification model, the second classification model and the detection result generation model.
One embodiment of the present specification achieves the following advantageous effects:
performing living body classification processing on a target face image in an image to be detected by using a first classification model to obtain a first non-living body probability value; and classifying the image to be detected by using a second classification model to obtain a second non-living body probability value. The first non-living probability value obtained by analyzing the target face image can accurately reflect whether the user is performing user verification by utilizing attack means such as a printed image; the second non-living body probability value obtained by carrying out overall analysis on the image to be detected can more accurately reflect the attack risk of the environment where the user is located and whether the user is carrying out user verification by utilizing attack means such as a three-dimensional mask and the like, so that the living body detection scheme can effectively and accurately distinguish various attack behaviors, and is beneficial to improving the accuracy and the effectiveness of the generated living body detection result.
Drawings
The accompanying drawings, which are included to provide a further understanding of one or more embodiments of the specification, illustrate and explain one or more embodiments of the specification, and are not an undue limitation on the one or more embodiments of the specification. In the drawings:
fig. 1 is a schematic view of an application scenario of a living body detection method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a living body detection method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an image to be detected according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of a method for generating a living body detection model according to an embodiment of the present disclosure;
FIG. 5 is a schematic view showing the structure of a living body detecting apparatus corresponding to the method of FIG. 2 according to the embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a living body detection model generating apparatus corresponding to the method in fig. 4 according to the embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of one or more embodiments of the present specification more clear, the technical solutions of one or more embodiments of the present specification will be clearly and completely described below in connection with specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without undue burden, are intended to be within the scope of one or more embodiments herein.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
In the prior art, in the face recognition application scenario, it is generally required to verify whether a user is a real living body to operate, so as to improve the security of face recognition operation. At present, when in living body detection, living body attack behaviors aiming at a face area are usually identified according to whether obvious conditions such as image reflection, face deformation and the like exist in a face image in an equipment acquisition image. Because the living body detection method does not comprehensively consider factors such as the environment in which the user is located and the body posture of the user, whether the user is located in a designated environment (such as a market environment and a shop environment) for living body detection operation cannot be judged, whether the user holds the three-dimensional mask by hand or not cannot be judged, and the three-dimensional mask of the wearer is protected for living body detection operation, so that the accuracy of living body detection results is affected.
In order to solve the drawbacks of the prior art, the present solution provides the following embodiments:
fig. 1 is a schematic application scenario diagram of a living body detection method according to an embodiment of the present disclosure. As shown in fig. 1, when the user 101 performs a living body detection operation at the device 102, the device 102 may acquire an image 103 containing the user 101 so as to generate a living body detection result based on the image 103 and a face image and a body image in the image 103. In practical applications, the device 102 may be used to generate the living body detection result, or another device (not shown in fig. 1) communicatively connected to the device 102 may be used to generate the living body detection result, which is not particularly limited.
Next, a living body detection method provided for the embodiments of the specification will be specifically described with reference to the accompanying drawings: fig. 2 is a schematic flow chart of a living body detection method according to an embodiment of the present disclosure. From the program point of view, the execution subject of the flow may be a device for performing living body detection or a program loaded in the device. As shown in fig. 2, the process may include the steps of:
step 202: and acquiring an image to be detected.
In the embodiment of the present specification, when a user to be detected performs a living body detection operation at a device, the device may acquire an image of the user to be detected as an image to be detected. The device may be a machine for supporting face-brushing payment in a store, or may be a terminal device for logging in a personal payment account of a user, where in the embodiment of the present specification, the device for collecting the image to be detected is not specifically limited.
Step 204: and extracting a target face image in the image to be detected.
In the embodiment of the present disclosure, the image to be detected generally includes a face image of the user to be detected, so that the face image of the user to be detected may be extracted from the image to be detected as the target face image.
In practical application, the to-be-detected image may include a plurality of face images, so as to avoid computing resource waste caused by living body recognition of other users except the to-be-detected user, when the to-be-detected image is collected by using the device, the to-be-detected user may be indicated to be located at a designated position, so that the face image of the to-be-detected user is located in a designated area in the to-be-detected image collected by the device, and thus the face image extracted from the designated area in the to-be-detected image may be used as a target face image. Alternatively, since the face image with the largest area in the image to be detected is generally the face image of the user to be detected, the face image with the largest area extracted from the image to be detected may be used as the target face image. Alternatively, the target face image in the image to be detected may also be specified manually.
Step 206: classifying the target face image by using a first classification model to obtain a first non-living body probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image.
In the embodiment of the present specification, the device acquisition image may include both a living body sample image and an attack sample image. The living body sample image may refer to a collection of images of a sample user under various human body postures, which are acquired under various illumination and background conditions by using the device. While an attack sample image may refer to a collection of images under various human body poses when a sample user collected using the device under various lighting, background conditions performs live detection with printed face images, videos, masks, and the like. The collected illumination, background conditions and contained human body gestures of the living body sample image and the attack sample image can be the same.
In practical application, the collected illumination of the device collected image can comprise various illumination conditions such as natural light, office light, market light, bedroom light, road light and the like. The background conditions for the device to capture an image may include: street, office, bedroom, mall, store, mall, etc. The human body posture of the sample user can comprise various postures such as hand-held articles (e.g. pictures, screens, masks) to the face, crossed holding of the hands in the chest, natural sagging of the hands, touching the hands, and the like.
In the embodiment of the present specification, a face image extracted from a living body sample image in an apparatus-collected image may be taken as a living body face image, and a category label of the living body face image may be set as a label representing a living body; and taking the face image extracted from the attack sample image in the equipment acquisition image as a non-living face image, and setting the category label of the non-living face image as a label for representing a non-living body. And training the first convolutional neural network model by utilizing the living face image and the non-living face image, so as to obtain a trained first classification model. The first convolutional neural network model may be implemented using VGGNet, resNet (Residual Neural Network) or the like. The first convolutional neural network model may be a classification model.
In the embodiment of the present disclosure, after the target face image is input into the trained first classification model, the first classification model may output a probability (i.e., a first non-living probability value) indicating that the target face image belongs to a non-living body. The higher the first non-living probability value, the higher the probability that the user performs attack verification by means of printing pictures, videos, or the like at the time of living detection.
Step 208: classifying the image to be detected by using a second classification model to obtain a second non-living body probability value; the second classification model is obtained by acquiring images through the equipment and training a second convolutional neural network model.
In the embodiment of the present disclosure, the device acquired image used for training the second classification model and the device acquired image in step 206 may be the same, which will not be described herein. Accordingly, the category label of the living body sample image in the apparatus-captured image can be set as a label representing the living body; and labeling the category of the attack sample image in the device acquisition image as a label representing a non-living body. And training the second convolutional neural network model by utilizing the living body sample image and the attack sample image in the acquired image of the equipment, so as to obtain a trained second classification model. The second convolutional neural network model may also be implemented using VGGNet, resNet (Residual Neural Network) or the like. The second convolutional neural network model may be a classification model.
In the embodiment of the present disclosure, since the trained second classification model may perform living classification based on illumination information, user background information, image global information and the like in an image, an attack element on a user background may be captured better, for example, an edge of a paper printed with an image when the user holds the printed image for attack detection, a frame of a screen when the user holds a screen to play a video for attack, an edge of a three-dimensional mask worn on the head, and an environment where the user is located are not attack elements such as a designated environment.
In the embodiment of the present specification, after the image to be detected is input into the trained second classification model, the second classification model may output a probability (i.e., a second non-living probability value) indicating that the image to be detected belongs to the attack image. The higher the second non-living probability value, the greater the probability that the user performs attack verification using a printed image, video, mask, or the like, in the non-designated area can be represented.
Step 210: and generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
In the embodiment of the present disclosure, generating the living body detection result according to the first non-living body probability value and the second non-living body probability value may specifically include: summing the product of the first non-living probability value and a first preset weight and the product of the second non-living probability value and a second preset weight to obtain a first comprehensive non-living probability value; judging whether the first comprehensive non-living body probability value is larger than a first threshold value; if yes, generating a detection result which indicates that the image to be detected does not contain a living body; if not, generating a detection result indicating that the image to be detected contains the living body. The first preset weight and the second preset weight may be determined according to actual requirements, which is not limited in detail. For example, the first preset weight and the second preset weight may be 70% and 50% respectively, or may be 50% and 50% respectively.
It should be understood that the method according to one or more embodiments of the present disclosure may include the steps in which some of the steps are interchanged as needed, or some of the steps may be omitted or deleted.
In the method in fig. 2, the first non-living probability value obtained by analyzing the target face image can more accurately reflect whether the user is performing user authentication by using attack means such as a printed image; the second non-living body probability value obtained by carrying out overall analysis on the image to be detected can more accurately reflect the attack risk of the environment where the user is located and whether the user is carrying out user verification by utilizing attack means such as a three-dimensional mask and the like, so that the living body detection scheme can effectively and accurately distinguish various attack behaviors, and the accuracy and the effectiveness of the generated living body detection result are improved.
Based on the method in fig. 2, the examples of the present specification also provide some specific embodiments of the method, as described below.
Optionally, step 204: the extracting the target face image in the image to be detected may specifically include:
acquiring position information of a region with a target face image in the image to be detected, wherein one face image exists in the region; and extracting the target face image from the image to be detected according to the position information of the region.
In this embodiment of the present disclosure, the acquiring the location information of the area where the target face image exists in the image to be detected may specifically include: and carrying out face detection on the image to be detected by using a first target detection model to obtain the coordinate information of a predicted face frame output by the first target detection model, and taking the coordinate information of the predicted face frame as the position information of the region where the target face image exists in the image to be detected.
In the embodiment of the present disclosure, the first target detection model may be trained in advance using a sample image including a face image, so that the first target detection model may detect a predicted face region in an image to be detected. The first target detection model may be implemented by using a model that can generate a predicted face frame, such as MTCNN (Multi-task Cascaded Convolutional Networks), opencv, or OpenFace. The sample images used to train the first object detection model and train the first classification model may be the same or different, and are not particularly limited.
Fig. 3 is a schematic diagram of an image to be detected according to an embodiment of the present disclosure. As shown in fig. 3, face detection is performed on an image 301 to be detected by using a first target detection model, so that coordinate information of a predicted face frame 302 can be obtained, and a target face image can be obtained by extracting an image in the predicted face frame 302.
In this embodiment of the present disclosure, the extracting, according to the location information of the region, the target face image from the image to be detected may specifically include: cutting out the image in the region from the image to be detected according to the position information of the region; and performing resolution conversion on the cut image, and taking the image with the first preset resolution as the target face image so as to facilitate classification processing of the target face image by the first classification model.
In practical applications, the resolution of the live face image and the non-live face image used in training the first classification model should also be the first preset resolution. The first preset resolution may be determined according to actual requirements, which is not limited in detail. For example, the first preset resolution may be 128×256, or 128×128, etc.
In the embodiment of the present specification, after performing face detection on the image to be detected using the first object detection model, the method may further include:
acquiring a face detection result output by the first target detection model; and when the face detection result indicates that the face region is not detected in the image to be detected, generating a detection result indicating that the image to be detected does not contain a living body.
In the embodiment of the present disclosure, since the living body detection is generally performed on the face image of the user when the living body experience is performed, when the face detection result indicates that the face region is not detected in the image to be detected, the detection result indicating that the image to be detected does not include the living body may be directly generated, without using the second classification model to process the image to be detected, so as to save the computing resources on the basis of ensuring the accuracy of the living body detection result.
In the embodiment of the present disclosure, since an attacker usually has a specific human body posture when the attacker attacks by using printed images, recorded videos, and the like, for example, the attacker holds the object to cover the human body posture such as the face, etc., it is seen that the human body posture information of the user also belongs to an important information source for distinguishing the attack behavior.
Thus, step 210: before generating the living body detection result according to the first non-living body probability value and the second non-living body probability value, the method may further include:
extracting a target human body image in the image to be detected, wherein the target human body image comprises the target human face image. And classifying the target human body image by using a third classification model to obtain a third non-living body probability value, wherein the third classification model is obtained by training a third convolutional neural network model by using a living body image and a non-living body image extracted from the equipment acquisition image.
In the embodiment of the present disclosure, the device acquired image used for training the third classification model and the device acquired image in step 206 may be the same, which will not be described herein. Accordingly, the category label of the human body image (i.e., the living body image) extracted from the living body sample image in the apparatus-captured image can be set as the label representing the living body; and the category label of the human body image (i.e. the non-living human body image) extracted from the attack sample image in the device acquisition image is taken as the label representing the non-living body. The third convolutional neural network model is trained by using the living body human body image and the non-living body human body image, so that a trained third classification model is obtained. The third convolutional neural network model may also be implemented using VGGNet, resNet (Residual Neural Network), or the like. The third convolutional neural network model may be a classification model.
In the embodiment of the present disclosure, since the trained third classification model may perform living classification based on the human body image of the user, the attack elements in the human body pose, for example, the attack elements such as the human body pose when the user performs an attack by holding the print image, the screen, etc., may be better captured.
In this embodiment of the present disclosure, the target human body image extracted from the image to be detected should at least include the target human face image, that is, the target human body image and the target human face image correspond to the same user. In practical applications, the target human body image may further include images of limbs, trunk, etc. of the user. In practical applications, after the target human body image is input into the trained third classification model, the third classification model may output a probability (i.e., a third non-living probability value) indicating that the target human body image belongs to the attack image. The higher the third non-living probability value, the greater the probability that the user is performing attack verification using a printed image, video, mask, or the like may be represented.
In this embodiment of the present disclosure, the extracting a target human body image in the image to be detected may specifically include: acquiring position information of an area where a target human body image exists in the image to be detected, wherein a human body image exists in the area; and extracting the target human body image from the image to be detected according to the position information of the region.
The obtaining the position information of the region where the target human body image exists in the image to be detected specifically may include: and performing human body detection on the image to be detected by using a second target detection model to obtain the coordinate information of the predicted human body frame output by the second target detection model.
In the embodiment of the present specification, the second object detection model may be trained in advance using a sample image including a human body image, so that the second object detection model may detect a predicted human body region in an image to be detected. The second target detection model may be implemented by using a model that can generate a predicted face frame, such as MTCNN (Multi-task Cascaded Convolutional Networks), opencv, or OpenFace. The sample images used to train the second object detection model and the first classification model may be the same or different, and are not particularly limited.
Fig. 3 is a schematic diagram of an image to be detected according to an embodiment of the present disclosure. As shown in fig. 3, the second object detection model is used to detect the human body in the image 301 to be detected, so as to obtain the coordinate information of the predicted human body frame 303, and the image in the predicted human body frame 303 is extracted to obtain the object human body image.
In practical application, after the target human body image is converted into the second preset resolution, the third classification model is used for classification processing, and the first preset resolution can be determined according to practical requirements without specific limitation.
In practical application, when the region where the human body image exists is not detected in the image to be detected, but the region where the human face image exists can be detected, it is known that at this time, the first non-living probability value and the second non-living probability value can be obtained, but the third non-living probability cannot be obtained, so after the human body detection is performed on the image to be detected by using the second target detection model, it is also possible to: acquiring a human body detection result output by the second target detection model; and when the human body detection result indicates that the human body region is not detected in the image to be detected, generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
When the region where the human body image exists can be detected in the image to be detected, and the region where the human face image exists can be detected, the step 210 may specifically include: and generating a living body detection result according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
In practical application, the product of the first non-living probability value and a first preset weight, the product of the second non-living probability value and a second preset weight and the product of the third non-living probability value and a third preset weight can be summed to obtain a second comprehensive non-living probability value; judging whether the second comprehensive non-living body probability value is larger than a second threshold value; if yes, generating a detection result which indicates that the image to be detected does not contain a living body; if not, generating a detection result indicating that the image to be detected contains the living body. The first preset weight, the second preset weight and the third preset weight can be determined according to actual requirements, which is not particularly limited.
According to the living body detection method provided by the embodiment of the specification, the living body detection result is generated by combining the first non-living body probability value, the second non-living body probability value and the third non-living body probability value which are obtained by analyzing the face image, the whole image and the human body image of the user, so that attack elements contained in the face area, the user background area, the human body gesture and the like can be captured better by the living body detection method, and the accuracy of the living body detection result is improved.
Based on the same thought, the embodiment of the specification also provides a generation method of the living body detection model. Fig. 4 is a flowchart of a method for generating a living body detection model according to an embodiment of the present disclosure. As shown in fig. 4, the process may include:
step 402: acquiring a first classification model, wherein the first classification model is used for classifying a target face image extracted from an image to be detected so as to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image.
In the embodiment of the present disclosure, the functions and training processes of the first classification model in step 402 and the first classification model in step 206 may be the same, which is not described herein.
Step 404: acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected so as to obtain a second non-living probability value; the second classification model is obtained by acquiring images through the equipment and training a second convolutional neural network model.
In the embodiment of the present disclosure, the functions and training processes of the second classification model in step 404 and the second classification model in step 208 may be the same, which will not be described herein.
Step 406: and obtaining a detection result generation model, wherein the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the second non-living body probability value.
In the embodiment of the present disclosure, the detection result generation model may sum a product of the first non-living probability value and a first preset weight and a product of the second non-living probability value and a second preset weight to obtain a first comprehensive non-living probability value; judging whether the first comprehensive non-living body probability value is larger than a first threshold value; if yes, generating a detection result which indicates that the image to be detected does not contain a living body; if not, generating a detection result indicating that the image to be detected contains the living body.
Step 408: and generating a living body detection model according to the first classification model, the second classification model and the detection result generation model.
In the embodiment of the present specification, the living body detection model generated in step 408 may be used in the living body detection method in fig. 2.
Step 408 may specifically include: and connecting the output of the first classification model and the second classification model with the input of the detection result generation model so that the first classification model and the second classification model respectively receive the target face image and the image to be detected and then output the first non-living probability and the second non-living probability to the detection result generation model. After the detection result generation model receives the first non-living body probability and the second non-living body probability, a living body detection result can be output.
In the embodiment of the specification, the living body detection model is generated by combining the first classification model and the second classification model, so that the living body detection model can be used for carrying out living body attack analysis based on user face information, environment information where the user is located and the like, whether the user is attacked by using the printed face image or not can be identified through whether the user face has reflection, deformation and other factors, whether the user is attacked or not can be judged through detecting whether the paper edge or the screen edge exists outside the user face area, and whether the user is attacked or not is judged through detecting whether the user is in a specified environment or not, so that the accuracy and the effectiveness of the generated living body detection result can be improved.
In the embodiment of the present disclosure, since the human body posture information of the user generally includes a part of attack elements, the method in fig. 4 may further include: acquiring a third classification model, wherein the third classification model is used for classifying a target human body image extracted from the image to be detected so as to obtain a third non-living probability value, and the target human body image comprises the target human face image; the third classification model is obtained by training a third convolutional neural network model by using a living body image and a non-living body image extracted from the equipment acquisition image.
In the embodiment of the present disclosure, the function and training process of the third classification model in the embodiment of the method in fig. 4 and the third classification model in the embodiment of the method in fig. 2 may be the same, which is not described herein.
Correspondingly, step 408: specifically, the method comprises the following steps: and generating a living body detection model according to the first classification model, the second classification model, the third classification model and the detection result generation model.
Wherein, the detection result generation model is specifically applicable to: and generating a living body detection result aiming at the image to be detected according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
In the embodiment of the present specification, the model may also be used to extract the target face image and the target human body image in the image to be detected. Thus, the method of fig. 4 may further comprise:
and acquiring a first target detection model, wherein the first target detection model is used for carrying out face detection on the image to be detected to obtain the position information of a first area of the target face image in the image to be detected, so that the target face image is extracted based on the position information of the first area.
And acquiring a second target detection model, wherein the second target detection model is used for detecting the human body of the image to be detected, and acquiring the position information of a second area where the target human body image exists in the image to be detected, so that the target human body image is extracted based on the position information of the second area.
In the embodiment of the present disclosure, the function and training process of the first object detection model in the embodiment of the method in fig. 4 and the first object detection model in the embodiment of the method in fig. 2 may be the same, and the function and training process of the second object detection model in the embodiment of the method in fig. 4 and the second object detection model in the embodiment of the method in fig. 2 may also be the same, which are not repeated.
Correspondingly, step 408 may include: and generating a living body detection model according to the first target detection model, the second target detection model, the first classification model, the second classification model, the third classification model and the detection result generation model.
The output of the first target detection model may be connected to the input of the first classification model, the output of the second target detection model may be connected to the input of the third classification model, and the outputs of the first classification model, the second classification model, and the third classification model may be respectively connected to the detection result generation model.
In practical application, when the first target detection model does not detect a face region in the image to be detected, the detection result generation model is further configured to generate a detection result indicating that the image to be detected does not include a living body. And when the second target detection model does not detect the human body region in the image to be detected, the detection result generation model is used for generating a living body detection result according to the first non-living body probability value and the second non-living body probability value. It can be seen that the inputs of the first object detection model and the second object detection model may also be connected to the inputs of the detection result generation model.
Based on the same thought, the embodiment of the present disclosure further provides an apparatus corresponding to the method in fig. 2. Fig. 5 is a schematic structural diagram of a living body detection apparatus corresponding to the method in fig. 2 according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus may include:
the acquiring module 502 is configured to acquire an image to be detected.
A first extraction module 504, configured to extract a target face image in the image to be detected.
A first classification module 506, configured to perform classification processing on the target face image by using a first classification model to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image.
The second classification module 508 is configured to perform classification processing on the image to be detected by using a second classification model to obtain a second non-living probability value; the second classification model is obtained by acquiring images through the equipment and training a second convolutional neural network model.
The living body detection result generation module 510 is configured to generate a living body detection result according to the first non-living body probability value and the second non-living body probability value.
Optionally, the apparatus in fig. 5 may further include: the second extraction module is used for extracting a target human body image in the image to be detected, wherein the target human body image comprises the target human face image; the third classification module is used for classifying the target human body image by using a third classification model to obtain a third non-living body probability value; the third classification model is obtained by training a third convolutional neural network model by using a living body image and a non-living body image extracted from the equipment acquisition image;
correspondingly, the living body detection result generating module 510 may specifically be configured to: and generating a living body detection result according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
Optionally, the first extraction module 504 may specifically be configured to: acquiring position information of a region with a target face image in the image to be detected, wherein one face image exists in the region; and extracting the target face image from the image to be detected according to the position information of the region.
The obtaining the position information of the region where the target face image exists in the image to be detected may specifically include: and carrying out face detection on the image to be detected by using a first target detection model to obtain the coordinate information of the predicted face frame output by the first target detection model.
Optionally, the apparatus in fig. 5 may further include:
and the face detection result acquisition module is used for acquiring the face detection result output by the first target detection model.
Correspondingly, the living body detection result generating module 510 may specifically be configured to: and when the face detection result indicates that the face region is not detected in the image to be detected, generating a detection result indicating that the image to be detected does not contain a living body.
Optionally, the apparatus in fig. 5 may further include:
the second extraction module is used for extracting a target human body image in the image to be detected, wherein the target human body image comprises the target human face image.
The third classification module is used for classifying the target human body image by using a third classification model to obtain a third non-living body probability value; the third classification model is obtained by training a third convolutional neural network model by using a living body image and a non-living body image extracted from the device acquisition image.
Correspondingly, the living body detection result generating module 510 may specifically be configured to: and generating a living body detection result according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
The second extraction module may be specifically configured to obtain location information of an area where the target human body image exists in the image to be detected, where a human body image exists in the area; and extracting the target human body image from the image to be detected according to the position information of the region.
The acquiring the position information of the region where the target human body image exists in the image to be detected may specifically include: and performing human body detection on the image to be detected by using a second target detection model to obtain the coordinate information of the predicted human body frame output by the second target detection model.
Optionally, the apparatus in fig. 5 may further include:
and the human body detection result acquisition module is used for acquiring the human body detection result output by the second target detection model.
Correspondingly, the living body detection result generating module 510 may be specifically configured to generate a living body detection result according to the first non-living body probability value and the second non-living body probability value when the human body detection result indicates that the human body region is not detected in the image to be detected.
Based on the same thought, the embodiment of the present disclosure further provides an apparatus corresponding to the method in fig. 4. Fig. 6 is a schematic structural diagram of a living body detection model generating apparatus corresponding to fig. 4 according to an embodiment of the present disclosure. As shown in fig. 6, the apparatus may include:
The first obtaining module 602 is configured to obtain a first classification model, where the first classification model is configured to perform classification processing on a target face image extracted from an image to be detected, so as to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image.
A second obtaining module 604, configured to obtain a second classification model, where the second classification model is used to classify the image to be detected to obtain a second non-living probability value; the second classification model is obtained by acquiring images through the equipment and training a second convolutional neural network model.
A third obtaining module 606, configured to obtain a detection result generation model, where the detection result generation model is configured to generate a living body detection result for the image to be detected according to the first non-living body probability value and the second non-living body probability value.
And a living body detection model generating module 608, configured to generate a living body detection model according to the first classification model, the second classification model and the detection result generating model.
Optionally, the apparatus in fig. 6 may further include:
the fourth obtaining module is used for obtaining a third classification model, the third classification model is used for classifying the target human body image extracted from the image to be detected so as to obtain a third non-living body probability value, and the target human body image comprises the target human face image; the third classification model is obtained by training a third convolutional neural network model by using a living body image and a non-living body image extracted from the equipment acquisition image.
Correspondingly, the living body detection model generating module 608 may specifically be configured to:
generating a living body detection model according to the first classification model, the second classification model, the third classification model and the detection result generation model; the detection result generation model is specifically used for: and generating a living body detection result aiming at the image to be detected according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
Optionally, the apparatus in fig. 6 may further include:
a fifth obtaining module, configured to obtain a first target detection model, where the first target detection model is configured to perform face detection on the image to be detected, so as to obtain location information of a first area where the target face image exists in the image to be detected, so that the target face image is extracted based on the location information of the first area;
A sixth obtaining module, configured to obtain a second target detection model, where the second target detection model is configured to perform human body detection on the image to be detected, so as to obtain location information of a second area where the target human body image exists in the image to be detected, so that the target human body image is extracted based on the location information of the second area;
correspondingly, the living body detection model generating module 608 may specifically be configured to:
and generating a living body detection model according to the first target detection model, the second target detection model, the first classification model, the second classification model, the third classification model and the detection result generation model.
Based on the same thought, the embodiment of the present specification also provides a living body detection apparatus corresponding to the method in fig. 2. The apparatus may include: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
and acquiring an image to be detected.
And extracting a target face image in the image to be detected.
Classifying the target face image by using a first classification model to obtain a first non-living body probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image.
Classifying the image to be detected by using a second classification model to obtain a second non-living body probability value; the second classification model is obtained by acquiring images through the equipment and training a second convolutional neural network model.
And generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
Based on the same thought, the embodiment of the specification also provides a living body detection model generating device corresponding to the method in fig. 4. The apparatus may include: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to:
Acquiring a first classification model, wherein the first classification model is used for classifying a target face image extracted from an image to be detected so as to obtain a first non-living probability value; the first classification model is obtained by training a first convolutional neural network model by using a living face image and a non-living face image extracted from an equipment acquisition image;
acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected so as to obtain a second non-living probability value; the second classification model is obtained by acquiring an image by using the equipment and training a second convolutional neural network model;
obtaining a detection result generation model, wherein the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the second non-living body probability value;
and generating a living body detection model according to the first classification model, the second classification model and the detection result generation model.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
One skilled in the art will appreciate that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present specification are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to one or more embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is illustrative of embodiments of the present disclosure and is not to be construed as limiting one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of one or more embodiments of the present disclosure, are intended to be included within the scope of the claims of one or more embodiments of the present disclosure.

Claims (23)

1. A living body detection method, comprising:
acquiring an image to be detected;
extracting a target face image in the image to be detected;
classifying the target face image by using a first classification model to obtain a first non-living body probability value;
extracting a target human body image in the image to be detected, wherein the target human body image comprises the target human face image;
Classifying the target human body image by using a third classification model to obtain a third non-living body probability value; the third classification model classifies the target human body image based on attack elements in human body posture information; the attack elements comprise human body gestures of a user holding an object to shield a face; the third non-living probability value is used for representing the probability of attack verification by the user holding the object shielding face; the third classification model is obtained by training a third convolutional neural network model by using a living body image extracted from a living body sample image and a non-living body image extracted from an attack sample image;
and generating a living body detection result according to the first non-living body probability value and the third non-living body probability value.
2. The method of claim 1, wherein the extracting the target face image in the image to be detected specifically includes:
acquiring position information of a region with a target face image in the image to be detected, wherein one face image exists in the region;
and extracting the target face image from the image to be detected according to the position information of the region.
3. The method according to claim 2, wherein the acquiring the position information of the region where the target face image exists in the image to be detected specifically includes:
and carrying out face detection on the image to be detected by using a first target detection model to obtain the coordinate information of the predicted face frame output by the first target detection model.
4. A method according to claim 3, further comprising, after said face detection of said image to be detected using a first object detection model:
acquiring a face detection result output by the first target detection model;
and when the face detection result indicates that the face region is not detected in the image to be detected, generating a detection result indicating that the image to be detected does not contain a living body.
5. The method according to claim 1, wherein the extracting the target human body image in the image to be detected specifically comprises:
acquiring position information of an area where a target human body image exists in the image to be detected, wherein a human body image exists in the area;
and extracting the target human body image from the image to be detected according to the position information of the region.
6. The method according to claim 5, wherein the acquiring the position information of the region where the target human body image exists in the image to be detected specifically includes:
And performing human body detection on the image to be detected by using a second target detection model to obtain the coordinate information of the predicted human body frame output by the second target detection model.
7. The method of claim 1, further comprising, prior to generating a living body detection result from the first non-living body probability value and the third non-living body probability value:
classifying the image to be detected by using a second classification model to obtain a second non-living body probability value;
the generating a living body detection result according to the first non-living body probability value and the third non-living body probability value specifically includes:
and generating a living body detection result according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
8. The method of claim 7, further comprising:
and if the image to be detected does not contain the target human body image, generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
9. The method of claim 8, wherein the generating a living body detection result according to the first non-living body probability value and the second non-living body probability value specifically comprises:
Summing the product of the first non-living probability value and a first preset weight and the product of the second non-living probability value and a second preset weight to obtain a first comprehensive non-living probability value;
judging whether the first comprehensive non-living body probability value is larger than a first threshold value;
if yes, generating a detection result which indicates that the image to be detected does not contain a living body;
if not, generating a detection result indicating that the image to be detected contains the living body.
10. The method of claim 7, wherein the generating a living body detection result according to the first non-living body probability value, the second non-living body probability value, and the third non-living body probability value specifically comprises:
summing the product of the first non-living probability value and a first preset weight, and the product of the second non-living probability value and a second preset weight and the product of the third non-living probability value and a third preset weight to obtain a second comprehensive non-living probability value;
judging whether the second comprehensive non-living body probability value is larger than a second threshold value;
if yes, generating a detection result which indicates that the image to be detected does not contain a living body;
if not, generating a detection result indicating that the image to be detected contains the living body.
11. A method of generating a living body detection model, comprising:
acquiring a first classification model, wherein the first classification model is used for classifying a target face image extracted from an image to be detected so as to obtain a first non-living probability value;
acquiring a third classification model, wherein the third classification model is used for classifying a target human body image extracted from the image to be detected based on attack elements in human body posture information so as to obtain a third non-living probability value, and the target human body image comprises the target human face image; the attack elements comprise human body gestures of a user holding an object to shield a face; the third non-living probability value is used for representing the probability of attack verification by the user holding the object shielding face; the third classification model is obtained by training a third convolutional neural network model by using a living body image extracted from a living body sample image and a non-living body image extracted from an attack sample image;
obtaining a detection result generation model, wherein the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the third non-living body probability value;
And generating a living body detection model according to the first classification model, the third classification model and the detection result generation model.
12. The method of claim 11, further comprising:
acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected so as to obtain a second non-living probability value;
the generating a living body detection model according to the first classification model, the third classification model and the detection result generation model specifically includes:
generating a living body detection model according to the first classification model, the second classification model, the third classification model and the detection result generation model;
the detection result generation model is specifically used for: and generating a living body detection result aiming at the image to be detected according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
13. The method of claim 12, further comprising:
acquiring a first target detection model, wherein the first target detection model is used for carrying out face detection on the image to be detected to obtain the position information of a first area of the target face image in the image to be detected, so as to extract the target face image based on the position information of the first area;
Acquiring a second target detection model, wherein the second target detection model is used for detecting a human body of the image to be detected, and acquiring the position information of a second area where the target human body image exists in the image to be detected, so that the target human body image is extracted based on the position information of the second area;
the generating a living body detection model according to the first classification model, the second classification model, the third classification model and the detection result generation model specifically includes:
and generating a living body detection model according to the first target detection model, the second target detection model, the first classification model, the second classification model, the third classification model and the detection result generation model.
14. The method according to claim 13, wherein when the first target detection model does not detect a face region in the image to be detected, the detection result generation model is further configured to generate a detection result indicating that no living body is contained in the image to be detected.
15. The method of claim 13, wherein when it is determined that the target human body image is not included in the image to be detected based on the second target detection model, the detection result generation model is configured to generate a living body detection result according to the first non-living body probability value and the second non-living body probability value.
16. A living body detection apparatus comprising:
the acquisition module is used for acquiring the image to be detected;
the first extraction module is used for extracting a target face image in the image to be detected;
the first classification module is used for classifying the target face image by using a first classification model to obtain a first non-living probability value;
the second extraction module is used for extracting a target human body image in the image to be detected, wherein the target human body image comprises the target human face image;
the third classification module is used for classifying the target human body image by using a third classification model to obtain a third non-living body probability value; the third classification model classifies the target human body image based on attack elements in human body posture information; the attack elements comprise human body gestures of a user holding an object to shield a face; the third non-living probability value is used for representing the probability of attack verification by the user holding the object shielding face; the third classification model is obtained by training a third convolutional neural network model by using a living body image extracted from a living body sample image and a non-living body image extracted from an attack sample image;
And the living body detection result generation module is used for generating a living body detection result according to the first non-living body probability value and the third non-living body probability value.
17. The apparatus of claim 16, further comprising:
the second classification module is used for classifying the image to be detected by using a second classification model to obtain a second non-living probability value;
the living body detection result generation module is specifically configured to: and generating a living body detection result according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
18. The apparatus of claim 17, the living body detection result generation module is specifically configured to: and if the image to be detected does not contain the target human body image, generating a living body detection result according to the first non-living body probability value and the second non-living body probability value.
19. A living body detection model generation apparatus, comprising:
the first acquisition module is used for acquiring a first classification model, and the first classification model is used for classifying the target face image extracted from the image to be detected so as to obtain a first non-living probability value;
the fourth obtaining module is used for obtaining a third classification model, the third classification model is used for classifying the target human body image extracted from the image to be detected based on the attack elements in the human body posture information so as to obtain a third non-living body probability value, and the target human body image comprises the target human face image; the attack elements comprise human body gestures of a user holding an object to shield a face; the third non-living probability value is used for representing the probability of attack verification by the user holding the object shielding face; the third classification model is obtained by training a third convolutional neural network model by using a living body image extracted from a living body sample image and a non-living body image extracted from an attack sample image;
The third acquisition module is used for acquiring a detection result generation model, and the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the third non-living body probability value;
and the living body detection model generation module is used for generating a living body detection model according to the first classification model, the third classification model and the detection result generation model.
20. The apparatus of claim 19, further comprising:
the second acquisition module is used for acquiring a second classification model, and the second classification model is used for classifying the image to be detected so as to obtain a second non-living probability value;
the living body detection model generation module is specifically used for:
generating a living body detection model according to the first classification model, the second classification model, the third classification model and the detection result generation model;
the detection result generation model is specifically used for: and generating a living body detection result aiming at the image to be detected according to the first non-living body probability value, the second non-living body probability value and the third non-living body probability value.
21. The apparatus of claim 20, the detection result generating a model, specifically for: and if the image to be detected does not contain the target human body image, generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the second non-living body probability value.
22. A living body detecting apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring an image to be detected;
extracting a target face image in the image to be detected;
classifying the target face image by using a first classification model to obtain a first non-living body probability value;
extracting a target human body image in the image to be detected, wherein the target human body image comprises the target human face image;
classifying the target human body image by using a third classification model to obtain a third non-living body probability value; the third classification model classifies the target human body image based on attack elements in human body posture information; the attack elements comprise human body gestures of a user holding an object to shield a face; the third non-living probability value is used for representing the probability of attack verification by the user holding the object shielding face; the third classification model is obtained by training a third convolutional neural network model by using a living body image extracted from a living body sample image and a non-living body image extracted from an attack sample image;
And generating a living body detection result according to the first non-living body probability value and the third non-living body probability value.
23. A living body detection model generating apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a first classification model, wherein the first classification model is used for classifying a target face image extracted from an image to be detected so as to obtain a first non-living probability value;
acquiring a third classification model, wherein the third classification model is used for classifying a target human body image extracted from the image to be detected based on attack elements in human body posture information so as to obtain a third non-living probability value, and the target human body image comprises the target human face image; the attack elements comprise human body gestures of a user holding an object to shield a face; the third non-living probability value is used for representing the probability of attack verification by the user holding the object shielding face; the third classification model is obtained by training a third convolutional neural network model by using a living body image extracted from a living body sample image and a non-living body image extracted from an attack sample image;
Obtaining a detection result generation model, wherein the detection result generation model is used for generating a living body detection result aiming at the image to be detected according to the first non-living body probability value and the third non-living body probability value;
and generating a living body detection model according to the first classification model, the third classification model and the detection result generation model.
CN202110157641.8A 2020-04-10 2020-04-10 Living body detection method, device and equipment Active CN112800997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110157641.8A CN112800997B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110157641.8A CN112800997B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment
CN202010276947.0A CN111178341B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202010276947.0A Division CN111178341B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment

Publications (2)

Publication Number Publication Date
CN112800997A CN112800997A (en) 2021-05-14
CN112800997B true CN112800997B (en) 2024-01-05

Family

ID=70658435

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010276947.0A Active CN111178341B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment
CN202110157641.8A Active CN112800997B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202010276947.0A Active CN111178341B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment

Country Status (1)

Country Link
CN (2) CN111178341B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705594B (en) * 2020-05-21 2024-05-21 北京沃东天骏信息技术有限公司 Image identification method and device
CN112507831B (en) * 2020-05-22 2022-09-23 支付宝(杭州)信息技术有限公司 Living body detection method, living body detection device, living body detection apparatus, and storage medium
CN111645695B (en) * 2020-06-28 2022-08-09 北京百度网讯科技有限公司 Fatigue driving detection method and device, computer equipment and storage medium
CN112559332B (en) * 2020-07-13 2023-04-07 支付宝(杭州)信息技术有限公司 Attack testing method, device and equipment for biological feature recognition
CN111985400A (en) * 2020-08-20 2020-11-24 中国建设银行股份有限公司 Face living body identification method, device, equipment and storage medium
CN112101154B (en) * 2020-09-02 2023-12-15 腾讯科技(深圳)有限公司 Video classification method, apparatus, computer device and storage medium
CN112560598B (en) * 2020-12-02 2022-04-08 支付宝(杭州)信息技术有限公司 Living body detection method, device and equipment
CN112613470A (en) * 2020-12-30 2021-04-06 山东山大鸥玛软件股份有限公司 Face silence living body detection method, device, terminal and storage medium
CN112766162B (en) * 2021-01-20 2023-12-22 北京市商汤科技开发有限公司 Living body detection method, living body detection device, electronic equipment and computer readable storage medium
CN112800941B (en) * 2021-01-26 2023-06-06 中科人工智能创新技术研究院(青岛)有限公司 Face anti-fraud method and system based on asymmetric auxiliary information embedded network
CN113591615A (en) * 2021-07-14 2021-11-02 广州敏视数码科技有限公司 Multi-model-based driver smoking detection method
CN113569708A (en) * 2021-07-23 2021-10-29 北京百度网讯科技有限公司 Living body recognition method, living body recognition device, electronic apparatus, and storage medium
CN113642428B (en) * 2021-07-29 2022-09-27 北京百度网讯科技有限公司 Face living body detection method and device, electronic equipment and storage medium
CN113869253A (en) * 2021-09-29 2021-12-31 北京百度网讯科技有限公司 Living body detection method, living body training device, electronic apparatus, and medium
CN114627534B (en) * 2022-03-15 2024-09-13 平安科技(深圳)有限公司 Living body discriminating method, electronic apparatus, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107818313A (en) * 2017-11-20 2018-03-20 腾讯科技(深圳)有限公司 Vivo identification method, device, storage medium and computer equipment
CN108664843A (en) * 2017-03-27 2018-10-16 北京三星通信技术研究有限公司 Live subject recognition methods, equipment and computer readable storage medium
CN109508694A (en) * 2018-12-10 2019-03-22 上海众源网络有限公司 A kind of face identification method and identification device
CN109684924A (en) * 2018-11-21 2019-04-26 深圳奥比中光科技有限公司 Human face in-vivo detection method and equipment
CN109840467A (en) * 2018-12-13 2019-06-04 北京飞搜科技有限公司 A kind of in-vivo detection method and system
CN110333778A (en) * 2019-05-30 2019-10-15 深圳壹账通智能科技有限公司 Examination & approval instruction generation method, device and computer equipment based on micro- Expression Recognition
CN110688967A (en) * 2019-09-30 2020-01-14 上海依图信息技术有限公司 System and method for static human face living body detection
CN110751025A (en) * 2019-09-06 2020-02-04 平安普惠企业管理有限公司 Business handling method, device, equipment and medium based on face recognition

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10452894B2 (en) * 2012-06-26 2019-10-22 Qualcomm Incorporated Systems and method for facial verification
US10956714B2 (en) * 2018-05-18 2021-03-23 Beijing Sensetime Technology Development Co., Ltd Method and apparatus for detecting living body, electronic device, and storage medium
CN109034102B (en) * 2018-08-14 2023-06-16 腾讯科技(深圳)有限公司 Face living body detection method, device, equipment and storage medium
CN109784148A (en) * 2018-12-06 2019-05-21 北京飞搜科技有限公司 Biopsy method and device
CN109670452A (en) * 2018-12-20 2019-04-23 北京旷视科技有限公司 Method for detecting human face, device, electronic equipment and Face datection model
CN110472519B (en) * 2019-07-24 2021-10-29 杭州晟元数据安全技术股份有限公司 Human face in-vivo detection method based on multiple models
CN110751069A (en) * 2019-10-10 2020-02-04 武汉普利商用机器有限公司 Face living body detection method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108664843A (en) * 2017-03-27 2018-10-16 北京三星通信技术研究有限公司 Live subject recognition methods, equipment and computer readable storage medium
CN107818313A (en) * 2017-11-20 2018-03-20 腾讯科技(深圳)有限公司 Vivo identification method, device, storage medium and computer equipment
CN109684924A (en) * 2018-11-21 2019-04-26 深圳奥比中光科技有限公司 Human face in-vivo detection method and equipment
CN109508694A (en) * 2018-12-10 2019-03-22 上海众源网络有限公司 A kind of face identification method and identification device
CN109840467A (en) * 2018-12-13 2019-06-04 北京飞搜科技有限公司 A kind of in-vivo detection method and system
CN110333778A (en) * 2019-05-30 2019-10-15 深圳壹账通智能科技有限公司 Examination & approval instruction generation method, device and computer equipment based on micro- Expression Recognition
CN110751025A (en) * 2019-09-06 2020-02-04 平安普惠企业管理有限公司 Business handling method, device, equipment and medium based on face recognition
CN110688967A (en) * 2019-09-30 2020-01-14 上海依图信息技术有限公司 System and method for static human face living body detection

Also Published As

Publication number Publication date
CN111178341B (en) 2021-01-26
CN111178341A (en) 2020-05-19
CN112800997A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
CN112800997B (en) Living body detection method, device and equipment
CN113095124B (en) Face living body detection method and device and electronic equipment
CN106650662B (en) Target object shielding detection method and device
CN109344793B (en) Method, apparatus, device and computer readable storage medium for recognizing handwriting in the air
CN111553333B (en) Face image recognition model training method, recognition method, device and electronic equipment
CN110688939B (en) Method, system and equipment for verifying certificate image to be identified
Vazquez-Fernandez et al. Built-in face recognition for smart photo sharing in mobile devices
CN111311634A (en) Face image detection method, device and equipment
CN111368944B (en) Method and device for recognizing copied image and certificate photo and training model and electronic equipment
CN111027507A (en) Training data set generation method and device based on video data identification
CN113111804B (en) Face detection method and device, electronic equipment and storage medium
CN112784857A (en) Model training and image processing method and device
CN111680670B (en) Cross-mode human head detection method and device
CN111340014A (en) Living body detection method, living body detection device, living body detection apparatus, and storage medium
CN112347512A (en) Image processing method, device, equipment and storage medium
CN110443107A (en) Image procossing for object detection
CN111160251B (en) Living body identification method and device
CN116152933A (en) Training method, device, equipment and storage medium of anomaly detection model
CN114998962A (en) Living body detection and model training method and device
CN112949516A (en) Recognition method and device for quilt kicking behavior
CN111523539A (en) Character detection method and device
CN111368726B (en) Construction site operation face personnel number statistics method, system, storage medium and device
CN108875770B (en) Pedestrian detection false alarm data labeling method, device, system and storage medium
CN110009770A (en) A kind of method of identity user, equipment and entrance guard device
CN112950732B (en) Image generation method and device, storage medium and electronic equipment

Legal Events

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