Generated low-age face aging method based on age and key point guidance

By using a cyclic condition based on age and key point guidance in the young face aging model, the problem of low generation quality and redundancy in the parameter in the existing technology is solved, and high Quality of face aging and age conversion effects for young people.

CN119296150AActive Publication Date: 2025-01-10SHAANXI NORMAL UNIV

Patent Information

Application Number
CN202411243890.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-01-10
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

The prior art has problems with low generation quality and redundant parameters in the aging model of young people, which is difficult to effectively promote, especially in the aging process of children's facial features, which cannot accurately capture changes in facial features.

Method used

A cyclic condition-based cyclic conditions based on age and key point guidance is adopted to generate an adversarial network architecture. Through the fusion of facial images and key point information, an APGAN model is constructed, and continuous age conversion losses are introduced to ensure that feature extraction focuses on significant areas and enhance image consistency.

Benefits of technology

Achieve high-quality face aging in young people, improve the realism and credibility of generated images, solve the limitations of reconstruction losses, enhance the network's conversion ability at different ages, and improve the naturalness and diversity of generated images. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296150A_ABST
    Figure CN119296150A_ABST
Patent Text Reader

Abstract

The invention discloses a low-age face aging method based on age and key point guide generation, and mainly solves the problems that in the prior art, a high-quality aging image cannot be generated for a low-age face, and the high efficiency of a processing flow and the accuracy of a target cannot be kept at the same time. According to the implementation scheme, the method comprises the following steps: constructing a training set and a test set of 0-20-year-old face images, and endowing each image with a corresponding age label; key point detection is carried out on the training set, and a detection result is converted into a Gaussian distribution diagram; constructing a face image generative adversarial network generated based on key point information guidance and loop conditions; designing continuous age conversion loss and constructing network overall loss; training the network through the training set and the Gaussian distribution diagram until the total loss is converged; and loading the test set into the trained network to generate face images of all age stages. According to the method, the aged image with higher quality can be generated for the low-age face, and the naturalness of the generated image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image generation, and in particular relates to a method for aging young human faces, which can be used to construct facial aging models for children and adolescents aged 1 to 20 years old. Background Art

[0002] Face aging technology is based on facial features and automatically processes age, so as to automatically predict facial features that age with age. Face aging methods have wide applications in many fields.

[0003] With the widespread application of deep learning in the field of computer vision, generative adversarial networks (GANs) have gradually been applied to the generation of aging face images. The aging process of the human face is complex and changeable. Facial changes during childhood and adolescence are mainly growth and development, such as the gradual rise of the bridge of the nose, the widening of the mandible, and the change in facial shape due to the growth and arrangement of teeth. At the same time, as bones and soft tissues grow, facial proportions will also change. For example, the size of the eyes relative to the entire face will decrease. In addition, the surge in hormones during adolescence, growth hormones and sex hormones, etc., will also promote the growth and remodeling of facial skeletal muscle morphology. Facial aging in adults mainly involves skin aging, wrinkle formation, and redistribution of facial fat. The basic facial structure has been basically established during adolescence. The aging rate of facial structure in adulthood is slower than that of facial texture. At this time, aging is mainly dominated by facial texture, such as the appearance of fine lines in the corners of the eyes, mouth corners, and forehead, sagging skin of the facial contour, and age spots caused by ultraviolet factors. These differences mean that aging models need to adopt different strategies for different age groups.

[0004] In recent years, experts and scholars have conducted some research on facial aging at a young age. Chandaliya et al. proposed a model called Conditional Perceptual Adversarial Variational Autoencoder (CPA-VAE) in the article "Conditional Perceptual Adversarial Variational Autoencoder for Age Progression and Regression on Child Face", which is designed to perform age progression and regression tasks on children's faces. It uses the conditional variational autoencoder (CVAE) to generate facial images given a target child age label, and uses perceptual loss to measure the difference between the synthetic image and the real image at the high-level feature representation level, which helps to generate more realistic images that maintain consistency in facial features.

[0005] Deb et al. proposed a child face aging model based on deep learning in the article "Child face age-progression via deep feature aging". The model requires a large amount of facial image data of children of different ages to train the model to learn the law of facial changes with age. The trained model can predict the future appearance of children by simulating the natural facial changes produced during aging. However, the model is limited to using only data containing pictures of the same individual at different ages as the training set, so it cannot be promoted well.

[0006] Lu et al. proposed a two-stage solution based on the technical route in the article "Learning shape and texture progression for young child face aging", which divides aging into facial texture and geometric deformation, corresponding to geometric deformation generative adversarial network and texture transfer generative adversarial network respectively. In the final result presentation, the key points of the geometric deformation network are applied to the facial texture framework using warping function changes. Although this solution has good results on the datasets YAFD and UTKFace, it has many limitations due to its centralized customized aging and training for different age groups. There are many redundant parameters, and the quality of the generated aging faces is not high enough, so it cannot be widely used. Summary of the invention

