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

Living body detection method, device and equipment Download PDF

Info

Publication number
CN114973426A
CN114973426A CN202110619560.5A CN202110619560A CN114973426A CN 114973426 A CN114973426 A CN 114973426A CN 202110619560 A CN202110619560 A CN 202110619560A CN 114973426 A CN114973426 A CN 114973426A
Authority
CN
China
Prior art keywords
video
value
living body
processed
detection
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
CN202110619560.5A
Other languages
Chinese (zh)
Other versions
CN114973426B (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.)
China Mobile Communications Group Co Ltd
China Mobile Internet Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Internet 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 China Mobile Communications Group Co Ltd, China Mobile Internet Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110619560.5A priority Critical patent/CN114973426B/en
Publication of CN114973426A publication Critical patent/CN114973426A/en
Application granted granted Critical
Publication of CN114973426B publication Critical patent/CN114973426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines

Abstract

The invention discloses a method, a device and equipment for detecting a living body, wherein the method comprises the following steps: acquiring a video to be processed containing a user specified action; wherein, the designated action is the action made by the user according to the action prompt; determining a target video according to the contrast and brightness of the video to be processed; performing static living body detection on the target video through a pre-trained living body identification model to obtain a detection value output by the living body identification model, and determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range; and adjusting the preset initial detection value range according to the contrast and brightness of the target video to obtain the target detection value range.

Description

