Face recognition method, device and electronic equipment

By removing or replacing interference features of the face image to be recognized, the target image is generated to reduce interference, and the problem of low accuracy caused by facial movements and ambient light intensity in facial recognition technology is solved, and the accuracy of recognition is improved.

CN112270747BActive Publication Date: 2024-11-05SHENZHEN SENMU PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011248133.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-10
Publication Date
2024-11-05
Estimated Expiration
2040-11-10

AI Technical Summary

Technical Problem

When collecting facial images to be recognized, existing facial recognition technologies are easily interfered by factors such as facial movements and ambient light intensity, resulting in low recognition accuracy.

Method used

By deinterference processing of interference features in the recognized face image, a target image is generated, and facial recognition is performed based on the preset reference face image, and interference features are removed or replaced to reduce the impact on the recognition result. This process includes three-dimensional modeling, deinterference model training and presets of interference features, and generates target images that do not contain the original interference features.

Benefits of technology

It improves the accuracy of facial recognition, reduces the interference of facial movements, postures and ambient light intensity on the recognition results, and enhances the stability of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112270747B_ABST
    Figure CN112270747B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a face recognition method, device and electronic device, which relates to the field of image processing technology, including: obtaining a face image to be recognized; performing interference removal processing on interference features in the face image to be recognized, and obtaining a target image according to the processing result, wherein the interference feature is: a feature in the image that interferes with the facial recognition feature of the user; performing face recognition on the target image based on a preset reference face image, and determining the recognition result as the face recognition result of the face image to be recognized. Applying the solution provided by the embodiment of the present application can improve the accuracy of face recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a face recognition method, device and electronic equipment. Background Art

[0002] In recent years, the application of face recognition technology has become more and more widespread. In the related art, a face image of a user registered is usually obtained in advance as a reference face image. When performing face recognition, a face image of the user to be recognized is obtained as the face image to be recognized, and then the face image to be recognized is compared with the reference face image to realize face recognition of the user. When the comparison result indicates that the face in the face image to be recognized is similar to the face in the reference face image, it can be considered that the user to be recognized and the registered user are the same user.

[0003] Although the above scheme can be used to realize face recognition, when collecting the face image to be recognized, the collected face image is easily disturbed by factors such as the user's facial movements and the light intensity in the environment. Therefore, when comparing the face image to be recognized with the reference face image, the comparison result is easily disturbed, resulting in low accuracy of face recognition. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a face recognition method, device and electronic device to improve the accuracy of face recognition. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a face recognition method, the method comprising:

[0006] Obtaining a face image to be recognized;

[0007] Performing interference removal processing on the interference features in the face image to be recognized, and obtaining a target image according to the processing result, wherein the interference features are features in the image that interfere with the facial recognition features of the user;

[0008] The target image is subjected to face recognition based on a preset reference face image, and a recognition result is determined as a face recognition result of the face image to be recognized.

[0009] In one embodiment of the present application, the step of removing interference features from the face image to be identified and obtaining a target image according to the processing result includes:

[0010] removing interference features from the face image to be identified, and using the image after the interference features are removed as the target image; or

[0011] Removing interference features from the face image to be identified, and adding preset interference features to the image after the interference features are removed to obtain a target image; or

[0012] The facial recognition features of the user in the face image to be recognized are obtained as target features, and a target image is generated using the target features and preset interference features.

[0013] In one embodiment of the present application, the step of obtaining the facial recognition features of the user in the face image to be recognized as the target features includes:

[0014] Based on the face image to be identified, three-dimensional modeling is performed on the face of the user in the face image to be identified to obtain three-dimensional model parameters of the constructed three-dimensional model, and parameters reflecting the user's facial recognition features in the obtained three-dimensional model parameters are determined as target features.

[0015] In one embodiment of the present application, the step of generating a target image using the target feature and a preset interference feature includes:

[0016] Based on the parameters reflecting the user's facial recognition features in the three-dimensional model parameters and the preset interference features, three-dimensional modeling of the face is performed to obtain a three-dimensional face model;

[0017] The obtained 3D face model is rendered into a 2D face image as the target image.

[0018] In one embodiment of the present application, the step of removing interference features from the face image to be identified and obtaining a target image according to the processing result includes:

[0019] The face image to be recognized is input into a pre-trained de-interference model to obtain a target image output by the de-interference model, wherein the de-interference model is a model trained with sample images and used for de-interference processing of images.

[0020] In one embodiment of the present application, the interference removal model is specifically used for:

[0021] Generate an image after removing the interference features of the image itself and adding preset interference features.

[0022] In one embodiment of the present application, the interference removal model is obtained by training in the following manner:

[0023] Obtain a sample image;

[0024] Performing three-dimensional modeling on the face of the user in the sample image to obtain three-dimensional model parameters of the constructed three-dimensional model, selecting parameters reflecting the facial recognition features of the user from the obtained three-dimensional model parameters, and rendering based on the selected parameters to obtain a two-dimensional face image as a labeled image;

[0025] The sample image and the annotated image are used to train the initial model of the interference removal model to obtain a trained interference removal model.

[0026] In one embodiment of the present application, the interference removal model is specifically used for:

[0027] The face is three-dimensionally modeled by using the facial recognition features of the face in the image to obtain a three-dimensional face model, and the obtained three-dimensional face model is rendered into a two-dimensional face image as a generated image.

[0028] In one embodiment of the present application, the preset interference feature is obtained by:

[0029] The reference facial image is obtained, and based on the reference facial image, three-dimensional modeling is performed on the face of the user in the reference facial image to obtain three-dimensional model parameters of the constructed three-dimensional model, and parameters of the obtained three-dimensional model parameters that interfere with the user's facial recognition features are determined as preset interference features.

