A face living body discrimination method, device and system
By controlling the point light source to obtain the position of the reflective point and calculating the face liveness detection threshold M, the problem of false judgment in face recognition in the prior art is solved, and accurate liveness detection is achieved at low cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI TSINGLINK INFORMATION TECH
- Filing Date
- 2022-12-21
- Publication Date
- 2026-06-02
AI Technical Summary
Existing facial recognition technologies have a high false positive rate when faced with attacks such as those from mobile phone screens, photos, and high-definition printed images, making it difficult to accurately determine whether a face is alive.
By acquiring a face image, controlling the on/off state of a point light source, calculating the position of the reflective point, calculating the face liveness detection threshold M using weighted coefficients, comparing it with a preset threshold, and outputting the detection result.
With minimal increase in hardware costs, it can accurately distinguish between real and fake faces, making it suitable for applications where device costs are sensitive and identity recognition errors have no fatal consequences.
Smart Images

Figure CN115798017B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of liveness detection technology, and in particular to a method, apparatus and system for liveness detection of human faces. Background Technology
[0002] In recent years, with the maturity of facial recognition technology, devices such as facial recognition access control tablets have been widely used, greatly improving the convenience of personnel identity verification and passage. However, this has also led to frequent attacks in practical applications using methods such as mobile phone screen images, photos, and high-definition printed images, thereby achieving the purpose of unauthorized passage.
[0003] Many methods have been invented for facial liveness detection. These can be broadly categorized as follows:
[0004] 1) Distinguishing between real faces and various fake faces in acquired visible light images typically employs deep learning methods, training the model using a large amount of image data of both real and fake faces. This method has low hardware costs and is currently the mainstream application; however, in practice, it often produces misclassifications for very high-quality, high-resolution printed images.
[0005] 2) It uses a dual-lens camera system, consisting of a visible light camera and an infrared camera. The images captured by the two cameras are used for identification. Generally speaking, the image of a mobile phone screen under the infrared camera will be significantly different from that of a real human face, so it is effective in preventing mobile phone attacks. However, for high-definition printed images, the probability of misjudgment is still relatively high.
[0006] 3) It uses a depth sensor to perceive the depth information of the target, which is very effective in preventing attacks on mobile phones and printed images. However, due to its high cost, it is generally only used in occasions where identity recognition is critical. Summary of the Invention
[0007] Based on the technical problems existing in the background technology, the present invention proposes a method, device and system for face liveness detection, which can accurately identify attacks such as mobile phone screens, photos, and high-definition printed images, and effectively perform face liveness detection.
[0008] The present invention proposes a method for determining facial liveness, comprising:
[0009] S1: Obtain face image;
[0010] S2: Sequentially control the on / off state of each point light source. During the time period when the point light source is on, obtain the brightest point on the forehead of the detected face image as the corresponding reflective point position.
[0011] S3: The face liveness detection threshold value M is calculated based on the position of the reflective point under different point light sources;
[0012] S4: Perform liveness detection by comparing the face liveness detection threshold M with the preset face liveness threshold, and output the face liveness detection result.
[0013] Furthermore, in step S1: acquiring the face image, the specific steps include:
[0014] Image acquisition;
[0015] A general face detection algorithm based on deep learning is used to detect whether there are human faces in the captured images.
[0016] If so, proceed to step S2;
[0017] If not, continue acquiring images.
[0018] Furthermore, in S2: the on / off state of each point light source is controlled sequentially. During the time period when the point light source is on, the brightest point on the forehead of the detected face image is obtained as the corresponding reflective point position, specifically including:
[0019] Light up any single point light source, find the brightest point on the forehead of the face image as the corresponding reflective point position, record the distance of the brightest point from the midline of the face, and obtain the reflective point positions after multiple point light sources are lit.
[0020] Furthermore, when there are two point light sources, step S2 specifically includes:
[0021] Light up a single point light source for a period of time, find the brightest point on the forehead of the face image and record it as P1, and record the distance L1 from the point to the midline of the face;
[0022] Light up another point light source alone for a period of time, find the brightest point on the forehead of the face image and record it as P2, and record the distance L2 from the midline of the face to this point.
[0023] Furthermore, in step S3: calculating the face liveness detection threshold M based on the reflective point positions under different point light sources specifically includes:
[0024] Calculate the face liveness detection threshold M based on distances L1 and L2;
[0025] The formula for calculating the face liveness detection threshold M is as follows:
[0026]
[0027] Where W is the width of the face in the face image, and α and β are weighting coefficients.
[0028] Further, in step S4: the face liveness detection threshold M is compared with the preset face liveness threshold for liveness detection, and the face liveness detection result is output, specifically including:
[0029] Set a face liveness threshold T1 and a face liveness threshold T2, where T1 < T2;
[0030] When the face liveness detection threshold M is less than the face liveness detection threshold T1, it is judged as a real face;
[0031] When the face liveness detection threshold M is greater than the face liveness detection threshold T2, it is judged as a fake face;
[0032] When the face liveness detection threshold M is between the face liveness detection threshold T1 and the face liveness detection threshold T2, it is judged as uncertain.
[0033] A face liveness detection device includes a camera and point light sources for supplementing the camera. At least two point light sources are set on one side of the camera, and all point light sources are set at the same height as the camera.
[0034] Furthermore, multiple point light sources are symmetrically and equally spaced on both sides of the camera, and each point light source is connected to an independent control switch.
[0035] A face liveness detection system includes an acquisition module, a control illumination module, a calculation module, and a discrimination module;
[0036] The acquisition module is used to acquire face images;
[0037] The control module is used to control the on / off state of each point light source in sequence. During the time period when the point light source is on, the brightest point on the forehead of the detected face image is obtained as the corresponding reflective point position.
[0038] The calculation module is used to calculate the face liveness detection threshold M based on the position of the reflective point under different point light sources;
[0039] The discrimination module is used to perform liveness detection by comparing the face liveness detection threshold M with the preset face liveness threshold, and output the face liveness detection result.
[0040] The advantages of the face liveness detection method, device, and system provided by this invention are as follows: When recognizing a face photo (fake face), the distance from the reflective point to the center line of the camera is A1; when recognizing a real face, the distance is A2. Since the forehead is not flat, the position of the reflected point light source will be significantly closer to the center line, i.e., A2 is significantly closer to the center line. The greater the curvature, the more obvious the tendency to approach. The face liveness detection threshold M calculated based on the reflective point position can reflect whether the current image is a real face image. Therefore, with only a small increase in hardware cost, it can accurately identify attacks such as mobile phone screens, photos, and high-definition printed images. It is suitable for application scenarios where equipment cost is relatively sensitive and identity recognition errors have no fatal consequences. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the method for determining liveness of one's own face.
[0042] Figure 2 A schematic diagram of a face liveness detection device;
[0043] Figure 3 This is a schematic diagram showing the position of the reflective point on a person's face after a point light source is turned on;
[0044] Figure 4 A schematic diagram showing the positions of the reflective points corresponding to the camera and point light source on the plane of the face photo;
[0045] Figure 5 A schematic diagram showing the positions of the reflective points on a real human face corresponding to the camera and point light source.
[0046] Among them, 1-camera, 2-point light source, 3-face tablet, 4-display screen. Detailed Implementation
[0047] The technical solution of the present invention will now be described in detail through specific embodiments. Many specific details are set forth in the following description to provide a thorough understanding of the invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0048] like Figures 1 to 5 As shown, the present invention proposes a method for determining facial liveness, comprising the following steps S1 to S4:
[0049] S1: Obtain a face image, ensuring that the image entering step S2 is a face image;
[0050] Acquire images; use a general face detection algorithm based on deep learning to detect whether there are faces in the acquired images; if there are, proceed to step S2; if not, continue acquiring images.
[0051] S2: Sequentially control the on / off state of each point light source 2. During the time period when the point light source 2 is on, obtain the brightest point on the forehead of the detected face image as the corresponding reflective point position.
[0052] Light up a single point light source 2, find the brightest point on the forehead of the face image as the corresponding reflective point position, record the distance of the brightest point from the midline of the face, and obtain the reflective point position after the point light source 2 is lit.
[0053] Then, another point light source 2 is lit up individually, and the position of the reflective point after the point light source 2 is lit up is obtained in the same way; and so on, the n different positions of the reflective point are obtained when n point light sources 2 are lit up individually. The multiple point light sources 2 are symmetrically and equally spaced on both sides of the camera 1. Each point light source 2 is connected to an independent control switch. The point light sources 2 and the camera 1 are integrated on the face tablet 3, which improves the portability of face liveness detection.
[0054] S3: The face liveness detection threshold value M is calculated based on the position of the reflective point under different point light sources 2;
[0055] S4: Perform liveness detection by comparing the face liveness detection threshold M with the preset face liveness threshold, and output the face liveness detection result.
[0056] According to steps S1 to S4, when recognizing a face photo (fake face), the distance from the reflective point to the center line of camera 1 is A1. When recognizing a real face, the distance from the reflective point to the center line of camera 1 is A2. Since the forehead is not flat, the position of the reflected point light source 2 will be significantly closer to the center line, that is, A2 is significantly closer to the center line. The greater the curvature, the more obvious the tendency to move closer. Figures 3 to 5 As shown, the face liveness detection threshold M calculated based on the position of the reflective point can reflect whether the current image is a real face image. Therefore, with only a small increase in hardware cost, it can accurately identify attacks such as mobile phone screens, photos, and high-definition printed images. It is suitable for application scenarios where equipment cost is relatively sensitive and identity recognition errors have no fatal consequences.
[0057] The following explanation uses the example of two point light sources 2 symmetrically arranged on both sides of camera 1:
[0058] S100: The image acquisition component periodically acquires images and sends them to the face detection component;
[0059] S200: The face detection component uses a general face detection algorithm based on deep learning to detect whether there is a face in the image. If not, proceed to step S00; if there is a face, proceed to step S300.
[0060] S300: Sequentially control the on / off of each point light source 2. During the time period when the point light source 2 is on, obtain the brightest point on the forehead of the detected face image as the corresponding reflective point position.
[0061] like Figure 4 and 5 As shown, the supplementary lighting control component illuminates point light source 2 (D1) alone for a period of time (generally around 100ms), and then turns it off for a period of time (generally around 100ms). When point light source 2 (D1) is turned on, the brightest point on the detected forehead of the face is found and recorded as P1, and the distance of this point from the midline of the face is recorded as L1. Then, a similar operation is performed on point light source 2 (D2) and other point light sources 2 in sequence, and the distance from the brightest point on the forehead to the midline of the face is recorded as L2.
[0062] Aligning the center line of the field of view of camera 1 with the center line of the face ensures that the corresponding center lines are consistent when detecting real and fake faces, thus improving the accuracy of the two final liveness detection comparisons.
[0063] S400: The face liveness detection threshold value M is calculated based on the position of the reflective point under different point light sources 2;
[0064] As shown in Figure 5, when the image shows a real human face (true face), because the forehead is curved, it appears relatively... Figure 4 When dealing with a planar face (fake face) in the photographic image shown, the sum of L1 and L2 is smaller than the sum of L1 and L2 corresponding to a fake face; and the curvature of point P1 is greater than the curvature of point P2, so the ratio of L1 to L2 will be smaller compared to the case of a fake face. Considering these two factors, calculate the value of the face liveness detection threshold M:
[0065]
[0066] Where W is the width of the face in the face image, and α and β are weighting coefficients, which are the optimal values obtained from actual face tablet experiments.
[0067] S500: Performs liveness detection by comparing the face liveness detection threshold M with the preset face liveness threshold, outputs the face liveness detection result, and displays it on the display screen 4.
[0068] Set a face liveness threshold T1 and a face liveness threshold T2, where T1 < T2;
[0069] When the face liveness detection threshold M is less than the face liveness detection threshold T1, it is judged as a real face;
[0070] When the face liveness detection threshold M is greater than the face liveness detection threshold T2, it is judged as a fake face;
[0071] Among them, T1 and T2 are the optimal values obtained from the actual face tablet 3 experiment.
[0072] A face liveness detection device includes a camera 1 and point light sources 2 for supplementing the lighting of the camera 1. At least two point light sources 2 are set on one side of the camera 1. All point light sources 2 are set at the same height as the camera 1. Multiple point light sources 2 are symmetrically and equally spaced on both sides of the camera 1. Each point light source 2 is connected to an independent control switch. At most one point light source 2 is lit at the same time, and the lighting time is about 100ms.
[0073] This identification device can accurately identify attacks such as those targeting mobile phone screens, photos, and high-definition printed images with only a small increase in hardware costs. It is suitable for application scenarios where equipment costs are sensitive and identity recognition errors do not have fatal consequences.
[0074] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for determining facial liveness, characterized in that, include: S1: Obtain face image; S2: Sequentially control the opening / closing of each point light source (2). During the time period when the point light source (2) is turned on, obtain the brightest point on the forehead of the detected face image as the corresponding reflective point position. S3: The face liveness detection threshold M is calculated based on the position of the reflective point under different point light sources (2); S4: Perform liveness detection by comparing the face liveness detection threshold M with the preset face liveness threshold, and output the face liveness detection result; When there are two point light sources (2), step S2 specifically includes: Light up a single point light source (2) for a period of time, find the brightest point on the forehead of the face image and record it as P1, and record the distance L1 from the midline of the face to the point; Light up another point light source (2) for a period of time, find the brightest point on the forehead of the face image and record it as P2, and record the distance L2 from the midline of the face to the point; In step S3, the face liveness detection threshold value M is calculated based on distances L1 and L2. The formula for calculating the face liveness detection threshold M is as follows: Where W is the width of the face in the face image, and α and β are weighting coefficients, the values of which are obtained from actual experiments.
2. The face liveness detection method according to claim 1, characterized in that, Step S1: Acquiring the face image specifically includes: Image acquisition; A general face detection algorithm based on deep learning is used to detect whether there are human faces in the captured images. If so, proceed to step S2; If not, continue acquiring images.
3. The face liveness detection method according to claim 1, characterized in that, In S2: Sequentially control the on / off state of each point light source (2). During the time period when the point light source (2) is on, obtain the brightest point on the forehead of the detected face image as the corresponding reflective point position, specifically including: Light up any one point light source (2) individually, find the brightest point on the forehead of the face image as the corresponding reflective point position, record the distance of the brightest point from the midline of the face, and obtain the reflective point positions after the multiple point light sources (2) are lit up respectively.
4. The face liveness detection method according to claim 1, characterized in that, Step S4: Perform liveness detection by comparing the face liveness determination threshold M with the preset face liveness threshold, and output the face liveness detection result, which specifically includes: Set a face liveness threshold T1 and a face liveness threshold T2, where T1 < T2, and the values of T1 and T2 are obtained from actual experiments; When the face liveness detection threshold M is less than the face liveness detection threshold T1, it is judged as a real face; When the face liveness detection threshold M is greater than the face liveness detection threshold T2, it is judged as a fake face; When the face liveness detection threshold M is between the face liveness detection threshold T1 and the face liveness detection threshold T2, it is judged as uncertain.
5. A face liveness detection device, characterized in that, The device for performing the method according to any one of claims 1 to 4 includes a camera (1) and point light sources (2) for supplementing the lighting of the camera (1), wherein at least two point light sources (2) are disposed on one side of the camera (1), and all point light sources (2) are disposed at the same height as the camera (1).
6. The face liveness detection device according to claim 5, characterized in that, Multiple point light sources (2) are symmetrically and equally spaced on both sides of the camera (1), and each point light source (2) is connected to an independent control switch.
7. A face liveness detection system, characterized in that, It includes an acquisition module, a lighting control module, a calculation module, and a discrimination module; The acquisition module is used to acquire face images; The control lighting module is used to control the opening / closing of each point light source (2) in sequence. During the time period when the point light source (2) is turned on, the brightest point on the forehead of the detected face image is obtained as the corresponding reflective point position. The calculation module is used to calculate the face liveness detection threshold value M based on the position of the reflective point under different point light sources (2); The discrimination module is used to perform liveness detection by comparing the face liveness detection threshold M with the preset face liveness threshold, and output the face liveness detection result; In the control lighting module, when there are two point light sources (2), step S2 specifically includes: Light up a single point light source (2) for a period of time, find the brightest point on the forehead of the face image and record it as P1, and record the distance L1 from the midline of the face to the point; Light up another point light source (2) for a period of time, find the brightest point on the forehead of the face image and record it as P2, and record the distance L2 from the midline of the face to the point; In the calculation module, the face liveness detection threshold M is calculated based on distances L1 and L2; The formula for calculating the face liveness detection threshold M is as follows: Where W is the width of the face in the face image, and α and β are weighting coefficients, the values of which are obtained from actual experiments.