Unlocking method based on face recognition, smart door lock and readable storage medium
Through three-dimensional image judgment and live image recognition technology of deep face images, the existing face recognition methods are solved, and efficient and low-power face recognition is achieved, which is suitable for smart door lock projects.
Patent Information
- Application Number
- CN202210930316.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2042-08-03
AI Technical Summary
The existing facial recognition methods consume a lot of energy during vibration and facial recognition, and require a large number of facial IDs, which leads to high costs and is difficult to implement in smart door lock projects.
By collecting the deep face images of the target face, using three-dimensional image judgment and live image recognition technology, two-dimensional non-living face attacks and three-dimensional prosthetic attacks are excluded, and only face recognition is performed on live faces, and the smart door lock is controlled to unlock or keep it closed.
It improves the response speed of face recognition, reduces the power consumption of face recognition, and improves the accuracy of face recognition, and is suitable for smart door lock projects.
Smart Images

Figure CN115273288B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of face recognition technology, and in particular to a face recognition-based unlocking method, a smart door lock and a readable storage medium. Background Art
[0002] Since the prosthetic attacks on door locks are mostly low-cost attacks using photos, paper, and electronic screens, the existing face recognition methods simultaneously input color face images, infrared face images, and depth images during liveness detection and face recognition, which has the problem of high energy consumption. In addition, the existing face recognition algorithms require a large number of face IDs, which have reached a scale of more than one million. However, in actual smart door lock projects, it is too costly and impractical to collect color face images, infrared face images, and depth images of faces with millions of IDs. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems in the related art to a certain extent. To this end, one purpose of the present invention is to propose a method for unlocking based on face recognition, which makes full use of the information of the depth map, improves the response speed of face recognition, reduces the power consumption of face recognition, and also has the advantage of high face recognition accuracy.
[0004] The second object of the present invention is to provide a smart door lock.
[0005] A third object of the present invention is to provide a computer-readable storage medium.
[0006] To achieve the above-mentioned objectives, an embodiment of the first aspect of the present invention proposes an unlocking method based on face recognition, the unlocking method comprising: collecting a facial image of a target face, the facial image comprising a depth face image; performing three-dimensional image judgment on the facial image based on the depth face image, and determining a facial image that passes the three-dimensional image judgment; performing live image recognition on the facial image that passes the three-dimensional image judgment, and determining a facial image that passes the live image recognition; performing face recognition on the facial image that passes the live image recognition, and if the face recognition passes, controlling the smart door lock to unlock.
[0007] The unlocking method based on face recognition according to the embodiment of the present invention makes full use of the depth information in the face image, excludes two-dimensional non-living face attacks and faces that are obviously different from the faces pre-set in the door lock system, avoids performing liveness recognition and face recognition every time, performs liveness detection on the recognized three-dimensional faces, excludes three-dimensional prosthesis attacks, performs face recognition on the living faces, and controls the smart door lock to unlock or remain closed according to the recognition results, thereby improving the response speed of face recognition, reducing the power consumption of face recognition, and having the advantage of high face recognition accuracy.
[0008] In addition, the unlocking method based on face recognition proposed in the above embodiment of the present invention may also have the following additional technical features:
[0009] According to one embodiment of the present invention, after acquiring the facial image of the target face, it also includes: determining the position information of the target face in the facial image; and obtaining a depth face map corresponding to the target face position information based on the position information of the target face in the facial image and the camera parameters of the structured light device.
[0010] According to one embodiment of the present invention, the three-dimensional image judgment of the facial image based on the depth face map includes: extracting features from the depth face map through a pre-trained depth feature extraction model to obtain a first depth feature; performing a similarity comparison between the first depth feature and preset depth information, and when the similarity value is greater than or equal to the preset depth similarity, judging that the facial image is a three-dimensional image.
[0011] According to one embodiment of the present invention, the facial image includes a color facial image, and determining the position information of a target face in the facial image includes: selecting the target face on the facial image based on the color facial image; and determining the area where the target face is selected as the position information of the target face.
[0012] According to one embodiment of the present invention, before performing live image recognition on a facial image determined by a three-dimensional image, the method also includes: generating an infrared face map of the facial image based on position information of a target face in the facial image; performing face reconstruction on the color face map, the depth face map and the infrared face map of the facial image through a pre-trained three-dimensional face reconstruction model to obtain a first three-dimensional face map of the facial image, and using the first three-dimensional face map as the facial image for live image recognition.
[0013] According to one embodiment of the present invention, before performing live image recognition on a facial image determined by a three-dimensional image, the method further includes: generating an infrared face image of the facial image based on position information of a target face in the facial image; correcting the color face image and the infrared face image of the facial image; inputting the corrected color face image and the infrared face image into a preset face quality assessment model, respectively, to obtain a first quality score of the corrected color face image and a second quality score of the corrected infrared face image; selecting a color face image and an infrared face image whose first quality score and second quality score are both greater than a preset score threshold; performing face reconstruction based on the selected color face image, infrared face image and corresponding depth face image to obtain a second three-dimensional face image, and using the second three-dimensional face image as the facial image for performing live image recognition.
[0014] According to one embodiment of the present invention, performing live image recognition on a facial image determined by a three-dimensional image includes: performing live classification on the facial image determined by the three-dimensional image by a live classifier; and screening out the facial image recognized by the live image based on the live classification result.
[0015] According to one embodiment of the present invention, performing face recognition on a face image recognized through live image recognition includes: extracting face features of the face image; performing similarity comparison between the face features and preset face features; and determining that the face image passes face recognition when the similarity value is greater than or equal to a preset face feature threshold.
[0016] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present invention proposes a smart door lock, which includes: an image acquisition module, which is used to acquire a facial image of a target face, wherein the facial image includes a deep facial image; a facial liveness module, which is used to perform three-dimensional image judgment on the facial image based on the deep facial image, and determine the facial image that passes the three-dimensional image judgment; perform liveness image recognition on the facial image that passes the three-dimensional image judgment, and determine the facial image that passes the liveness image recognition; a facial recognition module, which is used to perform facial recognition on the facial image that passes the liveness image recognition, and if the facial recognition passes, generates an unlocking signal; and a door lock control module, which is used to control the smart door lock to unlock after receiving the unlocking signal.
[0017] According to the control method of the smart door lock according to the embodiment of the present invention, the face category result obtained in the unlocking method based on face recognition is used to control the smart door lock to remain locked or unlocked, thereby reducing the cost and efficiency of face recognition of the smart door lock.
[0018] To achieve the above-mentioned purpose, the third aspect of the present invention proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the unlocking method based on face recognition proposed in the first aspect of the present invention is implemented.
[0019] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a method for unlocking based on face recognition according to an embodiment of the present invention;
[0021] Figure 2 is a flow chart of a method for unlocking based on face recognition according to a specific embodiment of the present invention;
[0022] Figure 3is a flow chart of determining target face position information according to an embodiment of the present invention;
[0023] Figure 4 is a flow chart of generating a three-dimensional face image according to a specific embodiment of the present invention;
[0024] Figure 5 is a flow chart of generating a three-dimensional face image according to another specific embodiment of the present invention;
[0025] Figure 6 Schematic diagram of a smart door lock according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0027] The following will be combined with the instructions attached Figure 1-6 The specific implementation methods of the embodiments of the present invention are described in detail, including the unlocking method based on face recognition, the smart door lock and the readable storage medium.
[0028] Figure 1 FIG. 1 is a flow chart of a method for unlocking a door based on face recognition according to an embodiment of the present invention. Figure 1 As shown, the unlocking method based on face recognition may include steps S1 to S4:
[0029] S1, collect a face image of a target face, where the face image includes a depth face image.
[0030] Specifically, a structured light device can be used to collect a facial image of a target face, wherein the structured light device includes a structured light camera, a structured light receiver, and a structured light transmitter. The structured light camera collects a facial image of the target face, and the depth face map is calculated based on the facial image collected by the structured light camera, using the structured light receiver and the structured light transmitter to obtain the corresponding disparity or depth. The depth face map image contains the depth information of the collected target face.
[0031] In an embodiment of the present invention, Figure 2 As shown, after acquiring the facial image of the target face, the process may further include steps S11 to S12:
[0032] S11, determining the position information of the target face in the face image;
[0033] S12, based on the position information of the target face in the face image and the camera parameters of the structured light device, obtaining a depth face map corresponding to the position information of the target face.
[0034] In order to improve the accuracy of face recognition and reduce the impact of other environmental factors other than the target face in the face image on face recognition, the target face in the face image is located, the position information of the target face in the face image is obtained, and based on the position information of the target face in the face image and the camera parameters of the structured light device, a depth face map corresponding to the target face position information is calculated.
[0035] As a specific example, Figure 3 As shown, the face image includes a color face image, and the step of determining the position information of the target face in the face image may include steps S111 to S112:
[0036] S111, selecting a target face on the face image based on the color face image;
[0037] S112, determining the area of the framed target face as the position information of the target face.
[0038] It should be noted that the structured light camera may include a color structured light camera, wherein the target image captured by the color structured light camera is a color image.
[0039] In order to improve the accuracy of face recognition and reduce the amount of calculation for obtaining the corresponding depth face map based on a color face image, when obtaining the depth face map corresponding to the color face map, an embodiment of the present invention performs face detection and positioning on the face in the color face map when the color face map contains a face, and determines the position information of the target face in the color face map.
[0040] Further specifically, when the position information of the target face in the color face image is determined, the offset of the color structured light camera, the structured light transmitter and the structured light receiver are determined according to the camera parameters of the structured light device, and a depth face image corresponding to the position information of the target face in the color face image is calculated.
[0041] S2, performing three-dimensional image judgment on the face image based on the depth face map, and determining the face image judged by the three-dimensional image.
[0042] The embodiment of the present invention utilizes the depth information in the face image to determine whether the captured target face is a two-dimensional prosthetic attack face or a three-dimensional face, and whether the depth information is very different from the preset depth information of the target face when the target face is a three-dimensional face, so as to exclude obviously impossible face images, improve the response speed of face recognition, and reduce the power consumption of face recognition.
[0043] In an embodiment of the present invention, Figure 2 As shown, the step of performing three-dimensional image judgment on the face image based on the depth face map may include steps S21 to S22:
[0044] S21, extracting features from the deep face image using a pre-trained deep feature extraction model to obtain a first deep feature;
[0045] S22, performing a similarity comparison between the first depth feature and preset depth information, and when the similarity value is greater than or equal to the preset depth similarity, determining that the face image is a three-dimensional image.
[0046] It should be noted that the pre-trained deep feature extraction model is used to extract the deep features of the deep face image to obtain the depth information of the deep face image. The deep face image of the collected target face is input into the pre-trained deep feature extraction model to obtain the depth information of the collected target face, that is, the first deep feature. The first deep feature can be a 128-dimensional deep feature vector.
[0047] More specifically, the first depth feature is compared with the depth information of the face image pre-set in the door lock system of the smart door lock to obtain a similarity value.
[0048] When the similarity value is less than the preset depth similarity, it means that the target face captured by the structured light device is a two-dimensional image or a face that is significantly different from the face image preset in the door lock system. Therefore, after determining that the similarity value is less than the preset depth similarity, live image recognition is no longer performed. It can be seen that by comparing the similarity of the first depth feature with the preset depth information, a large number of non-live face attacks such as flat surfaces (mobile phones, paper, photos, electronic screens) can be rejected, avoiding liveness recognition and face recognition every time, saving power consumption of the algorithm running in the door lock system.
[0049] When the similarity value is greater than or equal to the preset depth similarity, it can be determined that the target face captured by the structured light device is a three-dimensional image, and the similarity is high with the face image preset in the door lock system. Therefore, after determining that the target face captured by the structured light device is a three-dimensional face image, live image recognition can be further performed.
[0050] S3, performing living image recognition on the face image determined by the three-dimensional image, and determining the face image recognized by the living image.
[0051] Specifically, the color face image and the corresponding depth face image can be input into the pre-trained 3D face reconstruction model, and the pre-trained 3D face reconstruction model reconstructs the color face image and the corresponding depth face image to obtain a 3D face based on the color face image and the corresponding depth face image, and performs living image recognition on the 3D face. The obtained 3D face can be a 256-dimensional face feature vector.
[0052] It should be noted that the pre-trained three-dimensional face reconstruction model can perform feature fusion on the input color face image and its corresponding depth face image, or the infrared face image and its corresponding depth face image, or the color face image and its corresponding depth face image and infrared face image to obtain a fused three-dimensional face image.
[0053] In an embodiment of the present invention, Figure 4 As shown, before performing living body image recognition on the face image determined by the three-dimensional image, steps S51 to S52 may also be included:
[0054] S51, generating an infrared face map of the face image based on the position information of the target face in the face image;
[0055] S52, reconstructing the color face image, the depth face image and the infrared face image of the face image through the pre-trained three-dimensional face reconstruction model to obtain a first three-dimensional face image of the face image, and using the first three-dimensional face image as the face image for living image recognition.
[0056] Specifically, the structured light camera may include an infrared structured light camera, wherein the target image captured by the infrared structured light camera is an infrared image. In order to obtain an infrared face image of the target face, the position information of the target face in the infrared image is determined according to the position information of the target face in the color face image, and an infrared face image corresponding to the color face image is generated.
[0057] More specifically, the color face image and the corresponding infrared face image and the depth face image are input into the pre-trained three-dimensional face reconstruction model, and the pre-trained three-dimensional face reconstruction model performs face reconstruction based on the color face image and the corresponding infrared face image and the depth face image, and obtains a first three-dimensional face image based on the color face image and the corresponding infrared face image and the depth face image, and performs live image recognition on the first three-dimensional face image of the face image, which can improve the recognition accuracy of live recognition. The first three-dimensional face image obtained can be a 512-dimensional face feature vector.
[0058] In an embodiment of the present invention, Figure 5 As shown, before performing living body image recognition on the face image determined by the three-dimensional image, steps S61 to S65 may also be included:
[0059] S61, generating an infrared face map of the face image based on the position information of the target face in the face image;
[0060] S62, correcting the color face image and the infrared face image of the face image;
[0061] S63, inputting the corrected color face image and the infrared face image into a preset face quality assessment model respectively, to obtain a first quality score of the corrected color face image and a second quality score of the corrected infrared face image;
[0062] S64, selecting color face images and infrared face images whose first quality scores and second quality scores are both greater than a preset score threshold;
[0063] S65, performing face reconstruction based on the selected color face image, infrared face image and corresponding depth face image to obtain a second three-dimensional face image, and using the second three-dimensional face image as a face image for living body image recognition.
[0064] Specifically, before performing live image recognition, the color face image and the infrared face image are corrected and the quality is evaluated to reject the collected face images of the target face with poor quality. This improves the face recognition accuracy while saving the power consumption of the algorithm running in the door lock system.
[0065] Specifically, the position information of the target face in the color face image is first determined. When the position information of the target face in the color face image is determined, the offsets of the color structured light camera, the infrared structured light camera, the structured light transmitter, and the structured light receiver are determined according to the camera parameters of the structured light device, and the infrared face image corresponding to the color face image is calculated and generated.
[0066] Input the color face image into the preset face key point recognition model to obtain the face key point coordinates of the color face image. Calculate the affine matrix using the face key point coordinates of the color face image and the face key point coordinates of the standard frontal face. According to the affine matrix, perform affine transformation on the color face images with different rotation angles and sizes, and correct them to the standard color face images of the same size and rotation angle of 0 (corrected color face images). The correction of infrared face images is the same as that of color face images, which will not be repeated here.
[0067] The corrected color face image and the corrected infrared face image are respectively input into a preset face quality assessment model to obtain a first quality score of the corrected color face image and a second quality score of the corrected infrared face image. The first quality score and the second quality score are compared with a preset score threshold, and the color face image and the infrared face image whose first quality score and the second quality score are both greater than the preset score threshold are selected. The selected color face image, infrared face image and the corresponding depth face image are reconstructed to obtain a second three-dimensional face image, and the second three-dimensional face image is used for liveness recognition. The second three-dimensional face image obtained can be a 512-dimensional face feature vector.
[0068] It should be noted that the evaluation category of the face quality evaluation model in the embodiment of the present invention includes at least one of evaluating face angle, evaluating face occlusion area, evaluating face image pixel blur, and evaluating face image exposure. According to the quality requirements for color images, corresponding evaluation categories can be set, and corresponding thresholds can be set according to corresponding evaluation categories, such as the threshold for evaluating face angle, the threshold for evaluating face occlusion area, the threshold for evaluating face image pixel blur, and the threshold for evaluating face image exposure, so as to obtain a color image that meets the quality requirements.
[0069] In an embodiment of the present invention, Figure 2 As shown, the step of performing living image recognition on the face image determined by the three-dimensional image may include steps S31 to S32:
[0070] S31, performing liveness classification on the face image determined by the three-dimensional image using a liveness classifier;
[0071] S32, filtering out the face images recognized through living body image recognition based on the living body classification result.
[0072] Specifically, a face image determined to be a three-dimensional image is input into a liveness classifier, and the liveness classifier determines whether the input face image is a liveness classification result or a prosthesis classification result. Face images that pass liveness image recognition are screened out to exclude three-dimensional prosthesis attacks. Face recognition is no longer performed on face images that are determined to be three-dimensional prosthesis attacks, and face recognition is only performed on face images that are liveness classification results, further saving power consumption of the algorithm running in the door lock system.
[0073] S4, performing face recognition on the face image through live image recognition, and if the face recognition passes, controlling the smart door lock to unlock.
[0074] Specifically, face recognition is performed on the face image recognized by the living body image to determine whether the face image recognized by the living body image is a target face image pre-set in the door lock system. When the three-dimensional face image belonging to the living body classification result is the pre-set target face image, the smart door lock is controlled to unlock.
[0075] In an embodiment of the present invention, Figure 2 As shown, the step of performing face recognition on the face image through living body image recognition may include steps S41 to S43:
[0076] S41, extracting facial features of the facial image;
[0077] S42, comparing the facial features with the preset facial features for similarity;
[0078] S43, when the similarity value is greater than or equal to a preset facial feature threshold, it is determined that the facial image passes the facial recognition.
[0079] Specifically, extract the facial features of the face image through live image recognition, compare the facial features with the preset facial features for similarity, and compare the obtained similarity with the preset facial feature threshold. When the obtained similarity is less than the preset facial feature threshold, it means that the collected target face is not in the pre-stored faces in the door lock system, and the smart door lock is controlled to remain closed. When the obtained similarity is greater than or equal to the preset facial feature threshold, it means that the collected target face is in the pre-stored faces in the door lock system, and the smart door lock can be controlled to unlock.
[0080] The inventor tested the above-mentioned unlocking method based on face recognition. When the target face collected is a two-dimensional plane prosthetic face, face recognition only takes 10ms (milliseconds). When the target face collected is a target face pre-set in the door lock system, face recognition takes less than 50ms. When dealing with plane prosthetic attacks and most strangers, the energy consumption of the face recognition algorithm can be reduced to less than one-fifth of the traditional algorithm process. After the face recognition algorithm integrates depth and infrared information, the accuracy is improved compared to the single RGB recognition model.
[0081] It should be noted that the door lock has a special acquisition device (such as a structured light camera) for collecting target facial images. The door lock does not have the computing power to dynamically train the facial recognition model. The facial recognition model is updated to the door lock after training and optimization in the background. After the facial recognition model is deployed to the door lock, the neural network weights of the deep feature extraction module are fixed to maintain the deep feature extraction module's ability to extract similar features of three-dimensional facial shapes. The recognizable faces in the door lock system are not fixed, and the number of registered faces and users can be dynamically added.
[0082] The face recognition model of the embodiment of the present invention converts the face image into a 256 / 512-dimensional face feature vector. During the training phase, the face recognition model predicts that the feature vectors of different images of the same person have high similarity, while the feature vectors of face images of different people have low similarity. The face recognition model can learn the distinguishing information between people, and changing a group of faces outside the training set can also ensure the characteristics of high similarity of the faces of the same person and low similarity of the faces of different people.
[0083] The unlocking method based on face recognition in the embodiment of the present invention makes full use of the depth information in the face image, eliminates two-dimensional non-live face attacks and faces that are obviously different from the faces pre-set in the door lock system, avoids performing liveness recognition and face recognition every time, performs live image recognition on face images judged by three-dimensional images, eliminates three-dimensional prosthesis attacks, performs face recognition on face images recognized by live images, and controls the smart door lock to unlock or remain closed according to the recognition result.
[0084] The unlocking method based on face recognition in the embodiment of the present invention improves the response speed of face recognition, reduces the power consumption of face recognition, and has the advantage of high face recognition accuracy.
[0085] On the basis of the above-mentioned unlocking method based on face recognition, the present invention also proposes a smart door lock.
[0086] Figure 6 FIG. 1 is a schematic diagram of a smart door lock according to an embodiment of the present invention. Figure 6 As shown, the smart door lock 100 includes an image acquisition module 10, a face liveness module 20, a face recognition module 30 and a door lock control module 40.
[0087] Among them, the image acquisition module 10 acquires the facial image of the target face, wherein the facial image includes a deep facial image; the facial liveness module 20 performs three-dimensional image judgment on the facial image based on the deep facial image, and determines the facial image that passes the three-dimensional image judgment; performs liveness image recognition on the facial image that passes the three-dimensional image judgment, and determines the facial image that passes the liveness image recognition; the facial recognition module 30 performs facial recognition on the facial image that passes the liveness image recognition, and if the facial recognition passes, generates an unlocking signal; the door lock control module 40 controls the smart door lock to unlock after receiving the unlocking signal.
[0088] It should be noted that for other specific implementations of the smart door lock of the embodiment of the present invention, reference can be made to the specific implementation of the unlocking method based on face recognition in the above-mentioned embodiment of the present invention.
[0089] The smart door lock of the embodiment of the present invention makes full use of the depth information in the face image, eliminates two-dimensional non-live face attacks and faces that are obviously different from the faces pre-set in the door lock system, avoids performing liveness recognition and face recognition every time, performs live image recognition on face images judged by three-dimensional images, eliminates three-dimensional prosthesis attacks, only performs face recognition on face images recognized by live images, and controls the smart door lock to unlock or remain closed according to the recognition result, which improves the response speed of face recognition, reduces the power consumption of face recognition, and has the advantage of high face recognition accuracy.
[0090] The present invention also provides a computer-readable storage medium.
[0091] In this embodiment, a computer program is stored on a computer-readable storage medium. The computer program corresponds to the above-mentioned unlocking method based on face recognition. When the computer program is executed by a processor, the above-mentioned unlocking method based on face recognition is implemented.
[0092] The smart door lock and readable storage medium of the embodiments of the present invention utilize the above-mentioned unlocking method based on face recognition to control the opening and closing of the door lock by face recognition, which can save the power consumption of the face recognition algorithm in the smart door lock, improve the efficiency of face recognition, and reduce the cost of the smart door lock.
[0093] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0094] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0095] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0096] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0097] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0098] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0099] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0100] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for unlocking based on face recognition, characterized in that: The unlocking method comprises: Acquire a facial image of a target face, wherein the facial image includes a depth facial image; Performing three-dimensional image judgment on the face image based on the depth face map, and determining a face image judged by the three-dimensional image; Generate an infrared face image of the face image based on position information of the target face in the face image; Correcting the color face image and the infrared face image of the face image; Inputting the corrected color face image and the infrared face image into a preset face quality assessment model respectively to obtain a first quality score of the corrected color face image and a second quality score of the corrected infrared face image; Selecting color face images and infrared face images whose first quality score and second quality score are both greater than a preset score threshold; Reconstructing the face based on the selected color face image, infrared face image and corresponding depth face image to obtain a second three-dimensional face image, and using the second three-dimensional face image as the face image for living body image recognition; Performing live image recognition on the face image determined by the three-dimensional image to determine the face image recognized by the live image; Perform face recognition on the face image through live image recognition, and if the face recognition passes, control the smart door lock to unlock.
2. The unlocking method based on face recognition according to claim 1, characterized in that: After acquiring the face image of the target face, the method further includes: Determining location information of a target face in the face image; Based on the position information of the target face in the face image and the camera parameters of the structured light device, a depth face map corresponding to the position information of the target face is obtained.
3. The unlocking method based on face recognition according to claim 1, characterized in that: The performing three-dimensional image judgment on the face image based on the depth face image comprises: Extracting features from the deep face image using a pre-trained deep feature extraction model to obtain a first deep feature; The first depth feature is compared with preset depth information for similarity, and when the similarity value is greater than or equal to the preset depth similarity, the face image is determined to be a three-dimensional image.
4. The unlocking method based on face recognition according to claim 2 is characterized in that: The facial image includes a color facial image, and determining the position information of the target face in the facial image includes: Selecting a target face on the face image based on the color face image; The area of the target face is framed and determined as the position information of the target face.
5. The unlocking method based on face recognition according to claim 2 is characterized in that: Before performing living image recognition on the face image determined by the three-dimensional image, the method further includes: Generate an infrared face image of the face image based on position information of the target face in the face image; The color face image, the depth face image and the infrared face image of the face image are reconstructed by using a pre-trained three-dimensional face reconstruction model to obtain a first three-dimensional face image of the face image, and the first three-dimensional face image is used as the face image for the living image recognition.
6. The unlocking method based on face recognition according to claim 5 is characterized in that: The method of performing living image recognition on a face image determined by a three-dimensional image includes: Performing liveness classification on the face image judged by the three-dimensional image by using a liveness classifier; Based on the liveness classification results, face images recognized through liveness images are screened out.
7. The unlocking method based on face recognition according to claim 1, characterized in that: The performing face recognition on the face image through living body image recognition includes: Extracting facial features of the facial image; Comparing the facial features with preset facial features for similarity; When the similarity value is greater than or equal to a preset facial feature threshold, it is determined that the facial image passes facial recognition.
8. A smart door lock, characterized in that: The smart door lock comprises: An image acquisition module, used to acquire a facial image of a target face, wherein the facial image includes a depth facial image; A face liveness module, performing three-dimensional image judgment on the face image based on the depth face map to determine the face image judged by the three-dimensional image; performing liveness image recognition on the face image judged by the three-dimensional image to determine the face image recognized by the liveness image; generating an infrared face map of the face image based on the position information of the target face in the face image; correcting the color face map and the infrared face map of the face image; inputting the corrected color face map and the infrared face map into a preset face quality assessment model respectively to obtain a first quality score of the corrected color face map and a second quality score of the corrected infrared face map; selecting a color face map and an infrared face map whose first quality score and the second quality score are both greater than a preset score threshold; performing face reconstruction based on the selected color face map, infrared face map and corresponding depth face map to obtain a second three-dimensional face map, and using the second three-dimensional face map as the face image for the liveness image recognition; A face recognition module, used to perform face recognition on the face image obtained through the living image recognition, and generate an unlocking signal if the face recognition is successful; The door lock control module is used to control the smart door lock to unlock after receiving the unlock signal.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the unlocking method based on face recognition as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Face image preprocessing method and system for living body detection
CN112487921A
Image processing method and device, equipment and storage medium
CN112818874A
Door lock system with 3D face recognition function and use method
CN113313856A