[0030] In one embodiment of the present application, the interference features in the image include at least one of the following features: features associated with user expression, features associated with user posture, and features associated with the environment when the image is captured.

[0031] In a second aspect, an embodiment of the present application provides a face recognition device, the device comprising:

[0032] An image acquisition module is used to obtain a face image to be recognized;

[0033] An image processing module is used to perform interference removal processing on the interference features in the face image to be recognized, and obtain a target image according to the processing result, wherein the interference features are features in the image that interfere with the facial recognition features of the user;

[0034] The face recognition module is used to perform face recognition on the target image based on a preset reference face image, and determine the recognition result as the face recognition result of the face image to be recognized.

[0035] In one embodiment of the present application, the image processing module is specifically used to:

[0036] removing interference features from the face image to be identified, and using the image after the interference features are removed as the target image; or

[0037] Removing interference features from the face image to be identified, and adding preset interference features to the image after the interference features are removed to obtain a target image; or

[0038] The facial recognition features of the user in the face image to be recognized are obtained as target features, and a target image is generated using the target features and preset interference features.

[0039] In one embodiment of the present application, the image processing module includes:

[0040] A face modeling unit is used to perform three-dimensional modeling on the face of the user in the face image to be recognized based on the face image to be recognized, obtain three-dimensional model parameters of the constructed three-dimensional model, and determine the parameters reflecting the user's facial recognition features in the obtained three-dimensional model parameters as target features;

[0041] An image generating unit is used to generate a target image using the target feature and a preset interference feature.

[0042] In one embodiment of the present application, the image generation unit is specifically used to:

[0043] Based on the parameters reflecting the user's facial recognition features in the three-dimensional model parameters and the preset interference features, three-dimensional modeling of the face is performed to obtain a three-dimensional face model;

[0044] The obtained 3D face model is rendered into a 2D face image as the target image.

[0045] In one embodiment of the present application, the image processing module is specifically used to:

[0046] The face image to be recognized is input into a pre-trained de-interference model to obtain a target image output by the de-interference model, wherein the de-interference model is a model trained with sample images and used for de-interference processing of images.

[0047] In one embodiment of the present application, the interference removal model is specifically used for:

[0048] Generate an image after removing the interference features of the image itself and adding preset interference features.

[0049] In one embodiment of the present application, the device further includes a model training module, which is used to train the interference removal model in the following manner:

[0050] Obtain a sample image;

[0051] Performing three-dimensional modeling on the face of the user in the sample image to obtain three-dimensional model parameters of the constructed three-dimensional model, selecting parameters reflecting the facial recognition features of the user from the obtained three-dimensional model parameters, and rendering based on the selected parameters to obtain a two-dimensional face image as a labeled image;

[0052] The sample image and the annotated image are used to train the initial model of the interference removal model to obtain a trained interference removal model.

[0053] In one embodiment of the present application, the interference removal model is specifically used for:

[0054] The face is three-dimensionally modeled by using the facial recognition features of the face in the image to obtain a three-dimensional face model, and the obtained three-dimensional face model is rendered into a two-dimensional face image as a generated image.

[0055] In one embodiment of the present application, the device further includes an interference feature acquisition module, which is used to obtain a preset interference feature in the following manner:

[0056] The reference facial image is obtained, and based on the reference facial image, three-dimensional modeling is performed on the face of the user in the reference facial image to obtain three-dimensional model parameters of the constructed three-dimensional model, and parameters of the obtained three-dimensional model parameters that interfere with the user's facial recognition features are determined as preset interference features.

[0057] In one embodiment of the present application, the interference features in the image include at least one of the following features: features associated with user expression, features associated with user posture, and features associated with the environment when the image is captured.

[0058] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0059] Memory, used to store computer programs;

[0060] The processor is used to implement any method step described in the first aspect when executing a program stored in the memory.

[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0062] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned face recognition methods.

[0063] Beneficial effects of the embodiments of the present application:

[0064] When the scheme provided by the embodiment of the present application is applied to face recognition, a face image to be recognized can be obtained; interference features in the face image to be recognized are de-interference processed, and a target image is obtained according to the processing result, wherein the interference features are features in the image that interfere with the facial recognition features of the user; face recognition is performed on the target image based on a preset reference face image, and the recognition result is determined as the face recognition result of the face image to be recognized. Since the face image to be recognized is de-interference processed, the obtained target image no longer contains the interference features that originally existed in it. In this way, when face recognition is performed on the target image based on the reference face image, the interference caused by the interference features in the original face image to be recognized to the face recognition result can be reduced. It can be seen that the accuracy of face recognition can be improved by applying the scheme provided by the embodiment of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying any creative work.

[0066] Figure 1 A flowchart of a face recognition method provided in an embodiment of the present application;

[0067] Figure 2 A flowchart of another face recognition method provided in an embodiment of the present application;

[0068] Figure 3 A schematic diagram of a target image acquisition process provided in an embodiment of the present application;

[0069] Figure 4 A schematic diagram of another target image acquisition process provided in an embodiment of the present application;

[0070] Figure 5 A schematic diagram of the structure of a face recognition device provided in an embodiment of the present application;

[0071] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0073] In order to improve the accuracy of face recognition, the embodiments of the present application provide a face recognition method, device and electronic device, which are described in detail below.

[0074] See also Figure 1 , Figure 1 The face recognition method provided in the embodiment of the present application is a flow chart of a face recognition method, which can be applied to electronic devices such as mobile phones, computers, image acquisition devices, etc. The face recognition method includes the following steps 101 to 103.

[0075] Step 101: Obtain a face image to be recognized.

[0076] The above-mentioned face image to be identified is: an image obtained by collecting face images of the user to be identified who is to undergo face recognition.

