Living body detection method and device, electronic equipment and storage medium

CN117636484BActive Publication Date: 2026-10-16BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210968846.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2026-10-16
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

然而,相关的活体检测方式,在活体检测时,通常会受到局部扰动类的攻击,无法保证活体检测结果的准确性,从而影响信息安全

Benefits of technology

[0020] The technical solution of this disclosure embodiment, in response to a liveness detection trigger operation, acquires an image sequence of a target object, wherein the image sequence includes an image to be detected; for the image to be detected, determines multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time; fully considers the dynamic changes of liveness features; based on the region to be detected in the multiple reference images, determines a risk factor for the image to be detected, wherein the region to be detected at least includes the region where a verification organ performing a preset verification action is located, and the risk factor is used to indicate whether the target object is live; the risk factor is defined by the region where the verification organ performing the preset verification action is located in liveness detection to predict the risk of liveness detection. Based on the risk factor of the image to be detected, a liveness detection result corresponding to the target object is determined. This solves the technical problem of low accuracy of liveness detection results in related technologies, effectively avoids the risks in liveness detection, and improves the accuracy of liveness detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117636484B_ABST
    Figure CN117636484B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a living body detection method and device, electronic equipment and storage medium. In response to a living body detection trigger operation, an image sequence of a target object is collected, wherein the image sequence includes a to-be-detected image. For the to-be-detected image, a plurality of reference images associated with the to-be-detected image in the collection time are determined from the image sequence. Based on a to-be-detected region in the plurality of reference images, a risk factor of the to-be-detected image is determined, wherein the to-be-detected region at least includes a region where a verification organ performing a preset verification action is located, and the risk factor is used to indicate whether the target object is a living body. Based on the risk factor of the to-be-detected image, a living body detection result corresponding to the target object is determined. The technical solution of the embodiments of the present disclosure effectively resists the risk of living body detection and ensures the accuracy of living body detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer application technology, and in particular to a liveness detection method, apparatus, electronic device, and storage medium. Background Technology

[0002] Identity verification, as a crucial means of protecting user information security, is favored by users due to its simplicity, convenience, and efficiency. With the continuous development of smart devices, the scope and privacy of user identity information stored on these devices are increasing, thus raising the requirements for identity verification security.

[0003] Currently, in many identity verification scenarios, liveness detection is performed before identity verification to add an extra layer of security. However, these liveness detection methods are often susceptible to localized perturbation attacks, which cannot guarantee the accuracy of the liveness detection results and thus compromise information security. Summary of the Invention

[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for liveness detection to improve the accuracy of liveness detection.

[0005] According to one aspect of this disclosure, a method for detecting liveness is provided, wherein the method includes:

[0006] In response to a liveness detection trigger operation, an image sequence of the target object is acquired, wherein the image sequence includes the image to be detected;

[0007] For the image to be detected, determine multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time;

[0008] Based on the region to be detected in the multi-frame reference images, a risk factor for the image to be detected is determined, wherein the region to be detected includes at least the region where the verification organ performing the preset verification action is located, and the risk factor is used to indicate whether the target object is a living organism;

[0009] Based on the risk factors of the image to be detected, the liveness detection result corresponding to the target object is determined.

[0010] According to another aspect of this disclosure, a liveness detection device is provided, wherein the device includes:

[0011] An image sequence acquisition module is used to acquire an image sequence of a target object in response to a liveness detection trigger operation, wherein the image sequence includes an image to be detected;

[0012] A reference image determination module is used to determine, for the image to be detected, multiple reference images associated with the image to be detected in terms of acquisition time from the image sequence;

[0013] A risk factor determination module is used to determine the risk factor of the image to be detected based on the region to be detected in the multi-frame reference image, wherein the region to be detected includes at least the region where the verification organ performing the preset verification action is located, and the risk factor is used to indicate whether the target object is a living body;

[0014] The detection result determination module is used to determine the liveness detection result corresponding to the target object based on the risk factors of the image to be detected.

[0015] According to another aspect of this disclosure, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the liveness detection method according to any embodiment of this disclosure.

[0019] According to another aspect of this disclosure, a computer-readable storage medium is provided that stores computer instructions for causing a processor to execute and implement the liveness detection method according to any embodiment of this disclosure.

[0020] The technical solution of this disclosure embodiment, in response to a liveness detection trigger operation, acquires an image sequence of a target object, wherein the image sequence includes an image to be detected; for the image to be detected, determines multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time; fully considers the dynamic changes of liveness features; based on the region to be detected in the multiple reference images, determines a risk factor for the image to be detected, wherein the region to be detected at least includes the region where a verification organ performing a preset verification action is located, and the risk factor is used to indicate whether the target object is live; the risk factor is defined by the region where the verification organ performing the preset verification action is located in liveness detection to predict the risk of liveness detection. Based on the risk factor of the image to be detected, a liveness detection result corresponding to the target object is determined. This solves the technical problem of low accuracy of liveness detection results in related technologies, effectively avoids the risks in liveness detection, and improves the accuracy of liveness detection. Attached Figure Description

[0021] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0022] Figure 1 This is a schematic flowchart of a liveness detection method provided in an embodiment of this disclosure;