Living body detection method, device and equipment
Technical Field
The invention relates to the field of detection, in particular to a method, a device and equipment for detecting a living body.
Background
In recent years, with the development of face recognition technology, more and more scenes in which "face swiping" can be applied are available, such as face swiping payment, face swiping card checking and signing, face swiping unlocking of electronic devices, face swiping unlocking of door controls, face swiping authentication and the like. As a vital technology in the face recognition technology, the living body detection plays an important role in distinguishing the authenticity of images, resisting spoofing attacks and protecting the safety of the whole face recognition system.
In the related art, in the process of the living body detection, a video image is usually acquired through a camera, and then the living body detection is directly performed according to the video image acquired by the camera.
Since the related technology relies too much on the video image fed back by the camera, once the camera is attacked, for example, an attacker replaces the video image collected by the camera with the pre-recorded video image, the in-vivo detection fails or is wrong, so that loss is brought to a user, and the security is low. In addition, since the in-vivo detection is directly performed based on the video image acquired by the camera, and the video image acquired by the camera is easily affected by external factors, the accuracy and robustness of the in-vivo detection are low.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for detecting living bodies, and aims to solve the problems of low safety, accuracy and robustness of the living body detection technology in the related technology.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, there is provided a method of in vivo detection, the method comprising:
acquiring a video to be processed containing a user specified action; wherein the designated action is an action made by the user according to the action prompt;
determining a target video according to the contrast and brightness of the video to be processed;
performing static living body detection on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model, and determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range; and adjusting the range of preset initial detection values according to the contrast and brightness of the target video to obtain the range of the target detection values.
In a second aspect, there is provided a living body detection apparatus, the apparatus comprising:
the acquisition module is used for acquiring a video to be processed containing a user specified action; wherein the designated action is an action made by the user according to the action prompt;
the determining module is used for determining a target video according to the contrast and the brightness of the video to be processed;
the detection module is used for carrying out static living body detection on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model, and determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range; and adjusting the range of preset initial detection values according to the contrast and brightness of the target video to obtain the range of the target detection values.
In a third aspect, an apparatus is provided, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first aspect as described above.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, carries out the steps of the method according to the first aspect as described above.
The at least one technical scheme provided by the embodiment of the invention can achieve the following technical effects:
when the live body detection is carried out, the technical scheme provided by the embodiment of the invention can carry out the live body detection based on the video to be processed containing the action specified by the user, so that the condition of the failure of the live body detection caused by the fact that an attacker replaces the video image collected by the camera with the pre-recorded video image in the related technology can be effectively solved, and the safety is improved; in addition, the technical scheme provided by the embodiment of the invention can also be used for carrying out in-vivo detection on the video to be processed by combining the contrast and the brightness of the video to be processed, and because external factors which possibly influence the in-vivo detection result are considered, the problems of low accuracy and low robustness of in-vivo detection caused by not considering the external factors can be effectively solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic flow chart of a method for detecting a living body according to an embodiment of the present invention;
FIG. 2 is a block diagram of an embodiment of a biopsy device 200;
fig. 3 is a schematic diagram of a hardware structure of a living body detecting apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the specific embodiments of the present invention and the accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart of a biopsy method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step 102: acquiring a video to be processed containing a user specified action; wherein the action is designated as the action taken by the user according to the action prompt.
Step 104: and determining the target video according to the contrast and the brightness of the video to be processed.
Step 106: performing static living body detection on the target video through a pre-trained living body identification model to obtain a detection value output by the living body identification model, and determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range; and adjusting the preset initial detection value range according to the contrast and brightness of the target video to obtain the target detection value range.
In the embodiment of the present invention, a to-be-processed video including a user-specified action may be obtained first, where the specified action may be an action performed by a user according to an action prompt.
In one embodiment, the action prompt may be played to the user through the terminal, where the action prompt may be one or more action prompts randomly selected from a plurality of preset action prompts, such as a blinking prompt, a shaking prompt, a nodding prompt, and the like. After the action prompt is played to the user through the terminal, the action of the user according to the action prompt can be shot through a camera of the terminal, and the video to be processed containing the action specified by the user is obtained.
It should be noted that the embodiment of the present invention may be applied to a terminal, and may also be applied to a device that establishes a communication connection with the terminal. When the method is applied to the terminal, the terminal can play action prompts to a user through a speaker or a receiver or a module capable of outputting sound such as Bluetooth and the like of the terminal, and shoot to-be-processed processing containing actions specified by the user through a camera of the terminal; when the device is applied to a device which establishes communication connection with a terminal, the device can play action prompts to a user and shoot a to-be-processed video containing a user-specified action by calling a loudspeaker, a receiver or a camera of the terminal.
After the video to be processed containing the action specified by the user is obtained, the target video can be determined according to the contrast and brightness of the video to be processed.
In one embodiment of the present invention, a linear fit relationship between the exposure distance value, the contrast, and the brightness may be obtained first. And then, determining the exposure degree value of the video to be processed according to the linear fitting relation among the exposure degree value, the contrast and the brightness, and the contrast and the brightness of the video to be processed.
After the exposure degree value of the video to be processed is determined, whether the exposure degree value of the video to be processed belongs to a preset standard degree value range or not can be determined, and if the exposure degree value of the video to be processed belongs to the preset standard degree value range, the video to be processed is determined as a target video; if the exposure degree value of the video to be processed does not belong to the preset standard degree value range, prompting a user to change the video shooting angle and/or shooting position, obtaining the video to be processed containing the action specified by the user after the video shooting angle and/or shooting position is changed, returning to the linear fitting relation among the exposure degree value, the contrast and the brightness which are determined in advance, and the contrast and the brightness of the video to be processed, determining the exposure degree value of the video to be processed and repeatedly executing the exposure degree value until the exposure degree value of the video to be processed belongs to the preset standard degree value range or the repeated execution times reaches a preset times threshold value, and determining the current video to be processed as a target video.
In the embodiment of the present invention, the exposure degree value of the video to be processed may be determined, and it may be determined whether the exposure degree value of the video to be processed belongs to a preset standard degree value range, where the preset standard degree value range may represent that the corresponding video or image is normally exposed. Therefore, when the exposure degree value of the video to be processed does not belong to the preset standard degree value range, overexposure or underexposure of the video to be processed can be determined. At this time, the user may be guided by the terminal to adjust the photographing angle and/or photographing position to reduce the influence of overexposure or underexposure on the living body detection.
In one example, when the user is guided by the terminal to adjust the shooting angle and/or the shooting position, the user may be prompted by voice through a module that can output sound, such as a speaker or an earphone of the terminal or bluetooth, to adjust the shooting angle and/or the shooting position. Of course, the user may also be prompted to adjust the shooting angle and/or shooting position by text through the screen of the terminal.
After the user is prompted to adjust the shooting angle and/or the shooting position, the video can be shot again through the terminal, and at the moment, the video to be processed containing the action specified by the user after the user changes the shooting angle and/or the shooting position of the video can be obtained. Then, the exposure degree value of the currently shot video to be processed, namely the video to be processed containing the action specified by the user after the user changes the video shooting angle and/or the shooting position, can be obtained, and whether the exposure degree value of the currently shot video to be processed belongs to the preset standard degree value range or not is determined.
If the exposure degree value of the currently shot video to be processed belongs to the range of the preset standard degree value, determining the currently shot video to be processed as a target video; if the exposure distance value of the currently shot video to be processed does not belong to the preset standard degree value range, i.e., the currently captured video to be processed is underexposed or overexposed, the user may be prompted again to change the video capture angle and/or capture position, then, shooting the video to be processed containing the action specified by the user after the user changes the video shooting angle and/or the shooting position, and judging whether the exposure degree value of the currently shot video belongs to a preset standard degree value range or not, if not, continuing to prompt the user to change the video shooting angle and/or the shooting position … … until the exposure degree value of the currently shot video to be processed belongs to the preset standard degree value range or the number of times of repeatedly executing the prompt operation and the determination operation of the exposure degree value reaches a preset number threshold, and at the moment, determining the currently shot video to be processed as the target video.
It should be noted that, if the exposure value of the captured video to be processed still does not belong to the preset standard degree value range under the condition that the user is prompted to adjust the capturing angle and/or the capturing position for multiple times, the preset standard degree value range can be adjusted according to the video environment of the captured video to be processed, and the preset initial detection value range used in the subsequent static living body detection can be adapted.
In an embodiment of the present invention, when determining the exposure value of the video to be processed according to the predetermined linear fitting relationship among the exposure value, the contrast, and the brightness, and the contrast and the brightness of the video to be processed, the target skin color type of the user in the video to be processed may be identified first, then, according to the target skin color type, the linear fitting relationship among the exposure value, the contrast, and the brightness corresponding to the target skin color type may be determined from the predetermined linear fitting relationship among the exposure value, the contrast, and the brightness corresponding to each skin color type, and then, according to the linear fitting relationship among the exposure value, the contrast, and the brightness corresponding to the target skin color type, and the contrast and the brightness of the video to be processed, the exposure value of the video to be processed may be determined.
In one example, when determining a linear fitting relationship among the exposure distance value, the contrast, and the brightness corresponding to each skin color type, a data set of a human face of different skin color types may be obtained first, where the data set may be a data set composed of a plurality of images or a data set composed of a plurality of videos. Then, the data set is divided according to the skin color types to obtain a plurality of subdata sets, the contrast value range, the brightness value range and the exposure length value of the face in each subdata set are further determined, linear fitting is conducted on the contrast value range, the brightness value range and the exposure length value of the face in each subdata set, and the linear fitting relation among the exposure length value, the contrast and the brightness corresponding to each skin color type is obtained.
In an embodiment of the present invention, the skin tone types may include at least black, yellow, and white. Data sets containing faces of different skin tone types may be obtained, such as obtaining a plurality of data sets containing faces of black, a plurality of data sets containing faces of yellow, and a plurality of data sets containing faces of white. The data sets may then be partitioned according to skin tone type and the contrast and brightness of all data sets calculated separately. And after the contrast and the brightness of the data set are obtained, averaging the contrast and the brightness of the data sets of different skin color types can be performed, so that the distribution ranges of the contrast and the brightness corresponding to the data sets of different skin color types are obtained.
Then, labeling the exposure length value of each image or video in the data set, and representing whether the corresponding image or video is overexposed, normally exposed or underexposed according to the labeled exposure degree value. After the marking is finished, linear fitting can be carried out on the exposure distance value, the contrast and the brightness of each image or video to obtain a linear fitting relation among the exposure distance value, the contrast and the brightness corresponding to each skin color type.
In one example, the linear fit relationship between exposure length value, contrast, and brightness may be:
y=ax 1 +bx 2 + c formula 1
Wherein y may be an exposure distance value, x 1 And x 2 May be contrast and brightness, and a, b, c may be coefficients in a linear fit equation.
In one embodiment of the invention, after the target video is obtained, static living body detection can be performed on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model, and whether a user in the target video is a living body is determined according to whether the detection value belongs to a target detection value range; and adjusting the preset initial detection value range according to the contrast and brightness of the target video to obtain the target detection value range.
In one embodiment, the target detection value range may be acquired first, wherein the trained living body detection model may be acquired first when the target detection value range is acquired.
In one example, the trained in vivo detection model may be trained from training samples, where the training samples may include at least a training video and a detection value for identifying whether a user in the training video is a living body. The detection value can be labeled by related personnel according to the content of the training video.
In one example, the living body detection model may be an SVM (Support Vector Machine) model trained based on facial features in the training video.
After the trained living body recognition model is obtained, the designated videos with different exposure distance values are input into the living body recognition model, and detection values corresponding to the designated videos with different exposure distance values output by the living body recognition model are obtained (for distinguishing the detection values corresponding to the target video output by the subsequent living body recognition model, the detection values obtained according to the exposure distance values are called prediction values in the following description), wherein all users in the designated videos are living bodies or not. Then, linear fitting can be performed on the exposure degree value of the designated video and the predicted value corresponding to the exposure degree value of the designated video, so that a linear fitting relation between the exposure degree value and the predicted value is obtained.
In one example, the linear fit relationship of the exposure level value and the predicted value may be:
t-my + n formula 2
Where t may be a predicted value, y may be an exposure equation shown in equation 1, and m and n may be coefficients in a linear fitting manner.
After the linear fitting relationship between the exposure degree value and the predicted value is obtained, the preset initial detection value range of the living body recognition model can be adjusted according to the linear fitting relationship between the exposure degree value and the predicted value and the exposure degree value of the target video to obtain the target detection value range.
After the target detection value range is obtained, the target video may be input to the trained living body recognition model and the detection value output by the living body recognition model is obtained, and then, whether the user in the target video is a living body may be determined according to whether the detection value output by the living body recognition model belongs to the target detection value range.
In one example, when a detection value output by the living body recognition model does not belong to the target detection value range, it may be determined that the user in the target video is not a living body; when the detection value output by the living body recognition model belongs to the target detection value range, it can be determined that the user in the target video is a living body.
In the embodiment of the present invention, after determining whether or not the user in the target video is a living body according to whether or not the detection value belongs to the target detection value range, it can also be determined that the entire living body detection process is directed to the same user, that is, it is further determined whether or not the user is the person himself in the case where it is determined that the user is a real person.
In one embodiment, at least two frames of images containing human faces can be acquired from the video to be processed and the target video, facial features in the images containing human faces in the frames are extracted, and then whether the human faces in the images containing human faces in the at least two frames are from the same user or not is determined according to the extracted facial features.
In the embodiment of the invention, a face picture can be randomly intercepted from each video containing the action specified by the user in the living body detection process, then the face features are extracted from the face pictures, the feature comparison of different face pictures is carried out, the intercepted face pictures are ensured to be the same person, and the face feature comparison can be realized by using a depth model such as FaceNet. In the embodiment of the invention, the safety of the living body detection system can be improved by judging whether the operation is performed by the same person.
In an embodiment of the present invention, before performing static live detection on the target video, dynamic live detection may also be performed on the target video, where the dynamic live detection may include at least one of: face key point detection, continuous frame action detection, shaking head detection, mouth opening detection, head nodding detection, blink detection and face position detection.
In the embodiment of the invention, the dynamic living body detection requires that the user complete a specific action according to the action prompt, such as the above-mentioned shaking action, mouth opening action, etc., and then judges whether the user is a real person or not according to the action completion degree.
When the live body detection is carried out, the technical scheme provided by the embodiment of the invention can carry out the live body detection based on the video to be processed containing the action specified by the user, so that the condition of the failure of the live body detection caused by the fact that an attacker replaces the video image collected by the camera with the pre-recorded video image in the related technology can be effectively solved, and the safety is improved; in addition, the technical scheme provided by the embodiment of the invention can also be used for carrying out in-vivo detection on the video to be processed by combining the contrast and the brightness of the video to be processed, and because external factors which possibly influence the in-vivo detection result are considered, the problems of low accuracy and low robustness of in-vivo detection caused by not considering the external factors can be effectively solved.
Corresponding to the above-mentioned biopsy method, an embodiment of the present invention further provides a biopsy device, fig. 2 is a schematic view of a biopsy module 200 according to an embodiment of the present invention, and as shown in fig. 2, the biopsy device 200 includes:
a first obtaining module 201, configured to obtain a to-be-processed video that includes a user-specified action; wherein the designated action is an action made by the user according to the action prompt;
a first determining module 202, configured to determine a target video according to the contrast and brightness of the video to be processed;
the detection module 203 is used for performing static living body detection on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model, and determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range; and adjusting the range of preset initial detection values according to the contrast and brightness of the target video to obtain the range of the target detection values.
Optionally, the first determining module 202 is configured to:
determining an exposure degree value of the video to be processed according to a linear fitting relation among a predetermined exposure degree value, contrast and brightness, and the contrast and the brightness of the video to be processed;
determining whether the exposure degree value of the video to be processed belongs to a preset standard degree value range;
if the exposure degree value of the video to be processed belongs to a preset standard degree value range, determining the video to be processed as a target video;
if the exposure distance value of the video to be processed does not belong to the range of the preset standard degree value, prompting a user to change the video shooting angle and/or shooting position, obtaining the video to be processed containing the action appointed by the user after the video shooting angle and/or shooting position is changed, returning to the linear fitting relation among the exposure degree value, the contrast and the brightness which are determined in advance, and the contrast and the brightness of the video to be processed, determining the exposure degree value of the video to be processed and repeatedly executing the exposure degree value until the exposure degree value of the video to be processed belongs to the range of the preset standard degree value or the repeated execution times reaches the preset times threshold value, and determining the current video to be processed as the target video.
Optionally, the first determining module 202 is further configured to:
identifying a target skin color type of a user in the video to be processed;
according to the target skin color type, determining a linear fitting relation among the exposure length value, the contrast and the brightness corresponding to the target skin color type from the linear fitting relation among the exposure length value, the contrast and the brightness corresponding to each predetermined skin color type;
and determining the exposure distance value of the video to be processed according to the exposure distance value, the contrast and the linear fitting relation among the brightness corresponding to the target skin color type and the contrast and the brightness of the video to be processed.
Optionally, the apparatus 200 further comprises (not shown in fig. 2):
a second obtaining module 204, configured to obtain a data set including faces of different skin color types before determining, according to the target skin color type, a linear fitting relationship among the exposure length value, the contrast, and the brightness corresponding to the target skin color type from a linear fitting relationship among the exposure length value, the contrast, and the brightness corresponding to each predetermined skin color type;
a dividing module 205, configured to divide the data set according to skin color types to obtain a plurality of sub data sets;
a second determining module 206, configured to determine a contrast value range, a brightness value range, and an exposure length value of the face in each sub-data set;
the third determining module 207 is configured to perform linear fitting on the contrast value range, the brightness value range, and the exposure degree value of the face in each sub-data set to obtain a linear fitting relationship among the exposure length value, the contrast, and the brightness corresponding to each skin color type.
Optionally, the apparatus 200 further comprises (not shown in fig. 2):
a third obtaining module 208, configured to, before determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range, input a specified video with different exposure length values to the living body recognition model, and obtain predicted values corresponding to the different exposure length values output by the living body recognition model; wherein all users in the designated video are living bodies or none of the users are living bodies;
a fourth obtaining module 209, configured to perform linear fitting on the exposure degree value of the specified video and a predicted value corresponding to the exposure length value of the specified video, and obtain a linear fitting relationship between the exposure length value and the predicted value;
a fifth obtaining module 210, configured to adjust a preset initial detection value range of the living body recognition model according to a linear fitting relationship between the exposure distance value and a predicted value, and an exposure degree value of the target video, so as to obtain a target detection value range; wherein the training samples at least comprise a training video and a detection value for identifying whether a user in the training video is a living body.
Optionally, the apparatus 200 further comprises (not shown in fig. 2):
a sixth obtaining module 211, configured to obtain at least two frames of images including faces from the video to be processed and the target video after determining whether the user in the target video is a living body according to whether the detection value belongs to a target detection value range;
an extraction module 212, configured to extract facial features in each frame of image including a human face;
a third determining module 213, configured to determine, according to the extracted facial features, whether faces in the at least two frames of images containing faces are from the same user.
Optionally, the detecting module 203 is configured to:
performing dynamic living body detection on the target video; wherein the dynamic liveness detection comprises at least one of: detecting key points of a human face, detecting continuous frame actions, detecting a shaking head, detecting a mouth opening, detecting a nodding head, detecting a blinking and detecting a position of the human face;
and after the target video passes through the dynamic living body detection, performing static living body detection on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model.
When the live body detection is carried out, the technical scheme provided by the embodiment of the invention can carry out the live body detection based on the video to be processed containing the action specified by the user, so that the condition of the failure of the live body detection caused by the fact that an attacker replaces the video image collected by the camera with the pre-recorded video image in the related technology can be effectively solved, and the safety is improved; in addition, the technical scheme provided by the embodiment of the invention can also be used for carrying out in-vivo detection on the video to be processed by combining the contrast and the brightness of the video to be processed, and because external factors which possibly influence the in-vivo detection result are considered, the problems of low accuracy and low robustness of in-vivo detection caused by not considering the external factors can be effectively solved.
Corresponding to the above-mentioned biopsy method, an embodiment of the present invention further provides a biopsy device, and fig. 3 is a schematic diagram of a hardware structure of the biopsy device according to an embodiment of the present invention.
The living body detection device may be a terminal device or a server or the like for detecting a living body provided in the above-described embodiments.
The liveness detection device may vary significantly depending on configuration or performance, and may include one or more processors 301 and memory 302, where the memory 302 may store one or more stored applications or data. Memory 302 may be, among other things, transient storage or persistent storage. The application program stored in memory 302 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for the liveness detection device. Still further, the processor 301 may be configured to communicate with the memory 302 to execute a series of computer-executable instructions in the memory 302 on the liveness detection device. The liveness detection device may also include one or more power sources 303, one or more wired or wireless network interfaces 304, one or more input-output interfaces 305, one or more keyboards 306.
In particular, in the present embodiment, the liveness detection device includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the liveness detection device and be configured to be executed by the one or more processors to perform the above-described embodiments.
When the living body detection is carried out, the technical scheme provided by the embodiment of the invention can carry out the living body detection based on the video to be processed containing the action specified by the user, so that the problem that the living body detection fails because an attacker replaces the video image acquired by the camera with the pre-recorded video image in the related technology can be effectively solved, and the safety is improved; in addition, the technical scheme provided by the embodiment of the invention can also be used for carrying out in-vivo detection on the video to be processed by combining the contrast and the brightness of the video to be processed, and because external factors which possibly influence the in-vivo detection result are considered, the problems of low accuracy and low robustness of in-vivo detection caused by not considering the external factors can be effectively solved.
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 blocks. 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 functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In 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 magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that 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.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.
The invention 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. The invention 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 only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (10)

