Cross-age face image generation method for small sample identity authentication

Through an image generation model trained based on multiple face images and age tags, the problems of authenticity and identity information retention in cross-age face image generation are solved, and accurate and real cross-age face images are generated.

CN119580032APending Publication Date: 2025-03-07NORTH CHINA UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411627630.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the generation of cross-age face images, the generated images are difficult to ensure authenticity, and it is difficult to preserve the identity information of the face intact.

Method used

An image generation model trained based on multiple face images, age tags carried by each face image, and multiple face images are used to train the image across age faces through a discriminator, generator and pre-trained face recognition model to generate cross-age face images.

Benefits of technology

It realizes the generation of more accurate cross-age face images, ensuring the authenticity of the image and retaining the identity information of the face intact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580032A_ABST
    Figure CN119580032A_ABST
Patent Text Reader

Abstract

The invention provides a cross-age face image generation method for small sample identity authentication. The cross-age face image generation method for small sample identity authentication comprises the following steps: acquiring a to-be-processed image; and inputting the to-be-processed image into an image generation model to obtain a target image corresponding to the to-be-processed image, the image generation model being obtained by training a discriminator, a generator and a pre-trained face recognition model based on the plurality of face images, the age labels carried by the face images and the plurality of face image pairs. Since the image generation model is obtained by training based on the plurality of face images, the age tag carried by each face image and the plurality of face image pairs, the cross-age face image can be generated, and the target image is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method for generating cross-age face images for small sample identity authentication. The present application also relates to a device for generating cross-age face images for small sample identity authentication, a computing device, and a computer-readable storage medium. Background Art

[0002] With the development of Internet technology, people have higher and higher requirements for generating cross-age character images. At present, the way to generate cross-age images is to simply add elements to the image. Usually, this method simulates the changes of human faces in age levels by directly adding or smoothing "age factors". These age factors include beards, gray hair, wrinkles, etc.

[0003] However, the facial images obtained by the above method cannot guarantee the authenticity of the face, that is, simply adding elements and superimposing "age factors" cannot meet people's intuitive visual needs. There are problems such as the generated images are easily distorted and the generated images are difficult to retain the identity information of the face intact. Summary of the invention

[0004] In view of this, the embodiment of the present application provides a method for generating cross-age face images for small sample identity authentication. The present application also relates to a device for generating cross-age face images for small sample identity authentication, a computing device and a computer-readable storage medium to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of the present application, a method for generating cross-age face images for small sample identity authentication is provided, comprising:

[0006] Get the image to be processed;

[0007] The image to be processed is input into the image generation model to obtain a target image corresponding to the image to be processed, wherein the image generation model is obtained by training a discriminator, a generator and a pre-trained face recognition model based on multiple face images, age labels carried by each face image and multiple face image pairs.

[0008] According to a second aspect of an embodiment of the present application, a device for generating cross-age face images for small sample identity authentication is provided, comprising:

[0009] An acquisition module, configured to acquire an image to be processed;

[0010] The input module is configured to input the image to be processed into the image generation model to obtain a target image corresponding to the image to be processed, wherein the image generation model is obtained by training the discriminator, the generator and the pre-trained face recognition model based on multiple face images, the age labels carried by each face image and multiple face image pairs.

[0011] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein when the processor executes the computer instructions, the steps of the method for generating cross-age facial images for small sample identity authentication are implemented.

[0012] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are executed by a processor, the steps of the method for generating cross-age facial images for small sample identity authentication are implemented.

[0013] In an embodiment of the present application, an image to be processed is obtained; the image to be processed is input into an image generation model to obtain a target image corresponding to the image to be processed, wherein the image generation model is obtained by training a discriminator, a generator, and a pre-trained face recognition model based on multiple face images, age labels carried by each face image, and multiple face image pairs. Since the image generation model is obtained by training based on multiple face images, age labels carried by each face image, and multiple face image pairs, the image generation model can realize the generation of cross-age face images, further making the target image of the image to be processed generated by the image generation model more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a design flow chart of an image generation model provided by an embodiment of the present application;

[0015] Figure 2 is a flowchart of a training method for an image generation model provided in one embodiment of the present application;

[0016] Figure 3 This is a flow chart of an image age classification transfer learning method provided by an embodiment of the present application;

[0017] Figure 4 is a flowchart of a training method for a second image generation model provided in an embodiment of the present application;

[0018] Figure 5 is a flowchart of a third method for training an image generation model provided in an embodiment of the present application;

[0019] Figure 6is a graph of transfer learning results of an image generation model provided in one embodiment of the present application;

[0020] Figure 7 is a flowchart of a fourth method for training an image generation model provided in an embodiment of the present application;

[0021] Figure 8 is a flowchart of a fifth method for training an image generation model provided in an embodiment of the present application;

[0022] Fig. 9 This is a flow chart of a method for generating cross-age face images for small sample identity authentication provided by an embodiment of the present application;

[0023] Fig.10 This is an overall architecture diagram of a training image generation model provided in one embodiment of the present application;

[0024] Fig.11 It is a structural schematic diagram of a cross-age face image generation device for small sample identity authentication provided by an embodiment of the present application;

[0025] Fig.12 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0027] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0028] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0029] First, the terms involved in one or more embodiments of the present invention are explained.

[0030] Recurrent Neural Network (RNN): It is a type of recurrent neural network that takes sequence data as input, recursively in the direction of sequence evolution, and all nodes are connected in a chain. It is mostly used to process tasks related to time series.

[0031] Cross-Age-Celebrity-Dataset (CACD): A dataset of contemporary foreign celebrity faces with age annotations.

[0032] Morph dataset: A dataset similar to the CACD dataset, with age annotations for faces.

[0033] Labeled Faces in the Wild (LFW): a dataset commonly used for face recognition tasks.

[0034] ResNet-34 network: Residual network-34 layer structure, a convolutional network structure with a deeper number of layers. One-hot encoding: also known as one-bit effective encoding, mainly uses N-bit state registers to encode N states. Each state has its own independent register bit, and only one bit is valid at any time.