[0077] In one embodiment of the present application, when the electronic device has an image acquisition function, the electronic device can directly acquire a facial image of the user to be identified, thereby obtaining a facial image to be identified. Alternatively, the image acquisition device can acquire a facial image of the user to be identified, and then send the acquired image to the electronic device, so that the electronic device obtains the facial image to be identified.

[0078] Step 102, performing interference removal processing on the interference features in the face image to be recognized, and obtaining a target image according to the processing result.

[0079] The interference feature is a feature in the image that interferes with the facial recognition feature of the user. The facial recognition feature is a feature in the facial feature of the user in the image that reflects the identity of the user.

[0080] The facial features of the user in the image may be the user's facial contour features, facial features, expression features, posture features, etc. Facial contour features may include the length, width, and face shape of the user's face. Facial features may include the size of the mouth, the color of the eyebrows, the height of the nose, etc. Expression features are features that reflect the user's expression in the image. When the user's expression changes, it will cause local deformation of the facial muscles, and the local deformation of the facial muscles will cause the user's facial features to deform. For example, when the expression is a smile, it will cause the user's mouth to lengthen and the corners of the mouth to rise. In this case, the expression features may include features of facial deformation. Posture features are features that reflect the user's posture in the image, and the above posture may be lowering the head, looking up, tilting the head, etc.

[0081] Not all of the above facial features can reflect the identity of the user. For example, facial contour features and facial features are inherent features of the user and can generally reflect the identity of the user. However, expression features change with the changes in the user's expression, and posture features change with the changes in the user's posture. They are not inherent features of the user and therefore cannot reflect the identity of the user.

[0082] In view of the above situation, in one embodiment of the present application, the facial recognition features that reflect the user's identity in the facial features may be facial contour features, facial features, etc.

[0083] The facial recognition features are related to the identity of the user in the image, and different users have different facial recognition features.

[0084] For example, taking the eye features among the facial features of the user in the face image to be identified as an example, the eye features include the length, width, distance between the two eyes, angle of the eyes, eye color and other features. Different users have different eye features, and these features are related to the user's identity. Therefore, the above eye features can be used as the user's facial recognition features.

[0085] Corresponding to the facial recognition features, in one embodiment of the present application, the interference features in the image may include at least one of the following features: features associated with user expression, features associated with user posture, and features associated with the environment when the image is captured.

[0086] The user's facial expressions may include smiling, pouting, frowning, glaring, etc. When the user makes different expressions, the facial muscles will be partially deformed, which will in turn cause the user's facial features to deform. Therefore, the interference features in the image can be represented by the deformation of the user's facial features. For example, when the expression is glaring, the width of the user's eyes will increase and the height of the eyebrows will increase. In this case, the features associated with the user's expression may include the change in the width of the eyes and the change in the height of the eyebrows.

[0087] The user's posture may include lowering the head, raising the head, tilting the head, and tilting the head, etc., which involve the angle changes of the user's head around the horizontal axis, the longitudinal axis, and the vertical axis in the three-dimensional vertical coordinate system. Under different postures, the facial contour of the user in the captured image will change. For example, when the user's posture is lowering the head, the length of the user's face on the vertical axis will become shorter, so when the user is imaged, the length of the user's facial contour in the vertical direction in the image obtained will become shorter. Moreover, under different postures, the user's facial features are partially missing in the captured image. Therefore, the features associated with the user's posture may include the angle of rotation of the user's head in the three-dimensional vertical coordinate system, etc.

[0088] The environment when collecting images includes light intensity, light source color, etc. On the one hand, the face images collected under different light intensities and light source colors are also different. For example, under different light source colors, the colors of eyebrows and eyes in face images are different, and light spots will be generated on the face. On the other hand, since the face is a three-dimensional structure, the light source will project different shadows on the face. The generated shadows will weaken the features of the face in the image, and then interfere with the facial recognition features of the user in the image. Therefore, the environment-related features can include the light intensity and light source color of different parts of the face when collecting images.

[0089] In addition, the above interference features may also include features associated with objects worn on the user's face, such as glasses, earrings, nose rings, etc. Since the above objects may block the user's facial features, they may interfere with the facial recognition features of the user in the image.

[0090] Specifically, interference features of the face image to be identified are removed, and a target image is obtained based on the processing result, so that the obtained target image does not contain the interference features originally carried by the image, thereby achieving interference removal of the face image to be identified.

[0091] Step 103 , performing face recognition on the target image based on a preset reference face image, and determining the recognition result as the face recognition result of the face image to be recognized.

[0092] Specifically, the reference face of the reference user in the reference face image can be compared with the face to be identified of the user to be identified in the target image. If the face to be identified is similar to the reference face, it can be considered that the user to be identified and the reference user are the same user; otherwise, it is considered that the user to be identified and the reference user are not the same user.

[0093] In one embodiment of the present application, reference features of a reference face in a reference face image can be extracted in advance. When performing face recognition, the features to be identified of the face to be identified in the target image can be extracted, and then the similarity between the features to be identified and the reference features can be calculated. When the above similarity reaches a preset similarity threshold, the face to be identified can be considered similar to the reference face, and further, the user in the face image to be identified and the user in the reference face image can be considered to be the same user.

[0094] Among them, the features of the face in the image can be extracted using a pre-trained face feature extraction model. When calculating the above similarity, it can be obtained by calculating the Euclidean distance, Manhattan distance, cosine similarity, etc. between the feature to be identified and the reference feature.

[0095] In one embodiment of the present application, before performing face recognition in the above step 103, the size of the target image can be adjusted so that the size of the face in the target image is consistent with the size of the face in the reference face image. In this way, when performing face recognition, the faces in the target image and the reference face image can be compared. If the comparison shows that the face in the target image is consistent with the face in the reference face image, it can be considered that the user in the target image and the user in the reference face image are the same user.

