Artificial intelligence face recognition method and system
By acquiring multi-angle face image data and facial adjustment features, generating adjusted image data and determining learning coefficients, training facial feature recognition models, solving the problem of low facial recognition accuracy in the prior art, achieving higher accuracy and efficiency of identification.
Patent Information
- Application Number
- CN202411237006.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing facial facial recognition technology based on artificial intelligence is low in recognition accuracy when wearing glasses, masks or makeup on the face, affecting the effect of facial feature recognition.
By acquiring face image data and facial adjustment features from multiple angles, the adjusted image data is generated, and the learning coefficient is determined based on image data from different angles, which is used to train the facial feature recognition model and improve the learning intensity and training efficiency of the model.
It greatly improves the accuracy and efficiency of facial recognition, enhances the accuracy and efficiency of model training, and ensures accurate recognition capabilities under different outfits.
Smart Images

Figure CN119229500A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to an artificial intelligence face recognition method and system. Background Art
[0002] With the rapid development of artificial intelligence, all walks of life have begun to vigorously develop artificial intelligence technology to meet different industrial production or digital service needs. In particular, in order to meet the needs of intelligent access rights, artificial intelligence algorithms are used to develop facial recognition technology.
[0003] At present, when existing artificial intelligence-based face recognition is performed, the image obtained by photographing the face is usually used as the input of the facial feature recognition model, and the recognition results of each facial feature are obtained after running the recognition model. Among them, when the facial feature recognition model is learning, it is necessary to use the facial images of authorized people as training samples for learning. However, in the later stage of face recognition, the face may wear glasses, masks or makeup, which greatly affects the accuracy of face recognition. Summary of the invention
[0004] In view of this, the present invention provides an artificial intelligence face recognition method and system, the main purpose of which is to solve the problem of low accuracy of existing face recognition.
[0005] According to one aspect of the present invention, there is provided an artificial intelligence face recognition method, comprising:
[0006] Acquire first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face;
[0007] Adjusting the first facial feature identified in the first facial image data based on the facial adjustment feature to generate second facial image data, and retrieving a learning coefficient that matches the third facial image data obtained by shooting at a second angle and the second facial image data, wherein the learning coefficient is used to characterize the learning intensity of the model training;
[0008] Training an initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data, and the learning coefficient to obtain a facial feature recognition model that has completed model training;
[0009] Based on the facial feature recognition model, the collected face image is recognized and processed to obtain a face recognition result.
[0010] Further, the acquiring of first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face includes:
[0011] Displaying a first angle, and acquiring first facial image data obtained by photographing a target face at the first angle, wherein the first angle includes at least four directions of shooting angles;
[0012] Facial feature adjustment items are displayed, and facial adjustment features are determined through adjustment items selected by the target user from the facial feature adjustment items, wherein the facial feature adjustment items include content items that need to be adjusted for different facial features.
[0013] Further, adjusting the first facial feature identified in the first facial image data based on the facial adjustment feature to generate the second facial image data includes:
[0014] Determining a feature adjustment coefficient of the facial adjustment feature, and identifying a first facial feature in the first facial image data based on a feature segmentation model, the feature adjustment coefficient comprising a pixel size adjustment value and an edge definition adjustment value;
[0015] The first facial feature is adjusted based on the feature adjustment coefficient to obtain the second facial image data.
[0016] Further, the retrieving a learning coefficient matching the third facial image data obtained by shooting at a second angle and the second facial image data comprises:
[0017] Acquire third facial image data captured at a second angle, where the second angle is obtained by adjusting a preset angle value based on the first angle;
[0018] The learning coefficients that match the second facial image data and the third facial image data are matched based on a preset learning feature adjustment mapping relationship, wherein the preset learning feature adjustment mapping relationship stores learning coefficients corresponding to different facial feature comparison results.
[0019] Further, the adjusting the mapping relationship based on the preset learning feature to match the learning coefficients matching the second facial image data and the third facial image data includes:
[0020] extracting facial features from the second facial image data and the third facial image data, and comparing the facial features according to pixel features and color features to obtain a facial feature comparison result;
[0021] Based on the facial feature comparison result, a matching learning coefficient is queried from the preset learning feature adjustment mapping relationship.
[0022] Further, the training of the initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain the facial feature recognition model after model training includes:
[0023] Constructing an initial facial feature recognition model of a three-layer convolutional neural network, wherein the initial facial feature recognition model is a multi-input multi-output network, and the weights between the convolutional layers are configured based on the learning coefficients;
[0024] determining a learning association parameter between the first facial image data, the second facial image data, and the third facial image data, and determining a model training parameter based on the learning association parameter and the learning coefficient;
[0025] The initial facial feature recognition model is trained based on the first facial image data, the second facial image data, and the third facial image data marked with feature recognition tags, and when the model training parameters are matched, the model training is completed to obtain a facial feature recognition model.
[0026] Furthermore, the method further comprises:
[0027] The facial tags in the face recognition result are parsed, and the facial tags are cached or counted according to the access rights corresponding to the facial tags.
[0028] According to another aspect of the present invention, there is provided an artificial intelligence face recognition system, comprising:
[0029] An acquisition module, used to acquire first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face;
[0030] a calling module, configured to adjust the first facial feature identified in the first facial image data based on the facial adjustment feature, generate second facial image data, and call a learning coefficient matching the third facial image data obtained by shooting at a second angle and the second facial image data, wherein the learning coefficient is used to characterize the learning intensity of the model training;
[0031] A training module, used for training an initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain a facial feature recognition model that has completed model training;
[0032] The recognition module is used to perform recognition processing on the collected face image based on the facial feature recognition model to obtain a face recognition result.
[0033] Furthermore, the acquisition module includes:
[0034] A first acquisition unit is used to display a first angle and acquire first facial image data obtained by photographing a target face at the first angle, wherein the first angle includes at least four shooting angles;
[0035] The first determination unit is used to display facial feature adjustment items and determine facial adjustment features according to the adjustment items selected by the target user from the facial feature adjustment items, wherein the facial feature adjustment items include content items that need to be adjusted for different facial features.
[0036] Furthermore, the calling module includes:
[0037] an identification unit, configured to determine a feature adjustment coefficient of the facial adjustment feature, and identify a first facial feature in the first facial image data based on a feature segmentation model, wherein the feature adjustment coefficient includes a pixel size adjustment value and an edge definition adjustment value;
[0038] An adjustment unit is used to adjust the first facial feature based on the feature adjustment coefficient to obtain the second facial image data.
[0039] Furthermore, the calling module further includes:
[0040] A second acquisition unit is used to acquire third facial image data captured at a second angle, where the second angle is obtained by adjusting a preset angle value based on the first angle;
[0041] A matching unit is used to match the learning coefficients matching the second facial image data and the third facial image data based on a preset learning feature adjustment mapping relationship, wherein the preset learning feature adjustment mapping relationship stores the learning coefficients corresponding to the comparison results of different facial features.
[0042] Furthermore, in a specific application scenario, the matching unit is specifically used to extract facial features in the second facial image data and the third facial image data, and compare the facial features according to pixel features and color features to obtain facial feature comparison results; based on the facial feature comparison results, a matching learning coefficient is queried from the preset learning feature adjustment mapping relationship.
[0043] Furthermore, the training module includes:
[0044] A construction unit, used to construct an initial facial feature recognition model of a three-layer convolutional neural network, wherein the initial facial feature recognition model is a multi-input multi-output network, and the weights between the convolutional layers are configured based on the learning coefficients;
[0045] a second determining unit, configured to determine a learning association parameter between the first facial image data, the second facial image data, and the third facial image data, and determine a model training parameter based on the learning association parameter and the learning coefficient;
[0046] A training unit is used to train the initial facial feature recognition model based on the first facial image data, the second facial image data, and the third facial image data marked with feature recognition tags, and complete the model training when matching the model training parameters to obtain the facial feature recognition model.
[0047] Furthermore, the system further comprises:
[0048] The cache counting module is used to parse the facial tags in the face recognition results and cache or count them according to the access rights corresponding to the facial tags.
[0049] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned artificial intelligence face recognition method.
[0050] According to another aspect of the present invention, there is provided a terminal, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0051] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned artificial intelligence face recognition method.
[0052] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0053] The present invention provides an artificial intelligence face recognition method and system. First, first facial image data obtained by shooting a target face at a first angle and facial adjustment features matching the target face are obtained; first facial features recognized in the first facial image data are adjusted based on the facial adjustment features to generate second facial image data, and a learning coefficient matching third facial image data obtained by shooting at a second angle and the second facial image data is retrieved, wherein the learning coefficient is used to characterize the learning intensity of model training; an initial facial feature recognition model is trained based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain a facial feature recognition model that completes model training; and recognition processing is performed on the collected facial image based on the facial feature recognition model to obtain a facial recognition result. Compared with the prior art, the embodiment of the present invention adjusts the facial features of the first facial image data through facial adjustment features, and determines the model learning strength based on the second facial image data obtained by the facial feature adjustment and the third facial image data collected at different angles, thereby improving the comprehensiveness and diversity of facial image samples, greatly improving the accuracy of face recognition, and at the same time, greatly increasing the matching degree between model training and sample features, achieving a balanced configuration between model training accuracy and efficiency, thereby greatly improving the accuracy of the facial feature recognition model.
[0054] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0056] Figure 1 A flow chart of an artificial intelligence face recognition method provided by an embodiment of the present invention is shown;
[0057] Figure 2 Another artificial intelligence face recognition method flow chart provided by an embodiment of the present invention is shown;
[0058] Figure 3 A block diagram of an artificial intelligence face recognition system provided by an embodiment of the present invention is shown;
[0059] Figure 4A schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0060] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0061] The embodiment of the present invention provides an artificial intelligence face recognition method, such as Figure 1 As shown, the method includes:
[0062] 101. Acquire first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face.
[0063] In an embodiment of the present invention, in the process of sampling the image of the target face, it is necessary to shoot according to a preset first angle. The target face is the face of the target user who is expected to perform facial recognition. The first angle may include multiple shooting directions, such as the front, left, right, looking up, looking down, etc. In addition to entering the face image, the target user can also enter his or her own facial adjustment features through the human-computer interaction interface or the data entry interface. The facial adjustment features are additional facial features generated after beautifying, covering, and wearing operations on the face. For example, makeup, wearing a mask, wearing glasses, etc. The user can select one or more of the facial adjustment features according to his or her daily dressing habits, and after the user's selection, the system will associate the selected facial adjustment features with the target face, so as to retrieve the facial adjustment features that match the target face.
[0064] It should be noted that by providing users with the configuration function of facial adjustment features, the content of facial image data is enriched. At the same time, customized entry of facial image data is realized, providing more accurate and targeted training samples for the subsequent training of the initial facial feature recognition model, thereby improving the learning ability and robustness of the model.
[0065] 102. Adjust the first facial feature identified in the first facial image data based on the facial adjustment feature to generate second facial image data, and retrieve a learning coefficient that matches the third facial image data obtained by shooting at a second angle and the second facial image data.
[0066] In an embodiment of the present invention, after obtaining the first facial image data and facial adjustment features of a target face, each facial feature in the first facial image data is identified respectively to obtain the first facial feature, and the facial features matched in the first facial feature are adjusted based on the facial adjustment features to generate the second facial image data. For example, if the facial adjustment feature is glasses, the eye feature in the first facial feature is adjusted by using the glasses; if the facial adjustment feature is a mask, the nose, mouth and chin in the first facial feature are adjusted by using the mask. Then, the learning coefficient is retrieved according to the third facial image and the second facial image. The third facial image is a facial image taken according to the second angle. The second angle is a shooting direction different from the first angle, for example, the first angle includes the front, the left side, and the right side, and the second angle is the left side oblique 45° direction and the right side oblique 45° direction. The learning coefficient can be matched by a preset mapping relationship between the learning coefficient and the feature similarity between the above two images, for example, the mapping relationship between the learning coefficient and the feature similarity between the third facial image data and the second facial image data, the mapping relationship between the learning coefficient and the feature matching results of the third facial image data and the second facial image data, etc.
[0067] It should be noted that the learning coefficient is used to characterize the learning intensity of the model training, and the learning intensity may include one or more of the learning rate, batch size, number of iterations, and number of loops. If the adjusted second facial image data is more similar to the unadjusted third facial image data, the number of iterations and the number of loops may be reduced and the batch size may be increased; if the adjusted second facial image data is less similar to the unadjusted third facial image data, the number of iterations and the number of loops may be increased and the batch size may be increased. Determining the learning coefficient based on the second facial image data and the third facial image data can make the model training parameters corresponding to different target faces different, thereby improving the flexibility and pertinence of the model training.
[0068] 103. Train an initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data, and the learning coefficient to obtain a facial feature recognition model that has completed model training.
[0069] In the embodiment of the present invention, the first facial image data, the second facial image data and the third facial image data are used as training samples, and the learning coefficient is used as a model training process parameter to train the initial facial feature recognition model, thereby obtaining a trained facial feature recognition model. The initial facial feature recognition model may be a convolutional neural network, a recurrent neural network or a support vector machine, and may be a pre-trained model such as VGGFace, ResNet, Inception, FaceNet, or an improved model of the above models, which is not specifically limited in the embodiment of the present invention.
[0070] The learning intensity of the model training is determined by comparing the second facial image data after facial adjustment features are adjusted with the collected third facial image data, and the initial facial feature recognition model is trained using the first facial image data, the second facial image data and the third facial image data as training samples. This can ensure the accuracy of the model while increasing the speed of model training as much as possible, thereby improving the efficiency of model training.
[0071] 104. Perform recognition processing on the collected face image based on the facial feature recognition model to obtain a face recognition result.
[0072] In an embodiment of the present invention, after the training of the initial facial feature recognition model is completed. When the user makes a face recognition request through the client, the image acquisition terminal collects the face image of the target user, and recognizes the face image through the facial feature recognition model to obtain the face recognition result of the current target user. Among them, the face recognition result includes the recognition result of the face image and the corresponding identity or authority, and the matching result with other relevant information. For example, the identity of the target user corresponding to the face image, the authority of the target user corresponding to the face image, and whether the identity of the target user corresponding to the face image matches the card swiping information, etc.
[0073] It should be noted that the training samples of the facial feature recognition model include facial images of the target user at multiple angles, which ensures the comprehensiveness of the image angles, reduces the angle requirements of the facial image, and improves the efficiency of facial image recognition. Furthermore, the adjustment of the original collected facial image according to the facial adjustment features selected by the target user ensures the learning ability of the model, and can also ensure the accuracy of facial recognition in the scenario where the target user is dressed up or wearing something, thereby improving the efficiency and accuracy of facial recognition.
[0074] In an embodiment of the present invention, for further explanation and limitation, as Figure 2 As shown, step 101 acquires first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face, including:
[0075] 201. Display a first angle, and obtain first facial image data obtained by photographing a target face according to the first angle.
[0076] 202. Display facial feature adjustment items, and determine facial adjustment features according to the adjustment items selected by the target user from the facial feature adjustment items.
[0077] In an embodiment of the present invention, the client for performing image acquisition on the target user is a human-computer interaction device with display function and input function. When the user initiates a facial image acquisition request, the first angle is displayed through the human-computer interaction interface, so that the user can shoot according to the specific shooting angle defined in the first angle. Among them, the first angle includes at least four shooting angles, for example, front shooting, left shooting, right shooting, and bottom shooting. The first facial image data also includes images obtained by shooting in at least four directions. After completing the facial image acquisition at the first angle, the facial feature adjustment items are output in the display interface for the target user to select the required facial feature adjustment items. Among them, the facial feature adjustment items include content items that need to be adjusted for different facial features. For example, makeup, wearing a hat, wearing glasses, wearing a mask, etc. Among them, makeup can be further divided into light makeup and heavy makeup, and glasses can be divided into sunglasses and ordinary myopic glasses, etc. Users can make choices based on their daily makeup and clothing habits. For example, if the current user usually wears heavy makeup and masks, they can select heavy makeup and hats from the facial feature adjustment items on the interface; if the current user often wears myopic glasses and light makeup, they can select light makeup and glasses from the facial feature adjustment items on the interface. When the target user completes the selection of facial feature adjustment items and clicks the control for indicating confirmation or submission, the facial adjustment features associated with this user are generated based on the user's selection operation.
[0078] It should be noted that in the process of collecting facial images of target users, facial feature adjustment items are displayed to users through a human-computer interaction interface so that users can select image adjustment features according to their daily habits, achieve customized configuration of facial adjustment features, avoid adjusting all features of facial images, greatly reduce the amount of image feature processing calculations and the difficulty of training facial feature recognition models, make model training more targeted, and thus improve the accuracy of model recognition. In addition, the facial feature recognition model is trained based on feature-adjusted images, so that the model has accurate recognition capabilities for users in different costumes, avoids multiple unsuccessful recognition attempts by users, and thus greatly improves the efficiency of facial recognition.
[0079] In one embodiment of the present invention, for further explanation and limitation, the step of adjusting the first facial feature identified in the first facial image data based on the facial adjustment feature to generate the second facial image data includes:
[0080] determining a feature adjustment coefficient for the facial adjustment feature, and identifying a first facial feature in the first facial image data based on a feature segmentation model;
[0081] The first facial feature is adjusted based on the feature adjustment coefficient to obtain the second facial image data.
[0082] In the embodiment of the present invention, the feature adjustment coefficient is used to characterize the amplitude of the feature adjustment. The larger the value of the feature adjustment coefficient, the larger the adjustment amplitude. The feature adjustment coefficient includes a pixel size adjustment value and an edge definition adjustment value. Among them, the edge definition adjustment value can be specifically divided into a sharpness adjustment value, a detail adjustment value, a contour adjustment value, etc. The feature adjustment coefficient varies according to different facial adjustment features. For example, the feature adjustment coefficient of light makeup is smaller than the feature adjustment coefficient of heavy makeup, and the feature adjustment coefficient of glasses is smaller than the feature adjustment coefficient of masks. The determination of the facial adjustment coefficient can be determined based on the mapping relationship between different pre-constructed facial adjustment features and different adjustment coefficients. The facial adjustment feature is adjusted separately for each feature in the face image. Therefore, before adjusting based on the feature adjustment coefficient, it is also necessary to perform feature segmentation and recognition on the first facial data through a feature segmentation model to obtain multiple facial features constituting the face image, that is, the first facial feature. Among them, the feature segmentation model can be one of the segmentation models obtained by combining a full convolutional network, a U-Net, and a deep convolutional neural network and a probabilistic graph model, which is not specifically limited in the embodiment of the present invention. The first facial feature can include multiple features such as a nose, a forehead, eyes, a cheek, and a mouth. When the facial adjustment features include two or more, the adjustment of the facial image includes both the adjustment of the corresponding first facial feature based on a single facial adjustment feature and the adjustment of two or more features of the first facial feature based on the permutation and combination of the facial adjustment features. For example, if the facial adjustment features include makeup, glasses, and masks, the second facial image data includes images adjusted based on makeup, images adjusted based on glasses, images adjusted based on masks, images adjusted based on makeup and glasses, images adjusted based on masks and makeup, images adjusted based on masks and glasses, and images adjusted based on glasses, masks, and makeup together. Among them, the specific feature adjustment process can be adjusted through a preset beauty template in a manner similar to the adjustment method of the beauty camera function. For example, eye beauty templates, skin color adjustment templates, glasses templates, hat templates, etc.
[0083] In one embodiment of the present invention, for further explanation and limitation, the step of retrieving the learning coefficients matching the third facial image data obtained by shooting at the second angle and the second facial image data includes:
[0084] Acquire third facial image data captured at a second angle;
[0085] The mapping relationship is adjusted based on a preset learning feature to match the learning coefficients that match the second facial image data and the third facial image data.
[0086] In an embodiment of the present invention, in order to collect more comprehensive facial image information, on the basis of sampling the facial image at the first angle, it is also necessary to collect and obtain the third facial image data based on the second angle. The second angle is obtained by adjusting the preset angle value based on the first angle. For example, the pre-trial angle value is 45°, and the first angle includes frontal shooting, left side shooting, right side shooting, and bottom shooting. Then the second angle includes 45° to the left and 45° to the right based on the front as the reference as the shooting direction, and 45° upwards based on the bottom as the reference as the shooting angle. After the third facial image data is collected, the second facial image data and the third facial image data are compared to obtain the facial feature comparison result between the two groups of images, and then the learning coefficient matching the facial feature comparison result is matched from the preset learning feature adjustment mapping relationship. The preset learning feature adjustment mapping relationship stores the learning coefficients corresponding to different facial feature comparison results.
[0087] It should be noted that, since different facial feature adjustment items correspond to different feature adjustment coefficients and adjustment ranges, the difference in facial images of different target users after the same facial feature adjustment is also different, and the difficulty of model training is also different. Therefore, the facial image after facial feature adjustment is compared with facial images at different angles to determine the degree of change of the facial image after feature adjustment, and then determine the training intensity of the model according to the degree of change. If the degree of change is large, the training intensity of the model is correspondingly large, and if the degree of change is small, the training intensity of the model is correspondingly small. By determining the learning coefficient, the training process of facial feature recognition can be controlled more accurately, the learning ability of the model can be ensured, and the training difficulty and number of cycles can be reduced as much as possible, thereby improving the efficiency of model training.
[0088] In one embodiment of the present invention, for further explanation and limitation, the step of adjusting the mapping relationship based on the preset learning feature to match the learning coefficients matching the second facial image data and the third facial image data includes:
[0089] extracting facial features from the second facial image data and the third facial image data, and comparing the facial features according to pixel features and color features to obtain a facial feature comparison result;
[0090] Based on the facial feature comparison result, a matching learning coefficient is queried from the preset learning feature adjustment mapping relationship.
[0091] In the embodiment of the present invention, in order to ensure the accuracy of the comparison between the second facial image data and the third facial image data, facial features are extracted from the images respectively, and each facial feature is compared from two dimensions of pixel features and color features. Among them, the facial features can be extracted by SIFT (Scale-Invariant Feature Transform) or HOG (Histogram of Oriented Gradients) algorithm. Then, the facial features at the same position in the second facial image data and the third facial image data are compared for similarity according to color features and pixel features respectively. For a certain facial feature, the comparison results of its color features and pixel features respectively can be added as the comparison result of this facial feature, or the color feature comparison result or pixel feature comparison result representing the highest similarity can be used as the comparison result of this facial feature, which is not specifically limited in the embodiment of the present invention. After the comparison results of each facial feature in the facial image are completed, a learning coefficient matching the current facial feature comparison result is matched from the preset learning feature adjustment mapping relationship. Among them, the preset learning feature adjustment mapping relationship stores the learning coefficients corresponding to different facial feature comparison results.
[0092] In one embodiment of the present invention, for further explanation and limitation, the step of training the initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain the facial feature recognition model that completes the model training includes:
[0093] Construct an initial facial feature recognition model with a three-layer convolutional neural network;
[0094] determining a learning association parameter between the first facial image data, the second facial image data, and the third facial image data, and determining a model training parameter based on the learning association parameter and the learning coefficient;
[0095] The initial facial feature recognition model is trained based on the first facial image data, the second facial image data, and the third facial image data marked with feature recognition tags, and when the model training parameters are matched, the model training is completed to obtain a facial feature recognition model.
[0096] In the embodiment of the present invention, the initial facial feature recognition model is a three-layer convolutional neural network of a multi-input multi-output network. The weights between the convolutional layers are configured based on the learning coefficients. Among them, different convolutional layers correspond to the extraction of different facial features. Since the corresponding learning coefficients are determined by the comparison results of different facial features, the weights of the convolutional layers of the corresponding facial features can be configured based on the learning coefficients of the corresponding facial features. Specifically, the weights between the convolutional layers can be calculated according to the following formula:
[0097]
[0098] Among them, m i is the learning coefficient corresponding to facial feature i, n is the total number of facial features, W is the weight of the convolutional layer corresponding to facial feature i, is an adjustment coefficient, which can be a number less than 1 such as 0.3, 0.5, etc. The learning association parameter is determined based on the similarity matching result between the first facial image data, the second facial image data and the third facial image data. The greater the similarity, the greater the learning association parameter, and the relatively smaller the error allowed for training; the smaller the similarity, the smaller the learning association parameter, and the relatively larger the error allowed for training. For example, if the average similarity of the three facial images is 80%, the learning association parameter is 0.8, and if the average similarity of the three facial images is 50%, the learning association parameter is 0.5. The model training parameters are further determined based on the learning coefficient and the learning association parameter. Among them, the model training parameters include learning rate, batch size, number of iterations, number of cycles and target error. Among them, the learning rate, batch size, number of iterations, number of cycles are determined based on the mapping relationship between different learning coefficients and different learning rates, different batch sizes, different number of iterations and different number of cycles. The target error is calculated based on the learning association parameter and the learning coefficient, and the specific formula is:
[0099]
[0100] Among them, θ is the basic error, m i is the learning coefficient corresponding to facial feature i, n is the total number of facial features, k is the learning correlation parameter, and μ is the target error. Each feature in the first facial image data, the second facial image data, and the third facial image data is marked respectively, and the initial facial feature recognition model is trained based on the marked first facial image data, the second facial image data, and the third facial image data. When the real-time training parameters of the model meet the model training parameters, the model training is completed, and a trained facial feature recognition model is obtained. The model training can be determined to be completed when both the number of iterations and the learning rate are reached; or the model training can be determined to be completed when the error value is less than or equal to the target error.
[0101] The number of iterations and errors of model training are determined based on the learning correlation parameters and learning coefficients, so that the training accuracy of the model can be adjusted with the degree of difference between features and images. On the basis of ensuring the accuracy of model training, the efficiency of model training can be improved as much as possible.
[0102] In an embodiment of the present invention, for further explanation and limitation, the method further includes:
[0103] The facial tags in the face recognition result are parsed, and the facial tags are cached or counted according to the access rights corresponding to the facial tags.
[0104] In the embodiment of the present invention, the facial feature recognition model that has been trained can be specifically applied to multiple application scenarios such as factories, scientific research institutions, schools, and enterprises. In different application scenarios, the content of the target label and access rights can be customized. For example, the facial label can be the name, work number, ID number, student number, and other information of the target user. The access rights can be clocking in and out of work, entering and leaving the factory during working hours, entering and leaving the campus on weekdays, entering and leaving important departments, entering and leaving key control areas, etc. For the same facial label, each time the corresponding image is recognized, that is, when the result of recognizing the face image is the same facial label, the face recognition information can be cached or the number of face recognitions can be counted under the corresponding access rights for this facial label. Thereby, the statistics and records of the occurrence time of different access rights for different personnel can be realized, so as to count and control the behavior of personnel. For example, if the current access right is clocking in for work, the time of the current successful clocking in is cached, and the number of clocking in for work of the recognized facial label is increased by 1.
[0105] The present invention provides an artificial intelligence face recognition method. First, first facial image data obtained by shooting a target face at a first angle and facial adjustment features matching the target face are obtained; first facial features recognized in the first facial image data are adjusted based on the facial adjustment features to generate second facial image data, and a learning coefficient matching third facial image data obtained by shooting at a second angle and the second facial image data is retrieved, wherein the learning coefficient is used to characterize the learning intensity of model training; an initial facial feature recognition model is trained based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain a facial feature recognition model that completes model training; and recognition processing is performed on the collected facial image based on the facial feature recognition model to obtain a face recognition result. Compared with the prior art, the embodiment of the present invention adjusts the facial features of the first facial image data through facial adjustment features, thereby improving the comprehensiveness and diversity of facial image samples and greatly improving the accuracy of face recognition. In addition, the model learning intensity is determined based on the second facial image data obtained based on the facial feature adjustment and the third facial image data collected at different angles, which greatly increases the matching degree between model training and sample features, and achieves a balanced configuration between model training accuracy and efficiency, thereby greatly improving the accuracy of the facial feature recognition model.
[0106] Furthermore, as a response to the above Figure 1The embodiment of the present invention provides an artificial intelligence face recognition system, such as Figure 3 As shown, the system includes:
[0107] An acquisition module 31 is used to acquire first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face;
[0108] A retrieving module 32, configured to adjust the first facial feature identified in the first facial image data based on the facial adjustment feature to generate second facial image data, and retrieve a learning coefficient matching the third facial image data obtained by shooting at a second angle and the second facial image data, wherein the learning coefficient is used to characterize the learning intensity of the model training;
[0109] A training module 33, configured to train an initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain a facial feature recognition model that has completed model training;
[0110] The recognition module 34 is used to perform recognition processing on the collected face image based on the facial feature recognition model to obtain a face recognition result.
[0111] Furthermore, the acquisition module 31 includes:
[0112] A first acquisition unit is used to display a first angle and acquire first facial image data obtained by photographing a target face at the first angle, wherein the first angle includes at least four shooting angles;
[0113] The first determination unit is used to display facial feature adjustment items and determine facial adjustment features according to the adjustment items selected by the target user from the facial feature adjustment items, wherein the facial feature adjustment items include content items that need to be adjusted for different facial features.
[0114] Furthermore, the calling module 32 includes:
[0115] an identification unit, configured to determine a feature adjustment coefficient of the facial adjustment feature, and identify a first facial feature in the first facial image data based on a feature segmentation model, wherein the feature adjustment coefficient includes a pixel size adjustment value and an edge definition adjustment value;
[0116] An adjustment unit is used to adjust the first facial feature based on the feature adjustment coefficient to obtain the second facial image data.
[0117] Furthermore, the calling module 32 further includes:
[0118] A second acquisition unit is used to acquire third facial image data captured at a second angle, where the second angle is obtained by adjusting a preset angle value based on the first angle;
[0119] A matching unit is used to match the learning coefficients matching the second facial image data and the third facial image data based on a preset learning feature adjustment mapping relationship, wherein the preset learning feature adjustment mapping relationship stores the learning coefficients corresponding to the comparison results of different facial features.
[0120] Furthermore, in a specific application scenario, the matching unit is specifically used to extract facial features in the second facial image data and the third facial image data, and compare the facial features according to pixel features and color features to obtain facial feature comparison results; based on the facial feature comparison results, a matching learning coefficient is queried from the preset learning feature adjustment mapping relationship.
[0121] Furthermore, the training module 33 includes:
[0122] A construction unit, used to construct an initial facial feature recognition model of a three-layer convolutional neural network, wherein the initial facial feature recognition model is a multi-input multi-output network, and the weights between the convolutional layers are configured based on the learning coefficients;
[0123] a second determining unit, configured to determine a learning association parameter between the first facial image data, the second facial image data, and the third facial image data, and determine a model training parameter based on the learning association parameter and the learning coefficient;
[0124] A training unit is used to train the initial facial feature recognition model based on the first facial image data, the second facial image data, and the third facial image data marked with feature recognition tags, and complete the model training when matching the model training parameters to obtain the facial feature recognition model.
[0125] Furthermore, the system further comprises:
[0126] The cache counting module is used to parse the facial tags in the face recognition results and cache or count them according to the access rights corresponding to the facial tags.
[0127] The present invention provides an artificial intelligence face recognition system. First, first facial image data obtained by shooting a target face at a first angle and facial adjustment features matching the target face are obtained; first facial features recognized in the first facial image data are adjusted based on the facial adjustment features to generate second facial image data, and a learning coefficient matching third facial image data obtained by shooting at a second angle and the second facial image data is retrieved, wherein the learning coefficient is used to characterize the learning intensity of model training; an initial facial feature recognition model is trained based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain a facial feature recognition model that completes model training; and recognition processing is performed on the collected facial image based on the facial feature recognition model to obtain a facial recognition result. Compared with the prior art, the embodiment of the present invention adjusts the facial features of the first facial image data through facial adjustment features, and determines the model learning strength based on the second facial image data obtained by the facial feature adjustment and the third facial image data collected at different angles, thereby improving the comprehensiveness and diversity of facial image samples, greatly improving the accuracy of face recognition, and at the same time, greatly increasing the matching degree between model training and sample features, achieving a balanced configuration between model training accuracy and efficiency, thereby greatly improving the accuracy of the facial feature recognition model.
[0128] According to one embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the artificial intelligence face recognition method in any of the above method embodiments.
[0129] Figure 4 A schematic diagram of the structure of a terminal provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the terminal.
[0130] like Figure 4 As shown, the terminal may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0131] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0132] The communication interface 404 is used for network communication with other devices such as a client or other servers.
[0133] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned artificial intelligence face recognition method embodiment.
[0134] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0135] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the terminal may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0136] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0137] The program 410 may be specifically configured to enable the processor 402 to perform the following operations:
[0138] Acquire first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face;
[0139] Adjusting the first facial feature identified in the first facial image data based on the facial adjustment feature to generate second facial image data, and retrieving a learning coefficient that matches the third facial image data obtained by shooting at a second angle and the second facial image data, wherein the learning coefficient is used to characterize the learning intensity of the model training;
[0140] Training an initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data, and the learning coefficient to obtain a facial feature recognition model that has completed model training;
[0141] Based on the facial feature recognition model, the collected face image is recognized and processed to obtain a face recognition result.
[0142] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented by a program code executable by a computing system, so that they can be stored in a storage system and executed by the computing system, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0143] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An artificial intelligence face recognition method, characterized in that: include: Acquire first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face; Adjusting the first facial feature identified in the first facial image data based on the facial adjustment feature to generate second facial image data, and retrieving a learning coefficient that matches the third facial image data obtained by shooting at a second angle and the second facial image data, wherein the learning coefficient is used to characterize the learning intensity of the model training; Training an initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data, and the learning coefficient to obtain a facial feature recognition model that has completed model training; Based on the facial feature recognition model, the collected face image is recognized and processed to obtain a face recognition result.
2. The method according to claim 1, characterized in that: The step of acquiring first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face comprises: Displaying a first angle, and acquiring first facial image data obtained by photographing a target face at the first angle, wherein the first angle includes at least four directions of shooting angles; Facial feature adjustment items are displayed, and facial adjustment features are determined through adjustment items selected by the target user from the facial feature adjustment items, wherein the facial feature adjustment items include content items that need to be adjusted for different facial features.
3. The method according to claim 2, characterized in that The step of adjusting the first facial feature identified in the first facial image data based on the facial adjustment feature to generate the second facial image data comprises: Determining a feature adjustment coefficient of the facial adjustment feature, and identifying a first facial feature in the first facial image data based on a feature segmentation model, the feature adjustment coefficient comprising a pixel size adjustment value and an edge definition adjustment value; The first facial feature is adjusted based on the feature adjustment coefficient to obtain the second facial image data.
4. The method according to claim 1 or 2, characterized in that: The step of retrieving the learning coefficients matching the third facial image data obtained by shooting at the second angle and the second facial image data comprises: Acquire third facial image data captured at a second angle, where the second angle is obtained by adjusting a preset angle value based on the first angle; The learning coefficients that match the second facial image data and the third facial image data are matched based on a preset learning feature adjustment mapping relationship, wherein the preset learning feature adjustment mapping relationship stores learning coefficients corresponding to different facial feature comparison results.
5. The method according to claim 4, characterized in that The learning coefficients for adjusting the mapping relationship based on the preset learning features to match the second facial image data and the third facial image data include: extracting facial features from the second facial image data and the third facial image data, and comparing the facial features according to pixel features and color features to obtain a facial feature comparison result; Based on the facial feature comparison result, a matching learning coefficient is queried from the preset learning feature adjustment mapping relationship.
6. The method according to claim 1, characterized in that The training of the initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain a facial feature recognition model that completes model training includes: Constructing an initial facial feature recognition model of a three-layer convolutional neural network, wherein the initial facial feature recognition model is a multi-input multi-output network, and the weights between the convolutional layers are configured based on the learning coefficients; determining a learning association parameter between the first facial image data, the second facial image data, and the third facial image data, and determining a model training parameter based on the learning association parameter and the learning coefficient; The initial facial feature recognition model is trained based on the first facial image data, the second facial image data, and the third facial image data marked with feature recognition tags, and when the model training parameters are matched, the model training is completed to obtain a facial feature recognition model.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The facial tags in the face recognition result are parsed, and the facial tags are cached or counted according to the access rights corresponding to the facial tags.
8. An artificial intelligence face recognition system, characterized in that: include: An acquisition module, used to acquire first facial image data obtained by photographing a target face at a first angle and facial adjustment features matching the target face; a calling module, configured to adjust the first facial feature identified in the first facial image data based on the facial adjustment feature, generate second facial image data, and call a learning coefficient matching the third facial image data obtained by shooting at a second angle and the second facial image data, wherein the learning coefficient is used to characterize the learning intensity of the model training; A training module, used for training an initial facial feature recognition model based on the first facial image data, the second facial image data, the third facial image data and the learning coefficient to obtain a facial feature recognition model that has completed model training; The recognition module is used to perform recognition processing on the collected face image based on the facial feature recognition model to obtain a face recognition result.
9. A storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the artificial intelligence face recognition method as described in any one of claims 1 to 7.
10. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the artificial intelligence face recognition method according to any one of claims 1-7.
Citation Information
Patent Citations
Face recognition method and device, and equipment and storage medium
CN112101261A
Implementation method for accurately making intelligent card based on big data of face recognition
CN113221732A
Face recognition method under mask shielding condition based on deep learning
CN114821745A
Mask wearing face recognition method, access control device, electronic equipment and readable medium
CN115690882A
Face recognition method and device, equipment, storage medium and product
CN117011903A