[0035] The present application provides a method for generating cross-age face images for small sample identity authentication. The present application also relates to a device for generating cross-age face images for small sample identity authentication, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0036] In practical applications, the current research on cross-age facial image generation can be roughly divided into two categories, namely the traditional use of visual elements to directly modify and add to the image and the use of generative models for generation.

[0037] The first method simulates the changes in the age level of the face by directly adding or smoothing "age factors", such as beards, gray hair, wrinkles, etc. This method does not need to consider the data distribution of the image itself, but only needs to consider how to add these age elements to the correct position and when they should be added and when they should not be added. However, the face image obtained by this method cannot guarantee the authenticity of the face, that is, simply adding elements and superimposing "age factors" cannot meet people's intuitive visual needs. At the same time, such a simple addition process may cause people to be unable to recognize the face image.

[0038] The second method uses a traditional generative model. By training the traditional generative model, the generated images can be more realistic than the images of the first method and can retain the identity characteristics of the face to a certain extent. Using a set of serialized data sets, the generative model can be optimized in the age sequence data hypothesis space. The most representative one is the use of recurrent neural network (RNN) to achieve cross-age face generation tasks. However, such methods are not only limited by the difficulty of collecting data sets, but also by the complexity of finding the optimal solution for model parameters and the training speed of the model itself. Since it is difficult to collect serialized samples based on age in the research data set itself, this is bound to cause huge identity information differences between the generated images and the original images.

[0039] In summary, the existing cross-age face image generation schemes still have problems such as the generation model itself is difficult to train, the generated images are easily distorted, the generated images are difficult to retain the identity information of the face intact, and the serialized face dataset is difficult to collect. Therefore, an effective solution is urgently needed to solve the above problems.

[0040] In view of this, the present application utilizes a deep learning solution, and more specifically, a generative adversarial network is used to solve the problem of cross-age face generation. Figure 1 The design flow chart of an image generation model provided according to an embodiment of the present application is shown. First, in the network structure design stage, the discriminator and the generator are separated. The discriminator uses a transfer learning scheme to train the age classification model, and the generator uses a symmetric structure guided by gradient features for network training. The purpose is to ensure that the original generative adversarial network task is transformed from unsupervised learning to strongly supervised learning, and on the other hand, the identity information of the face can be preserved intact.

[0041] Figure 2 A flowchart of a training method for an image generation model provided according to an embodiment of the present application is shown, wherein the image generation model includes a generator, an age classifier and a discriminator, and the training method for the image generation model specifically includes the following steps:

[0042] Step 202: Obtain a first sample set, a pre-trained face recognition model, and a second sample set, wherein the first sample set includes multiple face images, the face images carry age labels, and the second sample set includes multiple face image pairs, the face image pairs include original images and target images.

[0043] In the embodiment of the present application, when training the image generation model, it is not necessary to obtain a large amount of sample data, so the number of samples in the first sample set including face images and the second sample set including face image pairs is small, which can also be understood as a small sample. The face images carry age labels, and the face image pairs include original images and target images.

[0044] It should be noted that the original image and the target image included in the face image pair are images of the same face at different ages. For example, the original image in the face image pair is an image of Zhang San at the age of 20, and the target image is an image of Zhang San at the age of 60.

[0045] In actual applications, the method for obtaining the first sample set can be that a large number of face images input manually form the first sample set, or a large number of face images are read from other data acquisition devices or databases to form the first sample set; the method for obtaining the second sample set can be that a large number of face image pairs input manually form the second sample set, or a large number of face image pairs are read from other data acquisition devices or databases to form the second sample set. The method for obtaining the first sample set and the second sample set is selected according to the actual situation, and the embodiments of the present application do not impose any limitations on this.

[0046] Step 204: Based on the multiple face images in the first sample set and the age labels carried by each face image, the face recognition model is trained to obtain a trained age classifier.

[0047] In the embodiment of the present application, after obtaining the first sample set, the face recognition model can be trained based on the multiple face images in the first sample set and the age labels carried by each face image to obtain a trained age classifier. The first sample set can use the CACD dataset and the Morph face dataset. The face images in the first sample set are generally manually labeled with their age groups, that is, the multiple face images obtained all carry age labels, and the age labels are used to characterize the age group corresponding to the face image.

[0048] In practical applications, the age of the facial image can be divided into ten years, and the age range of the facial image can be 1-10, 11-20, 21-30, 31-40, 41-50, 51-60, etc. The specific selection is based on the actual situation, and this application does not make any limitation on this.

[0049] Since most of the work on face age focuses on face age recognition rather than age classification. Since the age classification network is difficult to reuse the past age recognition network and the data set is small, this application adopts the solution of transfer learning. Figure 3 A flowchart of an image age classification transfer learning method provided according to an embodiment of the present application is shown, in which a face recognition network is trained on an existing face dataset and the network is transferred to a face age classification task.

[0050] Specifically, copy and freeze the source model to obtain the target model, fix all layers except the output layer in the source model, replace the source dataset with the target dataset, train the output layer of the target model first, and unfreeze the remaining layers for fine-tuning after a certain number of rounds. Using the transfer learning solution saves training time and obtains better performance. Because it involves extracting facial features, a trained face recognition network can save training time and obtain better classification results. The source task in the source model refers to face recognition.

[0051] In one possible implementation, Figure 4 As shown, Figure 4 A flowchart of a second image generation model training method provided according to an embodiment of the present application is shown. The face recognition model includes an input layer, a hidden layer, and an output layer; step 204 can be specifically implemented according to the following steps:

[0052] Step 402: Obtain a first preset learning rate and freeze the input layer and hidden layer in the face recognition model.

[0053] In an embodiment of the present application, when training an age classifier, a first preset learning rate is obtained, and the first preset learning rate is used to freeze the input layer and hidden layer in the face recognition model, and the face recognition model is trained. The value of the first preset learning rate is selected according to actual conditions, and the embodiment of the present application does not impose any limitation on this.

