Face recognition method, device, smart door lock and computer-readable storage medium
By dynamically updating the face feature set, the accuracy and response speed problems of smart door lock face recognition when faces and lighting changes are solved, achieving more efficient face recognition verification and improving user experience.
Patent Information
- Application Number
- CN202210191440.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-02-28
AI Technical Summary
Existing smart door lock face recognition methods lead to a decrease in face recognition accuracy and response speed when faces and lighting conditions change, affecting user experience.
By dynamically updating the preset facial feature set, the facial features of the face image to be recognized are extracted and matched with the preset facial features for verification, and the preset facial feature set is updated when specific conditions are met.
It improves the accuracy and response speed of face recognition and improves consumer user experience.
Smart Images

Figure CN114550266B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of face recognition technology, and in particular to a face recognition method, device, smart door lock and computer-readable storage medium. Background Art
[0002] Existing smart door lock face recognition methods usually use the first face entry data as a benchmark, and verify face recognition by verifying the captured real-time face data with the benchmark data. However, a person's face and the intensity and angle of external light may change over time, directly affecting the captured real-time face data, thereby affecting the accuracy and response speed of face recognition, and reducing consumers' user experience. 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, the first object of the present invention is to provide a face recognition method, which can improve the accuracy and response speed of face recognition and enhance the consumer user experience by dynamically updating a preset face feature set and matching and verifying the extracted face features with the updated preset face feature set.
[0004] The second objective of the present invention is to provide a face recognition device.
[0005] The third object of the present invention is to provide a smart door lock.
[0006] A fourth object of the present invention is to provide a computer-readable storage medium.
[0007] To achieve the above-mentioned purpose, the first aspect of the present invention proposes a face recognition method, which includes: extracting facial features of a face image to be recognized; matching the facial features with at least one recorded facial feature in a preset facial feature set to obtain a face verification result, wherein the preset facial feature set includes at least one recorded facial feature; determining that the facial feature verification passes and meets the preset facial feature update conditions, then updating the preset facial feature set according to the facial features.
[0008] According to the face recognition method of the embodiment of the present invention, the face features of the face image to be recognized are extracted, and the face features are matched with at least one recorded face feature in the preset face feature set to obtain a face verification result. When it is determined that the face feature verification passes and the preset face feature update condition is met, the preset face feature set is updated according to the face features. Thus, by dynamically updating the preset face feature set and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be enhanced.
[0009] According to one embodiment of the present invention, the method further includes: acquiring facial images at different facial angles to obtain at least one facial image to be identified; and / or acquiring facial images under different lighting intensity conditions to obtain at least one facial image to be identified.
[0010] According to one embodiment of the present invention, the preset facial feature update condition includes any one of the following conditions: the non-updated time length of the preset facial feature set reaches a first preset time length; the number of facial recognition times reaches a first preset number; a facial feature set update instruction is received; the time corresponding to this facial recognition is within a preset time interval.
[0011] According to one embodiment of the present invention, updating a preset facial feature set based on facial features includes: determining facial features of each facial image to be identified when facial verification fails before facial feature verification passes; matching each facial feature with at least one recorded facial feature in the preset facial feature set to determine facial features whose similarity is higher than a first preset similarity threshold; integrating facial features whose similarity is higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set and updating them to the preset facial feature set.
[0012] According to one embodiment of the present invention, facial features with a similarity higher than a first preset similarity threshold and at least one recorded facial feature in a preset facial feature set are integrated and updated to the preset facial feature set, including: performing feature fusion on the facial features with a similarity higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set to obtain a first fused feature, and updating at least one recorded facial feature based on the first fused feature; or, generating a first feature group based on the facial features with a similarity higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set, and updating at least one recorded facial feature based on the first feature group.
[0013] According to one embodiment of the present invention, before the facial features with a similarity higher than a first preset similarity threshold and at least one recorded facial feature in the preset facial feature set are integrated and updated to the preset facial feature set, the method also includes: displaying the facial image to be identified corresponding to the facial features with a similarity higher than the first preset similarity threshold, and receiving the facial image to be identified selected by a user; and updating the preset facial feature set according to the facial features of the facial image to be identified selected by the user.
[0014] According to one embodiment of the present invention, before determining the facial features of each facial image to be identified when face verification fails before facial feature verification passes, the method also includes: if the number of facial images to be identified when face verification fails is lower than a preset number threshold, determining the facial features of the facial images to be identified when face verification succeeds; and updating the preset facial feature set according to the facial features of the facial images to be identified when face verification succeeds.
[0015] According to one embodiment of the present invention, updating a preset facial feature set based on facial features of a face image to be identified when face verification is successful includes: fusing facial features of the face image to be identified when face verification is successful with at least one recorded facial feature in the preset facial feature set to obtain a second fused feature, and updating at least one recorded facial feature based on the second fused feature; or, generating a second feature group based on facial features of the face image to be identified when face verification is successful and at least one recorded facial feature in the preset facial feature set, and updating at least one recorded facial feature based on the second feature group.
[0016] According to one embodiment of the present invention, facial features are matched with at least one recorded facial feature in a preset facial feature set to obtain a facial verification result, including: if the similarity between the facial features and at least one recorded facial feature in the preset facial feature set is higher than a second preset similarity threshold, then the facial verification is confirmed to be successful; if the similarity between the facial features and at least one recorded facial feature in the preset facial feature set is not higher than the second preset similarity threshold, then the face verification is confirmed to have failed.
[0017] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present invention proposes a face recognition device, which includes: an extraction module, used to extract facial features of a face image to be recognized; a matching module, used to match the facial features with at least one recorded facial feature in a preset facial feature set to obtain a face verification result, the preset facial feature set includes at least one recorded facial feature; an updating module, used to determine that if the facial feature verification passes and meets the preset facial feature update conditions, then update the preset facial feature set according to the facial features.
[0018] According to the face recognition device of the embodiment of the present invention, the face features of the face image to be recognized are extracted by the extraction module, and the face features are matched with at least one recorded face feature in the preset face feature set by the matching module to obtain the face verification result, and the preset face feature set is updated according to the face features when it is determined that the face feature verification passes and the preset face feature update condition is met by the update module. Thus, by dynamically updating the preset face feature set and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be improved.
[0019] To achieve the above-mentioned purpose, a third aspect of the present invention provides a smart door lock, which includes a face recognition device as in the second aspect of the present invention.
[0020] According to the smart door lock of an embodiment of the present invention, through the above-mentioned face recognition device, by dynamically updating the preset face feature set, and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be enhanced.
[0021] To achieve the above-mentioned purpose, the fourth aspect of the present invention proposes a computer-readable storage medium on which a face recognition program is stored. When the face recognition program is executed by a processor, it implements any face recognition method as described in the first aspect of the embodiment.
[0022] According to the computer-readable storage medium of an embodiment of the present invention, through the above-mentioned face recognition method, by dynamically updating the preset face feature set, and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be enhanced.
[0023] 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
[0024] Figure 1 is a flow chart of a face recognition method according to an embodiment of the present invention;
[0025] Figure 2 A flowchart of updating a preset facial feature set according to facial features according to an embodiment of the present invention;
[0026] Figure 3 FIG. 4 is a schematic diagram of the structure of a face recognition device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] 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.
[0028] The following describes the face recognition method, device, smart door lock and computer-readable storage medium proposed in the embodiments of the present invention with reference to the accompanying drawings.
[0029] Figure 1FIG. 1 is a flow chart of a face recognition method according to an embodiment of the present invention. Figure 1 As shown, the face recognition method includes the following steps:
[0030] Step S101, extracting facial features of a facial image to be recognized.
[0031] Specifically, the face image is an image that carries the facial organs of the face, that is, the face image carries the user's facial organs such as eyes, eyebrows, nose, mouth and chin, wherein the face image can be acquired by a smart door lock running the face recognition method provided by this embodiment, or it can be acquired by an external device and sent to the smart door lock running the face recognition method provided by this embodiment, or it can be acquired through a cloud or background server. As a specific example, the face image is acquired by a smart door lock running the face recognition method provided by this embodiment, wherein the smart door lock is connected to an image acquisition device (e.g., a camera, etc.), and the image acquisition device can be installed on the smart door lock, or it can be connected to the smart door lock by wire or wirelessly.
[0032] Furthermore, corresponding facial features are extracted based on the acquired facial image to be identified. The facial features may include feature points of facial contour and key parts, as well as the relative positions and relative distances between feature points. For example, facial features include feature points of key parts such as bare face, eyes, eyebrows, nose, mouth and chin, as well as the relative positions and relative distances between the feature points. Facial features can be extracted based on the facial image to be identified by using a traditional face recognition algorithm, such as a facial feature extraction algorithm based on image segmentation, or can be extracted through a neural network model based on deep learning, such as a trained convolutional neural network, a recurrent neural network model, or a bidirectional recurrent neural network model.
[0033] It should be noted that the facial features of the face image to be identified can be extracted based on single-frame feature extraction or multi-frame feature extraction, wherein single-frame feature extraction is to directly extract feature vectors from the input single-frame face image by the face recognition model, and multi-frame feature extraction is to extract features from the input multi-frame face images by the face recognition model, for example, by extracting features of multiple frames of images separately through a convolutional neural network, and then extracting fused features through a fully connected or LSTM (Long short-term memory, LSTM) module to form facial features, or directly extracting fused features through 3D CNN to form facial features.
[0034] Step S102, matching the facial feature with at least one recorded facial feature in a preset facial feature set to obtain a facial verification result, wherein the preset facial feature set includes at least one recorded facial feature.
[0035] It should be noted that before performing face recognition verification, facial features are first recorded to form a preset facial feature set, and the preset facial feature set includes at least one recorded facial feature, wherein at least one recorded facial feature in the preset facial feature set can be obtained based on at least one facial image to be recognized at the time of recording, that is, in some examples, corresponding facial features can be extracted from at least one facial image to be recognized obtained at the time of recording to form a preset facial feature set.
[0036] Furthermore, obtaining at least one facial image to be identified includes: obtaining facial images at different facial angles to obtain at least one facial image to be identified; and / or obtaining facial images under different lighting intensity conditions to obtain at least one facial image to be identified.
[0037] Specifically, when entering facial features to form a preset facial feature set, it is necessary to obtain at least one facial image to be identified at different facial angles. For example, the user can look up according to the voice prompt to obtain at least one facial image to be identified at this angle, or the user can turn his head right according to the voice prompt to obtain at least one facial image to be identified at this angle. Similarly, at least one facial image to be identified at angles such as lowering the head or turning left can be obtained. When entering facial features in conjunction with voice prompts, the obtained facial image to be identified can also be displayed on the display screen, thereby utilizing the interactive method of voice prompts and video displays to improve the user experience. At the same time, during the facial feature entry process, at least one facial image to be identified under different lighting intensity conditions can also be obtained, such as obtaining at least one facial image to be identified under different lighting intensity conditions such as natural light, lighting, sunny days or cloudy days. It should be noted that in the process of acquiring at least one facial image to be identified, it is possible to acquire only facial images of different facial angles to obtain at least one facial image to be identified, or it is possible to acquire only facial images of different lighting intensity conditions to obtain at least one facial image to be identified, or it is possible to acquire facial images of different facial angles to obtain at least one facial image to be identified and to acquire facial images of different lighting intensity conditions to obtain at least one facial image to be identified at the same time.
[0038] Furthermore, after acquiring at least one facial image to be recognized, feature extraction is performed on each of the at least one facial image to be recognized, and corresponding facial features are extracted. All extracted facial features are recorded in a storage device and used as a set to form a preset facial feature set, and the preset facial feature set includes at least one recorded facial feature. It should be noted that the preset facial feature set may include multiple sets, and different users may form different preset facial feature sets during the facial feature recording process, and each different preset facial feature set includes at least one recorded facial feature.
[0039] During the face recognition and verification process, the facial features of the face image to be recognized extracted in real time are matched with at least one recorded facial feature in a preset facial feature set to obtain a face verification result. It should be noted that the facial features of the face image to be recognized extracted in real time and the preset facial feature set belong to the same user, that is, in some examples, the facial features of the acquired user are matched with at least one recorded facial feature in the preset facial feature set of the user to obtain a face verification result.
[0040] In some embodiments, facial features are matched with at least one recorded facial feature in a preset facial feature set to obtain a facial verification result, including: if the similarity between the facial features and at least one recorded facial feature in the preset facial feature set is higher than a second preset similarity threshold, then the facial verification is confirmed to be successful; if the similarity between the facial features and at least one recorded facial feature in the preset facial feature set is not higher than the second preset similarity threshold, then the facial verification is confirmed to have failed.
[0041] Specifically, the preset facial feature set includes at least one recorded facial feature, and the facial features extracted from the face image to be identified obtained in real time are matched one by one with at least one facial feature recorded in the preset facial feature set. If the similarity between the facial features and at least one recorded facial feature in the preset facial feature set is higher than a second preset similarity threshold, the face verification is confirmed to be successful. That is, in some examples, in the process of matching the facial features with the recorded facial features in the preset facial feature set one by one, if the facial features are matched with the recorded facial features in the preset facial feature set, When the similarity of any facial feature is higher than a second preset similarity threshold, the face verification is confirmed to be successful; on the contrary, if the similarity of the facial feature and at least one recorded facial feature in the preset facial feature set is not higher than the second preset similarity threshold, the face verification is confirmed to have failed. That is, in some examples, in the process of matching the facial feature with at least one recorded facial feature in the preset facial feature set one by one, if the similarity of the facial feature with all the recorded facial features in the preset facial feature set is not higher than the second preset similarity threshold, the face verification is confirmed to have failed.
[0042] Step S103, if it is determined that the facial feature verification is passed and the preset facial feature update condition is met, then the preset facial feature set is updated according to the facial feature.
[0043] Specifically, by presetting facial feature update conditions, when the facial verification is confirmed to be successful and the preset facial feature update conditions are met in the process of matching the facial features with the facial features recorded in the preset facial feature set one by one, the facial features in the preset facial feature set are corrected according to the facial features to update the preset facial feature set, and in the subsequent facial recognition verification process, the facial features acquired in real time are matched with at least one recorded facial feature in the updated preset facial feature set. Since facial features, as biological data, may change with time and environment, by updating the preset facial feature set, the accuracy of facial authentication and recognition can be improved, thereby improving the user experience.
[0044] In some embodiments, the preset facial feature update condition includes any one of the following conditions: the non-updated time length of the preset facial feature set reaches a first preset time length; the number of facial recognitions reaches a first preset number of times; a facial feature set update instruction is received; the time corresponding to this facial recognition is within a preset time interval.
[0045] That is, in some examples, on the premise that facial feature verification is passed, if the preset facial feature set has not been updated for a long time, when the first preset time when the preset facial feature set needs to be updated is reached, the facial features in the preset facial feature set are corrected and updated according to the facial features; on the premise that facial feature verification is passed, if the number of face recognition times reaches a first preset number, the facial features in the preset facial feature set are corrected and updated according to the facial features, where the number of face recognition times can be the number of executions of the face recognition method, or the number of face recognition times for a certain user; after the facial feature verification is passed On the premise that the facial feature verification is passed, if the time corresponding to this face recognition is in the preset time interval, that is, taking into account that the light will change over time, in order to update the facial features of a certain time interval to the preset facial feature set, if the time point of this face recognition is in the preset time period for updating the facial feature set, the facial features in the preset facial feature set are corrected and updated according to the facial features.
[0046] Therefore, by dynamically updating the preset facial feature set and matching and verifying the extracted facial features with the updated preset facial feature set, the accuracy and response speed of facial recognition can be improved, and the consumer user experience can be enhanced.
[0047] Furthermore, in some embodiments, Figure 2 As shown, the above-mentioned updating of the preset face feature set according to the face features includes the following steps:
[0048] Step S201, determining the facial features of each face image to be identified when the face verification fails before the face feature verification passes.
[0049] Specifically, each time face recognition verification is performed, before it is determined that the facial feature verification has passed, the facial features of the image to be identified may be obtained multiple times, and the facial features of each face image to be identified that corresponds to the face feature verification before the facial feature verification is passed are backed up, and when it is determined that the facial feature verification has passed and the preset facial feature update conditions are met, the facial features of each face image to be identified when the backed-up face verification failed are extracted, where the extracted facial features may include key parts such as bare face features, eye features, eyebrow features, nose features, mouth features, and chin features.
[0050] Step S202: Match each facial feature with at least one recorded facial feature in a preset facial feature set to determine a facial feature whose similarity is higher than a first preset similarity threshold.
[0051] Specifically, when the extracted face verification fails, each facial feature is matched one by one with at least one facial feature entered in the preset facial feature set. If the matching similarity is higher than a first preset similarity threshold, it is considered that the facial feature can be used as a valid facial feature for updating the preset facial feature set. If the matching similarity is not higher than the first preset similarity threshold, it means that the similarity between the facial feature and the facial features in the preset facial feature set is too low and cannot be used as a valid facial feature for updating the preset facial feature set.
[0052] Step S203: Integrate the facial features with a similarity higher than a first preset similarity threshold and at least one recorded facial feature in the preset facial feature set, and update the resultant facial features into the preset facial feature set.
[0053] Specifically, after matching each facial feature extracted when face verification fails with at least one facial feature recorded in a preset facial feature set one by one, facial features whose similarity among each facial feature when face verification fails is obtained, the obtained facial features and the recorded facial features in the preset facial feature set are integrated, and the integrated facial features are updated to the preset facial feature set to realize the update of the preset facial feature set, and in the subsequent face recognition and verification process, the facial features obtained in real time are matched with at least one recorded facial feature in the updated preset facial feature set to obtain the face verification result.
[0054] Furthermore, facial features with a similarity higher than a first preset similarity threshold and at least one recorded facial feature in a preset facial feature set are integrated and updated to the preset facial feature set, including: performing feature fusion on the facial features with a similarity higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set to obtain a first fused feature, and updating at least one recorded facial feature based on the first fused feature; or, generating a first feature group based on the facial features with a similarity higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set, and updating at least one recorded facial feature based on the first feature group.
[0055] As a specific example, after obtaining the facial features whose similarity is higher than a first preset similarity threshold among the facial features when face verification fails, the facial features whose similarity is higher than the first preset similarity threshold can be fused with at least one recorded facial feature in the preset facial feature set. It should be noted that feature fusion is a method of fusing multiple single-feature images into a multi-feature image according to a certain feature fusion algorithm. The purpose of feature fusion is to merge the features extracted from the image into a feature that has more discriminative ability than the input feature. Currently commonly used feature fusion methods include simple superposition, serial connection, and weighted fusion based on deep learning features.
[0056] Specifically, at least one recorded facial feature in the preset facial feature set has different facial angles and different light intensities. Before the facial features with a similarity higher than a first preset similarity threshold are feature-fused with at least one recorded facial feature in the preset facial feature set, the facial features with a similarity higher than the first preset similarity threshold need to be classified and divided into multiple facial feature sets at different facial angles and / or different light intensities. The facial features with a similarity higher than the first preset similarity threshold that are divided according to different facial angles and / or different light intensities are feature-fused with the corresponding recorded facial features in the preset facial feature set, that is, the divided facial features with a similarity higher than the first preset similarity threshold are feature-fused with the recorded facial features with the same facial angle and / or the same light intensity in the preset facial feature set. For example, the facial features with a similarity higher than the first preset similarity threshold that are looking up are feature-fused with the recorded facial features with their heads up in the preset facial feature set. The above-mentioned feature fusion is specifically as follows: each facial feature is merged with the facial features with a similarity higher than the first preset similarity threshold that are looking up. The bare face features, eye features, eyebrow features, nose features, mouth features and chin features in the facial features are fused with the bare face features, eye features, eyebrow features, nose features, mouth features and chin features of the corresponding recorded facial features in the preset facial feature set. For example, the bare face features in the extracted facial features of looking up can be fused with the bare face features of the recorded facial features of looking up in the preset facial feature set in a feature weighted fusion manner to form a corresponding fused bare face feature. Similarly, fused eye features, fused eyebrow features, fused nose features, fused mouth features and fused chin features can be obtained. The above fused features together constitute a first fused feature. The formed first fused feature is used to update the recorded facial features under the same facial angle and / or the same light intensity, so as to form an updated preset facial feature set composed of the first fused features. In the subsequent face verification process, the facial features acquired in real time are calculated for similarity with the preset facial feature set that has been updated with at least one first fused feature.
[0057] As another specific example, after obtaining facial features whose similarity is higher than a first preset similarity threshold among the facial features when face verification fails, a first feature group can also be generated based on the facial features whose similarity is higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set. Specifically, before generating the first feature group based on the facial features whose similarity is higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set, the facial features whose similarity is higher than the first preset similarity threshold are classified and divided into multiple facial feature sets under different facial angles and / or different light intensities, and the first feature group is generated based on the facial features whose similarity is higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set. Facial features whose similarities are higher than a first preset similarity threshold divided by different facial angles and / or different light intensities are respectively added to the preset facial feature set to form a facial feature group together with the corresponding recorded facial features in the preset facial feature set, that is, facial features whose similarities are higher than the first preset similarity threshold are added to the preset facial feature set to form a facial feature group together with the recorded facial features with the same facial angle and / or the same light intensity in the preset facial feature set. For example, facial features with a similarity higher than the first preset similarity threshold and looking up are added to the preset facial feature set to form a facial feature group together with the recorded facial features with the same facial angle and / or the same light intensity in the preset facial feature set. The recorded facial features form a facial feature group. The above-mentioned supplementary recording to form a facial feature group is specifically as follows: the bare face features, eye features, eyebrow features, nose features, mouth features and chin features in each facial feature are supplemented to the bare face features, eye features, eyebrow features, nose features, mouth features and chin features of the corresponding recorded facial features in the preset facial feature set to form a bare face feature group, an eye feature group, an eyebrow feature group, a nose feature group, a mouth feature group and a chin feature group. Each feature group together forms a facial feature group. For example, the bare face features of each facial feature of looking up can be supplemented to the preset facial feature set. A set is formed, thereby forming a bare face feature group with the recorded bare face features of looking up in the preset face feature set. Similarly, an eye feature group, an eyebrow feature group, a nose feature group, a mouth feature group and a chin feature group that look up can be formed. The face feature group composed of the above feature groups is the first feature group. The formed first feature group is used to update the recorded face features under the same face angle and the same light intensity to form an updated preset face feature set composed of the first feature group. In the subsequent face verification process, the face features obtained in real time are calculated for similarity with the preset face feature set that has been updated with at least one first feature group.
[0058] Therefore, after obtaining the facial features whose similarity among the facial features is higher than the first preset similarity threshold when face verification fails, the preset facial feature set can be updated by means of a first fused feature formed by feature fusion, or by means of supplementary facial features to form a first feature group, thereby making it easier to implement face recognition verification, improving the accuracy and response speed of face recognition, and enhancing the consumer user experience.
[0059] In some embodiments, before the facial features with a similarity higher than a first preset similarity threshold and at least one recorded facial feature in a preset facial feature set are integrated and updated to the preset facial feature set, the method also includes: displaying the facial image to be identified corresponding to the facial features with a similarity higher than the first preset similarity threshold, and receiving the facial image to be identified selected by a user; and updating the preset facial feature set according to the facial features of the facial image to be identified selected by the user.
[0060] That is, in some examples, before the facial features with a similarity higher than a first preset similarity threshold and at least one recorded facial features in the preset facial feature set are integrated and updated to the preset facial feature set, the facial images to be identified corresponding to the facial features with a similarity higher than the first preset similarity threshold can also be displayed on the display screen for the user to select the facial features corresponding to at least one of the facial images to be identified, and the extracted facial features are updated in the new preset facial feature set by forming a first fused feature through feature fusion or by forming a first feature group through additional facial features. In this way, users can implement customized updates of the preset facial feature set, further improving the user's interactive experience.
[0061] In some embodiments, before determining the facial features of each facial image to be identified when face verification fails before facial feature verification passes, the method also includes: if the number of facial images to be identified when face verification fails is lower than a preset number threshold, determining the facial features of the facial images to be identified when face verification succeeds; and updating the preset facial feature set according to the facial features of the facial images to be identified when face verification succeeds.
[0062] Specifically, each time face recognition verification is performed, before determining that the face feature verification has passed, the face features of the image to be recognized may be obtained multiple times, the number of face verification failures is recorded, and the face features of each face image to be recognized when the face feature verification passes are backed up. When it is determined that the face feature verification has passed and the preset face feature update conditions are met, if the number of face images to be recognized when the face verification fails is lower than the preset number threshold, it means that the current preset face feature set can well implement the face recognition authentication function. At this time, the face features of each face image to be recognized when the face verification succeeds are extracted as valid face features for updating the preset face feature set, and after integrating the extracted face features with at least one recorded face feature in the preset face feature set, they are updated to the preset face feature set. In this way, it can be ensured that when there are too few or no face images to be recognized corresponding to the face verification failure, the preset face feature set can still be updated.
[0063] Furthermore, the preset facial feature set is updated according to the facial features of the facial image to be identified when the facial verification is successful, including: fusing the facial features of the facial image to be identified when the face verification is successful with at least one recorded facial feature in the preset facial feature set to obtain a second fused feature, and updating at least one recorded facial feature according to the second fused feature; or, generating a second feature group according to the facial features of the facial image to be identified when the face verification is successful and at least one recorded facial feature in the preset facial feature set, and updating at least one recorded facial feature according to the second feature group.
[0064] As a specific example, after obtaining the facial features of each face image to be identified when face verification is successful, the facial features of the face image to be identified when face verification is successful can be fused with at least one recorded facial feature in a preset facial feature set to obtain a second fused feature. Specifically, before fusion of the facial features of the face image to be identified when face verification is successful with at least one recorded facial feature in a preset facial feature set to obtain the second fused feature, it is necessary to classify the facial features of each face image to be identified when face verification is successful and divide them into a plurality of different facial angles and / or or a face feature set under different light intensities, the face features of each face image to be identified when the face verification is successful when divided according to different face angles and / or different light intensities are respectively fused with the corresponding recorded face features in the preset face feature set, that is, the face features of each face image to be identified when the divided face verification is successful are fused with the recorded face features with the same face angle and / or the same light intensity in the preset face feature set. For example, the face features of each face image to be identified that looks up when the face verification is successful are fused with the recorded face features with the same face angle and / or the same light intensity in the preset face feature set. The recorded facial features are feature fused. The feature fusion is as follows: the bare face features, eye features, eyebrow features, nose features, mouth features and chin features in each facial feature are feature fused with the bare face features, eye features, eyebrow features, nose features, mouth features and chin features of the recorded facial features in the preset facial feature set. For example, when the extracted face looking up is successfully verified, the bare face features in each facial feature can be fused with the bare face features of the recorded facial features looking up in the preset facial feature set in a feature weighted fusion manner. The facial features of the human face are fused to form corresponding fused bare face features. Similarly, fused eye features, fused eyebrow features, fused nose features, fused mouth features and fused chin features can be obtained. The above fused features together constitute a second fused feature. The formed second fused feature is used to update the recorded facial features under the same facial angle and / or the same light intensity, so as to form an updated preset facial feature set composed of the second fused features. In the subsequent face verification process, the facial features obtained in real time are calculated for similarity with the preset facial feature set that has been updated with at least one second fused feature.
[0065] As another specific example, after acquiring the facial features of each face image to be identified when face verification is successful, a second feature group can be generated based on the facial features of the face image to be identified when face verification is successful and at least one recorded facial feature in a preset facial feature set. Specifically, before generating the second feature group based on the facial features of the face image to be identified when face verification is successful and at least one recorded facial feature in a preset facial feature set, the facial features of each face image to be identified when face verification is successful are classified and divided into a plurality of facial feature sets under different facial angles and / or different light intensities, and the facial features of the face images to be identified under different facial angles and / or different light intensities are classified and divided into a plurality of facial feature sets under different facial angles and / or different light intensities. When the face verification divided by the light intensity is successful, the facial features of each face image to be identified are respectively recorded into the preset face feature set, so as to form a face feature group with the corresponding recorded face features in the preset face feature set, that is, when the divided face verification is successful, the facial features of each face image to be identified are recorded into the preset face feature set, so as to form a face feature group with the recorded face features having the same face angle and / or the same light intensity in the preset face feature set. For example, when the face verification is successful, the facial features of each face image to be identified that looks up are recorded into the preset face feature set, so as to form a face feature group with the recorded face features that looks up in the preset face feature set. The features form a facial feature group. The above-mentioned supplementary recording to form a facial feature group is specifically as follows: the bare face features, eye features, eyebrow features, nose features, mouth features and chin features in each facial feature are respectively supplemented to the bare face features, eye features, eyebrow features, nose features, mouth features and chin features of the corresponding recorded facial features in the preset facial feature set to form a bare face feature group, an eye feature group, an eyebrow feature group, a nose feature group, a mouth feature group and a chin feature group. Each feature group together forms a facial feature group. For example, the bare face features of each facial feature of looking up can be supplemented to the preset facial feature set. Thus, a bare face feature group is formed with the recorded bare face features of the face looking up in the preset facial feature set. Similarly, an eye feature group, an eyebrow feature group, a nose feature group, a mouth feature group and a chin feature group that look up can be formed. The facial feature group composed of the above feature groups is the second feature group. The formed second feature group is used to update the recorded facial features under the same facial angle and the same light intensity, thereby forming an updated preset facial feature set composed of the second feature group. In the subsequent facial verification process, the facial features acquired in real time are calculated for similarity with the preset facial feature set that has been updated with at least one second feature group.
[0066] Therefore, after obtaining the facial features of each facial image to be identified when facial verification is successful, the preset facial feature set can be updated by using a second fusion feature formed by feature fusion, or by supplementing the facial features to form a second feature group, thereby making it easier to achieve facial recognition verification, improving the accuracy and response speed of facial recognition, and enhancing the consumer user experience.
[0067] In summary, according to the face recognition method of the embodiment of the present invention, the face features of the face image to be recognized are extracted, and the face features are matched with at least one recorded face feature in the preset face feature set to obtain the face verification result. When it is determined that the face feature verification passes and the preset face feature update condition is met, the preset face feature set is updated according to the face features. Therefore, by dynamically updating the preset face feature set and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be enhanced.
[0068] Figure 3 FIG. 1 is a schematic diagram of the structure of a face recognition device according to an embodiment of the present invention. Figure 3 As shown, the face recognition device 100 includes: an extraction module 110, a matching module 120 and an update module 130.
[0069] Among them, the extraction module 110 is used to extract facial features of the facial image to be identified; the matching module 120 is used to match the facial features with at least one recorded facial feature in a preset facial feature set to obtain a facial verification result, and the preset facial feature set includes at least one recorded facial feature; the update module 130 is used to determine that if the facial feature verification passes and meets the preset facial feature update conditions, then update the preset facial feature set according to the facial features.
[0070] In some embodiments, the above-mentioned face recognition device also includes: an acquisition module (not specifically shown in the figure), which is used to acquire face images at different face angles to obtain at least one face image to be recognized; and / or, acquire face images under different lighting intensity conditions to obtain at least one face image to be recognized.
[0071] In some embodiments, the preset facial feature update condition includes any one of the following conditions: the non-updated time length of the preset facial feature set reaches a first preset time length; the number of facial recognitions reaches a first preset number of times; a facial feature set update instruction is received; the time corresponding to this facial recognition is within a preset time interval.
[0072] In some embodiments, the update module 130 is specifically used to: determine the facial features of each face image to be identified when the face verification fails before the face feature verification passes; match each facial feature with at least one recorded facial feature in a preset facial feature set to determine a facial feature whose similarity is higher than a first preset similarity threshold; integrate the facial features whose similarity is higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set, and update them to the preset facial feature set.
[0073] In some embodiments, the update module 130 is specifically used to: perform feature fusion on facial features having a similarity higher than a first preset similarity threshold and at least one recorded facial feature in a preset facial feature set to obtain a first fused feature, and update at least one recorded facial feature based on the first fused feature; or, generate a first feature group based on facial features having a similarity higher than a first preset similarity threshold and at least one recorded facial feature in a preset facial feature set, and update at least one recorded facial feature based on the first feature group.
[0074] In some embodiments, the above-mentioned face recognition device also includes: a display module (not specifically shown in the figure), which integrates the facial features with a similarity higher than a first preset similarity threshold and at least one recorded facial feature in the preset facial feature set and updates them to the preset facial feature set. The display module is specifically used to: display the facial image to be identified corresponding to the facial features with a similarity higher than the first preset similarity threshold, and receive the facial image to be identified selected by the user; the update module 130 is also specifically used to: update the preset facial feature set according to the facial features of the facial image to be identified selected by the user.
[0075] In some embodiments, before determining the facial features of each facial image to be identified when face verification fails before the facial feature verification passes, the update module 130 is also specifically used to: determine the facial features of the facial images to be identified when face verification succeeds if the number of facial images to be identified when face verification fails is lower than a preset threshold; and update the preset facial feature set according to the facial features of the facial images to be identified when face verification succeeds.
[0076] In some embodiments, the update module 130 is also specifically used to: perform feature fusion on the facial features of the facial image to be identified when face verification is successful and at least one recorded facial feature in a preset facial feature set to obtain a second fused feature, and update at least one recorded facial feature based on the second fused feature; or, generate a second feature group based on the facial features of the facial image to be identified when face verification is successful and at least one recorded facial feature in a preset facial feature set, and update at least one recorded facial feature based on the second feature group.
[0077] In some embodiments, the matching module 120 is specifically used to: if the similarity between the facial features and at least one recorded facial feature in a preset facial feature set is higher than a second preset similarity threshold, confirm that the facial verification is successful; if the similarity between the facial features and at least one recorded facial feature in the preset facial feature set is not higher than the second preset similarity threshold, confirm that the facial verification has failed.
[0078] It should be noted that for the description of the face recognition device in this application, please refer to the description of the face recognition method in this application, and the details will not be repeated here.
[0079] According to the face recognition device of the embodiment of the present invention, the face features of the face image to be recognized are extracted by the extraction module, and the face features are matched with at least one recorded face feature in the preset face feature set by the matching module to obtain the face verification result, and the preset face feature set is updated according to the face features when it is determined that the face feature verification passes and the preset face feature update condition is met by the update module. Thus, by dynamically updating the preset face feature set and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be improved.
[0080] An embodiment of the present invention further provides a smart door lock, which includes the face recognition device as described above.
[0081] According to the smart door lock of an embodiment of the present invention, through the above-mentioned face recognition device, by dynamically updating the preset face feature set, and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be enhanced.
[0082] An embodiment of the present invention further provides a computer-readable storage medium on which a face recognition program is stored. When the face recognition program is executed by a processor, the face recognition method as described above is implemented.
[0083] According to the computer-readable storage medium of an embodiment of the present invention, through the above-mentioned face recognition method, by dynamically updating the preset face feature set, and matching and verifying the extracted face features with the updated preset face feature set, the accuracy and response speed of face recognition can be improved, and the consumer user experience can be enhanced.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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 face recognition method, characterized in that: The method comprises: Extracting facial features of the face image to be recognized; Matching the facial feature with at least one recorded facial feature in a preset facial feature set to obtain a facial verification result, wherein the preset facial feature set includes at least one recorded facial feature; Determining that the facial feature verification passes and satisfies a preset facial feature update condition, updating the preset facial feature set according to the facial feature; The updating of the preset facial feature set according to the facial feature comprises: Determining facial features of each face image to be identified when the face verification fails before the face feature verification passes; Matching each of the facial features with at least one recorded facial feature in the preset facial feature set to determine a facial feature whose similarity is higher than a first preset similarity threshold; The facial feature with a similarity higher than a first preset similarity threshold and at least one recorded facial feature in the preset facial feature set are integrated and updated to the preset facial feature set.
2. The face recognition method according to claim 1, characterized in that: The method further comprises: Acquire facial images at different facial angles to obtain at least one facial image to be recognized; And / or, facial images under different light intensity conditions are acquired to obtain at least one facial image to be recognized.
3. The face recognition method according to claim 1, characterized in that: The preset facial feature update condition includes any one of the following conditions: The non-updated time length of the preset facial feature set reaches a first preset time length; The number of face recognitions reaches a first preset number; Receiving a facial feature set update instruction; The time corresponding to this face recognition is within the preset time interval.
4. The face recognition method according to claim 1, characterized in that: The step of integrating the facial feature with a similarity higher than a first preset similarity threshold with at least one recorded facial feature in the preset facial feature set and updating the facial feature set to the preset facial feature set includes: Fusing the facial feature whose similarity is higher than a first preset similarity threshold with at least one recorded facial feature in the preset facial feature set to obtain a first fused feature, and updating the at least one recorded facial feature according to the first fused feature; or A first feature group is generated based on the facial features having a similarity higher than a first preset similarity threshold and at least one recorded facial feature in the preset facial feature set, and the at least one recorded facial feature is updated based on the first feature group.
5. The face recognition method according to claim 1, characterized in that: Before the facial feature having a similarity higher than the first preset similarity threshold is integrated with at least one recorded facial feature in the preset facial feature set and updated to the preset facial feature set, the method further comprises: Displaying the facial image to be identified corresponding to the facial features whose similarity is higher than the first preset similarity threshold, and receiving the facial image to be identified selected by the user; The preset facial feature set is updated according to the facial features of the facial image to be recognized selected by the user.
6. The face recognition method according to claim 1, characterized in that: Before determining the facial features of each face image to be identified when the face verification fails before the face feature verification passes, the method further includes: If the number of face images to be identified when face verification fails is lower than a preset number threshold, determining the face features of the face images to be identified when face verification succeeds; The preset face feature set is updated according to the face features of the face image to be identified when the face verification is successful.
7. The face recognition method according to claim 6, characterized in that: The updating of the preset face feature set according to the face features of the face image to be identified when the face verification is successful includes: fusing the facial features of the facial image to be identified when the facial verification is successful with at least one recorded facial feature in the preset facial feature set to obtain a second fused feature, and updating the at least one recorded facial feature according to the second fused feature; or A second feature group is generated based on the facial features of the facial image to be identified when the facial verification is successful and at least one recorded facial feature in the preset facial feature set, and the at least one recorded facial feature is updated based on the second feature group.
8. The face recognition method according to claim 1, characterized in that: The step of matching the facial feature with at least one recorded facial feature in a preset facial feature set to obtain a facial verification result includes: If the similarity between the facial feature and at least one recorded facial feature in the preset facial feature set is higher than a second preset similarity threshold, confirming that the facial verification is successful; If the similarity between the facial feature and at least one recorded facial feature in the preset facial feature set is not higher than the second preset similarity threshold, it is confirmed that the facial verification has failed.
9. A face recognition device, characterized in that: The device comprises: An extraction module, used for extracting facial features of a face image to be identified; A matching module, used to match the facial feature with at least one recorded facial feature in a preset facial feature set to obtain a facial verification result, wherein the preset facial feature set includes at least one recorded facial feature; An updating module, configured to determine that the facial feature verification passes and satisfies a preset facial feature update condition, and then update the preset facial feature set according to the facial feature; The update module is specifically used to: determine the facial features of each face image to be identified when the face verification fails before the face feature verification passes; match each of the facial features with at least one recorded facial feature in the preset facial feature set to determine the facial features whose similarity is higher than a first preset similarity threshold; integrate the facial features whose similarity is higher than the first preset similarity threshold and at least one recorded facial feature in the preset facial feature set, and then update them to the preset facial feature set.
10. A smart door lock, characterized in that: The smart door lock includes the face recognition device as described in claim 9.
11. A computer-readable storage medium, characterized in that: A face recognition program is stored thereon, and when the face recognition program is executed by the processor, the face recognition method according to any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Human face recognition system and method based on face feature dynamic updating
CN111339990A
Human face image dynamic clustering method and device, electronic equipment and storage medium
CN112270290A
Face recognition method and device, storage medium and electronic equipment
CN113837006A
Method for verifying users and updating the data base,and face verification system using thereof
KR1020030083510A
