Real-name authentication living body detection method based on improved kernel density estimation algorithm

By combining an improved kernel density estimation algorithm with a dynamic proportion threshold, the problem of distinguishing between live and fake videos is solved, thereby improving the accuracy and reliability of real-name authentication.

CN116071834BActive Publication Date: 2026-07-03E SURFING IOT CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
E SURFING IOT CO LTD
Filing Date
2022-12-30
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies cannot effectively distinguish between live and fake videos, resulting in low accuracy of real-name authentication.

Method used

An improved kernel density estimation algorithm is adopted, and a dynamic proportion threshold is set in combination with human features. Through random action verification, training set and test set are constructed, and filtering and noise reduction are performed to determine the authenticity of the video.

Benefits of technology

It improves the liveness detection capability and accuracy, reduces data processing errors, and enhances the reliability of real-name authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116071834B_ABST
    Figure CN116071834B_ABST
Patent Text Reader

Abstract

The application discloses a real-name authentication living body detection method based on an improved kernel density estimation algorithm, and comprises the following steps: randomly prompting a group of actions to a living body, and acquiring a random dynamic video of the living body completing the actions; collecting N training set pictures from the random dynamic video to construct a training set, and collecting M test set pictures to construct a test set; calculating a probability density function of the training set picture data by using the kernel density estimation algorithm; filtering and denoising the probability density function of the training set picture data; judging whether the random dynamic video is a normal dynamic video based on a set dynamic proportion threshold and the probability density function of the training set picture data after filtering and denoising; if the random dynamic video is a normal dynamic video, then action verification is performed on the random dynamic video, and if each action and the sequence of each action recognized in the random dynamic video are correct, then the action verification is passed, otherwise, the action verification is not passed. The application can improve the recognition ability and the recognition accuracy of the living body.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a real-name authentication liveness detection method based on an improved kernel density estimation algorithm. Background Technology

[0002] Real-name authentication typically involves recording video for user liveness verification. However, there are instances of fake liveness verification. For example, users can use software to detect the eyes and mouth of an uploaded static photo, then create dynamic movements to generate a fake video for real-name authentication. Related technologies are unable to distinguish between genuine and fake liveness verification based on the specific scene and keyframes. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a real-name authentication liveness detection method based on an improved kernel density estimation algorithm, which can improve the liveness recognition ability and recognition accuracy.

[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0005] A real-name authentication liveness detection method based on an improved kernel density estimation algorithm includes the following steps: randomly prompting a live subject with a set of actions, and acquiring random dynamic videos of the live subject performing the actions upon prompting; collecting N training images from the random dynamic videos to construct a training set and collecting M test images to construct a test set, where N and M are preset constants; calculating the probability density function of the training set image data using the kernel density estimation algorithm based on the training set and the test set; filtering and denoising the probability density function of the training set image data; setting a dynamic proportion threshold based on human characteristics, and determining whether the random dynamic video is a normal dynamic video based on the set dynamic proportion threshold and the probability density function of the filtered and denoised training set image data; if the random dynamic video is a normal dynamic video, then performing action verification on the random dynamic video; if all actions identified in the random dynamic video and the order of the actions are correct, then the action verification passes; otherwise, it fails.

[0006] The beneficial technical effects of this invention are as follows: The aforementioned real-name authentication liveness detection method based on an improved kernel density estimation algorithm utilizes the kernel density estimation algorithm combined with a dynamic proportion threshold set according to human characteristics to process video data. This makes data processing more targeted, effectively reducing data processing errors and solving the technical problem of being unable to distinguish the authenticity of videos during the real-name authentication process. It can effectively identify dynamic videos simulated using static photos, thereby improving the liveness recognition ability and accuracy. Furthermore, a random action verification function is added. During real-name authentication, a set of random actions is automatically prompted. Only when all actions and their order are correct can the verification pass, further enhancing the reliability of the verification. Attached Figure Description

[0007] Figure 1 This is a flowchart illustrating the real-name authentication liveness detection method based on the improved kernel density estimation algorithm of the present invention. Detailed Implementation

[0008] To enable those skilled in the art to more clearly understand the purpose, technical solution, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0009] like Figure 1 As shown, in one embodiment of the present invention, the real-name authentication liveness detection method based on the improved kernel density estimation algorithm includes steps S10 to S60.

[0010] S10. Randomly prompt a living subject with a set of actions, and obtain a random dynamic video of the living subject completing the actions according to the prompts.

[0011] This step involves video acquisition and is performed when a live user completes real-name authentication via the app. When the device detects a user performing real-name authentication, it randomly generates a set of action data and prompts the live user with a series of actions based on this data. These prompts include blinking, shaking the head, opening the mouth, and closing the mouth, with the order of these actions being random. The device then captures a video of the live user performing the prompts using its camera, creating a random dynamic video. This random dynamic video is used for subsequent liveness detection.

[0012] S20. Collect N training set images from random dynamic videos to construct a training set and collect M test set images to construct a test set.

