Liveness detection method, device, equipment and readable storage medium

By extracting the frame difference noise characteristics of video data and performing live detection, the problem of low live detection accuracy in the prior art is solved, and higher live detection accuracy and safety of the face recognition system are achieved.

CN111985423BActive Publication Date: 2025-02-07WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010866143.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-25
Publication Date
2025-02-07
Estimated Expiration
2040-08-25

AI Technical Summary

Technical Problem

In the prior art, the accuracy of live detection is low, and it is difficult to identify forged video data, resulting in low accuracy of live detection.

Method used

By obtaining the frame difference data of the video data to be detected, the frame difference noise feature data is extracted, and living detection is performed based on these feature data to identify whether the video data is forged data.

Benefits of technology

It improves the accuracy of live detection, can effectively identify forged video data, and enhances the security of the face recognition system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111985423B_ABST
    Figure CN111985423B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and readable storage medium for liveness detection, wherein the liveness detection method comprises: obtaining frame difference data corresponding to video data to be detected, and determining frame difference noise characteristic data corresponding to the frame difference data, and performing liveness detection on the video data to be detected based on the frame difference noise characteristic data to obtain a liveness detection result. The present application solves the technical problem of low liveness detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence in financial technology (Fintech), and in particular to a liveness detection method, device, equipment and readable storage medium. Background Art

