CN114419202A - Virtual image generation method and system - Google Patents

Virtual image generation method and system Download PDF

Info

Publication number
CN114419202A
CN114419202A CN202210066981.4A CN202210066981A CN114419202A CN 114419202 A CN114419202 A CN 114419202A CN 202210066981 A CN202210066981 A CN 202210066981A CN 114419202 A CN114419202 A CN 114419202A
Authority
CN
China
Prior art keywords
head
determining
attributes
target
facial feature
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
CN202210066981.4A
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.)
Shanghai Hode Information Technology Co Ltd
Original Assignee
Shanghai Hode Information Technology 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 Shanghai Hode Information Technology Co Ltd filed Critical Shanghai Hode Information Technology Co Ltd
Priority to CN202210066981.4A priority Critical patent/CN114419202A/en
Publication of CN114419202A publication Critical patent/CN114419202A/en
Priority to PCT/CN2022/143805 priority patent/WO2023138345A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application provides a virtual image generation method, which comprises the following steps: determining a reference image, the reference image including a reference object; determining a head region of the reference object, the head region comprising a plurality of head components; determining classification attributes of the respective head components; determining a plurality of head keypoints for the head region; determining a plurality of facial feature attributes of the reference object according to the plurality of head key points; and generating a target avatar according to the plurality of facial feature attributes and the classification attributes of the head components. The embodiment of the application provides an avatar generation system, a computer device and a computer readable storage medium. The virtual image generated by the technical scheme provided by the embodiment of the application is highly matched with each characteristic of the real appearance of the user, and the effect is good.

Description