[0054] Step 404: extract a first face image from the first sample set, input the first face image into a face recognition model, and obtain a first predicted age group of the first face image.

[0055] In an embodiment of the present application, after obtaining the first sample set, a first facial image is extracted from the first sample set, where the first facial image is any facial image in the first sample set. The first facial image is input into a facial recognition model to obtain a first predicted age group of the first facial image.

[0056] Step 406: According to the first predicted age group and the age label carried by the first facial image, a first loss value is calculated using a preset first loss function.

[0057] In the embodiment of the present application, after obtaining the first predicted age group of the first face image, the first predicted age group and the age label carried by the first face image are input into the first loss function to calculate the first loss value. The first loss function is shown in the following formula (1):

[0058] L age1 =∑ x∈D l(x,t) (1)

[0059] Among them, D is the real sample set, x is the real sample, t is the specific age group, and l(x,t) represents the L-Softmax loss function of age group t and real sample x.

[0060] Step 408: Adjust the parameters of the face recognition model according to the first loss value.

[0061] The method returns to execute the step of extracting a first face image from the first sample set, inputting the first face image into a face recognition model, and obtaining a first predicted age group of the first face image.

[0062] Step 410: When the number of iterations reaches a first preset number of iterations, stop training and use the trained face recognition model as an age classifier.

[0063] In the embodiment of the present application, the number of iterations can be combined to determine whether the current face recognition model has been trained. Specifically, if the number of iterations at this moment does not reach the first preset number of iterations, the model parameters of the face recognition model are adjusted, and the step of extracting the first face image from the first sample set, inputting the first face image into the face recognition model, and obtaining the first predicted age group of the first face image is returned to the face recognition model, and the face recognition model is continuously trained until the first preset number of iterations is reached, and the training is stopped, and the trained face recognition model is used as an age classifier.

[0064] Among them, the first preset number of iterations is set according to actual conditions, and the embodiment of the present application does not impose any limitation on this. When the number of iterations reaches the first preset number of iterations, it means that the current face recognition model has been trained enough times. At this time, the predicted results of the face recognition model are close enough to the actual results, and training can be stopped.

[0065] In an embodiment of the present application, the specific training situation of the face recognition model can be judged according to the first loss value, and if the training fails, the model parameters of the face recognition model can be reversely adjusted according to the first loss value to improve the prediction ability of the face recognition model, with a high training rate and good training effect.

[0066] In another possible implementation, Figure 5 As shown, Figure 5A flowchart of a third method for training an image generation model according to an embodiment of the present application is shown. After step 410, the method may further include the following steps:

[0067] Step 502: Obtain a second preset learning rate, and unfreeze the input layer and hidden layer in the trained face recognition model, wherein the second preset learning rate is less than the first preset learning rate.

[0068] In the embodiment of the present application, the second preset learning rate is less than the first preset learning rate, and the value of the second preset learning rate is selected according to actual conditions, and the embodiment of the present application does not impose any limitation on this.

[0069] For example, first freeze the input layer and hidden layer in the face recognition model, use the first preset learning rate of 0.01 to train the face recognition model for 200 rounds, and then unfreeze the input layer and hidden layer in the trained face recognition model, use the second preset learning rate of 0.0001, and continue to train the face recognition model for 200 rounds. Finally, the test results of the face recognition model on the Morph training set are as follows: Figure 6 , Figure 6 A graph showing the transfer learning results of an image generation model provided according to an embodiment of the present application is shown.

[0070] Step 504: extract a second facial image from the first sample set, input the second facial image into the facial recognition model, and obtain a second predicted age group of the second facial image.

[0071] Step 506: According to the second predicted age group and the age label carried by the second facial image, a second loss value is calculated using a preset first loss function.

[0072] Step 508: Adjust the parameters of the face recognition model according to the second loss value.

[0073] The method returns to execute the step of extracting a second face image from the first sample set, inputting the second face image into the face recognition model, and obtaining a second predicted age group of the second face image.

[0074] Among them, step 504, step 506, step 508 are the same as the above-mentioned step 404, step 406, step 408, and will not be described in detail in the embodiment of the present application.

[0075] Step 510: When the number of iterations reaches a second preset number of iterations, stop training to obtain an updated age classifier.

[0076] In the embodiment of the present application, the number of iterations can be combined to determine whether the current face recognition model has been trained. Specifically, if the number of iterations at this moment does not reach the second preset number of iterations, the model parameters of the face recognition model are adjusted, and the steps of extracting the second face image from the first sample set, inputting the second face image into the face recognition model, and obtaining the second predicted age group of the second face image are returned to be executed, and the face recognition model is continuously trained until the second preset number of iterations is reached, and the training is stopped, and the trained face recognition model is used as the updated age classifier.

[0077] Among them, the second preset number of iterations is set according to actual conditions, and the embodiment of the present application does not impose any limitation on this. When the number of iterations reaches the second preset number of iterations, it means that the current face recognition model has been trained enough times. At this time, the predicted results of the face recognition model are close enough to the actual results, and training can be stopped.

[0078] In an embodiment of the present application, the specific training situation of the face recognition model can be judged according to the second loss value, and when the training fails, the model parameters of the face recognition model can be reversely adjusted according to the second loss value to improve the prediction ability of the face recognition model. The training rate is high and the training effect is good. In addition, the face recognition model is trained using a second preset learning rate that is smaller than the first preset learning rate, thereby further improving the accuracy of the updated age classifier.

[0079] Step 206: Fix the parameters of the generator, and train the discriminator based on the multiple face image pairs in the second sample set to obtain a trained discriminator.

[0080] In the embodiment of the present application, after obtaining the trained age classifier, the parameters of the generator can be fixed, multiple face image pairs in the second sample set can be input into the discriminator, and the discriminator can be iteratively trained to obtain the trained discriminator.

[0081] In practical applications, such as Figure 7 As shown, Figure 7 A flowchart of a fourth method for training an image generation model according to an embodiment of the present application is shown. Step 206 may specifically include the following steps:

[0082] Step 702: extracting a first face image pair from the second sample set, where the first face image pair includes a first original image and a first target image.

[0083] In an embodiment of the present application, after obtaining the second sample set, a first face image pair can be extracted from the second sample set, where the first face image pair is any face image pair in the second sample set, and the first face image pair includes a first original image and a first target image.

[0084] Step 704: Fix the parameters of the generator, input the first original image into the generator, and obtain a first generated image.

[0085] In the embodiment of the present application, fixing the parameters of the generator means that the parameters of the generator are not adjusted when the model parameters are adjusted in reverse. In this case, it can be considered that the generation result of the generator is accurate, and adjusting the model parameters of the discriminator in this way can improve the accuracy of the discriminator.

[0086] Step 706: According to the first generated image and the first target image, a third loss value is calculated using a preset second loss function.

[0087] Step 708: Adjust the parameters of the discriminator according to the third loss value.

[0088] And return to execute the step of extracting the first face image pair from the second sample set.

[0089] Step 710: When the number of iterations reaches a third preset number of iterations, stop training to obtain a trained discriminator.

[0090] In the embodiment of the present application, the first generated image and the first target image are input into the second loss function to calculate the third loss value, wherein the second loss function is shown in the following formula (2):

[0091]

[0092] Among them, D is the discriminator, G is the generator, C is the age category, t is the specific age group, x is the real sample, y is the noise sample, P is the intermediate layer function, P x (x) refers to the set of real samples generated by the intermediate layer function, P y (y) refers to the set of noise samples generated by the intermediate layer function.

[0093] By applying the solution of the embodiment of the present application, a third loss value is calculated by using a preset second loss function, and the parameters of the discriminator are adjusted according to the third loss value, thereby further improving the accuracy of the discriminator.

[0094] Step 208: Fix the parameters of the discriminator, and train the generator based on multiple face image pairs in the second sample set to obtain a trained generator.

[0095] In the embodiment of the present application, after obtaining the trained discriminator, the discriminator is now sufficiently accurate, and therefore, the parameters of the discriminator can be fixed, and multiple face image pairs in the second sample set can be input into the generator, and the generator is iteratively trained to obtain the trained generator.

[0096] In practical applications, such as Figure 8 As shown, Figure 8 The flowchart of the fifth method for training an image generation model according to an embodiment of the present application is shown. The parameters of the discriminator can be fixed and the training generator can be adjusted, that is, step 208 can specifically include the following steps:

[0097] Step 802: extracting a second face image pair from a second sample set, where the second face image pair includes a second original image and a second target image.

[0098] Step 804: Fix the parameters of the discriminator, input the second original image into the generator, and obtain a second generated image.

[0099] In the embodiment of the present application, fixing the parameters of the discriminator means that the parameters of the discriminator are not adjusted when the model parameters are adjusted in reverse. In this case, it can be considered that the identification result of the discriminator is accurate, and adjusting the model parameters of the generator in this way can improve the accuracy of the generator.

[0100] Step 806: According to the second original image and the second generated image, a fourth loss value is calculated using a preset third loss function.

[0101] In the embodiment of the present application, considering the original loss of the generator, the second generated image corresponding to the second original image generated by the generator can be input into a preset third loss function to calculate a fourth loss value, where the fourth loss value is also the original loss value of the generator. Specifically, the calculation formula of the original loss value of the generator is shown in the following formula (3):

[0102]

[0103] Among them, D is the discriminator, G is the generator, C is the age category, t is the specific age group, P is the middle layer function, y is the noise sample, P y (y) refers to the set of noise samples generated by the intermediate layer function.

[0104] Step 808: Input the second generated image into the age classifier and calculate the fifth loss value.

[0105] In the embodiment of the present application, after the second original image is input into the generator to obtain the second generated image, the second generated image can be input into the age classifier to calculate the age loss of the second generated image. That is, the step of inputting the second generated image into the age classifier to calculate the fifth loss value can include the following steps:

[0106] Inputting the second generated image into the age classifier to obtain a predicted age group of the second generated image;

[0107] According to the predicted age range of the second generated image and the age label carried by the second target image, a fifth loss value is calculated using a preset fourth loss function.

[0108] Specifically, the predicted age range of the second generated image and the age label carried by the second target image are input into the fourth loss function to calculate the fifth loss value, wherein the fourth loss function is shown in the following formula (4):

[0109]

[0110] Among them, G is the generator, C is the age category, t is the specific age group, x is the real sample, l(·) represents the L-Softmax loss function, P x (x) refers to the set of real samples generated by the intermediate layer function.

[0111] By applying the solution of the embodiment of the present application, the fifth loss value is calculated by utilizing the preset fourth loss function, and the parameters of the generator are adjusted according to the fifth loss value, thereby improving the age accuracy of the generated image and further improving the accuracy of the generator.

[0112] Step 810: Adjust the parameters of the generator according to the fourth loss value and the fifth loss value.

[0113] And return to execute the step of extracting the second face image pair from the second sample set.

[0114] Step 812: When the number of iterations reaches the fourth preset number of iterations, stop training to obtain a trained generator.

[0115] In practical applications, the generator includes an encoder and a decoder. Since the encoder and the decoder are symmetrical structures, in order to ensure that the output features of each layer of the encoder and the output features of each layer of the decoder correspond to each other, the loss value can be further calculated based on the second original image and the second generated image. That is, after the above step of inputting the second original image into the generator to obtain the second generated image, the following steps can also be included:

[0116] Extract the output features of each layer of the encoder and the output features of each layer of the decoder in the generator, and calculate the sixth loss value according to the output features of the corresponding layers of the encoder and the decoder using the preset fifth loss function;

[0117] Extracting and calculating a seventh loss value based on the feature map of the second original image and the feature map of the second generated image using a preset sixth loss function;

[0118] The step of adjusting the parameters of the generator according to the fourth loss value and the fifth loss value comprises:

[0119] Adjust the parameters of the generator according to the fourth loss value, the fifth loss value, the sixth loss value, and the seventh loss value.

[0120] In the embodiment of the present application, the output features of the corresponding layers of the encoder and the decoder are input into a preset fifth loss function to calculate a sixth loss value, wherein the fifth loss function is shown in the following formula (5):

[0121] L layer =∑ i∈k ||f i encoder (z i )-f i decoder (z i )|| 2 (5)

[0122] Where i is the i-th layer of the encoder and decoder, k is the number of layers of the encoder and decoder, and z i is the output feature of the i-th layer of the encoder and decoder, f i encoder(z i ) refers to the encoding function of the output feature of the i-th layer of the encoder, f i decoder(z i ) refers to the decoding function of the output features of the i-th layer of the decoder.

[0123] It should be noted that, based on the symmetrical structure of the encoder and the decoder, the feature map of the second original image and the feature map of the second generated image are extracted to ensure that the corresponding feature maps are of the same size. The feature map of the second original image and the feature map of the second generated image are input into the preset sixth loss function to calculate the seventh loss value, wherein the sixth loss function is shown in the following formula (6):

[0124]

[0125] Among them, G is the generator, C is the age category, t is the specific age group, x is the real sample, P x (x) refers to the set of real samples generated by the intermediate layer function, It means that G(x|C t ) is the feature map extracted from the middle layer, h x It refers to the feature map extracted from the middle layer with x as input.

[0126] After obtaining the sixth loss value and the seventh loss value, the parameters of the generator can be adjusted directly according to the fourth loss value, the fifth loss value, the sixth loss value and the seventh loss value. The weights of the loss values ​​can also be set respectively, and the weighted operation is performed on the loss values, and the parameters of the generator are adjusted using the results of the weighted operation.

[0127] By applying the scheme of the embodiment of the present application, the parameters of the generator are adjusted according to the calculated fourth loss value, fifth loss value, sixth loss value and seventh loss value, so that the obtained generator can be more accurate. Since the loss between the feature map of the original image and the feature map of the generated image is taken into account, the generator can perfectly preserve the identity feature information of the face, and further enable the image generation model to have the ability of identity authentication. Moreover, based on the metric comparison of the L2 paradigm, it is possible to avoid generating a generated image that is indistinguishable from the original image, and avoid reducing the diversity of the generated image.

[0128] Step 210: When the trained age classifier, the trained generator, and the trained discriminator meet preset conditions, the trained age classifier, the trained generator, and the trained discriminator are combined into an image generation model.

[0129] In the embodiment of the present application, the preset condition may be a preset number of adjustments, and whether the current image generation model has been trained is determined according to the preset number of adjustments. Specifically, if the number of adjustments at this moment does not reach the preset number of adjustments, the model parameters of the image generation model continue to be adjusted until the preset number of adjustments is reached, and then the training is stopped, and the trained age classifier, the trained generator, and the trained discriminator are combined into the image generation model.

[0130] Among them, the preset number of adjustments is set according to actual conditions, and the embodiment of the present application does not impose any limitation on this. When the number of adjustments reaches the preset number of adjustments, it means that the training times of the current generator are sufficient and the training can be stopped.

[0131] Apply the scheme of the embodiment of the present application, obtain the first sample set, the pre-trained face recognition model and the second sample set; train the face recognition model based on multiple face images in the first sample set and the age label carried by each face image to obtain a trained age classifier; fix the parameters of the generator, train the discriminator based on multiple face image pairs in the second sample set to obtain a trained discriminator; fix the parameters of the discriminator, train the generator based on multiple face image pairs in the second sample set to obtain a trained generator; when the trained age classifier, the trained generator and the trained discriminator meet the preset conditions, the trained age classifier, the trained generator and the trained discriminator are combined into an image generation model. The face identity information is intactly retained, and the accuracy of the image generation model is improved.

[0132] Fig. 9 A flowchart of a method for generating cross-age face images for small sample identity authentication provided by an embodiment of the present application is shown, which specifically includes the following steps:

[0133] Step 902: Acquire an image to be processed.

[0134] In the embodiment of the present application, the image to be processed refers to an image that needs to be input into an image generation model to generate a target image.

[0135] Step 904: input the image to be processed into an image generation model to obtain a target image corresponding to the image to be processed.

[0136] The image generation model is obtained by training a discriminator, a generator and a pre-trained face recognition model based on multiple face images, age labels carried by each face image and multiple face image pairs.

[0137] By applying the solution of the embodiments of the present application, since the image generation model is obtained based on multiple facial images, age labels carried by each facial image, and training of multiple facial image pairs, the image generation model can realize the generation of facial images across ages, and further make the target image to be processed generated by using the image generation model more accurate.

[0138] Fig.10 The overall architecture diagram of a training image generation model provided according to an embodiment of the present application is shown, which specifically includes:

[0139] First, the present application constructs a network structure based on an image generation network, and supervises the age label of the generated image by splitting the discriminator. Specifically, the original discriminator structure is split into two parts, one part is still used to identify the authenticity of the generated image, and the other part is used to classify the age of the generated face image. The discriminator for identifying the authenticity is trained according to the original image generation network training scheme, and the parameters of the two networks, the generator and the discriminator, are initialized. N samples are extracted from the training set, and the generator generates n samples using the defined noise distribution. The generator is fixed and the discriminator is trained to distinguish between true and false as much as possible. After cyclically updating the discriminator k times, the generator is updated once so that the discriminator cannot distinguish between true and false as much as possible. After multiple update iterations, in an ideal state, the final discriminator cannot distinguish whether the picture comes from a real training sample set or a sample generated by the generator. At this time, the probability of identification is 0.5, and the training is completed.