[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, but the financial industry also puts forward higher requirements on technology, such as higher requirements on the distribution of corresponding to-do items in the financial industry.

[0003] With the continuous development of computer software and artificial intelligence, the application fields of artificial intelligence are becoming more and more extensive. For example, artificial intelligence is often used in face recognition. However, since face data is relatively easy to obtain, liveness detection is usually required when performing face recognition to ensure the accuracy of face recognition. At present, liveness detection is usually performed based on the video data obtained by the front-end camera, analyzing the movement changes of the face (such as movement liveness), voice information and mouth movement changes (digital liveness) or the three-dimensional structure information of the face. That is, liveness detection is performed through the video feature information in the video data. However, since video data can be forged through video editing technology, if a malicious attacker attacks the face recognition system through forged video data, the current liveness detection method is difficult to identify whether the video data is forged, which leads to low accuracy of liveness detection. Summary of the invention

[0004] The main purpose of this application is to provide a liveness detection method, device, equipment and readable storage medium, aiming to solve the technical problem of low liveness detection accuracy in the prior art.

[0005] To achieve the above object, the present application provides a liveness detection method, which is applied to a liveness detection device, and the liveness detection method includes:

[0006] Acquire frame difference data corresponding to the video data to be detected, and determine frame difference noise feature data corresponding to the frame difference data;

[0007] Based on the frame difference noise feature data, liveness detection is performed on the video data to be detected to obtain a liveness detection result.

[0008] Optionally, the frame difference noise feature data includes spatial domain frame difference noise feature data.

[0009] The step of determining the frame difference noise characteristic data corresponding to the frame difference data comprises:

[0010] The frame difference data is filtered to amplify the noise signal in the frame difference data to obtain spatial domain frame difference noise feature data.

[0011] Optionally, the frame difference noise characteristic data includes frequency domain frame difference noise characteristic data.

[0012] The step of determining the frame difference noise characteristic data corresponding to the frame difference data comprises:

[0013] Performing Fourier transform on the frame difference data to transform the frame difference data from the spatial domain to the frequency domain, and obtaining the frequency domain frame difference noise characteristic data corresponding to the frame difference data.

[0014] Optionally, the step of performing liveness detection on the video data to be detected based on the frame difference noise feature data to obtain a liveness detection result includes:

[0015] Inputting the frame difference noise feature data into a preset classification model, classifying each frame difference noise feature in the frame difference noise feature data, and obtaining a frame difference noise feature classification result;

[0016] Based on the frame difference noise feature classification result, liveness detection is performed on the video data to be detected to obtain the liveness detection result.

[0017] Optionally, the frame difference noise feature classification result includes a living body frame difference noise feature,

[0018] The step of performing liveness detection on the video data to be detected based on the frame difference noise feature classification result to obtain the liveness detection result comprises:

[0019] Calculate the ratio of the number of features of the living body frame difference noise features in the frame difference noise feature classification result;

[0020] Compare the feature quantity ratio with a preset quantity ratio threshold, and if the feature quantity ratio is greater than or equal to the preset quantity ratio threshold, determine that the liveness detection result is passed;

[0021] If the feature quantity ratio is less than the preset quantity ratio threshold, the liveness detection result is determined to be failed.

[0022] Optionally, the step of obtaining frame difference data corresponding to the video data to be detected includes:

[0023] Acquire continuous frame data corresponding to the video data to be detected;

[0024] The frame difference between each continuous frame image in the continuous frame data is calculated to obtain the frame difference data.

[0025] Optionally, the frame difference data at least includes a frame difference image matrix, and each of the continuous frame images includes a first continuous frame image and a second continuous frame image.

[0026] The step of calculating the frame difference between each continuous frame image in the continuous frame data to obtain the frame difference data comprises:

[0027] Acquire a first pixel matrix corresponding to the first continuous frame images and a second pixel matrix corresponding to the second continuous frame images;

[0028] A subtraction operation is performed on the first pixel matrix and the second pixel matrix to obtain the frame difference image matrix.

[0029] The present application also provides a liveness detection device, which is a virtual device and is applied to a liveness detection device. The liveness detection device includes:

[0030] An extraction module, used to obtain frame difference data corresponding to the video data to be detected, and determine frame difference noise feature data corresponding to the frame difference data;

[0031] The liveness detection module is used to perform liveness detection on the video data to be detected based on the frame difference noise feature data to obtain a liveness detection result.

[0032] Optionally, the extraction module includes:

[0033] The filtering unit is used to perform filtering processing on the frame difference data to amplify the noise signal in the frame difference data and obtain spatial domain frame difference noise feature data.

[0034] Optionally, the extraction module further includes:

[0035] The transformation module is used to perform Fourier transformation on the frame difference data to transform the frame difference data from the spatial domain to the frequency domain, and obtain the frequency domain frame difference noise characteristic data corresponding to the frame difference data.

[0036] Optionally, the living body detection module includes:

[0037] A classification unit, used for inputting the frame difference noise feature data into a preset classification model, classifying each frame difference noise feature in the frame difference noise feature data, and obtaining a frame difference noise feature classification result;

[0038] A liveness detection unit is used to perform liveness detection on the video data to be detected based on the frame difference noise feature classification result to obtain the liveness detection result.

[0039] Optionally, the living body detection unit includes:

[0040] A first calculation subunit is used to calculate the feature quantity ratio of the living body frame difference noise feature in the frame difference noise feature classification result;

[0041] A first determination subunit is used to compare the feature quantity ratio with a preset quantity ratio threshold, and if the feature quantity ratio is greater than or equal to the preset quantity ratio threshold, determine that the liveness detection result is passed;

[0042] The second determination subunit is used to determine that the liveness detection result is failed if the feature quantity ratio is less than the preset quantity ratio threshold.

[0043] Optionally, the extraction module further includes:

[0044] An acquisition unit, used for acquiring continuous frame data corresponding to the video data to be detected;

[0045] The calculation unit is used to calculate the frame difference between each continuous frame image in the continuous frame data to obtain the frame difference data.

[0046] Optionally, the computing unit includes:

[0047] An acquisition subunit, used to acquire a first pixel matrix corresponding to the first continuous frame image and a second pixel matrix corresponding to the second continuous frame image;

[0048] The second calculation subunit is used to perform a subtraction operation on the first pixel matrix and the second pixel matrix to obtain the frame difference image matrix.

[0049] The present application also provides a liveness detection device, which is a physical device, and includes: a memory, a processor, and a program of the liveness detection method stored in the memory and executable on the processor. When the program of the liveness detection method is executed by the processor, the steps of the liveness detection method as described above can be implemented.

[0050] The present application also provides a readable storage medium, on which is stored a program for implementing the liveness detection method. When the program for the liveness detection method is executed by a processor, the steps of the liveness detection method as described above are implemented.

[0051] The present application provides a liveness detection method, device and readable storage medium. Compared with the technical means of performing liveness detection based on the video feature information of the video data itself adopted in the prior art, the present application first obtains the frame difference data corresponding to the video data to be detected, and then extracts the frame difference noise feature data corresponding to the frame difference data. It should be noted that the frame difference noise feature data of the artificially edited forged video data is different from the frame difference noise feature data of the naturally shot video data. Then, based on the frame difference noise feature data, liveness detection is performed on the video data to be detected, so that it can be identified whether the video data to be detected corresponding to the frame difference noise feature data is forged video data, and then a more accurate liveness recognition detection result is obtained, thereby overcoming the technical defect in the prior art that the video feature information of the video data itself can be forged, and then the accuracy of liveness detection is low based on the video feature information of the video data itself, thereby improving the accuracy of liveness detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0054] Figure 1 This is a flow chart of the first embodiment of the liveness detection method of the present application;