[0096] When the scheme provided by the above embodiment is applied to face recognition, a face image to be recognized can be obtained; interference features in the face image to be recognized are de-interference processed, and a target image is obtained according to the processing result, wherein the interference features are features in the image that interfere with the facial recognition features of the user; face recognition is performed on the target image based on a preset reference face image, and the recognition result is determined as the face recognition result of the face image to be recognized. Since the face image to be recognized is de-interference processed, the obtained target image no longer contains the interference features that originally existed in it. In this way, when face recognition is performed on the target image based on the reference face image, the interference caused by the interference features in the original face image to be recognized to the face recognition result can be reduced. It can be seen that the accuracy of face recognition can be improved by applying the scheme provided by the embodiment of the present application.

[0097] In one embodiment of the present application, there are multiple implementation methods for the above step 102 when performing interference removal processing on the face image to be recognized, which are introduced below respectively.

[0098] In the first implementation, the interference features in the face image to be recognized can be directly removed, and the image after the interference features are removed is used as the target image.

[0099] Specifically, interference features in the face image to be identified can be identified, and the identified interference features can be removed to obtain a target image with interference removed. In this way, when face recognition is performed based on the target image and the reference face image, since the target image does not contain interference features, the influence of the original interference features in the face image to be identified on the recognition result can be reduced, thereby improving the accuracy of face recognition.

[0100] For example, when the above-mentioned interference features are features associated with the environment when the image is collected, such as light spots, the light spots can be identified and removed from the image to obtain the target image, thereby eliminating the interference caused by the light spots in the face image to be identified. Subsequently, face recognition can be performed based on the face image to be identified with the interference features removed and the reference face image to improve the accuracy of face recognition.

[0101] In addition, interference features in the reference face image can be identified and removed, and face recognition can be performed based on the target image and the reference face image after the interference features are removed. In this way, since there are no interference features in both types of images, the impact of interference features on face recognition results can be further reduced, thereby further improving the accuracy of face recognition.

[0102] In the second implementation, interference features in the face image to be recognized may be removed, and preset interference features may be added to the image after the interference features are removed to obtain a target image.

[0103] The above-mentioned interference features may be interference features in a reference face image, or may be manually set interference features.

[0104] Specifically, interference features in the face image to be identified can be identified and removed, and then preset interference features can be introduced into the face image to be identified after the interference features are removed to obtain a target image, so that the target image contains its original facial recognition features and preset interference features.

[0105] It can also be understood that the interference features in the face image to be recognized are replaced with preset interference features.

[0106] In the case where the above-mentioned preset interference features are interference features in the reference face image, when face recognition is performed based on the target image and the reference face image, since the interference features contained in the target image are consistent with the interference features in the reference face image, the influence of the original interference features in the face image to be identified on the recognition result can be reduced, thereby improving the accuracy of face recognition.

[0107] For example, in the case where the above-mentioned interference features are features associated with user expressions, assuming that the above-mentioned preset interference features are interference features in the reference face image, the expressions of the user to be identified can be removed from the face image to be identified, and the expressions of the reference user can be added, so that the expressions in the face image to be identified are consistent with the expressions in the reference face image. Subsequently, when face recognition is performed based on the target image and the reference face image, the influence of the original interference features in the face image to be identified on the recognition results can be reduced, thereby improving the accuracy of face recognition.

[0108] In a third implementation, facial recognition features of the user in the face image to be recognized may be obtained as target features, and a target image may be generated using the target features and preset interference features.

[0109] Specifically, the facial recognition features of the user in the face image to be recognized can be identified as target features, and a target image can be generated based on the target features and the above-mentioned preset interference features. In this way, the obtained target image contains the facial recognition features in the face image to be recognized and the preset interference features, but no longer contains the original interference features in the face image to be recognized.

[0110] For example, in the case where the above-mentioned preset interference features are interference features in the reference face image, it is assumed that the interference features include the user's posture features and expression features, and the facial recognition features include the user's facial contour features and facial features. In this case, the target image is obtained based on the facial contour features and facial features of the user in the face image to be recognized, and the posture features and expression features of the user in the reference face image. The facial contour features and facial features of the user in the target image are consistent with the facial contour features and facial features of the user in the face image to be recognized, and the posture features and expression features of the user in the target image are consistent with the posture features and expression features of the user in the reference face image. It can be understood that the appearance of the user in the target image is consistent with the appearance of the user in the face image to be recognized, and the expression and posture of the user in the target image are consistent with the expression and posture of the user in the reference face image.

[0111] Specifically, taking the interference feature of glasses as an example, the features associated with glasses in the reference face image can be obtained in advance as preset interference features. Then, the facial recognition features in the face image to be identified are obtained, and an image is generated based on the interference features and facial recognition features as the target image. In this way, the user to be identified in the target image wears the glasses of the reference user, ensuring that the interference features in the face image to be identified are consistent with those in the reference face image.

[0112] Alternatively, taking the above interference features as features associated with user expressions as an example, features associated with the expressions of reference users in the reference face image can also be obtained in advance as preset interference features. Then, facial recognition features in the face image to be identified are obtained, and an image is generated based on the above interference features and facial recognition features as the target image, so that the user to be identified in the target image has the same expression as the reference user in the reference face image, ensuring that the interference features in the face image to be identified are consistent with those in the reference face image.

[0113] When performing face recognition based on the target image and the reference face image, since the interference features contained in the target image are consistent with the interference features in the reference face image, when subsequently performing face recognition based on the target image and the reference face image, the influence of the original interference features in the face image to be recognized on the recognition result can be reduced, thereby improving the accuracy of face recognition.

[0114] In one embodiment of the present application, with respect to the above implementation, there are also multiple situations when obtaining facial recognition features in the face image to be recognized, which are introduced below respectively.

