Multi-model face recognition method and system and storage medium
By performing face recognition in multiple angle space domains and combining threshold judgment, the problem of high failure rate of face recognition in a single angle space domain is solved, and higher recognition accuracy and robustness are achieved, suitable for a variety of purposes Application in scenarios.
Patent Information
- Application Number
- CN202411294491.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing face recognition method of single-angle space domain is prone to failure in recognition due to light, occlusion and picture quality problems in different scenarios, and the threshold setting is too arbitrary, resulting in a high failure rate of face recognition that is not included in the database.
Using multi-model face recognition method, after dark primary color brightening processing, the face to be recognized and the face database data are identified in three angle spatial domains, combining matrix operations and threshold judgment to ensure the accuracy of the recognition results and robustness.
It effectively improves the accuracy and recognition success rate of face recognition, reduces the success rate of misrecognition of faces that are not included in the database, and is suitable for recognition applications in various scenarios.
Smart Images

Figure CN119131867A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a face recognition method, in particular to a multi-model face recognition method, system and storage medium. Background Art
[0002] The existing methods of using deep learning for face recognition are mainly based on a single angular space domain for face recognition. The common methods are: CosinFace, which maximizes the classification boundary in the cosine angular space domain to compare faces, AdaFace, which uses the feature norm as a proxy for image quality for face comparison, and ArcFace, which maximizes the classification boundary directly in the angular space domain. CosinFace is a deep learning model for face recognition that aims to improve the ability to distinguish and the recognition accuracy of facial features. The core idea of CosinFace is to enhance the recognition ability of the model by optimizing the angular (cosine) distance of facial features. AdaFace is an open source facial recognition technology that is mainly used to improve the accuracy and robustness of facial recognition systems under various conditions. ArcFace is a deep learning model for facial recognition that aims to improve the recognition accuracy and stability of facial features. Its core innovation is to optimize facial features in the feature space through the angular (arc) loss function, so that the feature vectors of the same category are more concentrated and the feature vectors of different categories are more dispersed. However, it is undeniable that different methods will produce different results for evaluating the same image, but they all follow the characteristic that the score of the same individual is the largest, that is, the intra-class features of the same category are closest.
[0003] However, the current single-angle spatial domain for face recognition usually has the following defects: (1) The problem of face recognition failure or unrecorded face recognition caused by the threshold. Each of the above three neural learning-based methods requires a threshold to be manually selected to intercept faces that are not in the database. The most common problem with a single threshold is that it is easy to make overly arbitrary judgments. (2) Face recognition failure or failure to effectively intercept faces that are not in the database due to image quality. Most existing face recognition systems are used in fixed places such as video access control and clocking in and out of work, which are all recognition in long-term fixed environments. In different places, it is easy to cause recognition failure due to the influence of light, occlusion, image brightness, clarity, etc. For example, pictures taken indoors are used as storage data, and random outdoor scenes are used as recognition data. Summary of the invention
[0004] In response to the above problems, the present invention provides a multi-model face recognition method, which uses multiple models for joint face recognition, effectively improving the accuracy of face recognition, more effectively suppressing and intercepting the misrecognition success rate of faces not stored in the database, and effectively improving the recognition success rate of face recognition in more scenarios.
[0005] The technical solution adopted by the present invention is: A multi-model face recognition method comprises the following steps: Step S1, image acquisition: performing dark primary color brightening processing on the face image data to be identified acquired by the camera and all face library data; Step S2: face recognition: Step S2.1, initial face recognition: The brightened face to be recognized and the brightened face library data obtained in step S1 are transmitted to the first angle space domain face recognition model, and the encoding result is subjected to matrix operation. After the matrix operation, a score for each face is obtained, and the faces are sorted according to the scores; Step S2.2, face recognition again: the original data of the 6 faces with the highest scores obtained in step S2.1 are brightened with the dark original color, and then the second angle space domain face recognition model and the third angle space domain face recognition model are performed together with the brightened face to be recognized. After completion, the face database data with the highest score in each angle space domain is transmitted to the next step; Step S3, identity ID judgment: the highest-scoring data of the three angle space domains are obtained to perform unique identity ID judgment to determine whether two or more angle space domains are the same individual. If the condition is met, go to step S4; if not, go to step S6; Step S4: Threshold score determination: Step S4.1, first threshold score judgment: Based on the condition of step S3, the first threshold score judgment is performed to determine whether the highest scores of all angle space domains are greater than or equal to the first threshold score. The face of the same person must have the ability that the similarity of each angle space domain is greater than or equal to the first threshold. If the condition is met, go to step S4.2; if the condition is not met, go to step S6; Step S4.2, second threshold score judgment: based on the result obtained in step S4.1, the second threshold score judgment is performed again to determine whether the highest scores (Top1 scores) of two or more angle space domains are greater than or equal to the second score threshold. If the condition is met, go to step S5; if the condition is not met, go to step S6; Step S5: Output the recognition success result: Output the result satisfying multiple angle space domains obtained in step S4.2 and issue a voice reminder that the face recognition is successful; Step S6: Output recognition failure results: Output the results that do not meet the conditions, give a voice prompt indicating face recognition failure, and go to step S1.
[0006] Preferably, in step S2.1, the algorithm in the first angle space domain face recognition model is modified and optimized based on the open source code AdaFace algorithm architecture. The entire algorithm is constructed in the form of feature coding and consists of two parts, mobilefacenet and head. The output channel of mobilefacenet is 1024; In the GDC model block structure, 1024 output dimensions are output inside the conv_sep block, the number of channels is 1024, and the normalized data is operated before input to limit the feature data to a specified numerical range of 0 to 1; the head part adopts the original Adaface angle maximization category method; after the modified algorithm training, the target model first angle space domain face recognition model is obtained; the matrix operation formula in the first angle space domain face recognition model in step S2.1 is , suppose a matrix of n rows * d columns is multiplied by a matrix of d rows * n columns, the result is a matrix of n rows * n columns, denoted as S; represents the element in the i-th row and j-th column of the result matrix S, then ,in Represents each feature vector matrix set output by the model, represents the transposed set of the set, and "·" represents the dot product operation of the vector; in the formula Representation vector The kth element of Representation vector The kth element of .
[0007] Preferably, in step S2.2, the algorithm of the second angle space domain face recognition model is optimized based on ArcFace under the insightface framework, and the entire algorithm is constructed in the form of feature coding; the algorithm backbone uses a lightweight shufflenet_v2_x1_5 as the backbone network for feature extraction, and the output channel is output according to 1280 channels; training is performed based on the optimized algorithm to obtain the target model second angle space domain face recognition model; in step S2.2, the algorithm of the third angle space domain face recognition model is modified based on the AdaFace algorithm framework, and the backbone network used is res2net18 as the backbone; after training, the target model third space domain face recognition model is obtained.
[0008] More preferably, in step S3, the unique identity ID is judged based on the picture name or directory name. The same individual should have the same individual data stored in the same directory or unique identity ID, and the judgment and restriction are performed based on the unique identity ID.
[0009] More preferably, in step S4.1, the first threshold score is set to 0.39; in step S4.2, the second threshold score is set to 0.515.
[0010] The present invention also provides a multi-model face recognition system, comprising: The image acquisition and image brightening unit is used to acquire the image data of the face to be identified and all the face library data, and perform dark primary color brightening processing on the acquired image data of the face to be identified and all the face library data; A face recognition unit, used for performing face recognition on the brightened face image data to be recognized and all face library data using a first angle space domain model, a second angle space domain model and a third angle space domain model; An identity ID judgment unit, used to perform unique identity ID judgment on the data with the highest scores in the three angle space domains; A threshold score determination unit, used to perform a threshold score determination on a picture with a unique identity ID; The result output unit is used to output the pictures that meet the requirements of multiple angle space domains and give a voice prompt indicating that the face recognition is successful, and to output the pictures that do not meet the requirements and give a voice prompt indicating that the face recognition fails.
[0011] Preferably, in the image acquisition and image brightening unit, a camera is used to acquire the image data of the face to be identified; in the face recognition unit, the brightened face to be identified and the brightened face library data are transmitted to the first angle space domain face recognition model, and the encoding result is subjected to matrix operation. After the matrix operation, a score for each face is obtained, and the scores are sorted according to the scores. The original data of the 6 faces in the face library with the highest scores are brightened with the dark primary color and then subjected to the second angle space domain face recognition model and the third angle space domain face recognition model together with the brightened current face to be identified. After completion, the highest score face library data in each angle space domain will be obtained; the formula for the matrix operation is: , suppose a matrix of n rows * d columns is multiplied by a matrix of d rows * n columns, the result is a matrix of n rows * n columns, denoted as S; represents the element in the i-th row and j-th column of the result matrix S, then ,in Represents each feature vector matrix set output by the model, represents the transposed set of the set, and "·" represents the dot product operation of the vector; in the formula Representation vector The kth element of Representation vector The kth element of .
[0012] More preferably, the identity ID judgment unit will obtain the data with the highest scores in the three angle space domains to perform a unique identity ID judgment to determine whether two or more angle space domains are the same individual, and judge based on the picture name or directory name. The same individual should have the same individual data stored in the same directory or a unique identity ID, and the judgment and restriction will be made based on the unique identity ID.
[0013] Preferably, in the threshold score judgment unit, it is first determined whether the highest scoring images in all angular space domains satisfy that they are all greater than or equal to a first threshold score, and then it is determined whether the images exceeding the first threshold score satisfy that two or more angular space domains have the highest scores greater than or equal to a second threshold score; the first threshold score is set to 0.39; the second threshold score is set to 0.515.
[0014] 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 multi-model face recognition method is implemented.
[0015] Compared with the prior art, the beneficial effects of the present invention are: a multi-model face recognition method provided by the present invention adopts multiple models for joint face recognition, reduces the face recognition failure rate caused by different external scenes, applies the results of multiple research directions to jointly determine the recognition results, reduces the face recognition failure rate caused by a single threshold, effectively improves the face recognition accuracy, more vigorously suppresses and intercepts the misrecognition success rate of faces not stored in the database, and effectively improves the recognition success rate of face recognition in more scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flowchart of an algorithm for a multi-model face recognition method provided by the present invention.
[0017] Figure 2 Arrange captions for images.
[0018] Figure 3 The effect of face recognition based on the algorithm flow of the multi-model face recognition method is compared in a single angle spatial domain when the target to be recognized is not stored in the database. Figure 1 .
[0019] Figure 4 The effect of face recognition based on the algorithm flow of the multi-model face recognition method is compared in a single angle spatial domain when the target to be recognized is not stored in the database. Figure 2 .
[0020] Figure 5Comparison of multi-model joint face recognition in a single angle spatial domain. The effect of face recognition according to the algorithm flow of the multi-model face recognition method is performed when the target to be recognized is stored in the database. Figure 1 .
[0021] Figure 6 Comparison of multi-model joint face recognition in a single angle spatial domain. The effect of face recognition according to the algorithm flow of the multi-model face recognition method is performed when the target to be recognized is stored in the database. Figure 2 .
[0022] Figure 7 This is the effect diagram of face recognition according to the algorithm flow of the multi-model face recognition method when the target to be identified is not in the database before the dark original color is brightened.
[0023] Figure 8 This is a diagram showing the effect of face recognition according to the algorithm flow of the multi-model face recognition method when the dark original color is brightened and the target to be identified is not in the database.
[0024] Fig. 9 This is a diagram showing the effect of face recognition when the target to be identified is stored in the database according to the algorithm flow of the multi-model face recognition method before the dark original color is brightened.
[0025] Fig.10 This is a diagram showing the effect of face recognition according to the algorithm flow of the multi-model face recognition method when the target to be identified is stored after the dark original color is brightened. DETAILED DESCRIPTION
[0026] The preferred embodiments of the present invention are described in detail with reference to the accompanying drawings.
[0027] Figure 1 , is a flowchart of an algorithm of a multi-model face recognition method provided by the present invention. Figure 1 As shown, the present invention provides a multi-model face recognition method, which specifically includes the following steps: Step S1, image acquisition: performing dark primary color brightening processing on the face image data to be identified acquired by the camera and all face library data; Step S2: face recognition: Step S2.1, initial face recognition: The brightened face to be recognized and the brightened face library data obtained in step S1 are transmitted to the first angle space domain face recognition model, and the encoding result is subjected to matrix operation. After the matrix operation, a score for each face is obtained, and the faces are sorted according to the scores; Step S2.2, face recognition again: the original data of the 6 faces with the highest scores obtained in step S2.1 are brightened with the dark original color, and then the second angle space domain face recognition model and the third angle space domain face recognition model are performed together with the brightened face to be recognized. After completion, the face database data with the highest score in each angle space domain is transmitted to the next step; Step S3, identity ID judgment: the highest-scoring data of the three angle space domains are obtained to perform unique identity ID judgment to determine whether two or more angle space domains are the same individual. If the condition is met, go to step S4; if not, go to step S6; Step S4: Threshold score determination: Step S4.1, first threshold score judgment: Based on the condition of step S3, the first threshold score judgment is performed to determine whether the highest scores of all angle space domains are greater than or equal to the first threshold score. The face of the same person must have the ability that the similarity of each angle space domain is greater than or equal to the first threshold. If the condition is met, go to step S4.2; if the condition is not met, go to step S6; Step S4.2, second threshold score judgment: based on the result obtained in step S4.1, the second threshold score judgment is performed again to determine whether the highest scores (Top1 scores) of two or more angle space domains are greater than or equal to the second threshold score. If the condition is met, go to step S5; if the condition is not met, go to step S6; Step S5: Output the recognition success result: Output the result satisfying multiple angle space domains obtained in step S4.2 and issue a voice reminder that the face recognition is successful; Step S6: Output recognition failure results: Output the results that do not meet the conditions, give a voice prompt indicating face recognition failure, and go to step S1.
[0028] The complete AdaFace algorithm consists of two parts: backbone (deep neural network model for feature extraction) and head (network part for final classification or regression, i.e., the component after the feature extraction network (backbone)). The entire algorithm is constructed in the form of feature encoding. In step S2.1, the algorithm in the first angle space domain face recognition model is mainly based on the open source code AdaFace algorithm architecture to modify and optimize the algorithm structure. The main modification is the backbone part, and the head part adopts the original Adaface angle maximization category method. The entire algorithm is constructed in the form of feature encoding. In the algorithm structure of the first-angle spatial domain face recognition model, the backbone part is replaced by mobilefacenet (an efficient facial recognition network) which is lighter than resnet (residual network, a deep neural network architecture), and the output channel of mobilefacenet is changed from 128 to a wider output 1024. Since the difference of human faces is mainly reflected in the local area of the face, compared with the overall features, the local area is more friendly to express the features of different people and categories. The fully connected layer pays more attention to the changes in the local area than the convolutional layer. The number of fully connected output channels will also affect the accuracy of the algorithm. The purpose of the modification is to prevent the algorithm from being unable to fully represent the current individual features, in addition to the need to modify the number of output channels of the last fully connected layer. The algorithm structure of the first spatial domain face recognition model also modifies the GDC model block structure (a convolutional neural network (CNN) structure used to improve image classification or target detection performance), and the internal output of the conv_sep block (referring to the separable convolution (Separable Convolution) structure used in the convolutional neural network) is expanded from 512 output dimensions to 1024 output dimensions. Based on the expanded 1024-dimensional data, the GDC model block plays a further extraction role. In combination with the feature extraction effect comparison, the present invention uses 1024 channels in the entire GDC model structure block to construct the model block, and its expression ability obviously exceeds the ability expressed by the original parameters. Therefore, the number of channels is modified to 1024 in the GDC model block, and the normalized data is operated before input to limit the feature data within the specified numerical range of 0 to 1. After the modified algorithm training, the target model AdaFace spatial domain face recognition model with higher accuracy is obtained, which is the first spatial domain face recognition model.
[0029] The matrix operation formula in the first angle space domain face recognition model in step S2.1 is , suppose a matrix of n rows * d columns is multiplied by a matrix of d rows * n columns, the result is a matrix of n rows * n columns, denoted as S; represents the element in the i-th row and j-th column of the result matrix S, then ,in Represents each feature vector matrix set output by the model, represents the transposed set of the set, and "·" represents the dot product operation of the vector; in the formula Representation vector The kth element of Representation vector The function of this formula is to calculate the inner product between the feature vectors to get the similarity score. The higher the score, the more similar the faces are, and the lower the score, the less similar the faces are.
[0030] In step S2.2, the algorithm of the second angle spatial domain face recognition model is optimized based on ArcFace under the insightface framework (an open source framework for facial recognition and face verification), and the entire algorithm is constructed in the form of feature encoding; the algorithm trunk uses the lightweight shufflenet_v2_x1_5 (a variant of the ShuffleNet V2 series, designed to achieve efficient computing performance and small model size on mobile devices and embedded devices) as the backbone network for feature extraction, and the output channel is output according to the number of channels of 1280. The present invention believes that the features of all channel numbers are meaningful, so a layer of hole convolution layer is connected before the maximum pooling for feature extraction, while ensuring that its parameter amount is within an acceptable range, the receptive field is increased and more context information between neurons is captured. The loss is calculated using the ArcFace angle space feature. At this point, the optimization model structure block is completed. Based on the optimized algorithm, training is performed to obtain the target model ArcFace spatial domain face recognition model, that is, the second angle spatial domain face recognition model.
[0031] In step S2.2, the algorithm of the third-angle spatial domain face recognition model is modified based on the AdaFace algorithm framework, and the backbone network used is res2net18 (an improved convolutional neural network based on the ResNet architecture, which enhances the feature expression ability of the network by introducing the Res2Net module) as the backbone. Compared with other lightweight backbones, this backbone has stronger feature extraction capabilities, and uses the last feature layer as the target feature for encoding and output, and uses the Cosin angle spatial domain (a spatial domain method that uses cosine similarity to analyze or process data) to calculate the loss. After training based on the optimized algorithm, the target model CosinFace spatial domain face recognition model, that is, the third-angle spatial domain face recognition model, is obtained.
[0032] In step S3, the unique identity ID is judged, which is mainly based on the image name or directory name. The same individual should have the same individual data stored in the same directory or a unique identity ID, and the judgment and restriction are made based on the unique identity ID.
[0033] In step S4.1, the first threshold score is set to 0.39; in step S4.2, the second score threshold is set to 0.515.
[0034] It is also noted that, since effective face recognition is required in a variety of scenarios, the first spatial domain uses the feature norm as a proxy for image quality, which is more adaptable to face recognition in a variety of scenarios. As the first model, it can more effectively pick out the most similar face from a face library containing various images of different quality, further improving the success rate of recognition. In addition, the method of brightening the image with a dark primary color used in step S1 and step S2.2 is used to brighten the image before recognition, which is an existing public method.
[0035] according to Figure 2 The photo arrangement shows that the regional face in the upper left corner of the picture is the face to be recognized, the regional face picture in the upper right corner (Top1 result picture) is the data with the highest score of the first-angle spatial domain face recognition model (Model 1) in the face library, and the corresponding value is the specific score, the regional face picture in the lower left corner (Top1 result picture) is the data with the highest score of the second-angle spatial domain face recognition model (Model 2) in the face library, and the corresponding value is the specific score, the regional face picture in the lower right corner (Top1 result picture) is the data with the highest score of the third-angle spatial domain face recognition model (Model 3) in the face library, and the corresponding value is the specific score. The green font in the center of the whole picture indicates that the face recognition is successful after the final logic, and the red font indicates that the face recognition fails after the final logic.
[0036] Figure 3 and Figure 4 , is a diagram showing the effect of single-angle spatial domain contrast multi-model joint face recognition in which face recognition is performed according to the algorithm flow of the multi-model face recognition method when the target to be recognized is not stored in the database; Figure 5 and Figure 6 , the effect diagram of face recognition in single angle spatial domain compared with multi-model joint face recognition when the target to be recognized is stored in the database according to the algorithm flow of multi-model face recognition method. Figure 3 , Figure 4 , Figure 5 and Figure 6The result picture can be compared with the difference between the single-angle spatial domain and the multi-model joint judgment by only looking at the recognition picture and the recognition score of a single-angle spatial domain. The single-angle spatial domain cannot effectively intercept the face data that has not been stored in the database due to the difficulty in determining the threshold of the score. However, the multi-model joint judgment can effectively intercept the faces that have not been stored in the database and ensure the recognition accuracy when the faces are stored in the database.
[0037] Figure 7 and Figure 8 , which is the effect diagram of face recognition according to the algorithm flow of the multi-model face recognition method before and after the dark primary color is brightened when the target to be recognized is not stored in the database; Fig. 9 and Fig.10 , is the effect diagram of face recognition according to the algorithm flow of the multi-model face recognition method when the target to be recognized is stored before and after the dark primary color is brightened. Figure 7 , Figure 8 , Fig. 9 and Fig.10 From the result picture, we can see that the brightened face recognition effectively intercepts the faces that are not stored in the database and prevents them from passing the recognition, and can ensure that the faces that are stored in the database pass the recognition.
[0038] The present invention provides a multi-model face recognition method, which adopts multiple models for joint face recognition, reduces the face recognition failure rate caused by different external scenes, applies the results of multiple research directions to jointly determine the recognition result, reduces the face recognition failure rate caused by a single threshold, effectively improves the face recognition accuracy, more strongly suppresses and intercepts the misrecognition success rate of faces not stored in the database, and effectively improves the recognition success rate of face recognition in more scenes.
[0039] It is worth noting that this multi-model face recognition includes two major stages: one-stage model design and two-stage logic construction. The first-stage model design mainly designs the three major spatial domain algorithms of the first spatial domain, the second spatial domain and the third spatial domain and trains them to obtain the corresponding models, namely the first-angle spatial domain face recognition model, the second-angle spatial domain face recognition model and the third-angle spatial domain face recognition model; the second-stage logic construction is mainly about how to reasonably use the three models so that the results can achieve the expected effect of reducing misidentification, that is, to reasonably use the three models according to the algorithm flow of a multi-model face recognition method provided by the present invention.
[0040] The present invention also provides a multi-model face recognition system, comprising: The image acquisition and image brightening unit is used to acquire the image data of the face to be identified and all the face library data, and perform dark primary color brightening processing on the acquired image data of the face to be identified and all the face library data; A face recognition unit, used for performing face recognition on the brightened face image data to be recognized and all face library data using a first angle space domain model, a second angle space domain model and a third angle space domain model; An identity ID judgment unit, used to perform unique identity ID judgment on the data with the highest scores in the three angle space domains; A threshold score determination unit, used to perform a threshold score determination on a picture with a unique identity ID; The result output unit is used to output the pictures that meet the requirements of multiple angle space domains and give a voice prompt indicating that the face recognition is successful, and to output the pictures that do not meet the requirements and give a voice prompt indicating that the face recognition fails.
[0041] Preferably, in the face recognition unit, the brightened face to be recognized and the brightened face library data are transmitted to the first spatial domain face recognition model, and the encoding result is subjected to matrix operation. After the matrix operation, the score of each face is obtained, and the scores are sorted according to the scores. The original data of the 6 faces in the face library with the highest scores are brightened with dark primary colors and then subjected to the second spatial domain face recognition model and the third spatial domain face recognition model again with the brightened current face to be recognized. After completion, the highest score face library data in each angle spatial domain will be obtained. The formula for matrix operation is: , suppose a matrix of n rows * d columns is multiplied by a matrix of d rows * n columns, the result is a matrix of n rows * n columns, denoted as S; represents the element in the i-th row and j-th column of the result matrix S, then ,in Represents each feature vector matrix set output by the model, represents the transposed set of the set, and "·" represents the dot product operation of the vector; in the formula Representation vector The kth element of Representation vector The kth element of .
[0042] The identity ID judgment unit will obtain the data with the highest scores in the three angle space domains to perform a unique identity ID judgment to determine whether two or more angle space domains are the same individual. The judgment is based on the image name or directory name. The same individual should have the same individual data stored in the same directory or a unique identity ID, and the judgment and restriction are performed based on the unique identity ID.
[0043] In the threshold score judgment unit, it is first determined whether the highest score images in all angular space domains satisfy that they are all greater than or equal to a first threshold score, and then it is determined whether the images exceeding the first threshold score have two or more angular space domains with the highest scores greater than or equal to a second threshold score; the first threshold score is set to 0.39; the second threshold score is set to 0.515.
[0044] 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 multi-model face recognition method is implemented.
[0045] In summary, the technical solution of the present invention can fully and effectively achieve the above-mentioned invention purpose, and the structure and functional principle of the present invention have been fully verified in the embodiments, and can achieve the expected effect and purpose. Without departing from the principle and essence of the present invention, various changes or modifications can be made to the embodiments of the invention. Therefore, the present invention includes all replacement contents within the scope mentioned in the scope of the patent application, and any equivalent changes made within the scope of the patent application of the present invention are within the scope of the patent application of this case.
Claims
1. A multi-model face recognition method, characterized in that: The following steps are involved: Step S1, image acquisition: performing dark primary color brightening processing on the face image data to be identified acquired by the camera and all face library data; Step S2: face recognition: Step S2.1, initial face recognition: The brightened face to be recognized and the brightened face library data obtained in step S1 are transmitted to the first angle space domain face recognition model, and the encoding result is subjected to matrix operation. After the matrix operation, a score for each face is obtained, and the faces are sorted according to the scores; Step S2.2, face recognition again: the original data of the 6 faces with the highest scores obtained in step S2.1 are brightened with the dark original color, and then the second angle space domain face recognition model and the third angle space domain face recognition model are performed together with the brightened face to be recognized. After completion, the face database data with the highest score in each angle space domain is transmitted to the next step; Step S3, identity ID judgment: the highest-scoring data of the three angle space domains are obtained to perform unique identity ID judgment to determine whether two or more angle space domains are the same individual. If the condition is met, go to step S4; if not, go to step S6; Step S4: Threshold score determination: Step S4.1, first threshold score judgment: Based on the condition of step S3, the first threshold score judgment is performed to determine whether the highest scores of all angle space domains are greater than or equal to the first threshold score. The face of the same person must have the ability that the similarity of each angle space domain is greater than or equal to the first threshold. If the condition is met, go to step S4.2; if the condition is not met, go to step S6; Step S4.2, second threshold score judgment: based on the result obtained in step S4.1, the second threshold score judgment is performed again to determine whether the highest scores of two or more angle space domains are greater than or equal to the second score threshold. If the condition is met, go to step S5; if the condition is not met, go to step S6; Step S5: Output the recognition success result: Output the result satisfying multiple angle space domains obtained in step S4.2 and issue a voice reminder that the face recognition is successful; Step S6: Output recognition failure results: Output the results that do not meet the conditions, give a voice prompt indicating face recognition failure, and go to step S1.
2. The multi-model face recognition method according to claim 1, characterized in that: In step S2.1, the algorithm in the first angle space domain face recognition model is modified and optimized based on the open source code AdaFace algorithm architecture. The entire algorithm is constructed in the form of feature coding and consists of two parts, mobilefacenet and head. The output channel of mobilefacenet is 1024; In the GDC model block structure, 1024 output dimensions are output inside the conv_sep block, the number of channels is 1024, and the normalized data is operated before input to limit the feature data to the specified numerical range of 0 to 1; the head part adopts the original Adaface angle maximization category method; after the modified algorithm training, the target model first angle space domain face recognition model is obtained; the matrix operation formula in the first angle space domain face recognition model in step S2.1 is , suppose a matrix of n rows * d columns is multiplied by a matrix of d rows * n columns, the result is a matrix of n rows * n columns, denoted as S; represents the element in the i-th row and j-th column of the result matrix S, then ,in Represents each feature vector matrix set output by the model, represents the transposed set of the set, "·" represents the dot product operation of the vector; in the formula Representation vector The kth element of Representation vector The kth element of .
3. The multi-model face recognition method according to claim 1, characterized in that: In step S2.2, the algorithm of the second-angle spatial domain face recognition model is optimized based on ArcFace under the insightface framework, and the entire algorithm is constructed in the form of feature encoding; the algorithm backbone uses a lightweight shufflenet_v2_x1_5 as the backbone network for feature extraction, and the output channel is output according to 1280 channels; based on the optimized algorithm, training is performed to obtain the target model second-angle spatial domain face recognition model; in step S2.2, the algorithm of the third-angle spatial domain face recognition model is modified based on the AdaFace algorithm framework, and the backbone network used is res2net18 as the backbone; after training, the target model third-angle spatial domain face recognition model is obtained.
4. The multi-model face recognition method according to claim 1, characterized in that: In step S3, the unique identity ID is judged based on the image name or directory name. The same individual should have the same individual data stored in the same directory or unique identity ID, and the judgment and restriction are performed based on the unique identity ID.
5. The multi-model face recognition method according to claim 1, characterized in that: In step S4.1, the first threshold score is set to 0.39; in step S4.2, the second threshold score is set to 0.
515.
6. A multi-model face recognition system, characterized in that: include: The image acquisition and image brightening unit is used to acquire the image data of the face to be identified and all the face library data, and perform dark primary color brightening processing on the acquired image data of the face to be identified and all the face library data; A face recognition unit, used for performing face recognition on the brightened face image data to be recognized and all face library data using a first angle space domain model, a second angle space domain model and a third angle space domain model; An identity ID judgment unit, used to perform unique identity ID judgment on the data with the highest scores in the three angle space domains; A threshold score determination unit, used to perform a threshold score determination on a picture with a unique identity ID; The result output unit is used to output the pictures that meet the requirements of multiple angle space domains and give a voice prompt indicating that the face recognition is successful, and to output the pictures that do not meet the requirements and give a voice prompt indicating that the face recognition fails.
7. The multi-model face recognition system according to claim 6, characterized in that: In the picture acquisition and picture brightening unit, a camera is used to acquire the picture data of the face to be identified; in the face recognition unit, the brightened face to be identified and the brightened face library data are transmitted to the first angle space domain face recognition model, and the encoding result is subjected to matrix operation. After the matrix operation, the score of each face is obtained, and the scores are sorted according to the scores. The original data of the 6 faces in the face library with the highest scores are brightened with dark primary colors and then subjected to the second angle space domain face recognition model and the third angle space domain face recognition model together with the brightened current face to be identified. After completion, the highest score face library data in each angle space domain will be obtained; the formula for matrix operation is: , suppose a matrix of n rows * d columns is multiplied by a matrix of d rows * n columns, the result is a matrix of n rows * n columns, denoted as S; represents the element in the i-th row and j-th column of the result matrix S, then ,in Represents each feature vector matrix set output by the model, represents the transposed set of the set, "·" represents the dot product operation of the vector; in the formula Representation vector The kth element of Representation vector The kth element of .
8. The multi-model face recognition system according to claim 6, characterized in that: The identity ID judgment unit will obtain the data with the highest scores in the three angle space domains to perform a unique identity ID judgment to determine whether two or more angle space domains are the same individual. The judgment is based on the image name or directory name. The same individual should have the same individual data stored in the same directory or a unique identity ID, and the judgment and restriction are performed based on the unique identity ID.
9. The multi-model face recognition system according to claim 6, characterized in that: In the threshold score judgment unit, it is first determined whether the highest score images in all angular space domains satisfy that they are all greater than or equal to a first threshold score, and then it is determined whether the images exceeding the first threshold score have two or more angular space domains with the highest scores greater than or equal to a second threshold score; the first threshold score is set to 0.39; the second threshold score is set to 0.
515.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the multi-model face recognition method as claimed in any one of claims 1 to 5.
