Living face detection method, device, electronic device and storage medium
By combining 3D structured light cameras and deep learning algorithms, using MTCNN network model and face depth images, we can determine whether a face is a real face, which solves the problem that existing face recognition technology is easy to be cracked and improves the accuracy of face detection , ensuring property safety.
Patent Information
- Application Number
- CN202111460378.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-12-02
AI Technical Summary
Existing facial recognition technology is easily cracked by criminals using fake face attacks, resulting in property losses, and the accuracy rates are uneven, making it difficult to effectively protect property safety.
Combining 3D structured light camera and deep learning algorithm, by obtaining face images with structured light encoding and without structured light encoding, the MTCNN network model is used to perform face detection, and the face and 3D structured light camera are judged based on the face depth image. The distance, combined with the results of the living body detection and the standard deviation of the depth map, determine whether the face is a real face, and improve the accuracy of face detection.
Effectively avoid criminals using non-living face cracking face detection equipment, improve the accuracy of face detection, and ensure property safety.
Smart Images

Figure CN114202790B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of face recognition technology, and in particular to a method, device, electronic equipment and storage medium for detecting a living face. Background Art
[0002] With the popularization of artificial intelligence technology, facial recognition has been applied to more and more fields such as facial access control, express lockers, smart door locks and facial payment, bringing great convenience to people's lives.
[0003] However, due to the uneven quality of facial recognition technology on the market, some facial recognition devices have technical loopholes and can be easily cracked by criminals using fake facial attacks, causing losses to people's property.
[0004] Therefore, it is necessary to develop a face recognition method with high accuracy and difficult to crack in order to effectively protect people's property safety.
[0005] This paper proposes a 3D liveness detection method based on deep learning, which uses a 3D structured light camera and a deep learning algorithm to improve the accuracy of face detection. Summary of the invention
[0006] The present invention provides a live face detection method, device, electronic device and storage medium, which combines a 3D structured light camera with a deep learning algorithm to perform live face detection on users, thereby preventing criminals from using non-live faces to crack face detection equipment and improving the accuracy of face detection.
[0007] In a first aspect, the present invention provides a method for detecting a living face, comprising:
[0008] Acquire a facial image with structured light coding and a facial image without structured light coding of a current user to be identified taken by a 3D structured light camera at the same moment, and obtain a facial depth image of the user according to the facial image with structured light coding;
[0009] Inputting the face image without structured light coding into a pre-trained face detection model to perform face detection, thereby obtaining a face detection frame; wherein the face detection model is an MTCNN network model;
[0010] Determining the distance between the face and the 3D structured light camera according to the face depth image of the user, and judging whether the distance between the face and the 3D structured light camera is within a preset threshold range;
[0011] If so, intercepting a face depth submap from the face depth image of the user according to the face detection frame, obtaining a first face liveness detection result and a face depth map standard deviation according to the face depth submap, and obtaining a second face liveness detection result according to the first face liveness detection result and the face depth map standard deviation;
[0012] Repeat the above steps to obtain multiple second face liveness detection results of the user, and determine a final face liveness detection result according to the multiple second face liveness detection results.
[0013] In an optional embodiment, if the distance between the human face and the 3D structured light camera is not within a preset threshold range, the user is reminded to adjust the head position and retake the photo.
[0014] In an optional embodiment, obtaining a first face liveness detection result and a face depth map standard deviation according to the face depth submap, and obtaining a second face liveness detection result according to the first face liveness detection result and the face depth map standard deviation, includes:
[0015] Inputting the face depth sub-map into a pre-trained live face detection model to perform liveness detection to obtain a first face liveness detection result, and calculating a face depth map standard deviation based on the face depth sub-map;
[0016] If the first face liveness detection result is a real face and the standard deviation of the face depth map is greater than a preset standard deviation threshold, the second face liveness detection result is determined to be a real face, otherwise the second face liveness detection result is determined to be a fake face.
[0017] In an optional embodiment, determining a final face liveness detection result according to the plurality of second face liveness detection results includes:
[0018] Determine the number of real faces and the number of fake faces in the plurality of second face liveness detection results;
[0019] Determining whether the number of real faces in the plurality of second face liveness detection results is greater than the number of fake faces;
[0020] If yes, it is determined that the final face liveness detection result is a real person's face.
[0021] In an optional embodiment, the method further includes:
[0022] The final face liveness detection result is sent to the service platform for processing.
[0023] In a second aspect, the present invention provides a living face detection device, comprising:
[0024] The acquisition module is used to acquire the facial image with structured light coding and the facial image without structured light coding of the current user to be identified taken by the 3D structured light camera at the same time, and obtain the facial depth image of the user according to the facial image with structured light coding
[0025] A face detection module, used for inputting the face image without structured light coding into a pre-trained face detection model to perform face detection and obtain a face detection frame; wherein the face detection model is an MTCNN network model;
[0026] A distance judgment module is used to determine the distance between the face and the 3D structured light camera according to the face depth image of the user, and to judge whether the distance between the face and the 3D structured light camera is within a preset threshold range;
[0027] A face liveness detection module is used to intercept a face depth submap from the face depth image of the user according to the face detection frame, obtain a first face liveness detection result and a face depth map standard deviation according to the face depth submap, obtain a second face liveness detection result according to the first face liveness detection result and the face depth map standard deviation, and determine a final face liveness detection result according to the multiple second face liveness detection results.
[0028] In an optional embodiment, the device further includes: a sending module;
[0029] The sending module is used to send the final face liveness detection result to the business platform for processing.
[0030] In a third aspect, the present invention provides an electronic device, comprising: at least one processor and a memory;
[0031] The memory stores computer-executable instructions;
[0032] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the living face detection method described in any one of the first aspects.
[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method for live face detection as described in any one of the first aspects is implemented.
[0034] The present invention provides a method, device, electronic device and storage medium for detecting live faces, which obtain a face image with structured light coding and a face image without structured light coding of a current user to be identified taken by a 3D structured light camera at the same moment, and obtain a face depth image of the user according to the face image with structured light coding; input the face image without structured light coding into a pre-trained face detection model for face detection to obtain a face detection frame; wherein the face detection model is an MTCNN network model; determine the distance between the face and the 3D structured light camera according to the face depth image of the user, and judge whether the distance between the face and the 3D structured light camera is within a preset threshold range; if so, intercept a face depth submap from the face depth image of the user according to the face detection frame, obtain a first face liveness detection result and a face depth map standard deviation according to the face depth submap, and obtain a second face liveness detection result according to the first face liveness detection result and the face depth map standard deviation; repeat the above steps, A plurality of second face liveness detection results of the user are obtained, and a final face liveness detection result is determined according to the plurality of second face liveness detection results. Compared with the prior art, this solution combines a 3D structured light camera with a deep learning algorithm, and further detects whether the face is a live face according to the face depth image on the basis of face detection of the user's ordinary face image, thereby preventing criminals from using non-live faces to crack face detection equipment and improving the accuracy of face detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 A schematic diagram of a flow chart of a living face detection method provided in the first embodiment of the present disclosure;
[0037] Figure 2 A schematic diagram of a flow chart of another method for detecting living faces provided in the first embodiment of the present disclosure;
[0038] Figure 3 A schematic diagram of the structure of a living face detection device provided in Embodiment 2 of the present disclosure;
[0039] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present disclosure. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] Embodiment 1
[0042] Figure 1 The following is a flow chart of a method for detecting a living face provided in the first embodiment of the present disclosure. Figure 1 As shown, a living face detection method provided by an embodiment of the present disclosure includes:
[0043] S101, obtaining a facial image with structured light coding and a facial image without structured light coding of a current user to be identified taken by a 3D structured light camera at the same moment, and obtaining a facial depth image of the user according to the facial image with structured light coding.
[0044] Among them, the 3D structured light camera includes a structured light projection device, a digital camera and a computer processing system.
[0045] In this embodiment, a stripe grating is emitted by a grating generator and projected onto the face of a user to be identified, which is then photographed by a digital camera to obtain a face image with structured light coding. The digital camera directly photographs the face of the user to be identified to obtain a face image without structured light coding. The structure of the projected stripe grating changes in different depth areas of the face. The phase demodulation unit converts this structural change into depth information to obtain a face depth image.
[0046] S102. Input the face image without structured light coding into a pre-trained face detection model to perform face detection to obtain a face detection frame; wherein the face detection model is an MTCNN network model.
[0047] In this embodiment, the face in the face image without structured light coding can be detected by the pre-trained MTCNN network model, the position of the face in the face image can be determined, and the face in the face image can be identified using a face detection frame.
[0048] S103: determining the distance between the face of the user and the 3D structured light camera according to the face depth image of the user, and judging whether the distance between the face of the user and the 3D structured light camera is within a preset threshold range.
[0049] In this embodiment, since the distance between the face and the camera will affect the accuracy of face detection, and the user's face depth image contains the distance information between the face and the 3D structured light camera, the user's face depth image can be solved to determine the distance between the face and the 3D structured light camera. When the distance between the face and the 3D structured light camera is within a preset threshold range, it is further determined whether the detected face is a living face. Otherwise, the user is reminded to adjust the head position and re-shoot the user's face image with structured light coding and the face image without structured light coding at the same time.
[0050] S104. If yes, a face depth sub-map is captured from the face depth image of the user according to the face detection frame, a first face liveness detection result and a face depth map standard deviation are obtained according to the face depth sub-map, and a second face liveness detection result is obtained according to the first face liveness detection result and the face depth map standard deviation.
[0051] In this embodiment, since the face depth image contains background depth information in addition to face depth information, the face image area surrounded by the face detection frame can be cut out from the face depth image according to the face detection frame information to obtain a face depth sub-map, and the face depth sub-map can be detected and analyzed to determine whether the face structure is a real face, and a first face liveness detection result is obtained. The face depth map standard deviation is calculated according to the face depth sub-map. The face depth map standard deviation can reflect the degree of discreteness between the image pixel value and the mean. The larger the face depth map standard deviation, the better the quality of the face depth sub-map (indicating clear image edges), and the more likely it is a real face image. According to the preset judgment rule, combined with the first face liveness detection result and the face depth map standard deviation, it is further determined whether the face structure is a real face, and a second face liveness detection result is obtained.
[0052] In a possible implementation, step S104 specifically includes: intercepting a face depth submap from the face depth image of the user according to the face detection frame; inputting the face depth submap into a pre-trained liveness face detection model for liveness detection to obtain a first face liveness detection result, and calculating the face depth map standard deviation according to the face depth submap; if the first face liveness detection result is a real face and the face depth map standard deviation is greater than a preset standard deviation threshold, determining that the second face liveness detection result is a real face, otherwise determining that the second face liveness detection result is a false face.
[0053] S105. Repeat the above steps to obtain multiple second face liveness detection results of the user, and determine a final face liveness detection result according to the multiple second face liveness detection results.
[0054] In this embodiment, since a single live face detection may have the problem of false detection, face images with structured light coding and face images without structured light coding of the user to be identified at the same moment may be obtained multiple times for live face detection, and multiple second face liveness detection results may be obtained. The final face liveness detection result may be determined based on the number of real faces and fake faces in the multiple second face liveness detection results, thereby determining whether the user's face is a live face.
[0055] In a possible implementation, determining the final face liveness detection result based on the multiple second face liveness detection results in step S105 specifically includes: determining the number of real faces and the number of fake faces in the multiple second face liveness detection results; judging whether the number of real faces in the multiple second face liveness detection results is greater than the number of fake faces; if so, determining that the final face liveness detection result is a real face.
[0056] The present embodiment provides a method for detecting a living face, which obtains a face image with structured light coding and a face image without structured light coding of a current user to be identified, taken by a 3D structured light camera, and obtains a face depth image of the user according to the face image with structured light coding; inputs the face image without structured light coding into a pre-trained face detection model for face detection to obtain a face detection frame; wherein the face detection model is an MTCNN network model; and determines the distance between the face and the 3D structured light camera according to the face depth image of the user. , and determine whether the distance between the face and the 3D structured light camera is within a preset threshold range; if so, intercept a face depth sub-map from the face depth image of the user according to the face detection frame, obtain a first face liveness detection result and a face depth map standard deviation according to the face depth sub-map, and obtain a second face liveness detection result according to the first face liveness detection result and the face depth map standard deviation; repeat the above steps to obtain multiple second face liveness detection results of the user, and determine the final face liveness detection result according to the multiple second face liveness detection results. By adopting the technical solution provided by the present disclosure, whether the face is a live face can be further detected on the basis of face detection, so as to prevent criminals from using non-live faces to crack face detection equipment and improve the accuracy of face detection.
[0057] After obtaining the face liveness detection result, it can be determined whether there are any criminals who maliciously crack the face detection device according to the face liveness detection result. Based on the above embodiment, Figure 2 A flowchart of another method for detecting living faces provided in the first embodiment of the present disclosure, wherein the method further includes:
[0058] S106: Send the final face liveness detection result to the business platform for processing.
[0059] In this embodiment, the final face liveness detection result can be sent to the business platform in real time via the network, so that the business platform can promptly verify the authenticity of the user's identity based on the final face liveness detection result and issue a warning message to prevent criminals from using non-live faces to crack the face detection device.
[0060] The following specific examples are proposed in combination with the above embodiments. It can be understood that the following specific examples are only illustrative of the specific implementation of the above embodiments, and are not intended to limit the technical solutions of the above embodiments.
[0061] In the following specific example, a face image with structured light coding and a face image without structured light coding of a user at the current moment taken by a 3D structured light camera are obtained, the face image with structured light coding is converted into a face depth image through a phase demodulation unit, the face in the face image without structured light coding is detected through a pre-trained MTCNN network model to obtain a face detection frame, and the face depth image of the user is solved to determine that the distance between the face and the 3D structured light camera is 1.3m. Since the preset threshold range is 0.5m to 2m, the distance between the face and the 3D structured light camera is 1.3m. A preset threshold range is preset, then a face depth sub-map is intercepted from the face depth image of the user according to the face detection frame information, and the face depth sub-map is input into the pre-trained live face detection model for liveness detection, and the first face liveness detection result is obtained as a false face. The face depth map standard deviation is calculated according to the face depth sub-map. After judgment, the first face liveness detection result is a false face and the face depth map standard deviation is less than the preset standard deviation threshold, then the second face liveness detection result is determined to be a false face, and the face image with structured light coding and the face image without structured light coding of the user at the same time are obtained 20 times for liveness face detection, and 20 second face liveness detection results are obtained. The number of real faces in the 20 second face liveness detection results is 1 and the number of fake faces is 19, then the final face liveness detection result is determined to be a false face, that is, a non-live face, and the final face liveness detection result is sent to the business platform in real time through the network. The business platform determines that there is a problem with the authenticity of the user's identity and issues a warning message.
[0062] Embodiment 2
[0063] Corresponding to the living face detection method in the above embodiment, Figure 3 This is a schematic diagram of the structure of a live face detection device provided in the second embodiment of the present disclosure. For the sake of convenience, only the parts related to the embodiment of the present disclosure are shown. Figure 3, the living face detection device comprises:
[0064] The acquisition module 31 is used to acquire the facial image with structured light coding and the facial image without structured light coding of the current user to be identified taken by the 3D structured light camera at the same time, and obtain the facial depth image of the user according to the facial image with structured light coding
[0065] A face detection module 32 is used to input the face image without structured light coding into a pre-trained face detection model to perform face detection and obtain a face detection frame; wherein the face detection model is an MTCNN network model;
[0066] A distance determination module 33 is used to determine the distance between the face and the 3D structured light camera according to the face depth image of the user, and to determine whether the distance between the face and the 3D structured light camera is within a preset threshold range;
[0067] The face liveness detection module 34 is used to intercept a face depth submap from the face depth image of the user according to the face detection frame, obtain a first face liveness detection result and a face depth map standard deviation according to the face depth submap, obtain a second face liveness detection result according to the first face liveness detection result and the face depth map standard deviation, and determine a final face liveness detection result according to the multiple second face liveness detection results.
[0068] The present embodiment provides a living face detection device, which obtains a face image with structured light coding and a face image without structured light coding of a current user to be identified taken by a 3D structured light camera at the same moment through an acquisition module, and obtains a face depth image of the user according to the face image with structured light coding; inputs the face image without structured light coding into a pre-trained face detection model through a face detection module to perform face detection, and obtains a face detection frame; wherein the face detection model is an MTCNN network model; determines the distance between the face and the 3D structured light camera according to the face depth image of the user through a distance judgment module, and judges whether the distance between the face and the 3D structured light camera is within a preset threshold range; if so, Then, a face liveness detection module is used to intercept a face depth sub-map from the face depth image of the user according to the face detection frame, and a first face liveness detection result and a face depth map standard deviation are obtained according to the face depth sub-map, and a second face liveness detection result is obtained according to the first face liveness detection result and the face depth map standard deviation; the above steps are repeated to obtain multiple second face liveness detection results of the user, and a final face liveness detection result is determined according to the multiple second face liveness detection results by the face liveness detection module. By adopting the technical solution provided by the present disclosure, whether a face is a live face is further detected on the basis of face detection, so as to prevent criminals from using non-live faces to crack face detection equipment and improve the accuracy of face detection.
[0069] Optionally, the face liveness detection module 34 includes a face capture unit 341, a first liveness detection unit 342, an image standard deviation calculation unit 343, a second liveness detection unit 344 and a third liveness detection unit 345;
[0070] The face interception unit 341 is used to intercept a face depth sub-image from the face depth image of the user according to the face detection frame;
[0071] The first liveness detection unit 342 is used to input the face depth sub-map into a pre-trained liveness face detection model to perform liveness detection to obtain a first face liveness detection result;
[0072] The image standard deviation calculation unit 343 is used to obtain the standard deviation of the face depth map according to the face depth sub-map;
[0073] The second liveness detection unit 344 is configured to determine that the second face liveness detection result is a real face if the first face liveness detection result is a real face and the standard deviation of the face depth map is greater than a preset standard deviation threshold, and otherwise determine that the second face liveness detection result is a fake face;
[0074] The third liveness detection unit 345 is used to determine the number of real faces and the number of fake faces in the multiple second face liveness detection results; judge whether the number of real faces in the multiple second face liveness detection results is greater than the number of fake faces; if so, determine that the final face liveness detection result is a real face.
[0075] Optionally, the device further includes: a sending module 35;
[0076] The sending module 35 is used to send the final face liveness detection result to the service platform for processing.
[0077] The above-mentioned product can execute the method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0078] Embodiment 3
[0079] Figure 4 A schematic diagram of the structure of an electronic device provided in the third embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the electronic device 40 of this embodiment may include: a memory 41 and a processor 42.
[0080] A memory 41, used for storing computer programs (such as application programs, functional modules, etc. that implement the above-mentioned living face detection method), computer instructions, etc.;
[0081] The above-mentioned computer programs, computer instructions, etc. may be stored in one or more memories 41 in partitions. And the above-mentioned computer programs, computer instructions, etc. may be called by the processor 42.
[0082] The processor 42 is used to execute the computer program stored in the memory 41 to implement the various steps in the method involved in the above embodiment.
[0083] For details, please refer to the relevant description in the previous method embodiment.
[0084] The memory 41 and the processor 42 may be independent structures or integrated structures. When the memory 41 and the processor 42 are independent structures, the memory 41 and the processor 42 may be coupled and connected via a bus 43 .
[0085] An electronic device of this embodiment can execute the technical solution in the method described in Embodiment 1. The specific implementation process and technical principles thereof refer to the relevant description of the method described in Embodiment 1, which will not be repeated here.
[0086] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When at least one processor of a user device executes the computer-executable instructions, the user device executes the above-mentioned various possible methods.
[0087] Among them, computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also be present in a communication device as discrete components.
[0088] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0089] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some ports, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present invention may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims of the present invention.
Claims
1. A method for detecting living faces, characterized in that: include: Acquire a facial image with structured light coding and a facial image without structured light coding of a current user to be identified taken by a 3D structured light camera at the same moment, and obtain a facial depth image of the user according to the facial image with structured light coding; Inputting the face image without structured light coding into a pre-trained face detection model to perform face detection, thereby obtaining a face detection frame; wherein the face detection model is an MTCNN network model; Determine the distance between the face and the 3D structured light camera according to the face depth image of the user, and judge whether the distance between the face and the 3D structured light camera is within a preset threshold range; If so, a face depth sub-map is intercepted from the face depth image of the user according to the face detection frame, the face depth sub-map is input into a pre-trained live face detection model for liveness detection to obtain a first face liveness detection result, and a face depth map standard deviation is calculated according to the face depth sub-map. If the first face liveness detection result is a real face and the face depth map standard deviation is greater than a preset standard deviation threshold, the second face liveness detection result is determined to be a real face, otherwise, the second face liveness detection result is determined to be a false face; Repeat the above steps to obtain multiple second face liveness detection results of the user, and determine a final face liveness detection result according to the multiple second face liveness detection results.
2. The method for detecting living faces according to claim 1, characterized in that: If the distance between the face and the 3D structured light camera is not within a preset threshold range, the user is reminded to adjust the head position and retake the photo.
3. The method for detecting living faces according to claim 1, characterized in that: The determining a final face liveness detection result according to the plurality of second face liveness detection results comprises: Determine the number of real faces and the number of fake faces in the plurality of second face liveness detection results; Determining whether the number of real faces in the plurality of second face liveness detection results is greater than the number of fake faces; If yes, it is determined that the final face liveness detection result is a real person's face.
4. The method for detecting living faces according to any one of claims 1 to 3, characterized in that: The method further comprises: The final face liveness detection result is sent to the service platform for processing.
5. A living face detection device, characterized in that: The method for executing claim 1 comprises: The acquisition module is used to acquire the facial image with structured light coding and the facial image without structured light coding of the current user to be identified taken by the 3D structured light camera at the same time, and obtain the facial depth image of the user according to the facial image with structured light coding A face detection module, used for inputting the face image without structured light coding into a pre-trained face detection model to perform face detection and obtain a face detection frame; wherein the face detection model is an MTCNN network model; A distance judgment module is used to determine the distance between the face and the 3D structured light camera according to the face depth image of the user, and to judge whether the distance between the face and the 3D structured light camera is within a preset threshold range; A face liveness detection module is used to intercept a face depth sub-map from the face depth image of the user according to the face detection frame, input the face depth sub-map into a pre-trained liveness face detection model for liveness detection to obtain a first face liveness detection result, and calculate the face depth map standard deviation according to the face depth sub-map; if the first face liveness detection result is a real face and the face depth map standard deviation is greater than a preset standard deviation threshold, then determine that the second face liveness detection result is a real face, otherwise determine that the second face liveness detection result is a false face.
6. The living face detection device according to claim 5, characterized in that: The device also includes: a sending module; The sending module is used to send the final face liveness detection result to the business platform for processing.
7. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the living face detection method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the living face detection method according to any one of claims 1 to 4 is implemented.