[0140] In particular, general work on face age focuses on face age recognition rather than age classification. Because the age classification network is difficult to reuse the past age recognition network and the data set is small. The present invention adopts a transfer learning scheme, first training the face recognition network on the existing face data set, and migrating the network to the face age classification task. The other layers except the output layer in the source model are fixed, and the output layer of the target model is first trained. After a certain round, the remaining layers are unfrozen for fine-tuning. The use of the transfer learning scheme saves training time and obtains better performance, because it involves extracting the features of the face, so the trained face recognition network can save training time and obtain better classification results. In the process of the age classification network in this application, the CACD data set is selected as the main training data set, and the Morph face data set is used as the test data set. Specifically, the present application divides the CACD into a training set and a validation set according to a ratio of nine to one, and at the same time, based on the fact that this task is a classification task, the CACD data set is divided into categories according to age groups. That is, 11-20, 21-30, 31-40, 41-50, and use 0-3 to label them. In particular, they are represented by one-hot encoding.

[0141] This application uses the ResNet-34 network trained on the LFW dataset for transfer learning. Considering the relationship between the scopes of transfer learning, the strategy of training the face recognition network first is adopted. This application verifies the effect of the face recognition network trained on LFW on other datasets, as follows:

[0142] Table 1

[0143] Dataset Accuracy ORL face database 97.25% IMM face database 97.67% AR face database 83.75%

[0144] Secondly, the goal of the cross-age face image generation task is to generate face images of the expected age group. This task means that, first, the generated images should have good authenticity, second, the generated images can better retain the identity information of the original face, and finally, the generated images need to be within the target age group. In order to complete this task, this application proposes a method to guide and control face generation by using feature maps and gradients in the middle of the network layer.

[0145] Fig.10It can also include a generator, a feature director, an age classifier and a discriminator. The discriminator is used to judge the authenticity of the input image, which is consistent with the function of the discriminator model in the original image generation network, that is, the model only outputs "true" or "false". The age classifier is used to classify the age of the input generated image. Specifically, when a face image is input, the model will determine the age group to which the face image belongs. As for the feature director, the network layers from the first few layers of the age classifier are used as feature extractors. In fact, in the process of building the network model, the first network layer of the generator and the discriminator was modified. After the modification, this application expanded the dimension of the original image and added the corresponding one-hot encoding.

[0146] That is to say, the original image is a three-dimensional RGB matrix. This application performs one-hot encoding on the age classification, expands it into a matrix, and connects it to the image. Depending on the requirements of the cross-age face image generation task itself, it is necessary to ensure that the image generated by the generator falls into the specified age range. In order to meet this demand, this application adopts a conditional image generation network as the basic network structure, and then improves and reconstructs the network based on this structure. This network structure transforms the unsupervised learning problem of the original image generation network into a supervised learning problem. At the same time, this application constructs an identity information retention module to supervise the image generation process of the network by using the features extracted from the middle layer of the network. Specifically, this application names this module as a feature gradient supervision module, which is stacked between the encoder and decoder of the generator to obtain feature maps, and compares the corresponding feature maps. In this application, the encoder and decoder are symmetrical to achieve the same size of the corresponding feature maps extracted, and they can be input into the same pre-trained network to ensure that a one-dimensional vector is finally output for metric comparison based on the L2 paradigm.

[0147] The reason why this application uses L2 as the metric between two feature maps instead of L1 is that L1 is based on comparison of image pixels, which will inevitably cause the generation model to tend to avoid this penalty and generate images that are no different from the original image, and to a certain extent will greatly reduce the diversity of the generated images. At the same time, in order to ensure that the generated image can fall into the target age domain, this application uses a pre-trained age classifier to classify the age of the target image. The network uses ResNet-34 as the basic network structure. Specifically, this application uses ResNet-34 as a feature extractor, and adds a corresponding fully connected layer network to it to output the final five age group categories. During the training stage of the image generation network, this application fixes the parameters of the network and uses the network as an age classifier for generating images. If the generated target image meets the target age group, the age classifier will add a smaller penalty to the training of the entire model, and conversely, a larger penalty will be added.

[0148] In summary, this application uses a symmetric gradient-guided network structure to construct a generator, compares the corresponding layers in the network structure based on feature maps, and uses a transfer learning training scheme for the age classifier to solve the problem that most current work focuses on age recognition. Since age recognition is a regression task and age classification is a classification task, the age classifier is more effective when used as a discriminator to train the generator than a regression task, and can ensure the diversity of generated images.

[0149] Compared with IPGANs, the scheme of this application has more obvious changes in age. The features such as wrinkles that change with age appear more frequently. Compared with acGANs, the pictures generated by acGANs have serious "skin grinding" phenomenon, and the identity information of the generated images is lost. For the images before and after generation, it is even impossible to identify whether they are the same person. In addition, the training of the age classifier is difficult because the data set is difficult to construct and the data set standard itself is inaccurate. This application adopts a transfer learning scheme to transfer the face recognition task to the face age classification task, which optimizes the network training time and effectively improves the accuracy of age classification, making the generated images more realistic and reliable.

[0150] The comparison results of the solution of this application under various indicators commonly used in the industry are as follows:

[0151] Table 2

[0152]

[0153]

[0154] Corresponding to the above method embodiment, the present application also provides an embodiment of a device for generating cross-age face images for small sample identity authentication. Fig.11 FIG. 1 is a schematic diagram showing a structure of a device for generating cross-age face images for small sample identity authentication provided by an embodiment of the present application. Fig.11 As shown, the device comprises:

[0155] An acquisition module 1102 is configured to acquire an image to be processed;

[0156] The input module 1104 is configured to input the image to be processed into the image generation model to obtain a target image corresponding to the image to be processed, wherein the image generation model is obtained by training the discriminator, the generator and the pre-trained face recognition model based on multiple face images, the age labels carried by each face image and multiple face image pairs.

