Face recognition method, device, electronic device and storage medium

By searching for face feature extraction models corresponding to the occlusion area in the model search space, feature extraction and comparison of the recognized faces is solved, and the problem of low accuracy of face recognition in the existing technology is achieved, and more efficient face recognition effect.

CN113688657BActive Publication Date: 2025-02-18SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010426511.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-19
Publication Date
2025-02-18
Estimated Expiration
2040-05-19

AI Technical Summary

Technical Problem

When existing face recognition technology deals with obscured faces, it is easy to lead to loss of face information and introduction of noise information, reducing the accuracy of recognition.

Method used

By searching for the face feature extraction model corresponding to the occlusion area in the model search space, feature extraction of the faces to be recognized, and feature comparison with the facial features of the base library, index and output corresponding face recognition information .

Benefits of technology

This method can avoid loss of face information and introduction of noise information, improve the recognition effect of blocked faces, and enhance the accuracy of face recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113688657B_ABST
    Figure CN113688657B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a face recognition method, device, electronic device and storage medium, the method comprising: when it is detected that there is an occluded area in a face to be recognized, searching for a face feature extraction model corresponding to the occluded area in a model search space, wherein a face feature extraction model in the model search space detects a type of face feature corresponding to the occluded area; extracting features of the face to be recognized by the face feature extraction model to obtain face features to be recognized; comparing the face features to be recognized with the face features in a base database corresponding to the face feature extraction model; taking the face features in the base database with the highest similarity to the face features to be recognized as target face features, indexing and outputting face recognition information corresponding to the target face features, wherein the face features in the base database and the face recognition information have a mapping relationship. The recognition effect of occluded faces is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a face recognition method, device, electronic equipment and storage medium. Background Art

[0002] With the continuous deepening of artificial intelligence research, image recognition products are becoming more and more abundant, such as access control, monitoring, smart transportation and other products based on face recognition. Face recognition technology includes: face detection and extraction, face image preprocessing, face feature extraction and face feature comparison and recognition. Since face recognition is affected by the camera shooting angle or the person actively blocking the face, it may capture obscured face images. For example, when a person wears a peaked cap, the camera set above the venue is likely to capture a part of the face image blocked by the peaked cap. For example, when the user wears a mask or protective glasses, the face image captured by the camera is partially blocked. Since the face image is blocked, the complete face features cannot be extracted in face recognition, which reduces the accuracy of face recognition. For occluded faces, the traditional processing method is to use digital image technology to remove the occlusion information of the occluded face in the face image preprocessing step, or to weight the occlusion information and take it into account in the face feature comparison and recognition. However, due to the influence of factors such as lighting and personnel posture when the camera is shooting, it is easy to cause the loss of face information when removing the occlusion information, and it is easy to cause the introduction of noise information when weighting or masking the occlusion information. Both the loss of face information and the introduction of noise information are not conducive to improving the accuracy of face recognition. Therefore, in the existing face recognition, the recognition effect of occluded faces is not good. Summary of the invention

[0003] The embodiment of the present invention provides a face recognition method, which can avoid the loss of face information and the introduction of noise information, thereby improving the recognition effect of an obscured face.

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

[0005] When it is detected that there is an occluded area in the face to be identified, searching for a face feature extraction model corresponding to the occluded area in the model search space, wherein a face feature extraction model in the model search space detects a type of face feature corresponding to the occluded area;

[0006] Extracting features of the face to be identified by using the face feature extraction model to obtain features of the face to be identified;

[0007] Perform feature comparison between the facial features to be identified and the facial features in the base database corresponding to the facial feature extraction model;

[0008] The base database facial feature with the highest similarity to the facial feature to be identified is used as the target facial feature, and the facial recognition information corresponding to the target facial feature is indexed and output, wherein the base database facial feature and the facial recognition information have a mapping relationship.

[0009] Optionally, when an occluded area of ​​a face to be recognized is detected, searching for a face feature extraction model corresponding to the occluded area in a model search space includes:

[0010] Obtain a face image to be recognized;

[0011] Detecting whether there is an occlusion area on the face to be identified in the face image to be identified;

[0012] If there is an occlusion area in the face to be recognized, determining the occlusion type of the occlusion area;

[0013] According to the occlusion area and / or the occlusion type, a facial feature extraction model corresponding to the occlusion area and / or the occlusion type is searched in the model search space, wherein a facial feature extraction model in the model search space detects at least one face corresponding to the occlusion area, occlusion type, and a combination of the occlusion area and the occlusion type.

[0014] Optionally, the model search space includes a plurality of prediction modules, and searching the model search space for a facial feature extraction model corresponding to the occluded area includes:

[0015] According to the occluded area of ​​the face to be recognized, predict and search to obtain corresponding prediction module information;

[0016] According to the prediction module information, a corresponding facial feature extraction model is constructed.

[0017] Optionally, the prediction module includes mixed nodes, the mixed nodes are connected by a mixed operator, and the predicting and searching for the corresponding prediction module information according to the occluded area of ​​the face to be recognized includes:

[0018] According to the face to be recognized and the occluded area, predict and search to obtain corresponding mixing node information and mixing operator information;

[0019] A corresponding prediction module is constructed according to the hybrid node information and the hybrid operator information.

[0020] Optionally, when it is detected that the to-be-recognized face has an occluded area, before searching the model search space for a face feature extraction model corresponding to the occluded area, the method further includes:

[0021] Get the training set and validation set;

[0022] Constructing a model search space, wherein the model search space includes a plurality of prediction modules;

[0023] Initializing the training parameters of the prediction module, and calculating the initialization loss of the training parameters through the validation set;

[0024] If the initialization loss does not converge, iteratively training the training parameters in the training set, and adjusting the training parameters of the prediction module by stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges;

[0025] When the loss of the training parameters calculated by the training set converges, taking the prediction module with the largest training parameter as the target prediction module;

[0026] According to the target prediction module, a corresponding facial feature extraction model is constructed.

[0027] Optionally, when it is detected that the face to be identified has an occluded area, before searching the model search space for a facial feature extraction model corresponding to the occluded area, the method further includes:

[0028] Get the training set and validation set;

[0029] Constructing a model search space, wherein the model search space includes a plurality of hybrid nodes, and the hybrid nodes are connected by hybrid operators;

[0030] Initializing the training parameters of the hybrid operator, and calculating the initialization loss of the training parameters through the validation set;

[0031] If the initialization loss does not converge, iteratively training the training parameters in the training set, and adjusting the training parameters of the prediction module by stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges;

[0032] When the loss of the training parameters calculated by the training set converges, the mixing operator with the largest training parameter is determined as the target mixing operator;

[0033] Connecting corresponding mixing nodes through the target mixing operator to obtain a prediction module;

[0034] According to the prediction module, a corresponding facial feature extraction model is constructed.

