Face feature extraction model training method, face feature extraction method and device

By training the face feature extraction model for angle compensation and feature extraction, the problem of face recognition decreasing accuracy when angle changes is solved, and higher face recognition accuracy is achieved.

CN119810894AActive Publication Date: 2025-04-11MLKEY

Patent Information

Application Number
CN202510287919.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-04-11
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

When existing facial recognition technology deals with changes in face angles, the feature extraction accuracy significantly decreases, resulting in a decrease in facial recognition accuracy.

Method used

By acquiring multiple sets of training face images, using the preset model to be trained for angle compensation and feature extraction, the predicted face features are obtained, and the face feature extraction model is trained based on the predicted face features and model loss information to improve the face recognition accuracy.

Benefits of technology

Through the training of angle compensation and feature extraction models, the accuracy of face feature extraction can be improved in face images at different acquisition angles, significantly improving face recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810894A_ABST
    Figure CN119810894A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and discloses a training method of a face feature extraction model, and a face feature extraction method and device. The training method comprises the following steps: acquiring multiple groups of training face images; inputting the training face image into a preset to-be-trained model to perform angle compensation and feature extraction on the training face image to obtain predicted face features; training a to-be-trained model according to the predicted face features and the corresponding model loss information to obtain a face feature extraction model; the model loss information is obtained by fitting angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted face features. According to the embodiment of the invention, angle compensation can be performed on the to-be-recognized face, so that the face recognition precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a training method for a face feature extraction model, a face feature extraction method and a device. Background Art

[0002] Face recognition is a biometric technology that identifies people based on their facial features. Its basic principles include three main steps: face detection, feature extraction, and matching recognition.

[0003] However, during the feature extraction process, the facial feature extraction algorithm is sensitive to changes in facial angles. When the face in the face image is at a non-frontal angle, the accuracy of facial feature extraction will drop significantly, resulting in a decrease in face recognition accuracy. Summary of the invention

[0004] The purpose of this application is to provide a training method for a facial feature extraction model, a facial feature extraction method and a device, which can perform angle compensation on a face to be identified to improve the accuracy of facial recognition.

[0005] The present application provides a method for training a facial feature extraction model, including: Obtain multiple sets of training face images; Inputting the training face image into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features; The model to be trained is trained according to the predicted facial features and corresponding model loss information to obtain the facial feature extraction model; the model loss information is fitted by the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted facial features.

[0006] In some embodiments, before inputting the training face image into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features, the method further includes: Extracting the rolling angle feature of the face in the training face image; The faces in the training face image are aligned according to the roll angle feature to obtain an aligned training face image.

[0007] In some embodiments, the step of inputting the training face image into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features includes: Extracting facial features from the training facial image to obtain original facial features; Acquire the yaw angle feature and the pitch angle feature of the face in the training face image; Performing angle compensation on the yaw angle feature and the pitch angle feature to obtain an angle compensation feature; The original facial features and the angle compensation features are fused to obtain the predicted facial features.

[0008] In some embodiments, performing angle compensation on the yaw angle feature and the pitch angle feature to obtain an angle compensation feature includes: Splicing the yaw angle feature and the pitch angle feature to obtain a first splicing feature; Linear mapping and activation operations are performed on the first splicing feature to obtain the angle compensation feature.

[0009] In some embodiments, the fusing the original facial features and the angle compensation features to obtain the predicted facial features includes: Splicing the original facial feature and the angle compensation feature to obtain a second splicing feature; Perform linear mapping, normalization and activation operations on the second concatenated features to obtain the predicted facial features.

[0010] In some embodiments, the step of training the model to be trained according to the predicted facial features and the corresponding model loss information to obtain the facial feature extraction model includes: Acquire a target face image corresponding to the training face image; the target face image is a face image obtained by capturing a face at a target acquisition angle; Extracting features of the target face image to obtain target face features; Determining the model loss information according to the predicted facial features and the target facial features; The network parameters of the model to be trained are iteratively adjusted according to the model loss information until the training end condition is met to obtain the facial feature extraction model.