[0023] Figure 2 This is a schematic diagram of another liveness detection method provided in this embodiment of the present disclosure;

[0024] Figure 3 This is a schematic diagram of another liveness detection method provided in this embodiment;

[0025] Figure 4 This is a schematic diagram of another liveness detection method provided in this embodiment of the present disclosure;

[0026] Figure 5 This is a schematic diagram of a scenario for performing a liveness detection method according to an embodiment of this disclosure;

[0027] Figure 6 This is a schematic diagram of the structure of a liveness detection device provided in an embodiment of this disclosure;

[0028] Figure 7 This is a schematic diagram of the structure of a liveness detection electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0029] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0030] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0031] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0033] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0034] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0035] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0036] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0037] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0038] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0039] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0040] Figure 1 This is a flowchart illustrating a liveness detection method provided in an embodiment of the present disclosure. The embodiments of the present disclosure are applicable to liveness detection. The method can be executed by a liveness detection device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

[0041] like Figure 1 As shown, the method includes:

[0042] S110. In response to a liveness detection trigger operation, acquire an image sequence of the target object, wherein the image sequence includes the image to be detected.

[0043] The liveness detection triggering operation can be understood as an operation used to trigger and activate the liveness detection process. In this embodiment, there can be various liveness detection triggering operations that can activate the liveness detection process, and no specific operation method is limited herein. The liveness detection triggering operation can be a contact operation or a non-contact operation.

[0044] It is understood that, prior to responding to the liveness detection trigger operation, the method further includes: receiving the liveness detection trigger operation. Optionally, receiving the liveness detection trigger operation includes at least one of the following operations:

[0045] Receives control trigger operations that are applied to a pre-set liveness detection start control;

[0046] Acquire images of the subject based on images captured by an imaging device associated with liveness detection;

[0047] Receive audio commands or gestures to activate the liveness detection process;

[0048] Detect target triggering events, wherein the target triggering event can be understood as an event associated with liveness detection used to activate the liveness detection process.

[0049] For example, the target triggering event includes at least one of the following: the current time point is a preset detection time point, the current time point is within a preset detection period, a service risk is detected, and an image to be detected is received from a third party.

[0050] In this embodiment, the liveness detection launch control can be understood as an interactive control used to launch the liveness detection function or to activate the liveness detection process. The liveness detection launch control can be a physical control or a virtual control. For example, it can be a virtual control set in the application interface. The liveness detection launch control can take many forms, such as interface elements identified by images, text, and symbols in the application interface, a designated trigger area in the application interface, a scrollable control, or an option-type control. The control trigger operations applied to the liveness detection launch control can also be varied, such as click operations (single or double click, etc.), press operations (long press or short press, etc.), hovering wipe operations, active operations, or operations that input a preset trajectory, etc.

[0051] Optionally, each frame of image captured by the imaging device associated with liveness detection can be used as the image to be detected; or, images can be extracted from the image sequence captured by the imaging device associated with liveness detection based on a pre-set image extraction frame rate as the image to be detected; or, image recognition can be performed on each frame of image captured by the imaging device associated with liveness detection, and the image in which target image information is recognized can be used as the image to be detected. The target image information can be information contained in the image used to activate the liveness detection process; for example, it can specifically be whether the object to be detected is a live body.

[0052] It should be noted that there are many ways to determine if a liveness detection trigger has been received. The above are merely examples of how to receive a liveness detection trigger, and are not a limitation. In practical applications, the method for generating a liveness detection trigger can be set according to actual needs.

[0053] The target object can be understood as the object to be detected for liveness detection. It is understood that the target object may be an object with living physiological characteristics or an object without living physiological characteristics. For example, it can be a living body, a photograph containing or not containing a living body, or a static screen. The image sequence can be understood as multiple frames of images acquired over time for the target object. It can be understood as frames of images from a video source acquired for the target object. Specifically, the image sequence of the target object can be acquired by an image acquisition device associated with liveness detection. The acquired image sequence includes multiple frames of images to be detected, facilitating liveness detection based on changes in the target object.

[0054] S120. For the image to be detected, determine multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time.

[0055] The reference image can be understood as the image to be detected used to determine the risk factor.

[0056] Optionally, the multi-frame reference images are a preset number of images among the prior images of the image to be detected that are closest to the image to be detected in terms of acquisition time.

[0057] In this context, the preceding images are those in the image sequence whose acquisition time precedes that of the image to be detected. Specifically, the acquisition time of the image to be detected can be used as a reference time point, and a predetermined number of adjacent images in the image sequence preceding the reference time point can be obtained as multiple reference frames. It is understood that the specific value of the predetermined number can be set according to actual needs and is not specifically limited here. For example, it could be 9 frames, 10 frames, or 15 frames, etc.

[0058] For example, each preceding image of the image to be detected in the image sequence is used as a reference image.

[0059] In embodiments of this disclosure, the reference image may or may not include the image to be detected. Optionally, a predetermined number of images that include the image to be detected and are adjacent in acquisition time from the image sequence are obtained as multiple frames of reference images. Alternatively, using the acquisition time of the image to be detected as a reference time point, a predetermined number of images in the image sequence that are adjacent in acquisition time after the reference time point are obtained as multiple frames of reference images.