[0055] Figure 2 A schematic diagram of the second-order difference matrix described in the living body detection method of this application;

[0056] Figure 3 A schematic diagram of the edge difference matrix in the living body detection method of the present application;

[0057] Figure 4 A schematic diagram of the square difference matrix described in the living body detection method of the present application;

[0058] Figure 5 This is a flow chart of the second embodiment of the liveness detection method of the present application;

[0059] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0060] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0061] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] The present application embodiment provides a liveness detection method. In the first embodiment of the liveness detection method of the present application, refer to Figure 1 , the living body detection method comprises:

[0063] Step S10, obtaining frame difference data corresponding to the video data to be detected, and determining frame difference noise feature data corresponding to the frame difference data;

[0064] In this embodiment, it should be noted that the liveness detection method is applied to a face recognition system, and the video data to be detected is video data containing a face, wherein the video data to be detected includes at least one continuous frame image, and the frame difference data includes a frame difference map between each of the continuous frame images, and the frame difference noise feature data is noise feature information data possessed by the frame difference data, which is used to distinguish between artificially edited videos and naturally shot videos. It should be noted that the artificially edited video is obtained by editing images and videos, and when editing, the original frame difference noise features will be changed, and the frame difference noise features of the artificially edited video will be different from the frame difference noise features of the naturally shot video. For example, assuming that the frame difference noise feature is the frame difference noise in the frame difference image, the frame difference noise corresponding to the naturally shot video should conform to the Gaussian distribution or the Poisson distribution, and editing the video will destroy the distribution of the frame difference noise, and the frame difference noise corresponding to the artificially edited video will not conform to the Gaussian distribution or the Poisson distribution.

[0065] Obtain frame difference data corresponding to the video data to be detected, and determine frame difference noise characteristic data corresponding to the frame difference data. Specifically, extract the video data to be detected from a preset database, and decode the video data to be detected to restore the video data to be detected in a compressed storage state into a plurality of continuous frame data, wherein the continuous frame data is continuous frame images in the video data to be detected, wherein one of the continuous frame images is an image of a time frame in the video data to be detected, and then calculate the frame difference of the continuous frame images corresponding to adjacent time frames to obtain the frame difference data, and then perform feature extraction on the frame difference data to obtain the frame difference noise characteristic data.

[0066] The step of obtaining frame difference data corresponding to the video data to be detected includes:

[0067] Step S11, obtaining continuous frame data corresponding to the video data to be detected;

[0068] In this embodiment, it should be noted that the continuous frame data is a set of images on each continuous time frame corresponding to the video data to be detected, and the continuous frame data includes at least one continuous frame image, wherein the continuous frame image is an image on a time frame in the video data to be detected.

[0069] Step S12, calculating the frame difference between each continuous frame image in the continuous frame data to obtain the frame difference data.

[0070] In this embodiment, the frame difference between each continuous frame image in the continuous frame data is calculated to obtain the frame difference data. Specifically, based on the time sequence of the time frames corresponding to each continuous frame image in the continuous frame data, the frame difference between the continuous frame images corresponding to each two adjacent time frames is calculated to obtain the frame difference data. For example, assuming that each of the continuous frame images is (f1, f2, ..., f N ), then the frame difference d N-1 =f N -f N-1 , and the frame difference data is (d1, d2, ..., d N ).

[0071] The frame difference data at least includes a frame difference image matrix, and each of the continuous frame images includes a first continuous frame image and a second continuous frame image.

[0072] The step of calculating the frame difference between each continuous frame image in the continuous frame data to obtain the frame difference data comprises:

[0073] Step S121, obtaining a first pixel matrix corresponding to the first continuous frame image and a second pixel matrix corresponding to the second continuous frame image;

[0074] In this embodiment, it should be noted that the first continuous frame image and the second continuous frame image are images on adjacent time frames, and the time frame corresponding to the first continuous frame image is before the time frame corresponding to the second continuous frame image, the first pixel matrix is ​​an image representation matrix composed of the pixel values ​​of each pixel point in the first continuous frame image, and the second pixel matrix is ​​an image representation matrix composed of the pixel values ​​of each pixel point in the second continuous frame image.

