Face image determination method and device, equipment and storage medium

By generating adjustment coefficients that combine facial feature vectors and target age, the problem of lost identity recognition in generated facial images in existing technologies is solved, and the generated image maintains the identity features of the target object.

CN121921819APending Publication Date: 2026-04-24BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING QIYI CENTURY SCI & TECH CO LTD
Filing Date
2025-09-10
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

The facial images generated by existing technologies are difficult to retain the unique identity features of the target object, resulting in significant differences between the generated portrait and the original face in terms of facial proportions and facial contours, thus losing the ability to identify the identity.

Method used

By generating adjustment coefficients and combining them with facial feature vectors and the target age, a pre-trained face generation model is used to process the facial feature vectors and generate a second face image of the target object at the target age. The adjustment coefficients take into account age features and the unique identity features of the target object, allowing for more detailed fine-tuning.

Benefits of technology

Ensure that the generated images not only conform to the general characteristics of the target age, but also maintain the unique identity characteristics of the target object, and avoid the disconnect of identity characteristics caused by simply guiding based on age.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921819A_ABST
    Figure CN121921819A_ABST
Patent Text Reader

Abstract

The invention relates to a face image determination method and apparatus, a device and a storage medium. The method comprises the steps of obtaining a first face image and a target age of a target object; using a pre-trained face recognition model to extract a face feature vector in the first face image; generating an adjustment coefficient according to the face feature vector and the target age; and using a pre-trained face generation model to process the face feature vector and the adjustment coefficient, and generating a second face image corresponding to the target object at the target age. According to the method, the problem that the generated image is separated from the unique identity feature due to age guidance can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for determining a face image. Background Technology

[0002] In many practical applications, we often face the need to predict a person's appearance at a specific age based on their current facial image. This need is prevalent in film and television production, for example, to depict the age range of a character; or in criminal investigation, to help predict how a suspect's appearance changes with age. Accurately predicting facial images at different age stages can greatly satisfy diverse practical needs.

[0003] In existing technologies, the facial image of the target object and the desired predicted age are typically input directly into a pre-trained face generation model. After receiving the input information, this model undergoes complex internal calculations and processing to ultimately output a facial image of the target object at the target age, attempting to simulate the object's facial features at that age. The face generation model is trained based on a large amount of existing data and specific algorithms, aiming to understand the patterns and regularities of facial changes with age.

[0004] However, the generated facial images often fail to preserve the unique identity features of the target subject. While the generated image may appear to be the target age, it differs significantly from the original face in terms of facial proportions and contours, thus losing its intended recognizability. This greatly reduces the usability of the generated facial images in practical applications. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for determining facial images. Since the adjustment coefficients are generated based on age and facial feature vectors, they consider both age characteristics and the unique identity features of the target object. Compared to directly using age as a guide, the adjustment coefficients can perform more detailed fine-tuning of facial features, ensuring that the generated image conforms to the general characteristics of the target age while maintaining the unique identity features of the target object, thus avoiding the problem of the generated image being disconnected from unique identity features due to age-guided methods.

[0006] In a first aspect, this application provides a method for determining a face image, the method comprising:

[0007] Obtain the first facial image and target age of the target object;

[0008] Using a pre-trained face recognition model, extract face feature vectors from the first face image;

[0009] An adjustment coefficient is generated based on the facial feature vector and the target age;

[0010] Using a pre-trained face generation model, the face feature vector and the adjustment coefficient are processed to generate a second face image of the target object corresponding to the target age.

[0011] Optionally, generating adjustment coefficients based on the facial feature vector and the target age includes:

[0012] Determine the age feature vector corresponding to the target age;

[0013] An adjustment coefficient is generated based on the facial feature vector and the age feature vector.

[0014] Optionally, determining the age feature vector corresponding to the target age includes:

[0015] The target age is normalized to obtain a first value;

[0016] Perform a Fourier transform on the first value to obtain the second value;

[0017] Using a preset vector generation model, the second value is identified to generate an age feature vector corresponding to the target age.

[0018] Optionally, generating adjustment coefficients based on the facial feature vector and the age feature vector includes:

[0019] The age feature vector is mapped using a first linear method to obtain a first scale and a first bias.

[0020] The second linear method is used to map the facial feature vector to obtain the second scale and the second bias.

[0021] Based on the first and second scales, the third scale is obtained;

[0022] Based on the first bias and the second bias, the third bias is obtained;

[0023] An adjustment coefficient is generated based on the third scale and the third bias.

[0024] Optionally, the face generation model includes a network mapping module and multiple resolution modules with different resolutions. The step of using a pre-trained face generation model to process the face feature vector and the adjustment coefficients to generate a second face image of the target object corresponding to the target age includes:

[0025] The facial feature vector is input into the network mapping module so that the network mapping module processes the facial feature vector to obtain a first feature vector;

[0026] The first feature vector and the adjustment coefficient are input into the first resolution module to obtain a feature map. Each resolution module then takes the feature map and adjustment coefficient output by the previous module as input to generate a new feature map. The resolution modules are arranged in order from low to high.

[0027] The feature map output by the last resolution module is determined as the second face image of the target object at the target age.