[0060] Optionally, the multi-frame reference images are images obtained by sampling a predetermined number of prior images of the image to be detected that are closest to the image to be detected in terms of acquisition time at equal intervals. Specifically, the reference images can be obtained by sampling once every predetermined number of frames in the prior images of the image to be detected, in order of acquisition time from the closest to the acquisition time of the image to be detected.

[0061] The region to be detected can be understood as the region in the extracted reference image where liveness verification of the target object can be performed. Optionally, the region to be detected can be the region where a verification organ performing a preset verification action is located in liveness detection. The preset verification action can be understood as an action pre-set for the target object, which can be used to perform liveness verification of the target object. For example, the preset verification action can be one or a combination of actions such as blinking, opening the mouth, shaking the head, and nodding. It is understood that the verification organ can be the organ corresponding to the preset verification action. For example, it can be the eye, mouth, or head. The region to be detected can be the region corresponding to the verification organ; for example, the region to be detected can be the eye region, mouth region, or head region.

[0062] The risk factor can be understood as a factor determined based on a reference image of the target object, which can serve as a basis for liveness detection. In this embodiment, the risk factor of the image to be detected can be determined based on the region to be detected in the reference image. Specifically, the risk factor of the image to be detected can be determined based on the regions to be detected in multiple temporally adjacent frames of the reference image. The advantage of this approach is that it can capture the temporal variation characteristics of the reference image, thereby providing a basis for improving the accuracy of liveness detection.

[0063] S130. Based on the region to be detected in the multi-frame reference image, determine the risk factor of the image to be detected, wherein the region to be detected includes at least the region where the verification organ performing the preset verification action is located, and the risk factor is used to indicate whether the target object is a living body.

[0064] Specifically, based on the risk factors, it can be determined whether there is a risk in the liveness detection of the target object, thereby indicating whether the target object is alive, and further determining the liveness detection result corresponding to the target object. The liveness detection result can be another operation to continue liveness detection, or to end liveness detection, or to output the liveness detection result. It is understood that liveness detection can rely on a combination of multiple technical means, and completing liveness detection can execute one or more pre-set operations. In the embodiments of this disclosure, other operations that can be used for liveness detection can refer to related technologies, and will not be elaborated here. Compared with related technologies, the liveness detection method in the embodiments of this disclosure adds the determination of risk factors, thereby effectively addressing the risks involved in liveness detection, thus mitigating risks and ensuring the accuracy of liveness detection.

[0065] Optionally, if the target object is determined to be a live object based on the risk factor of the image to be detected, a successful liveness detection result corresponding to the target object can be determined; if the target object is determined not to be a live object based on the risk factor of the image to be detected, a liveness detection result corresponding to the target object can be determined as a detection failure or failure to pass the detection.

[0066] Furthermore, upon determining a failed liveness detection result corresponding to the target object, at least one of the following can be stopped: stopping the liveness detection of the target object, displaying a liveness detection failure message, and / or displaying detection guidance information. The liveness detection failure message can be information used to inform the user that the target object's liveness verification has failed. This message can be of various types, such as generated graphic / textual prompts, audio prompts, and / or visual prompts. The detection guidance information can be information used to guide the user's actions after a liveness detection failure. This guidance information can also be of various types, such as generated graphic / textual prompts, audio prompts, and / or visual prompts. For example, the user can be guided to exit the liveness detection process, or to perform the liveness detection again.

[0067] S140. Based on the risk factors of the image to be detected, determine the liveness detection result corresponding to the target object.

[0068] Optionally, the liveness detection result corresponding to the target object is determined based on the risk factor itself in each frame of the image to be detected, or the liveness detection result corresponding to the target object is determined based on the change or fluctuation information between the risk factors in multiple frames of the image to be detected.

[0069] In this embodiment, liveness detection is a method for determining whether an object possesses liveness characteristics in some identity verification scenarios. It can be broadly categorized into silent liveness and motion liveness. Motion liveness detection primarily employs actions requiring the user's cooperation, such as blinking, opening the mouth, shaking the head, or nodding. It comprehensively utilizes facial key points and facial tracking technology to verify the user's liveness. Considering that blinking is the least perceptible, most natural, and easiest action to implement for liveness detection, liveness algorithms can use blinking for liveness judgment. Specifically, blinking judgment can be based on facial key points. However, this blinking judgment method is often difficult to defend against attacks involving local perturbations and is easily compromised. For example, a pen or finger can be used to rapidly perturb the eye area of ​​a facial photograph, causing movement of the eye key points, thereby bypassing the blinking algorithm and attacking the real-name authentication system.

[0070] The technical solution of this disclosure embodiment, in response to a liveness detection trigger operation, acquires an image sequence of a target object, wherein the image sequence includes an image to be detected; for the image to be detected, determines multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time; fully considers the dynamic changes of liveness features; based on the region to be detected in the multiple reference images, determines a risk factor for the image to be detected, wherein the region to be detected at least includes the region where a verification organ performing a preset verification action is located, and the risk factor is used to indicate whether the target object is live; the risk factor is defined by the region where the verification organ performing the preset verification action is located in liveness detection to predict the risk of liveness detection. Based on the risk factor of the image to be detected, a liveness detection result corresponding to the target object is determined. This solves the technical problem of low accuracy of liveness detection results in related technologies, effectively avoids the risks in liveness detection, and improves the accuracy of liveness detection.