[0011] In some embodiments, the calculation formula of the model loss information is: , in, is the model loss information, is the angle invariance loss information, To measure learning loss information, is the angle sensitivity loss information, , and All are loss weight coefficients; The calculation formula of the angle invariance loss information is: , Where N is the number of training face images, is the target face feature of the target face image corresponding to the i-th group of training face images, is the predicted facial features of the i-th group of training face images, i is a positive integer; The calculation formula of the metric learning loss information is: , , , in, is the Arcface loss information of the target face image, To train the Arcface loss information of face images, is the angle between the target face feature of the target face image corresponding to the i-th group of training face images and the weight vector of the j-th category. is the angle between the target face feature of the target face image corresponding to the i-th group of training face images and the corresponding true category weight vector, is the angle between the predicted facial features of the i-th group of training face images and the weight vector of the j-th category of other categories, is the angle between the predicted facial features of the i-th group of training face images and the corresponding true category weight vector, m is the angle interval, s is the scaling factor, n is the total number of categories, j is a positive integer, and e is a natural constant; The calculation formula of the angle sensitivity loss information is: , in, is the concatenated vector of the pth feature element in the N predicted face features, is the concatenated vector of the yaw angles of the faces in N training face images, is the concatenated vector of the pitch angles of the faces in N training face images, for and The correlation coefficient between them, p is the face feature dimension.

[0012] The present application also provides a method for extracting facial features, including: Obtain the face image to be extracted; The face image to be extracted is input into a face feature extraction model to perform angle compensation and feature extraction on the face image to be extracted to obtain face compensation features; the face feature extraction model is trained by the above-mentioned face feature extraction model training method.

[0013] An embodiment of the present application further provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above method when executing the computer program.

[0014] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0015] The beneficial effects of the present application are as follows: by obtaining a face image to be extracted containing a face, the face image to be extracted is used as the input of a trained face feature extraction model, and then the face compensation features corresponding to the face in the face image to be extracted output by the trained face feature extraction model are obtained. Among them, the face feature extraction model is trained based on the predicted face features and the corresponding model loss information, the predicted face features are obtained by performing angle compensation and feature extraction on the training face images, and the model loss information is fitted based on the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted face features. By adopting innovative model loss information to train the model to be trained and obtain the required face feature extraction model, when extracting face features from face images to be extracted obtained from different acquisition angles, a face feature extraction effect with relatively high accuracy can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A diagram of the application environment of the training method for the facial feature extraction model provided in an embodiment of the present application.

[0017] Figure 2 It is a flowchart of the training method of the facial feature extraction model provided in the embodiment of the present application.

[0018] Figure 3 It is a schematic diagram of the acquisition angle of the face in the training face image provided in the embodiment of the present application.

[0019] Figure 4 It is a flow chart of the facial feature extraction method provided in the embodiment of the present application.

[0020] Figure 5 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0022] Figure 1This is a diagram of the application environment of the training method of the face feature extraction model provided in the embodiment of the present application. Figure 1 , the facial feature extraction method is applied to a training system of a facial feature extraction model. The training system of the facial feature extraction model includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected via a network, and the terminal 110 can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a mobile phone, a tablet computer, a laptop computer, etc. The server 120 can be implemented as an independent server or a server cluster composed of multiple servers. The terminal 110 is used to upload multiple groups of training facial images to the server 120, and the server 120 is used to obtain multiple groups of training facial images, input the training facial images into a preset model to be trained, so as to perform angle compensation and feature extraction on the training facial images, obtain predicted facial features, and train the model to be trained according to the predicted facial features and the corresponding model loss information to obtain a facial feature extraction model, wherein the model loss information is obtained by fitting the angle invariance loss information, the metric learning loss information, and the angle sensitivity loss information of the predicted facial features.

[0023] In another embodiment, the above-mentioned facial feature extraction method can be directly applied to terminal 110, which is used to obtain multiple groups of training facial images, input the training facial images into a preset model to be trained to perform angle compensation and feature extraction on the training facial images to obtain predicted facial features, and train the model to be trained according to the predicted facial features and corresponding model loss information to obtain a facial feature extraction model, wherein the model loss information is obtained by fitting the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted facial features.