Virtual image generation method and system
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method, a system, computer equipment and a computer readable storage medium for generating an avatar.
Background
With the development of computer technology, services such as video playing have become the next popular network service. In order to further improve the interest of video playing and take into account the two contradictory requirements of content producers for expressing and protecting themselves, the video platform provides an avatar which can rapidly generate the personality avatar and be integrated into content creation. Taking live broadcasting as an example, the anchor can configure a similar avatar for itself instead of the real one.
Currently, if a user wants to generate an editable avatar, the matching degree of the results generated by the existing technology and the features of the user's real appearance is poor, resulting in poor effect.
Disclosure of Invention
An object of the embodiments of the present application is to provide an avatar generation method, system, computer device and computer-readable storage medium, which are used to solve the above-mentioned problems.
An aspect of an embodiment of the present application provides an avatar generation method, including:
determining a reference image, the reference image including a reference object;
determining a head region of the reference object, the head region comprising a plurality of head components;
determining classification attributes of the respective head components;
determining a plurality of head keypoints for the head region;
determining a plurality of facial feature attributes of the reference object according to the plurality of head key points; and
and generating a target virtual image according to the plurality of facial feature attributes and the classification attributes of the head parts.
Optionally, the determining, according to the plurality of head key points, a plurality of facial feature attributes of the reference object includes:
projecting the plurality of head key points onto a preset face shape, wherein the preset face shape is a front face shape with a preset shape; and
and determining the plurality of facial feature attributes according to the position of each head key point on the preset face.
Optionally, the plurality of facial feature attributes comprises a size feature;
the determining the plurality of facial feature attributes according to the position of each head key point on the preset face shape comprises:
determining the distance between at least part of head key points according to the positions of the head key points on the preset face; and
determining a size characteristic of one or more head components based on a distance between the at least head keypoints.
Optionally, the plurality of facial feature attributes comprises an orientation feature;
the determining the plurality of facial feature attributes according to the position of each head key point on the preset face shape comprises:
determining the slope of a connecting line among at least part of head key points according to the positions of the head key points on the preset face; and
determining an orientation characteristic of one or more headpieces based on a slope of a line between the at least some headpieces.
Optionally, the classification attribute comprises a color class;
the determining classification attributes of the respective head parts comprises:
segmenting the head region to obtain the respective head components;
determining the main color of each head part according to a preset rule; and
and determining the color category of each head part according to the main color of each head part and a preset color classification rule.
Optionally, the generating a target avatar according to the plurality of facial feature attributes and the classification attributes of the respective headpieces comprises:
determining material elements of each head part according to the plurality of facial feature attributes and the classification attribute of each head part; and
and synthesizing the material elements of each head part to obtain the head of the target virtual image.
Optionally, the determining material elements of the respective head parts according to the plurality of facial feature attributes and the classification attributes of the respective head parts includes:
determining a target head part, the target head part being any one of the plurality of head parts;
determining a plurality of target attributes of the target head component; wherein the plurality of target attributes comprises: the classification attributes and corresponding facial feature attributes of the target head part, wherein each target attribute corresponds to a weight;
acquiring a first target material element with the plurality of target attributes from a preset material library;
and under the condition that the first target material element does not exist in the preset material library, acquiring a second target material element which is most matched with the target head part from the preset material library according to the weight of each target attribute.
Optionally, the reference object further comprises a body region; the method further comprises the following steps:
segmenting the body area to obtain a plurality of body parts, including individual garments, shoes;
determining classification attributes of the individual body parts;
determining the attribution of each garment according to the position of each head region, each garment and each shoe in the reference image;
and generating the body of the target virtual image according to the classification attribute of each body part and the attribution of each garment.
In one aspect of an embodiment of the present application, a further avatar generation system includes:
a first determining module for determining a reference image, the reference image comprising a reference object;
a second determination module to determine a head region of the reference object, the head region comprising a plurality of head components;
a third determination module for determining classification attributes of the respective head components;
a fourth determining module for determining a plurality of head keypoints for the head region;
a fifth determining module, configured to determine a plurality of facial feature attributes of the reference object according to the plurality of head keypoints; and
and the generating module is used for generating a target virtual image according to the plurality of facial feature attributes and the classification attributes of the head parts.
An aspect of the embodiments of the present application further provides a computer device, which includes a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor is configured to implement the steps of the avatar generation method as described above when executing the computer program.
An aspect of the embodiments of the present application further provides a computer-readable storage medium, in which a computer program is stored, the computer program being executable by at least one processor, so that the at least one processor, when executing the computer program, implements the steps of the avatar generation method as described above.
The avatar generation method, system, device and computer readable storage medium provided by the embodiments of the present application can generate a target avatar having the same or highly similar attributes to the above attributes after obtaining a plurality of facial feature attributes and classification attributes of each head part, that is, the generated avatar is highly matched with each attribute (feature) of the user's real appearance, and the effect is good.
Drawings
Fig. 1 schematically shows an application environment diagram of an avatar generation method according to an embodiment of the present application;
fig. 2 schematically shows a flowchart of an avatar generation method according to a first embodiment of the present application;
fig. 3 schematically shows a flow chart of sub-steps of step S204 in fig. 2;
FIG. 4 schematically illustrates a flow chart of sub-steps of step S208 of FIG. 2;
FIG. 5 schematically illustrates a flow chart of sub-steps of step S402 in FIG. 4;
FIG. 6 schematically illustrates another sub-step flow diagram of step S402 in FIG. 4;
FIG. 7 schematically illustrates a plurality of head keypoints for a head region of a reference object;
fig. 8 schematically shows a flow chart of sub-steps of step S210 in fig. 2;
fig. 9 schematically shows a flow chart of sub-steps of step S800 in fig. 8;
fig. 10 is a flow chart schematically illustrating the adding steps of the avatar generation method according to an embodiment of the present application;
FIG. 11 is a flow chart of an example application;
FIG. 12 schematically illustrates a plurality of components of a reference image in their properties;
fig. 13 schematically shows a block diagram of an avatar generation system according to an embodiment two of the present application; and
fig. 14 schematically shows a hardware architecture diagram of a computer device suitable for implementing the avatar generation method according to the third embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the descriptions relating to "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
The inventor finds that: with the development of video editing and live broadcasting applications, people no longer satisfy the requirement of presenting their own real images in the network world, and more people hope to have a virtual character or image to replace themselves. How to create an image for the user that is similar to or has the same characteristics as the user is then a new topic. Individual 3D applications and games have made use of generative image algorithms to generate avatars that are more similar to the user, but the resulting effect is not controllable and the user's acceptance of such avatars is not high.
In addition, the image close to the real appearance of the user is generated through the algorithm, the reconstruction is only carried out on the face of the user, the whole facial features of the user are emphasized, the generated result is difficult to achieve high controllability, the advantages of the appearance of the user are possibly shown, and meanwhile, the defects are enlarged, for example, a large mole is formed on the face of the user, and if the large mole is also placed into the virtual image, the acceptance is not high. In addition, such methods lack extensibility, such as requiring a large amount of data to be re-collected and the model to be retrained if the style of the avatar is to be changed, resulting in significant cost loss.
In view of this, the present application aims to provide a new virtual image generation scheme, which performs a material matching and integrating manner on user image features, can greatly improve the beautification degree of the generated image, and has high expandability.
An exemplary application environment for embodiments of the present application is provided below.
Fig. 1 schematically shows an environment application diagram of an avatar-based video editing method according to an embodiment of the present application. In an exemplary embodiment, the electronic device 2 may be connected to the server 4 via one or more networks.
The electronic device 2 may be a device such as a smartphone, a tablet device, a PC (personal computer), or the like. The electronic device 2 may be equipped with an avatar editor for providing an avatar editing service. The avatar editor may provide a graphical user interface for avatar editing. The video editor may be a client, a browser, etc.
The server 4 may provide the electronic device 2 with materials for avatar editing, such as resource files, configurations, etc. for configuring the avatar. Wherein the server 4 may provide services over one or more networks. The network may include various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. The network may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. The network may include wireless links, such as cellular links, satellite links, Wi-Fi links, and/or the like.
The following describes an avatar generation scheme through a plurality of embodiments, taking the electronic device 2 as an execution subject. It should be noted that the solution may also be implemented by the server 4, and the server 4 generates the avatar and returns it to the electronic device 2.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but merely serve to facilitate the description of the present application and to distinguish each step, and therefore should not be construed as limiting the present application.
Example one
Fig. 2 schematically shows a flowchart of an avatar generation method according to a first embodiment of the present application.
As shown in fig. 2, the avatar generation method may include steps S200 to S210, in which:
step S200, a reference image is determined, the reference image including a reference object.
The reference image can be a local picture or a picture acquired in real time by an image acquisition device (camera).
The reference object may be a single human head, half body, whole body, or the like, or may be a plurality of human heads, half bodies, whole bodies, or the like. In the case of a plurality of characters, a plurality of avatars are generated correspondingly.
In an exemplary application, a client carrying an avatar function is installed on the electronic device 2. The client is provided with a graphical user interface, and a plurality of controls, such as manual controls and automatic controls, are displayed on the graphical user interface.
And if the manual control is detected to be triggered, popping up a material interface for a user to select materials from the material interface for splicing.
And if the automatic control is detected to be triggered, popping up an import control. And accessing a local picture library or starting an image acquisition device based on the import control to acquire a reference image. Automatic generation of a subsequent avatar is performed based on the reference image.
Step S202, determining a head region of the reference object, wherein the head region comprises a plurality of head parts.
In an exemplary application, a head region (face position) in the reference image may be acquired according to a face detection method. The face detection method may be a geometric feature-based method, a template-based method (e.g., a correlation matching method, a feature face method, a linear discriminant analysis method, a singular value decomposition method, a neural network method, a dynamic connection matching method), or a model-based method (e.g., a hidden markov model).
The plurality of head parts may include: hair, face, eyes, eyebrows, mouth, ears, chin, fittings (glasses, hat), etc.
In step S204, the classification attribute of each head part is determined.
The various differences in the shape, size and structure of these head components make each face in the world very different, constituting an important feature of the head region. These important features can be used to generate an avatar that matches various attributes (features) of the user's true appearance.
The classification attributes of the respective components may include shape type, color class, and the like.
Regarding the shape type:
in an exemplary application, the shape types of the individual head components may be classified using an image classification method (e.g., a convolutional neural network-based classification algorithm), such as: face shape (square face, round face, sharp face, etc.), eyebrow shape, ear type, hair length, hair style, bang type, bang length, glasses type, cap type, etc.
For example, the eye types may include the following shape types: apricot eye, danfeng eye, dangshen eye, slender eye, squinted eye, round eye, etc. The shape type of each eye of the reference object, such as the Daniella eye, is determined by an image classification method.
As another example, the eyebrow types can include the following shape types: a straight eyebrow, a high brow, a willow leaf eyebrow, an upper brow, an arch eyebrow, etc. And determining the shape type of each eyebrow of the reference object by an image classification method, such as high eyebrow picking.
Regarding the color type:
in an alternative embodiment, the classification attribute comprises a color class. As shown in fig. 3, step S204 may determine the dominant color of each head piece: step S300, dividing the head area to obtain each head part; step S302, determining the main color of each head part according to a preset rule; and step S304, determining the color category of each head part according to the main color of each head part and a preset color classification rule.
In an exemplary application, the head region is segmented by a five-sense organ segmentation algorithm (such as a recognition algorithm based on a convolutional neural network), that is, a region of the skin, the pupil, the lip, the eyebrow, the hair and the like of the face of the human face is accurately segmented. Then, the dominant color of each component region is found using a clustering algorithm or other color statistics, while the component dominant colors are mapped into specific color categories using color mapping or classification. By obtaining the dominant color of each headpiece, the real face details of the reference object can be further obtained. In this embodiment, the segmentation in this step is only used for the analysis of the color attributes.
In step S206, a plurality of head key points of the head region are determined.
Head keypoints (also called face keypoints) include keypoints of a face, including points of eyebrows, eyes, nose, mouth, and facial contour regions. The key points of the face are important feature points of each part of the face, and are usually contour points and corner points. In an exemplary application, a plurality of key points (e.g., 68 points, 106 points, or 240 points) of the face contour may be obtained by a face key point detection algorithm (e.g., a deep learning based detection algorithm).
Step S208, determining a plurality of facial feature attributes of the reference object according to the plurality of head key points.
The inventor finds that the real human face cannot be effectively approached only by the classification attribute (such as shape type) of each head part due to the facial difference of different people. For example, although it is known that the type of eyebrow is high, it is still unknown the degree attribute of the eyebrow, such as large, medium, small, or upward, medium, or downward.
Therefore, facial feature attributes (degree attributes) of at least part of the headpiece are analyzed by the head key points. It should be noted that, unlike the method only used for rectifying the human face, in the present embodiment, the head key point is used for acquiring the facial feature attribute. The real face details can be further obtained through the facial feature attributes analyzed by the head key points.
The reference object in the reference image is not necessarily a front face, and thus extraction of facial feature attributes may be hindered.
As an alternative embodiment, as shown in fig. 4, step S208 may include: step S400, projecting the plurality of head key points to a preset face shape, wherein the preset face shape is a normal face shape with a preset shape; and step S402, determining the facial feature attributes according to the positions of the head key points on the preset face. The obtained head key points are projected on a standard preset face shape through affine transformation (rotation, translation and scaling). Based on the positions of all the head key points of the preset face, the attributes of partial facial features can be accurately analyzed.
The plurality of facial feature attributes may include a degree attribute such as a size of the component itself, an orientation size of the component, and the like. For ease of understanding, several alternative embodiments are provided below describing the process of obtaining partial facial feature attributes.
As an alternative embodiment, the plurality of facial feature attributes includes a size feature. As shown in fig. 5, the step S402 may include: step S500, determining the distance between at least part of head key points according to the positions of the head key points on the preset face; and step S502, determining the size characteristics of one or more head parts according to the distance between the key points of at least the head. In this alternative embodiment, the size, thickness, etc. of the eyebrow, eye, mouth, etc. of the reference object can be further accurately analyzed.
As an alternative embodiment, the plurality of facial feature attributes includes an orientation feature. As shown in fig. 6, the step S402 may include: step S600, determining the slope of the connecting lines among at least part of the head key points according to the positions of the head key points on the preset face; and step S602, determining orientation characteristics of one or more head parts according to the slope of the connecting line between the key points of at least part of the head. In this alternative embodiment, the orientation degree of the eyebrow, the tail, the corner of the mouth, etc. of the reference object can be further accurately analyzed.
In an exemplary application, as shown in FIG. 7, 106 head keypoints for a head region of a reference object are shown.
(1) Eye size: by calculating the distance between the head key points 75 and 76 or 72 and 73, the size of the eyes of the person appearing in the image can be obtained. Since the head key points are mapped to the standard-size face (preset face), the head key point distances can directly represent the size characteristics of each part of the face, such as the size of the mouth and the thickness of eyebrows. Alternatively, the distance of the head keypoints (75 and 76 or 72 and 73) in the actual face image screenshot is calculated and divided by the face width plus the sum of the vertical height from the midpoint of the lips to the eyebrows, which is taken as the eye size value.
(2) Face width: the maximum distance between the corresponding head key points on the two sides of the face can be taken, such as the head key points 0 and 32, 1 and 31, and the like.
(3) Vertical height from the midpoint of the lips to the eyebrows: midpoint-to-distance may be taken from the midpoint of head keypoints 84 and 90 to head keypoints 33 and 42. The numerical value of the two distance sums fluctuates minimally with variations in different faces.
(4) The components are oriented: and judging orientation characteristics of the part, such as eyebrow orientation, tail orientation, mouth corner orientation and the like, by using the slope of the head key point connecting line.
It should be noted that, the above only lists the acquisition of partial facial feature attributes. In addition, the size degree and the orientation degree can be divided into a plurality of grades, and a plurality of specific thresholds can be formulated for classification according to the actual requirement definition of the product.
Step S210, generating a target virtual image according to the plurality of facial feature attributes and the classification attributes of the head parts.
After obtaining the plurality of facial feature attributes and the classification attributes of the respective head parts, an avatar highly matching with respective attributes (features) of the user's real appearance may be generated, that is, an avatar having the same attributes as the reference object (user's real image) is obtained. Moreover, the system can be modified and expanded efficiently by adjusting part of attributes, and has high controllability.
As an alternative embodiment, as shown in fig. 8, the step S210 may include: step S800, determining material elements of each head part according to the plurality of facial feature attributes and the classification attribute of each head part; and step S802, synthesizing the material elements of each head part to obtain the head of the target virtual image. In this optional embodiment, material elements that meet the attributes of the respective head components are found, and the found material elements are spliced to obtain the head of the target avatar. The target avatar corresponds to the reference object height with the same or highly similar attributes (features) of each head part as the reference object. In addition, when the style of the virtual image is required to be changed, the attributes of a certain head part/parts can be adjusted, so that new material elements are matched, and the new virtual image is spliced. In other embodiments, a material element may be directly selected from the material library, and the selected material element is substituted for a material element in the avatar or added to the avatar, so as to update the avatar.
It can be seen that the optional embodiment can greatly improve the beautification degree of the generated image, so that the virtual image has high controllability, high expansibility and low calculation consumption, and the following problems are avoided: in the prior art, if the style of the virtual image is required to be changed, a large amount of data needs to be collected again and the model needs to be trained again, so that great cost loss is caused.
In step S800, material elements of the respective head parts are to be determined. However, these head components vary greatly in shape, size, and structure. Therefore, it is difficult to find material elements that completely match all the attributes of the respective header parts. For example, the plurality of attributes (classification attribute + facial feature attribute) of the eyebrows include the eyebrow shape, the eyebrow orientation, the eyebrow thickness, and the eyebrow color, and it is difficult to match material elements that each attribute matches.
In view of this, as shown in fig. 9, the step S800 may be implemented by: step S900 of determining a target head part, which is any one of the plurality of head parts; step S902, determining a plurality of target attributes of the target head component; wherein the plurality of target attributes comprises: the classification attributes and corresponding facial feature attributes of the target head part, wherein each target attribute corresponds to a weight; step S904, acquiring a first target material element with the plurality of target attributes from a preset material library; step S906, in a case that the preset material library does not have the first target material element, acquiring, according to the weight of each target attribute, a second target material element that is most matched with the target head component from the preset material library. Through the process, the optimal material elements can be efficiently matched.
The weight of each target attribute may be the same or different weights may be assigned according to the importance of the attributes.
Taking the eyebrow example, if the eyebrow 4 attributes determine that the image influence degrees on the user are different in the statistics of the actual effect, for example, the shape of the eyebrow is larger than the thickness of the eyebrow and the orientation of the eyebrow is larger than the color of the eyebrow, the weight is as follows: eyebrow shape 0.4, eyebrow thickness 0.3, eyebrow orientation 0.2, eyebrow color 0.1. For example, in the preset material library, the eyebrows have an eyebrow material element a and an eyebrow material element B, the eyebrow material element a and the eyebrows of the reference object are matched by the eyebrow shape, the eyebrow thickness and the eyebrow orientation, and the eyebrow material element B and the eyebrows of the reference object are matched by the eyebrow thickness, the eyebrow orientation and the eyebrow color. Although the matching of the two eyebrow material elements has 3 attributes, the total score obtained by the eyebrow material element A is 0.9, and the total score obtained by the eyebrow material element B is only 0.6, so that the material eyebrow element A is selected as a more appropriate material element. In addition, the degree category and other similar categories are also present in different categories of the same attribute. For example, the orientation classification can be divided into upper, middle and lower 3 classes, and the color classification can be divided into black, brown, blue, green, pink, red, purple, orange, gray and white. In this case, if there are no material elements in the preset material library that are identical to the specific character characteristics, the analysis can be integrated with similar material elements in combination with other attribute characteristics. For example, the red color can be replaced by pink color or orange color, and cannot be replaced by black color.
The preset material library comprises material elements of various parts in the head and the body. It should be noted that the material attribute label classification of each material element is determined based on a predetermined real person attribute classification. In the preset material library, the material elements with the highest matching degree can be found out by matching the attributes of all parts of the reference object with the material attribute labels of all the material elements so as to synthesize the virtual image.
And classifying and labeling each material accessory according to the category of the character characteristics. The specific categories correspond to the features in the feature extraction module one to one.
The above mainly describes the generation of the head of the target avatar.
In some embodiments, after generating the head of the target avatar, body apparel and the like may be automatically matched according to the user gender.
In some embodiments, after generating the head of the target avatar, the user may be presented with a choice of body props for stitching.
Of course, when the reference object includes a half body or a whole body, the body of the target avatar may be generated from the body of the reference object.
As an alternative embodiment, as shown in fig. 10, the method may further include: step S1000, segmenting the body area to obtain a plurality of body parts, wherein the body parts comprise various clothes and shoes; step S1002, determining classification attributes of each body part; step S1004, determining the attribution of each garment according to the positions of the head region, each garment and each shoe in the reference image; step S1006, generating the body of the target avatar according to the classification attribute of each body component and the attribution of each garment. In this alternative embodiment, the fit between the avatar and the real person may be further increased.
In an exemplary application, the exact area of each garment, shoe, etc. in the reference image is segmented by a garment segmentation algorithm, as well as the classification attributes (garment: short sleeved blouse, long sleeved coat, dress, skirt, pants, etc., shoe: sneaker, leather shoe, boot, etc.). Then, the position of the head region and the positions of the clothes and shoes are used to estimate the attribution of the clothes. The face of the example is used as a target person, and the color of the corresponding coat, lower garment and shoe area is calculated. And finally, finding the same or similar material elements from a preset material library for splicing. In the present exemplary application, the material elements may also be matched using the main color, using the weight of each attribute, and the like.
For ease of understanding, an application example is provided below in conjunction with fig. 11 and 12:
in the present application example, an avatar whose attributes (features) match is generated based on a real character avatar (in a reference image). Extracting the characteristics of the face and the clothes of the person, automatically selecting proper material elements from the material library according to the attributes of all parts, and synthesizing a complete virtual image according to the selected material elements. The main flow modules are involved: (1) a feature extraction module; (2) a material marking module; (3) and a material matching module.
(1) A feature extraction module:
each attribute (feature) possessed by a person in the reference image is extracted. Here, the attributes include, but are not limited to, age, sex, face type, face skin color, eyebrow shape, eyebrow orientation, eyebrow thickness, eyebrow color, mouth size, mouth corner orientation, lip color, eye size, eye tail orientation, pupil color, ear type, hair length, hair style, bang type, bang length, glasses type, hat type, jacket color, jacket type, bottom dress color, shoe type, and the like. The virtual image can be split into: hair, face, eyes, eyebrows, mouth, ears, accessories (glasses, hats, etc.), upper garment, under garment, shoes, etc.
(2) Marking module for material:
and marking the material elements in the preset material library with the category labels of corresponding categories.
(3) The material matching module:
and matching according to the character attributes and the material labels, and finding out the material elements of each component with the highest matching degree.
And finally, splicing the found material elements of each part to obtain a virtual image which can have the same attribute (characteristic) as the real image of the user.
Example two
Fig. 13 schematically shows a block diagram of an avatar generation system according to a second embodiment of the present application, which may be partitioned into one or more program modules, stored in a storage medium, and executed by one or more processors to complete the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments of the present application.
As shown in fig. 13, the avatar generation system 1300 may include a first determination module 1310, a second determination module 1320, a third determination module 1330, a fourth determination module 1340, a fifth determination module 1350, and a generation module 1360, wherein:
a first determining module 1310 for determining a reference picture, the reference picture comprising a reference object;
a second determining module 1320 for determining a head region of the reference object, the head region comprising a plurality of head components;
a third determining module 1330 for determining classification attributes of the respective head parts;
a fourth determining module 1340 for determining a plurality of head keypoints for the head region;
a fifth determining module 1350, configured to determine a plurality of facial feature attributes of the reference object according to the plurality of head keypoints; and
a generating module 1360 configured to generate a target avatar according to the plurality of facial feature attributes and the classification attributes of the respective headpieces.
In an alternative embodiment, the fifth determining module 1350 is further configured to:
projecting the plurality of head key points onto a preset face shape, wherein the preset face shape is a front face shape with a preset shape; and
and determining the plurality of facial feature attributes according to the position of each head key point on the preset face.
In an alternative embodiment, the plurality of facial feature attributes includes a size feature;
the fifth determining module 1350, further configured to:
determining the distance between at least part of head key points according to the positions of the head key points on the preset face; and
determining a size characteristic of one or more head components based on a distance between the at least head keypoints.
In an alternative embodiment, the plurality of facial feature attributes includes an orientation feature;
the fifth determining module 1350, further configured to:
determining the slope of a connecting line among at least part of head key points according to the positions of the head key points on the preset face; and
determining an orientation characteristic of one or more headpieces based on a slope of a line between the at least some headpieces.
In an alternative embodiment, the classification attribute comprises a color class;
the third determining module 1330 is further configured to:
segmenting the head region to obtain the respective head components;
determining the main color of each head part according to a preset rule; and
and determining the color category of each head part according to the main color of each head part and a preset color classification rule.
In an alternative embodiment, the generating module 1360 is further configured to:
determining material elements of each head part according to the plurality of facial feature attributes and the classification attribute of each head part; and
and synthesizing the material elements of each head part to obtain the head of the target virtual image.
In an alternative embodiment, the generating module 1360 is further configured to:
determining a target head part, the target head part being any one of the plurality of head parts;
determining a plurality of target attributes of the target head component; wherein the plurality of target attributes comprises: the classification attributes and corresponding facial feature attributes of the target head part, wherein each target attribute corresponds to a weight;
acquiring a first target material element with the plurality of target attributes from a preset material library;
and under the condition that the first target material element does not exist in the preset material library, acquiring a second target material element which is most matched with the target head part from the preset material library according to the weight of each target attribute.
In an alternative embodiment, the reference object further comprises a body region; the system further comprises a body generation module (not identified) for:
segmenting the body area to obtain a plurality of body parts, including individual garments, shoes;
determining classification attributes of the individual body parts;
determining the attribution of each garment according to the position of each head region, each garment and each shoe in the reference image;
and generating the body of the target virtual image according to the classification attribute of each body part and the attribution of each garment.
EXAMPLE III
Fig. 14 schematically shows a hardware architecture diagram of a computer device 10000 suitable for implementing an avatar generation method according to a third embodiment of the present application. The computer device 10000 may be the electronic device 2 or a part thereof, or may be the server 4 or a part thereof. In this embodiment, the computer device 10000 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers). As shown in fig. 14, computer device 10000 includes at least, but is not limited to: the memory 10010, processor 10020, and network interface 10030 may be communicatively linked to each other via a system bus. Wherein:
the memory 10010 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 10010 may be an internal storage module of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 10000. Of course, the memory 10010 may also include both internal and external memory modules of the computer device 10000. In this embodiment, the memory 10010 is generally used for storing an operating system installed in the computer device 10000 and various application software, such as program codes of the avatar generation method. In addition, the memory 10010 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 10020, in some embodiments, can be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip. The processor 10020 is generally configured to control overall operations of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is configured to execute program codes stored in the memory 10010 or process data.
Network interface 10030 may comprise a wireless network interface or a wired network interface, and network interface 10030 is generally used to establish a communication link between computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, establish a data transmission channel and a communication link between the computer device 10000 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It should be noted that fig. 14 only illustrates a computer device having the components 10010 and 10030, but it is to be understood that not all illustrated components are required and that more or less components may be implemented instead.
In this embodiment, the avatar generation method stored in the memory 10010 can be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 10020) to complete the embodiment of the present application.
Example four
Embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the avatar generation method in the embodiments.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program code of the avatar generation method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present application described above may be implemented by a general purpose computer device, they may be centralized on a single computer device or distributed over a network of multiple computer devices, and alternatively, they may be implemented by program code executable by a computer device, such that they may be stored in a storage device and executed by a computer device, and in some cases, the steps shown or described may be executed out of order, or separately as individual integrated circuit modules, or multiple ones of them may be implemented as a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The above are only exemplary embodiments of the present application, and not intended to limit the scope of the claims of the present application, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and all such changes or substitutions are included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. An avatar generation method, the method comprising:
determining a reference image, the reference image including a reference object;
determining a head region of the reference object, the head region comprising a plurality of head components;
determining classification attributes of the respective head components;
determining a plurality of head keypoints for the head region;
determining a plurality of facial feature attributes of the reference object according to the plurality of head key points; and
and generating a target virtual image according to the plurality of facial feature attributes and the classification attributes of the head parts.
2. The avatar generation method of claim 1, wherein said determining a plurality of facial feature attributes of said reference object from said plurality of head keypoints comprises:
projecting the plurality of head key points onto a preset face shape, wherein the preset face shape is a front face shape with a preset shape; and
and determining the plurality of facial feature attributes according to the position of each head key point on the preset face.
3. The avatar generation method of claim 2, wherein said plurality of facial feature attributes includes a size feature;
the determining the plurality of facial feature attributes according to the position of each head key point on the preset face shape comprises:
determining the distance between at least part of head key points according to the positions of the head key points on the preset face; and
determining a size characteristic of one or more head components based on a distance between the at least head keypoints.
4. The avatar generation method of claim 2, wherein said plurality of facial feature attributes includes an orientation feature;
the determining the plurality of facial feature attributes according to the position of each head key point on the preset face shape comprises:
determining the slope of a connecting line among at least part of head key points according to the positions of the head key points on the preset face; and
determining an orientation characteristic of one or more headpieces based on a slope of a line between the at least some headpieces.
5. The avatar generation method of any one of claims 1 to 4, wherein the classification attributes include a color class;
the determining classification attributes of the respective head parts comprises:
segmenting the head region to obtain the respective head components;
determining the main color of each head part according to a preset rule; and
and determining the color category of each head part according to the main color of each head part and a preset color classification rule.
6. The avatar generation method of any of claims 1 to 4, wherein said generating a target avatar based on said plurality of facial feature attributes and classification attributes of said respective headpieces comprises:
determining material elements of each head part according to the plurality of facial feature attributes and the classification attribute of each head part; and
and synthesizing the material elements of each head part to obtain the head of the target virtual image.
7. The avatar generation method of claim 6, wherein said determining material elements of said respective head parts based on said plurality of facial feature attributes and classification attributes of said respective head parts comprises:
determining a target head part, the target head part being any one of the plurality of head parts;
determining a plurality of target attributes of the target head component; wherein the plurality of target attributes comprises: the classification attributes and corresponding facial feature attributes of the target head part, wherein each target attribute corresponds to a weight;
acquiring a first target material element with the plurality of target attributes from a preset material library;
and under the condition that the first target material element does not exist in the preset material library, acquiring a second target material element which is most matched with the target head part from the preset material library according to the weight of each target attribute.
8. The avatar generation method of any one of claims 1 to 4, wherein the reference object further includes a body region; the method further comprises the following steps:
segmenting the body area to obtain a plurality of body parts, including individual garments, shoes;
determining classification attributes of the individual body parts;
determining the attribution of each garment according to the position of each head region, each garment and each shoe in the reference image;
and generating the body of the target virtual image according to the classification attribute of each body part and the attribution of each garment.
9. An avatar generation system, comprising:
a first determining module for determining a reference image, the reference image comprising a reference object;
a second determination module to determine a head region of the reference object, the head region comprising a plurality of head components;
a third determination module for determining classification attributes of the respective head components;
a fourth determining module for determining a plurality of head keypoints for the head region;
a fifth determining module, configured to determine a plurality of facial feature attributes of the reference object according to the plurality of head keypoints; and
and the generating module is used for generating a target virtual image according to the plurality of facial feature attributes and the classification attributes of the head parts.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, is adapted to carry out the steps of the avatar generation method of any of claims 1-8.
11. A computer-readable storage medium, in which a computer program is stored, the computer program being executable by at least one processor, such that the at least one processor, when executing the computer program, performs the steps of the avatar generation method according to any of claims 1 to 8.
CN202210066981.4A 2022-01-20 2022-01-20 Virtual image generation method and system Pending CN114419202A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210066981.4A CN114419202A (en) 2022-01-20 2022-01-20 Virtual image generation method and system
PCT/CN2022/143805 WO2023138345A1 (en) 2022-01-20 2022-12-30 Virtual image generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210066981.4A CN114419202A (en) 2022-01-20 2022-01-20 Virtual image generation method and system

