Living body detection method and device, computer readable storage medium and electronic device
By displaying images with different depth of field information on the screen and using the depth-of-field change characteristics of real human eyes for live body detection, it solves the problems of high cost and poor accuracy of face recognition in the existing technology, and realizes low-cost, high-accuracy live body detection. Detection and authentication.
Patent Information
- Application Number
- CN202110627054.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-04
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-06-04
AI Technical Summary
Existing facial recognition technology uses depth sensors for liveness detection, which is costly and inaccurate, and poses security risks. It is especially difficult to effectively protect against photo or video camouflage attacks.
By displaying at least two frames of images on the screen, the depth information of which is not exactly the same, the eye data of the target object is obtained and matched with the standard data of the living eyes to determine whether the target object is a real person, using the characteristics of the real human eye that changes with the depth of field. Liveness detection avoids dependence on depth sensors.
It achieves low-cost, accurate live body detection with good user experience. It does not require a special depth sensor, can effectively prevent masquerading attacks, and improves the security of identity verification.
Smart Images

Figure CN113239887B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a liveness detection method, a liveness detection device, a computer-readable storage medium, and an electronic device. Background Art
[0002] At present, face recognition technology is increasingly widely used in payment, security, attendance and other scenarios, greatly improving the convenience of identity authentication. However, face recognition technology has security issues. It is possible to pass identity authentication by disguising a face as a photo, mask, video or other means for computer system recognition. However, this kind of identity authentication obviously has security risks. Imagine if payment can be made with a photo, it will inevitably bring huge economic losses to users.
[0003] In order to solve the problem that human faces may be counterfeited, a liveness detection method can be used. After first confirming that the object to be detected is a real person, face recognition is performed, which can effectively prevent attacks caused by counterfeiters.
[0004] When performing liveness detection, some technologies need to use depth information collected by depth sensors for judgment. The equipment cost is high and there is still a problem of poor detection accuracy. Summary of the invention
[0005] The present disclosure provides a liveness detection method, a liveness detection device, a computer-readable storage medium, and an electronic device, thereby overcoming the problems of high cost and poor accuracy of liveness detection at least to a certain extent.
[0006] According to a first aspect of the present disclosure, a living body detection method is provided, comprising: when at least two frames of images are displayed on a screen respectively, determining eye data of a target object corresponding to each image; wherein the eyes of the target object are facing the screen, and depth information of each image is not exactly the same; acquiring living body eye standard data corresponding to the depth information of each image; and determining that the target object is living when the eye data of the target object matches the living body eye standard data.
[0007] According to a second aspect of the present disclosure, a liveness detection device is provided, comprising: an eye data determination module, used to determine eye data of a target object corresponding to each image when at least two frames of images are displayed on a screen respectively; wherein the eyes of the target object are facing the screen, and depth of field information of each image is not completely the same; a liveness standard acquisition module, used to acquire liveness eye standard data corresponding to the depth of field information of each image; and a liveness detection module, used to determine that the target object is live when the eye data of the target object matches the liveness eye standard data.
[0008] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned living body detection method is implemented.
[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, including a processor; and a memory for storing one or more programs, which, when the one or more programs are executed by the processor, enables the processor to implement the above-mentioned living body detection method.
[0010] In the technical solutions provided by some embodiments of the present disclosure, the eye data of the target object is determined when the screen displays each of at least two frames of images, the eyes of the target object are facing the screen and the depth of field information of each image is not exactly the same, the standard data of the living eye corresponding to the depth of field information of each image is obtained, and when the eye data of the target object matches the standard data of the living eye, it is determined that the target object is alive. The disclosed solution uses the principle that the real human eye changes with the depth of field of the picture seen to determine whether the eye data of the target object matches the standard data of the living eye, and then determines whether the target object is a real living person. The whole process is convenient, fast and highly accurate. When the target object is a real user, the user only needs to watch a few images to realize liveness detection without perception. In addition, for the detection equipment, there is no need to be equipped with a special depth sensor, which reduces the equipment cost.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0013] Figure 1 A schematic diagram showing an exemplary system architecture of a liveness detection solution according to an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present disclosure is shown;
[0015] Figure 3 A flowchart of a living body detection method according to an exemplary embodiment of the present disclosure is schematically shown;
[0016] Figure 4 A schematic diagram showing a process of determining standard eye data of a living body according to an embodiment of the present disclosure;
[0017] Figure 5 The flowchart schematically shows the entire process of the liveness detection solution according to the embodiment of the present disclosure;
[0018] Figure 6 The flowchart of the face recognition method according to the embodiment of the present disclosure is schematically shown;
[0019] Figure 7 Schematically shows a block diagram of a living body detection device according to an exemplary embodiment of the present disclosure;
[0020] Figure 8 A block diagram schematically shows a method of implementing face detection by combining a living body detection module with a face recognition module according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0022] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0023] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation. In addition, all the terms "first" and "second" below are only for the purpose of distinction and should not be used as limitations of the present disclosure.
[0024] In the liveness detection scenario, in some instances, a depth sensor (such as a 3D structured light camera) can be used to obtain the depth information of the object, and then combined with the RGB image of the face to achieve liveness detection. However, this method is only suitable for detection devices equipped with depth sensors, is not universal, and may be attacked (deceived) by specially designed pictures or videos, with poor detection accuracy, which may cause serious security issues.
[0025] In other instances, users are prompted to nod, blink, or perform other actions to determine whether the person is a real person, but this method provides a poor user experience and still leaves open the possibility of image or video attacks.
[0026] In some other examples, whether the subject is alive can be determined based on the way in which the expression (emotion) changes caused by the video and the changes are detected. However, the expression (emotion) changes are highly dependent on the individual's likes and dislikes, have poor stability, and are prone to detection bias.
[0027] The inventors have found that when a person's eyes see images with different depths of field, their eyes will involuntarily change, such as changes in focus, focus point, and eye corner position, and these changes are not affected by personal emotions and likes and dislikes. In view of this, the present disclosure provides a new liveness detection solution and face recognition solution.
[0028] Figure 1 A schematic diagram showing an exemplary system architecture of a living body detection solution or a face recognition solution according to an embodiment of the present disclosure is shown.
[0029] like Figure 1 As shown, the system architecture may include a detection device 11 and a server 12. The detection device 11 and the server 12 may be connected via a network, and the connection type of the network may include, for example, wired or wireless communication links or optical fiber cables.
[0030] It should be understood that the number of detection devices 11 and servers 12 is only illustrative. According to the implementation requirements, there can be any number of terminal devices and servers. For example, the server 12 can be a server cluster composed of multiple servers. The server 12 can also be called a cloud or cloud server.
[0031] The detection device 11 can interact with the server 12 through the network to receive or send messages, etc. The detection device 11 can be any device for implementing liveness detection or face identity detection, such as a mobile phone, a tablet computer, a smart wearable device, a personal computer, a bank self-service device, a security device, etc.
[0032] In the case where the detection device 11 performs the liveness detection process of the exemplary embodiment of the present disclosure, first, the detection device 11 determines the eye data of the target object corresponding to at least two frames of images, wherein the eyes of the target object are facing the screen displaying these images and the depth information of these images are not exactly the same. In addition, the detection device 11 can obtain the liveness eye standard data corresponding to the depth information of these images. Next, the detection device 11 can determine whether the eye data of the target object matches the liveness eye standard data. If they match, it is determined that the target object is a live object. If they do not match, it is determined that the target object is not a live object and may be under attack.
[0033] When the target object is detected to be a living body, the detection device 11 may start a face recognition process to perform face recognition on the target object.
[0034] It should be understood that, when the solution of the present disclosure is executed by the detection device 11 , the server 12 may not be included in the system construction, and all operation steps are executed by the detection device 11 .
[0035] In the case where the liveness detection process of the exemplary embodiment of the present disclosure is performed by the server 12, first, the detection device 11 determines the eye data of the target object corresponding to at least two frames of images, wherein the eyes of the target object are facing the screen displaying these images and the depth of field information of these images are not exactly the same. The detection device 11 can send the determined eye data to the server 12. In addition, the server 12 can obtain the live eye standard data corresponding to the depth of field information of these images. Next, the server 12 can determine whether the eye data of the target object matches the live eye standard data. If they match, it is determined that the target object is a live object. If they do not match, it is determined that the target object is not a live object and may be attacked.
[0036] When the server 12 detects that the target object is a living body, the server 12 may send an instruction to the detection device 11 for starting face recognition. After receiving the instruction, the detection device 11 may collect face information of the target object for face recognition. Alternatively, the detection device 11 may send the collected face information to the server 12, and the server 12 executes the face recognition algorithm, and after the server 12 obtains the recognition result, it feeds the recognition result back to the detection device 11.
[0037] When the server 12 detects that the target object is not a living body, the server 12 may feed back the detection result that it is not a living body to the detection device 11. Subsequently, the detection device 11 may display information corresponding to the result on the screen to serve as a prompt or alarm.
[0038] Figure 2Schematic diagram of an electronic device suitable for implementing the exemplary embodiment of the present disclosure is shown. The detection device of the exemplary embodiment of the present disclosure can be configured as follows Figure 2 It should be noted that Figure 2 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0039] The electronic device disclosed in the present invention includes at least a processor and a memory, and the memory is used to store one or more programs. When the one or more programs are executed by the processor, the processor can implement the living body detection method or face recognition method of the exemplary embodiment of the present invention.
[0040] Specifically, Figure 2 As shown, the electronic device 200 may include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a Subscriber Identification Module (SIM) card interface 295, etc. The sensor module 280 may include a depth sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor, etc.
[0041] It is to be understood that the structure illustrated in the embodiment of the present disclosure does not constitute a specific limitation on the electronic device 200. In other embodiments of the present disclosure, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0042] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU). Different processing units may be independent devices or integrated into one or more processors. In addition, a memory may be provided in the processor 210 for storing instructions and data.
[0043] The electronic device 200 implements the display function through a GPU, a display screen 290, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 290 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information. In the disclosed solution, at least two frames of images can be displayed on the display screen 290, and the depth of field information of these images is not exactly the same. For example, a video with a continuous and drastic change in depth of field (the frequency of depth of field change is greater than a frequency threshold) can be played on the display screen 290, and at least two video frame images are selected from the video as at least two frames of images for implementing liveness detection.
[0044] The electronic device 200 can realize the shooting function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290 and the application processor. In some embodiments, the electronic device 200 may include 1 or N camera modules 291, N is a positive integer greater than 1, and if the electronic device 200 includes N cameras, one of the N cameras is a main camera. In the disclosed solution, the eye image of the target object can be obtained with the help of the camera module 291.
[0045] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 can include a program storage area and a data storage area. The external memory interface 222 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.
[0046] The present disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device.
[0047] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0048] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0049] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments.
[0050] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0051] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0052] The scheme of the present disclosure will be described below by taking an example where a detection device executes the liveness detection method and the face recognition method of the present disclosure. In this case, the liveness detection device and the face recognition device can be configured in the detection device.
[0053] Figure 3 The flowchart of the living body detection method according to the exemplary embodiment of the present disclosure is schematically shown. Figure 3 , the living body detection method may include the following steps:
[0054] S32. When the screen displays at least two frames of images respectively, determine the eye data of the target object corresponding to each image; wherein the eyes of the target object are facing the screen, and the depth of field information of each image is not completely the same.
[0055] In an exemplary embodiment of the present disclosure, the detection device is equipped with a screen (or display screen, display, etc.). In order to perform the liveness detection process of the present disclosure, at least two frames of images can be displayed on the screen respectively, and the depth of field information of the at least two frames of images is configured to be not completely the same. For example, in the example of displaying two frames of images, the depth of field information of the two frames of images is different.
[0056] The present disclosure does not limit the content displayed by at least two frames of images, which may be multiple images with related content and different depth of field information, or multiple images with unrelated content and different depth of field information, or multiple images with partially related content and different depth of field information. It is easy to understand that the displayed content mainly refers to the shooting scene and the shooting object of the image. In addition, artificially produced images can also be applied in the present disclosure.
[0057] When liveness detection is required, the screen displays at least two frames of images respectively. Specifically, when a liveness detection triggering event occurs, the detection device can display at least two frames of images respectively on the screen.
[0058] In some embodiments, the liveness detection trigger event may be, for example, the detection device detecting a face outline. In this case, the detection device may determine whether there is a face in the image through the image captured by the camera module equipped therewith. If there is a face, the liveness detection trigger event occurs. If not, the image capture continues or is captured at predetermined intervals. In addition, the presence of a face outline may also be sensed by, for example, an infrared sensor, which is not limited in the present disclosure.
[0059] In other embodiments, the liveness detection trigger event may also be an event of clicking a button (or control). For example, the screen of the detection device is equipped with a liveness detection or face recognition control. When the user touches the control, the liveness detection trigger event occurs.
[0060] In some other embodiments, the liveness detection trigger event may also be an event automatically triggered by the detection device when the business process reaches a certain stage. For example, in the scenario of bank inquiry business, a total of 5 inquiry steps are required, of which the second step is the liveness detection step. Then, at the end of one step, the liveness detection trigger event automatically occurs.
[0061] It should be noted that the present disclosure does not impose any special restrictions on the liveness detection triggering event, which can be freely configured according to the application scenario.
[0062] In addition, the at least two frames of images mentioned in the present disclosure may also be images in the same video. The video may be a pre-configured video with continuous and drastic changes in depth of field (depth of field change frequency greater than a frequency threshold). Similarly, the present disclosure does not limit the content of the video.
[0063] When the above-mentioned liveness detection triggering event occurs, the video is played, and at least two video frame images are randomly selected from the video as at least two frame images respectively displayed on the screen.
[0064] In addition to random selection, a number of images may also be selected at predetermined time intervals. The present disclosure does not limit the method of selecting images from a video.
[0065] When at least two frames of images are displayed on the screen, the detection device can determine the eye data of the target object. Each frame of the image corresponds to a set of eye data, that is, the image displayed on the screen is in a one-to-one correspondence with the eye data. Among them, the target object is the object to be detected whether it is alive, which may be a real person, a mask, an image, etc. The eye data refers to the eye feature point data, and the feature point data includes, but is not limited to, the data of the corner of the eye position, the data of the proportion of the black eyeball in the eyeball, the data of the position of the black eyeball in the eyeball, etc.
[0066] Specifically, when at least two frames of images are displayed on the screen, the detection device can obtain the eye images of the target object corresponding to each displayed image through the equipped camera module. Next, the captured eye images can be analyzed, feature point data can be extracted from the eye images, and the feature point data can be determined as the above-mentioned eye data.
[0067] It should be understood that the eye data mentioned in step S32 may be a single type of data, for example, the eye data extracted from each eye image is the data of the proportion of the black eyeball in the eyeball. However, the eye data mentioned in step S32 may also include a collection of multiple types of data, for example, data including the position of the corner of the eye, the proportion of the black eyeball in the eyeball, the position of the black eyeball in the eyeball, etc., and the present disclosure does not limit this.
[0068] S34. Obtaining living eye standard data corresponding to the depth of field information of each image.
[0069] It is understandable that different depth of field information corresponds to different living eye standard data, that is, the depth of field information and the living eye standard data are also in a one-to-one correspondence. The living eye standard data can be pre-stored in the storage unit so that it can be directly called when performing liveness detection.
[0070] Figure 4 A schematic diagram showing a process of predetermining standard eye data of a living body according to an embodiment of the present disclosure.
[0071] refer to Figure 4 For an image with the same depth of field, user 1, user 2, ..., user n (n is a positive integer greater than 2) observe the image, and eye data 1 corresponding to user 1, eye data 2 corresponding to user 2, ..., eye data n corresponding to user n can be determined respectively through image acquisition and image analysis.
[0072] Next, the results of eye data 1, eye data 2, ..., eye data n are combined to determine the standard data of the living eye corresponding to the image. For example, data with large deviations are eliminated and then the average value is taken to obtain the standard data of the living eye corresponding to the image.
[0073] The determined standard data of the living eye can be directly stored in the detection device, or stored in the server. When necessary, the detection device obtains the standard data of the living eye corresponding to the image from the server.
[0074] S36. When the eye data of the target object matches the standard eye data of a living body, it is determined that the target object is a living body.
[0075] When the current eye data and the standard data of living eyes are determined, the detection device can determine whether the two match. If they match, it is determined that the target object is a living object. If they do not match, it is determined that the target object is not a living object.
[0076] Specifically, the detection device can calculate the similarity between the eye data corresponding to each image and the corresponding standard data of the living eye, and obtain the similarity value corresponding to each image. That is to say, for each image displayed on the screen in step S32, the similarity between the corresponding eye data and the corresponding standard data of the living eye is calculated. If there are 5 images displayed, 5 similarity values can be obtained. In addition, it should be understood that when the eye data contains multiple types, 5 groups of similarity values can be obtained after calculation, and the similarity values in each group are then weighted, for example, to finally obtain 5 similarity values.
[0077] Next, the similarity values corresponding to the images are used to determine whether the eye data of the target object matches the standard eye data of the living body.
[0078] According to some embodiments of the present disclosure, the detection device may calculate the average value of the similarity values corresponding to each image. If the average value is greater than a first similarity threshold, it is determined that the eye data of the target object matches the standard eye data of a living body, that is, it is determined that the target object is a living body. If the average value is less than or equal to the first similarity threshold, it is determined that the eye data of the target object does not match the standard eye data of a living body, that is, it is determined that the target object is not a living body.
[0079] According to other embodiments of the present disclosure, the detection device can count the proportion of the number of similarity values greater than the second similarity threshold. For example, in step S32, the screen displays a total of 5 images. Through calculation, the number of similarity values greater than the second similarity threshold is 3, and the proportion is 0.6.
[0080] If the data ratio exceeds the ratio threshold, it is determined that the eye data of the target object matches the standard eye data of a living body, that is, the target object is determined to be a living body. If the data ratio does not exceed the ratio threshold, it is determined that the eye data of the target object does not match the standard eye data of a living body, that is, it is determined that the target object is not a living body.
[0081] The present disclosure does not limit the specific values of the first similarity threshold, the second similarity threshold and the proportion threshold. For example, the second similarity threshold can usually be configured to be greater than the first similarity threshold.
[0082] The following will refer to Figure 5 The entire process of the liveness detection solution of the embodiment of the present disclosure is described.
[0083] In step S502, the detection device responds to the liveness detection trigger event and plays a video, where the video is a video of changes in depth of field information;
[0084] In step S504, the detection device selects at least two frames of images in the video;
[0085] In step S506, the detection device uses a camera module to capture the eye image of the target object when at least two frames of images are played on the screen;
[0086] In step S508, the detection device extracts feature point data from each eye image;
[0087] In step S510, the detection device determines the standard data of the living eye;
[0088] In step S512, the detection device determines whether the extracted feature point data matches the living eye standard data.
[0089] If there is a match, then in step S514, it is determined that the target object is a living body; if there is no match, then in step S516, it is determined that the target object is not a living body.
[0090] When the target object is determined to be alive through the above-mentioned liveness detection process, the detection device can perform face recognition on the target object. Among them, the face recognition algorithm that can be used in the present disclosure includes but is not limited to a face recognition algorithm based on geometric features, a face recognition algorithm based on eigenfaces, a face recognition algorithm based on neural networks, a face recognition algorithm based on support vector machines, etc.
[0091] The following will refer to Figure 6 The face recognition method of the embodiment of the present disclosure is described.
[0092] In step S602, the detection device detects that a face recognition trigger event occurs. Similar to the above-mentioned liveness detection trigger event, the face recognition trigger event may also occur through user operations, sequential execution of task events, etc. In addition, considering the actual scenario, in some embodiments, the face recognition trigger event is the same as the liveness detection trigger event.
[0093] In step S604, the detection device performs liveness detection. Specifically, the liveness detection can be implemented by using the process of steps S32 to S36 above, which will not be described in detail.
[0094] In step S606, the detection device determines whether the object to be identified is a living body. If it is not a living body, step S608 is executed; if it is a living body, step S610 is executed.
[0095] In step S608, the detection device may prompt on the screen that the recognition has failed, and display words such as "not living".
[0096] In step S610, the detection device may perform face recognition.
[0097] In step S612, the detection device may output the face recognition result and display it on the screen of the detection device.
[0098] It is easy to understand that in the scenario of continuous execution of tasks, Figure 6 The face recognition process shown is only one of multiple tasks, and when the identity authentication based on face recognition is passed, the next task can be automatically executed.
[0099] The following uses a bank inquiry service as an example to illustrate the process of liveness detection and face recognition disclosed herein.
[0100] First, when the query device senses that there is an object in front of the query device through the infrared sensor, the query device automatically plays a pre-configured video of depth of field change, and at the same time, the object can be reminded to watch the video through voice or image.
[0101] Next, when the video plays at least two frames of images, the eye images of the object are acquired by querying the camera module equipped on the device, and the eye data corresponding to each image is determined based on the eye images.
[0102] Then, it is determined whether the determined eye data matches the standard data of living eyes. If so, face recognition is performed; if not, the query interface is exited and a non-living prompt is given.
[0103] After face recognition, if the recognition result is that the target face matches the pre-stored face, a prompt of successful verification can be displayed on the screen, and the interface of the query device jumps to the next interface to further complete the query task.
[0104] The disclosed liveness detection solution uses the principle that the real human eye changes with the depth of field of the image it sees to determine whether the eye data of the target object matches the standard live eye data, and then determines whether the target object is a live real person. The whole process is convenient, fast and highly accurate. When the target object is a real user, the user only needs to watch a few images to realize liveness detection without perception. Compared with the solution that requires nodding and blinking, the user experience is greatly improved. In addition, for the detection equipment, there is no need to be equipped with a special depth sensor, which reduces the equipment cost.
[0105] Implementing face recognition on the basis of the liveness detection solution disclosed in the present invention can greatly improve the accuracy of identity authentication and help avoid serious security issues caused by attacks such as static images.
[0106] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0107] Furthermore, this example embodiment also provides a living body detection device.
[0108] Figure 7 FIG. 1 schematically shows a block diagram of a living body detection device according to an exemplary embodiment of the present disclosure. Figure 7According to an exemplary embodiment of the present disclosure, a living body detection device 7 may include an eye data determination module 71 , a living body standard acquisition module 73 and a living body detection module 75 .
[0109] Specifically, the eye data determination module 71 can be used to determine the eye data of the target object corresponding to each image when at least two frames of images are displayed on the screen respectively; wherein the eyes of the target object are facing the screen, and the depth of field information of each image is not exactly the same; the living body standard acquisition module 73 can be used to obtain the living body eye standard data corresponding to the depth of field information of each image; the living body detection module 75 can be used to determine that the target object is alive when the eye data of the target object matches the living body eye standard data.
[0110] According to an exemplary embodiment of the present disclosure, the eye data determination module 71 can be configured to perform: when the screen displays the at least two frames of images respectively, obtaining the eye image of the target object corresponding to each of the images; extracting feature point data from the eye image, and determining the feature point data as the eye data.
[0111] According to an exemplary embodiment of the present disclosure, the liveness detection module 75 can also be configured to perform: calculating the similarity between the eye data corresponding to each of the images and the corresponding live eye standard data to obtain the similarity value corresponding to each of the images; and using the similarity value corresponding to each of the images to determine whether the eye data of the target object matches the live eye standard data.
[0112] According to an exemplary embodiment of the present disclosure, the liveness detection module 75 can also be configured to perform: calculating the average value of the similarity values corresponding to each of the images, and if the average value is greater than a first similarity threshold, determining that the eye data of the target object matches the live eye standard data; or counting the proportion of similarity values greater than a second similarity threshold, and if the proportion exceeds the proportion threshold, determining that the eye data of the target object matches the live eye standard data.
[0113] According to an exemplary embodiment of the present disclosure, the eye data determination module 71 may also be configured to execute: when playing a video, randomly selecting at least two video frame images from the video as the at least two frame images respectively displayed on the screen.
[0114] According to an exemplary embodiment of the present disclosure, the eye data determination module 71 may also be configured to execute: when a liveness detection trigger event occurs, play the video.
[0115] According to an exemplary embodiment of the present disclosure, the liveness detection trigger event may be the detection of a face contour. In this case, the eye data determination module 71 may also be configured to execute: sensing whether there is a face contour by using an infrared sensor.
[0116] Since the functional modules of the living body detection device in the embodiment of the present disclosure are the same as those in the above-mentioned living body detection method embodiment, they will not be described in detail here.
[0117] Figure 8 A block diagram schematically shows a method of implementing face detection by combining a living body detection module with a face recognition module according to an exemplary embodiment of the present disclosure.
[0118] refer to Figure 8 When the liveness detection device 7 detects that the target object is alive, the liveness detection device 7 can send a control instruction to the face recognition device 8, and the face recognition device 8 can perform face recognition on the target object in response to the control instruction. The face recognition process is the same as in the above-mentioned face recognition method implementation method, and will not be repeated here.
[0119] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0120] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0121] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0122] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0123] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for detecting liveness, It is characterized in that include: When at least two frames of images are displayed on the screen respectively, determining eye data of the target object corresponding to each of the images; wherein the eyes of the target object are facing the screen, and the depth of field information of the images is not completely the same; Acquiring standard data of living eyes corresponding to the depth of field information of each of the images; In a case where the eye data of the target object matches the standard eye data of a living body, determining that the target object is a living body; Wherein, the living body detection method further includes: Calculating the similarity between the eye data corresponding to each of the images and the corresponding living eye standard data to obtain a similarity value corresponding to each of the images; Using the similarity values corresponding to the images, it is determined whether the eye data of the target object matches the standard eye data of the living body.
2. The method for detecting living body according to claim 1, It is characterized in that When at least two frames of images are displayed on a screen respectively, determining eye data of a target object corresponding to each of the images includes: When the screen displays the at least two frames of images respectively, acquiring eye images of the target object corresponding to each of the images; Feature point data is extracted from the eye image, and the feature point data is determined as the eye data.
3. The liveness detection method according to claim 1, It is characterized in that Determining whether the eye data of the target object matches the living eye standard data by using the similarity values corresponding to the images, comprises: Calculating an average value of the similarity values corresponding to the images, and if the average value is greater than a first similarity threshold, determining that the eye data of the target object matches the living eye standard data; or The proportion of the number of similarity values greater than the second similarity threshold is counted, and if the proportion exceeds the proportion threshold, it is determined that the eye data of the target object matches the living eye standard data.
4. The method for detecting living body according to any one of claims 1 to 3, It is characterized in that The living body detection method further comprises: When playing a video, at least two video frame images are randomly selected from the video as the at least two frame images respectively displayed on the screen.
5. The living body detection method according to claim 4, It is characterized in that The living body detection method further comprises: When a liveness detection triggering event occurs, the video is played.
6. The living body detection method according to claim 5, It is characterized in that The liveness detection triggering event is detecting a face contour; wherein the liveness detection method further comprises: The infrared sensor detects whether there is a face outline.
7. A living body detection device, It is characterized in that include: An eye data determination module, used to determine the eye data of the target object corresponding to each of the images when at least two frames of images are displayed on the screen respectively; wherein the eyes of the target object are facing the screen, and the depth of field information of the images is not completely the same; A living body standard acquisition module, used to acquire living body eye standard data corresponding to the depth of field information of each of the images; A living body detection module, configured to determine that the target object is a living body when the eye data of the target object matches the standard eye data of the living body; Among them, the liveness detection module is also used to calculate the similarity between the eye data corresponding to each of the images and the corresponding live eye standard data, and obtain the similarity value corresponding to each of the images; and use the similarity value corresponding to each of the images to determine whether the eye data of the target object matches the live eye standard data.
8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the living body detection method according to any one of claims 1 to 6 is implemented.
9. An electronic device, It is characterized in that include: processor; A memory, used to store one or more programs, when the one or more programs are executed by the processor, enables the processor to implement the living body detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Living body identification method and device
CN107169429A
Anti-counterfeiting processing method and related product
CN107506696A
Living body detection method and device, electronic equipment and storage medium
CN110909704A
Living body detection method and device, electronic equipment and storage medium
CN111353388A
Living body recognition method and recognition device based on eye change characteristics and electronic equipment
CN112712073A
