CN113392769A - Face image synthesis method and device, electronic equipment and storage medium - Google Patents

Face image synthesis method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113392769A
CN113392769A CN202110664896.3A CN202110664896A CN113392769A CN 113392769 A CN113392769 A CN 113392769A CN 202110664896 A CN202110664896 A CN 202110664896A CN 113392769 A CN113392769 A CN 113392769A
Authority
CN
China
Prior art keywords
face image
target
face
age
target person
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110664896.3A
Other languages
Chinese (zh)
Inventor
朱艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Fanxing Huyu IT Co Ltd
Original Assignee
Guangzhou Fanxing Huyu IT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Fanxing Huyu IT Co Ltd filed Critical Guangzhou Fanxing Huyu IT Co Ltd
Priority to CN202110664896.3A priority Critical patent/CN113392769A/en
Publication of CN113392769A publication Critical patent/CN113392769A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

The disclosure provides a method and a device for synthesizing a face image, electronic equipment and a storage medium, and belongs to the technical field of internet. The method comprises the following steps: acquiring a conditional face image of which a target person in an original face image meets a preset condition; acquiring appointed age coding information corresponding to an appointed age, wherein the appointed age coding information is used for indicating the face features of a face of the appointed age, and the appointed age coding information is determined according to the face features of the face of which the age difference with the appointed age meets the difference condition; and adjusting the face characteristics of the target person in the conditional face image based on the specified age coding information to obtain the target face image. The specified age coding information in the disclosure can reflect the face characteristics of the face of the specified age, and the appearance of the target person in the target face image synthesized based on the specified age coding information is the appearance of the target person at the specified age, so that the synthesized target face image is more accurate.

Description