[0115] In one case, feature extraction can be performed on the face of the user in the face image to be identified to obtain feature information of the face, and then facial contour features, facial features, etc. that can reflect the identity of the user are selected from the feature information of the face as target features.

[0116] In another case, based on the face image to be identified, three-dimensional modeling can be performed on the face of the user in the face image to be identified to obtain three-dimensional model parameters of the constructed three-dimensional model, and the parameters reflecting the user's facial recognition features in the obtained three-dimensional model parameters can be determined as target features.

[0117] Specifically, one or more frames of face images to be identified may be obtained. Based on the obtained face images to be identified, a face of a user to be identified is three-dimensionally modeled to obtain a three-dimensional model. Model parameters of the obtained three-dimensional model include parameters of the face of the user to be identified, and then parameters reflecting the identity of the user may be selected as target features.

[0118] The correspondence between the model parameters of the three-dimensional model and the features reflected by the parameters may be obtained in advance, and the parameters reflecting the identity of the user may be selected from the model parameters according to the correspondence as the target features.

[0119] In another case, the face image to be identified can be input into the trained first feature recognition model to obtain the facial recognition features of the face in the face image to be identified output by the feature recognition model. The first feature recognition model is used to identify the facial recognition features of the face in the image.

[0120] Correspondingly, when obtaining interference features in a face image, there are also multiple situations, which are introduced below. Among them, the above-mentioned face image can be a face image to be identified of a user to be identified, or a reference face image of a reference user, that is, the interference feature acquisition method in the embodiment of the present application can be used to obtain interference features in a face image to be identified, and can also be used to obtain interference features in a reference face image.

[0121] In one case, a facial image of the user can be obtained in advance, and features can be extracted from the facial image to obtain information about the content contained in the image. Then, features such as expression features, posture features, and environmental features that interfere with facial recognition features can be selected from the extracted information as interference features in the facial image.

[0122] In another case, when obtaining the preset interference features, a facial image can be obtained, and based on the above image, three-dimensional modeling is performed on the face of the user in the facial image to obtain three-dimensional model parameters of the constructed three-dimensional model, and the parameters in the obtained three-dimensional model parameters that interfere with the user's facial recognition features are determined as interference features in the above facial image.

[0123] Specifically, one or more frames of facial images may be obtained. Based on the obtained facial images, a three-dimensional model is performed on the user's face to obtain a three-dimensional model. Model parameters of the obtained three-dimensional model include parameters of the user's face, and then parameters that interfere with the user's identity information may be selected as interference features in the facial image.

[0124] Among them, the correspondence between the model parameters of the three-dimensional model and the features reflected by each parameter can be obtained in advance, and parameters other than the parameters reflecting the user's facial recognition features are selected from the model parameters according to the above correspondence as interference features in the face image.

[0125] In another case, the face image can also be input into the trained second feature recognition model to obtain the interference features in the face image output by the feature recognition model. The second feature recognition model is used to recognize the interference features in the image.

[0126] In one embodiment of the present application, when obtaining facial recognition features in a face image to be identified based on three-dimensional modeling, the face can be three-dimensionally modeled based on parameters in the three-dimensional model parameters that reflect the user's facial recognition features and preset interference features to obtain a three-dimensional face model, and the obtained three-dimensional face model can be rendered into a two-dimensional face image as a target image.

[0127] Specifically, based on the target features in the face image to be identified and the interference features in the reference face image, a three-dimensional face model can be constructed to obtain a three-dimensional face model. The parameters of the three-dimensional face model include the facial recognition features of the user in the face image to be identified and the interference features in the reference face image. Afterwards, the three-dimensional face model can be rendered to obtain a two-dimensional face image as the target image. The three-dimensional face model can be rendered using a Z-Buffer algorithm, etc., to obtain the target image.

[0128] For example, it is assumed that the interference features include the user's posture features and expression features, and the facial recognition features include the user's facial contour features and facial features. In this case, based on the facial contour features and facial features of the user in the face image to be recognized, and the posture features and expression features of the user in the reference face image, the face is three-dimensionally modeled to obtain a three-dimensional face model. The facial contour features and facial features of the user in the three-dimensional face model are consistent with the facial contour features and facial features of the user in the face image to be recognized, and the posture features and expression features of the user in the three-dimensional face model are consistent with the posture features and expression features of the user in the reference face image. Then, the three-dimensional face model is rendered to obtain a target image, and the appearance of the user in the target image is consistent with the appearance of the user in the face image to be recognized, and the expression and posture of the user in the target image are consistent with the expression and posture of the user in the reference face image.

[0129] In one embodiment of the present application, when obtaining a target image, since the model parameters of the obtained three-dimensional model include facial recognition features and interference features when three-dimensional modeling is performed on the face of the user in the face image to be identified, the interference features in the model parameters can be replaced by the interference features in the reference face image obtained in advance, and a three-dimensional face model is created based on the model parameters after information replacement, and then the three-dimensional face model is rendered to obtain the target image.

[0130] See also Figure 2 , Figure 2 A flowchart of another face recognition method provided in an embodiment of the present application, the method includes the following steps 201 to 204.

[0131] Step 201 : obtaining a face image of a user to be identified and serving as the face image to be identified.

[0132] Step 202, based on the face image to be identified, three-dimensional modeling is performed on the face of the user in the face image to be identified, and three-dimensional model parameters of the constructed three-dimensional model are obtained, and parameters reflecting the user's facial recognition features in the obtained three-dimensional model parameters are determined as target features.

[0133] Among them, based on the parameterized face modeling method, the face of the user in the face image to be identified is three-dimensionally modeled, and multiple parameters about the face of the user to be identified can be obtained, from which parameters reflecting the user's identity are selected as target features.