1. A method of in vivo detection, the method comprising:
acquiring a video to be processed containing a user specified action; wherein the designated action is an action made by the user according to the action prompt;
determining a target video according to the contrast and brightness of the video to be processed;
performing static living body detection on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model, and determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range; and adjusting the range of preset initial detection values according to the contrast and brightness of the target video to obtain the range of the target detection values.
2. The method according to claim 1, wherein the determining a target video according to the contrast and brightness of the video to be processed comprises:
determining an exposure degree value of the video to be processed according to a linear fitting relation among a predetermined exposure degree value, contrast and brightness, and the contrast and the brightness of the video to be processed;
determining whether the exposure degree value of the video to be processed belongs to a preset standard degree value range;
if the exposure degree value of the video to be processed belongs to a preset standard degree value range, determining the video to be processed as a target video;
if the exposure range value of the video to be processed does not belong to the preset standard degree value range, prompting a user to change the video shooting angle and/or shooting position, obtaining the video to be processed containing the action specified by the user after the video shooting angle and/or shooting position is changed, returning to the linear fitting relation among the exposure range value, the contrast and the brightness which are determined in advance, and the contrast and the brightness of the video to be processed, determining the exposure range value of the video to be processed and repeatedly executing the exposure range value until the exposure range value of the video to be processed belongs to the preset standard degree value range or the repeated execution times reaches a preset times threshold value, and determining the current video to be processed as the target video.
3. The method according to claim 2, wherein the determining the exposure level value of the video to be processed according to the linear fitting relationship among the predetermined exposure level value, the contrast and the brightness, and the contrast and the brightness of the video to be processed comprises:
identifying a target skin color type of a user in the video to be processed;
according to the target skin color type, determining a linear fitting relation among the exposure distance value, the contrast and the brightness corresponding to the target skin color type from the linear fitting relation among the exposure distance value, the contrast and the brightness corresponding to each predetermined skin color type;
and determining the exposure distance value of the video to be processed according to the exposure distance value, the contrast and the linear fitting relation among the brightness corresponding to the target skin color type and the contrast and the brightness of the video to be processed.
4. The method according to claim 3, wherein before determining the linear fit relationship among the exposure length value, the contrast ratio and the brightness corresponding to the target skin color type from the predetermined linear fit relationship among the exposure length value, the contrast ratio and the brightness corresponding to each skin color type according to the target skin color type, the method further comprises:
acquiring a data set comprising faces of different skin color types;
dividing the data set according to skin color types to obtain a plurality of subdata sets;
determining a contrast value range, a brightness value range and an exposure distance value of the face in each subdata set;
and performing linear fitting on the contrast value range, the brightness value range and the exposure degree value of the face in each subdata set to obtain linear fitting relations among the exposure length value, the contrast and the brightness corresponding to each skin color type.
5. The method according to claim 2, wherein before the determining whether the user in the target video is a living body according to whether the detection value belongs to a target detection value range, the method further comprises:
inputting specified videos with different exposure distance values to the living body recognition model, and acquiring predicted values corresponding to the different exposure distance values output by the living body recognition model; wherein all users in the designated video are living bodies or none of the users are living bodies;
performing linear fitting on the exposure degree value of the designated video and a predicted value corresponding to the exposure distance value of the designated video to obtain a linear fitting relation between the exposure distance value and the predicted value;
adjusting a preset initial detection value range of the living body recognition model according to the linear fitting relation between the exposure distance value and the predicted value and the exposure degree value of the target video to obtain a target detection value range; wherein the training samples at least comprise a training video and a detection value for identifying whether a user in the training video is a living body.
6. The method according to claim 1, wherein after the determining whether the user in the target video is a living body according to whether the detection value belongs to a target detection value range, the method further comprises:
acquiring at least two frames of images containing human faces from the video to be processed and the target video;
extracting human face characteristics in each frame of image containing human face;
and determining whether the faces in the at least two frames of images containing the faces come from the same user or not according to the extracted face features.
7. The method according to any one of claims 1 to 6, wherein the obtaining of the detection value output by the living body recognition model by performing static living body detection on the target video through a pre-trained living body recognition model comprises:
performing dynamic living body detection on the target video; wherein the dynamic liveness detection comprises at least one of: detecting key points of a human face, detecting continuous frame actions, detecting a shaking head, detecting a mouth opening, detecting a nodding head, detecting a blinking and detecting a position of the human face;
and after the target video passes through the dynamic living body detection, performing static living body detection on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model.
8. A living body detection device, the device comprising:
the first acquisition module is used for acquiring a video to be processed containing a user specified action; wherein the designated action is an action made by the user according to the action prompt;
the first determining module is used for determining a target video according to the contrast and the brightness of the video to be processed;
the detection module is used for carrying out static living body detection on the target video through a pre-trained living body recognition model to obtain a detection value output by the living body recognition model, and determining whether a user in the target video is a living body according to whether the detection value belongs to a target detection value range; and adjusting the range of preset initial detection values according to the contrast and brightness of the target video to obtain the range of the target detection values.
9. An apparatus, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110619560.5A 2021-06-03 2021-06-03 Living body detection method, device and equipment Active CN114973426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110619560.5A CN114973426B (en) 2021-06-03 2021-06-03 Living body detection method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110619560.5A CN114973426B (en) 2021-06-03 2021-06-03 Living body detection method, device and equipment

