技术领域Technical field
本申请涉及人工智能技术领域,尤其涉及一种虚拟人服装生成方法、装置、设备及介质。The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for generating virtual human clothing.
背景技术Background technique
相关技术中,在实现虚拟人的换装时,所采用的方案是基于用户的输入进行匹配,例如根据用户输入的信息或者根据用户所处的周围环境等信息,从素材库中匹配到一个已有的虚拟人服装,然后装饰在虚拟人身上。用户可以选择和装饰的服装都是服务提供者提前通过3D资产制作工具提前制作好的,在款式和样式上有限,导致虚拟人服装生成效果较差。In related technologies, when implementing a virtual human's dress-up, the solution adopted is to match based on the user's input. For example, based on the information input by the user or based on the user's surrounding environment and other information, an existing virtual human is matched from the material library. Some virtual human costumes are then decorated on the virtual human body. The clothing that users can choose and decorate are all made in advance by service providers through 3D asset production tools, and are limited in style and style, resulting in poor virtual human clothing generation effects.
发明内容Contents of the invention
本申请实施例提供一种虚拟人服装生成方法、装置、设备及介质,以解决现有虚拟人服装生成效果较差的问题。Embodiments of the present application provide a method, device, equipment and medium for generating virtual human clothing to solve the existing problem of poor virtual human clothing generation effects.
为解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种虚拟人服装生成方法,所述方法包括:In a first aspect, embodiments of the present application provide a method for generating virtual human clothing. The method includes:
接收用户输入的目标信息,所述目标信息携带用于表征虚拟人的服装特征的服装特征信息;Receive target information input by the user, the target information carrying clothing feature information used to characterize the clothing features of the virtual person;
将所述目标信息对应的服装特征信息输入预先训练得到的人工智能AI模型,基于所述AI模型的输出获得虚拟人服装模型;Input the clothing feature information corresponding to the target information into the pre-trained artificial intelligence AI model, and obtain a virtual human clothing model based on the output of the AI model;
对所述虚拟人服装模型进行渲染处理,得到虚拟人服装。The virtual human clothing model is rendered and processed to obtain virtual human clothing.
第二方面,本申请实施例提供一种虚拟人服装生成装置,所述装置包括:In a second aspect, embodiments of the present application provide a device for generating virtual human clothing. The device includes:
接收模块,用于接收用户输入的目标信息,所述目标信息携带用于表征虚拟人的服装特征的服装特征信息;A receiving module configured to receive target information input by the user, where the target information carries clothing feature information used to characterize the clothing features of the virtual person;
获取模块,用于将所述目标信息对应的服装特征信息输入预先训练得到的人工智能AI模型,基于所述AI模型的输出获得虚拟人服装模型;An acquisition module, configured to input clothing feature information corresponding to the target information into a pre-trained artificial intelligence AI model, and obtain a virtual human clothing model based on the output of the AI model;
渲染模块,用于对所述虚拟人服装模型进行渲染处理,得到虚拟人服装。A rendering module is used to render the virtual human clothing model to obtain virtual human clothing.
第三方面,本申请实施例提供了一种电子设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的虚拟人服装生成方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, including a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, The steps of implementing the method for generating virtual human clothing as described in the first aspect.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的虚拟人服装生成方法的步骤。In the fourth aspect, embodiments of the present application provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the virtual human clothing as described in the first aspect is implemented. Generate the steps of the method.
在本申请实施例中,接收用户输入的目标信息,所述目标信息携带用于表征虚拟人的服装特征的服装特征信息;将所述目标信息对应的服装特征信息输入预先训练得到的人工智能AI模型,基于所述AI模型的输出获得虚拟人服装模型;对所述虚拟人服装模型进行渲染处理,得到虚拟人服装。这样,能够通过用户输入的目标信息中携带的表征虚拟人的服装特征的服装特征信息获得虚拟人服装,生成的虚拟人服装在款式和样式上能够根据用户的输入变化,具有多样性,能够提高虚拟人服装生成效果。In this embodiment of the present application, the target information input by the user is received, and the target information carries clothing feature information used to characterize the clothing features of the virtual person; the clothing feature information corresponding to the target information is input into the pre-trained artificial intelligence AI model, and obtain a virtual human clothing model based on the output of the AI model; perform rendering processing on the virtual human clothing model to obtain virtual human clothing. In this way, virtual human clothing can be obtained through the clothing feature information that represents the clothing characteristics of the virtual human carried in the target information input by the user. The generated virtual human clothing can change in style and style according to the user's input, has diversity, and can improve Virtual human clothing generation effect.
附图说明Description of the drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting any creative effort.
图1是本申请实施例提供的一种虚拟人服装生成方法的流程图;Figure 1 is a flow chart of a method for generating virtual human clothing provided by an embodiment of the present application;
图2是本申请实施例提供的一种电子设备的结构图之一;Figure 2 is one of the structural diagrams of an electronic device provided by an embodiment of the present application;
图3是本申请实施例提供的一种换装示意图;Figure 3 is a schematic diagram of a replacement provided by the embodiment of the present application;
图4是本申请实施例提供的一种虚拟人服装生成装置的结构图;Figure 4 is a structural diagram of a virtual human clothing generation device provided by an embodiment of the present application;
图5是本申请实施例提供的一种电子设备的结构图之二。Figure 5 is a second structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first," "second," etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的虚拟人服装生成方法、装置、设备及介质进行详细地说明。The virtual human clothing generation method, device, equipment and medium provided by the embodiments of the present application will be described in detail through specific embodiments and application scenarios in conjunction with the accompanying drawings.
参见图1,图1是本申请实施例提供的一种虚拟人服装生成方法的流程图,如图1所示,所述方法包括以下步骤:Referring to Figure 1, Figure 1 is a flow chart of a method for generating virtual human clothing provided by an embodiment of the present application. As shown in Figure 1, the method includes the following steps:
步骤101、接收用户输入的目标信息,所述目标信息携带用于表征虚拟人的服装特征的服装特征信息。Step 101: Receive target information input by the user, where the target information carries clothing feature information used to characterize the clothing features of the virtual person.
其中,虚拟人可以包括数字人。所述目标信息可以携带描述文字信息,所述描述文字信息用于描述所述服装特征信息;或,所述目标信息可以携带目标图像,所述目标图像中包含服装,该服装中包含服装特征信息。Among them, virtual people can include digital people. The target information may carry descriptive text information, and the descriptive text information is used to describe the clothing feature information; or, the target information may carry a target image, the target image contains clothing, and the clothing contains clothing feature information. .
可选地,所述目标信息携带描述文字信息,所述描述文字信息用于描述所述服装特征信息;Optionally, the target information carries descriptive text information, and the descriptive text information is used to describe the clothing feature information;
所述将所述目标信息对应的服装特征信息输入预先训练得到的人工智能(Artificial Intelligence,AI)模型,包括:The step of inputting the clothing feature information corresponding to the target information into a pre-trained artificial intelligence (AI) model includes:
从所述目标信息中识别并提取所述描述文字信息;Identify and extract the descriptive text information from the target information;
将所述描述文字信息输入预先训练得到的AI模型。Enter the description text information into the pre-trained AI model.
该实施方式中,所述目标信息携带描述文字信息,所述描述文字信息用于描述所述服装特征信息,从所述目标信息中识别并提取所述描述文字信息,将所述描述文字信息输入预先训练得到的AI模型,基于所述AI模型的输出获得虚拟人服装模型,对所述虚拟人服装模型进行渲染处理,得到虚拟人服装,从而能够基于用户输入的描述文字信息生成虚拟人服装,生成的虚拟人服装在款式和样式上能够根据用户的输入变化,具有多样性,能够提高虚拟人服装生成效果。In this embodiment, the target information carries descriptive text information, the descriptive text information is used to describe the clothing feature information, the descriptive text information is identified and extracted from the target information, and the descriptive text information is input The pre-trained AI model is used to obtain a virtual human clothing model based on the output of the AI model, and the virtual human clothing model is rendered to obtain virtual human clothing, thereby generating virtual human clothing based on the description text information input by the user. The generated virtual human clothing can change in style and style according to the user's input, has diversity, and can improve the virtual human clothing generation effect.
可选地,所述目标信息携带目标图像,所述目标图像中包含服装;Optionally, the target information carries a target image, and the target image includes clothing;
所述将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,包括:The input of clothing feature information corresponding to the target information into the pre-trained AI model includes:
识别所述目标图像,获取所述目标图像中服装的显式数据和隐式数据,所述服装特征信息包括所述服装的显式数据和隐式数据;Identify the target image and obtain the explicit data and implicit data of the clothing in the target image, where the clothing feature information includes the explicit data and implicit data of the clothing;
将所述服装的显式数据和隐式数据输入预先训练得到的AI模型。The explicit data and implicit data of the clothing are input into the pre-trained AI model.
该实施方式中,所述目标信息携带目标图像,所述目标图像中包含服装,识别所述目标图像,获取所述目标图像中服装的显式数据和隐式数据,所述服装特征信息包括所述服装的显式数据和隐式数据,将所述服装的显式数据和隐式数据输入预先训练得到的AI模型,基于所述AI模型的输出获得虚拟人服装模型,对所述虚拟人服装模型进行渲染处理,得到虚拟人服装,从而能够基于用户输入的图像生成虚拟人服装,生成的虚拟人服装在款式和样式上能够根据用户的输入变化,具有多样性,能够提高虚拟人服装生成效果。In this implementation, the target information carries a target image, and the target image contains clothing. The target image is identified, and the explicit data and implicit data of the clothing in the target image are obtained. The clothing feature information includes the clothing. The explicit data and implicit data of the clothing are input into the pre-trained AI model, and a virtual human clothing model is obtained based on the output of the AI model. The model is rendered and processed to obtain virtual human clothing, so that virtual human clothing can be generated based on the image input by the user. The generated virtual human clothing can change in style and style according to the user's input, has diversity, and can improve the virtual human clothing generation effect. .
需要说明的是,可以接收用户输入的用于描述服装特征的指令,或者接收用户上传的用于体现服装特征的图片,以根据指令或者图片获取用户定义的服装的服装特征信息;将上述服装特征信息输入预先训练得到的AI模型中,生成虚拟人服装模型;对生成的虚拟人服装模型进行渲染得到用户所需的虚拟人服装,供用户对虚拟人形象进行换装。It should be noted that the instructions input by the user to describe the clothing characteristics can be received, or the pictures uploaded by the users to reflect the clothing characteristics can be received to obtain the clothing characteristics information of the user-defined clothing according to the instructions or pictures; the above clothing characteristics can be obtained The information is input into the pre-trained AI model to generate a virtual human clothing model; the generated virtual human clothing model is rendered to obtain the virtual human clothing required by the user for the user to change the virtual human image.
需要说明的是,若接收到的是用户输入的用于描述服装特征的指令,则识别指令中用户描述服装特征的提示词,将提示词作为服装特征信息;若接收到的是用户上传的用于体现服装特征的图片,则识别图片得到服装的显式数据和隐式数据,作为服装特征信息;其中,显式数据包括衣服的种类、材质、颜色等,隐式数据包括衣服的姿态、形状以及深度信息。It should be noted that if an instruction input by the user to describe clothing features is received, the prompt words used by the user to describe the clothing features in the instructions will be identified and the prompt words will be used as clothing feature information; if an instruction uploaded by the user is received. For pictures that reflect clothing characteristics, the explicit data and implicit data of the clothing are obtained by identifying the pictures as clothing feature information; among them, the explicit data includes the type, material, color, etc. of the clothes, and the implicit data includes the posture and shape of the clothes. and depth information.
另外,服装还可以描述为衣服。Additionally, clothing can also be described as clothing.
步骤102、将所述目标信息对应的服装特征信息输入预先训练得到的人工智能AI模型,基于所述AI模型的输出获得虚拟人服装模型。Step 102: Input the clothing feature information corresponding to the target information into the pre-trained artificial intelligence AI model, and obtain a virtual human clothing model based on the output of the AI model.
其中,所述目标信息可以携带描述文字信息,所述描述文字信息用于描述所述服装特征信息,所述目标信息对应的服装特征信息可以包括所述描述文字信息描述的服装特征信息;或,所述目标信息可以携带目标图像,所述目标图像中包含服装,该服装中包含服装特征信息,所述目标信息对应的服装特征信息可以包括所述目标图像中包含的服装特征信息。Wherein, the target information may carry descriptive text information, the descriptive text information is used to describe the clothing feature information, and the clothing feature information corresponding to the target information may include the clothing feature information described by the description text information; or, The target information may carry a target image, the target image contains clothing, the clothing contains clothing feature information, and the clothing feature information corresponding to the target information may include the clothing feature information contained in the target image.
可选地,所述将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,基于所述AI模型的输出获得虚拟人服装模型,包括:Optionally, inputting the clothing feature information corresponding to the target information into a pre-trained AI model, and obtaining a virtual human clothing model based on the output of the AI model includes:
将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,输出虚拟人服装的3D模型和虚拟人服装的纹理贴图;Input the clothing feature information corresponding to the target information into the pre-trained AI model, and output the 3D model of the virtual human clothing and the texture map of the virtual human clothing;
基于所述虚拟人服装的3D模型和虚拟人服装的纹理贴图获得虚拟人服装模型。A virtual human clothing model is obtained based on the 3D model of the virtual human clothing and the texture map of the virtual human clothing.
该实施方式中,将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,输出虚拟人服装的3D模型和虚拟人服装的纹理贴图,基于所述虚拟人服装的3D模型和虚拟人服装的纹理贴图获得虚拟人服装模型,对所述虚拟人服装模型进行渲染处理,得到虚拟人服装,这样,能够通过用户输入的目标信息中携带的服装特征信息获得虚拟人服装的3D模型和虚拟人服装的纹理贴图,进而获得虚拟人服装模型,并由虚拟人服装模型生成虚拟人服装,生成的虚拟人服装在款式和样式上能够根据用户的输入变化,具有多样性,能够提高虚拟人服装生成效果。In this implementation, the clothing feature information corresponding to the target information is input into the pre-trained AI model, and the 3D model of the virtual human clothing and the texture map of the virtual human clothing are output. Based on the 3D model of the virtual human clothing and the virtual human clothing, The virtual human clothing model is obtained from the texture map of the clothing, and the virtual human clothing model is rendered to obtain the virtual human clothing. In this way, the 3D model and virtual human clothing of the virtual human clothing can be obtained through the clothing feature information carried in the target information input by the user. Texture maps of human clothing, and then obtain a virtual human clothing model, and generate virtual human clothing from the virtual human clothing model. The generated virtual human clothing can change in style and style according to the user's input, has diversity, and can improve virtual human clothing. Generate effects.
可选地,所述基于所述虚拟人服装的3D模型和虚拟人服装的纹理贴图获得虚拟人服装模型,包括:Optionally, obtaining a virtual human clothing model based on the 3D model of the virtual human clothing and the texture map of the virtual human clothing includes:
基于所述虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理,以对所述虚拟人服装的3D模型进行纹理贴图;Based on the 3D model of the virtual human clothing, perform clothing texture mapping processing on the texture map of the virtual human clothing, so as to perform texture mapping on the 3D model of the virtual human clothing;
将所述映射处理后的虚拟人服装的3D模型确定为虚拟人服装模型。The 3D model of the virtual human clothing after the mapping process is determined as the virtual human clothing model.
该实施方式中,基于所述虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理,以对所述虚拟人服装的3D模型进行纹理贴图,将所述映射处理后的虚拟人服装的3D模型确定为虚拟人服装模型,从而能够实现虚拟人服装的纹理贴图的映射。In this embodiment, based on the 3D model of the virtual human clothing, a clothing texture mapping process is performed on the texture map of the virtual human clothing, so as to perform texture mapping on the 3D model of the virtual human clothing, and the mapping process The final 3D model of the virtual human clothing is determined as the virtual human clothing model, so that the mapping of the texture map of the virtual human clothing can be realized.
可选地,所述基于所述虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理,包括:Optionally, based on the 3D model of the virtual human clothing, performing clothing texture mapping processing on the texture map of the virtual human clothing includes:
将所述虚拟人服装的3D模型表面上的每个点投影至2D平面,得到2D平面的投影区域;Project each point on the 3D model surface of the virtual human clothing to a 2D plane to obtain the projection area of the 2D plane;
将所述虚拟人服装的纹理贴图的坐标,与所述2D平面的投影区域进行匹配,以对所述虚拟人服装的纹理贴图进行服装纹理的映射。The coordinates of the texture map of the virtual human clothing are matched with the projection area of the 2D plane to perform clothing texture mapping on the texture map of the virtual human clothing.
需要说明的是,可以在对虚拟人服装的3D模型进行适配调整后,将3D模型表面上的每个点投影到2D平面上,使2D的虚拟人服装的纹理贴图坐标与投影得到的2D平面完全吻合,从而使生成的虚拟人服装的纹理贴图与3D服装模型完全匹配。It should be noted that after adapting and adjusting the 3D model of the virtual human clothing, each point on the surface of the 3D model can be projected onto a 2D plane, so that the texture map coordinates of the 2D virtual human clothing are consistent with the projected 2D The plane is completely consistent, so that the texture map of the generated virtual human clothing completely matches the 3D clothing model.
该实施方式中,将所述虚拟人服装的3D模型表面上的每个点投影至2D平面,得到2D平面的投影区域,将所述虚拟人服装的纹理贴图的坐标,与所述2D平面的投影区域进行匹配,以对所述虚拟人服装的纹理贴图进行服装纹理的映射,将所述映射处理后的虚拟人服装的3D模型确定为虚拟人服装模型,从而实现将生成的虚拟人服装的服装纹理与虚拟人服装的3D模型进行适配,可以使生成的虚拟人服装看起来更加协调和真实。In this implementation, each point on the 3D model surface of the virtual human clothing is projected onto a 2D plane to obtain the projection area of the 2D plane, and the coordinates of the texture map of the virtual human clothing are compared with the coordinates of the 2D plane. The projection area is matched to map the texture of the virtual human clothing to the texture map of the virtual human clothing, and the 3D model of the virtual human clothing after the mapping process is determined as the virtual human clothing model, thereby realizing the generated virtual human clothing. Adapting the clothing texture to the 3D model of the virtual human clothing can make the generated virtual human clothing look more coordinated and realistic.
可选地,所述基于所述虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理之前,所述方法还包括:Optionally, before performing clothing texture mapping processing on the texture map of the virtual human clothing based on the 3D model of the virtual human clothing, the method further includes:
基于预先定义的虚拟人的人体结构数据对所述虚拟人服装的3D模型进行适配调整。The 3D model of the virtual human's clothing is adapted and adjusted based on the predefined human body structure data of the virtual human.
其中,所述预先定义的虚拟人的人体结构数据可以包括骨骼结构、人体模型UV坐标、三角面顶点坐标、法线数据等。可以采用深度学习训练得到的虚拟人服装适配AI模型,通过预先定义的虚拟人的人体结构数据对虚拟人服装的3D模型进行适配调整,实现将虚拟人服装的3D模型适配现实人体结构数据,示例地,可以将虚拟人服装的3D模型的左右肩膀的座位坐标,上半身上下边界坐标,腰围坐标等分别从肩宽、上半身长度、身体腰围、胸围、腿长、臂长等维度与现实人体结构适配。The predefined human body structure data of the virtual human may include skeletal structure, human body model UV coordinates, triangle vertex coordinates, normal data, etc. The virtual human clothing adaptation AI model obtained through deep learning training can be used to adjust the 3D model of the virtual human clothing through the predefined human body structure data, so as to adapt the 3D model of the virtual human clothing to the real human body structure. For example, the data can be the seat coordinates of the left and right shoulders of the 3D model of the virtual human clothing, the upper and lower boundary coordinates of the upper body, and the waist coordinates, respectively, from the dimensions of shoulder width, upper body length, body waist circumference, chest circumference, leg length, arm length, etc. Human body structure adaptation.
该实施方式中,基于预先定义的虚拟人的人体结构数据对所述虚拟人服装的3D模型进行适配调整,基于调整后的虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理,将所述映射处理后的虚拟人服装的3D模型确定为虚拟人服装模型,从而能够使得最终生成的虚拟人服装模型与虚拟人较为匹配。In this embodiment, the 3D model of the virtual human clothing is adapted and adjusted based on the predefined human body structure data, and the texture map of the virtual human clothing is adjusted based on the adjusted 3D model of the virtual human clothing. The mapping process of the clothing texture determines the 3D model of the virtual human clothing after the mapping process as the virtual human clothing model, so that the finally generated virtual human clothing model can match the virtual human.
步骤103、对所述虚拟人服装模型进行渲染处理,得到虚拟人服装。Step 103: Perform rendering processing on the virtual human clothing model to obtain virtual human clothing.
其中,所述渲染处理可以是预览渲染处理,或完整渲染处理。预览渲染处理可以是分别对生成的虚拟人服装的3D模型和虚拟人服装的纹理贴图进行渲染展示;完整渲染处理可以是将生成的虚拟人服装的3D模型和虚拟人服装的纹理贴图进行映射后得到的虚拟人服装模型进行渲染展示。The rendering process may be a preview rendering process or a complete rendering process. The preview rendering process may be to render and display the generated 3D model of the virtual human clothing and the texture map of the virtual human clothing respectively; the complete rendering process may be to map the generated 3D model of the virtual human clothing and the texture map of the virtual human clothing. The obtained virtual human clothing model is rendered and displayed.
需要说明的是,生成的虚拟人服装可以用于一键换装,具体的,所述生成的虚拟人服装可以供用户采用所述虚拟人服装对虚拟人进行换装。It should be noted that the generated virtual human clothing can be used for one-click dressing up. Specifically, the generated virtual human clothing can be used by the user to change the virtual human's clothing using the virtual human clothing.
本申请实施例能够根据用户输入的对虚拟人服装的自定义需求,通过预先训练得到的AI模型生成对应的虚拟人服装,以供用户对虚拟人进行换装,装扮虚拟人形象,提高了用户的参与感、沉浸感和认同感。并且,用户输入的对虚拟人服装的自定义需求可以是一段描述所需的虚拟人服装的文字指令,也可以是一张能够体现所需的虚拟人服装特征的图片,用户可以根据实际需要选择输入方式,灵活性较高,以适应不同用户的要求。The embodiments of the present application can generate corresponding virtual human clothing through the pre-trained AI model according to the customization requirements for virtual human clothing input by the user, so that the user can change the virtual human's clothes and dress up the virtual human's image, which improves the user's Sense of participation, immersion and recognition. Moreover, the customization requirement for the virtual human clothing input by the user can be a text instruction describing the required virtual human clothing, or it can be a picture that reflects the characteristics of the required virtual human clothing. The user can choose according to actual needs. The input method is highly flexible to adapt to the requirements of different users.
需要说明的是,通过用户输入的目标信息中携带的表征虚拟人的服装特征的服装特征信息获得虚拟人服装,满足了各种用户对不同风格的虚拟人服装的个性化需求,提高了用户在虚拟人换装过程中得到参与感、沉浸感和认同感。It should be noted that the virtual human clothing is obtained through the clothing feature information that represents the clothing characteristics of the virtual human carried in the target information input by the user, which satisfies the personalized needs of various users for different styles of virtual human clothing and improves the user's ability to wear clothing. The virtual person gains a sense of participation, immersion and recognition during the process of dressing up.
相关技术中,要实现虚拟人的换装基本都是基于根据用户的输入匹配,大致有以下两种方法:第一种是根据用户的信息或者根据用户所处的周围环境等信息,去匹配一个素材库中已有的虚拟人服装,然后装饰在虚拟人身上;第二种是用户在装饰自己虚拟人形象的界面上,有一些不同风格的虚拟人服装列表,用户可以从列表中选择自己喜欢的服装然后装饰在自己的虚拟人身上。In related technologies, virtual human dressing is basically based on matching based on user input. There are roughly two methods: the first is to match a virtual human based on the user's information or based on the user's surrounding environment and other information. The existing virtual human clothing in the material library is then decorated on the virtual human body; the second is for the user to decorate his own virtual human image on the interface. There is a list of virtual human clothing in different styles, and the user can choose what he likes from the list. The clothing is then decorated on one's own avatar.
上述两种方法均实现简单的虚拟人换装需求,但是同时也都存在一定的局限,比如,能选择和能装饰的服装都是服务提供者提前通过3D资产制作工具提前制作好的,所以在款式和样式上有限。如果要支持很多的风格和样式,那就要花大量的时间和人力物力来制作,并且制作再多也还是有限。另外,通过匹配素材库的方式不能充分的满足用户的个性化需求,不能完全按照所有用户的意愿去匹配。Both of the above methods realize simple virtual human dress-up requirements, but they also have certain limitations. For example, the clothes that can be selected and decorated are all made in advance by the service provider through 3D asset production tools, so in Limited in styles and styles. If you want to support many styles and styles, it will take a lot of time, manpower and material resources to produce, and no matter how many you produce, it will still be limited. In addition, the personalized needs of users cannot be fully met by matching the material library, and the matching cannot be completely based on the wishes of all users.
本申请实施例为了解决3D资产制作效率和突破匹配素材库来满足每个用户个性化着装需求,提出了一种基于AI的虚拟人一键换装方法。本申请实施例可以解决虚拟人服装3D资产制作效率不高、虚拟人服装风格多样性不足等问题,同时可以快速地满足每个用户对于虚拟人形象的个性化需求,从而提高用户的参与感、沉浸感和认同感。In order to solve the problem of 3D asset production efficiency and break through the matching material library to meet the personalized dressing needs of each user, the embodiment of this application proposes an AI-based one-click dress-up method for virtual humans. The embodiments of this application can solve the problems of low production efficiency of virtual human clothing 3D assets and insufficient diversity of virtual human clothing styles. At the same time, it can quickly meet each user's personalized needs for virtual human images, thereby improving the user's sense of participation. Immersion and recognition.
在本申请实施例中,接收用户输入的目标信息,所述目标信息携带用于表征虚拟人的服装特征的服装特征信息;将所述目标信息对应的服装特征信息输入预先训练得到的人工智能AI模型,基于所述AI模型的输出获得虚拟人服装模型;对所述虚拟人服装模型进行渲染处理,得到虚拟人服装。这样,能够通过用户输入的目标信息中携带的表征虚拟人的服装特征的服装特征信息获得虚拟人服装,生成的虚拟人服装在款式和样式上能够根据用户的输入变化,具有多样性,能够提高虚拟人服装生成效果。In this embodiment of the present application, the target information input by the user is received, and the target information carries clothing feature information used to characterize the clothing features of the virtual person; the clothing feature information corresponding to the target information is input into the pre-trained artificial intelligence AI model, and obtain a virtual human clothing model based on the output of the AI model; perform rendering processing on the virtual human clothing model to obtain virtual human clothing. In this way, virtual human clothing can be obtained through the clothing feature information that represents the clothing characteristics of the virtual human carried in the target information input by the user. The generated virtual human clothing can change in style and style according to the user's input, has diversity, and can improve Virtual human clothing generation effect.
作为一种具体的实施例,虚拟人服装生成方法可以应用于电子设备,如图2所示,电子设备包括用户应用模块、用户输入数据处理模块、AI能力模块、适配模块以及渲染模块。在该实施例中,以虚拟人为数字人为例进行说明。As a specific embodiment, the virtual human clothing generation method can be applied to electronic devices. As shown in Figure 2, the electronic device includes a user application module, a user input data processing module, an AI capability module, an adaptation module, and a rendering module. In this embodiment, a virtual human being is taken as an example to illustrate.
(1)用户应用模块(1)User application module
用户应用模块是用户交互操作的界面展示模块,主要是基于Unity或者UE等渲染引擎开发的3D应用交互界面。用户交互操作的界面主要包括:用户数字人形象展示界面、用户数据输入界面以及其他操作功能界面等。用户主要是从本模块中的入口中,进入到一键换装的界面,然后通过输入框输入描述指令或者上传参考图片等完成数据的输入,并提交给用户输入数据处理模块。The user application module is an interface display module for user interaction operations. It is mainly a 3D application interactive interface developed based on rendering engines such as Unity or UE. The user interactive operation interface mainly includes: user digital human image display interface, user data input interface and other operation function interfaces. The user mainly enters the one-click dress-up interface from the entrance in this module, and then inputs description instructions or uploads reference pictures through the input box to complete data input, and submits it to the user input data processing module.
另外,生成的3D模型或者纹理在用户确认后,经渲染模块渲染完成后,展示给用户,并可以用于其他操作,比如:可以保存此次的结果用于数字人形象搭配,比如可以对生成的3D模型和纹理整体效果给与打分和评价等。In addition, after the user confirms the generated 3D model or texture, it is displayed to the user after being rendered by the rendering module, and can be used for other operations. For example, the results can be saved for digital human image matching, such as generating Give scores and comments on the overall effect of the 3D model and texture.
(2)用户输入数据处理模块(2) User input data processing module
本实施例中的数字人一键换装方法是依赖于用户的数据或指令的输入,用户输入的信息可以包括描述文字信息,例如,一段描述服装样式、面料、花纹等要素的文字;或者,用户输入的信息可以为图片,例如,一张用户喜欢的包含服装样式的图片。针对不同的输入,会调用用户输入数据处理模块的不同处理单元。The one-click dress-up method of the digital human in this embodiment relies on the input of user data or instructions. The information input by the user may include descriptive text information, for example, a paragraph of text describing clothing style, fabric, pattern and other elements; or, The information input by the user can be a picture, for example, a picture containing a clothing style that the user likes. For different inputs, different processing units of the user input data processing module will be called.
如果用户输入的是一段描述文字,则调用提示词处理单元,对用户输入的提示词按照AI生成模块的输入规则,进行提示词的预处理,处理过程举例如下:输入描述为:“我想要一件红白方格子的衬衫,棉麻材质的长袖衬衫”,预处理后的输出为:“棉麻材质,长袖衬衫,红白格子”。进而基于预处理后的输出进行修饰词补充,使得提示词更加完整,修饰后的提示词为:“棉麻材质,长袖衬衫,红白格子,细节丰富,高分辨率,高清,8K,高清晰度(HighDefinition,HD),布料纹理”。If the user input is a paragraph of description text, the prompt word processing unit is called, and the prompt word input by the user is preprocessed according to the input rules of the AI generation module. The processing process is as follows: the input description is: "I want A red and white checkered shirt, a long-sleeved shirt made of cotton and linen", the preprocessed output is: "a long-sleeved shirt made of cotton and linen, red and white checked". Then, the modifier words are supplemented based on the preprocessed output to make the prompt words more complete. The modified prompt words are: "cotton and linen material, long-sleeved shirt, red and white plaid, rich details, high resolution, high definition, 8K, high Definition (HighDefinition, HD), cloth texture".
如果用户输入的是一张图片,则调用图片理解分析单元,首先会针对图片进行识别分析确认图片中是否包含可参考的服装内容,如果不包含,则提示用户修改图片;如果包含,则进行进一步的识别生成AI生成模块的数据,识别会生成以下两种数据:If the user input is a picture, the picture understanding and analysis unit is called. First, the picture will be identified and analyzed to confirm whether the picture contains referenceable clothing content. If it does not contain, the user will be prompted to modify the picture; if it does, proceed further. The recognition generates data for the AI generation module. The recognition will generate the following two types of data:
a)显式数据,如:服装种类:上衣,长袖衬衫;服装材质:棉麻材质;服装颜色:红白格子;服装细节:扣子为白色透明小扣,正方形小格子;等。a) Explicit data, such as: clothing type: tops, long-sleeved shirts; clothing material: cotton and linen; clothing color: red and white plaid; clothing details: small white transparent buttons, small square plaid; etc.
b)隐式数据:通过识别模块的自动解码器,识别出图片中服装的姿态和形状以及深度等信息。深度是指服装在图像中的深度信息。b) Implicit data: Through the automatic decoder of the recognition module, the posture, shape, depth and other information of the clothing in the picture are recognized. Depth refers to the depth information of clothing in the image.
然后,基于识别出的服装特征信息,发送给AI生成模块,进行数字人服装的生成。Then, based on the identified clothing feature information, it is sent to the AI generation module to generate digital human clothing.
(3)AI能力模块(3)AI capability module
AI能力模块主要包括以下子单元:AI大模型训练单元、AI大模型服务单元、AI生成单元。其中,AI大模型服务单元至少具备支持3D模型生成的大模型能力和服装纹理生成的大模型能力,从而能够支撑AI生成单元生成3D模型和服装纹理贴图。The AI capability module mainly includes the following sub-units: AI large model training unit, AI large model service unit, and AI generation unit. Among them, the AI large model service unit at least has the large model capability to support 3D model generation and the large model capability of clothing texture generation, thereby supporting the AI generation unit to generate 3D models and clothing texture maps.
3D模型生成和服装纹理生成大模型是将特有的预处理的相应数据集,通过AI大模型训练单元训练后得到的预训练大模型。AI生成单元是针对大模型服务的封装,用户输入指令和数据后,通过本单元把用户输入传给大模型能力,生成内容后通过本单元输出结果给调用方。The 3D model generation and clothing texture generation large models are pre-trained large models obtained by training the unique pre-processed corresponding data sets through the AI large model training unit. The AI generation unit is an encapsulation of large model services. After the user inputs instructions and data, the user input is passed to the large model capability through this unit. After the content is generated, the results are output to the caller through this unit.
AI大模型训练单元除了上文中用于大模型预训练外,还用于用户使用过程中,通过用户对于生成内容的反馈,把正向的反馈所对应的输入的提示词和AI生成的内容作为训练数据,进行大模型的训练,使得大模型的能力随着用户使用,不断得到训练和进化。In addition to being used for large model pre-training as mentioned above, the AI large model training unit is also used during the user's use process. Through the user's feedback on the generated content, the input prompt words corresponding to the positive feedback and the AI-generated content are used as Training data is used to train large models, so that the capabilities of large models are continuously trained and evolved as users use them.
(4)适配模块(4)Adaptation module
AI生成单元生成的3D模型和服装纹理贴图,可以经过适配模块来适配调整,再完成生成素材和数字人的组装和展示。The 3D models and clothing texture maps generated by the AI generation unit can be adapted and adjusted through the adaptation module, and then the generated materials and digital humans are assembled and displayed.
适配模块主要基于数字人裸模预先定义的数字人人体结构数据,如:骨骼结构、人体模型UV坐标、三角面顶点坐标、法线数据等,通过深度学习训练得到的数字人服装适配AI模型,此AI适配模型通过数字人的身体结构数据对生成的数字人服装进行适配调整,主要是对对应的坐标进行调整,例如:左右肩膀的座位坐标,上半身上下边界坐标,腰围坐标等。通过适配调整以对应现实中数据,比如:肩宽、上半身长度、身体腰围、胸围、腿长、臂长等维度,把生成的数据人服装的3D模型跟数字人数据结合进行处理,最终把3D模型适配到数字人体模型上,即完成组装,同时把3D模型和骨骼数据进行绑定,从而达到3D模型和数字人人体组装结合的效果。The adaptation module is mainly based on the pre-defined digital human body structure data of the digital human nude model, such as: bone structure, human model UV coordinates, triangle vertex coordinates, normal data, etc., and the digital human clothing adaptation AI obtained through deep learning training Model, this AI adaptation model adapts and adjusts the generated digital human clothing through the digital human body structure data, mainly adjusting the corresponding coordinates, such as: seat coordinates of the left and right shoulders, upper and lower boundary coordinates of the upper body, waist coordinates, etc. . Through adaptation and adjustment to correspond to real-life data, such as: shoulder width, upper body length, body waist circumference, chest circumference, leg length, arm length and other dimensions, the generated 3D model of the data human clothing is combined with the digital human data for processing, and finally the The 3D model is adapted to the digital human body model, that is, the assembly is completed, and the 3D model and skeletal data are bound at the same time, thereby achieving the effect of combining the 3D model and the digital human body assembly.
完成3D模型适配后,可以基于3D服装的UV坐标,对生成的数字人服装的纹理贴图(如PBR纹理贴图)进行服装纹理的映射。可以使用三线性插值法(texturize3D)进行纹理贴图。具体的,可以将3D模型表面上的每个点投影到2D平面上,然后把生成的2D的纹理贴图通过基于3D投影计算得到的2D平面进行计算,进而使得2D纹理坐标与2D平面吻合,从而满足3D模型的坐标能够完美的贴到3D模型上,进而完成了基于服装模型的纹理材质图的映射。After completing the 3D model adaptation, the texture map of the generated digital human clothing (such as PBR texture map) can be mapped to the clothing texture based on the UV coordinates of the 3D clothing. Texture mapping can be done using trilinear interpolation (texturize3D). Specifically, each point on the surface of the 3D model can be projected onto a 2D plane, and then the generated 2D texture map can be calculated through the 2D plane calculated based on the 3D projection, so that the 2D texture coordinates match the 2D plane, thus The coordinates of the 3D model can be perfectly attached to the 3D model, thus completing the mapping of the texture map based on the clothing model.
(5)渲染模块(5)Rendering module
渲染模块分为预览渲染模块和完整渲染模块。其中,预览渲染模块是单独只对生成的3D模型和服装纹理效果进行单独渲染展示,一般不需要经过适配模块进行适配处理。预览渲染模块可以进行3D模型效果展示和交互拖拽等操作,并且能够360度查看3D模型。预览渲染模块还可以通过平面展开一块布的方式来渲染展示服装纹理。The rendering module is divided into preview rendering module and complete rendering module. Among them, the preview rendering module only renders and displays the generated 3D model and clothing texture effects separately, and generally does not need to be adapted through the adaptation module. The preview rendering module can perform 3D model effect display and interactive drag and drop operations, and can view 3D models in 360 degrees. The preview rendering module can also render and display the clothing texture by unfolding a piece of cloth flatly.
另外,完整渲染模块是通过交互界面中设置的换装按钮来触发,将通过AI生成的服装模型和纹理贴图等资产,经过适配模式处理后,完整地与数字人组装、绑定及映射,最终通过渲染引擎进行整体效果的渲染展示。此外,用户可以基于渲染效果,通过参数化的方式动态调整模型位置和纹理大小及位置等。In addition, the complete rendering module is triggered by the dress-up button set in the interactive interface. Assets such as clothing models and texture maps generated by AI will be completely assembled, bound and mapped with the digital human after processing in the adaptation mode. Finally, the overall effect is rendered and displayed through the rendering engine. In addition, users can dynamically adjust the model position and texture size and position through parameterization based on the rendering effect.
在用户确认保存后,将渲染呈现的效果配置参数保存,进而作为数字人的资产一同保存。可以在用户应用模块查看和使用该数字人的资产,最终实现用户数字人的一键换装的效果。图3为一键换装的示意图。After the user confirms the save, the rendering effect configuration parameters are saved and then saved together as the assets of the digital human. The digital person's assets can be viewed and used in the user application module, ultimately achieving the effect of one-click dressing up of the user's digital person. Figure 3 is a schematic diagram of one-click dressing.
需要说明的是,基于上述各模块能够实现基于AI的数字人一键换装,解决数字人服装3D资产制作效率不高、数字人服装风格多样性不足等问题,同时可以快速地满足每个用户对于数字人形象的个性化需求,从而提高用户的参与感、沉浸感和认同感。It should be noted that the above-mentioned modules can realize one-click dressing change of digital humans based on AI, solving the problems of low production efficiency of digital human clothing 3D assets and insufficient diversity of digital human clothing styles. At the same time, it can quickly satisfy each user. Personalized needs for digital human images, thereby improving users’ sense of participation, immersion and identity.
本申请实施例还提供了一种虚拟人服装生成装置。请参照图4,图4是本申请实施例提供的一种虚拟人服装生成装置的结构图。如图4所示,虚拟人服装生成装置200包括:An embodiment of the present application also provides a device for generating virtual human clothing. Please refer to Figure 4, which is a structural diagram of a virtual human clothing generation device provided by an embodiment of the present application. As shown in Figure 4, the virtual human clothing generation device 200 includes:
接收模块201,用于接收用户输入的目标信息,所述目标信息携带用于表征虚拟人的服装特征的服装特征信息;The receiving module 201 is configured to receive target information input by the user, where the target information carries clothing feature information used to characterize the clothing features of the virtual person;
获取模块202,用于将所述目标信息对应的服装特征信息输入预先训练得到的人工智能AI模型,基于所述AI模型的输出获得虚拟人服装模型;The acquisition module 202 is used to input clothing feature information corresponding to the target information into a pre-trained artificial intelligence AI model, and obtain a virtual human clothing model based on the output of the AI model;
渲染模块203,用于对所述虚拟人服装模型进行渲染处理,得到虚拟人服装。The rendering module 203 is used to perform rendering processing on the virtual human clothing model to obtain virtual human clothing.
可选地,所述目标信息携带描述文字信息,所述描述文字信息用于描述所述服装特征信息;Optionally, the target information carries descriptive text information, and the descriptive text information is used to describe the clothing feature information;
所述获取模块具体用于:The acquisition module is specifically used for:
从所述目标信息中识别并提取所述描述文字信息;Identify and extract the descriptive text information from the target information;
将所述描述文字信息输入预先训练得到的AI模型;Enter the description text information into the pre-trained AI model;
基于所述AI模型的输出获得虚拟人服装模型。A virtual human clothing model is obtained based on the output of the AI model.
可选地,所述目标信息携带目标图像,所述目标图像中包含服装;Optionally, the target information carries a target image, and the target image includes clothing;
所述获取模块具体用于:The acquisition module is specifically used for:
识别所述目标图像,获取所述目标图像中服装的显式数据和隐式数据,所述服装特征信息包括所述服装的显式数据和隐式数据;Identify the target image and obtain the explicit data and implicit data of the clothing in the target image, where the clothing feature information includes the explicit data and implicit data of the clothing;
将所述服装的显式数据和隐式数据输入预先训练得到的AI模型;Enter the explicit data and implicit data of the clothing into the pre-trained AI model;
基于所述AI模型的输出获得虚拟人服装模型。A virtual human clothing model is obtained based on the output of the AI model.
可选地,所述获取模块包括:Optionally, the acquisition module includes:
输入单元,用于将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,输出虚拟人服装的3D模型和虚拟人服装的纹理贴图;An input unit, used to input the clothing feature information corresponding to the target information into the pre-trained AI model, and output the 3D model of the virtual human clothing and the texture map of the virtual human clothing;
获取单元,用于基于所述虚拟人服装的3D模型和虚拟人服装的纹理贴图获得虚拟人服装模型。An acquisition unit is configured to obtain a virtual human clothing model based on the 3D model of the virtual human clothing and the texture map of the virtual human clothing.
可选地,所述获取单元包括:Optionally, the acquisition unit includes:
映射子单元,用于基于所述虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理,以对所述虚拟人服装的3D模型进行纹理贴图;A mapping subunit, configured to perform clothing texture mapping processing on the texture map of the virtual human clothing based on the 3D model of the virtual human clothing, so as to perform texture mapping on the 3D model of the virtual human clothing;
确定子单元,用于将所述映射处理后的虚拟人服装的3D模型确定为虚拟人服装模型。The determining subunit is used to determine the 3D model of the virtual human clothing after mapping processing as the virtual human clothing model.
可选地,所述映射子单元具体用于:Optionally, the mapping subunit is specifically used for:
将所述虚拟人服装的3D模型表面上的每个点投影至2D平面,得到2D平面的投影区域;Project each point on the 3D model surface of the virtual human clothing to a 2D plane to obtain the projection area of the 2D plane;
将所述虚拟人服装的纹理贴图的坐标,与所述2D平面的投影区域进行匹配,以对所述虚拟人服装的纹理贴图进行服装纹理的映射。The coordinates of the texture map of the virtual human clothing are matched with the projection area of the 2D plane to perform clothing texture mapping on the texture map of the virtual human clothing.
可选地,所述装置还包括:Optionally, the device also includes:
调整模块,用于基于预先定义的虚拟人的人体结构数据对所述虚拟人服装的3D模型进行适配调整。An adjustment module, configured to adapt and adjust the 3D model of the virtual human's clothing based on the predefined human body structure data of the virtual human.
本申请实施例中,通过用户输入的目标信息中携带的表征虚拟人的服装特征的服装特征信息获得虚拟人服装,生成的虚拟人服装在款式和样式上能够根据用户的输入变化,具有多样性,能够提高虚拟人服装生成效果。In the embodiment of the present application, the virtual human clothing is obtained through the clothing feature information that represents the clothing characteristics of the virtual human carried in the target information input by the user. The generated virtual human clothing can change in style and style according to the user's input and has diversity. , which can improve the effect of virtual human clothing generation.
本申请实施例中的虚拟人服装生成装置200可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobilepersonal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,本申请实施例不作具体限定。The virtual human clothing generation device 200 in the embodiment of the present application may be an electronic device or a component of the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than the terminal. For example, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a mobile Internet device (MID), or augmented reality (AR)/virtual reality (VR). ) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., the embodiments of this application are not specifically limited.
本申请实施例中的虚拟人服装生成装置200可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The virtual human clothing generation device 200 in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.
本申请实施例提供的虚拟人服装生成装置200能够实现图1所述方法实施例实现的各个过程,为避免重复,这里不再赘述。The virtual human clothing generation device 200 provided by the embodiment of the present application can implement each process implemented by the method embodiment described in Figure 1. To avoid duplication, details will not be described here.
本申请实施例还提供了一种电子设备。请参见图5,图5是本申请实施例提供的一种电子设备的结构图,如图5所示,所述电子设备包括:处理器300、存储器320及存储在所述存储器320上并可在所述处理器300上运行的程序或指令,处理器300,用于读取存储器320中的程序或指令;所述电子设备还包括总线接口和收发机310。An embodiment of the present application also provides an electronic device. Please refer to Figure 5. Figure 5 is a structural diagram of an electronic device provided by an embodiment of the present application. As shown in Figure 5, the electronic device includes: a processor 300, a memory 320 and data stored on the memory 320 and capable of The program or instructions run on the processor 300, and the processor 300 is used to read the program or instructions in the memory 320; the electronic device also includes a bus interface and a transceiver 310.
收发机310,用于在处理器300的控制下接收和发送数据。Transceiver 310 for receiving and transmitting data under the control of processor 300.
其中,在图5中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器300代表的一个或多个处理器和存储器320代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机310可以是多个元件,即包括发送机和收发机,提供用于在传输介质上与各种其他装置通信的单元。处理器300负责管理总线架构和通常的处理,存储器320可以存储处理器300在执行操作时所使用的数据。In FIG. 5 , the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 300 and various circuits of the memory represented by memory 320 are linked together. The bus architecture can also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and therefore will not be described further herein. The bus interface provides the interface. Transceiver 310 may be a plurality of elements, including a transmitter and a transceiver, providing a unit for communicating with various other devices over a transmission medium. The processor 300 is responsible for managing the bus architecture and general processing, and the memory 320 can store data used by the processor 300 when performing operations.
其中,处理器300,用于读取存储器320中的程序或指令,执行如下步骤:Among them, the processor 300 is used to read the program or instructions in the memory 320 and perform the following steps:
接收用户输入的目标信息,所述目标信息携带用于表征虚拟人的服装特征的服装特征信息;Receive target information input by the user, the target information carrying clothing feature information used to characterize the clothing features of the virtual person;
将所述目标信息对应的服装特征信息输入预先训练得到的人工智能AI模型,基于所述AI模型的输出获得虚拟人服装模型;Input the clothing feature information corresponding to the target information into the pre-trained artificial intelligence AI model, and obtain a virtual human clothing model based on the output of the AI model;
对所述虚拟人服装模型进行渲染处理,得到虚拟人服装。The virtual human clothing model is rendered and processed to obtain virtual human clothing.
可选地,所述目标信息携带描述文字信息,所述描述文字信息用于描述所述服装特征信息;Optionally, the target information carries descriptive text information, and the descriptive text information is used to describe the clothing feature information;
处理器300用于执行的所述将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,包括:The processor 300 is configured to input the clothing feature information corresponding to the target information into the pre-trained AI model, including:
从所述目标信息中识别并提取所述描述文字信息;Identify and extract the descriptive text information from the target information;
将所述描述文字信息输入预先训练得到的AI模型。Enter the description text information into the pre-trained AI model.
可选地,所述目标信息携带目标图像,所述目标图像中包含服装;Optionally, the target information carries a target image, and the target image includes clothing;
处理器300用于执行的所述将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,包括:The processor 300 is configured to input the clothing feature information corresponding to the target information into the pre-trained AI model, including:
识别所述目标图像,获取所述目标图像中服装的显式数据和隐式数据,所述服装特征信息包括所述服装的显式数据和隐式数据;Identify the target image and obtain the explicit data and implicit data of the clothing in the target image, where the clothing feature information includes the explicit data and implicit data of the clothing;
将所述服装的显式数据和隐式数据输入预先训练得到的AI模型。The explicit data and implicit data of the clothing are input into the pre-trained AI model.
可选地,处理器300用于执行的所述将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,基于所述AI模型的输出获得虚拟人服装模型,包括:Optionally, the processor 300 is configured to input clothing feature information corresponding to the target information into a pre-trained AI model, and obtain a virtual human clothing model based on the output of the AI model, including:
将所述目标信息对应的服装特征信息输入预先训练得到的AI模型,输出虚拟人服装的3D模型和虚拟人服装的纹理贴图;Input the clothing feature information corresponding to the target information into the pre-trained AI model, and output the 3D model of the virtual human clothing and the texture map of the virtual human clothing;
基于所述虚拟人服装的3D模型和虚拟人服装的纹理贴图获得虚拟人服装模型。A virtual human clothing model is obtained based on the 3D model of the virtual human clothing and the texture map of the virtual human clothing.
可选地,处理器300用于执行的所述基于所述虚拟人服装的3D模型和虚拟人服装的纹理贴图获得虚拟人服装模型,包括:Optionally, the processor 300 is configured to obtain a virtual human clothing model based on the 3D model of the virtual human clothing and the texture map of the virtual human clothing, including:
基于所述虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理,以对所述虚拟人服装的3D模型进行纹理贴图;Based on the 3D model of the virtual human clothing, perform clothing texture mapping processing on the texture map of the virtual human clothing, so as to perform texture mapping on the 3D model of the virtual human clothing;
将所述映射处理后的虚拟人服装的3D模型确定为虚拟人服装模型。The 3D model of the virtual human clothing after the mapping process is determined as the virtual human clothing model.
可选地,处理器300用于执行的所述基于所述虚拟人服装的3D模型,对所述虚拟人服装的纹理贴图进行服装纹理的映射处理,包括:Optionally, the processor 300 is configured to perform clothing texture mapping processing on the texture map of the virtual human clothing based on the 3D model of the virtual human clothing, including:
将所述虚拟人服装的3D模型表面上的每个点投影至2D平面,得到2D平面的投影区域;Project each point on the 3D model surface of the virtual human clothing to a 2D plane to obtain the projection area of the 2D plane;
将所述虚拟人服装的纹理贴图的坐标,与所述2D平面的投影区域进行匹配,以对所述虚拟人服装的纹理贴图进行服装纹理的映射。The coordinates of the texture map of the virtual human clothing are matched with the projection area of the 2D plane to perform clothing texture mapping on the texture map of the virtual human clothing.
可选地,处理器300还用于执行:Optionally, the processor 300 is also used to perform:
基于预先定义的虚拟人的人体结构数据对所述虚拟人服装的3D模型进行适配调整。The 3D model of the virtual human's clothing is adapted and adjusted based on the predefined human body structure data of the virtual human.
本申请实施例中,通过用户输入的目标信息中携带的表征虚拟人的服装特征的服装特征信息获得虚拟人服装,生成的虚拟人服装在款式和样式上能够根据用户的输入变化,具有多样性,能够提高虚拟人服装生成效果。In the embodiment of the present application, the virtual human clothing is obtained through the clothing feature information that represents the clothing characteristics of the virtual human carried in the target information input by the user. The generated virtual human clothing can change in style and style according to the user's input and has diversity. , which can improve the effect of virtual human clothing generation.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述图1所述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the method embodiment described in Figure 1 is implemented, and can To achieve the same technical effect, to avoid repetition, we will not repeat them here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述图1所述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the method described in Figure 1. Each process in the example can achieve the same technical effect. To avoid repetition, we will not repeat it here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311734905.7ACN117710581A (en) | 2023-12-15 | 2023-12-15 | Virtual human clothing generation method, device, equipment and medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311734905.7ACN117710581A (en) | 2023-12-15 | 2023-12-15 | Virtual human clothing generation method, device, equipment and medium |
| Publication Number | Publication Date |
|---|---|
| CN117710581Atrue CN117710581A (en) | 2024-03-15 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311734905.7APendingCN117710581A (en) | 2023-12-15 | 2023-12-15 | Virtual human clothing generation method, device, equipment and medium |
| Country | Link |
|---|---|
| CN (1) | CN117710581A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120257401A (en)* | 2025-06-05 | 2025-07-04 | 浙江子不语电子商务有限公司 | A visualization display method of clothing design 3D model based on AI model |
| CN120655803A (en)* | 2025-08-21 | 2025-09-16 | 上海久之润信息技术有限公司 | Method and system for displaying 3D rendering effect driven by large garment model |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120257401A (en)* | 2025-06-05 | 2025-07-04 | 浙江子不语电子商务有限公司 | A visualization display method of clothing design 3D model based on AI model |
| CN120257401B (en)* | 2025-06-05 | 2025-09-19 | 浙江子不语电子商务有限公司 | A visualization display method for clothing design 3D models based on AI model |
| CN120655803A (en)* | 2025-08-21 | 2025-09-16 | 上海久之润信息技术有限公司 | Method and system for displaying 3D rendering effect driven by large garment model |
| Publication | Publication Date | Title |
|---|---|---|
| US11790589B1 (en) | System and method for creating avatars or animated sequences using human body features extracted from a still image | |
| CN111787242B (en) | Method and apparatus for virtual fitting | |
| CN112598785B (en) | Method, device and equipment for generating three-dimensional model of virtual image and storage medium | |
| US12223672B2 (en) | Real-time garment exchange | |
| CN117710581A (en) | Virtual human clothing generation method, device, equipment and medium | |
| EP4453884B1 (en) | Real-time upper-body garment exchange | |
| WO2023121896A1 (en) | Real-time motion and appearance transfer | |
| CN114639161A (en) | Training method of multitask model and virtual fitting method of clothes | |
| WO2024107634A1 (en) | Real-time try-on using body landmarks | |
| CN116703507A (en) | Image processing method, display method and computing device | |
| US20250245865A1 (en) | N-flows estimation for garment transfer | |
| US20240331211A1 (en) | Generating images of synthesized bodies wearing a garment | |
| Dias et al. | Augmented Reality Based Virtual Dressing Room Using Unity3D | |
| CN119228979A (en) | A method and device for generating a specified effect of clothing pictures with human models | |
| CN120388111A (en) | Image processing method, device, computer equipment, storage medium and program product | |
| CN118691767A (en) | Image processing method, system, electronic device and computer program product |
| 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 |