[0013] This step is the data extraction step, performed after acquiring the random dynamic video. The random dynamic video is divided into N equal parts according to its total duration T, resulting in N short videos of duration T / N. Then, images of the middle frames (or other frames) of each short video of duration T / N are collected as training set images. Similarly, the random dynamic video is divided into M equal parts according to its total duration T, resulting in M ​​short videos of duration T / M. Then, images of the middle frames of each short video of duration T / M are collected as test set images.

[0014] N and M are preset constants that can be set according to actual needs. In this embodiment, N is 20 and M is 3.

[0015] S30. Based on the training set and the test set, use the kernel density estimation algorithm to calculate the probability density function of the training set image data.

[0016] This step is a data processing step, specifically kernel density estimation, a nonparametric method for estimating probability density functions. This step uses the kernel density estimation algorithm to calculate the probability density function of the training set image data.

[0017] Step S30 includes steps S31 to S35:

[0018] S31. Use the im2double function to convert the grayscale image of each test set image into double-precision test set image data T{a}, and use the im2double function to convert the grayscale image of each training set image into double-precision training set image data A{i}.

[0019] S32. Based on the test set image data T{a} and the training set image data A{i}, obtain the differences in the R, G, and B dimensions between each training set image data and the test set image data:

[0020]

[0021] S33. Calculate the kernel density function value for each training set image data. The kernel density formula is:

[0022]

[0023] S34. Process the random dynamic video to obtain images, obtain the data set of images in the random dynamic video, obtain the pixel values ​​of the images, and construct the corresponding zero matrix: zeros = (mn), where m and n are the size of the pixel matrix values ​​of the image, respectively.

[0024] S35. Continuously sum the kernel density function values ​​of N training set image data into the zero matrix, combine the processed training set image data, and calculate the probability density function of the training set image data:

[0025] f = zeros + RGB(i)

[0026]

[0027] Where N is the number of training images and h is the bandwidth. In this embodiment, the bandwidth h = 0.855.

[0028] S40. Filter and denoise the probability density function of the training set image data.

[0029] The purpose of this step is to filter out abnormal data caused during the image-to-data conversion process. This embodiment of the invention uses median filtering to filter and denoise the probability density function of the training set image data. Median filtering is a nonlinear signal processing technique based on ranking statistics theory that can effectively suppress noise. The basic principle of median filtering is to replace the value of a point in a digital image or digital sequence with the median value of all points in its neighborhood, making the surrounding pixel values ​​closer to the true value, thereby eliminating isolated noise points.

[0030] Prb = medfilt2(Pr, [3, 3])

[0031] S50. Set a dynamic proportion threshold based on human body characteristics, and determine whether the random dynamic video is a normal dynamic video based on the set dynamic proportion threshold and the probability density function of the filtered and denoised training set image data.

[0032] This step is for verifying the authenticity of the video, used to identify counterfeit videos used for real-name authentication. Step S50 includes steps S51 to S53:

[0033] S51. Set a dynamic proportion threshold K based on the proportion of facial features on the face. basic .

[0034] In this embodiment, a dynamic proportion threshold K is set based on the proportion of the eyes and lips on the face. basic Based on the "three courts and five eyes" proportion of the human face, in a static state, the eyes and lips account for approximately 10% of the face. Software is used to detect the eyes and mouth from uploaded static photos and generate dynamic motion indicators. By increasing the proportion range for eyes by 10% and for lips by 100%, the proportion range is approximately 14%. Considering motion processing errors, the ratio is set to 18%, i.e., the dynamic proportion threshold is set to K. basic =0.18. It should be noted that in other embodiments, a dynamic proportion threshold K can also be set based on the proportion of other facial features, such as the nose.basic Alternatively, dynamic proportion thresholds can be set based on other non-facial features of the human body.

[0035] S52, Based on the set dynamic percentage threshold K basic The probability density function of the filtered and denoised training set image data is selected based on the RGB values ​​of the base pixels. basic :

[0036] S53. Estimate the probability K of each frame of a random dynamic video having more pixels than the base number of pixels. If K is greater than or equal to the dynamic proportion threshold, the random dynamic video is determined to be a normal dynamic video; otherwise, the random dynamic video is determined to be an abnormal dynamic video.

[0037] In step S53, the proportion of training set images with pixels lower than 18% of the base pixel count is first calculated, denoted as k. rgb Then calculate the probability that the number of pixels in each test set photo is lower than 18% of the base number. Finally, using K' rgb Estimate the probability K of each frame in the random dynamic video exceeding the base pixel count. If K is greater than or equal to the dynamic proportion threshold, the random dynamic video is determined to be a normal dynamic video; otherwise, it is determined to be an abnormal dynamic video (fake video).

[0038] S60. If the random dynamic video is a normal dynamic video, then perform action verification on the random dynamic video. If all the actions identified in the random dynamic video and the order of the actions are correct, then the action verification passes; otherwise, it fails.