[0035] Optionally, the method further includes:

[0036] Acquire database face recognition information, wherein the database face recognition information includes database face images;

[0037] Extracting base database facial features from the base database facial images through a trained facial feature extraction model;

[0038] The base database facial features extracted by different facial feature extraction models are stored in the corresponding base database, and a mapping relationship between the base database facial features and the base database facial recognition information is established.

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

[0040] A search module, for searching a face feature extraction model corresponding to the occluded area in a model search space when it is detected that the face to be identified has an occluded area, wherein a face feature extraction model in the model search space detects a type of face feature corresponding to the occluded area;

[0041] A first extraction module, used for extracting features of the face to be identified by using the face feature extraction model to obtain features of the face to be identified;

[0042] A calculation module, used for comparing the facial features to be identified with the facial features in the base database corresponding to the facial feature extraction model;

[0043] The output module is used to take the base database facial feature with the highest similarity to the facial feature to be identified as the target facial feature, index and output the facial recognition information corresponding to the target facial feature, wherein the base database facial feature and the facial recognition information have a mapping relationship.

[0044] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the face recognition method provided in the embodiment of the present invention when executing the computer program.

[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the face recognition method provided in the embodiment of the invention are implemented.

[0046] In an embodiment of the present invention, when it is detected that there is an occluded area in the face to be identified, a facial feature extraction model corresponding to the occluded area is searched in the model search space, wherein a facial feature extraction model in the model search space detects a type of facial features corresponding to the occluded area; feature extraction is performed on the face to be identified by the facial feature extraction model to obtain facial features to be identified; feature comparison is performed between the facial features to be identified and the facial features in the base database corresponding to the facial feature extraction model; the facial features in the base database with the highest similarity to the facial features to be identified are used as target facial features, and facial recognition information corresponding to the target facial features is indexed and output, wherein the facial features in the base database and the facial recognition information have a mapping relationship. By searching for the facial feature extraction model corresponding to the occluded area in the model search space and extracting facial features of the face to be identified through the targeted facial feature extraction model, the feature extraction effect of the face to be identified can be improved. By comparing the facial features of the face to be identified with the facial features of the base database corresponding to the facial feature extraction model, the feature comparison is performed at a finer granularity and is more targeted, thereby improving the recognition effect of the occluded face while avoiding the loss of facial information and the introduction of noise information. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1 is a flow chart of a face recognition method provided by an embodiment of the present invention;

[0049] Figure 2 is a search flow chart of a face feature extraction model provided by an embodiment of the present invention;

[0050] Figure 3 is a schematic diagram of a prediction module connection provided by an embodiment of the present invention;

[0051] Figure 4 is a search flow chart of another face feature extraction model provided by an embodiment of the present invention;

[0052] Figure 5 is a schematic diagram of a hybrid operator connection transformation provided by an embodiment of the present invention;

[0053] Figure 6 is a flow chart of a model search space optimization method provided by an embodiment of the present invention;

[0054] Figure 7 is a structural schematic diagram of a face recognition device provided by an embodiment of the present invention;

[0055] Figure 8 is a schematic diagram of the structure of a search module provided by an embodiment of the present invention;

[0056] Fig. 9 is a schematic diagram of the structure of another search module provided by an embodiment of the present invention;

[0057] Fig.10 is a structural schematic diagram of a second search submodule provided by an embodiment of the present invention;

[0058] Fig.11 is a structural schematic diagram of another face recognition device provided by an embodiment of the present invention;

[0059] Fig.12 is a structural schematic diagram of another face recognition device provided by an embodiment of the present invention;

[0060] Fig.13 is a structural schematic diagram of another face recognition device provided by an embodiment of the present invention;

[0061] Fig.14 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

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

[0063] See also Figure 1 , Figure 1 is a flow chart of a face recognition method provided by an embodiment of the present invention, such as Figure 1 As shown, the following steps are included:

[0064] 101. When it is detected that there is an occluded area in the face to be recognized, a face feature extraction model corresponding to the occluded area is searched in the model search space.

[0065] Among them, the above-mentioned model search space includes multiple facial feature extraction models, and a facial feature extraction model in the above-mentioned model search space extracts corresponding facial features of a type of occluded area.

[0066] The above-mentioned face to be identified can be a facial feature image captured by a camera. The above-mentioned camera can be set in a scene where face recognition is required, such as: residential areas, traffic roads, railway stations, high-speed railway stations, airports, hospitals and other scenes. The above-mentioned face to be identified can also be a facial feature image uploaded by a user. The above-mentioned facial feature image can be understood as a partial face image obtained after face detection. For example, a camera captures a large image, which includes multiple faces. The image is input into a face detection model for detection, and it is determined which are faces and which are not faces, and a small image of each face is regressed and output. The small image can be called a facial feature image, that is, the face to be identified in the embodiment of the present invention.

[0067] The above-mentioned occlusion area refers to the occlusion of the human face, such as the face area blocked by a hat, the face area blocked by a mask, and the face area blocked by goggles. The above-mentioned occlusion area can be one or a combination of multiple occlusion areas. For example, when a person wears a mask and goggles at the same time, the above-mentioned occlusion area can be a combination of the face area blocked by the mask and the face area blocked by the goggles.

[0068] The above-mentioned facial feature extraction model refers to a trained facial feature extraction model, which is used to extract facial features.

[0069] Specifically, the face image to be identified is obtained by shooting with a camera. For example, the access control camera set up in a residential area, a traffic road, a railway station, a high-speed railway station, an airport, a hospital, etc., shoots the person who wants to pass through the access control, and obtains the face image to be identified of the person who wants to pass through the access control. The face image to be identified can also be obtained by the user uploading an image or video.

[0070] The face detection model is used to detect whether there is an occlusion area on the face to be identified in the face image to be identified. In the face detection model, various classification strategies for face occlusion areas are pre-trained. For example, the above classification strategies classify occluded faces into forehead occlusion areas, eye occlusion areas, nose occlusion areas, mouth occlusion areas, chin occlusion areas, mouth and nose occlusion areas, eye, mouth and nose occlusion areas and other types of occlusion area classification. Among them, the above-mentioned forehead occlusion area indicates that the forehead of the face to be identified in the face image to be identified is occluded, the above-mentioned eye occlusion area indicates that the eye part of the face to be identified in the face image to be identified is occluded, the above-mentioned nose occlusion area indicates that the nose part of the face to be identified in the face image to be identified is occluded, the above-mentioned mouth occlusion area indicates that the mouth part of the face to be identified in the face image to be identified is occluded, the above-mentioned chin occlusion area indicates that the chin part of the face to be identified in the face image to be identified is occluded, the above-mentioned mouth and nose occlusion area indicates that the mouth part and nose part of the face to be identified in the face image to be identified are occluded at the same time, and the above-mentioned eye, mouth and nose occlusion area indicates that the eye part, mouth part and nose part of the face to be identified in the face image to be identified are occluded at the same time.

[0071] If there is an occlusion area on the face to be identified, the occlusion type of the occlusion area can be determined. The above-mentioned occlusion type can be transparent occlusion, semi-transparent occlusion or non-transparent occlusion, or it can be a specific object occlusion, such as mask occlusion, goggles occlusion, mask occlusion, hat occlusion or other object occlusion types. According to the occlusion area and / or occlusion type, the face feature extraction model corresponding to the occlusion area and / or occlusion type is searched in the model search space, wherein a face feature extraction model in the above-mentioned model search space detects at least one face corresponding to the occlusion area, occlusion type and the combination of the occlusion area and occlusion type.

[0072] There are multiple facial feature extraction models in the model search space, and each facial feature extraction model can correspond to different occlusion areas and / or occlusion types. For example, if each facial feature extraction model corresponds to a different occlusion area, it can be understood that the model search space includes: a facial feature extraction model corresponding to the forehead occlusion area, a facial feature extraction model corresponding to the eye occlusion area, a facial feature extraction model corresponding to the nose occlusion area, a facial feature extraction model corresponding to the mouth occlusion area, a facial feature extraction model corresponding to the chin occlusion area, a facial feature extraction model corresponding to the mouth and nose occlusion area, and a facial feature extraction model corresponding to the eye, mouth and nose occlusion area. The above-mentioned facial feature extraction model corresponding to the forehead occluded area is used to extract the facial features of the face with the forehead area occluded, the above-mentioned facial feature extraction model corresponding to the eye occluded area is used to extract the facial features of the face with the eye area occluded, the above-mentioned facial feature extraction model corresponding to the nose occluded area is used to extract the facial features of the face with the nose area occluded, the above-mentioned facial feature extraction model corresponding to the mouth occluded area is used to extract the facial features of the face with the mouth area occluded, the above-mentioned facial feature extraction model corresponding to the chin occluded area is used to extract the facial features of the face with the chin area occluded, the above-mentioned facial feature extraction model corresponding to the mouth and nose occluded area is used to extract the facial features of the face with the mouth and nose area occluded, and the above-mentioned facial feature extraction model corresponding to the eye, mouth and nose occluded area is used to extract the facial features of the face with the eye, mouth and nose area occluded.

[0073] Alternatively, if each face feature extraction model corresponds to a different occlusion type, it can be understood that the model search space includes: face feature extraction models corresponding to transparent occlusion, face feature extraction models corresponding to semi-transparent occlusion, or face feature extraction models corresponding to non-transparent occlusion, etc. Or it includes: face feature extraction models corresponding to mask occlusion, face feature extraction models corresponding to goggles occlusion, face feature extraction models corresponding to mask occlusion, face feature extraction models corresponding to hat occlusion, or face feature extraction models corresponding to other object occlusions and other occlusion types.

[0074] If each facial feature extraction model corresponds to different occlusion areas and different occlusion types, it can be understood that the model search space includes: three facial feature extraction models corresponding to the forehead area occluded by transparent, semi-transparent, and non-transparent objects respectively, three facial feature extraction models corresponding to the eye area occluded by transparent, semi-transparent, and non-transparent objects respectively, three facial feature extraction models corresponding to the nose area occluded by transparent, semi-transparent, and non-transparent objects respectively, three facial feature extraction models corresponding to the mouth area occluded by transparent, semi-transparent, and non-transparent objects respectively, three facial feature extraction models corresponding to the chin area occluded by transparent, semi-transparent, and non-transparent objects respectively, three facial feature extraction models corresponding to the mouth and nose area occluded by transparent, semi-transparent, and non-transparent objects respectively, and three facial feature extraction models corresponding to the eyes, mouth and nose area occluded by transparent, semi-transparent, and non-transparent objects respectively. Or it can be understood that the model search space includes: three facial feature extraction models corresponding to the nose area blocked by the mask (the mask only blocks the nose), mouth area (the mask only blocks the mouth), chin area (the mask is pulled down to only block the chin), and mouth and nose area (the mask blocks the nose and mouth), two facial feature extraction models corresponding to the forehead area blocked by the goggles (the goggles are pulled up to block the forehead) and eye area (the goggles only block the eyes), three facial feature extraction models corresponding to the forehead area, eye area, eye and forehead area blocked by the mask, one facial feature extraction model corresponding to the forehead area blocked by the hat, etc. That is, the facial feature extraction model corresponding to the combination of the above-mentioned occlusion area and occlusion type. It should be noted that the above-mentioned occlusion areas, occlusion types and combinations thereof, and the corresponding facial feature extraction models are only limited examples in the embodiments of the present invention and should not be regarded as limiting the rights of the present invention. There are other occlusion areas, occlusion types and combinations, which should also be considered as the intended scope of implementation of the present invention. For example, occlusion areas include left eye, right eye, left face, right face, etc., occlusion types include eye masks, monocular lenses, etc., and their combinations.

[0075] 102. Perform feature extraction on the face to be identified by using a face feature extraction model to obtain features of the face to be identified.

[0076] In the step, feature extraction is performed on the face to be identified by the facial feature extraction model searched in step 101, wherein the facial feature extraction model corresponds to the occluded area of ​​the face to be identified, for example, a facial feature extraction model corresponding to the forehead occluded area, a facial feature extraction model corresponding to the eye occluded area, a facial feature extraction model corresponding to the nose occluded area, a facial feature extraction model corresponding to the mouth occluded area, a facial feature extraction model corresponding to the chin occluded area, a facial feature extraction model corresponding to the mouth and nose occluded area, and a facial feature extraction model corresponding to the eye, mouth and nose occluded area.

[0077] After determining the facial feature extraction model, the face to be identified is input into the facial feature extraction model, and feature extraction is performed on the face to be identified to obtain the facial features of the face to be identified. By extracting features of the corresponding occluded face to be identified using different facial feature extraction models, facial features that are more in line with the scene can be obtained, thereby improving the accuracy of face recognition.

[0078] 103. Perform feature comparison between the facial features to be identified and the facial features in the base database corresponding to the facial feature extraction model.

[0079] In this step, the above-mentioned base database facial features refer to the facial features stored in the base database. The above-mentioned base database can also be called a face database, and the base database stores facial features corresponding to each person.

[0080] Furthermore, each facial feature extraction model corresponds to a base library, and further, each facial feature in each base library is extracted by the corresponding facial feature extraction model, and a corresponding relationship between the base library and the facial feature extraction model is established, so that the facial features to be identified extracted by the facial feature extraction model are always compared with the facial features in the base library. For example, for a face with an obstructed mouth and nose area, feature extraction is performed by the facial feature extraction model corresponding to the obstructed mouth and nose area, and the extracted facial features are stored in the corresponding base library that only stores facial features with obstructed mouth and nose areas, and a corresponding relationship is established between the base library storing facial features with obstructed mouth and nose areas and the facial feature extraction model corresponding to the obstructed mouth and nose areas, so that the facial features to be identified extracted by the facial feature extraction model corresponding to the obstructed mouth and nose areas are always compared with the facial features in the base library storing facial features with obstructed mouth and nose areas.

[0081] The feature comparison mentioned above refers to the similarity calculation between two facial features, and the similarity calculation mentioned above can be cosine similarity calculation, Euclidean distance similarity calculation, or other similarity calculation. In cosine similarity calculation, the closer the cosine value is to 1, the higher the similarity between the two facial features. In Euclidean distance similarity calculation, the smaller the distance value is, the higher the similarity between the two facial features.

[0082] Specifically, the features of the face to be identified are compared with the face features of the base database, that is, the features of the face to be identified are compared with each face feature of the base database to obtain the similarity between the face features of the face to be identified and each face feature of the base database.

[0083] 104. The facial feature in the base database with the highest similarity to the facial feature to be recognized is used as the target facial feature, and the facial recognition information corresponding to the target facial feature is indexed and output.

[0084] In this step, the facial features in the base database are mapped to the facial recognition information. The facial recognition information includes the name, address, contact information, ID number, access rights and other information of the person corresponding to the face. The facial recognition information can be provided by the user. For example, the user provides structured or semi-structured personnel information, which includes a facial image of the person and the name, address, contact information, ID number, access rights and other information corresponding to the person. The facial image is used to extract the facial features of the base database of the person. After the facial features of the base database of the person are extracted, the name, address, contact information, ID number, access rights and other information of the person are associated and mapped with the facial features of the base database of the person, so that the facial recognition information such as the name, address, contact information, ID number, access rights and other information of the person can be indexed through the facial features of the base database of the person.

[0085] After obtaining the facial recognition information corresponding to the target facial features, the facial recognition information is output to the corresponding terminal (such as access control, monitoring center, etc.) so that the corresponding terminal can process it according to the facial recognition information. For example, if it meets the access rights, the access control will be opened; if it does not meet the access rights, an alarm will be sounded, etc., or the facial recognition information can be displayed on the display screen of the monitoring center.

[0086] In an embodiment of the present invention, when it is detected that there is an occluded area in the face to be identified, a facial feature extraction model corresponding to the occluded area is searched in the model search space, wherein a facial feature extraction model in the model search space detects a type of facial features corresponding to the occluded area; feature extraction is performed on the face to be identified by the facial feature extraction model to obtain facial features to be identified; feature comparison is performed between the facial features to be identified and the facial features in the base database corresponding to the facial feature extraction model; the facial features in the base database with the highest similarity to the facial features to be identified are used as target facial features, and facial recognition information corresponding to the target facial features is indexed and output, wherein the facial features in the base database and the facial recognition information have a mapping relationship. By searching for the facial feature extraction model corresponding to the occluded area in the model search space and extracting facial features of the face to be identified through the targeted facial feature extraction model, the feature extraction effect of the face to be identified can be improved. By comparing the facial features of the face to be identified with the facial features of the base database corresponding to the facial feature extraction model, the feature comparison is performed at a finer granularity and is more targeted, thereby improving the recognition effect of the occluded face while avoiding the loss of facial information and the introduction of noise information.

[0087] It should be noted that the face recognition method provided in the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, servers, etc. that can perform face recognition.

[0088] Please refer to Figure 2 , Figure 2 A search flow chart of a face feature extraction model provided by an embodiment of the present invention, and Figure 1 The difference of step 101 in the embodiment is that the model search space includes multiple prediction modules, and the multiple prediction modules are used to construct a face feature extraction model, such as Figure 2 As shown, specifically including:

[0089] 201. According to the occluded area of ​​the face to be recognized, predict and search to obtain corresponding prediction module information.

[0090] In this step, the prediction module information includes the type of prediction module and the number of prediction modules. In a face feature extraction model, multiple prediction modules are included to extract corresponding features at each stage, and for multiple face feature extraction models, there may be one or more identical prediction modules to extract corresponding features.

[0091] When it is detected that there is an occluded area in the face to be identified, the corresponding prediction module information is predicted based on the occluded area, and the prediction module corresponding to the prediction module information is searched in the search space. For example, the search space includes prediction modules numbered 1, 2, 3...9, and the occluded area of ​​the face to be identified is the mouth and nose occluded area. If the face feature extraction model corresponding to the mouth and nose occluded area requires a stack of prediction modules numbered 2, 4, 6, 8, and 9, then the prediction module information that can be predicted based on the mouth and nose occluded area is (2, 4, 6, 8, 9), and then the prediction modules numbered 2, 4, 6, 8, and 9 are searched in the search space.

[0092] 202. Construct a corresponding facial feature extraction model based on the prediction module information.

[0093] In this step, the prediction module information includes the type of prediction module and the number of prediction modules. According to the prediction module information, prediction modules of corresponding type and number are searched in the search space, and each prediction module is stacked and connected to obtain a corresponding face feature extraction model.

[0094] Specifically, the above prediction module includes two input ports and one output port. When stacked, the first input port of the current nth prediction module is connected to the output port of the n-1th prediction module to obtain the output result of the n-1th prediction module, and the second input port of the current nth prediction module is connected to the output port of the n-2th prediction module to obtain the output result of the n-2th prediction module, and the output result of the above n-1th prediction module is added to the output result of the n-2th prediction module. When the calculation of the nth prediction module is completed, the corresponding output result is output through the output port, such as Figure 3 shown.

[0095] In an embodiment of the present invention, a facial feature extraction model is constructed by searching for prediction modules in a space, so that the facial feature extraction model can be fully generalized. Different facial feature extraction models can be constructed by stacking different prediction modules. It is not necessary to perform an overall structural design for each facial feature extraction model, thereby saving design costs. In addition, some repeated prediction modules can be repeatedly selected in the search space, and there is no need to repeatedly prepare the same prediction modules, thereby reducing the structural storage requirements of the facial feature extraction model.

[0096] It should be noted that the face recognition method provided in the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, servers, etc. that can perform face recognition.

[0097] Please refer to Figure 4 , Figure 4 A search flow chart of another face feature extraction model provided by an embodiment of the present invention, and Figure 2 The difference of the embodiment is that the prediction module includes mixed nodes, and the mixed nodes are connected by mixed operators. The mixed nodes and mixed operators are used in the prediction module, such as Figure 4 As shown, specifically including:

[0098] 401. According to the occluded area of ​​the face to be recognized, predict and search to obtain corresponding mixing node information and mixing operator information.

[0099] In this step, the above-mentioned mixed node represents an implicit information unit, and the above-mentioned mixed node information is such as a face feature map and a face tensor. The above-mentioned mixed operator includes basic operators, such as: convolution operator, pooling operator, connection operator, disconnection operator, etc. The above-mentioned basic operators include corresponding hyperparameters, such as convolution operator convolution size, convolution step size, and pooling operator includes pooling size and pooling step size.

[0100] In a possible embodiment, the above basic operators specifically include eight operators: 3×3 separate convolution, 5×5 separate convolution, 3×3 dilated convolution, 5×5 dilated convolution, 3×3 maximum pooling, 3×3 average pooling, direct connection, and disconnection.

[0101] Each mixing node is obtained by summing the previous mixing nodes after the mixing operator is calculated. The calculation of a single mixing operator between two mixing nodes is as follows:

[0102] In the above formula, x (j) is the jth mixing node, o (i,j) is a mixed operator from node i to node j, x (j) is the i-th mixing node.

[0103] Specifically, the above hybrid operator information includes the weight of each basic operator. The input of the hybrid operator is a hybrid node information. After the hybrid operator calculates the hybrid node information, the calculation result corresponding to the hybrid operator is obtained. The calculation result corresponding to the hybrid operator is weighted and summed through softmax to obtain the output of the hybrid operator. Each basic operator corresponds to a weight.

[0104] The formula for the mixing operator between two mixing nodes is as follows:

[0105] In the above formula, O is the basic operator set, o is the basic operator, α is the weight of the basic operator, is the mixing operator from mixing node i to mixing node j when the current input is x, o(x) is a basic operator when the current input is x, is the weight of a basic operator o from hybrid node i to hybrid node j.

[0106] 402. Construct a corresponding prediction module according to the hybrid node information and the hybrid operator information.

[0107] In this step, after searching for the hybrid node information and the hybrid operator information, the two hybrid nodes are connected by replacing the hybrid operator with the basic operator with the largest weight between the two hybrid nodes. The formula is as follows:

[0108] In the above, o (i,j) is the basic operator finally determined in the mixed node from node i to node j, O is the basic operator set, o is the basic operator, α is the weight of the basic operator, is the weight of a basic operator o from hybrid node i to hybrid node j.

[0109] Further, the structure of a prediction module is initialized and maintained. The structure of the prediction module includes four mixing nodes. The four mixing nodes constitute a directed acyclic graph. Every two mixing nodes are connected by a mixing operator composed of multiple basic operators. Each mixing node represents an intermediate process feature map of the face to be recognized. After searching for the mixing node information and the mixing operator information, the mixing operator between every two mixing nodes is replaced with the basic operator with the largest weight, so that every two mixing nodes in the four directed acyclic graphs are connected by only one basic operator, thereby obtaining a prediction module, such as Figure 5 As shown, Figure 5 In , 0, 1, 2, and 3 are mixed nodes, and multiple lines between two mixed nodes are mixed operators. According to this method, other prediction modules are obtained.

[0110] 403. According to the prediction module, a corresponding facial feature extraction model is constructed.

[0111] In this step, the above-mentioned prediction module includes two input ports and one output port. When the stack connection is used to construct the corresponding facial feature extraction model, the first input port of the current nth prediction module is connected to the output port of the n-1th prediction module to obtain the output result of the n-1th prediction module, and the second input port of the current nth prediction module is connected to the output port of the n-2th prediction module to obtain the output result of the n-2th prediction module, and the output result of the above-mentioned n-1th prediction module is added to the output result of the n-2th prediction module. When the calculation of the nth prediction module is completed, the corresponding output result is output through the output port.

[0112] In an embodiment of the present invention, a facial feature extraction model is constructed by searching for mixed nodes and mixed operators in a space, so that the facial feature extraction model can be fully generalized. Different facial feature extraction models are constructed by connecting various mixed nodes through different basic operators. There is no need to perform an overall structural design for each facial feature extraction model, thereby saving design costs. In addition, some repeated basic operators can be repeatedly selected in the search space without repeatedly preparing the same basic operators, thereby reducing the structural storage requirements of the facial feature extraction model.

[0113] It should be noted that the face recognition method provided in the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, servers, etc. that can perform face recognition.

[0114] Please refer to Figure 6 , Figure 6 A flow chart of a model search space optimization method provided by an embodiment of the present invention, such as Figure 6 As shown, including:

[0115] 601. Obtain a training set and a validation set.

[0116] In an embodiment of the present invention, the above-mentioned training set includes sample faces of various occlusion areas and / or occlusion types. The above-mentioned sample faces can be obtained by manually or automatically annotating face images captured by a camera, or can be obtained by manually or automatically annotating face images generated (for example, generated by a generative adversarial network).

[0117] The above-mentioned verification set includes sample faces of various occlusion areas and / or occlusion types. The above-mentioned sample faces can be obtained by manually or automatically annotating face images captured by a camera, or by manually or automatically annotating generated face images (for example, generated by a generative adversarial network).

[0118] It should be noted that the above-mentioned validation set and training set do not include the same sample faces.

[0119] 602. Construct a model search space.

[0120] In this step, the above-mentioned model search space may include multiple prediction modules, and different prediction modules can be designed according to different facial feature extraction models. Specifically, the facial feature extraction model is obtained by stacking and connecting multiple prediction modules, and the above-mentioned prediction modules can be convolution modules, pooling modules, activation modules, batch regularization modules, etc.

[0121] Optionally, the constructed model search space may include multiple hybrid nodes and hybrid operators, and the hybrid nodes are connected by hybrid operators. The hybrid operators include basic operators, such as convolution operators, pooling operators, connection operators, disconnection operators, etc. The basic operators include corresponding hyperparameters, such as convolution operator convolution size and convolution step size, and pooling operators include pooling size and pooling step size. In a possible embodiment, the basic operators specifically include eight operators: 3×3 separate convolution, 5×5 separate convolution, 3×3 dilated convolution, 5×5 dilated convolution, 3×3 maximum pooling, 3×3 average pooling, direct connection, disconnection, etc.

[0122] The above-mentioned hybrid nodes and hybrid operators are used to construct a prediction module.

[0123] 603. Initialize the training parameters of the prediction module, and calculate the initialization loss of the training parameters through the validation set.

[0124] In this step, the training parameters of the prediction modules are initialized so as to be fixed. The training parameters include the number and type of prediction modules corresponding to the facial feature extraction model.

[0125] The loss of the training parameters is evaluated on the validation set, and it is determined whether the loss converges. If it converges, a corresponding facial feature extraction model is constructed according to the training parameters of the initialization prediction module. If it does not converge, the process proceeds to step 604.

[0126] Optionally, the constructed model search space may include multiple hybrid nodes and hybrid operators, and the hybrid nodes are connected by hybrid operators. The training parameters of the hybrid operator are initialized to fix the training parameters, and the training parameters include the number of prediction modules corresponding to the facial feature extraction model and the type of hybrid operator required by the prediction module. The loss of the training parameters is evaluated on the validation set, and it is determined whether the loss converges. If converged, the corresponding facial feature extraction model is constructed according to the training parameters of the initialized hybrid operator. If not converged, proceed to step 604.

[0127] 604. If the initialization loss does not converge, the training parameters are iteratively trained in the training set, and the training parameters of the prediction module are adjusted by the stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges.

[0128] Calculate the gradient of the structural parameter corresponding to the training parameter, and optimize the structural parameter according to the stochastic gradient descent method. Predict the structural parameters in the module, such as the weight of the convolution module; the weight of the pooling module; the activation function of the activation module; the weight of the batch regularization module, etc. Fix the structural parameter corresponding to the training parameter, train the training parameter on the training set; optimize and adjust the training parameter. Then calculate the loss of the optimized and adjusted training parameter in the validation set, and determine whether the loss converges. If it does not converge, repeat step 604. If it converges, construct the corresponding facial feature extraction model according to the training parameters of the current prediction module. Specifically, when the loss converges, the prediction module with the largest value of the structural parameter (i.e., weight) is determined as its optimal prediction module, and then the corresponding facial feature extraction module is obtained by stacking the optimal prediction module.

[0129] Optionally, the constructed model search space may include multiple hybrid nodes and hybrid operators, and the hybrid nodes are connected by hybrid operators. The gradient of the structural parameter corresponding to the training parameter is calculated, and the structural parameter is optimized according to the stochastic gradient descent method. The structural parameters of the hybrid operator include the weights of the basic operator, etc. The structural parameters corresponding to the training parameter are fixed, and the training parameter is trained on the training set; the training parameter is optimized and adjusted. Then, the loss of the optimized and adjusted training parameter is calculated in the validation set, and it is determined whether the loss converges. If not, step 604 is repeated. If converged, the corresponding facial feature extraction model is constructed according to the training parameters of the current hybrid operator.

[0130] 605. When the loss of the training parameters calculated in the training set converges, the prediction module with the largest training parameters is used as the target prediction module.

[0131] Step 604 and step 605 are iterated repeatedly until the loss of the training parameters of the prediction module in the validation set converges, and then the prediction module corresponding to the current training parameters is determined as the target prediction module.

[0132] Optionally, the constructed model search space may include multiple hybrid nodes and hybrid operators, and the hybrid nodes are connected through hybrid operators. Specifically, when the loss converges, the basic operator with the largest structural parameter (i.e., weight) value in each hybrid operator is determined as the optimal operator, and then the various hybrid nodes are connected through the optimal operator to form the above-mentioned target prediction module.

[0133] 606. According to the target prediction module, a corresponding facial feature extraction model is constructed.

[0134] In this step, the above-mentioned prediction module includes two input ports and one output port. When the stack connection is used to construct the corresponding facial feature extraction model, the first input port of the current nth prediction module is connected to the output port of the n-1th prediction module to obtain the output result of the n-1th prediction module, and the second input port of the current nth prediction module is connected to the output port of the n-2th prediction module to obtain the output result of the n-2th prediction module, and the output result of the above-mentioned n-1th prediction module is added to the output result of the n-2th prediction module. When the calculation of the nth prediction module is completed, the corresponding output result is output through the output port.

[0135] Optionally, after constructing the corresponding facial feature extraction model, obtain the base database face recognition information, which includes the base database face image; extract the base database face features from the base database face image through the trained facial feature extraction model; store the base database face features extracted by different facial feature extraction models in the corresponding base database, and establish a mapping relationship between the base database face features and the base database face recognition information.

[0136] Specifically, the facial features of the base database have a mapping relationship with the facial recognition information of the base database. The above-mentioned facial recognition information of the base database includes information such as the facial image, name, address, contact information, ID number, access rights, etc. of the person corresponding to the face. The above-mentioned facial recognition information of the base database can be provided by the user. For example, the user provides structured or semi-structured personnel information, which includes the facial image of the person and the name, address, contact information, ID number, access rights, etc. corresponding to the person. The above-mentioned facial image is used to extract the facial features of the base database of the person. After the facial features of the base database of the person are extracted, the facial recognition information such as the name, address, contact information, ID number, access rights, etc. of the person are associated and mapped with the facial features of the base database of the person, so that the facial recognition information such as the name, address, contact information, ID number, access rights, etc. of the person can be indexed through the facial features of the base database of the person.

[0137] It should be noted that the face recognition method provided in the embodiment of the present invention can be applied to devices such as mobile phones, monitors, computers, servers, etc. that can perform face recognition.

[0138] See also Figure 7 , Figure 7 is a structural diagram of a face recognition device provided by an embodiment of the present invention, such as Figure 7 As shown, the device comprises:

[0139] A search module 701 is used for searching a face feature extraction model corresponding to the occluded area in a model search space when it is detected that the face to be identified has an occluded area, wherein a face feature extraction model in the model search space detects a type of face feature corresponding to the occluded area;

[0140] The first extraction module 702 is used to extract features of the face to be identified by using the face feature extraction model to obtain features of the face to be identified;

[0141] The calculation module 703 is used to compare the facial features to be identified with the facial features in the base database corresponding to the facial feature extraction model;

[0142] The output module 704 is used to take the database facial feature with the highest similarity to the facial feature to be identified as the target facial feature, index and output the facial recognition information corresponding to the target facial feature, wherein the database facial feature and the facial recognition information have a mapping relationship.

[0143] Optional, such as Figure 8 As shown, the search module 701 includes:

[0144] The acquisition submodule 7011 is used to acquire a face image to be recognized;

[0145] A detection submodule 7012 is used to detect whether there is an occlusion area on the face to be identified in the face image to be identified;

[0146] The judging submodule 7013 is used to judge the occlusion type of the occlusion area if there is an occlusion area in the face to be identified;

[0147] The first search submodule 7014 is used to search for a facial feature extraction model corresponding to the occlusion area and / or the occlusion type in the model search space according to the occlusion area and / or the occlusion type, wherein a facial feature extraction model in the model search space detects at least one face corresponding to the occlusion area, occlusion type, and a combination of the occlusion area and the occlusion type.

[0148] Optional, such as Fig. 9 As shown, the model search space includes multiple prediction modules, and the search module 701 includes:

[0149] The second search submodule 7015 is used to predict and search for corresponding prediction module information according to the occluded area of ​​the face to be identified;

[0150] The construction submodule 7016 is used to construct a corresponding facial feature extraction model according to the prediction module information.

[0151] Optional, such as Fig.10 As shown, the prediction module includes mixed nodes, and the mixed nodes are connected through mixed operators. The second search submodule 7015 includes:

[0152] The prediction unit 70151 is used to predict and search for corresponding mixing node information and mixing operator information according to the occluded area of ​​the face to be recognized;

[0153] The construction unit 70152 is used to construct a corresponding prediction module according to the hybrid node information and the hybrid operator information.

[0154] Optional, such as Fig.11 As shown, the device also includes:

[0155] A first acquisition module 705 is used to acquire a training set and a validation set;

[0156] A first construction module 706, used to construct a model search space, wherein the model search space includes a plurality of prediction modules;

[0157] A first initialization module 707, used to initialize the training parameters of the prediction module and calculate the initialization loss of the training parameters through the verification set;

[0158] A first iteration module 708, configured to iteratively train the training parameters in the training set if the initialization loss does not converge, and adjust the training parameters of the prediction module by a stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges;

[0159] A first determination module 709, configured to use the prediction module with the largest training parameter as a target prediction module when the loss of the training parameter calculated by the training set converges;

[0160] The second construction module 710 is used to construct a corresponding facial feature extraction model according to the target prediction module.

[0161] like Fig.12 As shown, the device also includes:

[0162] The second acquisition module 711 is used to acquire a training set and a validation set;

[0163] A third construction module 712 is used to construct a model search space, wherein the model search space includes a plurality of hybrid nodes, and the hybrid nodes are connected by hybrid operators;

[0164] A second initialization module 713, used to initialize the training parameters of the hybrid operator and calculate the initialization loss of the training parameters through the verification set;

[0165] A second iteration module 714 is used for iteratively training the training parameters in the training set if the initialization loss does not converge, and adjusting the training parameters of the hybrid operator by a stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges;

[0166] A second determination module 715 is configured to determine the mixing operator with the largest training parameter as the target mixing operator when the loss of the training parameters calculated by the training set converges;

[0167] A connection module 716, configured to connect corresponding mixing nodes through the target mixing operator to obtain a prediction module;

[0168] The fourth construction module 717 is used to construct a corresponding facial feature extraction model according to the prediction module.

[0169] Optional, such as Fig.13 , the device further comprises:

[0170] A third acquisition module 718 is used to acquire base database face recognition information, wherein the base database face recognition information includes base database face images;

[0171] The second extraction module 719 is used to extract the facial features of the base database from the base database facial images through the trained facial feature extraction model;

[0172] The association module 720 is used to store the base database facial features extracted by different facial feature extraction models into the corresponding base database, and establish a mapping relationship between the base database facial features and the base database facial recognition information.

[0173] It should be noted that the face recognition device provided in the embodiment of the present invention can be applied to mobile phones, monitors, computers, servers and other devices that can perform face recognition.

[0174] The face recognition device provided in the embodiment of the present invention can implement each process implemented by the face recognition method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.

[0175] See also Fig.14 , Fig.14 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Fig.14 As shown, it includes: a memory 1402, a processor 1401, and a computer program stored in the memory 1402 and executable on the processor 1401, wherein:

[0176] The processor 1401 is used to call the computer program stored in the memory 1402 and execute the following steps:

[0177] When it is detected that there is an occluded area in the face to be identified, searching for a face feature extraction model corresponding to the occluded area in the model search space, wherein a face feature extraction model in the model search space detects a type of face feature corresponding to the occluded area;

[0178] Extracting features of the face to be identified by using the face feature extraction model to obtain features of the face to be identified;

[0179] Perform feature comparison between the facial features to be identified and the facial features in the base database corresponding to the facial feature extraction model;

[0180] The base database facial feature with the highest similarity to the facial feature to be identified is used as the target facial feature, and the facial recognition information corresponding to the target facial feature is indexed and output, wherein the base database facial feature and the facial recognition information have a mapping relationship.

[0181] Optionally, the processor 1401 performs the step of searching for a facial feature extraction model corresponding to the occluded area in the model search space when an occluded area of ​​the face to be recognized is detected, including:

[0182] Obtain a face image to be recognized;

[0183] Detecting whether there is an occlusion area on the face to be identified in the face image to be identified;

[0184] If there is an occlusion area in the face to be recognized, determining the occlusion type of the occlusion area;

[0185] According to the occlusion area and / or the occlusion type, a facial feature extraction model corresponding to the occlusion area and / or the occlusion type is searched in the model search space, wherein a facial feature extraction model in the model search space detects at least one face corresponding to the occlusion area, occlusion type, and a combination of the occlusion area and the occlusion type.

[0186] Optionally, the model search space includes a plurality of prediction modules, and the processor 1401 performs the step of searching the model search space for a facial feature extraction model corresponding to the occluded area, including:

[0187] According to the occluded area of ​​the face to be recognized, predict and search to obtain corresponding prediction module information;

[0188] According to the prediction module information, a corresponding facial feature extraction model is constructed.

[0189] Optionally, the prediction module executed by the processor 1401 includes mixed nodes, the mixed nodes are connected by a mixed operator, and the prediction and search for corresponding prediction module information according to the occluded area of ​​the face to be identified includes:

[0190] According to the occluded area of ​​the face to be recognized, predict and search to obtain corresponding mixing node information and mixing operator information;

[0191] A corresponding prediction module is constructed according to the hybrid node information and the hybrid operator information.

[0192] Optionally, when it is detected that the to-be-recognized face has an occluded area, before searching the model search space for a face feature extraction model corresponding to the occluded area, the processor 1401 further executes the following steps:

[0193] Get the training set and validation set;

[0194] Constructing a model search space, wherein the model search space includes a plurality of prediction modules;

[0195] Initializing the training parameters of the prediction module, and calculating the initialization loss of the training parameters through the validation set;

[0196] If the initialization loss does not converge, iteratively training the training parameters in the training set, and adjusting the training parameters of the prediction module by stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges;

[0197] When the loss of the training parameters calculated by the training set converges, taking the prediction module with the largest training parameter as the target prediction module;

[0198] According to the target prediction module, a corresponding facial feature extraction model is constructed.

[0199] Optionally, when it is detected that the to-be-recognized face has an occluded area, before searching the model search space for a facial feature extraction model corresponding to the occluded area, the processor 1401 further executes the following steps:

[0200] Get the training set and validation set;

[0201] Constructing a model search space, wherein the model search space includes a plurality of hybrid nodes, and the hybrid nodes are connected by hybrid operators;

[0202] Initializing the training parameters of the hybrid operator, and calculating the initialization loss of the training parameters through the validation set;

[0203] If the initialization loss does not converge, iteratively training the training parameters in the training set, and adjusting the training parameters of the hybrid operator by a stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges;

[0204] When the loss of the training parameters calculated by the training set converges, the mixing operator with the largest training parameter is determined as the target mixing operator;

[0205] Connecting corresponding mixing nodes through the target mixing operator to obtain a prediction module;

[0206] According to the prediction module, a corresponding facial feature extraction model is constructed.

[0207] Optionally, the processor 1401 further executes:

[0208] Acquire database face recognition information, wherein the database face recognition information includes database face images;

[0209] Extracting base database facial features from the base database facial images through a trained facial feature extraction model;

[0210] The base database facial features extracted by different facial feature extraction models are stored in the corresponding base database, and a mapping relationship between the base database facial features and the base database facial recognition information is established.

[0211] It should be noted that the above-mentioned electronic devices may be mobile phones, monitors, computers, servers and other devices that can be used for face recognition.

[0212] The electronic device provided by the embodiment of the present invention can implement each process implemented by the face recognition method in the above method embodiment, and can achieve the same beneficial effects. To avoid repetition, it will not be described here.

[0213] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the face recognition method provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0214] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0215] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A face recognition method, characterized in that: The following steps are involved: When it is detected that there is an occluded area in the face to be identified, searching for a face feature extraction model corresponding to the occluded area in the model search space, wherein a face feature extraction model in the model search space detects a type of face feature corresponding to the occluded area; Extracting features of the face to be identified by using the face feature extraction model to obtain features of the face to be identified; Perform feature comparison between the facial features to be identified and the facial features in the base database corresponding to the facial feature extraction model; Taking the database facial feature with the highest similarity to the facial feature to be identified as the target facial feature, indexing and outputting the facial recognition information corresponding to the target facial feature, wherein the database facial feature and the facial recognition information have a mapping relationship; When an occluded area of ​​a face to be recognized is detected, searching for a face feature extraction model corresponding to the occluded area in a model search space includes: Obtain a face image to be recognized; Detecting whether there is an occlusion area on the face to be identified in the face image to be identified; If there is an occlusion area in the face to be recognized, determining the occlusion type of the occlusion area; According to the occlusion area and the occlusion type, searching for a face feature extraction model corresponding to the occlusion area and the occlusion type in a model search space, wherein a face feature extraction model in the model search space detects at least one face corresponding to the occlusion area, the occlusion type, and the combination of the occlusion area and the occlusion type; The model search space includes a plurality of prediction modules, and searching the face feature extraction model corresponding to the occluded area in the model search space includes: According to the occluded area of ​​the face to be recognized, predict and search to obtain corresponding prediction module information, wherein the prediction module information includes the type of prediction module and the number of prediction modules; According to the prediction module information, a corresponding face feature extraction model is constructed; The prediction module includes a mixing node, and the mixing nodes are connected by a mixing operator. The prediction and search for the corresponding prediction module information according to the occluded area of ​​the face to be identified includes: According to the occluded area of ​​the face to be recognized, predict and search to obtain corresponding mixing node information and mixing operator information; A corresponding prediction module is constructed according to the hybrid node information and the hybrid operator information.