[0075] Step S122: performing a subtraction operation on the first pixel matrix and the second pixel matrix to obtain the frame difference image matrix.

[0076] In this embodiment, a subtraction operation is performed on the first pixel matrix and the second pixel matrix to obtain the frame difference image matrix. Specifically, the first pixel matrix is ​​subtracted from the second pixel matrix to obtain the frame difference image matrix, wherein the frame difference image matrix is ​​an image representation matrix of frame difference images between continuous frame images corresponding to the second pixel matrix and continuous frame images corresponding to the first pixel matrix.

[0077] The frame difference noise feature data includes spatial domain frame difference noise feature data.

[0078] The step of determining the frame difference noise characteristic data corresponding to the frame difference data comprises:

[0079] Step A10: filtering the frame difference data to amplify the noise signal in the frame difference data to obtain spatial domain frame difference noise feature data.

[0080] In the present embodiment, it should be noted that if there is no noise signal in each continuous frame image, most of the pixel values ​​in the frame difference image matrix corresponding to the frame difference image should be 0, because there must be noise signals in naturally shot videos, and the noise signals should be distributed everywhere in the frame difference image. However, in artificially edited images, due to artificial editing of some areas of the image, the noise signal in the edited area will disappear, and then in the frame difference image it will be shown that the noise signal is not distributed in some areas of the frame difference image, and in the frame difference image matrix it is shown that the pixel values ​​in some areas are 0, and the spatial domain frame difference noise feature data is the frame difference data with the noise signal amplified, that is, the frame difference image matrix with the pixel value amplified.

[0081] The frame difference data is filtered to amplify the noise signal in the frame difference data to obtain spatial frame difference noise feature data. Specifically, based on a preset filter kernel, each frame difference image matrix in the frame difference data is convolved to amplify the pixel value in the frame difference image matrix, thereby amplifying the noise signal, obtaining a filter convolution processing matrix corresponding to each frame difference image matrix, and then using each filter convolution processing matrix as the spatial frame difference noise feature data, wherein the preset filter kernel is a convolution kernel for convolution processing, wherein the preset filter kernel includes a second-order difference matrix, an edge difference matrix, a square difference matrix, etc., wherein, as Figure 2 Shown is a schematic diagram of the second-order difference matrix, such as Figure 3 The schematic diagram of the edge difference matrix is ​​shown as Figure 4 Shown is a schematic diagram of the square difference matrix.

[0082] The frame difference noise characteristic data includes frequency domain frame difference noise characteristic data.

[0083] The step of determining the frame difference noise characteristic data corresponding to the frame difference data comprises:

[0084] Step B10: Perform Fourier transform on the frame difference data to transform the frame difference data from the spatial domain to the frequency domain, and obtain the frequency domain frame difference noise characteristic data corresponding to the frame difference data.

[0085] In this embodiment, it should be noted that the frame difference image is an image in the spatial domain, and the frame difference image includes spatial information of the image, wherein the spatial information reflects characteristics such as the position, shape and size of the object in the image, and the frequency domain frame difference noise feature data is a frame difference spectrum image corresponding to the frame difference image, wherein the frame difference spectrum image is an image corresponding to the frame difference image in the frequency domain, and is used to represent the image frequency of the frame difference image, wherein the image frequency is the severity of the change in pixel values ​​of the image, that is, the gradient of the image.

[0086] In addition, it should be noted that the main component of the image is the low-frequency information, which forms the basic grayscale level of the image and has a smaller determining effect on the image structure. The medium-frequency information determines the basic structure of the image and forms the main edge structure of the image. The high-frequency information forms the edges and details of the image, and the noise signal in the image is usually medium and high-frequency information.

[0087] In addition, it should be noted that the noise signal and low-frequency signal in the frame difference spectrum graph corresponding to the naturally shot video should be evenly distributed in each area of ​​the frame difference spectrum graph, while for the frame difference spectrum graph corresponding to the artificially edited video, the noise signal is eliminated due to artificial editing, which is manifested in the frame difference spectrum graph as the disappearance of the mid- and high-frequency information in some areas.