[0071] Figure 2 This is a flowchart of another liveness detection method provided in Embodiment 2 of this disclosure. This embodiment refines how to determine the risk factor of the image to be detected based on the region to be detected in the reference image in the above embodiment.

[0072] like Figure 2 As shown, the method includes:

[0073] S210. In response to a liveness detection trigger operation, acquire an image sequence of the target object, wherein the image sequence includes the image to be detected.

[0074] S220. For the image to be detected, determine multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time.

[0075] S230. For each frame of reference image, determine the binarized image of the region to be detected in the reference image.

[0076] The binarized image can be understood as the image obtained after binarizing the region to be detected in the reference image. In this embodiment, binarizing the region to be detected in the reference image allows for binary classification of the pixels in the region, facilitating the extraction of change information in the image, increasing image recognition efficiency, and improving the accuracy of liveness detection.

[0077] Optionally, determining the binarized image of the region to be detected in the reference image includes: cropping the region to be detected in the reference image to obtain an image of the region to be detected; and performing binarization processing on the image of the region to be detected to obtain the binarized image.

[0078] Specifically, the region to be detected in the reference image can be cropped first to obtain the region to be detected; then, the region to be detected can be binarized to obtain a binarized image. Optionally, cropping the region to be detected in the reference image can include: locating and cropping the image to be detected using a keypoint model image corresponding to the image to be detected. For example, the region to be detected can be located by aligning each keypoint in the keypoint model image corresponding to the image to be detected with each keypoint in the image to be detected, and then determining the location of the region to be detected based on the position of each keypoint in the keypoint model image; finally, the image to be detected is cropped to obtain the region to be detected.

[0079] Optionally, the binarization processing of the region to be detected may include: binarizing the region to be detected according to a preset pixel segmentation threshold. The preset pixel segmentation threshold can be understood as a threshold value set to divide the pixels in the region to be detected into two categories. In this embodiment, the preset pixel segmentation threshold can be set according to the actual application scenario, and its specific value is not limited here. For example, the preset pixel segmentation threshold may be 130 or 150, etc.

[0080] Optionally, determining the binarized image of the region to be detected in the reference image includes: performing binarization processing on the reference image; and cropping the region to be detected in the binarized reference image to obtain the binarized image.

[0081] Specifically, the binarization of the region to be detected can be performed according to a preset pixel segmentation threshold. This can be achieved by dividing the pixel value into two classification intervals according to the preset pixel segmentation threshold, with each classification interval having a different pixel value. The classification interval to which the pixel value of each pixel in the region to be detected belongs can be determined, and the pixel value of the pixel can be set to the pixel value corresponding to its classification interval, thereby obtaining a binarized image of the region to be detected.

[0082] For example, the pixel value of each pixel in the region to be detected is compared with a preset pixel segmentation threshold. The pixel values ​​of pixels whose pixel values ​​are less than or equal to the preset pixel segmentation threshold are set to a first value, and the pixel values ​​of pixels whose pixel values ​​are greater than the preset pixel segmentation threshold are set to a second value, thereby obtaining a binarized image of the region to be detected.

[0083] For example, if the selected preset pixel segmentation threshold is 130, then binarizing the region to be detected according to the preset pixel segmentation threshold can be done by comparing the pixel value of each pixel in the region to be detected with 130, setting the pixel value of pixels with a pixel value less than or equal to 130 to 0, and setting the pixel value of pixels with a pixel value greater than 130 to 1, thereby obtaining the binarized image of the image to be detected.

[0084] As mentioned earlier, the reference image can be binarized first, and then the region to be detected in the binarized reference image can be cropped to obtain a binarized image. The method for binarizing the reference image can refer to the method for binarizing the region to be detected described above, and will not be repeated here.

[0085] S240. Count the number of pixels with the same pixel value in the binarized image to obtain the pixel count value.

[0086] Specifically, the total number of pixels corresponding to a given pixel value in the binarized image can be counted to obtain a pixel count. For example, assuming that the pixel value of a pixel in the binarized image is 0 or 1, the total number of pixels with a pixel value of 0 or 1 in the binarized image can be counted to obtain a pixel count.

[0087] S250. Determine the risk factor of the image to be detected based on the pixel statistics of at least two reference images in the multi-frame reference images.

[0088] Specifically, for each frame of the reference image, the pixel statistics are determined using the binarized image of its region to be detected. Then, the risk factor of the image to be detected is determined based on the pixel statistics of multiple reference images. It should be noted that for each of the multiple reference images used to determine the risk factor, the binarization process is the same, and the pixel statistics are obtained using the same technique; that is, the pixel statistics for each reference image must be obtained from statistics on the same pixel value.

[0089] Optionally, determining the risk factor of the image to be detected based on the pixel statistics of at least two reference images in the multi-frame reference images includes: calculating the variance of the pixel statistics of at least two reference images in the multi-frame reference images; and determining the risk factor of the image to be detected based on the variance.