2. The method according to claim 1, characterized in that When it is detected that the face to be recognized has an occluded area, before searching the model search space for a face feature extraction model corresponding to the occluded area, the method further includes: Get the training set and validation set; Constructing a model search space, wherein the model search space includes a plurality of prediction modules; Initializing the training parameters of the prediction module, and calculating the initialization loss of the training parameters through the validation set; If the initialization loss does not converge, iteratively training the training parameters in the training set, and adjusting the training parameters of the prediction module by stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges; When the loss of the training parameters calculated by the training set converges, taking the prediction module with the largest training parameter as the target prediction module; According to the target prediction module, a corresponding facial feature extraction model is constructed.

3. The method according to claim 1, characterized in that When it is detected that the face to be recognized has an occluded area, before searching the model search space for a face feature extraction model corresponding to the occluded area, the method further includes: Get the training set and validation set; Constructing a model search space, wherein the model search space includes a plurality of hybrid nodes, and the hybrid nodes are connected by hybrid operators; Initializing the training parameters of the hybrid operator, and calculating the initialization loss of the training parameters through the validation set; If the initialization loss does not converge, iteratively training the training parameters in the training set, and adjusting the training parameters of the hybrid operator by a stochastic gradient descent method until the loss of the training parameters calculated by the validation set converges; When the loss of the training parameters calculated by the training set converges, the mixing operator with the largest training parameter is determined as the target mixing operator; Connecting corresponding mixing nodes through the target mixing operator to obtain a prediction module; According to the prediction module, a corresponding facial feature extraction model is constructed.