[0134] Step 203, based on the parameters reflecting the user's facial recognition features in the three-dimensional model parameters and the preset interference features, the face is three-dimensionally modeled to obtain a three-dimensional face model, and the obtained three-dimensional face model is rendered into a two-dimensional face image as a target image.

[0135] When obtaining a three-dimensional face model, the target features obtained in the above step 202 can be combined with the interference features in the above reference face image, and three-dimensional modeling can be performed based on the combined information to obtain a three-dimensional face model, and then the three-dimensional face model is rendered into a two-dimensional face image as the target image.

[0136] Among them, the interference features in the target image are consistent with the interference features in the reference face image, and the facial recognition features of the included user are consistent with the target features. It can be understood that the appearance of the user in the target image is consistent with the appearance of the user in the face image to be recognized, and the expression and posture of the user in the target image are consistent with the expression and posture of the user in the reference face image. In this way, the interference caused by the expression and posture of the user in the face image to be recognized, as well as the environment when the face image to be recognized is collected, on the subsequent face recognition can be eliminated, the difficulty of face recognition is reduced, and the accuracy of face recognition is improved.

[0137] For example, see Figure 3 , Figure 3 A schematic diagram of a target image acquisition process provided in an embodiment of the present application. Taking the mouth as an example, it can be seen that the mouth opening of the user in the reference face image is relatively large, while the mouth opening of the user in the face image to be identified is relatively small. To facilitate subsequent face recognition, the expression of the user's mouth in the face image to be identified needs to be adjusted to the expression of the user's mouth in the reference face image.

[0138] Therefore, we can first obtain a reference face image, perform face modeling based on the reference face image, and obtain model parameters of the face model of the reference user; then obtain a face image to be identified, perform face modeling based on the face image to be identified, and obtain model parameters of the face model of the user to be identified. Then, the model parameters representing the mouth expression in the model parameters corresponding to the user to be identified are replaced with the model parameters representing the mouth expression in the model parameters corresponding to the reference user, and three-dimensional modeling is performed based on the new model parameters to obtain a three-dimensional face model, and then the three-dimensional face model is rendered into a two-dimensional face image as the target image.

[0139] Step 204 , performing face recognition on the target image based on the preset reference face image, and determining the recognition result as the face recognition result of the face image to be recognized.

[0140] In one embodiment of the present application, for the above step 203, reference facial images of multiple reference users may be obtained in advance, and then interference features in the multiple reference facial images may be obtained.

[0141] For the interference features corresponding to each reference user, three-dimensional modeling can be performed based on the target features and the interference features to obtain a three-dimensional face model, and then a target image is obtained, and then face recognition is performed using the target image and the reference face image of the reference user.

[0142] The interference features corresponding to the reference users are traversed in sequence until a reference user who is the same user as the user to be identified is identified.

[0143] In one embodiment of the present application, a 3D face model can be represented as: in Represents the preset average face model, which is the universal basic face model. id Represents the shape basis model, which can be understood as the basic facial shape model, α id A represents the shape factor, which is equivalent to the facial recognition feature in this application; exp represents the expression base model, which can be understood as the basic expression model, α exp Indicates the expression coefficient, which is equivalent to the interference feature in this application. In addition, the user's posture coefficient and environment coefficient can also be obtained, that is, the features associated with the user's posture in this application and the features associated with the environment when collecting images.

[0144] In one embodiment of the present application, a three-dimensional modeling of the face image to be recognized can be performed based on the above formula to obtain the model output [p1, α id1 , α exp1 ], where p1 represents the posture coefficient of the user to be identified, α id1 represents the identity coefficient of the user to be identified, α exp1 represents the expression coefficient of the user to be identified. The output of the reference face image after 3D modeling is [p2, α id2 , α exp2 ], where p2 represents the reference user’s posture coefficient, α id2 represents the identity coefficient of the reference user, α exp2 represents the expression coefficient of the reference user. The coefficients of the reference user other than the identity coefficient and the identity coefficient of the user to be identified are combined to obtain [p2, α id1 , α exp2], perform 3D modeling based on the above combined coefficients to obtain a combined 3D face model, and then render the 3D face model into a 2D image. Specifically, [α id1 , α exp2 ] performs three-dimensional face modeling. After obtaining the three-dimensional face model, the posture of the three-dimensional face model is adjusted based on p2, and the features associated with the environment when collecting the reference face image are introduced when rendering the two-dimensional image, and finally the target image is obtained.

[0145] See also Figure 4 , Figure 4 A schematic diagram of another target image acquisition process provided by an embodiment of the present application. Perform three-dimensional face modeling on the face image to be identified and the reference face image respectively, obtain the identity coefficient, environment coefficient, posture coefficient, and expression coefficient corresponding to the user to be identified and the reference user respectively, combine the identity coefficient of the user to be identified and the environment coefficient, posture coefficient, and expression coefficient of the reference user, perform face modeling again, and perform image rendering on the obtained three-dimensional face model to obtain the target image.

[0146] In one embodiment of the present application, when obtaining the target image in the above step 102, in addition to obtaining the target image by means of three-dimensional modeling in the above embodiment, a neural network model can also be used to directly process the face image to be recognized, thereby obtaining the target image output by the model. This is described in detail below.

[0147] The face image to be recognized is input into the pre-trained de-interference model to obtain the target image output by the de-interference model.

[0148] The interference removal model is a model trained with sample images and used to remove interference from images. The interference removal model may be a convolutional neural network model, a deep neural network model, etc., and this application does not limit this.

[0149] In one embodiment of the present application, the interference removal model can be used to directly remove interference features in the face image to be identified, and the image after the interference features are removed is used as the target image. The interference removal model can also be used to generate an image after removing the interference features of the image itself and adding preset interference features.