[0157] Optionally, the image generation model includes a generator, an age classifier and a discriminator, and the device also includes: an image generation model training module, configured to obtain a first sample set, a pre-trained face recognition model and a second sample set, wherein the first sample set includes multiple face images, the face images carry age labels, and the second sample set includes multiple face image pairs, the face image pairs include original images and target images; based on the multiple face images in the first sample set and the age labels carried by each face image, the face recognition model is trained to obtain a trained age classifier; the parameters of the generator are fixed, and the discriminator is trained based on the multiple face image pairs in the second sample set to obtain a trained discriminator; the parameters of the discriminator are fixed, and the generator is trained based on the multiple face image pairs in the second sample set to obtain a trained generator; when the trained age classifier, the trained generator and the trained discriminator meet preset conditions, the trained age classifier, the trained generator and the trained discriminator are combined into an image generation model.

[0158] Optionally, the face recognition model includes an input layer, a hidden layer and an output layer; the image generation model training module is further configured to obtain a first preset learning rate and freeze the input layer and hidden layer in the face recognition model; extract a first face image from a first sample set, input the first face image into the face recognition model, and obtain a first predicted age group of the first face image; calculate a first loss value based on the first predicted age group and the age label carried by the first face image using a preset first loss function; adjust the parameters of the face recognition model according to the first loss value, and return to execute the steps of extracting the first face image from the first sample set, inputting the first face image into the face recognition model, and obtaining the first predicted age group of the first face image; when the number of iterations reaches the first preset number of iterations, stop training and use the trained face recognition model as an age classifier.

[0159] Optionally, the image generation model training module is further configured to obtain a second preset learning rate, unfreeze the input layer and hidden layer in the trained face recognition model, wherein the second preset learning rate is less than the first preset learning rate; extract a second face image from the first sample set, input the second face image into the face recognition model, and obtain a second predicted age group of the second face image; calculate a second loss value based on the second predicted age group and the age label carried by the second face image using a preset first loss function; adjust the parameters of the face recognition model based on the second loss value, and return to execute the steps of extracting the second face image from the first sample set, inputting the second face image into the face recognition model, and obtaining the second predicted age group of the second face image; when the number of iterations reaches a second preset number of iterations, stop training to obtain an updated age classifier.

[0160] Optionally, the image generation model training module is further configured to extract a first face image pair from the second sample set, the first face image pair including a first original image and a first target image; fix the parameters of the generator, input the first original image into the generator, and obtain a first generated image; calculate a third loss value based on the first original image, the first generated image and the first target image using a preset second loss function; adjust the parameters of the discriminator based on the third loss value, and return to execute the step of extracting the first face image pair from the second sample set; when the number of iterations reaches a third preset number of iterations, stop training to obtain a trained discriminator.

[0161] Optionally, the image generation model training module is further configured to extract a second face image pair from the second sample set, the second face image pair including a second original image and a second target image; fix the parameters of the discriminator, input the second original image into the generator, and obtain a second generated image; calculate a fourth loss value based on the second original image and the second generated image using a preset third loss function; input the second generated image into an age classifier, and calculate a fifth loss value; adjust the parameters of the generator based on the fourth loss value and the fifth loss value, and return to execute the step of extracting the second face image pair from the second sample set; when the number of iterations reaches a fourth preset number of iterations, stop training to obtain a trained generator.

[0162] Optionally, the second target image carries an age label; the image generation model training module is further configured to input the second generated image into an age classifier to obtain a predicted age range of the second generated image; and based on the predicted age range of the second generated image and the age label carried by the second target image, a fifth loss value is calculated using a pre-set fourth loss function.

[0163] Optionally, the generator includes an encoder and a decoder; the image generation model training module is further configured to extract output features of each layer of the encoder and each layer of the decoder in the generator, and calculate a sixth loss value based on the output features of the corresponding layers of the encoder and the decoder using a preset fifth loss function; extract and calculate a seventh loss value based on a feature map of the second original image and a feature map of the second generated image using a preset sixth loss function; adjust the parameters of the generator according to the fourth loss value, the fifth loss value, the sixth loss value and the seventh loss value.

[0164] Apply the solution of the embodiment of the present application to obtain an image to be processed; input the image to be processed into an image generation model to obtain a target image corresponding to the image to be processed, wherein the image generation model is obtained by training a discriminator, a generator, and a pre-trained face recognition model based on multiple face images, age labels carried by each face image, and multiple face image pairs. Since the image generation model is obtained by training based on multiple face images, age labels carried by each face image, and multiple face image pairs, cross-age face images can be generated, making the target image more accurate.

[0165] The above is a schematic scheme of a device for generating cross-age facial images for small sample identity authentication of this embodiment. It should be noted that the technical scheme of the device for generating cross-age facial images for small sample identity authentication and the technical scheme of the method for generating cross-age facial images for small sample identity authentication belong to the same concept, and the details not described in detail in the technical scheme of the device for generating cross-age facial images for small sample identity authentication can be found in the description of the technical scheme of the method for generating cross-age facial images for small sample identity authentication.

[0166] In addition, the components in the device embodiment should be understood as the functional modules that must be established to implement the steps of the program flow or the steps of the method, and the functional modules are not actually functionally divided or separated. The device claim defined by such a group of functional modules should be understood as the functional module architecture of the solution mainly implemented by the computer program recorded in the specification, and should not be understood as the physical device that mainly implements the solution by hardware.

[0167] Fig.12 The block diagram of a computing device according to an embodiment of the present application is shown. The components of the computing device 1200 include but are not limited to a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and the database 1250 is used to store data.

[0168] The computing device 1200 also includes an access device 1240 that enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world microwave interconnection access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0169] In one embodiment of the present application, the above components of the computing device 1200 and Fig.12 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.12 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0170] The computing device 1200 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 1200 may also be a mobile or stationary server.

[0171] Among them, the processor 1220 is used to execute computer executable instructions of the cross-age facial image generation method for small sample identity authentication.

[0172] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned method for generating cross-age facial images for small sample identity authentication belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned method for generating cross-age facial images for small sample identity authentication.

[0173] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, are used to implement a method for generating cross-age facial images for small sample identity authentication.

[0174] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned method for generating cross-age facial images for small sample identity authentication belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned method for generating cross-age facial images for small sample identity authentication.