Publications (1)

Publication Number Publication Date
CN114419202A true CN114419202A (en) 2022-04-29

Family

ID=81275646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210066981.4A Pending CN114419202A (en) 2022-01-20 2022-01-20 Virtual image generation method and system

Country Status (2)

Country Link
CN (1) CN114419202A (en)
WO (1) WO2023138345A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114913058A (en) * 2022-05-27 2022-08-16 北京字跳网络技术有限公司 Display object determination method and device, electronic equipment and storage medium
WO2023138345A1 (en) * 2022-01-20 2023-07-27 上海幻电信息科技有限公司 Virtual image generation method and system
CN118001741A (en) * 2024-04-09 2024-05-10 湖南速子文化科技有限公司 Method, system, equipment and medium for displaying large number of virtual characters

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108510437B (en) * 2018-04-04 2022-05-17 科大讯飞股份有限公司 Virtual image generation method, device, equipment and readable storage medium
CN109949207B (en) * 2019-01-31 2023-01-10 深圳市云之梦科技有限公司 Virtual object synthesis method and device, computer equipment and storage medium
CN112766027A (en) * 2019-11-05 2021-05-07 广州虎牙科技有限公司 Image processing method, device, equipment and storage medium
CN110782515A (en) * 2019-10-31 2020-02-11 北京字节跳动网络技术有限公司 Virtual image generation method and device, electronic equipment and storage medium
CN114419202A (en) * 2022-01-20 2022-04-29 上海幻电信息科技有限公司 Virtual image generation method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023138345A1 (en) * 2022-01-20 2023-07-27 上海幻电信息科技有限公司 Virtual image generation method and system
CN114913058A (en) * 2022-05-27 2022-08-16 北京字跳网络技术有限公司 Display object determination method and device, electronic equipment and storage medium
CN118001741A (en) * 2024-04-09 2024-05-10 湖南速子文化科技有限公司 Method, system, equipment and medium for displaying large number of virtual characters