[0007] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and to propose a method for aging young faces based on age and key point guidance for children under 20 years old, so as to integrate facial image features and facial key point information, ensure that feature extraction can accurately focus on areas that change significantly with age, and improve the effect of face aging generation tasks.

[0008] The technical idea for achieving the purpose of the present invention is: by adopting a cyclic conditional generative adversarial network architecture, facial images and key point information are fused, so that the model can accurately integrate facial image features and key point information, highlight important facial areas, suppress irrelevant information, and ensure that feature extraction can accurately focus on areas that change significantly with age; by introducing a continuous age conversion loss, the network learning is promoted to maintain the consistency of facial images during age conversion, thereby enhancing the realism and credibility of the generated images.

[0009] According to the above ideas, the method for aging young faces based on age and key point guidance of the present invention is characterized by comprising the following steps:

[0010] (1) Obtain n facial data of people aged 0 to 20 from a public face dataset, divide it into a training set T and a test set M in a ratio of 9:1, and then divide the images in the training set and the test set into five categories according to age: 1 to 3 years old, 4 to 8 years old, 9 to 12 years old, 13 to 16 years old, and 17 to 20 years old. These five categories are defined as age labels from 1 to 5, that is, each image is assigned a corresponding age label;

[0011] (2) Construct a face image generative adversarial network APGAN based on key point information guidance and cyclic conditional generation, which includes a weight-shared forward and reverse generator G and a multi-task discriminator D:

[0012] (2a) performing facial key point detection on the original image in the training set T, converting the obtained facial key point information into a Gaussian distribution map, and normalizing the Gaussian distribution map;

[0013] (2b) Construct a generator G to add aging features to the original facial structure to generate high-quality aging images:

[0014] (2b1) Establish a facial image and key point information attention fusion module FIKFAM to accurately integrate facial image features and key point information and highlight important facial areas;

[0015] (2b2) ​​Establish an encoder consisting of a feature extraction module, a convolution kernel of size 3×3, a FIKFAM module and 6 residual blocks;

[0016] (2b3) Building a decoder consisting of two deconvolution layers, one convolution layer, three normalization layers, and three ReLU activation layers to generate an output image from the feature vector;

[0017] (2b4) Add the outputs of the encoders and input them to the decoder to form the generator G;

[0018] (2c) Construct a multi-task learning discriminator D that includes true and false image discrimination and age verification functions to judge the authenticity of the image and evaluate whether the image reflects a specific age attribute;

[0019] (3) Design continuous age conversion loss L CAT :

[0020]

[0021] Where x is the input image, is the output image of the generator G, From the picture The key points extracted from the image are p, c a Label the target age;

[0022] (4) According to the discriminant prior loss L adv , age verification loss L cls , reconstruct the cycle-consistent loss L recon and continuous age conversion loss L CAT , construct the overall loss function min G max D L(G,D):

[0023] min G max D L(G,D)=λ1L adv +λ2L cls +λ3L recon +λ4L CAT

[0024] Among them, λ1, λ2, λ3, and λ4 are L adv , L cls , L recon , L CAT The weight coefficient of

[0025] (5) Using the back propagation algorithm, the face image generation adversarial network APGAN is trained with the training data set T until the overall loss function of the network converges to obtain a trained face generation model;

[0026] (6) Load the facial images in the test dataset M into the trained face generation model to generate facial images of different age groups.

[0027] Compared with the prior art, the present invention has the following advantages:

[0028] Firstly, since the present invention constructs a facial image generative adversarial network APGAN based on key point information guidance and cyclic conditional generation, it can achieve bidirectional conversion of age, and can efficiently combine and update the texture and structural information of the facial image through the facial image and key point information attention fusion module of the network, and use the structural information to guide the updating of texture information, which not only retains the facial identity features, but also learns the key point information of the face, which helps to ensure that feature extraction is accurately focused on areas that change significantly with age, generating high-quality aging effects.

[0029] Secondly, the present invention defines the continuous age conversion loss CAT Loss, which can solve the limitations of reconstruction loss and enhance the ability of the network, so that it can not only maintain the identity consistency of the image, but also achieve accurate and natural conversion between different age stages. At the same time, due to the introduction of the loss CAT Loss, the network can better understand and simulate the dynamic process of age change, improve the naturalness and diversity of the generated images, and enhance the realism and credibility of the generated images. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a flowchart of the implementation process of the present invention;

[0031] Figure 2 It is a schematic diagram of the face aging generation model constructed in the present invention. DETAILED DESCRIPTION

[0032] The embodiments and effects of the present invention are further described in detail below with reference to the accompanying drawings.

[0033] Reference Figure 1 , the implementation steps of this example are as follows:

[0034] Step 1. Build a dataset.

[0035] 1.1) Obtain n facial data of people aged 0 to 20 from the UTKFace public dataset as the dataset:

[0036] Each image in the UTKFace dataset contains label information such as face image, gender, and age. In this example, only age and gender are used. The age of the faces in this dataset ranges from 1 to 116 years old, which has a long age span, making it easier for the model to learn the aging characteristics of faces at different ages. This example selects 4877 face images of people aged 0 to 20 as the dataset;

[0037] 1.2) Divide the dataset into a training set T and a test set M in a ratio of 9:1, and then divide the images in the training set and the test set into five categories according to age: 1-3 years old, 4-8 years old, 9-12 years old, 13-16 years old, and 17-20 years old;

[0038] 1.3) Assign corresponding age labels to each picture in the training set T and the test set M:

[0039] Use one-hot encoding to assign corresponding age labels of 1 to 5 to each picture of the five age categories in the training set T and the test set M. That is, each age group is regarded as an independent classification, and a binary vector is used to represent the age label, which is expressed as follows:

[0040] Label 1: [1,0,0,0,0], that is, when the age range is 1 to 3 years old, the first column is 1, and the rest of the columns are 0;

[0041] Label 2: [0,1,0,0,0], that is, when the age range is 4 to 8 years old, the corresponding second column is 1, and the rest of the columns are 0;

[0042] Label 3: [0,0,1,0,0], that is, when the age range is 9 to 12 years old, the corresponding third column is 1, and the rest of the columns are 0;

[0043] Label 4: [0,0,0,1,0], that is, when the age range is 13 to 16, the corresponding fourth column is 1, and the rest of the columns are 0;

[0044] Label 5: [0,0,0,0,1], that is, when the age range is 17 to 20 years old, the corresponding fifth column is 1, and the remaining columns are 0.

[0045] Step 2. Perform facial key point detection on the original image in the training set T, convert the obtained facial key point information into a Gaussian distribution map, and normalize the Gaussian distribution map.

[0046] 2.1) Input each image in the training set T into the CNN face key point detector based on nonlinear local regression in the existing Dlib library to determine whether the face image exists;

[0047] If a face image exists, facial key point detection is performed on the data in the data set, that is, firstly, a deep learning method is used to perform face detection on the input image, and the face position and bounding box in the image are located. Then, in the area where the face is detected, the existing pre-trained facial key point detector is used to locate the key points, so as to accurately locate the 68 important feature points in the face image, where: 0-16 represents the contour of the face, 17-21 represents the contour of the left eyebrow, 22-26 represents the contour of the right eyebrow, 27-35 represents the contour of the nose and the bridge of the nose, 36-41 represents the contour of the left eye, 42-47 represents the contour of the right eye, and 48-67 represents the contour of the mouth; then all the feature points are used to form a two-dimensional matrix of size 68×2, where the first dimension represents a total of 68 key points, and the second dimension represents the coordinates of each key point in the image;

[0048] If it is determined that the face image does not exist, the image is removed from the training set T and the next image in the training set is detected.

[0049] 2.2) Convert the facial key point information into a Gaussian distribution map and normalize the Gaussian distribution map:

[0050] Initialize blank image: Initialize a blank image of 128×128 with the same size as the original image for each key point, and initialize 68 images in total;

[0051] A two-dimensional Gaussian function is applied to the key point position of each key point on the corresponding blank image to calculate the corresponding Gaussian distribution map Q. The calculation process is as follows:

[0052] Among them, (x0, y0) is the coordinate of the key point, σ is the standard deviation of the Gaussian kernel, x and y are the coordinates on the image, and G(x, y) is a two-dimensional Gaussian function;

[0053] The Gaussian distribution map Q is normalized to maintain the consistency of the image data and ensure that the value is within a specific range, thereby obtaining a normalized Gaussian distribution map Q′.

[0054] Step 3. Construct a face image generative adversarial network APGAN based on key point information guidance and cyclic conditional generation, which includes a weight-shared forward and reverse generator G and a multi-task discriminator D.

[0055] Reference Figure 2 , the implementation of this step includes the following:

[0056] 3.1) Construct a generator G to add aging features to the original facial structure to generate high-quality aging images:

[0057] 3.1.1) Establish a facial image and key point information attention fusion module FIKFAM to accurately integrate facial image features and key point information and highlight important facial areas:

[0058] 3.1.1a) Create a Module submodule that contains two routes for images and key points, a Sigmoid function layer, a multiplier and an adder:

[0059] The upper image route and the lower key point route have the same structure, both of which include two convolutional layers, two normalization layers, a ReLU activation layer and a Sigmoid function layer. The specific structure is: first convolutional layer → first normalization layer → ReLU activation layer → second convolutional layer → second normalization layer;

[0060] The Sigmoid function layer is used to map the output Mask of the next key point route to the range of (0,1);

[0061] The multiplier is used to multiply the output of the next key point route by the output of the previous image route after passing through the Sigmoid function layer;

[0062] The adder is used to add the multiplication result and the input of the previous image route Addition;

[0063] The next key point route is connected in series with the Sigmoid function layer to form module 1, the previous image route is connected in series with the multiplier to form module 2, module 1 and module 2 are connected in parallel to form module 3, module 3 is connected in series with the adder to form module 4, and then module 4 is connected with the next key point route along the depth axis to form a Module sub-module.