[0175] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0176] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0177] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0178] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0179] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A method for generating cross-age face images for small sample identity authentication, characterized in that: include: Get the image to be processed; The image to be processed is input into an image generation model to obtain a target image corresponding to the image to be processed, wherein the image generation model is obtained by training a discriminator, a generator and a pre-trained face recognition model based on multiple face images, age labels carried by each face image and multiple face image pairs.

2. The method according to claim 1, characterized in that The image generation model includes a generator, an age classifier and a discriminator. The training method of the image generation model includes: Obtain a first sample set, a pre-trained face recognition model, and a second sample set, wherein the first sample set includes a plurality of face images, the face images carry age labels, and the second sample set includes a plurality of face image pairs, the face image pairs include original images and target images; Based on the multiple face images in the first sample set and the age labels carried by each face image, training the face recognition model to obtain a trained age classifier; Fixing the parameters of the generator, and training the discriminator based on the multiple face image pairs in the second sample set to obtain a trained discriminator; Fixing the parameters of the discriminator, and training the generator based on the multiple face image pairs in the second sample set to obtain a trained generator; When the trained age classifier, the trained generator and the trained discriminator meet preset conditions, the trained age classifier, the trained generator and the trained discriminator are combined into the image generation model.

3. The method according to claim 2, characterized in that The face recognition model includes an input layer, a hidden layer and an output layer; The step of training the face recognition model based on the multiple face images in the first sample set and the age labels carried by each face image to obtain a trained age classifier includes: Obtaining a first preset learning rate to freeze an input layer and a hidden layer in the face recognition model; Extracting a first face image from the first sample set, inputting the first face image into the face recognition model, and obtaining a first predicted age group of the first face image; According to the first predicted age group and the age label carried by the first facial image, a first loss value is calculated using a preset first loss function; adjusting the parameters of the face recognition model according to the first loss value, and returning to execute the step of extracting a first face image from the first sample set, inputting the first face image into the face recognition model, and obtaining a first predicted age group of the first face image; When the number of iterations reaches a first preset number of iterations, the training is stopped, and the trained face recognition model is used as the age classifier.

4. The method according to claim 3, characterized in that After the step of stopping the training when the number of iterations reaches the first preset number of iterations and using the trained face recognition model as the age classifier, the method further includes: Obtaining a second preset learning rate, and unfreezing the input layer and the hidden layer in the trained face recognition model, wherein the second preset learning rate is less than the first preset learning rate; Extracting a second face image from the first sample set, inputting the second face image into the face recognition model, and obtaining a second predicted age group of the second face image; According to the second predicted age group and the age label carried by the second facial image, a second loss value is calculated using a preset first loss function; adjusting the parameters of the face recognition model according to the second loss value, and returning to execute the step of extracting a second face image from the first sample set, inputting the second face image into the face recognition model, and obtaining a second predicted age group of the second face image; When the number of iterations reaches a second preset number of iterations, the training is stopped to obtain an updated age classifier.

5. The method according to claim 2, characterized in that: The step of fixing the parameters of the generator and training the discriminator based on the multiple face image pairs in the second sample set to obtain a trained discriminator comprises: Extracting a first face image pair from the second sample set, the first face image pair comprising a first original image and a first target image; Fixing the parameters of the generator, inputting the first original image into the generator, and obtaining a first generated image; According to the first generated image and the first target image, a third loss value is calculated using a preset second loss function; According to the third loss value, adjusting the parameters of the discriminator, and returning to execute the step of extracting the first face image pair from the second sample set; When the number of iterations reaches a third preset number of iterations, the training is stopped to obtain a trained discriminator.

6. The method according to claim 2, characterized in that The step of fixing the parameters of the discriminator and training the generator based on the multiple face image pairs in the second sample set to obtain a trained generator comprises: Extracting a second face image pair from the second sample set, the second face image pair comprising a second original image and a second target image; Fixing the parameters of the discriminator, inputting the second original image into the generator, and obtaining a second generated image; According to the second original image and the second generated image, a fourth loss value is calculated using a preset third loss function; Inputting the second generated image into the age classifier to calculate a fifth loss value; According to the fourth loss value and the fifth loss value, adjusting the parameters of the generator, and returning to execute the step of extracting the second face image pair from the second sample set; When the number of iterations reaches the fourth preset number of iterations, the training is stopped to obtain the trained generator.

7. The method according to claim 6, characterized in that The second target image carries an age label; The step of inputting the second generated image into the age classifier to calculate the fifth loss value comprises: Inputting the second generated image into the age classifier to obtain a predicted age group of the second generated image; According to the predicted age range of the second generated image and the age label carried by the second target image, a fifth loss value is calculated using a preset fourth loss function.

8. The method according to claim 6, characterized in that The generator includes an encoder and a decoder; After the step of inputting the second original image into the generator to obtain the second generated image, the method further includes: Extracting output features of each layer of the encoder and output features of each layer of the decoder in the generator, and calculating a sixth loss value according to the output features of the corresponding layers of the encoder and the decoder using a preset fifth loss function; Extracting and calculating a seventh loss value based on the feature map of the second original image and the feature map of the second generated image using a preset sixth loss function; The step of adjusting the parameters of the generator according to the fourth loss value and the fifth loss value comprises: Adjust the parameters of the generator according to the fourth loss value, the fifth loss value, the sixth loss value and the seventh loss value.

9. A device for generating cross-age face images for small sample identity authentication, characterized in that: include: An acquisition module, configured to acquire an image to be processed; The input module is configured to input the image to be processed into an image generation model to obtain a target image corresponding to the image to be processed, wherein the image generation model is obtained by training a discriminator, a generator and a pre-trained face recognition model based on multiple face images, age labels carried by each face image and multiple face image pairs.

10. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the method for generating cross-age facial images for small sample identity authentication as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Cross-age face recognition method, system and device and storage medium

    CN111881721A

  • Generation method of age transformation face image and generative adversarial network model

    CN112883756A