[0090] It is understood that the reference images may be obtained in different ways when calculating the variance of the pixel statistics of the at least two reference images.

[0091] Optionally, calculating the variance of pixel statistics in at least two reference images among the multi-frame reference images includes:

[0092] Acquire at least two reference images within a preset acquisition time range from the multiple reference images;

[0093] Calculate the variance of the pixel statistics of the at least two reference images.

[0094] Specifically, based on the preset acquisition time range, multiple reference images are acquired, and the variance of the pixel statistics of each reference image is calculated. Then, the risk factor of the image to be detected is determined based on the calculated variance. It is understood that the reference images within the preset acquisition time range can be all or part of the reference images within that range, and one or more variances can be calculated depending on the selected reference images. The risk factor of the reference image is then determined based on one or more variances. In this embodiment, the preset acquisition time range should conform to the application scenario of this embodiment and is not specifically limited here.

[0095] Optionally, calculating the variance of pixel statistics in at least two frames of the multi-frame reference images includes:

[0096] A preset number of reference images are obtained from the multi-frame reference images, and the variance of the pixel statistics of the reference images is calculated.

[0097] Specifically, the variance can be calculated based on the pixel statistics of multiple reference images within a preset acquisition time range or a preset number of frames, and the calculated variance can be used as the risk factor of the image to be detected. Alternatively, multiple reference images within a preset acquisition time range or a preset number of frames can be acquired through different methods, with each acquired reference image forming a group. For each group, the variance can be calculated based on the pixel statistics of each reference image within that group, and then the risk factor of the image to be detected can be determined based on the variance corresponding to each group. For example, the average variance of each group can be calculated based on the variance corresponding to each group, and the average value can be used as the risk factor of the image to be detected.

[0098] S260. Based on the risk factors of the image to be detected, determine the liveness detection result corresponding to the target object.

[0099] In this embodiment of the disclosure, during the liveness detection process, under normal circumstances, the value of the risk factor is relatively small; however, when abnormal situations such as foreign object disturbance occur, the value of the risk factor will fluctuate drastically. Based on this, it can be determined whether there is a risk in the liveness detection, and then, based on whether there is a risk in the liveness detection, the liveness detection result corresponding to the target object can be determined.

[0100] In this embodiment, for each frame of the reference image, a binarized image of the region to be detected is obtained through cropping and binarization. This makes the image more focused and reduces the amount of data processed, thus improving image processing efficiency. Furthermore, the number of pixels with the same pixel value in the binarized image is statistically analyzed to obtain pixel statistics. Then, reference images within a preset acquisition time range or a preset number of reference images are acquired, and the variance of the pixel statistics across multiple frames of the reference images is calculated. This variance is used as a risk factor for the image to be detected. This approach can detect changes in the same type of pixels in different regions to be detected, accurately predicting the risk of liveness detection and making the results of liveness detection more precise.

[0101] Figure 3 This is a flowchart of another liveness detection method provided in Embodiment 3 of this disclosure. This embodiment refines how to determine the liveness detection result corresponding to the target object based on the risk factor of the image to be detected in the above embodiments.

[0102] like Figure 3 As shown, the method includes:

[0103] S310. In response to a liveness detection trigger operation, acquire an image sequence of the target object, wherein the image sequence includes the image to be detected.

[0104] S320. For the image to be detected, determine multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time.

[0105] S330. Based on the risk factors of the image to be detected and the preset risk factor threshold, determine the liveness detection result corresponding to the target object.

[0106] The preset risk factor threshold can be understood as a critical value used to determine which type of liveness detection result to use for the target object. The specific value of the preset risk factor threshold can be set according to actual needs and is not specifically limited here. The number of preset risk factor thresholds can be one or more. Specifically, a normal range and a risk range can be determined based on the preset risk factor thresholds. If the risk factor is within the normal range, it is determined that there is no risk in the liveness detection of the target object; if the risk factor is within the risk range, it is determined that there is risk in the liveness detection of the target object, and the liveness detection result corresponding to the target object is determined based on whether there is risk in the liveness detection.

[0107] When the risk factors of multiple frames of images to be detected are calculated, it can be determined whether the risk factors of each frame of the images to be detected are within the normal range or the risk range. Then, based on the number of images to be detected that are within the risk range or the normal range, or the proportion of the number of images to be detected that are within the risk range or the normal range to the total number of images to be detected for which the risk factors are calculated, it can be determined whether the liveness detection of the target object is risky, and thus the liveness detection result corresponding to the target object can be determined.

[0108] The technical solution of this disclosure can determine the risk of liveness detection based on the risk factors of multiple frames of the image to be detected, and the result can be determined simply and quickly by threshold comparison, which ensures the efficiency of risk prediction in liveness detection and adds another layer of protection to the accuracy of liveness detection in a simple and effective way.

[0109] Figure 4 This is a flowchart of a liveness detection method provided in Embodiment 4 of this disclosure. This embodiment refines how to determine the liveness detection result corresponding to the target object based on the risk factor of the image to be detected in the above embodiments.

[0110] like Figure 4 As shown, the method includes:

[0111] S410. In response to a liveness detection trigger operation, acquire an image sequence of the target object, wherein the image sequence includes the image to be detected.