[0064] 3.1.1b) Cascade M = 6 sub-modules Module with the same architecture to form a facial image and key point information attention fusion module FIKFAM;

[0065] 3.1.1c) Facial image and key point information attention fusion module FIKFAM accurately integrates facial image features and key point information to highlight important facial areas as follows:

[0066] Each module in FIKFAM gradually inputs it and Update to its output and In the mth Module, its input is the facial feature encoding and position feature encoding The output is the facial feature encoding and position feature encoding The update of each module includes the following three steps:

[0067] The first step is to generate a "facial feature attention mask", that is, first encode the position feature Enter the next key point route, and then generate a Mask through a Sigmoid function layer:

[0068]

[0069] Where σ represents the Sigmoid function, conv point is the set of convolution, normalization, and ReLU activation layers for the next keypoint path, Represents the input position feature encoding of the mth module;

[0070] The value of the mask is between 0 and 1, indicating the importance of the corresponding pixel position in the generation process. The mask ensures that the model can recognize and enhance the natural changes of key facial features such as eyes, nose, mouth, etc. at different ages, while maintaining the coherence of the background and subtle features;

[0071] The second step is to encode facial features Update, that is, the input facial feature encoding of the mth module After the above image route, it is transformed into Encode the transformed facial features After multiplying with the facial feature attention mask Mask, add a Module facial feature encoding Form a residual connection to achieve facial feature encoding Update:

[0072]

[0073] Among them, represents element multiplication, conv img It is the convolution of the previous image route. The residual connection helps to preserve the original facial feature encoding, which is crucial for the generation of face aging conversion images.

[0074] The third step is to encode the position features Update, that is, according to the updated facial feature encoding Update position feature encoding:

[0075] Position feature encoding First, the key point route is used for conversion, and then the converted position feature code is concatenated with the updated facial feature code. Connect along the depth axis to get the updated position feature encoding

[0076] Where || represents connection along the depth axis,

[0077] Each convolutional layer in a module will halve the depth of the feature map, so that the feature map depths of the position feature encoding path and the facial feature encoding path in the next module are consistent;

[0078] 3.1.2) Establish an encoder consisting of a feature extraction module, a convolution kernel of size 3×3, a FIKFAM module and 6 residual blocks to convert the target age label, input image and Gaussian distribution map corresponding to the input image into facial feature encoding of the target age.

[0079] The feature extraction module includes three convolutional layers, three normalization layers and three ReLU activation layers, and its structure is: first convolutional layer→first normalization layer→first ReLU activation layer→second convolutional layer→second normalization layer→second ReLU activation layer→third convolutional layer→third normalization layer→third ReLU activation layer;

[0080] The convolution kernel has a step size of 1, a size of 3×3, and an edge padding size of 1;

[0081] The six residual blocks have the same structure, and each residual block is a convolutional layer with a step size of 1, a size of 3×3, and an edge padding size of 0;

[0082] The feature extraction module and the FIKFAM module are connected in series to form module A, module A and the convolution kernel are connected in parallel to form module B, and module B is cascaded with 6 residual blocks to form an encoder.

[0083] The encoder first fuses the target age label with the input image and the key point Gaussian map, and extracts features through convolutional layers stacked along the depth axis, combined with instance normalization and ReLU activation layers to generate facial feature codes. Position feature encoding The facial features are then encoded and position feature encoding Send it to the FIKFAM module for fusion and output the position feature encoding and position-guided facial feature encoding

[0084] 3.1.3) Establish a decoder consisting of two deconvolution layers, one convolution layer, three normalization layers and three ReLU activation layers, whose structure is: first deconvolution layer → first normalization layer → first ReLU activation layer → second deconvolution layer → second normalization layer → second ReLU activation layer → first convolution layer → third normalization layer → third ReLU activation layer;

[0085] The decoder is used to convert the facial feature encoding and position feature encoding output by the encoder into an output image, that is, the position feature encoding in the encoder output Discard, facial feature encoding Keep, then and initial facial feature encoding The merged images are sent to the decoder to obtain an output image of the same size as the input.

[0086] 3.2) Construct a multi-task learning discriminator D that includes true and false image discrimination and age verification functions to perform true and false image discrimination and age verification:

[0087] Seven convolution kernels with increasing channel numbers and two fully connected layers FC1 and FC2 with different output parameters are selected and cascaded in sequence to form a multi-task learning discriminator D;

[0088] The first fully connected layer FC1 converts the extracted features into one-dimensional data, which represents the probability that the image is considered to be a real image, so as to identify whether the input image is provided by the data set or generated by the generator, that is, to realize the function of distinguishing true from false images, which is the core task of the discriminator;