[0088] Performing Fourier transform on the frame difference data to transform the frame difference data from the spatial domain to the frequency domain to obtain the frequency domain frame difference noise characteristic data corresponding to the frame difference data. Specifically, performing Fourier transform on each of the frame difference graphs to transform each of the frame difference graphs from the spatial domain to the frequency domain to obtain a frame difference spectrum graph corresponding to each of the frame difference graphs, and then using each of the frame difference spectrum graphs as the frequency domain frame difference noise characteristic data.

[0089] Step S20: performing liveness detection on the video data to be detected based on the frame difference noise feature data to obtain a liveness detection result.

[0090] In this embodiment, it should be noted that the frame difference noise feature data includes frame difference noise features corresponding to each frame difference image in the frame difference data, wherein the frame difference noise features include a frame difference spectrum image and a filter convolution processing matrix.

[0091] Based on the frame difference noise feature data, liveness detection is performed on the video data to be detected to obtain a liveness detection result. Specifically, based on the frame difference noise feature corresponding to each of the frame difference images, liveness detection is performed on the video data to be detected to obtain a liveness detection sub-result corresponding to each of the frame difference images, and then based on each of the liveness detection sub-results, the liveness detection result is generated. In an implementable scheme, the number of liveness determinations of the liveness detection sub-results judged as liveness is determined, and then the ratio of the number of liveness determinations to the number of the frame difference images is calculated to obtain a liveness score, and then if the liveness score is greater than or equal to a preset liveness score threshold, the liveness is determined. The liveness detection result is passed. If the liveness score is less than the preset liveness score threshold, the liveness detection result is judged to be failed. It should be noted that the liveness detection is performed based on the frame difference noise feature in the embodiment of the present application, so that artificially edited videos and naturally shot videos can be distinguished. The liveness detection sub-results corresponding to the frame difference noise features corresponding to the artificially edited videos should be judged as non-live with a high probability. Even if a malicious attacker uses forged video data to attack the face recognition system, the forged video data can be identified and the face in the forged video data can be judged as non-live, which improves the accuracy of liveness detection and thus improves the accuracy of face recognition.

[0092] The embodiment of the present application provides a liveness detection method. Compared with the technical means used in the prior art for performing liveness detection based on the video feature information of the video data itself, the embodiment of the present application first obtains the frame difference data corresponding to the video data to be detected, and then extracts the frame difference noise feature data corresponding to the frame difference data. It should be noted that the frame difference noise feature data of the artificially edited forged video data is different from the frame difference noise feature data of the naturally shot video data. Then, based on the frame difference noise feature data, liveness detection is performed on the video data to be detected, so that it can be identified whether the video data to be detected corresponding to the frame difference noise feature data is forged video data, and then a more accurate liveness recognition detection result is obtained, thereby overcoming the technical defect in the prior art that the video feature information of the video data itself can be forged, and then the accuracy of liveness detection is low based on the video feature information of the video data itself, thereby improving the accuracy of liveness detection.

[0093] Further, refer to Figure 5 Based on the first embodiment of the present application, in another embodiment of the present application, the step of performing liveness detection on the video data to be detected based on the frame difference noise feature data to obtain the liveness detection result includes:

[0094] Step S21, inputting the frame difference noise feature data into a preset classification model, classifying each frame difference noise feature in the frame difference noise feature data, and obtaining a frame difference noise feature classification result;

[0095] In this embodiment, it should be noted that the preset classification model is a trained neural network model, which is used to classify frame difference noise features, wherein the types of frame difference noise features include living body frame difference noise feature types and non-living body frame difference noise feature types, and the frame difference noise features include a frame difference spectrum diagram and a filtering convolution processing matrix, wherein the frame difference noise features can be represented by a coding matrix, and the coding matrix corresponding to the frame difference noise features is a frame difference noise feature representation matrix.

[0096] The frame difference noise feature data is input into a preset classification model, and each frame difference noise feature in the frame difference noise feature data is classified to obtain a frame difference noise feature classification result. Specifically, a frame difference noise feature representation matrix corresponding to the frame difference noise feature corresponding to each frame difference image is input into the preset classification model, and feature extraction is performed on each frame difference noise feature representation matrix to obtain a feature extraction matrix corresponding to each frame difference noise feature representation matrix, and then each feature extraction matrix is ​​fully connected to obtain a classification label vector corresponding to each frame difference noise feature, and then based on the classification label in each classification label vector, it is determined whether the type of each frame difference noise feature is a living body frame difference noise feature type or a non-living body frame difference noise feature type to obtain a frame difference noise feature classification result, wherein the living body frame difference noise feature type indicates that the frame difference image corresponding to the frame difference noise feature corresponds to a living body, and the non-living body frame difference noise feature type indicates that the frame difference image corresponding to the frame difference noise feature corresponds to a non-living body.