[0112] S420. For the image to be detected, determine multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time.

[0113] S430. Based on the region to be detected in the multi-frame reference image, determine the risk factor of the image to be detected, wherein the region to be detected includes at least the region where the verification organ performing the preset verification action is located, and the risk factor is used to indicate whether the target object is a living body.

[0114] S440. Determine the fluctuation value corresponding to the multiple frames of the images to be detected based on the risk factors.

[0115] The volatility value can be understood as the change in the values ​​of two risk factors. The volatility value can be either an absolute change or a relative change between the two risk factors.

[0116] Optionally, the difference between the risk factors of adjacent images to be detected in every two frames of acquisition time is calculated, and the difference is used as the fluctuation value corresponding to the multiple frames of images to be detected. It is understood that, using this technical solution, multiple fluctuation values ​​corresponding to the multiple frames of images to be detected can be calculated based on two or more frames of images to be detected. In other words, there may be one or more fluctuation values ​​corresponding to the multiple frames of images to be detected.

[0117] Optionally, the largest and smallest risk factors are determined among the risk factors in the multiple frames of the image to be detected, the difference between the largest and smallest risk factors is calculated, and the calculated difference is used as the fluctuation value corresponding to the multiple frames of the image to be detected.

[0118] Optionally, two frames of the images to be detected are randomly selected from the multiple frames of images to be detected, the difference between the risk factors of the two selected frames of images to be detected is calculated, and the calculated difference is used as the fluctuation value corresponding to the multiple frames of images to be detected.

[0119] S450. Based on the fluctuation value and the preset fluctuation threshold, determine the liveness detection result corresponding to the target object.

[0120] Specifically, the fluctuation value between risk factors of the images to be detected in multiple frames is calculated, and then the fluctuation value is compared with a preset fluctuation threshold to determine the liveness detection result corresponding to the target object.

[0121] The preset fluctuation threshold can be understood as a critical value used to determine the liveness detection result corresponding to the target object based on the fluctuation values ​​between two or more risk factors. Specifically, it can be determined whether there is a risk of liveness detection of the target object based on whether the fluctuation values ​​between the risk factors in multiple frames of the image to be detected exceed the preset fluctuation threshold, and then the detection execution logic corresponding to the target object is determined based on whether there is a risk of liveness detection.

[0122] When two or more fluctuation values ​​are calculated, it can be determined whether the largest fluctuation value exceeds a preset fluctuation threshold. Then, based on the number of fluctuation values ​​that exceed the preset fluctuation threshold, or the proportion of the number of fluctuation values ​​that exceed the preset fluctuation threshold in the total number of all calculated fluctuation values, it can be determined whether the liveness detection of the target object is risky, and thus the liveness detection result corresponding to the target object can be determined.

[0123] The technical solution of this embodiment can determine whether there is a risk in liveness detection based on the fluctuation of risk factors in multiple frames of images to be detected, and then determine the liveness detection result corresponding to the target object. It fully considers the change information between multiple images to be detected, is more suitable for the detection of liveness features, and is conducive to further improving the accuracy of liveness detection.

[0124] Figure 5 This is a schematic flowchart illustrating an optional example of a liveness detection method provided in this disclosure. Taking a facial image as the image to be detected and the eye region as the detection area as an example, the liveness detection method of this disclosure will be described. Figure 5 As shown, the execution flow of the liveness detection method mainly includes: facial key point detection, eye region cropping, binarization, horizontal and vertical pixel value statistics, and sequence mean and variance calculation. Here, the region to be detected is represented by the eye region, the pixel segmentation threshold is represented by α, the pixel statistical value is represented by β, and the variance of the pixel statistical value is represented by Var.

[0125] The specific steps of the liveness detection method in this optional example are as follows:

[0126] 1. Facial key point detection: The eye region of a facial image is located using a facial key point model.

[0127] 2. Eye area cropping: The eye area in the facial image is cropped based on the positioning results.

[0128] 3. Binarization: Select a threshold α to binarize the eye region to obtain a binarized image. Set the pixel values ​​of pixels with pixel values ​​less than or equal to α in the binarized image to 0, and set the pixel values ​​of pixels with pixel values ​​greater than α to 1.

[0129] 4. Horizontal and vertical pixel value statistics: Perform pixel value statistics on the binarized image in a horizontal (row) or vertical (column) manner. You can choose to count the number of 0 pixels or the number of 1 pixels to obtain the result β.

[0130] 5. Calculate the mean and variance of the series:

[0131] 1) By performing the same processing on facial image frames within a time sequence, a β sequence can be obtained, which is abbreviated here as: d=[β1,β2,...,βi], where i represents the i-th frame of facial image and βi represents the pixel statistics of the i-th frame of facial image.

[0132] 2) Select a certain number of image frames corresponding to the time window. Taking 9 frames as an example, calculate the mean and variance of the values ​​within the time window, and denote the variance as Var.

[0133] This Var can be used as a risk factor to assess risk. During a normal blink, the Var will be relatively small, but when there is foreign object disturbance, the Var will fluctuate violently. This risk factor can be used to effectively avoid fluctuations in key points of the eye area under such circumstances, thus avoiding incorrect judgments.