[0024] See also Figure 2 In one embodiment, a training method for a face feature extraction model is provided. The method can be applied to a terminal or a server. This embodiment is described by applying to a terminal. The training method for the face feature extraction model includes but is not limited to steps S201 to S203.

[0025] Step S201, obtaining multiple groups of training face images.

[0026] The training face images refer to images containing human faces that are needed to train the model. In order to train the training model, the training face images are needed to train the training model. The training face images contain different human faces and are collected from different collection angles.

[0027] See also Figure 3The acquisition angles include the roll angle (Roll), yaw angle (Yaw) and pitch angle (Pitch) of the face in the training face image relative to the corresponding coordinate axes of the training face image.

[0028] Step S202: input the training face image into the preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features.

[0029] The predicted facial features are the facial features of the face in the training face image predicted by the to-be-trained model when it is collected at the target collection angle. The training face image is used as the input of the to-be-trained model, and the training face image is trained by the to-be-trained model for angle compensation and feature extraction. Then, the predicted facial features corresponding to the face in the training face image output by the to-be-trained model are obtained, so that the network parameters in the to-be-trained model can be adjusted according to the predicted facial features and the corresponding model loss information, so that the to-be-trained model can be optimized in a more accurate direction.

[0030] Step S203, training the model to be trained according to the predicted facial features and the corresponding model loss information to obtain a facial feature extraction model, wherein the model loss information is obtained by fitting the angle invariance loss information, the metric learning loss information and the angle sensitivity loss information of the predicted facial features.

[0031] After obtaining the predicted facial features, the model loss information is calculated according to the predicted facial features and the corresponding target facial features, wherein the target facial features are facial features obtained by extracting features from the target facial image, and the target facial image is a facial image obtained by collecting the face at the target acquisition angle. The model loss information is calculated by determining the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted facial features according to the predicted facial features and the target facial features, and fitting the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted facial features to obtain the model loss information. After obtaining the model loss information, the network parameters in the facial feature extraction model are adjusted according to the model loss information, and the adjusted model to be trained is continuously trained by repeating the above steps until the training end condition is met to obtain the facial feature extraction model. The facial feature extraction model is the trained model to be trained. In one embodiment, the training end condition is a pre-set threshold for measuring the deviation of the model loss information, until the calculated model loss information is less than the set threshold, it means that the training of the model to be trained is completed.

[0032] The target acquisition angle is the acquisition angle facing the face, and the roll angle, yaw angle and pitch angle corresponding to the target acquisition angle are all 0°, that is, the target face image is the face image acquired facing the face.

[0033] The training method of the above-mentioned facial feature extraction model uses the training facial image as the input of the model to be trained, and the model to be trained performs angle compensation and feature extraction on the training facial image to obtain the predicted facial features, and the corresponding model loss information is obtained by fitting according to the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted facial features, and then the model to be trained is trained with the model loss information, and the desired facial feature extraction model is obtained when the training end condition is met. By adopting innovative model loss information to train the model to be trained and obtain the desired facial feature extraction model, when extracting facial features from the facial images to be extracted obtained from different acquisition angles, a facial feature extraction effect with relatively high accuracy can be obtained.

[0034] In one embodiment, before inputting the training face image into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features, it also includes: extracting the roll angle features of the faces in the training face image; aligning the faces in the training face image according to the roll angle features to obtain an aligned training face image.

[0035] In order to improve the image quality of the training face images, the faces in the training face images are aligned.

[0036] Aligning faces in training face images according to roll angle features may be performed by extracting roll angle features of faces in training face images, comparing the extracted roll angle features of faces with roll angle features of faces in target face images, and aligning faces in training face images on the basis of maintaining the yaw angle features and pitch angle features of faces in face images unchanged, so that the roll angle features of faces in training face images are consistent with the roll angle features of faces in target face images, even if the roll angle of faces in training face images is the same as the roll angle of faces in target face images. Extracting roll angle features of faces in training face images may be performed by performing face key point detection on training face images and determining roll angle features of faces in training face images according to face key point detection results.

[0037] In one embodiment, a training face image is input into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features, specifically including: extracting face features on the training face image to obtain original face features; obtaining yaw angle features and pitch angle features of the face in the training face image; performing angle compensation on the yaw angle features and pitch angle features to obtain angle compensation features; and fusing the original face features and the angle compensation features to obtain predicted face features.