[0150] Specifically, the de-interference model can remove interference features in the face image to be identified, add preset interference features to the image after removing the interference features, and obtain a target image; it can also obtain the facial recognition features of the user in the face image to be identified as target features, and generate a target image using the target features and preset interference features.

[0151] In one embodiment of the present application, the above-mentioned interference removal model may include a feature recognition layer and an image generation layer.

[0152] In one implementation, the feature recognition layer can be used to identify interference features in the face image to be recognized; the image generation layer is used to generate an image with the interference features removed, and output it as a target image.

[0153] In another implementation, the feature recognition layer can be used to identify facial recognition features in a face image to be recognized; the image generation layer is used to generate an image by combining the facial recognition features and preset interference features, and output it as a target image.

[0154] In one embodiment of the present application, the de-interference model is specifically used to utilize the facial recognition features of the face in the image to perform three-dimensional modeling of the face, obtain a three-dimensional face model, and render the obtained three-dimensional face model into a two-dimensional face image as a generated image.

[0155] Specifically, the de-interference model can identify facial recognition features of a face in an image. The facial recognition features are obtained in the form of three-dimensional model parameters. Three-dimensional modeling is performed based on the features to obtain a three-dimensional face model, and the three-dimensional face model is rendered to obtain a target image.

[0156] When obtaining the three-dimensional face model, it can be directly modeled based on the facial recognition features, or it can be modeled based on the facial recognition features and preset interference features. The interference features can be interference features in the reference face image.

[0157] In one embodiment of the present application, the above interference removal model can be trained in the following manner:

[0158] A sample image is obtained, a 3D model is performed on the face of the user in the sample image, and 3D model parameters of the constructed 3D model are obtained. Parameters reflecting the facial recognition features of the user are selected from the obtained 3D model parameters, and a 2D face image is rendered based on the selected parameters as an annotated image. The sample image and the annotated image are used to train an initial model of a de-interference model to obtain a trained de-interference model.

[0159] Specifically, sample images can be collected, and the sample images contain the user's face. First, an annotated image corresponding to the sample image is constructed. Three-dimensional modeling can be performed based on the user's face in the sample image. Three-dimensional modeling can be performed again using parameters in the three-dimensional model parameters that characterize the user's facial recognition features, and image rendering is performed on the obtained three-dimensional face model to obtain an annotated image corresponding to the sample image. Finally, the sample image and the annotated image can be used to train the initial model of the de-interference model until the training end condition is met.

[0160] Among them, the above-mentioned training end condition can be that the number of training times reaches a preset number threshold, or that the loss of the model output result is less than a preset loss threshold, and the embodiments of the present application are not limited to this.

[0161] See also Figure 5 , Figure 5 A schematic diagram of the structure of a face recognition device provided in an embodiment of the present application, the device comprising:

[0162] An image acquisition module 501 is used to obtain a face image to be recognized;

[0163] The image processing module 502 is used to perform interference removal processing on the interference features in the face image to be recognized, and obtain a target image according to the processing result, wherein the interference features are features in the image that interfere with the facial recognition features of the user;

[0164] The face recognition module 503 is used to perform face recognition on the target image based on a preset reference face image, and determine the recognition result as the face recognition result of the face image to be recognized.

[0165] In one embodiment of the present application, the image processing module 502 is specifically used for:

[0166] removing interference features from the face image to be identified, and using the image after the interference features are removed as the target image; or

[0167] Removing interference features from the face image to be identified, and adding preset interference features to the image after the interference features are removed to obtain a target image; or

[0168] The facial recognition features of the user in the face image to be recognized are obtained as target features, and a target image is generated using the target features and preset interference features.

[0169] In one embodiment of the present application, the image processing module 502 includes:

[0170] A face modeling unit is used to perform three-dimensional modeling on the face of the user in the face image to be recognized based on the face image to be recognized, obtain three-dimensional model parameters of the constructed three-dimensional model, and determine the parameters reflecting the user's facial recognition features in the obtained three-dimensional model parameters as target features;

[0171] An image generating unit is used to generate a target image using the target feature and a preset interference feature.

[0172] In one embodiment of the present application, the image generation unit is specifically used to:

[0173] Based on the parameters reflecting the user's facial recognition features in the three-dimensional model parameters and the preset interference features, three-dimensional modeling of the face is performed to obtain a three-dimensional face model;

[0174] The obtained 3D face model is rendered into a 2D face image as the target image.

[0175] In one embodiment of the present application, the image processing module 502 is specifically used for:

[0176] The face image to be recognized is input into a pre-trained de-interference model to obtain a target image output by the de-interference model, wherein the de-interference model is a model trained with sample images and used for de-interference processing of images.

[0177] In one embodiment of the present application, the interference removal model is specifically used for:

[0178] Generate an image after removing the interference features of the image itself and adding preset interference features.

[0179] In one embodiment of the present application, the device further includes a model training module, which is used to train the interference removal model in the following manner:

[0180] Obtain a sample image;

[0181] Performing three-dimensional modeling on the face of the user in the sample image to obtain three-dimensional model parameters of the constructed three-dimensional model, selecting parameters reflecting the facial recognition features of the user from the obtained three-dimensional model parameters, and rendering based on the selected parameters to obtain a two-dimensional face image as a labeled image;

[0182] The sample image and the annotated image are used to train the initial model of the interference removal model to obtain a trained interference removal model.

[0183] In one embodiment of the present application, the interference removal model is specifically used for:

[0184] The face is three-dimensionally modeled by using the facial recognition features of the face in the image to obtain a three-dimensional face model, and the obtained three-dimensional face model is rendered into a two-dimensional face image as a generated image.

[0185] In one embodiment of the present application, the device further includes an interference feature acquisition module, which is used to obtain a preset interference feature in the following manner:

[0186] The reference facial image is obtained, and based on the reference facial image, three-dimensional modeling is performed on the face of the user in the reference facial image to obtain three-dimensional model parameters of the constructed three-dimensional model, and parameters of the obtained three-dimensional model parameters that interfere with the user's facial recognition features are determined as preset interference features.

[0187] In one embodiment of the present application, the interference features in the image include at least one of the following features: features associated with user expression, features associated with user posture, and features associated with the environment when the image is captured.

[0188] When the scheme provided by the above embodiment is applied to face recognition, a face image to be recognized can be obtained; interference features in the face image to be recognized are de-interference processed, and a target image is obtained according to the processing result, wherein the interference features are features in the image that interfere with the facial recognition features of the user; face recognition is performed on the target image based on a preset reference face image, and the recognition result is determined as the face recognition result of the face image to be recognized. Since the face image to be recognized is de-interference processed, the obtained target image no longer contains the interference features that originally existed in it. In this way, when face recognition is performed on the target image based on the reference face image, the interference caused by the interference features in the original face image to be recognized to the face recognition result can be reduced. It can be seen that the accuracy of face recognition can be improved by applying the scheme provided by the above embodiment.

[0189] The present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0190] Memory 603, used for storing computer programs;

[0191] The processor 601 is used to implement the method steps of face recognition when executing the program stored in the memory 603.

[0192] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0193] The communication interface is used for communication between the above electronic device and other devices.

[0194] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0195] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0196] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned face recognition methods are implemented.

[0197] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any face recognition method in the above embodiments.

[0198] When the scheme provided by the above embodiment is applied to face recognition, a face image to be recognized can be obtained; interference features in the face image to be recognized are de-interference processed, and a target image is obtained according to the processing result, wherein the interference features are features in the image that interfere with the facial recognition features of the user; face recognition is performed on the target image based on a preset reference face image, and the recognition result is determined as the face recognition result of the face image to be recognized. Since the face image to be recognized is de-interference processed, the obtained target image no longer contains the interference features that originally existed in it. In this way, when face recognition is performed on the target image based on the reference face image, the interference caused by the interference features in the original face image to be recognized to the face recognition result can be reduced. It can be seen that the accuracy of face recognition can be improved by applying the scheme provided by the above embodiment.

[0199] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0200] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0201] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, electronic device embodiment, computer-readable storage medium embodiment, and computer program product embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0202] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A face recognition method, characterized in that: The method comprises: Obtaining a face image to be recognized; Performing interference removal processing on the interference features in the face image to be identified, and obtaining a target image according to the processing result, including: removing the interference features in the face image to be identified, adding preset interference features to the image after removing the interference features, and obtaining the target image; wherein the interference features are: features in the image that interfere with the facial recognition features of the user; the preset interference features are: features in a preset reference face image that interfere with the facial recognition features of the user, including features associated with the user's expression, features associated with the user's posture, and features associated with the environment when the image is collected; the preset reference face image is a face image obtained by pre-collecting an image of a reference user; the appearance of the user to be identified in the target image is the same as that of the user to be identified in the face image to be identified, and the expression, posture, and environment of the user to be identified in the target image when the image is collected are respectively consistent with the expression, posture, and environment of the reference user in the corresponding reference face image when the image is collected; The target image is subjected to face recognition based on a preset reference face image, and a recognition result is determined as a face recognition result of the face image to be recognized.

2. The method according to claim 1, characterized in that: The step of performing interference removal processing on the interference features in the face image to be identified and obtaining a target image according to the processing result includes: The face image to be recognized is input into a pre-trained de-interference model to obtain a target image output by the de-interference model, wherein the de-interference model is a model trained with sample images and used for de-interference processing of images.

3. The method according to claim 2, characterized in that The interference removal model is specifically used for: Generate an image after removing the interference features of the image itself and adding preset interference features.

4. The method according to claim 2, characterized in that: The interference removal model is obtained by training in the following manner: Obtain a sample image; Performing three-dimensional modeling on the face of the user in the sample image to obtain three-dimensional model parameters of the constructed three-dimensional model, selecting parameters reflecting the facial recognition features of the user from the obtained three-dimensional model parameters, and rendering based on the selected parameters to obtain a two-dimensional face image as a labeled image; The sample image and the annotated image are used to train the initial model of the interference removal model to obtain a trained interference removal model.

5. The method according to claim 2, characterized in that: The interference removal model is specifically used for: The face is three-dimensionally modeled by using the facial recognition features of the face in the image to obtain a three-dimensional face model, and the obtained three-dimensional face model is rendered into a two-dimensional face image as a generated image.

6. The method according to claim 2 or 3, characterized in that: The preset interference signature is obtained by: The reference facial image is obtained, and based on the reference facial image, three-dimensional modeling is performed on the face of the user in the reference facial image to obtain three-dimensional model parameters of the constructed three-dimensional model, and parameters of the obtained three-dimensional model parameters that interfere with the user's facial recognition features are determined as preset interference features.

7. A face recognition device, characterized in that: The device comprises: An image acquisition module is used to obtain a face image to be recognized; An image processing module is used to remove interference features in the face image to be identified, and to add preset interference features to the image after the interference features are removed to obtain a target image, wherein the interference features are: features in the image that interfere with the facial recognition features of the user; the preset interference features are: features in a preset reference face image that interfere with the facial recognition features of the user, including features associated with the user's expression, features associated with the user's posture, and features associated with the environment when the image is collected; the preset reference face image is a face image obtained by pre-collecting an image of a reference user; the appearance of the user in the target image is the same as that of the user in the face image to be identified, and the expression, posture, and environment of the user in the target image when the image is collected are respectively consistent with the expression, posture, and environment of the reference user in the corresponding reference face image; The face recognition module is used to perform face recognition on the target image based on a preset reference face image, and determine the recognition result as the face recognition result of the face image to be recognized.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.