Face image synthesis method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for synthesizing a face image, an electronic device, and a storage medium.
Background
The human face appearance simulation synthesis technology is a research hotspot in the field of image processing, and has important application value in the fields of public security criminal investigation, human face recognition, film and television makeup auxiliary design, digital entertainment and the like. For example, in criminal investigation applications, police synthesize the current appearance of a criminal or lost child who has escaped for years from many years' photos; in the production of film and television, makeup artists draw makeup of different ages for actors by using various makeup techniques, thereby creating looks of characters of different ages.
However, the above-mentioned synthesis method of the face image is mainly based on experience to synthesize, which results in that the synthesized face image is not accurate enough.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for synthesizing a face image, an electronic device and a storage medium, which can improve the accuracy of the synthesized face image. The technical scheme is as follows:
in a first aspect, a method for synthesizing a face image is provided, the method including:
acquiring an original face image and an appointed age, wherein the appointed age is the age of a target person in the original face image in a target face image to be synthesized;
acquiring a conditional face image of which the target person in the original face image meets a preset condition;
acquiring appointed age coding information corresponding to the appointed age, wherein the appointed age coding information is used for indicating the face features of the face of the appointed age, and the appointed age coding information is determined according to the face features of the face of which the age difference with the appointed age meets the difference condition;
and adjusting the face characteristics of the target person in the conditional face image based on the specified age coding information to obtain the target face image.
In another embodiment of the present disclosure, the obtaining of a conditional face image in which a target person in the original face image meets a preset condition includes:
acquiring the face pose and the illumination intensity of a target person in the original face image;
and when any one of the face pose and the illumination intensity of the target person in the original face image does not accord with the preset condition, constructing a conditional face image which accords with the preset condition according to the original face image.
In another embodiment of the present disclosure, the constructing a conditional face image meeting the preset condition according to the original face image includes:
identifying the face contour of a target person in the original face image to obtain a face contour model of the target person;
identifying the facial features of the target person in the original facial image to obtain a facial detail picture of the target person;
superposing the human face detail picture to the human face contour model to obtain a new human face image;
and according to the preset conditions, adjusting the face pose and the illumination intensity of the target person in the new face image to obtain the conditional face image.
In another embodiment of the present disclosure, the method further comprises:
and when the face pose and the illumination intensity of the target person in the original face image meet the preset conditions, determining the original face image as the conditional face image.
In another embodiment of the present disclosure, the adjusting, based on the specified age coding information, the facial features of the target person in the conditional facial image to obtain the target facial image includes:
and inputting the specified age coding information and the condition face image into a condition generation-countermeasure network, and outputting the target face image, wherein the condition generation-countermeasure network is used for adjusting the face characteristics of the face image based on the different age coding information to obtain the face images of different ages.
In another embodiment of the present disclosure, after the adjusting the facial features of the target person in the conditional facial image based on the specified age coding information to obtain the target facial image, the method further includes:
identifying the target age and the target identity information of a target person in the target face image;
and when the target identity information is matched with the identity information of the target person in the original face image and/or the target age is matched with the specified age, determining the target face image as a final synthesis result.
In a second aspect, an apparatus for synthesizing a face image is provided, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an original face image and a specified age, and the specified age is the age of a target person in the original face image in a target face image to be synthesized;
the second acquisition module is used for acquiring a conditional face image of which the target person in the original face image meets a preset condition;
a third obtaining module, configured to obtain specified age coding information corresponding to the specified age, where the specified age coding information is used to indicate a face feature of a face of the specified age, and the specified age coding information is determined according to a face feature of a face whose age difference with the specified age satisfies a difference condition;
and the adjusting module is used for adjusting the face characteristics of the target person in the conditional face image based on the specified age coding information to obtain the target face image.
In another embodiment of the present disclosure, the second obtaining module is configured to obtain a face pose and an illumination intensity of a target person in the original face image; and when any one of the face pose and the illumination intensity of the target person in the original face image does not accord with the preset condition, constructing a conditional face image which accords with the preset condition according to the original face image.
In another embodiment of the present disclosure, the second obtaining module is configured to identify a face contour of a target person in the original face image, so as to obtain a face contour model of the target person; identifying the facial features of the target person in the original facial image to obtain a facial detail picture of the target person; superposing the human face detail picture to the human face contour model to obtain a new human face image; and according to the preset conditions, adjusting the face pose and the illumination intensity of the target person in the new face image to obtain the conditional face image.
In another embodiment of the present disclosure, the apparatus further comprises:
and the determining module is used for determining the original face image as the conditional face image when the face pose and the illumination intensity of the target person in the original face image meet the preset conditions.
In another embodiment of the present disclosure, the adjusting module is configured to input the specified age coding information and the condition face image into a condition generating-confrontation network, and output the target face image, and the condition generating-confrontation network is configured to adjust the face features of the face image based on different age coding information, so as to obtain face images of different ages.
In another embodiment of the present disclosure, the apparatus further comprises:
the identification module is used for identifying the target age and the target identity information of the target person in the target face image;
and the determining module is used for determining the target face image as a final synthesis result when the target identity information is matched with the identity information of the target person in the original face image and/or the target age is matched with the specified age.
In a third aspect, an electronic device is provided, which includes a processor and a memory, where at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the method for synthesizing a face image according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the method for synthesizing a face image according to the first aspect.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
the face features of the target person in the conditional face image are adjusted based on the specified age coding information to obtain the target face image, the specified age coding information learns common youthful or aging appearance features near the specified age and can reflect the face features of the face with the accurate specified age, the appearance of the target person in the target face image synthesized based on the specified age coding information is the appearance which the target person should have at the specified age, and therefore the synthesized target face image is smoother and more accurate. And the original face image of the synthesized target face image can be the face image with any posture and illumination intensity, so that the application range and the universality of the synthesis method of the face image are improved. Moreover, after the target face image is synthesized, the accuracy of the synthesized target face image is further ensured by predicting the target age and the target identity information of the target person in the target face image and verifying the target face image based on the predicted target age and the specified age.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a method for synthesizing a face image according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another method for synthesizing a face image according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a face image synthesizing apparatus according to an embodiment of the present disclosure;
fig. 4 shows a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
It is to be understood that the terms "each," "a plurality," and "any" and the like, as used in the embodiments of the present disclosure, are intended to encompass two or more, each referring to each of the corresponding plurality, and any referring to any one of the corresponding plurality. For example, the plurality of words includes 10 words, and each word refers to each of the 10 words, and any word refers to any one of the 10 words.
The embodiment of the present disclosure provides a method for synthesizing a face image, and referring to fig. 1, the method provided by the embodiment of the present disclosure includes:
101. acquiring an original face image and designating age.
The original face image is an image which is input or selected by a user and used for synthesizing appearances of target persons at different ages, the original face image comprises the target persons, the number of the target persons can be one or multiple, and the number of the target persons in the original face image is not determined. The specified age is the age of the target person in the original face image in the target face image to be synthesized, and the specified age may be larger than the age of the target person in the original face image or smaller than the age of the target person in the original face image, that is, by using the method provided by the embodiment of the disclosure, an aging face image may be synthesized, and a young face image may also be synthesized.
102. And acquiring a conditional face image of which the target person in the original face image meets a preset condition.
The preset conditions are used for constraining the human face posture, the illumination intensity and the like of the target person. The human face posture comprises various postures of up-down turning, left-right turning, in-plane rotation and the like. The generated target face image is convenient for a user to check by restricting the face pose of the target person in the original face image; by restricting the illumination intensity of the target person in the original face image, the influence of the illumination intensity on the texture of the target person can be removed, so that the generated target face image has better appearance.
103. And acquiring the specified age coding information corresponding to the specified age.
The specified age coding information is used for indicating the face features of the face of the specified age, and the specified age coding information is determined according to the face features of the face of which the age difference with the specified age meets a difference condition, wherein the difference condition can be that the absolute value of the age difference with the specified age is smaller than a preset value, and the preset value can be 1 year, 2 years and the like. Since the specified age coding information learns the facial features of young or aged people of the adjacent ages, the target face image generated based on the specified age coding information is more accurate.
104. And adjusting the face characteristics of the target person in the conditional face image based on the specified age coding information to obtain the target face image.
Based on the specified age coding information and the conditional face image, the electronic equipment performs weighted calculation on the face features in the conditional face image by adopting the specified age coding information to obtain the face features conforming to the specified age, and further generates a target face image to be output.
The method provided by the embodiment of the disclosure adjusts the face features of the target person in the conditional face image based on the specified age coding information to obtain the target face image, the specified age coding information learns the common youthful or aging appearance features near the specified age, and can reflect the face features of the face of the accurate specified age, and the appearance of the target person in the target face image synthesized based on the specified age coding information is the appearance which the target person should have at the specified age, so that the synthesized target face image is smoother and more accurate.
The disclosed embodiment provides a method for synthesizing a face image, taking an example that an electronic device executes the disclosed embodiment, the electronic device may be a terminal with stronger computing power, such as a smart phone, a tablet computer, a smart camera, an e-book reader, and the like, the electronic device may also be a server for applications such as photographing applications, image processing applications, and the like, and the server may be an independent physical server, or a server cluster or a distributed system formed by a plurality of physical servers. Referring to fig. 2, a method flow provided by the embodiment of the present disclosure includes:
201. the electronic device acquires an original face image and a specified age.
The original face image can be a face image in any posture, including a front face image, a side face image, a face image with blur and shielding, and the like, so that a user can randomly input a favorite face image without inputting only a front 'certificate photo', the degree of freedom of the user is improved, and the application range of the face image synthesis method provided by the embodiment of the disclosure is expanded.
The electronic device obtains the original face image, including but not limited to: the electronic equipment acquires a face image input by a user and takes the face image input by the user as an original face image. The face image input by the user includes an image obtained by shooting a target person or a picture including the target person by the user through a camera device or a camera application, and may also be an image including the target person obtained by the user from the internet.
The electronic device obtains the specified age, including but not limited to the following ways:
in a first method, in a face image synthesis process, an electronic device obtains an age number input by a user for a target face image to be synthesized, and determines the age number input by the user as a designated age.
In the second mode, if the electronic device is a device with a display screen, an age progress bar is displayed on the display screen of the electronic device, and a user controls the target age corresponding to the target face image to be synthesized by sliding the age progress bar left and right.
Further, since the method provided by the embodiment of the present disclosure is to synthesize a target face image of a specified age, it is necessary that the original face image includes a face region of a target person, if the original face image does not include the face region of the target person, the method provided by the embodiment of the present disclosure cannot be adopted to synthesize the target face image of the specified age, therefore, after the original face image is acquired, the electronic device further detects whether the original face image includes the face region, if it is detected that the original face image includes the face region, step 202 is executed, and if it is detected that the original face image does not include the face region, step 201 needs to be executed to reacquire the original face image until the acquired original face image includes the face region.
When the electronic equipment detects whether the original face image comprises the face region, the haar feature of the original face image can be extracted, and if the haar feature of the original face image is the haar feature corresponding to the face, the original face image is determined to comprise the face region. The haar feature is an image feature, generally the same kind of object has the same haar feature, and different kinds of objects have different haar features, for example, a face image has the same haar feature, and a face image and a non-face image have different haar features, so that whether a face region is included in an original face image can be detected by using the haar feature corresponding to a face.
202. The electronic equipment acquires the face pose and the illumination intensity of a target person in an original face image.
When the electronic equipment acquires the face pose of a target figure in an original face image, the original face image can be input into a face pose recognition model, the face pose of the target figure in the original face image is output, the face pose recognition model is used for recognizing the face pose of each figure in the face image, and the face pose recognition model can be obtained by training according to a training sample face image marked with the face pose.
Based on the obtained face pose and illumination intensity of the target person in the original face image, the electronic device compares the face pose of the target person in the original face image with the face pose required by the preset condition, compares the illumination intensity of the target person in the original face image with the illumination intensity required by the preset condition, and if the face pose of the target person in the original face image meets the face pose required by the preset condition and the illumination intensity of the target person in the original face image meets the illumination intensity required by the preset condition, determines that the face pose and the illumination intensity of the target person in the original face image meet the preset condition, and executes step 203; if the face pose of the target person in the original face image does not meet the face pose required by the preset condition, or the illumination intensity of the target person in the original face image does not meet the illumination intensity required by the preset condition, or the face pose of the target person in the original face image does not meet the face pose required by the preset condition and the illumination intensity of the target person in the original face image does not meet the illumination intensity required by the preset condition, it is determined that the electronic device performs step 204 when the face pose and the illumination intensity of the target person in the original face image do not meet the preset condition.
203. And when the face pose and the illumination intensity of the target person in the original face image accord with preset conditions, the electronic equipment determines the original face image as a conditional face image.
And in response to the fact that the face pose and the illumination intensity of the target person in the original face image meet preset conditions, the electronic equipment directly determines the original face image as a conditional face image, and the conditional face image is a basic image of a subsequent synthesized target face image.
204. When any one of the face pose and the illumination intensity of the target person in the original face image does not accord with the preset condition, the electronic equipment constructs the conditional face image which accords with the preset condition according to the original face image.
In response to the fact that any one of the face pose and the illumination intensity of the original face image does not meet the preset condition, the electronic equipment constructs the face image meeting the preset condition according to the original face image by adopting the following method:
2041. the electronic equipment identifies the face contour of the target person in the original face image to obtain a face contour model of the target person.
The electronic equipment identifies the face shape and the texture feature of a target person in an original face image, inputs the identified face shape and the identified texture feature into a 3D digital media (3D) model, and carries out 3D (3D Dimensions) reconstruction on the face contour of the target person by the 3D M to obtain a face contour model of the target person. The 3DMM is a relatively basic three-dimensional face statistical model and is used for solving the problem of recovering from a two-dimensional face image to a three-dimensional shape, and the 3DMM can represent any face contour model based on a group of statistical models of face shapes and texture features.
2042. And the electronic equipment identifies the facial features of the target person in the original facial image to obtain a facial detail picture of the target person.
The electronic equipment inputs an original face image into a 3D-GAN (3 dimensional general adaptive Network, three-dimensional generation countermeasure Network) Network, identifies the facial features of a target person in the original face image based on the 3D-GAN Network, and obtains a facial detail picture of the target person, wherein the facial detail picture is similar to a human skin mask and can be laid on a plane.
2043. And the electronic equipment superimposes the face detail image into the face contour model to obtain a new face image.
The electronic equipment pastes each part in the human face detail picture of the target person back to the corresponding position of the human face outline model to obtain a new human face image, wherein the new human face image comprises the target person.
2044. And the electronic equipment adjusts the face posture and the illumination intensity of the target person in the new face image according to preset conditions to obtain a conditional face image.
Based on the obtained new face image, the electronic device adjusts the face pose of the target person in the new face image according to the face pose requirement in the preset condition, and adjusts the illumination intensity of the target person in the new face image according to the illumination intensity requirement in the preset condition to obtain the condition face image which meets the preset condition and comprises the target person.
205. The electronic equipment acquires the designated age code information corresponding to the designated age.
In the embodiment of the disclosure, the electronic device maintains an age convolution kernel sequence, where the age convolution kernel sequence includes age convolution kernels corresponding to different ages, and the age convolution kernels corresponding to different ages are arranged according to age features, and each age convolution kernel corresponding to an age can learn aged face features or young face features of age convolution kernels corresponding to adjacent ages, so that the face features of different ages can be smoothly transited without mutation. The age convolution kernel of each age is used for determining the weight value of the face feature of each age, and the face feature of each age is weighted and calculated by adopting the weight value of the face feature of each age to obtain the face feature of each age, so that the face image of each age is obtained.
When the specified age is obtained, the electronic equipment obtains an age convolution kernel corresponding to the specified age according to the specified age, further obtains a weight value of the face feature corresponding to the age convolution kernel, and obtains the specified age coding information by coding the weight value of the face feature. In the application process, the electronic equipment continuously learns the face characteristics of the face with the specified age and the face with the age difference meeting the difference condition with the specified age, so that the coded information of the specified age can accurately reflect the face characteristics of the face with the specified age.
206. And based on the specified age coding information, the electronic equipment adjusts the face characteristics of the target person in the conditional face image to obtain the target face image.
The electronic device inputs the specified age code information and the condition face image into the condition generating-confronting network, and outputs the target face image. Wherein, the condition generation-countermeasure Network (CGAN) is a GAN (generic adaptive Network) Network with constraints, and comprises a generation Network, a countermeasure Network and a label, and the condition generation-countermeasure Network can generate an image indicated by the label for the input noise. In the embodiment of the present disclosure, the conditional generation-confrontation network can adjust the facial features of the facial images based on the coded information of different ages, so as to obtain the facial images of different ages.
In another embodiment of the present disclosure, after the electronic device synthesizes the target face image according to the specified age coding information and the condition face image, the electronic device further checks the quality of the generated target face image to ensure that the generated target face image is a face image belonging to the target person and having an age meeting the expected requirement. When the electronic device verifies the quality of the generated target face image, the following method can be adopted:
2061. the electronic device identifies a target age and target identity information of a target person in a target face image.
The electronic equipment inputs the target face image into a pre-constructed attention model and outputs the target age and the target identity information of the target person in the target face image. The Attention model may be composed of several Attention networks, such as Channel Attention, Spatial Attention, which mainly focuses on different features in the image, and Mask Attention, which mainly focuses on information related to age and identity. The identity information refers to information that can determine the identity of the target person.
2062. And when the target identity information is matched with the identity information of the target person in the original face image and/or the target age is matched with the specified age, the electronic equipment determines the target face image as a final synthesis result.
The electronic equipment matches the target identity information of the target person in the target face image with the identity information of the target person in the original face image, matches the target age of the target face image with the specified age, and determines the target face image as a final synthesis result when the target identity information is matched with the identity information of the target person in the original face image and/or the target age is matched with the specified age. Specifically, when the target identity information of the target person in the target face image is matched with the identity information of the target person in the original face image, the electronic equipment determines that the target person in the target face image and the target person in the original face image are the same face, and further determines the target face image as a final synthesis result; when the target age of the target face image is matched with the specified age, the electronic equipment determines that the generated target face image meets the requirement of the required age, and further determines the target face image as a final synthetic result; and when the target identity information of the target person in the target face image is matched with the identity information of the target person in the original face image, and the target age of the target face image is matched with the specified age, the electronic equipment determines the target face image as a final synthesis result.
The method provided by the embodiment of the disclosure adjusts the face features of the target person in the conditional face image based on the specified age coding information to obtain the target face image, the specified age coding information learns the common youthful or aging appearance features near the specified age, and can reflect the face features of the face of the accurate specified age, and the appearance of the target person in the target face image synthesized based on the specified age coding information is the appearance which the target person should have at the specified age, so that the synthesized target face image is smoother and more accurate. And the original face image of the synthesized target face image can be the face image with any posture and illumination intensity, so that the application range and the universality of the synthesis method of the face image are improved. Moreover, after the target face image is synthesized, the accuracy of the synthesized target face image is further ensured by predicting the target age and the target identity information of the target person in the target face image and verifying the target face image based on the predicted target age and the specified age.
Referring to fig. 3, an embodiment of the present disclosure provides an apparatus for synthesizing a face image, including:
a first obtaining module 301, configured to obtain an original face image and a specified age, where the specified age is an age of a target person in the original face image in a target face image to be synthesized;
a second obtaining module 302, configured to obtain a conditional face image in which a target person in the original face image meets a preset condition;
a third obtaining module 303, configured to obtain specified age coding information corresponding to a specified age, where the specified age coding information is used to indicate a face feature of a face of the specified age, and the specified age coding information is determined according to a face feature of a face whose age difference with the specified age satisfies a difference condition;
and the adjusting module 304 is configured to adjust the face features of the target person in the conditional face image based on the specified age coding information to obtain the target face image.
In another embodiment of the present disclosure, the second obtaining module 302 is configured to obtain a face pose and an illumination intensity of a target person in an original face image; and when any one of the face pose and the illumination intensity of the target person in the original face image does not accord with the preset condition, constructing a conditional face image which accords with the preset condition according to the original face image.
In another embodiment of the present disclosure, the second obtaining module 302 is configured to identify a face contour of a target person in an original face image, so as to obtain a face contour model of the target person; identifying the facial features of the target person in the original facial image to obtain a facial detail picture of the target person; superposing the human face detail picture to a human face contour model to obtain a new human face image; and adjusting the face pose and the illumination intensity of the target person in the new face image according to preset conditions to obtain a conditional face image.
In another embodiment of the present disclosure, the apparatus further comprises:
and the determining module is used for determining the original face image as the conditional face image when the face pose and the illumination intensity of the target person in the original face image meet preset conditions.
In another embodiment of the present disclosure, the synthesizing module is configured to input the specified age coding information and the conditional face image into a conditional generation-confrontation network, and output the target face image, and the conditional generation-confrontation network is configured to adjust the face features of the face image based on the different age coding information, so as to obtain the face images of different ages.
In another embodiment of the present disclosure, the apparatus further comprises:
the identification module is used for identifying the target age and the target identity information of a target person in the target face image;
and the determining module is used for determining the target face image as a final synthesis result when the target identity information is matched with the identity information of the target person in the original face image and/or the target age is matched with the specified age.
In summary, the apparatus provided in the embodiment of the present disclosure adjusts the face features of the target person in the conditional face image based on the specified age coding information to obtain the target face image, where the specified age coding information learns the common youthful or aging appearance features near the specified age, and can reflect the face features of the face of the accurately specified age, and the appearance of the target person in the target face image synthesized based on the specified age coding information is the appearance that the target person should have at the specified age, so that the synthesized target face image is smoother and more accurate. And the original face image of the synthesized target face image can be the face image with any posture and illumination intensity, so that the application range and the universality of the synthesis method of the face image are improved. Moreover, after the target face image is synthesized, the accuracy of the synthesized target face image is further ensured by predicting the target age and the target identity information of the target person in the target face image and verifying the target face image based on the predicted target age and the specified age.
Fig. 4 shows a block diagram of an electronic device 400 according to an exemplary embodiment of the present disclosure. In general, the apparatus 400 includes: a processor 401 and a memory 402.
Processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 402 is used to store at least one instruction for execution by processor 401 to implement the method of synthesizing a face image provided by the method embodiments of the present disclosure.
In some embodiments, the electronic device 400 may further optionally include: a peripheral interface 403 and at least one peripheral. The processor 401, memory 402 and peripheral interface 403 may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: a power source 404.
The peripheral interface 403 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402 and the peripheral interface 403 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The power supply 404 is used to power the various components in the electronic device 400. The power source 404 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 404 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in fig. 4 does not constitute a limitation of the electronic device 400, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of the electronic device 400 to perform the video processing method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The electronic device provided by the embodiment of the disclosure adjusts the face features of the target person in the conditional face image based on the specified age coding information to obtain the target face image, the specified age coding information learns the common youthful or aging appearance features near the specified age, and can reflect the face features of the face of the accurate specified age, and the appearance of the target person in the target face image synthesized based on the specified age coding information is the appearance which the target person should have at the specified age, so that the synthesized target face image is smoother and more accurate. And the original face image of the synthesized target face image can be the face image with any posture and illumination intensity, so that the application range and the universality of the synthesis method of the face image are improved. Moreover, after the target face image is synthesized, the accuracy of the synthesized target face image is further ensured by predicting the target age and the target identity information of the target person in the target face image and verifying the target face image based on the predicted target age and the specified age.
The embodiment of the disclosure provides a computer-readable storage medium, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement a method for synthesizing a face image. The computer readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The computer-readable storage medium provided by the embodiment of the disclosure adjusts the face features of a target person in a conditional face image based on the specified age coding information to obtain a target face image, the specified age coding information learns common youthful or aging appearance features near the specified age, and can reflect the face features of a face of an accurately specified age, and the appearance of the target person in the target face image synthesized based on the specified age coding information is the appearance that the target person should have at the specified age, so that the synthesized target face image is smoother and more accurate. And the original face image of the synthesized target face image can be the face image with any posture and illumination intensity, so that the application range and the universality of the synthesis method of the face image are improved. Moreover, after the target face image is synthesized, the accuracy of the synthesized target face image is further ensured by predicting the target age and the target identity information of the target person in the target face image and verifying the target face image based on the predicted target age and the specified age.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only and not to limit the present disclosure, and any modification, equivalent replacement, or improvement made without departing from the spirit and scope of the present disclosure is to be considered as the same as the present disclosure.