[0038] The model to be trained may include a feature extraction network, an angle compensation network, and a feature fusion network. When the training face image is input into the model to be trained, the yaw angle feature and the pitch angle feature of the face in the training face image are input into the model to be trained. The feature extraction network performs facial feature extraction on the training face image. The training face image is input into the feature extraction network. The training face image is subjected to facial feature extraction in the feature extraction network by continuous convolution or linear transfer. Finally, the feature extraction network outputs the original facial feature obtained by extracting the face feature of the training face image. The angle compensation of the yaw angle feature and the pitch angle feature is performed by the angle compensation network. After obtaining the yaw angle feature and the pitch angle feature of the face in the training face image, the yaw angle feature and the pitch angle feature are input into the angle compensation network. The angle compensation network performs feature mapping on the spliced ​​angle feature according to the current network parameters after splicing the yaw angle feature and the pitch angle feature, and finally outputs the angle compensation feature. The fusion of original facial features and angle compensation features is performed by a feature fusion network. After obtaining the original facial features and angle compensation features, the original facial features and angle compensation features are input into the feature fusion network. The feature fusion network splices the original facial features and the angle compensation features, performs feature mapping on the spliced ​​features according to the current network parameters, and finally outputs the predicted facial features.

[0039] In one embodiment, the yaw angle feature and the pitch angle feature are angle compensated to obtain the angle compensation feature, including: concatenating the yaw angle feature and the pitch angle feature to obtain a first concatenated feature; performing linear mapping and activation operations on the first concatenated feature to obtain the angle compensation feature. The angle compensation network includes two fully connected layers and one ReLu activation layer, and the yaw angle feature and the pitch angle feature are concatenated into the first concatenated feature and then input into the angle compensation network, which passes through two fully connected layers and one ReLu activation layer in sequence to perform linear mapping and activation operations, and finally outputs the angle compensation feature.

[0040] In one embodiment, the original facial features and the angle compensation features are fused to obtain the predicted facial features, including: splicing the original facial features and the angle compensation features to obtain the second spliced ​​features; performing linear mapping, normalization and activation operations on the second spliced ​​features to obtain the predicted facial features. Among them, the feature fusion network includes two fully connected layers, a normalization layer and a ReLu activation layer, and the original facial features and the angle compensation features are spliced ​​into the second spliced ​​features and then input into the feature fusion network, which passes through two fully connected layers, a normalization layer and a ReLu activation layer in sequence to perform linear mapping, normalization and activation operations, and finally outputs the predicted facial features.

[0041] In one embodiment, a model to be trained is trained according to predicted facial features and corresponding model loss information to obtain a facial feature extraction model, including: obtaining a target facial image corresponding to the training facial image; performing feature extraction on the target facial image to obtain target facial features; determining model loss information according to the predicted facial features and the target facial features; iteratively adjusting network parameters of the model to be trained according to the model loss information until the training end conditions are met to obtain a facial feature extraction model.

[0042] Before inputting the training face image into the model to be trained, the target face image corresponding to the training face image may be obtained first, and then the training face image, the target face image, and the yaw angle feature and the pitch angle feature of the training face image may be input into the model to be trained. Feature extraction of the target face image may be performed by the feature extraction network of the model to be trained, the target face image is input into the feature extraction network, and the face feature of the target face image is extracted in the feature extraction network by continuous convolution or linear transfer, and finally the feature extraction network outputs the target face feature obtained by extracting the face feature of the target face image. Iteratively adjust the network parameters of the model to be trained according to the model loss information. A loss threshold interval and a reset threshold may be preset as training end conditions. When the model loss information is within the loss threshold interval and the number of training resets reaches the reset threshold, the training is terminated. The model to be trained obtained in the last iteration is the facial feature extraction model. When the number of training resets does not reach the reset threshold, the network parameters of the model to be trained are adjusted according to the degree of deviation of the model loss information from the loss threshold interval, so that the model loss information gradually approaches the loss threshold interval during the iteration process and is finally within the loss threshold interval. Then, the training face image and the target face image are obtained again, and the above steps are repeated to obtain new model loss information until the model loss information is within the loss threshold interval. The above steps are repeated until the number of training resets reaches the reset threshold, and the training is terminated to obtain the facial feature extraction model. The obtained facial feature extraction model can be adapted to facial feature extraction scenarios for a variety of facial images to be extracted.