[0039] When prompting a set of random actions to the living subject in step S10, the generated random action data is simultaneously saved. This random action data includes each action prompted to the living subject and the order in which they appear. Based on the recognition and judgment in the previous step S50, after confirming that the random dynamic video is a normal dynamic video, action verification is performed based on the random action data. For example, if the living subject's dynamic data obtained from the random action data is "open mouth - blink - shake head", during action verification, if the actions "open mouth - blink - shake head" are identified in sequence, then each action and its order are considered correct, and the action verification passes. If the number of identified actions is inconsistent or the order of the actions is inconsistent, then the action verification fails.

[0040] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any way. Those skilled in the art can make various equivalent changes and improvements based on the above embodiments, and all equivalent variations or modifications made within the scope of the claims should fall within the protection scope of the present invention.

Claims

1. A real-name authentication live body detection method based on an improved kernel density estimation algorithm, characterized in that, The real-name authentication liveness detection method based on the improved kernel density estimation algorithm includes the following steps: S10. Randomly prompt a live subject with a set of actions, and obtain a random dynamic video of the live subject completing the actions in response to the prompts; S20. Collect N training set images from random dynamic videos to construct a training set and collect M test set images to construct a test set, where N and M are preset constants; S30. Based on the training set and the test set, use the kernel density estimation algorithm to calculate the probability density function of the training set image data; S40. Filter and denoise the probability density function of the training set image data; S50. Set a dynamic proportion threshold based on human body characteristics, and determine whether the random dynamic video is a normal dynamic video based on the set dynamic proportion threshold and the probability density function of the filtered and denoised training set image data. S60. If the random dynamic video is a normal dynamic video, then perform action verification on the random dynamic video. If all the actions identified in the random dynamic video and the order of the actions are correct, then the action verification passes; otherwise, it fails. Step S30 further includes the following steps: S31. Use the im2double function to convert the grayscale image of each test set image into double-precision test set image data T{a}, and use the im2double function to convert the grayscale image of each training set image into double-precision training set image data A{i}. S32. Based on the test set image data T{a} and the training set image data A{i}, obtain the differences in the R, G, and B dimensions between each training set image data and the test set image data: S33. Calculate the kernel density function value for each training set image data, using the following formula: S34, obtaining a data set of pictures in a random dynamic video, obtaining pixel values of the pictures, and constructing a corresponding zero matrix: wherein m and n are respectively sizes of pixel matrix values of the pictures. S35. Calculate the probability density function of the training set image data by cyclically summing the kernel density function values ​​of the zero matrix for N training set image data: Where N is the number of images in the training set, and h is the bandwidth; In the step S40, the probability density function of the training set picture data is filtered and denoised by using a median filtering method: ; Step S50 further includes the following steps: S51. Set a dynamic proportion threshold based on the proportion of facial features on the face. ; S52, based on the set dynamic proportion threshold And the probability density function of the filtered and denoised training set picture data selects the basic pixel point : ; S53. Estimate the probability K of each frame of a random dynamic video having more than 18% of the base pixels. If K is greater than or equal to the dynamic proportion threshold, the random dynamic video is determined to be a normal dynamic video; otherwise, the random dynamic video is determined to be an abnormal dynamic video.

2. The real-name authentication live body detection method based on the improved kernel density estimation algorithm according to claim 1, wherein, Step S10 further includes the following steps: S11. When a real-name authentication operation is detected, a set of random action data is generated randomly. S12. Prompt a set of actions to the living subject based on random motion data; S13. Take photos of the live subject to obtain random dynamic videos of the live subject performing actions under prompts.

3. The real-name authentication live body detection method based on the improved kernel density estimation algorithm according to claim 1, characterized in that, Step S20 further includes the following steps: S21. Divide the random dynamic video into N equal parts according to the total duration T to obtain N videos with a duration of T / N. Then, collect the middle frame images of each video with a duration of T / N as training set images. S22. Divide the random dynamic video into M equal parts according to the total duration T, to obtain M videos with a duration of T / M. Then, collect the middle frame images of each video with a duration of T / M as test set images.

4. The real-name authentication live body detection method based on the improved kernel density estimation algorithm according to claim 1, characterized in that, Bandwidth h = 0.

855.

5. The real-name authentication live body detection method based on the improved kernel density estimation algorithm according to claim 3, characterized in that, Step S53 further includes the following steps: S531、Calculate the proportion of the training set pictures in which the pixel points are lower than 18% of the base pixel points in the training set, and set it as ; S532, calculate the probability that each test set photo in the test set is less than 18% of the base pixel point ; S533, Utilization Estimate the probability K that the number of pixels in each frame of the random dynamic video exceeds the base number by 18%; S534, if K is greater than or equal to the dynamic proportion threshold value, it is determined that the random dynamic video is a normal dynamic video, otherwise, it is determined that the random dynamic video is an abnormal dynamic video.

6. The real-name authentication live body detection method based on the improved kernel density estimation algorithm according to claim 1, wherein, The step S51 further includes: setting a dynamic proportion threshold value according to the proportion of the eyes plus the lips in the face .

7. The real-name authentication live body detection method based on the improved kernel density estimation algorithm according to claim 6, characterized in that, 。