Publications (2)

Publication Number Publication Date
CN114973426A true CN114973426A (en) 2022-08-30
CN114973426B CN114973426B (en) 2023-08-15

Family

ID=82974216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110619560.5A Active CN114973426B (en) 2021-06-03 2021-06-03 Living body detection method, device and equipment

Country Status (1)

Country Link
CN (1) CN114973426B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140153777A1 (en) * 2011-09-28 2014-06-05 Honda Motor Co., Ltd. Living body recognizing device
CN105718863A (en) * 2016-01-15 2016-06-29 北京海鑫科金高科技股份有限公司 Living-person face detection method, device and system
CN105912986A (en) * 2016-04-01 2016-08-31 北京旷视科技有限公司 In vivo detection method, in vivo detection system and computer program product
CN107423699A (en) * 2017-07-14 2017-12-01 广东欧珀移动通信有限公司 Biopsy method and Related product
US20180053044A1 (en) * 2015-03-13 2018-02-22 Nec Corporation Living body detection device, living body detection method, and recording medium
CN110119719A (en) * 2019-05-15 2019-08-13 深圳前海微众银行股份有限公司 Biopsy method, device, equipment and computer readable storage medium
CN110516644A (en) * 2019-08-30 2019-11-29 深圳前海微众银行股份有限公司 A kind of biopsy method and device
CN110991249A (en) * 2019-11-04 2020-04-10 支付宝(杭州)信息技术有限公司 Face detection method, face detection device, electronic equipment and medium
CN111079688A (en) * 2019-12-27 2020-04-28 中国电子科技集团公司第十五研究所 Living body detection method based on infrared image in face recognition
CN111160235A (en) * 2019-12-27 2020-05-15 联想(北京)有限公司 Living body detection method and device and electronic equipment
CN111368601A (en) * 2018-12-26 2020-07-03 北京市商汤科技开发有限公司 Living body detection method and apparatus, electronic device, and computer-readable storage medium
CN111460970A (en) * 2020-03-27 2020-07-28 深圳市商汤科技有限公司 Living body detection method and device and face recognition equipment
CN111738161A (en) * 2020-06-23 2020-10-02 支付宝实验室(新加坡)有限公司 Living body detection method and device and electronic equipment
CN111914626A (en) * 2020-06-18 2020-11-10 北京迈格威科技有限公司 Living body identification/threshold value adjustment method, living body identification/threshold value adjustment device, electronic device, and storage medium
CN112836625A (en) * 2021-01-29 2021-05-25 汉王科技股份有限公司 Face living body detection method and device and electronic equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140153777A1 (en) * 2011-09-28 2014-06-05 Honda Motor Co., Ltd. Living body recognizing device
US20180053044A1 (en) * 2015-03-13 2018-02-22 Nec Corporation Living body detection device, living body detection method, and recording medium
CN105718863A (en) * 2016-01-15 2016-06-29 北京海鑫科金高科技股份有限公司 Living-person face detection method, device and system
CN105912986A (en) * 2016-04-01 2016-08-31 北京旷视科技有限公司 In vivo detection method, in vivo detection system and computer program product
CN107423699A (en) * 2017-07-14 2017-12-01 广东欧珀移动通信有限公司 Biopsy method and Related product
CN111368601A (en) * 2018-12-26 2020-07-03 北京市商汤科技开发有限公司 Living body detection method and apparatus, electronic device, and computer-readable storage medium
CN110119719A (en) * 2019-05-15 2019-08-13 深圳前海微众银行股份有限公司 Biopsy method, device, equipment and computer readable storage medium
CN110516644A (en) * 2019-08-30 2019-11-29 深圳前海微众银行股份有限公司 A kind of biopsy method and device
CN110991249A (en) * 2019-11-04 2020-04-10 支付宝(杭州)信息技术有限公司 Face detection method, face detection device, electronic equipment and medium
CN111079688A (en) * 2019-12-27 2020-04-28 中国电子科技集团公司第十五研究所 Living body detection method based on infrared image in face recognition
CN111160235A (en) * 2019-12-27 2020-05-15 联想(北京)有限公司 Living body detection method and device and electronic equipment
CN111460970A (en) * 2020-03-27 2020-07-28 深圳市商汤科技有限公司 Living body detection method and device and face recognition equipment
CN111914626A (en) * 2020-06-18 2020-11-10 北京迈格威科技有限公司 Living body identification/threshold value adjustment method, living body identification/threshold value adjustment device, electronic device, and storage medium
CN111738161A (en) * 2020-06-23 2020-10-02 支付宝实验室(新加坡)有限公司 Living body detection method and device and electronic equipment
CN112836625A (en) * 2021-01-29 2021-05-25 汉王科技股份有限公司 Face living body detection method and device and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CAI PEI ET AL.: "Face anti-spoofing algorithm combined with CNN and brightness equalization", 中南大学学报(英文版), no. 1 *
CHENGSHENG YUAN ET AL.: "Deep residual network with adaptive learning framework for fingerprint liveness detection", IEEE TRANSACTIONS ON COGNITIVE AND DEVELOPMENTAL SYSTEMS, vol. 12, no. 3, XP011808148, DOI: 10.1109/TCDS.2019.2920364 *
李明进;白景文;: "基于边框及亮度特征的人脸反欺骗研究", 实验室研究与探索, no. 09 *