[0028] Optionally, the resolution module includes a first module, an adjustment module, and a second module. The step of inputting the first feature vector and the adjustment coefficients into the first resolution module to obtain the feature map includes:

[0029] The first feature vector is input into the first module so that the first module processes the target feature vector to obtain a first feature map;

[0030] Using the adjustment module, the first feature map is adjusted according to the adjustment coefficient to obtain the adjusted first feature map;

[0031] The adjusted first feature map is input into the second module so that the second module processes the adjusted first feature map to obtain a feature map.

[0032] Optionally, the step of using the adjustment module to adjust the first feature map according to the adjustment coefficient to obtain the adjusted first feature map includes:

[0033] Based on the first feature map and the third scale, a second feature map is obtained;

[0034] Based on the third bias and the second feature map, the adjusted first feature map is obtained.

[0035] Secondly, this application provides a face image determination device, the device comprising:

[0036] The acquisition unit is used to acquire the first facial image and target age of the target object;

[0037] The extraction unit is used to extract facial feature vectors from the first face image using a pre-trained face recognition model.

[0038] The first generation unit is used to generate adjustment coefficients based on the facial feature vector and the target age;

[0039] The second generation unit is used to process the facial feature vector and the adjustment coefficient using a pre-trained face generation model to generate a second face image of the target object corresponding to the target age.

[0040] Optionally, the first generation unit is used for:

[0041] Determine the age feature vector corresponding to the target age;

[0042] An adjustment coefficient is generated based on the facial feature vector and the age feature vector.

[0043] Optionally, the first generation unit is used for:

[0044] The target age is normalized to obtain a first value;

[0045] Perform a Fourier transform on the first value to obtain the second value;

[0046] Using a preset vector generation model, the second value is identified to generate an age feature vector corresponding to the target age.

[0047] Optionally, the first generation unit is used for:

[0048] The age feature vector is mapped using a first linear method to obtain a first scale and a first bias.

[0049] The second linear method is used to map the facial feature vector to obtain the second scale and the second bias.

[0050] Based on the first and second scales, the third scale is obtained;

[0051] Based on the first bias and the second bias, the third bias is obtained;

[0052] An adjustment coefficient is generated based on the third scale and the third bias.

[0053] Optionally, the face generation model includes a network mapping module and multiple resolution modules with different resolutions, and the second generation unit is used for:

[0054] The facial feature vector is input into the network mapping module so that the network mapping module processes the facial feature vector to obtain a first feature vector;

[0055] The first feature vector and the adjustment coefficient are input into the first resolution module to obtain a feature map. Each resolution module then takes the feature map and adjustment coefficient output by the previous module as input to generate a new feature map. The resolution modules are arranged in order from low to high.

[0056] The feature map output by the last resolution module is determined as the second face image of the target object at the target age.

[0057] Optionally, the resolution module includes a first module, an adjustment module, and a second module, wherein the second generation unit is used for:

[0058] The first feature vector is input into the first module so that the first module processes the target feature vector to obtain a first feature map;

[0059] Using the adjustment module, the first feature map is adjusted according to the adjustment coefficient to obtain the adjusted first feature map;

[0060] The adjusted first feature map is input into the second module so that the second module processes the adjusted first feature map to obtain a feature map.

[0061] Optionally, the second generating unit is used for:

[0062] Based on the first feature map and the third scale, a second feature map is obtained;

[0063] Based on the third bias and the second feature map, the adjusted first feature map is obtained.

[0064] Thirdly, this application provides a face image determination device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to:

[0065] Obtain the first facial image and target age of the target object;

[0066] Using a pre-trained face recognition model, extract face feature vectors from the first face image;

[0067] An adjustment coefficient is generated based on the facial feature vector and the target age;

[0068] Using a pre-trained face generation model, the face feature vector and the adjustment coefficient are processed to generate a second face image of the target object corresponding to the target age.

[0069] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described face image determination method.

[0070] Compared with the prior art, the technical solution provided in this application has the following advantages: In this application embodiment, a first face image and target age of the target object are obtained; a pre-trained face recognition model is used to extract face feature vectors from the first face image; an adjustment coefficient is generated based on the face feature vectors and the target age; and a pre-trained face generation model is used to process the face feature vectors and the adjustment coefficients to generate a second face image of the target object corresponding to the target age. In this application embodiment, since the adjustment coefficients are generated based on age and face feature vectors, the adjustment coefficients consider both age characteristics and the target object's own face features. Compared with directly using age as a guide, the adjustment coefficients can perform more detailed fine-tuning of face features, ensuring that the generated image conforms to the general characteristics of the target age while maintaining the unique identity characteristics of the target object, avoiding the problem of the generated image being disconnected from the unique identity characteristics due to age guidance. Attached Figure Description

[0071] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0072] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0073] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0074] Figure 1 A flowchart illustrating a face image determination method provided in an embodiment of this application;

[0075] Figure 2 A flowchart illustrating a method for determining an age feature vector provided in an embodiment of this application;

[0076] Figure 3 A flowchart illustrating a method for determining adjustment coefficients provided in an embodiment of this application;

[0077] Figure 4 A schematic diagram illustrating a face image determination method provided in an embodiment of this application;

[0078] Figure 5A schematic diagram of a face image determination device provided in an embodiment of this application;

