CN-116935457-B - Method and device for detecting human face living body and electronic equipment
Abstract
The application discloses a method for detecting human face living body, which belongs to the technical field of pattern recognition and is beneficial to improving the accuracy of detecting human face living body. The method comprises the steps of obtaining a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in a video image frame sequence for performing face living body detection, obtaining inter-frame correlation of the video image frame sequence according to the high-frequency characteristic component and the low-frequency characteristic component of the video image, and detecting whether a face to be detected acquired by the video image is a living body face or not according to a matching relation between the inter-frame correlation and a pre-obtained living body face inter-frame correlation. According to the method, based on the inter-frame detail change characteristics of the video images in the video image sequence and the matching result of the invariance characteristics of the profile and the outline and the distribution rule of the characteristics in the living human face image, whether the video image sequence is the living human face is judged, and the accuracy rate of living human face detection can be improved.
Inventors
- CHEN YING
- YAO QI
- PENG FEI
- HUANG LEI
Assignees
- 汉王科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20220401
Claims (10)
- 1. A method of face in-vivo detection, comprising: acquiring a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in a video image frame sequence for performing face living body detection; acquiring inter-frame correlation of the video image frame sequence according to the high-frequency characteristic component and the low-frequency characteristic component of the video image, wherein the inter-frame correlation comprises inter-frame consistency and inter-frame difference; detecting whether the face to be detected acquired by the video image is a living face or not according to the matching relation between the inter-frame correlation and the inter-frame correlation of the living face acquired in advance; the video image frame sequence includes at least two frames of video images, and the obtaining the inter-frame correlation of the video image frame sequence according to the high-frequency characteristic component and the low-frequency characteristic component of the video image includes: According to the high-frequency characteristic components of at least two adjacent frames of the video images, obtaining the difference value between the high-frequency characteristic components corresponding to the corresponding image positions in the at least two adjacent frames of the video images, and forming a high-frequency frame difference characteristic of the video image frame sequence; according to the low-frequency characteristic components of the adjacent at least two frames of the video images, obtaining the average value of the low-frequency characteristic components corresponding to the corresponding image positions in the adjacent at least two frames of the video images, and forming the low-frequency balance characteristic of the video image frame sequence; and carrying out weighted splicing on the high-frequency frame difference characteristic and the low-frequency equalization characteristic to obtain the inter-frame correlation of the video image frame sequence.
- 2. The method of claim 1, wherein the pre-acquired inter-frame correlation of the living face is a curved surface representing a distribution rule of inter-frame correlation of high-frequency features and low-frequency features in a video image sequence of the living face, which is obtained by fitting a living face sample, and the detecting whether the face to be detected acquired by the video image is the living face according to a matching relationship between the inter-frame correlation and the pre-acquired inter-frame correlation of the living face comprises: Substituting the obtained inter-frame correlation into the curved surface, and determining whether the obtained inter-frame correlation accords with an inter-frame correlation distribution rule of high-frequency features and low-frequency features in the living body face video image sequence expressed by the curved surface; determining that the face to be detected acquired by the video image is a living face according to an inter-frame correlation distribution rule of high-frequency characteristics and low-frequency characteristics in the acquired living face video image sequence with the inter-frame correlation conforming to the curved surface expression; And determining that the face to be detected acquired by the video image frames is a non-living face according to the obtained inter-frame correlation distribution rule of the high-frequency characteristic and the low-frequency characteristic in the living face video image sequence which does not accord with the curved surface expression.
- 3. The method according to claim 2, wherein before detecting whether the face to be detected of the video image acquisition is a living face based on the matching relationship of the inter-frame correlation and a pre-acquired living face inter-frame correlation, the method further comprises: Taking a video image sequence of a living human face as a positive sample, and constructing a sample set comprising a plurality of positive samples; Acquiring a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in each positive sample in the sample set; For each positive sample, acquiring inter-frame correlation representing the positive sample according to the high-frequency characteristic component and the low-frequency characteristic component of at least two frames of the video images in the positive sample; And performing surface fitting on the inter-frame correlation of the positive sample in the sample set to obtain a curved surface representing the inter-frame correlation distribution rule of high-frequency features and low-frequency features in the living body face video image sequence.
- 4. A method according to claim 3, wherein after the surface fitting the inter-frame correlation of the positive samples in the sample set to obtain a surface characterizing the inter-frame correlation distribution law of high-frequency features and low-frequency features in a sequence of live face video images, the method further comprises: substituting the inter-frame correlation of the positive samples in the sample set into the curved surface to obtain the distance between the inter-frame correlation of each positive sample and the curved surface; Determining a distance threshold between the inter-frame correlation of the living face video image sequence and the curved surface according to the distribution condition of the distance between the inter-frame correlation of each positive sample and the curved surface; substituting the obtained inter-frame correlation into the curved surface to determine whether the obtained inter-frame correlation accords with an inter-frame correlation distribution rule of high-frequency features and low-frequency features in the living body face video image sequence expressed by the curved surface, wherein the method comprises the following steps: Substituting the obtained inter-frame correlation into the curved surface to obtain the distance between the inter-frame correlation and the curved surface; Determining that the inter-frame correlation accords with an inter-frame correlation distribution rule of high-frequency features and low-frequency features in the living face video image sequence expressed by the curved surface in response to the distance being smaller than the predetermined distance threshold; And determining that the inter-frame correlation does not accord with the inter-frame correlation distribution rule of the high-frequency characteristic and the low-frequency characteristic in the living face video image sequence expressed by the curved surface in response to the distance being greater than or equal to the predetermined distance threshold.
- 5. The method of claim 1, wherein the sequence of video image frames includes a plurality of frames of video images, and wherein the obtaining the inter-frame correlation of the sequence of video image frames from the high frequency feature component and the low frequency feature component of the video images comprises: Splicing the high-frequency characteristic components of a plurality of frames of appointed video images in the video image frame sequence into a multi-dimensional high-frequency characteristic component matrix in a form that each frame of the video image corresponds to a one-dimensional high-frequency characteristic component, and splicing the low-frequency characteristic components of the plurality of frames of appointed video images into a multi-dimensional low-frequency characteristic component matrix in a form that each frame of the video image corresponds to a one-dimensional low-frequency characteristic component; Respectively carrying out low-rank sparse matrix decomposition on the multidimensional high-frequency characteristic component matrix and the multidimensional low-frequency characteristic component matrix to obtain a first matrix representing low-frequency background characteristics, a second matrix representing low-frequency detail characteristics, a third matrix representing high-frequency background characteristics and a fourth matrix representing high-frequency detail characteristics; and the inter-frame correlation of the video image frame sequence is obtained by representing inter-frame consistency by the nuclear norm of the first matrix and inter-frame difference by the column and the norm of the fourth matrix.
- 6. The method of claim 5, wherein the pre-acquired inter-frame correlation of the live face is a column and norm threshold representing a distribution rule of inter-frame correlation of high frequency features in a sequence of video images of the live face, and a kernel norm threshold representing a distribution rule of inter-frame correlation of low frequency features in the sequence of video images of the live face, and the detecting whether the face to be detected acquired by the video images is a live face according to a matching relationship between the inter-frame correlation and the pre-acquired inter-frame correlation of the live face comprises: Comparing the core norm of the first matrix with the core norm threshold, and comparing the column sum norm of the fourth matrix with the column sum norm threshold; Determining that the face to be detected acquired in the video image frame sequence is a living face in response to the nuclear norm of the first matrix being smaller than the nuclear norm threshold and the column sum norm of the fourth matrix being greater than or equal to the column sum norm threshold; and determining that the face to be detected acquired in the video image frame sequence is a non-living face in response to the nuclear norm of the first matrix being greater than or equal to the nuclear norm threshold, or the column sum norm of the fourth matrix being less than the column sum norm threshold.
- 7. The method according to claim 6, wherein before detecting whether the face to be detected of the video image acquisition is a living face based on the matching relationship of the inter-frame correlation and a pre-acquired living face inter-frame correlation, the method further comprises: Taking a video image sequence of a living human face as a positive sample, and constructing a sample set comprising a plurality of positive samples; Acquiring a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in each positive sample in the sample set; for each of the positive samples, the following inter-frame correlation acquisition operations are performed: Splicing the high-frequency characteristic components of multi-frame appointed video images in the positive samples into a multi-dimensional high-frequency characteristic component matrix in a mode that each frame of video images corresponds to one-dimensional high-frequency characteristic components, and splicing the low-frequency characteristic components of the multi-frame appointed video images into a multi-dimensional low-frequency characteristic component matrix in a mode that each frame of video images corresponds to one-dimensional low-frequency characteristic components; respectively carrying out low-rank sparse matrix decomposition on the multidimensional high-frequency characteristic component matrix and the multidimensional low-frequency characteristic component matrix to obtain a first matrix representing low-frequency background characteristics and a fourth matrix representing high-frequency detail characteristics; acquiring a nuclear norm of the first matrix and a column and a norm of the fourth matrix as inter-frame correlations of the corresponding positive samples; determining the core norm threshold of the first matrix for characterizing low frequency background features and the column and norm thresholds of the fourth matrix for characterizing high frequency detail features from the inter-frame correlations of all the positive samples in the sample set.
- 8. A device for in-vivo detection of a human face, comprising: a high-low frequency component acquisition module for acquiring a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in a video image frame sequence for performing face living body detection; An inter-frame correlation obtaining module, configured to obtain an inter-frame correlation of the video image frame sequence according to the high-frequency feature component and the low-frequency feature component of the video image, where the inter-frame correlation includes inter-frame consistency and inter-frame difference; The living body detection module is used for detecting whether the face to be detected acquired by the video image is a living body face or not according to the matching relation between the inter-frame correlation and the inter-frame correlation of the living body face acquired in advance; The video image frame sequence comprises at least two frames of video images, and the inter-frame correlation acquisition module comprises a first inter-frame correlation acquisition sub-module; The first inter-frame correlation obtaining sub-module is configured to obtain, according to the high-frequency feature components of at least two adjacent frames of the video images, a difference value between the high-frequency feature components corresponding to corresponding image positions in the at least two adjacent frames of the video images to form a high-frequency frame difference feature of the video image frame sequence, and obtain, according to the low-frequency feature components of the at least two adjacent frames of the video images, an average value of the low-frequency feature components corresponding to corresponding image positions in the at least two adjacent frames of the video images to form a low-frequency balance feature of the video image frame sequence, and perform weighted splicing on the high-frequency frame difference feature and the low-frequency balance feature to obtain inter-frame correlation of the video image frame sequence.
- 9. An electronic device comprising a memory, a processor and program code stored on the memory and executable on the processor, wherein the processor, when executing the program code, implements the method of face biopsy of any one of claims 1 to 7.
- 10. A computer readable storage medium having stored thereon program code, which when executed by a processor, performs the steps of the method of face biopsy of any of claims 1 to 7.
Description
Method and device for detecting human face living body and electronic equipment Technical Field The present application relates to the field of pattern recognition technology, and in particular, to a method and apparatus for detecting a human face in vivo, an electronic device, and a computer readable storage medium. Background The existing living body detection method is mostly based on two-dimensional image features, the traditional living body feature based on the images is low in accuracy, and the ideal effect cannot be achieved for attacks such as video contrast and the like. While the method for detecting the living body face based on the depth features can improve the accuracy of the living body face detection, binocular image acquisition equipment or depth image acquisition equipment is required to be arranged to extract the depth features, and the depth features are complex in calculation and are not suitable for front-end equipment. It can be seen that there is still a need for improvement in the prior art methods for face biopsy applied to head-end equipment. Disclosure of Invention The embodiment of the application provides a method for detecting human face living bodies, which is beneficial to improving the accuracy of human face living body detection. In a first aspect, an embodiment of the present application provides a method for detecting a face in vivo, including: acquiring a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in a video image frame sequence for performing face living body detection; acquiring inter-frame correlation of the video image frame sequence according to the high-frequency characteristic component and the low-frequency characteristic component of the video image, wherein the inter-frame correlation comprises inter-frame consistency and inter-frame difference; And detecting whether the face to be detected acquired by the video image is a living face or not according to the matching relation between the inter-frame correlation and the inter-frame correlation of the living face acquired in advance. In a second aspect, an embodiment of the present application provides a device for detecting a living body of a face, including: a high-low frequency component acquisition module for acquiring a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in a video image frame sequence for performing face living body detection; An inter-frame correlation obtaining module, configured to obtain an inter-frame correlation of the video image frame sequence according to the high-frequency feature component and the low-frequency feature component of the video image, where the inter-frame correlation includes inter-frame consistency and inter-frame difference; And the living body detection module is used for detecting whether the face to be detected acquired by the video image is a living body face or not according to the matching relation between the inter-frame correlation and the inter-frame correlation of the living body face acquired in advance. In a third aspect, the embodiment of the application also discloses an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the method for detecting the human face living body is realized when the processor executes the computer program. In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method for detecting a human face living body disclosed in the embodiments of the present application. The method for detecting the human face living body comprises the steps of obtaining a high-frequency characteristic component and a low-frequency characteristic component of each frame of video image in a video image frame sequence for detecting the human face living body, obtaining the inter-frame correlation of the video image frame sequence according to the high-frequency characteristic component and the low-frequency characteristic component of the video image, and detecting whether the human face to be detected acquired by the video image is the living body human face according to the matching relation between the inter-frame correlation and the pre-obtained inter-frame correlation of the living body human face, so that the accuracy rate of human face living body detection is improved. The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent. Drawings For the purpose of making the objects, technical solutions