[0134] The technical solution of this disclosure addresses the problem that blinking algorithms based on facial key points cannot resist local perturbation attacks. By statistically analyzing the pixel value distribution in the horizontal and vertical directions of the eye region, a risk factor is defined. The approach utilizes horizontal and vertical statistics to determine the presence of foreign object disturbances in the eye area and the variance of these statistics as a risk direction factor for risk avoidance. This enables the determination of liveness risk, effectively defending against local perturbation attacks and resisting common attack methods such as those targeting photos and static screens. This helps users identify fraudulent activities and protects their rights.

[0135] Figure 6 This is a schematic diagram of a liveness detection device provided in an embodiment of the present disclosure, as shown below. Figure 6 As shown, the device includes: an image sequence acquisition module 510, a reference image determination module 520, a risk factor determination module 530, and a detection result determination module 540.

[0136] The image sequence acquisition module 510 is configured to acquire an image sequence of the target object in response to a liveness detection trigger operation, wherein the image sequence includes an image to be detected; the reference image determination module 520 is configured to determine, for the image to be detected, multiple reference frames associated with the image to be detected in the acquisition time from the image sequence; the risk factor determination module 530 is configured to determine a risk factor of the image to be detected based on the region to be detected in the multiple reference frames, wherein the region to be detected includes at least the region where the verification organ performing the preset verification action is located, and the risk factor is used to indicate whether the target object is a live body; the detection result determination module 540 is configured to determine a liveness detection result corresponding to the target object based on the risk factor of the image to be detected. The technical solution of this disclosure embodiment, in response to a liveness detection trigger operation, acquires an image sequence of a target object, wherein the image sequence includes an image to be detected; for the image to be detected, determines multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time; fully considers the dynamic changes of liveness features; based on the region to be detected in the multiple reference images, determines a risk factor for the image to be detected, wherein the region to be detected at least includes the region where a verification organ performing a preset verification action is located, and the risk factor is used to indicate whether the target object is live; the risk factor is defined by the region where the verification organ performing the preset verification action is located in liveness detection to predict the risk of liveness detection. Based on the risk factor of the image to be detected, a liveness detection result corresponding to the target object is determined. This solves the technical problem of low accuracy of liveness detection results in related technologies, effectively avoids the risks in liveness detection, and improves the accuracy of liveness detection.

[0137] Optionally, the risk factor determination module 530 includes: a binarized image determination submodule, a pixel point statistical value determination submodule, and a risk factor determination submodule.

[0138] The binarized image determination submodule is used to determine the binarized image of the region to be detected in each frame of the reference image.

[0139] The pixel point statistics determination submodule is used to count the number of pixels with the same pixel value in the binarized image to obtain the pixel point statistics value.

[0140] The risk factor determination submodule is used to determine the risk factor of the image to be detected based on the pixel statistics of at least two reference images in the multi-frame reference images.

[0141] Optionally, the binarized image determination submodule is used for:

[0142] The region to be detected in the reference image is cropped to obtain an image of the region to be detected.

[0143] The image of the region to be detected is binarized to obtain the binarized image.

[0144] Optionally, the binarized image determination submodule is used for:

[0145] The reference image is binarized;

[0146] The region to be detected in the binarized reference image is cropped to obtain the binarized image.

[0147] Optionally, the risk factor determination submodule includes: a pixel point statistical value variance calculation unit and a risk factor determination unit.

[0148] The pixel statistical value variance calculation unit is used to calculate the variance of pixel statistical values ​​in at least two reference images in the multi-frame reference images.

[0149] The risk factor determination unit is used to determine the risk factor of the image to be detected based on the variance.

[0150] Optionally, the pixel statistical value variance calculation unit is used for:

[0151] Acquire at least two reference images within a preset acquisition time range from the multiple reference images;

[0152] Calculate the variance of the pixel statistics of the at least two reference images.

[0153] Optionally, the pixel statistical value variance calculation unit is used for:

[0154] A preset number of reference images are obtained from the multi-frame reference images, and the variance of the pixel statistics of the reference images is calculated.

[0155] Optionally, the detection result determination module 540 is used for:

[0156] Based on the risk factors of the image to be detected and the preset risk factor threshold, the liveness detection result corresponding to the target object is determined.

[0157] Optionally, the detection result determination module 540 is used for:

[0158] The fluctuation value corresponding to the multiple frames of the images to be detected is determined based on the risk factors.

[0159] Based on the fluctuation value and the preset fluctuation threshold, the liveness detection result corresponding to the target object is determined.

[0160] Optionally, the multi-frame reference images are a preset number of images among the prior images of the image to be detected that are closest to the image to be detected in terms of acquisition time.

[0161] Optionally, the multi-frame reference images are images obtained by sampling a preset number of prior images of the image to be detected that are closest to the image to be detected in terms of acquisition time, at equal intervals.

[0162] The liveness detection device provided in this disclosure can execute the liveness detection method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.

[0163] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0164] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Reference is made below. Figure 7 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 7 The diagram below shows the structure of the terminal device or server 600. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0165] like Figure 7 As shown, electronic device 600 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of electronic device 600. The processing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. An edit / output (I / O) interface 605 is also connected to bus 604.