[0089] The second fully connected layer FC2 maps the extracted features into 5-dimensional data equal to the number of age categories, and compares them with the target age label to evaluate whether the image reflects a specific age attribute, that is, to achieve age verification. This actually introduces an auxiliary classification task in the APGAN network - age classification, with the aim of ensuring that the generated face image is not only visually realistic, but also that its aging or rejuvenation performance is consistent with the target age label.

[0090] The discriminator shares parameters before proceeding to the FC1 and FC2 layers, so that different tasks can be output based on the same features. By introducing the age verification function, the discriminator can more effectively capture age-related features and generate face images that are more closely matched to the target age. This multi-task learning strategy not only enhances the discriminator's ability to distinguish between real and fake images, but also improves the accurate evaluation of the age attributes of generated images, promoting the generation of higher quality face images with more accurate age attributes.

[0091] Step 4. Design the continuous age conversion loss L CAT .

[0092] When dealing with tasks that require highly dynamic and complex transformations, such as age transformation, relying solely on reconstruction loss may cause the network to focus too much on restoring the input image while ignoring the diversity and complexity of the transformation process. Therefore, it is necessary to introduce CAT Loss, which enables the network to better understand and simulate the dynamic process of age change. Its specific implementation is:

[0093] 4.1) Given an input image x, and a target age label c t , which is output by the generator G as the generated image

[0094]

[0095] Where p is the key point extracted from image x;

[0096] 4.2) Generate images from Extract key points

[0097] 4.3) Given another target age label c a , and compare it with the above image x, image Key Points The key point p is input to the generator G together to obtain the conversion from the input image x to the target age c a The generating vector G(x,p,c a ) and from the input image Switch to target age c a The generated vector

[0098] 4.4) According to the two generated vectors obtained in 3.3), the norm of their difference is calculated to obtain the continuous age conversion loss L CAT :

[0099]

[0100] Step 5. Construct the overall loss function min G max D L(G,D).

[0101] 5.1) According to the original age input image x0, target age c t , the real image x of the target age t , construct the discriminative prior loss L adv , which is expressed as follows:

[0102]

[0103] Among them, G(x0,c t ) is the generated target age face image, D is the discriminator, E represents the data distribution expectation, P data Represents the distribution of training data, x~P data Represents training data x subject to P data Distribution, x,c t ~P data represents x,c t Obey P data Distribution, this loss function can be used to measure the similarity between the generated image and the original dataset image and optimize the discriminator.

[0104] 5.2) Based on the original age face image x0, the original age label c0, and the target age label c t , construct age verification loss L cls , which is expressed as follows:

[0105]

[0106] Among them, c0~P data represents c0 obeys P data Distribution, P represents the conditional probability function. By optimizing the true and false image discrimination prior loss function and the age verification loss function, the generator can ensure that the generated face images are both authentic and can accurately reflect the corresponding age information, thereby generating high-quality face images.

[0107] 5.3) According to the original image x0, the key point Gaussian map p0 corresponding to the original image, the original age label c0, and the key point Gaussian map p corresponding to the target age image t 、Target age label c t , construct the reconstruction cycle consistent loss L recon :

[0108] L recon =||G(G(x0,p0,c t ) t ,c0)-x0||

[0109] Among them, G(x0,p0,c t ) is the target age face image generated by the original image and its key points and target age label input generator, G(G(x0,p0,c t ) t ,c0) is the new original age image reconstructed by the generated image and its key points and the original age label input generator. The reconstruction cycle consistency loss function can achieve the alignment of the input image and the output image at the pixel level, ensuring that the network can restore the original image, especially when the target label is set to the original label, which maximizes the retention of personal identity characteristics.

[0110] 5.4) Assign the four losses according to different weights and then add them together to get the overall network loss:

[0111] min G max D L(G,D)=λ1L adv +λ2L cls +λ3L recon +λ4L CAT

[0112] Among them, λ1, λ2, λ3, and λ4 are L adv , L cls , L recon , L CAT The weight coefficient of .

[0113] Step 6: Use the back propagation algorithm to train the face image generation adversarial network APGAN generated based on key point information guidance and loop conditions through the training data set T.

[0114] (6.1) Set the hyperparameters of backpropagation: set the initial learning rate to 0.0001 and the batch size to 16;

[0115] (6.2) Detect facial key points on the images of the training set T, convert the obtained facial key point information into a Gaussian distribution map, and normalize it to obtain a normalized Gaussian distribution map Q′;

[0116] (6.3) Input the training set T and the Gaussian distribution map Q′ into the face image generation adversarial network APGAN based on key point information guidance and loop conditions to generate the face aging output result;

[0117] (6.4) Calculate the overall loss min based on the face aging output results G max D The value of L1(G,D) is input into the Adam optimizer, and the network parameters are updated by the back propagation algorithm through the optimizer;

[0118] (6.5) Repeat (6.3) to (6.4) until the overall loss function converges to obtain a trained face image generative adversarial network.

[0119] Step 7: Load the face images in the test data set M into the trained face image generation network APGAN to generate face images of different age groups.