[0079] Figure 6 This is a schematic diagram of a face image determination device provided in an embodiment of this application. Detailed Implementation

[0080] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0081] The following disclosure provides numerous different embodiments or examples for implementing various structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of the invention. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0082] In many practical applications, we often face the need to predict a person's appearance at a specific age based on their current facial image. This need is prevalent in film and television production, for example, to depict the age range of a character; or in criminal investigation, to help predict how a suspect's appearance changes with age. Accurately predicting facial images at different age stages can greatly satisfy diverse practical needs.

[0083] In existing technologies, the facial image of the target object and the desired predicted age are typically input directly into a pre-trained face generation model. After receiving the input information, this model undergoes complex internal calculations and processing to ultimately output a facial image of the target object at the target age, attempting to simulate the object's facial features at that age. The face generation model is trained based on a large amount of existing data and specific algorithms, aiming to understand the patterns and regularities of facial changes with age.

[0084] However, the generated facial images fail to preserve the unique identity features of the target object. Although the generated portrait may appear to be of the target age, it differs significantly from the original face in terms of facial proportions and contours, losing its due identity recognition and thus causing the generated image to become disconnected from the unique identity features.

[0085] To address the aforementioned issues, this application provides a method for determining facial images. Since the adjustment coefficients are generated based on age and facial feature vectors, they consider both age characteristics and the unique identity features of the target object. Compared to directly using age as a guide, the adjustment coefficients allow for more detailed fine-tuning of facial features, ensuring that the generated image conforms to the general characteristics of the target age while maintaining the unique identity features of the target object. This avoids the problem of the generated image being disconnected from unique identity features due to age-based guidance. Figure 1 As shown, the specific steps include:

[0086] Step 101: Obtain the first face image and target age of the target object.

[0087] The target object is the object whose face image is to be generated. The first face image is the initial image presenting the facial features of the target object. It can be a face image of the target object taken at the current time or a face image of the target object taken at a historical time. It can clearly and accurately present the full appearance of the target object's face, including the shape and position of facial features, facial contours, and details such as skin texture. The target age is the age to be predicted. This age can be older or younger than the age represented by the first face image.

[0088] In this step, a professional camera can be used to capture the target subject in a uniformly lit environment with a simple background to obtain the first facial image. Users can also upload the facial image to be processed to the facial generation system, allowing the system to use it as the first facial image. Additionally, users can input the desired predicted age into the facial generation system, allowing it to be used as the target age.

[0089] Step 102: Using a pre-trained face recognition model, extract the face feature vector from the first face image.

[0090] Facial recognition models are algorithms based on artificial intelligence technologies, such as convolutional neural networks (CNNs). During training, these models continuously adjust their parameters to improve their ability to extract and recognize facial features. After sufficient training, a pre-trained facial recognition model is obtained, capable of extracting facial feature vectors from input facial images. A facial feature vector is a digital representation of facial features, uniquely identifying a person's facial characteristics.

[0091] In this step, the first face image is input into a pre-trained face recognition model so that the pre-trained face recognition model can recognize and extract features from the first face image to obtain a face feature vector.

[0092] Step 103: Generate adjustment coefficients based on facial feature vectors and target age.

[0093] The adjustment coefficient is generated based on the facial feature vector and the target age. The facial feature vector contains unique identity information of the target object, such as facial contours and facial feature proportions. By combining it with the target age to generate the adjustment coefficient, the identity characteristics of the target object can be closely linked while considering the target age features. Compared to directly using age as a guide, the adjustment coefficient can perform more detailed fine-tuning of the identity-related feature map, ensuring that the generated images of different ages not only conform to the general characteristics of the target age but also maintain the unique identity of the target object, avoiding the disconnect between the generated image and the original object's identity characteristics caused by simply using age as a guide.

[0094] In this step, a pre-trained adjustment coefficient generation model can be set up. The facial feature vector and target age are input into this model to obtain adjustment coefficients. Alternatively, adjustment coefficients can be generated by analyzing the facial feature vector and target age according to a preset adjustment coefficient generation strategy. For example, the age feature vector corresponding to the target age is determined, and a first linear method is used to map the age feature vector to obtain a first scale and a first bias. A second linear method is used to map the facial feature vector to obtain a second scale and a second bias. Based on the first and second scales, a third scale is obtained; based on the first and second biases, a third bias is obtained; and the third scale and third bias are used as adjustment coefficients.

[0095] Step 104: Using a pre-trained face generation model, process the face feature vector and adjustment coefficients to generate a second face image of the target object at the target age.

[0096] Pre-trained face generation models are typically based on deep learning architectures, such as Generative Adversarial Networks (GANs) or Variational Autoencoders (VAEs). These models are trained on large datasets of face images, learning various feature patterns, structural information, and age-related changes in faces. When the face generation model is a GAN, it consists of a face generation module and a discriminator. The core task of the face generation module is to generate realistic face images. The discriminator's main responsibility is to distinguish whether the input image is a real face image or a fake image generated by the face generation module. It receives face images from real datasets and images generated by the generation module as input and outputs a probability value representing the likelihood that the input image is real. A regression head can also be added before the discriminator to predict the age 'a' of the input image. pred

[0097] (p real / fake ,a pred )=D(x)

[0098] Where, p real / fake This represents the probability value of real or fake data; a pred is the prediction result of the regression head; D(x) is the predicted age.

[0099] During the confrontation, the loss calculation process is performed through the following steps, specifically including:

[0100] Combat loss L adv The loss that measures the realism of the generated image can be calculated using WGAN-GP or non-saturating adversarial loss.

[0101] Loss of identity retention L id Using pre-trained E id Extract the identity embeddings of the input face and the generated face, and calculate the differences between them.

[0102] L id =1-cos(E) id (x input ),E id (x generated ))

[0103] Where Eid(xinput) is the identity feature vector extracted from the input image xinput, and Eid(xgenerated) is the identity feature vector extracted from the generated image xgenerated.

[0104] Age loss L age :Measures the difference between the predicted age of the generated face and the target age. The predicted age 'a' can be calculated using a discriminator. pred

[0105] L age =||a target -a pred ||1

[0106] Among them, a target The target age.

[0107] Total loss: The weighted sum of the above losses.

[0108] L G =λ adv L adv_G +λ id L id +λ age L age

[0109] L D =λ adv L adv+λ age L age

[0110] Among them, L G L represents the total loss of the generator. D λadv, λid, and λage are the total loss of the discriminator. λadv, λid, and λage are weighting coefficients used to balance the impact of different sub-losses on the total loss.

[0111] After calculating the total loss of the generator and discriminator, the generator module and discriminator continuously optimize themselves through mutual competition by constantly calculating and minimizing these losses, making the generated face images more and more realistic and the discriminator's discrimination ability stronger and stronger.

[0112] In this step, the facial feature vector and adjustment coefficient can be directly input into the pre-trained face generation model so that the pre-trained face generation model adjusts the facial feature vector according to the adjustment coefficient and outputs the face image of the target object at the target age. This face image is the second face image.

[0113] In this embodiment, a first facial image and target age of the target object are obtained; a pre-trained facial recognition model is used to extract facial feature vectors from the first facial image; adjustment coefficients are generated based on the facial feature vectors and the target age; and a pre-trained facial generation model is used to process the facial feature vectors and the adjustment coefficients to generate a second facial image of the target object corresponding to the target age. In this embodiment, since the adjustment coefficients are generated based on age and facial feature vectors, they consider both age characteristics and the target object's own facial features. Compared to directly using age as a guide, the adjustment coefficients can perform more detailed fine-tuning of facial features, ensuring that the generated image conforms to the general characteristics of the target age while maintaining the unique identity characteristics of the target object, avoiding problems caused by age-guided images that do not match unique identity characteristics.

[0114] In this embodiment of the application, during the process of generating adjustment coefficients, the age feature vector corresponding to the target age can be determined first; then, adjustment coefficients are generated based on the face feature vector and the age feature vector, and adjustment coefficients are generated based on the face feature vector and the target age. Therefore, this embodiment of the application provides a method for determining adjustment coefficients, the specific steps of which include: determining the age feature vector corresponding to the target age; and generating adjustment coefficients based on the face feature vector and the age feature vector.

[0115] In this step, a pre-trained age feature generation model and a pre-trained adjustment coefficient generation model can be set up. The target age can be input into the age feature generation model, and the output is an age feature vector. The face feature vector and the target age can be input into this model to obtain the adjustment coefficients.

[0116] In this embodiment, the target age can be effectively transformed into an age feature vector through a series of operations, including normalization, Fourier mapping, and identification using a preset vector generation model. Therefore, this embodiment provides a method for determining age feature vectors. Figure 2 As shown, the specific steps include:

[0117] Step 201: Normalize the target age to obtain the first value.

[0118] In this step, the target age a target Normalize to a specific range, such as [0,1]. Let the normalized age (the first value) be a. norm

[0119]

[0120] Among them, A min and A max These are the preset minimum and maximum ages.

[0121] Step 202: Perform a Fourier mapping on the first value to obtain the second value.

[0122] In this step, the normalized age a norm Transformed into a higher-dimensional feature vector (second numerical value) γ(a) through Fourier feature mapping. norm This helps the network better learn and represent subtle (high-frequency) features in age-related changes.

[0123]

[0124] Where b = [b1,...,b] M ] is a fixed or learnable frequency vector. Typically, b k From a certain distribution (such as a Gaussian distribution N(0,σ) 2 The feature is obtained by sampling from M, where M is the dimension of the Fourier feature.

[0125] Step 203: Using a preset vector generation model, the second value is identified to generate an age feature vector corresponding to the target age.

[0126] Among them, the preset vector generation model is usually built based on deep learning technology. The core principle of this model is to automatically adjust the connection weights between each layer by learning from a large amount of sample data, thereby establishing a complex mapping relationship between the input (here, the second value) and the output (age feature vector).

[0127] For example, the preset vector generation model is an MLP model, and the MLP model receives a second numerical value γ(a) norm The function takes the input as input and outputs the corresponding age feature vector v. age .

[0128] In this embodiment, the age feature vector and the face feature vector are first mapped using first and second linear methods respectively, obtaining a first scale and a first bias, and a second scale and a second bias respectively. Then, a third scale is derived based on the first and second scales, and a third bias is derived based on the first and second biases. Finally, an adjustment coefficient is generated based on the third scale and the third bias. Therefore, this embodiment provides a method for determining the adjustment coefficient, as follows: Figure 3 As shown, the specific steps include:

[0129] Step 301: Using the first linear method, the age feature vector is mapped to obtain the first scale and the first bias.

[0130] Here, the first scale is the scaling factor. The first bias is the offset factor. The first linear method can be based on the fundamental principle of linear transformation, aiming to establish a linear relationship between the age feature vector and the scale and bias, and then determine the first scale and the first bias based on this linear relationship. The first linear method can also be to use a pre-defined convolutional layer or module to determine the first scale and the first bias.

[0131] Step 302: Using the second linear method, the facial feature vector is mapped to obtain the second scale and the second bias.

[0132] The second scale is the scaling factor. The second bias is the offset factor. The second linear method is similar to the first linear method, and will not be described in detail here.

[0133] Step 303: Based on the first and second scales, obtain the third scale.

[0134] In this step, the Hadamard product between the first and second scales is calculated to obtain the third scale.

[0135] The Hadamard product is formed by multiplying the corresponding elements of two matrices (or vectors) of the same shape to obtain a new matrix (or vector) of the same shape.

[0136] For example, the third scale is calculated based on γ3 = γ1 ⊙ γ2. Here, γ3 is the third scale, γ1 is the first scale, and γ2 is the second scale.

[0137] Step 304: Obtain the third bias value based on the first bias value and the second bias value.

[0138] In this step, the first bias value and the second bias value are added together to obtain the third bias value.

[0139] For example, the third bias is determined based on β3 = β1 + β2. Here, β1 is the first bias, β2 is the second bias, and β3 is the third bias.

[0140] Step 305: Generate adjustment coefficients based on the third scale and the third bias.

[0141] In this step, the third scale and the third bias are combined into an adjustment factor.

[0142] In the embodiments of this application, such as Figure 4 As shown, the face generation model includes a network mapping module and multiple resolution modules with different resolutions. After receiving a face feature vector and adjustment coefficients, the face generation model first processes the face feature vector in the network mapping module to obtain a first feature vector. Then, this first feature vector and the adjustment coefficients are sent to the first resolution module. Each subsequent resolution module uses the feature map output from the previous module, combined with the adjustment coefficients, to generate a new feature map. Finally, based on the feature map output by the last resolution module, the face image of the target object at the target age is determined. Since these resolution modules are arranged from low to high resolution, processing sequentially from low to high resolution allows for the gradual addition of more details to the image, making the generated face image clearer, more natural, and closer to the face image of the target object at the target age. Therefore, this application embodiment provides a face image determination method, specifically including: inputting a face feature vector into the network mapping module, so that the network mapping module processes the face feature vector to obtain a first feature vector. The first feature vector and adjustment coefficients are input into the first resolution module to obtain a feature map. Each subsequent resolution module then uses the feature map output from the previous module and the adjustment coefficients as input to generate a new feature map. The resolution modules are arranged in ascending order of resolution. The feature map output from the last resolution module is then used as the second face image corresponding to the target object at the target age.

[0143] The feature map contains facial feature information adjusted by incorporating the target age information.

[0144] In this step, when the facial feature vector is input to the network mapping module, the module processes it according to pre-defined mapping rules and algorithms to obtain the first feature vector. These rules and algorithms are typically based on deep learning techniques and learned through training on a large amount of facial data. Next, the first resolution module receives the first feature vector and adjustment coefficients as input. This module fuses and transforms the first feature vector according to its own logic and adjustment coefficients to generate the first feature map. Starting with the second resolution module, each resolution module takes the feature map and adjustment coefficients output from the previous module as input. These modules sequentially process the input feature maps, continuously improving their resolution and optimizing the features in each step by incorporating adjustment coefficients. When the last resolution module receives the feature map and adjustment coefficients output from the previous module, it performs final processing on these components and improves the feature map's resolution to the target resolution, obtaining the second facial image of the target object at the target age.

[0145] In the above description, the first resolution module corresponds to the lowest resolution, the second resolution module to the next lowest, and so on, with the last resolution module corresponding to the highest resolution. For example, assuming the goal is to generate a face image with a final size of 1024×1024 pixels, the first resolution module might first process a relatively "coarse" low-resolution feature map of 64×64, only outlining the very basic and simple contours and large color blocks of the face; the second resolution module then processes a 128×128 resolution feature map, supplementing the low-resolution image with more detailed information such as the position of facial features and the general skin tone transitions; as the modules progress, the penultimate module might process a 512×512 resolution, at which point richer details such as the shape of the eyes and the texture of the eyebrows begin to become clear; the last resolution module processes a 1024×1024 resolution, accurately presenting the fine lines of hair, the texture of skin pores, and even the subtle graininess of makeup, like piecing together a mosaic. Figure 1 The process gradually refines facial images from blurry to clear, achieving a high-resolution, realistic effect.

[0146] Furthermore, assuming there are L resolution modules, an adjustment coefficient is assigned to each module, specifically as follows: Figure 4 As shown. The specific operation is as follows: First, set up L vector generation models with different structures. After obtaining the second value corresponding to the target age, input this value into each vector generation model for recognition. In this way, each vector generation model can output the corresponding age feature vector, and we can obtain L age feature vectors. Based on these L age feature vectors, through a specific calculation method, calculate their respective adjustment coefficients, and finally successfully obtain L adjustment coefficients.

[0147] In this embodiment, adjustment coefficients can be injected at injection points in the resolution module to adjust the features obtained at the injection points according to the adjustment coefficients. The adjusted features are then input into subsequent modules to obtain a feature map. Therefore, based on the above, the resolution module can be divided into a first sub-module, an adjustment sub-module, and a second sub-module. The first sub-module processes the target feature vector to obtain a first feature map. The adjustment sub-module adjusts the first feature map according to the adjustment coefficients to obtain an adjusted first feature map. The second sub-module processes the adjusted first feature map to obtain a feature map. Therefore, this embodiment provides a feature map determination method. The specific steps of this method include: inputting a first feature vector into a first module to process the target feature vector and obtain a first feature map; using the adjustment sub-module to adjust the first feature map according to the adjustment coefficients to obtain an adjusted first feature map; and inputting the adjusted first feature map into a second module to process the adjusted first feature map to obtain a feature map.

[0148] The injection point is set according to the needs of the technicians. In practice, the normalization layer of the resolution block is an ideal injection point because it is the place where style (identity) information is injected. Therefore, the injection point can be set after the normalization layer, and the first sub-module can include upsampling, convolutional layers, and normalization layers. The purpose of upsampling is to increase the spatial resolution of the feature vector, usually using methods such as bilinear interpolation and nearest neighbor interpolation. The convolutional layer performs convolution operations by sliding the convolution kernel on the feature map to extract local features from the feature map. The normalization layer, such as the AdaIN layer, mainly normalizes the feature map and adaptively adjusts the features according to the input conditions (related to the adjustment coefficient in this scenario). The second sub-module includes activation functions. The role of activation functions is to introduce non-linear factors into the neural network, enabling the model to learn more complex functional relationships. Common activation functions include ReLU (Rectified Linear Unit) and Sigmoid. Of course, the injection point can also be set after the convolutional layer or other layers; this is not limited here.

[0149] In this step, when the first feature vector is input into the first module, the first module first sends it into the upsampling submodule. The upsampled feature then enters the convolutional layer, and the feature map output from the convolutional layer enters the normalization layer to obtain the first feature map. Then, the first feature map is adjusted according to the adjustment coefficient to obtain the adjusted first feature map. The adjusted first feature map is then input into the second module, which processes it with the activation function it contains to finally obtain the feature map.

[0150] In this step, since the adjustment coefficients include a third scale and a third bias, the first feature map can be adjusted sequentially based on the third scale and the third bias in the adjustment coefficients to obtain the adjusted first feature map. Therefore, this application embodiment provides a method for determining a first feature map, the specific steps of which include: obtaining a second feature map based on the first feature map and the third scale; and obtaining the adjusted first feature map based on the third bias and the second feature map.

[0151] The third scale is a scaling factor used to scale the feature map. The third bias is an offset factor used to offset the scaled feature map. The third scale, third bias, and feature map have the same dimension. Since the third scale is determined based on the first and second scales, the dimensions of the third scale, first scale, and second scale are the same. Similarly, since the third bias is determined based on the first and second biases, the dimensions of the third bias, second bias, and first bias are the same.

[0152] In this step, the Hadamard product between the first feature map and the third scale is calculated to obtain the second feature map. The second feature map and the third bias are then added to obtain the adjusted first feature map.

[0153] For example, the second feature map is calculated based on F2 = γ3⊙F1, where F1 is the first feature map, γ3 is the third scale, and F2 is the second feature map. The adjusted first feature map is calculated based on F'1 = F2 + β3, where β3 is the third bias, and F'1 is the adjusted first feature map.

[0154] In summary, this application provides a method for determining a face image, which specifically includes: First, obtaining L age feature vectors using an age encoder. A multilayer perceptron (MLP) is used to receive the target age a. target , where a target ∈[A min A max Output a set of L age feature vectors. Where L corresponds to the number of age feature injection points in the generator. Each The dimensions can be different to encode age information at different scales. Detailed steps:

[0155] 1) Normalize the age value to a specific range, such as [0,1]. Let the normalized age be a. norm

[0156]

[0157] Where A min and A max These are the preset minimum and maximum ages.

[0158] 2) Fourier feature mapping: This maps the normalized age a... norm Transformed into a higher-dimensional feature vector γ(a) through Fourier feature mapping. norm This helps the network better learn and represent subtle (high-frequency) features in age-related changes.

[0159]

[0160] Where b = [b1,...,b] M ] is a fixed or learnable frequency vector. Typically, b k From a certain distribution (such as a Gaussian distribution N(0,σ) 2 The feature is obtained by sampling from M, where M is the dimension of the Fourier feature.

[0161] 3) Core Mapping Network: Uses L independent MLPs, which may have similar or different structures. Each MLP receives a in =γ(a norm The function takes the input as input and outputs the corresponding age feature vector.

[0162]

[0163] 2. Obtain the identity feature vector using the identity information module:

[0164] Using a pre-trained face recognition model E id (e.g., ArcFace, CosFace) Extract the input face image x input The high-dimensional identity embedding vector w (equivalent to the face feature vector mentioned above) will be used as the identity input for the subsequent progressive injection generator.

[0165] 3. Progressive Injection Generator:

[0166] Generators based on architectures such as StyleGAN modify their synthesis networks to receive and inject age feature vectors. At the i-th injection point (typically after a convolutional layer in each resolution block), the corresponding age feature vector is... Combined with the identity information w, the i-th adjustment coefficient is generated, where the i-th adjustment coefficient is used to modulate the intermediate feature map of the input layer before the i-th injection point.

[0167] Detailed steps:

[0168] Network Structure: The StyleGAN architecture is adopted, which includes a mapping network from identity information w to the intermediate latent space, and a synthesis network that synthesizes the image step by step from a constant input through multiple resolution modules (e.g., 4x4->8x8->...->1024x1024). Each resolution module contains upsampling, convolutional layers, normalization layers (e.g., AdaIN), and activation functions.

[0169] Injection Points: Select L locations as injection points for the age feature. Typically, the output locations of the normalized layers within each resolution module are considered ideal injection points, as these are inherently where style (identity) information is injected. Therefore, L is usually equal to the number of normalized layers (or the number of resolution modules) within the resolution module.

[0170] Injection method: At the i-th injection point (e.g., after the i-th AdaIN layer), the input feature map of this layer needs to be injected. By combining identity information w and age feature vector Modulation is performed. This invention employs a method of modifying the affine transformation parameters (γ and β) of the original AdaIN, and the specific steps include:

[0171] Use two independent linear layers (or a small MLP) and Let's start from w and The corresponding scale and bias are calculated, and then combined to obtain the i-th adjustment coefficient. For example, w and bias are combined through a learned linear layer. Mapped to the number of feature map channels C i Matching dimensions:

[0172]

[0173]

[0174] The final modulation parameters can be obtained through combination, for example:

[0175]

[0176] in γ (i) For the i-th third scale, β (i) It is the i-th third bias value.

[0177] Then, the calculated γ (i) and β (i) Applied to the normalized feature map (usually using InstanceNormalization):

[0178]

[0179] because These vectors are injected at different resolution levels (i), and they are designed to carry age information at different scales. Therefore: those injected at low resolution levels (e.g., 4x4, 8x8)... It primarily affects the overall structure, contour, and shape of the face, as well as other macroscopic features. Injected into the mid-resolution layer... It primarily affects mid-scale features such as facial muscle distribution and coarser wrinkles. Injected into high-resolution layers (e.g., 256x256, 1024x1024)... It primarily affects microscopic details such as skin texture, fine wrinkles, pores, and age spots. This layered, progressive application of age influence makes the final generated age features more natural and consistent with the real aging process. Through the collaborative work of the aforementioned age encoder and progressive injection generator, the model can maintain the input identity information (controlled by w) while adjusting the target age a. target (pass (Control) to accurately and naturally generate or edit facial images corresponding to the age.

[0180] like Figure 5 As shown, this application embodiment provides a face image determination device, which corresponds to the method embodiment, and specifically includes:

[0181] The acquisition unit 501 is used to acquire the first face image and target age of the target object;

[0182] Extraction unit 502 is used to extract facial feature vectors from the first face image using a pre-trained face recognition model;

[0183] The first generation unit 503 is used to generate adjustment coefficients based on the facial feature vector and the target age;

[0184] The second generation unit 504 is used to process the face feature vector and the adjustment coefficient using a pre-trained face generation model to generate a second face image of the target object corresponding to the target age.

[0185] Optionally, the first generation unit 503 is used for:

[0186] Determine the age feature vector corresponding to the target age;

[0187] An adjustment coefficient is generated based on the facial feature vector and the age feature vector.

[0188] Optionally, the first generation unit 503 is used for:

[0189] The target age is normalized to obtain a first value;

[0190] Perform a Fourier transform on the first value to obtain the second value;

[0191] Using a preset vector generation model, the second value is identified to generate an age feature vector corresponding to the target age.

[0192] Optionally, the first generation unit 503 is used for:

[0193] The age feature vector is mapped using a first linear method to obtain a first scale and a first bias.

[0194] The second linear method is used to map the facial feature vector to obtain the second scale and the second bias.

[0195] Based on the first and second scales, the third scale is obtained;

[0196] Based on the first bias and the second bias, the third bias is obtained;

[0197] An adjustment coefficient is generated based on the third scale and the third bias.

[0198] Optionally, the face generation model includes a network mapping module and multiple resolution modules with different resolutions, and the second generation unit 504 is used for:

[0199] The facial feature vector is input into the network mapping module so that the network mapping module processes the facial feature vector to obtain a first feature vector;

[0200] The first feature vector and the adjustment coefficient are input into the first resolution module to obtain a feature map. Each resolution module then takes the feature map and adjustment coefficient output by the previous module as input to generate a new feature map. The resolution modules are arranged in order from low to high.

[0201] The feature map output by the last resolution module is determined as the second face image of the target object at the target age.

[0202] Optionally, the resolution module includes a first module, an adjustment module, and a second module, wherein the second generation unit 504 is used for:

[0203] The first feature vector is input into the first module so that the first module processes the target feature vector to obtain a first feature map;

[0204] Using the adjustment module, the first feature map is adjusted according to the adjustment coefficient to obtain the adjusted first feature map;

[0205] The adjusted first feature map is input into the second module so that the second module processes the adjusted first feature map to obtain a feature map.

[0206] Optionally, the first generation unit 504 is used for:

[0207] Based on the first feature map and the third scale, a second feature map is obtained;

[0208] Based on the third bias and the second feature map, the adjusted first feature map is obtained.

[0209] like Figure 6 As shown in the figure, this application provides a face image determination device, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604. The processor 601, communication interface 602, and memory 603 communicate with each other via the communication bus 604.

[0210] Memory 603 is used to store computer programs;

[0211] In one embodiment of this application, when the processor 601 executes the program stored in the memory 603, it implements the face image determination method provided in any of the foregoing method embodiments, including:

[0212] Obtain the first facial image and target age of the target object;

[0213] Using a pre-trained face recognition model, extract face feature vectors from the first face image;

[0214] An adjustment coefficient is generated based on the facial feature vector and the target age;

[0215] Using a pre-trained face generation model, the face feature vector and the adjustment coefficient are processed to generate a second face image of the target object corresponding to the target age.

[0216] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps performed by the face image determination method provided in any of the foregoing method embodiments.

[0217] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0218] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0219] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0220] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for determining a face image, characterized in that, The method includes: Obtain the first facial image and target age of the target object; Using a pre-trained face recognition model, extract face feature vectors from the first face image; An adjustment coefficient is generated based on the facial feature vector and the target age; Using a pre-trained face generation model, the face feature vector and the adjustment coefficient are processed to generate a second face image of the target object corresponding to the target age.

2. The method according to claim 1, characterized in that, The step of generating adjustment coefficients based on the facial feature vector and the target age includes: Determine the age feature vector corresponding to the target age; An adjustment coefficient is generated based on the facial feature vector and the age feature vector.

3. The method according to claim 2, characterized in that, Determining the age feature vector corresponding to the target age includes: The target age is normalized to obtain a first value; Perform a Fourier transform on the first value to obtain the second value; Using a preset vector generation model, the second value is identified to generate an age feature vector corresponding to the target age.

4. The method according to claim 2, characterized in that, The step of generating adjustment coefficients based on the facial feature vector and the age feature vector includes: The age feature vector is mapped using a first linear method to obtain a first scale and a first bias. The second linear method is used to map the facial feature vector to obtain the second scale and the second bias. Based on the first and second scales, the third scale is obtained; Based on the first bias and the second bias, the third bias is obtained; An adjustment coefficient is generated based on the third scale and the third bias.

5. The method according to claim 1, characterized in that, The face generation model includes a network mapping module and multiple resolution modules with different resolutions. The process of using a pre-trained face generation model to process the face feature vector and the adjustment coefficients to generate a second face image of the target object corresponding to the target age includes: The facial feature vector is input into the network mapping module so that the network mapping module processes the facial feature vector to obtain a first feature vector; The first feature vector and the adjustment coefficient are input into the first resolution module to obtain a feature map. Each resolution module then takes the feature map and adjustment coefficient output by the previous module as input to generate a new feature map. The resolution modules are arranged in order from low to high. The feature map output by the last resolution module is determined as the second face image of the target object at the target age.

6. The method according to claim 5, characterized in that, The resolution module includes a first module, an adjustment module, and a second module. The step of inputting the first feature vector and the adjustment coefficients into the first resolution module to obtain a feature map includes: The first feature vector is input into the first module so that the first module processes the target feature vector to obtain a first feature map; Using the adjustment module, the first feature map is adjusted according to the adjustment coefficient to obtain the adjusted first feature map; The adjusted first feature map is input into the second module so that the second module processes the adjusted first feature map to obtain a feature map.

7. The method according to claim 6, characterized in that, The step of using the adjustment module to adjust the first feature map according to the adjustment coefficient to obtain the adjusted first feature map includes: Based on the first feature map and the third scale, a second feature map is obtained; Based on the third bias and the second feature map, the adjusted first feature map is obtained.

8. A face image determination device, characterized in that, The device includes: The acquisition unit is used to acquire the first facial image and target age of the target object; The extraction unit is used to extract facial feature vectors from the first face image using a pre-trained face recognition model. The first generation unit is used to generate adjustment coefficients based on the facial feature vector and the target age; The second generation unit is used to process the facial feature vector and the adjustment coefficient using a pre-trained face generation model to generate a second face image of the target object corresponding to the target age.

9. A face image determination device, characterized in that, include: At least one communication interface; At least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; At least one memory connected to the at least one bus, wherein the processor is configured to: Obtain the first facial image and target age of the target object; Using a pre-trained face recognition model, extract face feature vectors from the first face image; An adjustment coefficient is generated based on the facial feature vector and the target age; Using a pre-trained face generation model, the face feature vector and the adjustment coefficient are processed to generate a second face image of the target object corresponding to the target age.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the face image determination method according to any one of claims 1 to 7.