[0166] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0167] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0168] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0169] The electronic device provided in this embodiment and the liveness detection method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0170] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the liveness detection method provided in the above embodiments.

[0171] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can 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 a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0172] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0173] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0174] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to a liveness detection trigger operation, acquire an image sequence of a target object, wherein the image sequence includes an image to be detected; for the image to be detected, determine multiple reference frames from the image sequence that are temporally associated with the image to be detected; based on a region to be detected in the multiple reference frames, determine a risk factor for the image to be detected, wherein the region to be detected includes at least the region where a verification organ performing a preset verification action is located, and the risk factor is used to indicate whether the target object is a live object; and based on the risk factor of the image to be detected, determine a liveness detection result corresponding to the target object.

[0175] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0176] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0177] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0178] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0179] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0180] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0181] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0182] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for detecting liveness, characterized in that, include: In response to a liveness detection trigger operation, an image sequence of the target object is acquired, wherein the image sequence includes the image to be detected; For the image to be detected, determine multiple reference images from the image sequence that are associated with the image to be detected in terms of acquisition time; For each frame of reference image, a binarized image of the region to be detected in the reference image is determined, wherein the region to be detected includes at least the region where the verification organ performing the preset verification action is located; The number of pixels with the same pixel value in the binarized image is counted to obtain the pixel count value; Calculate the variance of the pixel statistics of at least two reference images in the multi-frame reference images; Based on the variance, a risk factor is determined for the image to be detected, and the risk factor is used to indicate whether the target object is a living organism; Based on the risk factors of the image to be detected, the liveness detection result corresponding to the target object is determined.

2. The liveness detection method according to claim 1, characterized in that, Determining the binarized image of the region to be detected in the reference image includes: The region to be detected in the reference image is cropped to obtain an image of the region to be detected. The image of the region to be detected is binarized to obtain the binarized image.

3. The live detection method according to claim 1, characterized in that, Determining the binarized image of the region to be detected in the reference image includes: The reference image is binarized; The region to be detected in the binarized reference image is cropped to obtain the binarized image.

4. The liveness detection method according to claim 1, characterized in that, The calculation of the variance of pixel statistics in at least two reference images among the multi-frame reference images includes: Acquire at least two reference images within a preset acquisition time range from the multiple reference images; Calculate the variance of the pixel statistics of the at least two reference images.

5. The live detection method according to claim 1, characterized in that, The calculation of the variance of pixel statistics in at least two frames of the multi-frame reference images includes: A preset number of reference images are obtained from the multi-frame reference images, and the variance of the pixel statistics of the reference images is calculated.

6. The live detection method according to claim 1, characterized in that, The step of determining the liveness detection result corresponding to the target object based on the risk factor of the image to be detected includes: Based on the risk factors of the image to be detected and the preset risk factor threshold, the liveness detection result corresponding to the target object is determined.

7. The live detection method according to claim 1, characterized in that, The step of determining the liveness detection result corresponding to the target object based on the risk factor of the image to be detected includes: The fluctuation value corresponding to the multiple frames of images to be detected is determined based on the risk factors. Based on the fluctuation value and the preset fluctuation threshold, the liveness detection result corresponding to the target object is determined.

8. The live detection method according to claim 1, characterized in that, The multi-frame reference images are a preset number of images that are closest to the image to be detected in terms of acquisition time among the prior images of the image to be detected.

9. The liveness detection method according to claim 1, characterized in that, The multi-frame reference images are images obtained by sampling a predetermined number of images from the prior images of the image to be detected that are closest to the image to be detected in terms of acquisition time, and then sampling them at equal intervals.

10. A liveness detection device, characterized in that, include: An image sequence acquisition module is used to acquire an image sequence of a target object in response to a liveness detection trigger operation, wherein the image sequence includes an image to be detected; A reference image determination module is used to determine, for the image to be detected, multiple reference images associated with the image to be detected in terms of acquisition time from the image sequence; The risk factor determination module includes a binarized image determination submodule, a pixel statistics value determination submodule, and a risk factor determination submodule. The binarized image determination submodule is used to determine a binarized image of a region to be detected in each frame of a reference image, wherein the region to be detected at least includes the region where the verification organ performing the preset verification action is located. The pixel statistics value determination submodule is used to count the number of pixels with the same pixel value in the binarized image to obtain a pixel statistics value. The risk factor determination submodule is used to determine a risk factor of the image to be detected based on the pixel statistics values ​​of at least two frames of reference images, wherein the risk factor indicates whether the target object is a living organism. The detection result determination module is used to determine the liveness detection result corresponding to the target object based on the risk factor of the image to be detected; The risk factor determination submodule includes: a pixel statistical value variance calculation unit and a risk factor determination unit; The pixel statistical value variance calculation unit is used to calculate the variance of pixel statistical values ​​in at least two reference images in the multi-frame reference images. The risk factor determination unit is used to determine the risk factor of the image to be detected based on the variance.

11. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the liveness detection method as described in any one of claims 1-9.

12. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the liveness detection method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Living body verification method and living body verification device

    CN106997452A

  • Method and device for detecting human face of living body

    CN108875461A