[0043] In one embodiment, the calculation formula of the model loss information is: , in, is the model loss information, is the angle invariance loss information, To measure learning loss information, is the angle sensitivity loss information, ,and All are loss weight coefficients; The calculation formula of angle invariance loss information is: , Where N is the number of training face images, is the target face feature of the target face image corresponding to the i-th group of training face images, is the predicted facial features of the i-th group of training face images, i is a positive integer; The calculation formula for measuring learning loss information is: , , , in, is the Arcface loss information of the target face image, To train the Arcface loss information of face images, is the angle between the target face feature of the target face image corresponding to the i-th group of training face images and the weight vector of the j-th category. is the angle between the target face feature of the target face image corresponding to the i-th group of training face images and the corresponding true category weight vector, is the angle between the predicted facial features of the i-th group of training face images and the weight vector of the j-th category of other categories, is the angle between the predicted facial features of the i-th group of training face images and the corresponding true category weight vector, m is the angle interval, s is the scaling factor, n is the total number of categories, j is a positive integer, and e is a natural constant; The calculation formula of the angle sensitivity loss information is: , in, is the concatenated vector of the pth feature element in the N predicted face features, is the concatenated vector of the yaw angles of the faces in N training face images, is the concatenated vector of the pitch angles of the faces in N training face images, for and The correlation coefficient between them, p is the face feature dimension.

[0044] See also Figure 4 In one embodiment, a method for extracting facial features is provided. The method can be applied to a terminal or a server. This embodiment is described by applying the method to a terminal. The method for extracting facial features includes but is not limited to steps S401 to S402.

[0045] Step S401, obtaining a face image to be extracted.

[0046] The facial image to be extracted refers to an image containing a face whose facial features are to be extracted. The facial image to be extracted may be an image containing a face obtained by the terminal by calling a camera in real time, or may be an acquired stored image containing a face. The face in the facial image to be extracted may be at any angle, for example, it may be a side face or a front face. The facial image to be extracted may include one face or multiple faces. If it contains multiple faces, the facial features corresponding to each face in the image need to be extracted later.

[0047] Step S402, inputting the face image to be extracted into a face feature extraction model to perform angle compensation and feature extraction on the face image to be extracted to obtain face compensation features. The face feature extraction model is trained by the above-mentioned face feature extraction model training method.

[0048] The above-mentioned facial feature extraction method obtains a facial image to be extracted containing a face, uses the facial image to be extracted as the input of the trained facial feature extraction model, and then obtains the facial compensation features corresponding to the face in the facial image to be extracted output by the trained facial feature extraction model. The above-mentioned facial feature extraction model is trained based on the predicted facial features and the corresponding model loss information. The predicted facial features are obtained by performing angle compensation and feature extraction on the training facial images. The model loss information is fitted based on the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted facial features. By adopting innovative model loss information to train the model to be trained and obtain the required facial feature extraction model, when extracting facial features from the facial images to be extracted obtained from different acquisition angles, a facial feature extraction effect with relatively high accuracy can be obtained.

[0049] See also Figure 5 In one embodiment, an electronic device 500 is provided, which includes but is not limited to: at least one processing unit 510, at least one storage unit 520, a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510), a display unit 540, etc.

[0050] The storage unit stores program codes, and the program codes can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present disclosure described in the above method part of this specification.

[0051] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .

[0052] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0053] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0054] The electronic device 500 may also communicate with one or more external devices 500' (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 560. The network adapter 560 may communicate with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0055] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above method when executed by a processor.

[0056] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation of the present disclosure.

[0057] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0058] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0059] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.

[0060] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.

Claims

1. A training method for a facial feature extraction model, characterized in that: include: Obtain multiple sets of training face images; Inputting the training face image into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features; The model to be trained is trained according to the predicted facial features and corresponding model loss information to obtain the facial feature extraction model; the model loss information is fitted by the angle invariance loss information, metric learning loss information and angle sensitivity loss information of the predicted facial features.