Also Published As

Publication number Publication date
CN114973426B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN108197586B (en) Face recognition method and device
CN109729420B (en) Picture processing method and device, mobile terminal and computer readable storage medium
CN106228168B (en) The reflective detection method of card image and device
US20130021489A1 (en) Regional Image Processing in an Image Capture Device
CN110688939B (en) Method, system and equipment for verifying certificate image to be identified
EP2998960A1 (en) Method and device for video browsing
EP3164865A1 (en) Replay attack detection in automatic speaker verification systems
CN109872297A (en) Image processing method and device, electronic equipment and storage medium
CN105407261A (en) Image processing device and method, and electronic equipment
CN112417414A (en) Privacy protection method, device and equipment based on attribute desensitization
CN103688273A (en) Facilitating image capture and image review by visually impaired users
CN107977636B (en) Face detection method and device, terminal and storage medium
CN105554361A (en) Processing method and system of dynamic video shooting
WO2020018338A1 (en) Image acquisition method, apparatus, system, device and medium
WO2019017178A1 (en) Method and apparatus for dynamically identifying a user of an account for posting images
US11216648B2 (en) Method and device for facial image recognition
US9799376B2 (en) Method and device for video browsing based on keyframe
CN111259757A (en) Image-based living body identification method, device and equipment
CN114973426B (en) Living body detection method, device and equipment
CN112200040A (en) Occlusion image detection method, device and medium
JP2017204280A (en) Method, system and apparatus for selecting video frame
CN111160251A (en) Living body identification method and device
CN111199231A (en) Image identification method and device
CN112911373B (en) Video subtitle generating method, device, equipment and storage medium
CN114038026A (en) Face recognition method and device

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