[0097] In addition, it should be noted that when training the preset classification model, naturally shot face video data and artificially edited face video data can be obtained respectively, and the frame difference noise features corresponding to the naturally shot face video data are used as the first type of training data, and the first type of training data is assigned a first classification label corresponding to the living frame difference noise feature type, and the frame difference noise features corresponding to the artificially edited face video data are used as the second type of training data, and the second type of training data is assigned a second classification label corresponding to the non-living frame difference noise feature type, and then based on the first type of training data, the first classification label, the second type of training data and the second classification label, the preset classification model can be trained.

[0098] Step S22: Based on the frame difference noise feature classification result, liveness detection is performed on the video data to be detected to obtain the liveness detection result.

[0099] In this embodiment, based on the frame difference noise feature classification result, liveness detection is performed on the video data to be detected to obtain the liveness detection result. Specifically, based on the frame difference noise feature classification result, the number of liveness frame difference noise features of the frame difference noise features belonging to the liveness frame difference noise feature type is counted, and based on the number of liveness frame difference noise features, it is determined whether the face in the video data to be detected corresponds to a live body to obtain the liveness detection result.

[0100] The frame difference noise feature classification result includes a living body frame difference noise feature.

[0101] The step of performing liveness detection on the video data to be detected based on the frame difference noise feature classification result to obtain the liveness detection result comprises:

[0102] Step S221, calculating the feature quantity ratio of the living body frame difference noise feature in the frame difference noise feature classification result;

[0103] In this embodiment, it should be noted that the living body frame difference noise feature is a frame difference noise feature belonging to the living body frame difference noise feature type, and the frame difference noise feature classification result includes a living body frame difference noise feature and a non-living body frame difference noise feature, wherein the non-living body frame difference noise feature is a frame difference noise feature belonging to the non-living body frame difference noise feature type.

[0104] Calculate the proportion of the feature quantity of the living body frame difference noise feature in the frame difference noise feature classification result. Specifically, count the number of living body frame difference noise features in the frame difference noise feature classification result to obtain the number of living body frame difference noise features, and then calculate the proportion of the number of living body frame difference noise features in all the frame difference noise features to obtain the feature quantity proportion.

[0105] Step S222, comparing the feature quantity ratio with a preset quantity ratio threshold, if the feature quantity ratio is greater than or equal to the preset quantity ratio threshold, determining that the liveness detection result is passed;

[0106] In this embodiment, the feature quantity ratio is compared with a preset quantity ratio threshold. If the feature quantity ratio is greater than or equal to the preset quantity ratio threshold, the liveness detection result is determined to be passed. Specifically, the feature quantity ratio is compared with the preset quantity ratio threshold. If the feature quantity ratio is greater than or equal to the preset quantity ratio threshold, it is proved that the frame difference noise characteristics of each time frame in the video data to be detected support that the video data to be detected is not artificially edited video data, and then the face in the video data to be detected is a live face, and then the liveness detection result is determined to be passed.

[0107] Step S223: if the feature quantity ratio is less than the preset quantity ratio threshold, the liveness detection result is determined to be failed.

[0108] In this embodiment, if the proportion of the number of features is less than the preset number proportion threshold, the liveness detection result is determined to be failed. Specifically, if the proportion of the number of features is less than the preset number proportion threshold, it proves that the frame difference noise characteristics of each time frame in the video data to be detected support that the video data to be detected is artificially edited video data, and then the face in the video data to be detected is not a live face, and then the liveness detection result is determined to be failed.

[0109] In addition, it should be noted that the liveness detection method can be combined with the existing liveness detection method and applied to the face recognition system, wherein the existing liveness detection method includes motion liveness, digital liveness and flash liveness, etc., wherein, since the existing liveness detection method also needs to collect user face video data, then based on the liveness detection method in the embodiment of the present application, the existing face recognition system using motion liveness, digital liveness, light liveness, etc. can be directly upgraded without the need for additional hardware or user learning costs, and since the present application can effectively prevent malicious participants from attacking the face recognition system by manually editing video data, the security of the face recognition system is improved.