Also Published As

Publication number Publication date
WO2023138345A1 (en) 2023-07-27

Similar Documents

Publication Publication Date Title
US10853987B2 (en) Generating cartoon images from photos
US10535163B2 (en) Avatar digitization from a single image for real-time rendering
US10559111B2 (en) Systems and methods for generating computer ready animation models of a human head from captured data images
EP2718902B1 (en) Generation of avatar reflecting player appearance
CN114419202A (en) Virtual image generation method and system
US7764828B2 (en) Method, apparatus, and computer program for processing image
KR20210002888A (en) Method, apparatus, and system generating 3d avartar from 2d image
CN110555896B (en) Image generation method and device and storage medium
WO2019050808A1 (en) Avatar digitization from a single image for real-time rendering
CN108629339A (en) Image processing method and related product
CN113362263B (en) Method, apparatus, medium and program product for transforming an image of a virtual idol
US20230377291A1 (en) Generating augmented reality content based on third-party content
CN110755847B (en) Virtual operation object generation method and device, storage medium and electronic device
CN111862116A (en) Animation portrait generation method and device, storage medium and computer equipment
CN112819718A (en) Image processing method and device, electronic device and storage medium
CN109949207B (en) Virtual object synthesis method and device, computer equipment and storage medium
US11380037B2 (en) Method and apparatus for generating virtual operating object, storage medium, and electronic device
CN114723860B (en) Method, device and equipment for generating virtual image and storage medium
WO2022257766A1 (en) Image processing method and apparatus, device, and medium
CN110413818B (en) Label paper recommending method, device, computer readable storage medium and computer equipment
CN115690281B (en) Role expression driving method and device, storage medium and electronic device
CN114219704A (en) Animation image generation method and device
CN113537043B (en) Image processing method, device, electronic equipment and storage medium
KR20220107953A (en) Apparatus and method for generating emoticon
CN111797775A (en) Recommendation method and device for image design and intelligent mirror

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