Claims (10)

1. A method for synthesizing a face image, the method comprising:
acquiring an original face image and an appointed age, wherein the appointed age is the age of a target person in the original face image in a target face image to be synthesized;
acquiring a conditional face image of which the target person in the original face image meets a preset condition;
acquiring appointed age coding information corresponding to the appointed age, wherein the appointed age coding information is used for indicating the face features of the face of the appointed age, and the appointed age coding information is determined according to the face features of the face of which the age difference with the appointed age meets the difference condition;
and adjusting the face characteristics of the target person in the conditional face image based on the specified age coding information to obtain the target face image.
2. The method of claim 1, wherein the obtaining of the conditional face image in which the target person in the original face image meets the preset condition comprises:
acquiring the face pose and the illumination intensity of a target person in the original face image;
and when any one of the face pose and the illumination intensity of the target person in the original face image does not accord with the preset condition, constructing a conditional face image which accords with the preset condition according to the original face image.
3. The method according to claim 2, wherein constructing a conditional face image meeting the preset condition according to the original face image comprises:
identifying the face contour of a target person in the original face image to obtain a face contour model of the target person;
identifying the facial features of the target person in the original facial image to obtain a facial detail picture of the target person;
superposing the human face detail picture to the human face contour model to obtain a new human face image;
and according to the preset conditions, adjusting the face pose and the illumination intensity of the target person in the new face image to obtain the conditional face image.
4. The method of claim 1, further comprising:
and when the face pose and the illumination intensity of the target person in the original face image meet the preset conditions, determining the original face image as the conditional face image.
5. The method of claim 1, wherein the adjusting the facial features of the target person in the conditional face image based on the specified age-coding information to obtain the target face image comprises:
and inputting the specified age coding information and the condition face image into a condition generation-countermeasure network, and outputting the target face image, wherein the condition generation-countermeasure network is used for adjusting the face characteristics of the face image based on the different age coding information to obtain the face images of different ages.
6. The method according to any one of claims 1 to 5, wherein, after the adjusting the facial features of the target person in the conditional face image based on the specified age coding information to obtain the target face image, the method further comprises:
identifying the target age and the target identity information of a target person in the target face image;
and when the target identity information is matched with the identity information of the target person in the original face image and/or the target age is matched with the specified age, determining the target face image as a final synthesis result.
7. An apparatus for synthesizing a face image, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring an original face image and a specified age, and the specified age is the age of a target person in the original face image in a target face image to be synthesized;
the second acquisition module is used for acquiring a conditional face image of which the target person in the original face image meets a preset condition;
a third obtaining module, configured to obtain specified age coding information corresponding to the specified age, where the specified age coding information is used to indicate a face feature of a face of the specified age, and the specified age coding information is determined according to a face feature of a face whose age difference with the specified age satisfies a difference condition;
and the adjusting module is used for adjusting the face characteristics of the target person in the conditional face image based on the specified age coding information to obtain the target face image.
8. The apparatus of claim 7, further comprising:
the identification module is used for identifying the target age and the target identity information of the target person in the target face image;
and the determining module is used for determining the target face image as a final synthesis result when the target identity information is matched with the identity information of the target person in the original face image and/or the target age is matched with the specified age.
9. An electronic device, characterized in that the electronic device comprises a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to realize the method for synthesizing the face image according to any one of claims 1 to 6.
10. A computer-readable storage medium, wherein at least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to implement the method for synthesizing a face image according to any one of claims 1 to 6.
CN202110664896.3A 2021-06-16 2021-06-16 Face image synthesis method and device, electronic equipment and storage medium Pending CN113392769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110664896.3A CN113392769A (en) 2021-06-16 2021-06-16 Face image synthesis method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110664896.3A CN113392769A (en) 2021-06-16 2021-06-16 Face image synthesis method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113392769A true CN113392769A (en) 2021-09-14