[0110] The embodiment of the present application provides a method for performing liveness detection based on frame difference noise features of video data to be detected and a preset classification model. Compared with the technical means for performing liveness detection based on video feature information of video data itself adopted in the prior art, the embodiment of the present application, after collecting frame difference noise feature data of the video data to be detected, classifies the frame difference noise features in the frame difference noise feature data based on a preset classification model to obtain a frame difference noise feature classification result, and then determines the feature quantity ratio of liveness frame difference noise features in the frame difference noise feature classification result, wherein the higher the feature quantity ratio, the higher the probability that the video data to be detected is not forged video data, and then it can be determined whether the video data to be detected is forged video data, and then liveness detection of the video data to be detected can be achieved to obtain a liveness detection result, thereby overcoming the technical defect in the prior art that the video feature information of the video data itself can be forged, and then the liveness detection accuracy is low based on the video feature information of the video data itself, thereby improving the accuracy of liveness detection.

[0111] Reference Figure 6 , Figure 6 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0112] like Figure 6As shown, the liveness detection device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0113] Optionally, the liveness detection device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0114] Those skilled in the art will understand that Figure 6 The structure of the liveness detection device shown in the figure does not constitute a limitation on the liveness detection device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0115] like Figure 6 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module and a liveness detection program. The operating system is a program that manages and controls the hardware and software resources of the liveness detection device, and supports the operation of the liveness detection program and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the liveness detection system.

[0116] exist Figure 6 In the liveness detection device shown, the processor 1001 is used to execute the liveness detection program stored in the memory 1005 to implement the steps of any of the liveness detection methods described above.

[0117] The specific implementation of the liveness detection device of the present application is basically the same as the above-mentioned embodiments of the liveness detection method, and will not be repeated here.

[0118] The embodiment of the present application further provides a liveness detection device, which is applied to a liveness detection device, and includes:

[0119] An extraction module, used to obtain frame difference data corresponding to the video data to be detected, and determine frame difference noise feature data corresponding to the frame difference data;

[0120] The liveness detection module is used to perform liveness detection on the video data to be detected based on the frame difference noise feature data to obtain a liveness detection result.

[0121] Optionally, the extraction module includes:

[0122] The filtering unit is used to perform filtering processing on the frame difference data to amplify the noise signal in the frame difference data and obtain spatial domain frame difference noise feature data.

[0123] Optionally, the extraction module further includes:

[0124] The transformation module is used to perform Fourier transformation on the frame difference data to transform the frame difference data from the spatial domain to the frequency domain, and obtain the frequency domain frame difference noise characteristic data corresponding to the frame difference data.

[0125] Optionally, the living body detection module includes:

[0126] A classification unit, used for inputting the frame difference noise feature data into a preset classification model, classifying each frame difference noise feature in the frame difference noise feature data, and obtaining a frame difference noise feature classification result;

[0127] A liveness detection unit is used to perform liveness detection on the video data to be detected based on the frame difference noise feature classification result to obtain the liveness detection result.

[0128] Optionally, the living body detection unit includes:

[0129] A first calculation subunit is used to calculate the feature quantity ratio of the living body frame difference noise feature in the frame difference noise feature classification result;

[0130] A first determination subunit is used to compare the feature quantity ratio with a preset quantity ratio threshold, and if the feature quantity ratio is greater than or equal to the preset quantity ratio threshold, determine that the liveness detection result is passed;

[0131] The second determination subunit is used to determine that the liveness detection result is failed if the feature quantity ratio is less than the preset quantity ratio threshold.

[0132] Optionally, the extraction module further includes:

[0133] An acquisition unit, used for acquiring continuous frame data corresponding to the video data to be detected;

[0134] The calculation unit is used to calculate the frame difference between each continuous frame image in the continuous frame data to obtain the frame difference data.

[0135] Optionally, the computing unit includes:

[0136] An acquisition subunit, used to acquire a first pixel matrix corresponding to the first continuous frame image and a second pixel matrix corresponding to the second continuous frame image;

[0137] The second calculation subunit is used to perform a subtraction operation on the first pixel matrix and the second pixel matrix to obtain the frame difference image matrix.

[0138] The specific implementation of the liveness detection device of the present application is basically the same as the above-mentioned embodiments of the liveness detection method, and will not be repeated here.

