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

Living body detection method, device and equipment Download PDF

Info

Publication number
CN112800997A
CN112800997A CN202110157641.8A CN202110157641A CN112800997A CN 112800997 A CN112800997 A CN 112800997A CN 202110157641 A CN202110157641 A CN 202110157641A CN 112800997 A CN112800997 A CN 112800997A
Authority
CN
China
Prior art keywords
image
living body
probability value
detected
model
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.)
Granted
Application number
CN202110157641.8A
Other languages
Chinese (zh)
Other versions
CN112800997B (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

Images

Classifications

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

Abstract

The embodiment of the specification discloses a method, a device and equipment for detecting a living body. 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 technologies, and in particular, to a method, an apparatus, and a device for detecting a living body.
Background
With the development of computer technology and optical imaging technology, a user recognition mode based on a face recognition technology is becoming popular. In the face recognition application process, it is usually necessary to verify whether the user is a real living body, so as to discriminate the fraudulent behavior during face recognition and ensure the user's benefits. Currently, the current practice is. In the process of living body detection, a face region of a user is generally analyzed and detected to generate a living body recognition result. The living body detection mode does not comprehensively consider factors such as the environment of the user, and the like, so that the accuracy of the living body detection result is influenced.
In summary, how to improve the accuracy and effectiveness of the generated in-vivo detection result has become an urgent technical problem to be solved.
Disclosure of Invention
In view of the above, one or more embodiments of the present disclosure provide a method, an apparatus and a device for in-vivo detection, which are used to improve the accuracy and validity of the generated in-vivo detection result.
In order to solve the above technical problem, 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 convolution neural network model by utilizing a living body face image and a non-living body face image extracted from an acquired image of equipment;
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 utilizing the equipment to collect images 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.
An embodiment of the present specification provides a method for generating a living body detection model, including:
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 body probability value; the first classification model is obtained by training a first convolution neural network model by utilizing a living body face image and a non-living body face image extracted from an acquired image of equipment;
acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected to obtain a second non-living body probability value; the second classification model is obtained by utilizing the equipment to collect images and training a second convolutional neural network model;
acquiring 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.
An embodiment of this specification provides a living body detection device, includes:
the acquisition module is used for acquiring an 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 body probability value; the first classification model is obtained by training a first convolution neural network model by utilizing a living body face image and a non-living body face image extracted from an acquired image of equipment;
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 body probability value; the second classification model is obtained by utilizing the equipment to collect images 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.
An apparatus for generating a living body detection model provided in an embodiment of the present specification includes:
the first obtaining module is used for obtaining a first classification model, and 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 body probability value; the first classification model is obtained by training a first convolution neural network model by utilizing a living body face image and a non-living body face image extracted from an acquired image of equipment;
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 body probability value; the second classification model is obtained by utilizing the equipment to collect images 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 living body detection device provided by the embodiment of the specification comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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 convolution neural network model by utilizing a living body face image and a non-living body face image extracted from an acquired image of equipment;
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 utilizing the equipment to collect images 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.
An apparatus for generating a living body detection model provided in an embodiment of the present specification includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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 body probability value; the first classification model is obtained by training a first convolution neural network model by utilizing a living body face image and a non-living body face image extracted from an acquired image of equipment;
acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected to obtain a second non-living body probability value; the second classification model is obtained by utilizing the equipment to collect images and training a second convolutional neural network model;
acquiring 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 description achieves the following advantageous effects:
carrying out living body classification processing on a target face image in an image to be detected by utilizing 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 body probability value obtained by analyzing the target face image can accurately reflect whether the user performs user authentication by using attack means such as image printing and the like; the second non-living body probability value obtained by integrally analyzing the image to be detected can accurately reflect the attack risk of the environment where the user is located and whether the user carries 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 favorably improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of one or more embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and together with the description serve to explain the embodiments of the disclosure and not to limit the embodiments of the disclosure. In the drawings:
fig. 1 is a schematic view of an application scenario of a method for detecting a living body according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a method for detecting a living organism 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 diagram of a living body detecting apparatus corresponding to the method of FIG. 2 according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an apparatus for generating a living body detection model corresponding to the method in fig. 4, provided in an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of one or more embodiments of the present disclosure more apparent, the technical solutions of one or more embodiments of the present disclosure will be described in detail and completely with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present specification, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from the embodiments given herein without making any creative effort fall within the scope of protection of one or more embodiments of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
In the prior art, in a face recognition application scenario, it is usually necessary to verify whether a user operates for a real living body, so as to improve the safety of the face recognition operation. At present, during live body detection, the live body attack behavior aiming at a face area is usually identified according to the condition that whether the human face image in an image acquired by equipment has obvious picture reflection, face deformation and the like. Because the factors such as the environment where the user is located and the body posture of the user are not comprehensively considered in the living body detection mode, whether the user is located in a specified environment (for example, a market environment and a shop environment) to perform the living body detection operation cannot be judged, whether the user holds the three-dimensional mask with hands to protect the three-dimensional mask of the wearer to perform the living body detection operation cannot be judged, and therefore the accuracy of the living body detection result is influenced.
In order to solve the defects in the prior art, the scheme provides the following embodiments:
fig. 1 is a schematic view of an application scenario of a method for detecting a living body according to an embodiment of the present disclosure. As shown in fig. 1, when a user 101 performs a living body detection operation at a device 102, the device 102 may acquire an image 103 including 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 generate the living body detection result, and other devices (not shown in fig. 1) communicatively connected to the device 102 may also generate the living body detection result, which is not particularly limited.
Next, a method for detecting a living body provided in an embodiment of the specification will be described in detail with reference to the accompanying drawings: fig. 2 is a schematic flow chart of a method for detecting a living body according to an embodiment of the present disclosure. From a program perspective, 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 following steps:
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 an apparatus, the apparatus may acquire an image of the user to be detected as an image to be detected. The device can be an implement supporting face brushing payment in a shop or a terminal device logged in a personal payment account of a user, and in the embodiment of the description, the device for collecting the image to be detected is not particularly limited.
Step 204: and extracting a target face image in the image to be detected.
In the embodiment of the present specification, the image to be detected usually includes a face image of a user to be detected, and therefore, the face image of the user to be detected can be extracted from the image to be detected as a target face image.
In practical application, the image to be detected may include a plurality of face images, so as to avoid waste of computing resources caused by living body recognition of other users except the user to be detected, when the device is used for collecting the image to be detected, the user to be detected can be indicated to be located at an appointed position, so that the face image of the user to be detected is located in an appointed area in the image to be detected collected by the device, and the face image extracted from the appointed area in the image to be detected can be used as a target face image. Or, because the face image with the largest area in the image to be detected is usually the face image of the user to be detected, the face image with the largest area extracted from the image to be detected can also be used as the target face image. Or, the target face image in the image to be detected can 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 convolution neural network model by using a living body face image and a non-living body face image extracted from an acquired image of equipment.
In the embodiment of the present specification, the device may include both the living body sample image and the attack sample image in the acquired image. In this regard, a live sample image may refer to a collection of images of a sample user in various body poses acquired using a device under various lighting, background conditions. The attack sample image may refer to a set of images in various human postures when a sample user who uses the apparatus to collect the sample image under various illumination and background conditions performs living body examination by printing a face image, a video, a mask, and the like. The collected illumination, background condition and included human body posture of the living body sample image and the attack sample image can be the same.
In practical application, the collected illumination of the collected image of the device may include various illumination conditions such as natural light, office light, light in a commercial place, bedroom light, road light and the like. The background conditions for the device to acquire the image may include: streets, offices, bedrooms, malls, stores, malls, etc. The body gestures of the sample user may include lifting an object (e.g., a picture, a screen, a mask) to the face, holding both hands across the chest, natural sagging of both hands, touching the head with the hands, and so on.
In the embodiment of the present specification, a face image extracted from a living body sample image in an apparatus-acquired 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 a face image extracted from an attack sample image in the device acquisition image as a non-living body face image, and setting a class label of the non-living body face image as a label representing a non-living body. And training the first convolution neural network model by using the living body face image and the non-living body face image so as to obtain a trained first classification model. The first convolution Neural Network model can be implemented by VGGNet, ResNet (Residual Neural Network), and the like. The first convolutional neural network model may be a two-class model.
In the embodiment of the present specification, 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 body probability value) indicating that the target face image belongs to a non-living body. The higher the first non-living body probability value is, the higher the probability that the user performs attack verification by means of printing pictures, videos and the like at the time of living body detection is represented.
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 by using the equipment and training a second convolutional neural network model.
In this embodiment of the present specification, the device-captured image used for training the second classification model and the device-captured image in step 206 may be the same, and details thereof are not repeated. Therefore, the category label of the living body sample image in the device-captured image can be set as a label representing the living body; and labeling a category of the attack sample image in the device-captured image as a label representing a non-living body. And training the second convolutional neural network model by using the living body sample image and the attack sample image in the collected image of the equipment so as to obtain a trained second classification model. The second convolutional Neural Network model may also be implemented by VGGNet, ResNet (redundant Neural Network), or the like. The second convolutional neural network model may be a two-class model.
In the embodiment of the present specification, since the trained second classification model can perform living body classification based on the illumination information, the user background information, the image global information, and the like in the image, it is possible to better capture attack elements on the user background, for example, attack elements such as a paper edge of a printed image when the printed image is held by hand for attack detection, a screen frame when a video is played by hand for attack, an edge of a three-dimensional mask worn on the head, and an environment where the user is located, which is not 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 body probability value) indicating that the image to be detected belongs to the attack image. The higher the second non-living body probability value is, the higher the probability that the user can perform attack verification using a printed image, video, mask, or the like in the non-specified 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 an embodiment of the present specification, generating a live detection result according to the first non-live probability value and the second non-live probability value may specifically include: summing the product of the first non-living body probability value and a first preset weight and the product of the second non-living body probability value and a second preset weight to obtain a first comprehensive non-living body probability value; judging whether the first comprehensive non-living body probability value is larger than a first threshold value; if so, generating a detection result indicating that the to-be-detected image does not contain a living body; and if not, generating a detection result indicating that the to-be-detected image contains the living body. The first preset weight and the second preset weight may be determined according to actual requirements, which is not specifically limited. For example, the first predetermined weight and the second predetermined weight may be 70% and 50%, respectively, or may also be 50% and 50%, respectively.
It should be understood that the order of some steps in the method described in one or more embodiments of the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted.
In the method in fig. 2, the first non-living body probability value obtained by analyzing the target face image can more accurately reflect whether the user performs user authentication by using attack means such as image printing and the like; the second non-living body probability value obtained by integrally analyzing the image to be detected can accurately reflect the attack risk of the environment where the user is located and whether the user carries 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 favorably improved.
Based on the method in fig. 2, some specific embodiments of the method are also provided in the examples of this specification, which are described below.
Optionally, step 204: extracting a target face image in an image to be detected, which specifically comprises the following steps:
acquiring position information of a region with a target face image in the image to be detected, wherein a 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 an embodiment of this specification, the acquiring position information of an area where a 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 utilizing a first target detection model to obtain 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 position information of an area with the target face image in the image to be detected.
In this embodiment, 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 a model capable of generating a predicted face frame, such as MTCNN (Multi-task masked simplified connected Networks), Opencv (open face), or OpenFace (OpenFace). The sample images used for training the first target detection model and the first classification model may be the same or different, and are not limited in this respect.
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, a first target detection model is used to perform face detection on an image to be detected 301, so as to obtain coordinate information of a predicted face frame 302, and an image in the predicted face frame 302 is extracted to obtain a target face image.
In an embodiment of this specification, the extracting the target face image from the image to be detected according to the position information of the region may specifically include: according to the position information of the region, cutting the image in the region from the image to be detected; and performing resolution conversion on the cut image, and taking the obtained image with the first preset resolution as the target face image so as to facilitate the first classification model to classify the target face image.
In practical applications, the resolutions of the live face image and the non-live face image used in the training of 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 specifically limited. For example, the first predetermined resolution may be 128 × 256, or 128 × 128, etc.
In this embodiment of the present specification, after performing face detection on the image to be detected by using the first target 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 shows that the face area is not detected in the image to be detected, generating a detection result showing that the image to be detected does not contain living bodies.
In the embodiment of the present specification, since the living body detection is usually performed on the face image of the user when the living body verification is performed, when the face detection result indicates that a face region is not detected in the image to be detected, a detection result indicating that the image to be detected does not contain a living body may be directly generated, and it is not necessary to process the image to be detected by using the second classification model, 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 specification, since an attacker usually has a specific human posture when using a printed image, a recorded video, or the like to attack, for example, the attacker holds an article to block a face, and the like, it is obvious that the human posture information of the user also belongs to an important information source for distinguishing an attack behavior.
Thus, step 210: before generating a live detection result according to the first non-live probability value and the second non-live probability value, the method may further include:
and 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 human body image and a non-living body human body image extracted from the equipment acquisition image.
In this embodiment of the present specification, the device-captured image used for training the third classification model and the device-captured image in step 206 may be the same, and details thereof are not repeated. Therefore, the category label of the human body image (i.e., living body image) extracted from the living body sample image in the device-captured image can be set as the label representing the living body; and labeling a category of a human body image (i.e., a non-living body image) extracted from an attack sample image in the device-captured image as a label representing a non-living body. So as to train the third convolutional neural network model by using the living body image and the non-living body image, thereby obtaining a trained third classification model. The third convolutional Neural Network model may also be implemented by VGGNet, ResNet (redundant Neural Network), or the like. The third convolutional neural network model may be a two classification model.
In the embodiment of the present specification, since the trained third classification model can perform living body classification based on the human body image of the user, it is possible to better capture attack elements in the human body posture, for example, attack elements such as the human body posture when a handheld printed image, a screen, and the like are attacked.
In the embodiment of the present specification, the target human body image extracted from the image to be detected at least includes 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 application, the target human body image may further include an image of a limb, a trunk, and the like 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 body probability value) indicating that the target human body image belongs to the attack image. The higher the third non-living body probability value, the higher the probability that the user is performing attack verification using a printed image, video, mask, or the like can be represented.
In an embodiment of this specification, the extracting of the target human body image in the image to be detected may specifically include: acquiring position information of a region with a target human body image in the image to be detected, wherein a human body image exists in the region; and extracting the target human body image from the image to be detected according to the position information of the region.
The obtaining of the position information of the region where the target human body image exists in the image to be detected may specifically include: and carrying out human body detection on the image to be detected by utilizing a second target detection model to obtain the coordinate information of the predicted human body frame output by the second target detection model.
In this specification, the second target detection model may be trained in advance using a sample image including a human body image, so that the second target detection model may detect a predicted human body region in an image to be detected. The second target detection model may be implemented by a model capable of generating a predicted face frame, such as MTCNN (Multi-task masked simplified connected Networks), Opencv (open face), or OpenFace (OpenFace). The sample images used for training the second target detection model and the first classification model may be the same or different, and are not limited in this respect.
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 target detection model is used to perform human body detection on the image to be detected 301, so as to obtain coordinate information of the predicted human body frame 303, and the image in the predicted human body frame 303 is extracted to obtain the target human body image.
In practical application, the target human body image can be converted into a second preset resolution, and then the third classification model is used for classification, wherein the first preset resolution can be determined according to actual requirements and is not specifically limited.
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 can be known that, at this time, the first non-living body probability value and the second non-living body probability value can be obtained, but the third non-living body probability cannot be obtained, and therefore, after the human body detection is performed on the image to be detected by using the second target detection model, the following steps may be further performed: acquiring a human body detection result output by the second target detection model; and when the human body detection result shows that the human body area 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, 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 body probability value and a first preset weight, the product of the second non-living body probability value and a second preset weight and the product of the third non-living body probability value and a third preset weight can be summed to obtain a second comprehensive non-living body probability value; judging whether the second comprehensive non-living body probability value is larger than a second threshold value; if so, generating a detection result indicating that the to-be-detected image does not contain a living body; and if not, generating a detection result indicating that the to-be-detected image contains the living body. The first preset weight, the second preset weight and the third preset weight may be determined according to actual requirements, which is not specifically limited.
In the living body detection method provided in the embodiment of the present specification, a 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 obtained by analyzing the face image, the entire image, and the body image of the user, so that the living body detection method can better capture attack elements included in a face area, a user background area, a user body posture, and the like, so as to improve the accuracy of the living body detection result.
Based on the same idea, the embodiment of the present specification further provides a method for generating a living body detection model. Fig. 4 is a schematic 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 body probability value; the first classification model is obtained by training a first convolution neural network model by using a living body face image and a non-living body face image extracted from an acquired image of equipment.
In this embodiment of the present specification, the functions and the training processes of the first classification model in step 402 and the first classification model in step 206 may be the same, and are not described again.
Step 404: acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected to obtain a second non-living body probability value; the second classification model is obtained by acquiring images by using the equipment and training a second convolutional neural network model.
In this embodiment, 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, and are not described again.
Step 406: and acquiring 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 this embodiment, the detection result generation model may sum a product of the first non-living body probability value and a first preset weight and a product of the second non-living body probability value and a second preset weight to obtain a first integrated non-living body probability value; judging whether the first comprehensive non-living body probability value is larger than a first threshold value; if so, generating a detection result indicating that the to-be-detected image does not contain a living body; and if not, generating a detection result indicating that the to-be-detected image 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 in-vivo detection model generated in step 408 can be used in the in-vivo detection method in fig. 2.
Step 408 may specifically include: and connecting the output of the first classification model and the output of 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 body probability and the second non-living body probability to the detection result generation model. The detection result generation model may output the in-vivo detection result after receiving the first non-living body probability and the second non-living body probability.
In the embodiment of the description, the first classification model and the second classification model are combined to generate the living body detection model, so that the living body detection model can perform living body attack analysis based on the face information of the user, the environment information of the user and the like, whether the user uses the printed face image to attack can be identified through whether the face of the user has factors such as reflection and deformation, whether the user attacks can be judged through detecting whether the outer side of the face area of the user has the paper edge or the screen edge, and whether the user attacks can be judged through detecting whether the user attacks in the specified environment, and therefore the accuracy and the effectiveness of the generated living body detection result can be improved.
In this embodiment, since the human posture information of the user usually 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 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 device acquisition image.
In this embodiment, functions and training processes of the third classification model in the method embodiment in fig. 4 and the third classification model in the method embodiment in fig. 2 may be the same, and are not described again.
Correspondingly, step 408: the method specifically 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 usable 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.
In the embodiment of the present specification, the model may also be used to extract a target face image and a target human body image in the image to be detected. Therefore, the method in fig. 4 may further include:
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 image to be detected, wherein the first area of the image to be detected has the target face image, so that the target face image can be 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 carrying out human body detection on the image to be detected to obtain the position information of a second area of the image to be detected, wherein the second area of the image to be detected has the target human body image, so that the target human body image can be extracted based on the position information of the second area.
In this embodiment, functions and a training process of the first target detection model in the method embodiment in fig. 4 and the first target detection model in the method embodiment in fig. 2 may be the same, and functions and a training process of the second target detection model in the method embodiment in fig. 4 and the second target detection model in the method embodiment in fig. 2 may also be the same, which is not described again.
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 connected to the detection result generation model, respectively.
In practical application, when the first target detection model does not detect a human face region in the image to be detected, the detection result generation model is further used for generating a detection result indicating that the image to be detected does not contain 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 with the input of the detection result generation model.
Based on the same idea, the embodiment of the present specification further provides an apparatus corresponding to the method in fig. 2. Fig. 5 is a schematic structural diagram of a living body detecting 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:
an obtaining module 502 is configured to obtain an image to be detected.
The first extraction module 504 is 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 body probability value; the first classification model is obtained by training a first convolution neural network model by using a living body face image and a non-living body face image extracted from an acquired image of equipment.
A second classification module 508, configured to classify 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 by using the equipment and training a second convolutional neural network model.
And a live body detection result generating module 510, configured to generate a live body detection result according to the first non-live body probability value and the second non-live 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 utilizing a living body image and a non-living body image extracted from the acquired image of the equipment;
correspondingly, the living body detection result generation module 510 may be 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.
Optionally, the first extraction module 504 may be specifically configured to: acquiring position information of a region with a target face image in the image to be detected, wherein a 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 of 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 utilizing a first target detection model to obtain coordinate information of a 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 generation module 510 may be specifically configured to: and when the face detection result shows that the face area is not detected in the image to be detected, generating a detection result showing that the image to be detected does not contain living bodies.
Optionally, the apparatus in fig. 5 may further include:
and 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 acquired image of the equipment.
Correspondingly, the living body detection result generation module 510 may be 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.
The second extraction module is specifically used for acquiring position information of a region where a target human body image exists in the image to be detected, wherein a human body image exists in the region; and extracting the target human body image from the image to be detected according to the position information of the region.
The acquiring of the position information of the region where the target human body image exists in the image to be detected may specifically include: and carrying out human body detection on the image to be detected by utilizing 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 a human body region is not detected in the image to be detected.
Based on the same idea, the embodiment of the present specification further provides an apparatus corresponding to the method in fig. 4. Fig. 6 is a schematic structural diagram of a device for generating a living body detection model corresponding to fig. 4 provided in an embodiment of the present disclosure. As shown in fig. 6, the apparatus may include:
a first obtaining module 602, configured to obtain a first classification model, where the first classification model is used to classify a target face image extracted from an image to be detected, so as to obtain a first non-living body probability value; the first classification model is obtained by training a first convolution neural network model by using a living body face image and a non-living body face image extracted from an acquired image of equipment.
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 body probability value; the second classification model is obtained by acquiring images by using 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 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 generation module 608, configured to generate a living body detection model according to the first classification model, the second classification model, and the detection result generation model.
Optionally, the apparatus in fig. 6 may further include:
a fourth obtaining module, configured to obtain a third classification model, where the third classification model is used to classify a 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 includes the target 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 device acquisition image.
Correspondingly, the living body detection model generation module 608 may be specifically 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; wherein the detection result generation model is specifically configured 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.
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 used to perform face detection on the image to be detected, so as to obtain position information of a first region in the image to be detected, where the target face image exists, so as to extract the target face image based on the position information of the first region;
a sixth obtaining module, configured to obtain a second target detection model, where the second target detection model is used to perform human body detection on the image to be detected, so as to obtain position information of a second region in the image to be detected, where the target human body image exists, so as to extract the target human body image based on the position information of the second region;
correspondingly, the living body detection model generation module 608 may be specifically 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 idea, the embodiment of the present specification further 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 convolution neural network model by using a living body face image and a non-living body face image extracted from an acquired image of equipment.
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 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.
Based on the same idea, the embodiment of the present specification further provides a device for generating a living body detection model 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 body probability value; the first classification model is obtained by training a first convolution neural network model by utilizing a living body face image and a non-living body face image extracted from an acquired image of equipment;
acquiring a second classification model, wherein the second classification model is used for classifying the image to be detected to obtain a second non-living body probability value; the second classification model is obtained by utilizing the equipment to collect images and training a second convolutional neural network model;
acquiring 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 description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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 may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using 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, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, 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 for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, 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 divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
One skilled in the art will recognize 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. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description 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 description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
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 computer storage media 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 Discs (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. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" 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 description 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 specification 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.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is merely exemplary of the present disclosure and is not intended to limit one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of claims of one or more embodiments of the present specification.

Claims (23)

1. A method of in vivo detection 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 is classified based on human body posture information in the target human body 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 according to claim 1, wherein the extracting of the target face image in the image to be detected specifically comprises:
acquiring position information of a region with a target face image in the image to be detected, wherein a 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 of the position information of the region where the target face image exists in the image to be detected specifically comprises:
and carrying out face detection on the image to be detected by utilizing a first target detection model to obtain coordinate information of a predicted face frame output by the first target detection model.
4. The method of claim 3, further comprising, after the detecting the human face of the image to be detected by the first target detection model:
acquiring a face detection result output by the first target detection model;
and when the face detection result shows that the face area is not detected in the image to be detected, generating a detection result showing that the image to be detected does not contain living bodies.
5. The method according to claim 1, wherein the extracting of the target human body image in the image to be detected specifically comprises:
acquiring position information of a region with a target human body image in the image to be detected, wherein a human body image exists in the region;
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 of the position information of the region where the target human body image exists in the image to be detected specifically comprises:
and carrying out human body detection on the image to be detected by utilizing 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 live test result based on the first non-live probability value and the third non-live probability value:
classifying the image to be detected by using a second classification model to obtain a second non-living body probability value;
generating a living body detection result according to the first non-living body probability value and the third non-living body probability value, which specifically comprises the following steps:
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 target human body image is determined not to be contained 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.
9. The method of claim 8, wherein generating a live test result according to the first non-live probability value and the second non-live probability value comprises:
summing the product of the first non-living body probability value and a first preset weight and the product of the second non-living body probability value and a second preset weight to obtain a first comprehensive non-living body probability value;
judging whether the first comprehensive non-living body probability value is larger than a first threshold value;
if so, generating a detection result indicating that the to-be-detected image does not contain a living body;
and if not, generating a detection result indicating that the to-be-detected image contains the living body.
10. The method of claim 7, wherein generating a live test result according to the first non-live probability value, the second non-live probability value, and the third non-live probability value comprises:
summing the product of the first non-living body probability value and a first preset weight, the product of the second non-living body probability value and a second preset weight and the product of the third non-living body probability value and a third preset weight to obtain a second comprehensive non-living body probability value;
judging whether the second comprehensive non-living body probability value is larger than a second threshold value;
if so, generating a detection result indicating that the to-be-detected image does not contain a living body;
and if not, generating a detection result indicating that the to-be-detected image 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 body 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 human body posture information to obtain a third non-living body probability value, and the target human body image comprises the target human face image;
acquiring 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 to obtain a second non-living body probability value;
generating a living body detection model according to the first classification model, the third classification model and the detection result generation model, specifically comprising:
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 configured 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.
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 position information of a first area of the image to be detected, wherein the first area of the image to be detected has the target face image, so that the target face image can be extracted based on the position information of the first area;
acquiring a second target detection model, wherein the second target detection model is used for carrying out human body detection on the image to be detected to obtain position information of a second region of the image to be detected, wherein the second region of the image to be detected has the target human body image, so that the target human body image can be extracted based on the position information of the second region;
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 human face region in the image to be detected, the detection result generation model is further used for generating a detection result indicating that no living body is included in the image to be detected.
15. The method according to 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 an 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 body 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 is classified based on human body posture information in the target human body 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 body probability value;
the in-vivo 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, wherein the in-vivo detection result generation module is specifically configured to: and if the target human body image is determined not to be contained 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.
19. An apparatus for generating a living body detection model, comprising:
the first obtaining module is used for obtaining a first classification model, and 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 body probability value;
a fourth obtaining module, configured to obtain a third classification model, where the third classification model is used to perform classification processing on a target human body image extracted from the image to be detected based on human body posture information to obtain a third non-living body probability value, and the target human body image includes the target face 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 body probability value;
the living body detection model generation module is specifically 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.
21. The apparatus of claim 20, wherein the detection result generation model is specifically configured to: and if the target human body image is determined not to be contained in the image to be detected, 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 examination apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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 is classified based on human body posture information in the target human body 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 device for generating a living body detection model, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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 body 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 human body posture information to obtain a third non-living body probability value, and the target human body image comprises the target human face image;
acquiring 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
CN202010276947.0A CN111178341B (en) 2020-04-10 2020-04-10 Living body detection method, device and equipment
CN202110157641.8A CN112800997B (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 true CN112800997A (en) 2021-05-14
CN112800997B 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 (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705594A (en) * 2020-05-21 2021-11-26 北京沃东天骏信息技术有限公司 Method and device for identifying image
CN111340014B (en) * 2020-05-22 2020-11-17 支付宝(杭州)信息技术有限公司 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
CN111563049B (en) * 2020-07-13 2020-11-03 支付宝(杭州)信息技术有限公司 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
CN114627534A (en) * 2022-03-15 2022-06-14 平安科技(深圳)有限公司 Living body discrimination method, electronic device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130342702A1 (en) * 2012-06-26 2013-12-26 Qualcomm Incorporated Systems and method for facial verification
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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130342702A1 (en) * 2012-06-26 2013-12-26 Qualcomm Incorporated Systems and method for facial verification
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
CN111178341A (en) 2020-05-19
CN111178341B (en) 2021-01-26
CN112800997B (en) 2024-01-05

Similar Documents

Publication Publication Date Title
CN111178341B (en) Living body detection method, device and equipment
CN107358157B (en) Face living body detection method and device and electronic equipment
CN106650662B (en) Target object shielding detection method and device
CN108171158B (en) Living body detection method, living body detection device, electronic apparatus, and storage medium
CN107368827B (en) Character recognition method and device, user equipment and server
CN110688939B (en) Method, system and equipment for verifying certificate image to be identified
CN111626243B (en) Mask face shielding identity recognition method and device and storage medium
CN106663196A (en) Computerized prominent person recognition in videos
CN111061898A (en) Image processing method, image processing device, computer equipment and storage medium
CN111368944B (en) Method and device for recognizing copied image and certificate photo and training model and electronic equipment
CN113516113A (en) Image content identification method, device, equipment and storage medium
CN113255516A (en) Living body detection method and device and electronic equipment
CN114511589A (en) Human body tracking method and system
CN111680670B (en) Cross-mode human head detection method and device
CN112949516A (en) Recognition method and device for quilt kicking behavior
CN105204752B (en) Projection realizes interactive method and system in reading
JP2014199506A (en) Object detection device, object method of detection, and program
CN113221594A (en) Iris identification and drug-taking detection method, device, readable storage medium and equipment
CN116152576B (en) Image processing method, device, equipment and storage medium
KR102238672B1 (en) Multiclass classification apparatus, method thereof and computer readable medium having computer program recorded therefor
CN114998962A (en) Living body detection and model training method and device
CN108875472B (en) Image acquisition device and face identity verification method based on image acquisition device
CN115546908A (en) Living body detection method, device and equipment
de Albuquerque et al. High-speed image processing algorithms for real-time detection of MARFEs on JET
CN115578796A (en) Training method, device, equipment and medium for living body detection model

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