Family

ID=77621284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110664896.3A Pending CN113392769A (en) 2021-06-16 2021-06-16 Face image synthesis method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113392769A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556471A (en) * 2021-09-18 2021-10-26 广州卓腾科技有限公司 Certificate photo generation method, system and computer readable storage medium
CN113902957A (en) * 2021-10-11 2022-01-07 北京百度网讯科技有限公司 Image generation method, model training method, device, electronic device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679451A (en) * 2017-08-25 2018-02-09 百度在线网络技术(北京)有限公司 Establish the method, apparatus, equipment and computer-readable storage medium of human face recognition model
CN112101204A (en) * 2020-09-14 2020-12-18 北京百度网讯科技有限公司 Training method of generative countermeasure network, image processing method, device and equipment
CN112287852A (en) * 2020-11-02 2021-01-29 腾讯科技(深圳)有限公司 Face image processing method, display method, device and equipment
CN112487971A (en) * 2020-11-30 2021-03-12 南京信息工程大学 Method for synthesizing face age for weak label data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679451A (en) * 2017-08-25 2018-02-09 百度在线网络技术(北京)有限公司 Establish the method, apparatus, equipment and computer-readable storage medium of human face recognition model
CN112101204A (en) * 2020-09-14 2020-12-18 北京百度网讯科技有限公司 Training method of generative countermeasure network, image processing method, device and equipment
CN112287852A (en) * 2020-11-02 2021-01-29 腾讯科技(深圳)有限公司 Face image processing method, display method, device and equipment
CN112487971A (en) * 2020-11-30 2021-03-12 南京信息工程大学 Method for synthesizing face age for weak label data

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556471A (en) * 2021-09-18 2021-10-26 广州卓腾科技有限公司 Certificate photo generation method, system and computer readable storage medium
CN113902957A (en) * 2021-10-11 2022-01-07 北京百度网讯科技有限公司 Image generation method, model training method, device, electronic device and medium
CN113902957B (en) * 2021-10-11 2024-02-09 北京百度网讯科技有限公司 Image generation method, training method and device of model, electronic equipment and medium