[0139] An embodiment of the present application provides a readable storage medium, and the readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned living body detection methods.

[0140] The specific implementation of the readable storage medium of the present application is basically the same as the above-mentioned embodiments of the living body detection method, and will not be repeated here.

[0141] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A method for detecting a living body, characterized in that: The living body detection method comprises: Acquire frame difference data corresponding to the video data to be detected, and determine frame difference noise feature data corresponding to the frame difference data; the frame difference data includes a frame difference map between each consecutive frame image, and the frame difference noise feature data is noise feature information data possessed by the frame difference data, which is used to distinguish between artificially edited videos and naturally shot videos; Based on the frame difference noise feature data, liveness detection is performed on the video data to be detected to obtain a liveness detection result.

2. The method for detecting a living body according to claim 1, wherein: The frame difference noise feature data includes spatial domain frame difference noise feature data, The step of determining the frame difference noise characteristic data corresponding to the frame difference data comprises: The frame difference data is filtered to amplify the noise signal in the frame difference data to obtain spatial domain frame difference noise feature data.

3. The method for detecting a living body according to claim 1, wherein: The frame difference noise characteristic data includes frequency domain frame difference noise characteristic data, The step of determining the frame difference noise characteristic data corresponding to the frame difference data comprises: Performing Fourier transform on the frame difference data to transform the frame difference data from the spatial domain to the frequency domain, and obtaining the frequency domain frame difference noise characteristic data corresponding to the frame difference data.

4. The method for detecting a living body according to claim 1, wherein: The step of performing liveness detection on the video data to be detected based on the frame difference noise feature data to obtain a liveness detection result comprises: Inputting the frame difference noise feature data into a preset classification model, classifying each frame difference noise feature in the frame difference noise feature data, and obtaining a frame difference noise feature classification result; Based on the frame difference noise feature classification result, liveness detection is performed on the video data to be detected to obtain the liveness detection result.

5. The method for detecting a living body according to claim 4, wherein: The frame difference noise feature classification result includes a living body frame difference noise feature, The step of performing liveness detection on the video data to be detected based on the frame difference noise feature classification result to obtain the liveness detection result comprises: Calculate the ratio of the number of features of the living body frame difference noise features in the frame difference noise feature classification result; Compare the feature quantity ratio with a preset quantity ratio threshold, and if the feature quantity ratio is greater than or equal to the preset quantity ratio threshold, determine that the liveness detection result is passed; If the feature quantity ratio is less than the preset quantity ratio threshold, the liveness detection result is determined to be failed.

6. The method for detecting a living body according to claim 1, wherein: The step of obtaining frame difference data corresponding to the video data to be detected includes: Acquire continuous frame data corresponding to the video data to be detected; The frame difference between each continuous frame image in the continuous frame data is calculated to obtain the frame difference data.

7. The method for detecting a living body according to claim 6, wherein: The frame difference data at least includes a frame difference image matrix, each of the continuous frame images includes a first continuous frame image and a second continuous frame image, The step of calculating the frame difference between each continuous frame image in the continuous frame data to obtain the frame difference data comprises: Acquire a first pixel matrix corresponding to the first continuous frame images and a second pixel matrix corresponding to the second continuous frame images; A subtraction operation is performed on the first pixel matrix and the second pixel matrix to obtain the frame difference image matrix.

8. A living body detection device, characterized in that: The living body detection device comprises: An extraction module is used to obtain frame difference data corresponding to the video data to be detected, and determine frame difference noise feature data corresponding to the frame difference data; the frame difference data includes a frame difference map between each consecutive frame image, and the frame difference noise feature data is noise feature information data possessed by the frame difference data, which is used to distinguish between artificially edited videos and naturally shot videos; The liveness detection module is used to perform liveness detection on the video data to be detected based on the frame difference noise feature data to obtain a liveness detection result.

9. A living body detection device, characterized in that: The liveness detection device comprises: a memory, a processor, and a program stored in the memory for implementing the liveness detection method. The memory is used to store a program for implementing a living body detection method; The processor is used to execute a program for implementing the liveness detection method, so as to implement the steps of the liveness detection method according to any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a program for implementing the liveness detection method, and the program for implementing the liveness detection method is executed by a processor to implement the steps of the liveness detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Face living body detection method based on multi-view dynamic features

    CN108446690A

  • Living body detection method and apparatus, electronic device and storage medium

    CN111401134A