2. The training method of the face feature extraction model according to claim 1, characterized in that: Before inputting the training face image into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features, the method further includes: Extracting the rolling angle feature of the face in the training face image; The faces in the training face image are aligned according to the roll angle feature to obtain an aligned training face image.

3. The training method of the face feature extraction model according to claim 1, characterized in that: The step of inputting the training face image into a preset model to be trained to perform angle compensation and feature extraction on the training face image to obtain predicted face features includes: Extracting facial features from the training facial image to obtain original facial features; Acquire the yaw angle feature and the pitch angle feature of the face in the training face image; Performing angle compensation on the yaw angle feature and the pitch angle feature to obtain an angle compensation feature; The original facial features and the angle compensation features are fused to obtain the predicted facial features.

4. The training method for the facial feature extraction model according to claim 3, characterized in that: The performing angle compensation on the yaw angle feature and the pitch angle feature to obtain an angle compensation feature includes: Splicing the yaw angle feature and the pitch angle feature to obtain a first splicing feature; Linear mapping and activation operations are performed on the first splicing feature to obtain the angle compensation feature.

5. The training method of the face feature extraction model according to claim 3, characterized in that: The fusing the original facial features and the angle compensation features to obtain the predicted facial features includes: Splicing the original facial feature and the angle compensation feature to obtain a second splicing feature; Perform linear mapping, normalization and activation operations on the second concatenated features to obtain the predicted facial features.

6. The training method for facial feature extraction model according to claim 1, characterized in that: The step of training the model to be trained according to the predicted facial features and the corresponding model loss information to obtain the facial feature extraction model comprises: Acquire a target face image corresponding to the training face image; the target face image is a face image obtained by capturing a face at a target acquisition angle; Extracting features of the target face image to obtain target face features; Determining the model loss information according to the predicted facial features and the target facial features; The network parameters of the model to be trained are iteratively adjusted according to the model loss information until the training end condition is met to obtain the facial feature extraction model.

7. The training method for the facial feature extraction model according to claim 6, characterized in that: The calculation formula of the model loss information is: , in, is the model loss information, is the angle invariance loss information, To measure learning loss information, is the angle sensitivity loss information, , and All are loss weight coefficients; The calculation formula of the angle invariance loss information is: , Where N is the number of training face images, is the target face feature of the target face image corresponding to the i-th group of training face images, is the predicted facial features of the i-th group of training face images, i is a positive integer; The calculation formula of the metric learning loss information is: , , , in, is the Arcface loss information of the target face image, To train the Arcface loss information of face images, is the angle between the target face feature of the target face image corresponding to the i-th group of training face images and the weight vector of the j-th category. is the angle between the target face feature of the target face image corresponding to the i-th group of training face images and the corresponding true category weight vector, is the angle between the predicted facial features of the i-th group of training face images and the weight vector of the j-th category of other categories, is the angle between the predicted facial features of the i-th group of training face images and the corresponding true category weight vector, m is the angle interval, s is the scaling factor, n is the total number of categories, j is a positive integer, and e is a natural constant; The calculation formula of the angle sensitivity loss information is: , in, is the concatenated vector of the pth feature element in the N predicted face features, is the concatenated vector of the yaw angles of the faces in N training face images, is the concatenated vector of the pitch angles of the faces in N training face images, for and The correlation coefficient between them, p is the face feature dimension.

8. A method for extracting facial features, characterized in that: include: Obtain the face image to be extracted; The facial image to be extracted is input into a facial feature extraction model to perform angle compensation and feature extraction on the facial image to be extracted to obtain facial compensation features; the facial feature extraction model is trained by the facial feature extraction model training method described in any one of claims 1 to 7.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Face recognition method and device, robot and storage medium

    CN109543633A

  • Training method of deep convolutional neural network for face recognition

    CN111985310A

  • Facial expression recognition method for driving scene

    CN119028004A

  • Method, apparatus and computer program product for human-face features extraction

    US20150205997A1

Cited By

  • Face recognition method and device, equipment and storage medium

    CN120260102A

  • Face recognition method, device and equipment and storage medium

    CN120260102B