Similar Documents

Publication Publication Date Title
Pang et al. Image-to-image translation: Methods and applications
CN109558864B (en) Face key point detection method, device and storage medium
CN107330408B (en) Video processing method and device, electronic equipment and storage medium
CN109359538B (en) Training method of convolutional neural network, gesture recognition method, device and equipment
US11836853B2 (en) Generation and presentation of predicted personalized three-dimensional body models
CN109815826B (en) Method and device for generating face attribute model
EP3885965B1 (en) Image recognition method based on micro facial expressions, apparatus and related device
WO2020078119A1 (en) Method, device and system for simulating user wearing clothing and accessories
CN113287118A (en) System and method for face reproduction
WO2022078041A1 (en) Occlusion detection model training method and facial image beautification method
CN115205949B (en) Image generation method and related device
CN113261013A (en) System and method for realistic head rotation and facial animation synthesis on mobile devices
CN110288513B (en) Method, apparatus, device and storage medium for changing face attribute
CN110599395A (en) Target image generation method, device, server and storage medium
CN111008935B (en) Face image enhancement method, device, system and storage medium
CN113392769A (en) Face image synthesis method and device, electronic equipment and storage medium
CN113850168A (en) Fusion method, device and equipment of face pictures and storage medium
CN115565238B (en) Face-changing model training method, face-changing model training device, face-changing model training apparatus, storage medium, and program product
CN114239717A (en) Model training method, image processing method and device, electronic device and medium
Agarwal et al. Synthesis of realistic facial expressions using expression map
CN115049016A (en) Model driving method and device based on emotion recognition
Chalup et al. Simulating pareidolia of faces for architectural image analysis
CN113658324A (en) Image processing method and related equipment, migration network training method and related equipment
CN114973349A (en) Face image processing method and training method of face image processing model
CN110675312A (en) Image data processing method, image data processing device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination