Method and device for dividing portrait in image and application
By recognizing and adjusting the proportion table to model faces and body shapes, realistic clone portraits are generated, solving the problem of insufficient naturalness and realism in traditional methods, and improving the quality and efficiency of film and television works.
Patent Information
- Application Number
- CN202411949404.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-12-16
AI Technical Summary
Traditional face image synthesis methods struggle to achieve a high degree of naturalness and realism, and neglect adjustments to body shape and posture, resulting in unnatural synthesis results.
By acquiring the image of the person to be cloned from the image, identifying their age and gender, and using a pre-configured adjustment scale table to model the face and body shape, a realistic clone image is generated by combining stitching technology, including fine adjustments to facial features, body shape, posture and hairstyle.
It improves the efficiency and accuracy of portrait synthesis, resulting in more natural and realistic clone portraits, enhancing the production quality of film and television works and the audience experience, while reducing the workload of makeup artists.
Smart Images

Figure CN121147985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus and application for creating a human image clone in an image. Background Technology
[0002] Facial image synthesis, as a cutting-edge technology in image processing, has demonstrated enormous application potential and value in recent years in various fields such as facial recognition, film and television makeup design, and digital entertainment. However, traditional facial image synthesis methods mostly rely on human experience and skills, which not only limits the efficiency and accuracy of synthesis but also makes it difficult to meet the demand for highly realistic and natural facial images in practical applications.
[0003] Traditional techniques are limited to synthesizing facial features, often neglecting the overall image of a person, including key elements such as body shape and posture. If only changes in facial features are focused on during the synthesis process, while adjustments to body shape and posture are ignored, the resulting image will struggle to achieve a high degree of naturalness and realism. To address these issues, there is an urgent need to develop a method for creating composite human figures that improves the accuracy and naturalness of the synthesized images. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the technical problem to be solved by the present invention is to provide a method, device and application for creating human figures in images that can improve the accuracy and naturalness of synthesized human figures.
[0005] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is to provide a method for creating a human image clone in an image, comprising the following steps: Extract the image of the person to be cloned from the image; The acquired image of the person to be cloned is used as a reference image, and the age and gender of the reference image are identified. Based on a pre-configured adjustment ratio table for different age groups, the age of the reference portrait is mapped to the corresponding adjustment ratio table; Based on the set requirements, the age of the clone portrait, the corresponding adjustment ratio table, and the gender are used to adjust the reference portrait to obtain the final clone portrait.
[0006] Furthermore, the step of adjusting the reference portrait based on the set age, corresponding adjustment ratio table, and gender of the clone portrait to obtain the final clone portrait includes the following sub-steps: The reference portrait is adjusted based on the corresponding adjustment ratio table to complete the facial modeling and body modeling, resulting in a facial model and a human body model. Based on the face model, body model, and the gender of the reference portrait, a matching image is obtained, and a person image is generated using stitching technology; The face model is fused onto the character image to perform a face swap, resulting in the final clone portrait.
[0007] Furthermore, the step of acquiring the image of the person to be cloned from the image includes the following sub-steps: Obtain an image containing the image of the person to be cloned; The brightness, contrast, and sharpness of the image are adjusted to improve image quality; Remove interfering factors from an image to maintain image clarity; the interfering factors include noise and speckles in the image. Delete the image other than the image of the person to be cloned, and obtain the image of the person to be cloned.
[0008] Furthermore, in the step of using the acquired image of the person to be cloned as a reference image and identifying the age and gender of the reference image, the age and gender of the reference image are identified through the following sub-steps: A recognition model for identifying age and gender was established based on a convolutional neural network. Collect facial images of people of different ages and genders as training data; The recognition model is trained based on the training data; The trained recognition model is used to identify the age and gender of a reference portrait.
[0009] Furthermore, the method for configuring the adjustment ratio table for different age groups includes the following sub-steps: Collect portraits of people of different ages and group them according to different age groups, including toddlers, children, teenagers, young adults, middle-aged people, and the elderly; Extract facial and body features of the portraits in each group. The facial features include the aspect ratio, saturation, whiteness, darkness, and roughness of the face. The body features include height and weight. Using the facial and body features of the current age group as baseline parameters, and the facial and body features of the other age groups as parameters to be adjusted, an adjustment ratio table corresponding to the current group is obtained.
[0010] Furthermore, the step of using the facial and body features of the current age group as baseline parameters and the facial and body features of the other age groups as parameters to be adjusted to obtain the adjustment ratio table corresponding to the current group includes the following sub-steps: The parameters of facial and body features of the current age group are used as the baseline parameters, and the proportion of the baseline parameters is set as the baseline value. The facial and body features of the remaining age groups were used as parameters to be adjusted, and the ratio of the parameters to be adjusted to the baseline parameters was calculated. By integrating the proportions of each parameter, we obtain the adjustment ratio table corresponding to the current group.
[0011] Furthermore, the step of adjusting the reference portrait based on the corresponding adjustment ratio table to complete facial modeling and body modeling, and obtaining the face model and body model, includes the following sub-steps: Set the age of the clone avatar to be generated according to the actual situation; In the corresponding adjustment ratio table, look up the ratio of each parameter in the facial features and body features corresponding to the age group of the clone portrait to be generated; The facial features of the reference portrait are adjusted according to the proportions of each parameter in the facial features to obtain a face model. The body features of the reference portrait are adjusted according to the proportions of each parameter in the body features to obtain a human body model.
[0012] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is: providing a human image clone device in an image, comprising: The acquisition module is used to acquire the image of the person to be cloned from the image; The recognition module is used to use the acquired image of the person to be cloned as a reference image and to identify the age and gender of the reference image; The table selection module is used to map the age of the reference portrait to the corresponding adjustment ratio table based on a pre-configured adjustment ratio table for different age groups. The adjustment module is used to adjust the reference portrait based on the set age of the clone portrait to be generated, the corresponding adjustment ratio table, and the gender, so as to obtain the final clone portrait.
[0013] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is: to provide a method for creating clones of film and television characters, comprising the following steps: High-definition images of the character to be cloned are obtained from film and television materials. Based on the age of the cloned character to be generated as set in the script, a cloned character corresponding to that age is generated. The cloned character is obtained using the image cloned character method. Based on the action trajectory and speed in the film and television scene, the clone image is matched with motion and the lighting and shadow of the clone image are adjusted according to the lighting and shadow effects in the scene. Based on the character settings and historical background in the script, appropriate costumes and hairstyles were selected, and the clone image was integrated with the film and television scene.
[0014] The image-based portrait cloning method, apparatus, and application of the present invention have at least the following beneficial effects: The present invention, through a pre-configured adjustment ratio table, can quickly and accurately obtain the adjustment ratio for adjusting a reference portrait, thus obtaining the desired cloned portrait, thereby greatly improving the efficiency of portrait synthesis; simultaneously, based on fine adjustments to facial and body features, the synthesized portrait has higher precision and is closer to the appearance of a real person; the present invention not only focuses on changes in facial features but also fully considers adjustments to body shape, hairstyle, and posture, making the synthesized portrait more natural and realistic in its overall image, effectively avoiding the problem of unnatural synthesis results caused by focusing only on facial features in traditional technologies; in the film and television field, the present invention can improve the production quality and audience experience of film and television works by generating realistic portrait clones, while reducing the workload of makeup artists and improving the efficiency of film and television production. Attached Figure Description
[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of one embodiment of the image-based human doppelganger method of the present invention.
[0016] Figure 2 This is a flowchart of step S1 in the diagram.
[0017] Figure 3 To obtain an image containing the image of the person to be cloned.
[0018] Figure 4 To Figure 3 The resulting portrait after processing.
[0019] Figure 5 A flowchart for configuring adjustment ratio tables for different age groups.
[0020] Figure 6 for Figure 5 The flowchart for step S33.
[0021] Figure 7 for Figure 1 The flowchart for step S4.
[0022] Figure 8 To be Figure 4 The portrait is used as a reference to generate images of a teenager and an elderly person.
[0023] Figure 9 This is a structural block diagram of one embodiment of the human image clone device of the present invention. Detailed Implementation
[0024] The invention will now be further described with reference to the accompanying drawings.
[0025] Please see Figure 1 This is a flowchart of an embodiment of the image-based human doppelganger method of the present invention. This embodiment specifically includes the following steps: S1. Obtain the image of the person to be cloned.
[0026] Please see Figure 2 Step S1 includes the following sub-steps: S11. Obtain an image containing the image of the person to be cloned.
[0027] Specifically, obtain images containing the image of the person to be cloned through various channels. Please refer to [link / reference]. Figure 3 This refers to the image containing the person to be cloned. For example, when it is necessary to clone a character in a movie or television show, a high-resolution image of the character to be cloned can be obtained from the film or television footage.
[0028] S12, Adjust the image.
[0029] Specifically, the brightness, contrast, and sharpness of the image are adjusted to improve image quality. During operation, the brightness value is increased or decreased according to the overall brightness of the image to make the image brighter or softer; the contrast is increased or decreased to make the bright and dark parts of the image more distinct, improving the image's sense of depth; and the edges and details of the image are enhanced to make the image clearer.
[0030] S13, Remove interference.
[0031] Specifically, the goal is to remove interfering factors from an image and maintain its clarity. In this embodiment, the interfering factors include noise and speckles in the image. During operation, filters or denoising algorithms are used to detect and remove noise from the image; speckles in the image are identified and processed.
[0032] S14, Obtain the portrait.
[0033] Specifically, delete all images except the person to be cloned (including background and passersby) to obtain the person to be cloned. During the process, use the brush tool or the automatic removal function to paint over or select and delete the background, passersby, etc., that need to be removed, leaving only the person to be cloned. Please refer to [link to documentation]. Figure 4 In order to Figure 3 The resulting portrait after processing.
[0034] S2. Identify age and gender.
[0035] The acquired portrait is used as a reference portrait to identify the age and gender of the reference portrait. Specifically, a recognition model for age and gender identification is established based on a convolutional neural network; facial images of people of different ages and genders are collected as training data; the recognition model is trained based on the training data; and the trained recognition model is used to identify the age and gender of the reference portrait.
[0036] S3. Obtain the adjustment ratio table.
[0037] Specifically, based on pre-configured adjustment ratio tables for different age groups, the age of the reference portrait is mapped to the corresponding adjustment ratio table. Please refer to [link / reference]. Figure 5 The configuration of the adjustment ratio table for different age groups includes the following sub-steps: S31. Collect portraits and group them.
[0038] Specifically, a large number of portraits of people of different ages are collected and grouped according to different age groups, including infancy, childhood, adolescence, youth, middle age, and old age. In this embodiment, 0-4 years old are divided into the infancy group, 5-11 years old into the childhood group, 12-18 years old into the adolescence group, 19-35 years old into the youth group, 36-60 years old into the middle age group, and 60 years and above into the old age group.
[0039] S32. Extract facial features and body shape features.
[0040] Specifically, facial and body features are extracted from the portraits of each group. In this embodiment, the facial features include the aspect ratio, saturation, whiteness, darkness, and roughness of the face, and the body features include height and weight.
[0041] S33. Generate the adjustment ratio table corresponding to the current group.
[0042] Specifically, the facial and body features of the current age group are used as baseline parameters, while the facial and body features of the other age groups are used as parameters to be adjusted, resulting in an adjustment ratio table for the current group. Please refer to [link / reference]. Figure 6 Step S33 includes the following sub-steps: S331, Set the reference value.
[0043] Specifically, the facial and body shape parameters of the current age group are used as baseline parameters, and the proportions of these baseline parameters are set as baseline values for subsequent calculations. In this embodiment, the proportions of all baseline parameters for the current group are set to 1. For example, if the current group is the preschool group, then the proportions of each parameter in the preschool group's facial features (face aspect ratio, saturation, whiteness, darkness, and roughness) and body shape features (height and weight) are all set to 1.
[0044] S332. Calculate the adjustment ratio.
[0045] Specifically, facial and body features of the remaining age groups are used as parameters to be adjusted, and the ratio of the parameter to be adjusted relative to the baseline parameter is calculated. For example, if the facial and body features of the preschool group are used as the baseline parameter, the whiteness of the preschool group can be set to 1. To obtain the adjustment ratio corresponding to the whiteness of the children's group, the average actual whiteness 'a' of the preschool group is calculated, and then the average actual whiteness 'b' of the children's group is calculated. Dividing 'b' by 'a' gives the adjustment ratio corresponding to the whiteness of the children's group when the whiteness of the preschool group is used as the baseline.
[0046] S333, Table Construction.
[0047] Specifically, the adjustment ratios of all calculated parameters to be adjusted are integrated into a table to form the adjustment ratio table corresponding to the current group. This table will clearly show the adjustment ratios of facial and body features for different age groups relative to the current group. The table below shows the adjustment ratio table for the youth group:
[0048] Table 1 In the table above, facial and body features of young people are used as baseline parameters, with each baseline parameter's proportion set to 1. This yields the adjustment proportions for the other five age groups relative to the facial and body features of young people. Similarly, adjustment proportion tables for the remaining five age groups are created. Each adjustment proportion table uses the facial and body features of the corresponding age group as baseline parameters to generate the adjustment proportions for the facial and body features of the other five age groups.
[0049] S4. Generate a clone portrait.
[0050] Specifically, based on the desired age of the clone, the corresponding adjustment ratio table, and gender, the reference portrait is adjusted to obtain the final clone portrait. Please refer to [link / reference]. Figure 7 Step S4 includes the following sub-steps: S41, Facial modeling and body modeling.
[0051] Based on the corresponding adjustment ratio table, the reference portrait is adjusted to complete facial and body modeling, resulting in a face model and a body model. Specifically, the age of the clone portrait to be generated is set according to the actual situation; the proportions of each parameter in the facial and body features corresponding to the age group of the clone portrait to be generated are looked up in the corresponding adjustment ratio table; the facial features of the reference portrait are adjusted according to the proportions of each parameter in the facial features to obtain the face model; the body features of the reference portrait are adjusted according to the proportions of each parameter in the body features to obtain the body model. For example, when the age of the reference portrait is young, the adjustment ratio table for young people is obtained through mapping. If an older clone portrait of the reference portrait is to be generated, the adjustment ratios of each parameter in the facial and body features of the older person are looked up in the adjustment ratio table, and the facial and body features of the reference portrait are adjusted accordingly to obtain the face model and the body model.
[0052] S42, Match Image.
[0053] Specifically, based on the facial model, body model, and the gender of the reference portrait, matching images are obtained, and a preliminary character image is generated using stitching technology. Image matching allows for the generation of appropriate clothing, hairstyles, and poses, making the image more realistic and natural. Depending on the specific application scenario, different adjustments need to be made to the image. For example, when creating a portrait of a film or television character, appropriate clothing and hairstyles need to be selected based on the character's role and historical context.
[0054] S43. Perform face swapping.
[0055] Specifically, the facial model is fused to the initially generated character image to complete the face-swapping operation, resulting in the final cloned human image. Please refer to [link / reference]. Figure 8 , in order to Figure 4 Using a human portrait as a reference portrait, images of a teenager and an elderly person are generated. In this embodiment, the clone portrait can be generated at a selected location, and the clone portrait and the reference portrait are formed in the same image, which makes it easier to compare the portraits.
[0056] Please see Figure 9 This is a structural block diagram of one embodiment of the image-based portrait doppelganger device of the present invention. The image-based portrait doppelganger device of this embodiment is used to implement the image-based portrait doppelganger method described in the above embodiment. Specifically, the image-based portrait doppelganger device of this embodiment includes an acquisition module 100, a recognition module 200, a table selection module 300, and an adjustment module 400. Wherein: The acquisition module 100 is used to acquire human images in an image.
[0057] The recognition module 200 is used to use the portrait acquired by the acquisition module 100 as a reference portrait and to identify the age and gender of the reference portrait.
[0058] The table selection module 300 is used to map the age of the reference portrait to the corresponding adjustment ratio table based on a pre-configured adjustment ratio table for different age groups. In this embodiment, all ages are divided into six age groups: infancy, childhood, adolescence, youth, middle age, and old age. Specifically, 0-4 years old is infancy, 5-11 years old is childhood, 12-18 years old is adolescence, 19-35 years old is youth, 36-60 years old is middle age, and 60 years and above is old age. Correspondingly, six adjustment ratio tables are configured.
[0059] The adjustment module 400 is used to adjust the reference portrait based on the set age of the clone portrait to be generated, the corresponding adjustment ratio table, and the gender, so as to obtain the final clone portrait.
[0060] When the image-based character cloning method is applied in the film and television industry, it can create clones of film and television characters. In this embodiment, the specific method for creating a clone of a film and television character is as follows: A high-definition image of the character to be cloned is obtained from film and television materials; a clone image corresponding to the age specified in the script is generated; the clone image is obtained using the image-based character cloning method; the clone image is motion-matched based on the action trajectory and speed in the film and television scene, and its lighting is adjusted according to the lighting effects in the scene; appropriate clothing and hairstyle are selected based on the character setting and historical background in the script, and the clone image is then integrated with the film and television scene.
[0061] This invention, through a pre-configured adjustment ratio table, can quickly and accurately obtain the adjustment ratio for a reference portrait, resulting in the desired clone portrait, thus greatly improving the efficiency of portrait synthesis. Simultaneously, based on fine-grained adjustments to facial and body features, the synthesized portrait has higher precision and more closely resembles the appearance of a real person. This invention not only focuses on changes in facial features but also fully considers adjustments to body shape, hairstyle, and posture, making the synthesized portrait more natural and realistic in its overall appearance, effectively avoiding the unnatural results caused by traditional techniques that only focus on facial features. In the film and television industry, this invention can improve the production quality and audience experience of film and television works by generating realistic character clones, while reducing the workload of makeup artists and improving the efficiency of film and television production.
[0062] The above description merely illustrates preferred embodiments of the present invention and is quite specific and detailed; however, it should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of this invention should be determined by the appended claims.
Claims
1. A method for creating a human image clone, characterized in that, Includes the following steps: Extract the image of the person to be cloned from the image; The acquired image of the person to be cloned is used as a reference image, and the age and gender of the reference image are identified. Based on a pre-configured adjustment ratio table for different age groups, the age of the reference portrait is mapped to the corresponding adjustment ratio table; Based on the set requirements, the age of the clone portrait, the corresponding adjustment ratio table, and the gender are used to adjust the reference portrait to obtain the final clone portrait.
2. The method for creating a human image clone in an image as described in claim 1, characterized in that, The step of adjusting the reference portrait based on the age, corresponding adjustment ratio table, and gender of the clone portrait to obtain the final clone portrait includes the following sub-steps: The reference portrait is adjusted based on the corresponding adjustment ratio table to complete the facial modeling and body modeling, resulting in a facial model and a human body model. Based on the face model, body model, and the gender of the reference portrait, a matching image is obtained, and a person image is generated using stitching technology; The face model is fused onto the character image to perform a face swap, resulting in the final clone portrait.
3. The method for creating a human image clone in an image as described in claim 1, characterized in that, The step of acquiring the image of the person to be cloned from the image includes the following sub-steps: Obtain an image containing the image of the person to be cloned; The brightness, contrast, and sharpness of the image are adjusted to improve image quality; Remove interfering factors from an image to maintain image clarity; the interfering factors include noise and speckles in the image. Delete the image other than the image of the person to be cloned, and obtain the image of the person to be cloned.
4. The method for creating a human image clone in an image as described in claim 1, characterized in that, In the step of using the acquired image of the person to be cloned as a reference image and identifying the age and gender of the reference image, the age and gender of the reference image are identified through the following sub-steps: A recognition model for identifying age and gender was established based on a convolutional neural network. Collect facial images of people of different ages and genders as training data; The recognition model is trained based on the training data; The trained recognition model is used to identify the age and gender of a reference portrait.
5. The method for creating a human image clone in an image as described in claim 2, characterized in that, The method for configuring the adjustment ratio table for different age groups includes the following sub-steps: Collect portraits of people of different ages and group them according to different age groups, including toddlers, children, teenagers, young adults, middle-aged people, and the elderly; Extract facial and body features of the portraits in each group. The facial features include the aspect ratio, saturation, whiteness, darkness, and roughness of the face. The body features include height and weight. Using the facial and body features of the current age group as baseline parameters, and the facial and body features of the other age groups as parameters to be adjusted, an adjustment ratio table corresponding to the current group is obtained.
6. The method for creating a human image clone in an image as described in claim 5, characterized in that, The step of using the facial and body features of the current age group as baseline parameters and the facial and body features of the other age groups as parameters to be adjusted to obtain the adjustment ratio table corresponding to the current group includes the following sub-steps: The parameters of facial and body features of the current age group are used as the baseline parameters, and the proportion of the baseline parameters is set as the baseline value. The facial and body features of the remaining age groups were used as parameters to be adjusted, and the ratio of the parameters to be adjusted to the baseline parameters was calculated. By integrating the proportions of each parameter, we obtain the adjustment ratio table corresponding to the current group.
7. The method for creating a human image clone in an image as described in claim 6, characterized in that, The step of adjusting the reference portrait based on the corresponding adjustment ratio table to complete facial and body modeling and obtain the facial and body models includes the following sub-steps: Set the age of the clone avatar to be generated according to the actual situation; In the corresponding adjustment ratio table, look up the ratio of each parameter in the facial features and body features corresponding to the age group of the clone portrait to be generated; The facial features of the reference portrait are adjusted according to the proportions of each parameter in the facial features to obtain a face model. The body features of the reference portrait are adjusted according to the proportions of each parameter in the body features to obtain a human body model.
8. A device for creating a human image clone, characterized in that, include: The acquisition module is used to acquire the image of the person to be cloned from the image; The recognition module is used to use the acquired image of the person to be cloned as a reference image and to identify the age and gender of the reference image; The table selection module is used to map the age of the reference portrait to the corresponding adjustment ratio table based on a pre-configured adjustment ratio table for different age groups. The adjustment module is used to adjust the reference portrait based on the set age of the clone portrait to be generated, the corresponding adjustment ratio table, and the gender, so as to obtain the final clone portrait.
9. A method for creating clones of film and television characters, characterized in that, Includes the following steps: High-definition images of the character to be cloned are obtained from film and television materials. A clone image corresponding to the required age of the clone image is generated according to the script. The clone image is obtained using the image clone method as described in any one of claims 1 to 7. Based on the action trajectory and speed in the film and television scene, the clone image is matched with motion and the lighting and shadow of the clone image are adjusted according to the lighting and shadow effects in the scene. Based on the character settings and historical background in the script, appropriate costumes and hairstyles were selected, and the clone image was integrated with the film and television scene.