4. The method according to claim 1, characterized in that The method further comprises: Acquire database face recognition information, wherein the database face recognition information includes database face images; Extracting base database facial features from the base database facial images through a trained facial feature extraction model; The base database facial features extracted by different facial feature extraction models are stored in the corresponding base database, and a mapping relationship between the base database facial features and the base database facial recognition information is established.

5. A face recognition device, characterized in that: The device comprises: A search module, for searching a face feature extraction model corresponding to the occluded area in a model search space when it is detected that the face to be identified has an occluded area, wherein a face feature extraction model in the model search space detects a type of face feature corresponding to the occluded area; A first extraction module, used for extracting features of the face to be identified by using the face feature extraction model to obtain features of the face to be identified; A calculation module, used for comparing the facial features to be identified with the facial features in the base database corresponding to the facial feature extraction model; An output module, used to take the database facial feature with the highest similarity to the facial feature to be identified as the target facial feature, index and output the facial recognition information corresponding to the target facial feature, wherein the database facial feature and the facial recognition information have a mapping relationship; The search module comprises: The acquisition submodule is used to acquire the face image to be recognized; A detection submodule, used to detect whether there is an occlusion area on the face to be identified in the face image to be identified; A judgment submodule, configured to judge the occlusion type of the occlusion area if there is an occlusion area in the face to be recognized; A first search submodule is used to search for a face feature extraction model corresponding to the occlusion area and the occlusion type in a model search space according to the occlusion area and the occlusion type, wherein a face feature extraction model in the model search space detects at least one face corresponding to the occlusion area, the occlusion type, and the combination of the occlusion area and the occlusion type; The model search space includes multiple prediction modules, and the search module includes: A second search submodule is used to predict and search for corresponding prediction module information according to the occluded area of ​​the face to be identified, wherein the prediction module information includes the type of prediction module and the number of prediction modules; A construction submodule is used to construct a corresponding face feature extraction model according to the prediction module information; The prediction module includes hybrid nodes, and the hybrid nodes are connected by hybrid operators. The second search submodule includes: A prediction unit, used to predict and search for corresponding mixing node information and mixing operator information according to the occluded area of ​​the face to be recognized; The construction unit is used to construct a corresponding prediction module according to the hybrid node information and the hybrid operator information.

6. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the face recognition method as claimed in any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the face recognition method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Block-based shielded face recognition algorithm

    CN108805040A

  • Methods, devices and system of face recognition and computer storage medium

    CN108875534A