[0120] (7.1) Take c test images of different age groups from the test set and input them into the trained face image generation network APGAN network to obtain the generation results of each age group corresponding to the c test images;

[0121] (7.2) Traverse the test set and repeat step (7.1) until the generation results corresponding to all images in the test set are output.

[0122] The effect of the present invention can be further illustrated by the following simulation.

[0123] 1. Simulation conditions

[0124] The simulation platform of this experiment is a computer with Intel Core i7-11800H CPU and 16GB memory, the operating system is Windows 10, and python 3.8 and Pytorch 1.7 are used to build and train the neural network model.

[0125] The dataset used in the simulation is the UTKFace face dataset. The dataset is preprocessed and divided into a training set and a test set in a ratio of 9:1.

[0126] The Face++ platform is used to generate age prediction for aging images. The platform provides a facial analysis service based on face recognition technology, which includes an age prediction function. When using this function, the user uploads or inputs a face photo, and Face++ automatically detects the face in the photo and outputs the predicted age of the face.

[0127] During the simulation, 100 images in the test set are taken as test samples to generate aging faces of different ages and conduct evaluation.

[0128] Common evaluations for generation problems include initial score IS, modal score MS, Wasserstein distance WD, and Frechette initial distance FID. In actual operation, evaluation indicators such as IS and MS cannot accurately evaluate the quality of generated images and sample diversity, and the WD distance is limited by the computational cost. The performance evaluation used in the simulation of the present invention is the following FID indicator:

[0129]

[0130] Among them, μ data and is the mean and variance of the true sample, μ g and are the mean and variance of the generated samples.

[0131] The experimental results are evaluated with the help of Face++API platform, which is divided into two evaluation methods: age accuracy and image recognition rate.

[0132] 2. Simulation content and results

[0133] Simulation 1, using the present invention and several existing representative CAAE, StarGAN, D2AAE, ChildGAN, AgeGAN++ methods to age young faces of different age groups under the same experimental environment, and calculating their respective performance evaluation indicators FID. The results are shown in Table 1.

[0134] Table 1 Performance evaluation results of the present invention and existing methods on face aging of different age groups

[0135]

[0136]

[0137] It can be seen from Table 2 that the FID results of the present invention are significantly better than those of other algorithms in all age groups. In the age group of 1 to 3 years old, the FID index of the present invention is reduced by 60.18 compared with that of ChildGAN. In the age group of 4 to 8 years old, the FID index of the present invention is reduced by 135.2 compared with that of ChildGAN. In the age group of 9 to 12 years old, the FID index of the present invention is reduced by 152.67 compared with that of ChildGAN. In the age group of 13 to 16 years old, the FID index of the present invention is reduced by 137.79 compared with that of ChildGAN. In the age group of 17 to 20 years old, the FID index of the present invention is reduced by 80.37 compared with that of ChildGAN.

[0138] In simulation 2, the present invention and several existing representative CAAE, StarGAN, D2AAE, ChildGAN, and AgeGAN++ methods are used to age young faces of different age groups in the same experimental environment. The aged images and original images are respectively transmitted to the Face++ platform for age prediction, and the average age difference between the aged images and the original images is calculated, that is, the age accuracy of each method. The results are shown in Table 2.

[0139] Table 2 Comparison of age accuracy of each method

[0140]

[0141] As can be seen from Table 2, the experimental results of the present invention are better than most of the existing algorithms. The age accuracy in the 1-3 age group ranks third. This is because the present invention introduces facial key points, so the accuracy is slightly lower in the 1-3 age group with large contour changes. The age accuracy of the present invention in other age groups ranks second, only lower than ChildGAN. Although the age accuracy of the present invention is lower than ChildGAN, the aging images generated by ChildGAN often do not match the childhood appearance, and their quality is much lower than that of the present invention.

[0142] In simulation 3, the present invention and several existing representative CAAE, StarGAN, D2AAE, ChildGAN, and AgeGAN++ methods are used to age young faces of different age groups in the same experimental environment. The aged images are transferred to the Face++ platform for facial key point positioning, and the image recognition rate of each method is calculated. The results are shown in Table 3.

[0143] Table 3 Comparison results of image recognition rates of various methods

[0144] CAAE AgeGAN++ StarGAN ChildGAN The present invention Recognition accuracy 69% 79% 78.6% 67.92% 83.2%

[0145] It can be seen from Table 3 that the image recognition accuracy of the present invention is better than that of other existing algorithms, that is, the faces generated by the present invention have clear facial contours and features and have higher image quality.

[0146] The above description is only a specific example of the present invention and does not constitute any limitation to the present invention. It is obvious that for professionals in this field, after understanding the content and principles of the present invention, it is possible to make various modifications and changes in form and details without departing from the principles and structures of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.

[0147] It should be noted that the step numbers in the specification and claims of the present invention are only for a clear description of the implementation scheme of the present invention to facilitate understanding, and the order of the numbers is not limited.

[0148] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

Claims

1. A method for aging young faces based on age and key point guidance, characterized in that: These include: (1) Obtain n facial data of people aged 0 to 20 from a public face dataset, divide it into a training set T and a test set M in a ratio of 9:1, and then divide the images in the training set and the test set into five categories according to age: 1 to 3 years old, 4 to 8 years old, 9 to 12 years old, 13 to 16 years old, and 17 to 20 years old. These five categories are defined as age labels from 1 to 5, that is, each image is assigned a corresponding age label; (2) Detect facial key points on the original images in the training set T, convert the obtained facial key point information into a Gaussian distribution map, and normalize the Gaussian distribution map; (3) Construct a face image generative adversarial network APGAN based on key point information guidance and cyclic conditional generation, which includes a weight-shared forward and reverse generator G and a multi-task discriminator D: (3a) Construct a generator G to add aging features to the original facial structure to generate high-quality aging images: (3a1) Establish a facial image and key point information attention fusion module FIKFAM to accurately integrate facial image features and key point information and highlight important facial areas; (3a2) Establish an encoder consisting of a feature extraction module, a convolution kernel of size 3×3, a FIKFAM module and 6 residual blocks; (3a3) Building a decoder consisting of two deconvolution layers, one convolution layer, three normalization layers, and three ReLU activation layers to generate an output image from the feature vector; (3a4) Add the outputs of the encoders and input them to the decoder to form the generator G; (3b) Construct a multi-task learning discriminator D that includes true and false image discrimination and age verification functions to judge the authenticity of the image and evaluate whether the image reflects a specific age attribute; (4) Design continuous age conversion loss L CAT : Where x is the input image, is the output image of the generator G, From the picture The key points extracted from the image are p, c a Label the target age; (5) According to the discriminant prior loss L adv , age verification loss L cls , reconstruct the cycle-consistent loss L recon and continuous age conversion loss L CAT , construct the overall loss function min G max D L(G,D): min G max D L(G,D)=λ1L adv +λ2L cls +λ3L recon +λ4L CAT Among them, λ1, λ2, λ3, and λ4 are L adv , L cls , L recon , L CAT The weight coefficient of (6) Using the back propagation algorithm, the face image generation adversarial network APGAN is trained with the training data set T until the overall loss function of the network converges to obtain a trained face generation model; (7) Load the facial images in the test dataset M into the trained face generation model to generate facial images of different age groups.

2. The method according to claim 1, characterized in that The labels 1 to 5 defined in step (1) are assigned corresponding age labels to each picture of the five age categories using one-hot encoding, which is expressed as follows: Label 1: [1,0,0,0,0], that is, when the age range is 1 to 3 years old, the first column is 1, and the rest of the columns are 0; Label 2: [0,1,0,0,0], that is, when the age range is 4 to 8 years old, the corresponding second column is 1, and the rest of the columns are 0; Label 3: [0,0,1,0,0], that is, when the age range is 9 to 12 years old, the corresponding third column is 1, and the rest of the columns are 0; Label 4: [0,0,0,1,0], that is, when the age range is 13 to 16, the corresponding fourth column is 1, and the rest of the columns are 0; Label 5: [0,0,0,0,1], that is, when the age range is 17 to 20 years old, the corresponding fifth column is 1, and the remaining columns are 0.

3. The method according to claim 1, characterized in that Step (2) performs facial key point detection on the original image in the training set T, converts the obtained facial key point information into a Gaussian distribution map, and normalizes the Gaussian distribution map. The implementation steps include the following: (2a) Input each image in the training set T into the existing CNN face key point detector based on nonlinear local regression to determine whether the face image exists; If a face image exists, the face key point detector locates 68 important feature points of the face in the image, and obtains a two-dimensional matrix of size 68×2, where the first dimension represents a total of 68 key points and the second dimension represents the coordinates of each key point in the image; If it is determined that the face image does not exist, the image is removed from the training set T and the next image in the training set is detected; (2b) Convert the facial key point information into a Gaussian distribution map and normalize the Gaussian distribution map: Initialize blank image: Initialize a blank image of 128×128 with the same size as the original image for each key point, and initialize 68 images in total; A two-dimensional Gaussian function is applied to the key point position of each key point on the corresponding blank image to calculate the corresponding Gaussian distribution map Q. The calculation process is as follows: Among them, (x0, y0) is the coordinate of the key point, σ is the standard deviation of the Gaussian kernel, x and y are the coordinates on the image, and G(x, y) is a two-dimensional Gaussian function; Normalize the Gaussian distribution map Q to maintain the consistency of the image data and ensure that the values ​​are within a specific range.

4. The method according to claim 1, characterized in that: In step (3a1), a facial image and key point information attention fusion module FIKFAM is established, which is implemented as follows: (3a1.1) Create a Module submodule that contains two routes for images and key points, a Sigmoid function layer, a multiplier, and an adder: The upper image route and the lower key point route have the same structure, both of which include two convolutional layers, two normalization layers, a ReLU activation layer and a Sigmoid function layer. The specific structure is: first convolutional layer → first normalization layer → ReLU activation layer → second convolutional layer → second normalization layer; The Sigmoid function layer is used to map the output Mask of the next key point route to the range of (0,1); The multiplier is used to multiply the output of the next key point route by the output of the previous image route after passing through the Sigmoid function layer; The adder is used to add the multiplication result and the input of the previous image route Addition; (3a1.2) Six sub-modules with the same architecture are cascaded to form the facial image and key point information attention fusion module FIKFAM.

5. The method according to claim 1, characterized in that Step (3a2) builds an encoder including a feature extraction module, a convolution kernel, a FIKFAM module and 6 residual blocks, which is implemented as follows: The feature extraction module includes three convolutional layers, three normalization layers and three ReLU activation layers, and its structure is: first convolutional layer→first normalization layer→first ReLU activation layer→second convolutional layer→second normalization layer→second ReLU activation layer→third convolutional layer→third normalization layer→third ReLU activation layer; The convolution kernel has a step size of 1, a size of 3×3, and an edge padding size of 1; The six residual blocks have the same structure, and each residual block is a convolutional layer with a step size of 1, a size of 3×3, and an edge padding size of 0; The feature extraction module and the FIKFAM module are connected in series to form module A, module A and the convolution kernel are connected in parallel to form module B, and module B is cascaded with 6 residual blocks to form an encoder.

6. The method according to claim 1, characterized in that Step (3a3) establishes a decoder comprising two deconvolution layers, one convolution layer, three normalization layers and three ReLU activation layers, whose structure is: first deconvolution layer → first normalization layer → first ReLU activation layer → second deconvolution layer → second normalization layer → second ReLU activation layer → first convolution layer → third normalization layer → third ReLU activation layer.

7. The method according to claim 1, characterized in that Step (3b) constructs a multi-task learning discriminator D with the functions of true and false image discrimination and age verification. It is composed of 7 convolution kernels with increasing number of channels and two fully connected layers FC1 and FC2 with different output parameters, which are cascaded in sequence. The true and false image discrimination and age verification are implemented as follows: The first fully connected layer FC1 converts the extracted features into one-dimensional data, which represents the probability that the image is considered to be a real image, so as to identify whether the input image is provided by the dataset or generated by the generator, that is, to achieve true and false image discrimination; The second fully connected layer FC2 maps the extracted features into 5-dimensional data equal to the number of age categories and compares them with the target age label to evaluate whether the image reflects specific age attributes, that is, to achieve age verification.

8. The method according to claim 1, characterized in that The discriminative prior loss L in step (5) adv , age verification loss L cls , reconstruct the cycle-consistent loss L recon , the calculation formulas are as follows: L recon =||G(G(x0,p0,c t ),p t ,c0)-x0|| Among them, x t is the target age image, x0 is the original age image, c0 is the original age label, c t is the target age label, p0 is the Gaussian graph of key points corresponding to the original age, and p t is the Gaussian graph of key points proposed from the target age picture generated in the middle, G(x0,c t ) is the generated target age face image, G(x0,p0,c t ) is the generated target age picture, x is the input image, is the output image of the generator G, From the picture The key points extracted from the image are p, c a is the target age label.

9. The method according to claim 1, characterized in that: Step (6) uses the back propagation algorithm to train the face image generative adversarial network APGAN through the training data set T, which is implemented as follows: (6a) Set the hyperparameters of back propagation: set the initial learning rate to 0.0001 and the batch size to 16; (6b) performing facial key point detection on the training set T, converting the obtained facial key point information into a Gaussian distribution map, and normalizing the map to obtain a normalized Gaussian distribution map Q'; (6c) Input the images in the training set T and their corresponding Gaussian distribution maps Q' into the network APGAN to generate the face aging output results; (6d) Calculate the global loss min based on the face aging output results of the training set G max D The function value of L1(G,D) is calculated and the network parameters are updated using the back propagation algorithm. (6e) Repeat (6c) to (6d) until the global loss function converges to obtain a trained face image generative adversarial network.

10. The method according to claim 1, characterized in that Step (7) loads the face images in the test data set M into the trained face generation model to generate face images of different age groups, which is implemented as follows: (7a) Take c test images from the test set, input the images into the trained APGAN network, load the trained model weights, and obtain the generation results corresponding to the c test images; (7b) Traverse the test set until the generation results corresponding to all images in the test set are output.

Citation Information

Patent Citations

  • Face aging method based on a conditional generative adversarial network

    CN109523463A

  • Method for realizing facial expression migration of cyclic generative adversarial network based on spectrum normalization

    CN110084121A

  • Face aging method based on local and global regional strategy adversarial learning

    CN116993578A

  • Method employing generative adversarial network for predicting face change

    WO2020029356A1

Cited By

  • Low-deviation multi-scale regional brain age prediction method based on adversarial training

    CN121191744A

  • A low-bias multi-scale regional brain age prediction method based on adversarial training

    CN121191744B