[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115661375B - Three-dimensional hair style generation method and device, electronic equipment and storage medium - Google Patents

Three-dimensional hair style generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115661375B
CN115661375B CN202211680773.XA CN202211680773A CN115661375B CN 115661375 B CN115661375 B CN 115661375B CN 202211680773 A CN202211680773 A CN 202211680773A CN 115661375 B CN115661375 B CN 115661375B
Authority
CN
China
Prior art keywords
hair
dimensional
data
obtaining
hair style
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.)
Active
Application number
CN202211680773.XA
Other languages
Chinese (zh)
Other versions
CN115661375A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211680773.XA priority Critical patent/CN115661375B/en
Publication of CN115661375A publication Critical patent/CN115661375A/en
Application granted granted Critical
Publication of CN115661375B publication Critical patent/CN115661375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides a three-dimensional hairstyle generation method and device, electronic equipment and a storage medium, relates to the technical field of artificial intelligence, specifically to the technical fields of augmented reality, virtual reality, computer vision, deep learning and the like, and can be applied to scenes such as a meta universe and virtual digital people. The implementation scheme is as follows: obtaining a plurality of first images about a first object, the first object including a hairstyle region containing a plurality of hairs, the plurality of first images corresponding to different respective perspectives; obtaining, based on the plurality of first images, surface three-dimensional hair data including information in three-dimensional space of each of a plurality of first hairs of the hairstyle area displayed in the plurality of first images; obtaining a first hairstyle hidden vector based on the surface three-dimensional hairline data; and obtaining first three-dimensional hair style data corresponding to the hair style area based on the first hair style hidden vector.

Description

Three-dimensional hair style generation method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the technical field of artificial intelligence, and in particular to the technical fields of augmented reality, virtual reality, computer vision, deep learning, and the like, which can be applied to scenes such as a meta universe, a virtual digital person, and the like, and in particular to a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for generating a three-dimensional hairstyle.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge map technology and the like.
The three-dimensional virtual image has wide application value in user scenes such as social contact, live broadcast, games and the like. The three-dimensional virtual image is generated based on artificial intelligence, the virtual image is generated through the face image, the personalized virtual image is customized for the user, the personalized requirements of the user are effectively met, and the method has a wide application prospect.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, unless otherwise indicated, the problems mentioned in this section should not be considered as having been acknowledged in any prior art.
Disclosure of Invention
The disclosure provides a three-dimensional hair style generation method, a three-dimensional hair style generation device, an electronic device, a computer readable storage medium and a computer program product.
According to an aspect of the present disclosure, there is provided a three-dimensional hairstyle generating method, including: obtaining a plurality of first images about a first object, the first object including a hairstyle region containing a plurality of hairs, the plurality of first images corresponding to different respective perspectives; obtaining, based on the plurality of first images, surface three-dimensional hair data including information in three-dimensional space of each of a plurality of first hairs of the hairstyle area displayed in the plurality of first images; obtaining, based on the surface three-dimensional hair data, a first hairstyle hidden vector comprising information in three-dimensional space of each of a plurality of second hair wires distinct from the plurality of first hair wires in the hairstyle region; and obtaining first three-dimensional hair style data corresponding to the hair style area based on the first hair style hidden vector, wherein the first three-dimensional hair style data comprises hair data of each hair in the plurality of hair, and the hair data comprises coordinates of each node in a plurality of nodes on the hair.
According to another aspect of the present disclosure, there is provided a three-dimensional hair styling apparatus comprising: an image acquisition unit configured to obtain a plurality of first images regarding a first object, the first object including a hairstyle region including a plurality of hairs, the plurality of first images respectively corresponding to different viewing angles; a surface three-dimensional hair data obtaining unit configured to obtain surface three-dimensional hair data including information in a three-dimensional space of each of a plurality of first hairs of the hairstyle region displayed in the plurality of first images, based on the plurality of first images; a hair style hidden vector obtaining unit configured to obtain a first hair style hidden vector based on the surface three-dimensional hair data, the first hair style hidden vector including information in a three-dimensional space of each of a plurality of second hair wires different from the plurality of first hair wires in the hair style region; and a three-dimensional hairstyle data obtaining unit configured to obtain first three-dimensional hairstyle data corresponding to the hairstyle area based on the first hairstyle hidden vector, where the first three-dimensional hairstyle data includes hairstyle data for each of the plurality of hairstyles, and the hairstyle data includes coordinates of each of a plurality of nodes on the hairstyle.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to the embodiments of the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program realizes the method according to embodiments of the present disclosure when executed by a processor.
According to one or more embodiments of the present disclosure, it is possible to obtain three-dimensional hairstyle data including not only hairline data of hairlines of a superficial (visible) area of a hairstyle area but also hairline data of hairlines of an internal (invisible) area located in the hairstyle area, thereby making it possible to obtain a higher realism of a three-dimensional hairstyle obtained after rendering based on the three-dimensional hairstyle data.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, according to an embodiment of the present disclosure;
fig. 2 illustrates a flow diagram of a three-dimensional hair style generation method according to an embodiment of the present disclosure;
fig. 3 shows a schematic view of a plurality of first images obtained in a three-dimensional hair style generation method according to an embodiment of the present disclosure;
fig. 4 shows a flow chart of a process of obtaining surface three-dimensional hair data based on the plurality of first images in a three-dimensional hair style generation method according to an embodiment of the present disclosure;
fig. 5 shows a schematic view of a three-dimensional model obtained in a three-dimensional hair style generation method according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram illustrating a plurality of divided images respectively corresponding to a plurality of first images obtained in a three-dimensional hair style generating method according to an embodiment of the present disclosure;
fig. 7 is a schematic view illustrating a plurality of line segment diagrams respectively corresponding to a plurality of first images obtained in a three-dimensional hair style generating method according to an embodiment of the present disclosure;
fig. 8 shows a schematic view of obtained surface three-dimensional hair style data obtained in a three-dimensional hair style generation method according to an embodiment of the present disclosure;
fig. 9 is a flowchart illustrating a process of obtaining a first hair style hidden vector based on the surface three-dimensional hair data in the three-dimensional hair style generation method according to the embodiment of the present disclosure;
fig. 10 illustrates a schematic diagram of an avatar rendered by first three-dimensional hair style data generated in a three-dimensional hair style generation method according to an embodiment of the present disclosure;
FIG. 11 illustrates a block diagram of a three-dimensional hair styling apparatus according to an embodiment of the present disclosure; and
FIG. 12 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", and the like to describe various elements is not intended to limit the positional relationship, the temporal relationship, or the importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various described examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented in accordance with embodiments of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable the execution of the three-dimensional hair style generation methods according to the present disclosure.
In some embodiments, the server 120 may also provide other services or software applications, which may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof, which may be executed by one or more processors. A user operating a client device 101, 102, 103, 104, 105, and/or 106 may, in turn, utilize one or more client applications to interact with the server 120 to take advantage of the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Accordingly, fig. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may use the client device 101, 102, 103, 104, 105 and/or 106 to receive the avatar obtained after rendering the three-dimensional hair style data generated according to the three-dimensional hair style generation method of the present disclosure. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that any number of client devices may be supported by the present disclosure.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so forth. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various Mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, windows Phone, android. Portable handheld devices may include cellular telephones, smart phones, tablets, personal Digital Assistants (PDAs), and the like. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. The gaming system may include a variety of handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a blockchain network, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
In some implementations, the server 120 can include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the client devices 101, 102, 103, 104, 105, and/or 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and/or 106.
In some embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The database 130 may be of different types. In certain embodiments, the database used by the server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to the command.
In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key-value stores, object stores, or conventional stores supported by a file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with this disclosure.
In the related art, since the three-dimensional hairstyle data is generated from the two-dimensional image, since only the hairline of the surface (visible) area of the hairstyle area of the target object is displayed in the two-dimensional image, so that the generated three-dimensional hairstyle data includes only the data of the hairline of the surface (visible) area of the hairstyle area, the quality of the generated three-dimensional hairstyle data is poor, so that the three-dimensional hairstyle rendered based on the generated three-dimensional hairstyle data is less realistic.
According to an aspect of the present disclosure, a three-dimensional hairstyle generation method is provided. As shown in fig. 2, a three-dimensional hair style generation method 200 according to some embodiments of the present disclosure includes:
step S210: obtaining a plurality of first images about a first object, the first object including a hairstyle region containing a plurality of hairs, the plurality of first images corresponding to different respective perspectives;
step S220: obtaining surface three-dimensional hair data based on the plurality of first images, the surface three-dimensional hair data including information in three-dimensional space of each of a plurality of first hairs of the hairstyle region displayed in the plurality of first images;
step S230: obtaining, based on the surface three-dimensional hair data, a first hairstyle hidden vector comprising information in three-dimensional space of each of a plurality of second hair wires distinct from the plurality of first hair wires in the hairstyle region; and
step S240: obtaining first three-dimensional hair style data corresponding to the hair style region based on the first hair style hidden vector, wherein the first three-dimensional hair style data comprises hair data of each hair in the plurality of hair, and the hair data comprises coordinates of each node in the plurality of nodes on the hair.
By obtaining a plurality of first images corresponding to different perspectives with respect to a first object, and obtaining surface three-dimensional hair data including information in a three-dimensional space of each of a plurality of first hair strands displayed in the plurality of first images by a hair styling region, based on the plurality of first images, obtaining a first hair style hidden vector including information in the three-dimensional space of each of a plurality of second hair strands distinguished from the plurality of first hair strands in the hair styling region, based on the surface three-dimensional hair data, and obtaining three-dimensional hair styling data based on the first hair style hidden vector, since the first hair style hidden vector includes information in the three-dimensional space of each of the plurality of second hair strands distinguished from the plurality of first hair strands in the hair styling region, that is, information in the three-dimensional space of hair strands including an internal (invisible) region of the hair styling region, such that the first hair style data obtained based on the first hair style hidden vector includes not only surface (invisible) region of the hair styling region but also the three-dimensional hair styling data obtained based on the three-dimensional hair styling data, the first hair styling data obtained by enhancing the quality of the hair strands obtained by the surface (invisible) of the three-dimensional hair styling region, thereby enhancing the hair styling data obtained.
In some embodiments, the first object may be any three-dimensional object having a hairstyle area, such as a person or a head model. The hairstyle area is an area in a three-dimensional space and comprises a plurality of hairlines in the three-dimensional space.
In some embodiments, in step S210, images of the first object are acquired from a plurality of perspectives by a camera device to obtain the plurality of first images. Wherein the plurality of view angles may be any two or more view angles in relation to the pose of the image pickup device.
Referring to fig. 3, a schematic diagram of a plurality of first images relating to a first object is shown, wherein the plurality of first images includes an image 301, an image 302, an image 303, and an image 304, obtained in some embodiments according to the present disclosure.
In some embodiments, in step S220, the surface three-dimensional hair data is obtained by comparing information in three-dimensional space of each pixel in the hair style region in each of the plurality of first images and based on the information in three-dimensional space of each pixel in the hair style region in the first image.
For example, by obtaining a walking pattern of each of the plurality of first images, a position and a direction of each of the pixels in the hair style region in the first image in a three-dimensional space are obtained, and information of each of the plurality of hair strands in the hair style region in the first image in the three-dimensional space is obtained based on the position and the direction of each of the pixels in the hair style region in the first image in the three-dimensional space.
In some embodiments, as shown in fig. 4, the obtaining surface three-dimensional hair data based on the plurality of first images in step S220 includes:
step S410: performing a three-dimensional reconstruction based on the plurality of first images to obtain a three-dimensional surface model indicating information of the hairstyle region in three-dimensional space for each of a plurality of pixels displayed by each of the plurality of first images; and
step S420: and obtaining the surface three-dimensional hair data based on the three-dimensional surface model.
The three-dimensional reconstruction is carried out on the basis of the plurality of first images to obtain a three-dimensional surface model, and the three-dimensional surface hairline data is obtained on the basis of the three-dimensional surface model.
In some embodiments, a neural surface reconstruction (NeuS) method is employed for three-dimensional reconstruction based on the plurality of first images. A neural surface reconstruction (NeuS) method performs three-dimensional reconstruction based on a plurality of first images so that a three-dimensional surface model with high accuracy can be obtained also for a complex structure scene including a plurality of hairs in an issue region.
Referring to fig. 5, a schematic diagram of a three-dimensional surface model obtained by three-dimensional reconstruction based on a plurality of first images is shown, according to one embodiment of the present disclosure.
In some embodiments, obtaining the surface three-dimensional hair data based on the three-dimensional surface model comprises:
for each of the plurality of first images,
obtaining a line segment diagram and a camera pose corresponding to the first image, wherein the line segment diagram indicates a plurality of line segments of the hair style area on each of a plurality of hair threads displayed in the first image and direction information of each line segment in the plurality of line segments in the first image; and
and mapping the line segment graph corresponding to the first image onto the three-dimensional surface model based on the camera pose.
By obtaining a line segment diagram corresponding to each of the plurality of first images and by mapping the plurality of line segment diagrams corresponding to the plurality of first images and the plurality of viewing angles onto the three-dimensional surface model respectively, the obtained surface three-dimensional hair data obtained by mapping the line segment diagram onto the three-dimensional surface model is accurate because the obtained line segment diagram corresponding to each of the first images displays the plurality of line segments of the hair style region on each of the plurality of hairs displayed in the first image and the direction information of each of the plurality of line segments in the first image.
In some embodiments, after obtaining the segmented image of the hairstyle region by performing image segmentation on each of the plurality of first images, performing feature matching on the segmented image, estimating a camera pose of the corresponding first image, and obtaining a line segment map corresponding to the first image by using a line segment detector algorithm (LSD).
Referring to fig. 6, a schematic diagram of a plurality of segmented images of a hairstyle region obtained for the plurality of first images in fig. 3 is shown, where segmented images 601, 602, 603, and 604 correspond to images 301, 302, 303, and 304, respectively, in accordance with some embodiments of the present disclosure.
Referring to fig. 7, a schematic diagram of line segment graphs obtained for the plurality of first images in fig. 3 is shown, wherein line segment graphs 701, 702, 703, and 704 correspond to images 301, 302, 303, and 304, respectively, in some embodiments according to the present disclosure.
Referring to fig. 8, a schematic diagram of surface three-dimensional hair style data obtained in accordance with some embodiments of the present disclosure is shown. Wherein the position and orientation of each of the plurality of line segments on each of the plurality of hairs on the three-dimensional model in three-dimensional space is included.
In some embodiments, in step S230, the surface three-dimensional hair data is encoded by an encoder to obtain a first hair style hidden vector, wherein the encoder is obtained by composing a three-dimensional hair style generation model training with a plurality of three-dimensional hair style data training and decoders, wherein the plurality of three-dimensional hair style data correspond to a plurality of hair style regions of a plurality of objects, and each three-dimensional hair style data includes hair style data of each of a plurality of hair styles in the corresponding hair style region. In the training process, for each three-dimensional hair style data, inputting hair style data of a hair in a surface region of a plurality of hair in a corresponding hair style region into an encoder, obtaining a corresponding hair style hidden vector, and obtaining a prediction result by inputting the hair style hidden vector into a decoder, the prediction result including prediction data of each of the plurality of hair in the corresponding hair style region, and adjusting parameters of the encoder and the decoder based on the three-dimensional hair style data and the prediction result.
In some embodiments, as shown in fig. 9, the step S230 of obtaining a first hair-style hidden vector based on the surface three-dimensional hair data includes:
step S910: obtaining an initial hair style hidden vector corresponding to initial three-dimensional hair style data, the initial three-dimensional hair style data comprising coordinates in three-dimensional space of each of a plurality of nodes on each of a plurality of hair strands in a hair style region of a second object, the initial hair style hidden vector indicating information in three-dimensional space of each of the plurality of hair strands in the hair style region of the second object;
step S920: obtaining a difference between the initial three-dimensional hairstyle data and the surface three-dimensional hairline data; and
step S930: based on the difference, adjusting the initial hair style hidden vector to obtain the first hair style hidden vector.
The method comprises the steps of obtaining a first hair style hidden vector of a hair style region of a first object by adjusting an initial hair style hidden vector of a second object different from the first object, wherein information of each of a plurality of hair filaments of a hair style region of the second object (including the hair filaments located in a surface region and an internal region) is included in the initial hair style hidden vector, so that the information of each of the plurality of hair filaments located outside the surface region (the internal region) of the hair style region of the second object included in the initial hair style hidden vector can be extracted into the first hair style hidden vector in the process of adjusting the initial hair style hidden vector, the obtained first hair style hidden vector further comprises the information of each of the plurality of first hair filaments including the hair style region displayed in the plurality of first images (within the surface region), and the information of each of the plurality of first hair filaments not displayed in the plurality of first images (within the internal region), and the whole process only needs to adjust the initial hair style hidden vector, so that only a simple method of processing of the first hair style hidden vector is obtained.
In some embodiments, the obtaining of the difference between the initial three-dimensional hairstyle data and the surface three-dimensional hairline data of step S930 comprises:
for each first hair in the surface three-dimensional hair data, obtaining a sixth hair with the position closest to the position of the first hair in the initial three-dimensional hair style data and obtaining a first distance between the position of the first hair and the position of the sixth hair, for the sixth hair, obtaining a third hair with the position closest to the position of the sixth hair in the surface three-dimensional hair data and obtaining a second distance between the position of the sixth hair and the position of the third hair, and obtaining a position chamfer difference corresponding to the hair based on the first distance and the second distance; and
obtaining the difference based on a plurality of position chamfer differences corresponding to the first hairlines in the surface three-dimensional hairline data.
And adjusting the initial hair style hidden vector by obtaining the position chamfer difference to obtain a first hair style hidden vector, so that the obtained first hair style hidden vector accurately expresses the position information of the hair in the hair style area of the first object.
In some embodiments, the obtaining a difference between the initial three-dimensional hairstyle data and the surface three-dimensional hairline data at step S930 comprises:
for each first hair in the surface three-dimensional hair data, obtaining a fourth hair with the direction closest to the direction of the first hair in the initial three-dimensional hair style data and obtaining a first direction similarity between the direction of the first hair and the fourth hair, for the fourth hair, obtaining a fifth hair with the direction closest to the direction of the fourth hair in the surface three-dimensional hair data and obtaining a second direction similarity between the fourth hair and the fifth hair, and obtaining a direction chamfer difference corresponding to the hair based on the first direction similarity and the second direction similarity; and
obtaining the difference based on a plurality of direction chamfer differences corresponding to the first hairs in the surface three-dimensional hair data.
And adjusting the initial hairstyle hidden vector by obtaining the position chamfer difference to obtain a first hairstyle hidden vector, so that the obtained first hairstyle hidden vector can accurately express the direction information of the hair in the hairstyle area of the first object.
In some embodiments, a sum of the plurality of directional chamfering differences and the plurality of positional chamfering differences corresponding to the plurality of first hairlines as a difference for adjusting the initial three-dimensional hairstyle data according thereto.
In some embodiments, in step S940, obtaining, based on the first hair style hidden vector, first three-dimensional hair style data corresponding to the hair style region includes:
decoding the first hairstyle hidden vector by using a decoder to obtain the first three-dimensional hairstyle data, wherein the decoder is obtained by training by using the initial three-dimensional hairstyle data and the initial hairstyle hidden vector.
The decoder is obtained by training the initial three-dimensional hair style data and the initial hair style hidden vector, and decodes the first hair style hidden vector to obtain the first three-dimensional hair style data.
In some embodiments, the decoder further performs training to obtain a plurality of other three-dimensional hair style data and a plurality of corresponding hair style hidden vectors, which are different from the first three-dimensional hair style data, so that the data include a large amount of hair style information, thereby improving the quality of hair data of hair in an inner area of a hair style area in the first three-dimensional hair style data obtained after the decoder decodes the first hair style hidden vector, and improving the quality of the obtained three-dimensional hair style data.
In some embodiments, after the first three-dimensional hair style data is obtained, avatar rendering is performed based on the first three-dimensional hair style data to obtain an avatar.
Referring to fig. 10, a schematic diagram of an avatar obtained after rendering first three-dimensional hair style data obtained according to some embodiments of the present disclosure is shown, which can be seen to have a realistic effect.
According to another aspect of the present disclosure, there is also provided a three-dimensional hair styling apparatus, referring to fig. 11, the apparatus 1100 comprising: an image obtaining unit 1110 configured to obtain a plurality of first images regarding a first object, the first object including a hairstyle region including a plurality of hairs, the plurality of first images corresponding to different viewing angles, respectively; a surface three-dimensional hair data obtaining unit 1120 configured to obtain surface three-dimensional hair data including information in a three-dimensional space of each of a plurality of first hairs of the hairstyle area displayed in the plurality of first images, based on the plurality of first images; a hair style hidden vector obtaining unit 1130 configured to obtain a first hair style hidden vector based on the surface three-dimensional hair data, the first hair style hidden vector including information in a three-dimensional space of each of a plurality of second hair wires different from the plurality of first hair wires in the hair style region; and a three-dimensional hair style data obtaining unit 1140, configured to obtain first three-dimensional hair style data corresponding to the hair style region based on the first hair style hidden vector, where the first three-dimensional hair style data includes hair style data for each of the plurality of hair styles, and the hair style data includes coordinates of each of a plurality of nodes on the hair style.
In some embodiments, the surface three-dimensional hair data acquisition unit comprises: a three-dimensional surface model obtaining unit configured to perform three-dimensional reconstruction based on the plurality of first images to obtain a three-dimensional surface model indicating information of the hair style region in a three-dimensional space for each of a plurality of pixels displayed by each of the plurality of first images; and a surface three-dimensional hair data obtaining subunit configured to obtain the surface three-dimensional hair data based on the three-dimensional surface model.
In some embodiments, the surface three-dimensional hair data acquisition subunit includes: a first obtaining subunit, configured to obtain, for each of the plurality of first images, a line segment map and a camera pose corresponding to the first image, where the line segment map indicates a plurality of line segments of the hairstyle area on each of a plurality of hairlines displayed in the first image and direction information of each of the plurality of line segments in the first image; and a second acquisition subunit, configured to, for each of the plurality of first images, map a line segment map corresponding to the first image onto the three-dimensional surface model based on the camera pose.
In some embodiments, the hair style hidden vector obtaining unit comprises: an initial hair style hidden vector obtaining unit configured to obtain an initial hair style hidden vector corresponding to initial three-dimensional hair style data, the initial three-dimensional hair style data including coordinates, in a three-dimensional space, of each of a plurality of nodes on each of a plurality of hair threads in a hair style area of a second object, the initial hair style hidden vector indicating information, in the three-dimensional space, of each of the plurality of hair threads in the hair style area of the second object; a difference obtaining unit configured to obtain a difference between the initial three-dimensional hairstyle data and the surface three-dimensional hairline data; and an adjusting unit configured to adjust the initial hair style hidden vector based on the difference to obtain the first hair style hidden vector.
In some embodiments, the difference acquiring unit includes: a position chamfer difference obtaining unit configured to obtain, for each first hair in the surface three-dimensional hair data, a sixth hair having a position in the initial three-dimensional hair style data closest to the position of the first hair and obtain a first distance between the position of the first hair and the position of the sixth hair, obtain, for the sixth hair, a third hair having a position in the surface three-dimensional hair data closest to the position of the sixth hair and obtain a second distance between the position of the sixth hair and the position of the third hair, and obtain a position chamfer difference corresponding to the hair based on the first distance and the second distance; and a first difference obtaining subunit configured to obtain the difference based on a plurality of position chamfer differences corresponding to the plurality of first hairs in the surface three-dimensional hair data.
In some embodiments, said obtaining a difference between said initial three-dimensional hairstyle data and said surface three-dimensional hairline data comprises: a position chamfer difference acquisition unit configured to obtain, for each first hair in the surface three-dimensional hair data, a fourth hair having a direction closest to a direction of the first hair in the initial three-dimensional hair style data and a first direction similarity between the direction of the first hair and the fourth hair, obtain, for the fourth hair, a fifth hair having a direction closest to the direction of the fourth hair in the surface three-dimensional hair data and a second direction similarity between the fourth hair and the fifth hair, and obtain a direction chamfer difference corresponding to the hair based on the first direction similarity and the second direction similarity; a first difference obtaining subunit configured to obtain the difference based on a plurality of direction chamfer differences corresponding to the plurality of first hairs in the surface three-dimensional hair data.
In some embodiments, the obtaining, based on the first hair style hidden vector, first three-dimensional hair style data corresponding to the hair style region includes: decoding the first hairstyle hidden vector by using a decoder to obtain the first three-dimensional hairstyle data, wherein the decoder is obtained by training by using the initial three-dimensional hairstyle data and the initial hairstyle hidden vector.
In some embodiments, the decoder is further trained to use other plurality of three-dimensional hair style data and corresponding plurality of hair style hidden vectors that are different from the first three-dimensional hair style data.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
According to an embodiment of the present disclosure, there is also provided an electronic device, a readable storage medium, and a computer program product.
Referring to fig. 12, a block diagram of a structure of an electronic device 1200, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 12, the electronic apparatus 1200 includes a computing unit 1201, which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM) 1202 or a computer program loaded from a storage unit 1208 into a Random Access Memory (RAM) 1203. In the RAM 1203, various programs and data necessary for the operation of the electronic apparatus 1200 may also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other by a bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
Various components in the electronic device 1200 are connected to the I/O interface 1205, including: an input unit 1206, an output unit 1207, a storage unit 1208, and a communication unit 1209. The input unit 1206 may be any type of device capable of inputting information to the electronic device 1200, and the input unit 1206 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote control. Output unit 1207 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, a video/audio output terminal, a vibrator, and/or a printer. Storage unit 1208 may include, but is not limited to, magnetic or optical disks. The communication unit 1209 allows the electronic device 1200 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 1201 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 1201 performs the various methods and processes described above, such as the method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1208. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 1200 via the ROM 1202 and/or the communication unit 1209. One or more steps of the method 200 described above may be performed when the computer program is loaded into the RAM 1203 and executed by the computing unit 1201. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform the method 200 in any other suitable manner (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server combining a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely exemplary embodiments or examples and that the scope of the present invention is not limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced with equivalent elements that appear after the present disclosure.

Claims (17)

1. A method of generating a three-dimensional hair style, comprising:
obtaining a plurality of first images about a first object, the first object comprising a hairstyle region including a plurality of hairs, the plurality of first images corresponding to different respective perspectives;
obtaining, based on the plurality of first images, surface three-dimensional hair data including information in three-dimensional space of each of a plurality of first hairs of the hairstyle area displayed in the plurality of first images;
obtaining, based on the surface three-dimensional hair data, a first hair style hidden vector comprising information in three-dimensional space of each of a plurality of second hair filaments in the hair style region that are distinct from the plurality of first hair filaments, the obtaining, based on the surface three-dimensional hair data, a first hair style hidden vector comprising:
obtaining an initial hair style hidden vector corresponding to initial three-dimensional hair style data, the initial three-dimensional hair style data comprising coordinates in three-dimensional space of each of a plurality of nodes on each of a plurality of hairs in a hair style region of a second object, the second object being distinct from the first object and the plurality of hairs in the hair style region of the second object comprising hairs located in surface and interior regions, the initial hair style hidden vector indicating information in three-dimensional space of each of the plurality of hairs in the hair style region of the second object;
obtaining a difference between the initial three-dimensional hairstyle data and the surface three-dimensional hairline data; and
based on the difference, adjusting the initial hair style hidden vector to obtain the first hair style hidden vector, the first hair style hidden vector comprising information of each of a plurality of first hair strands displayed in the plurality of first images in the hair style region and information of each of a plurality of second hair strands not displayed in the plurality of first images in the hair style region; and
obtaining first three-dimensional hair style data corresponding to the hair style region based on the first hair style hidden vector, wherein the first three-dimensional hair style data comprises hair data of each hair in the plurality of hair, and the hair data comprises coordinates of each node in the plurality of nodes on the hair.
2. The method of claim 1, wherein the obtaining surface three-dimensional hair data based on the plurality of first images comprises:
performing a three-dimensional reconstruction based on the plurality of first images to obtain a three-dimensional surface model indicating information of the hairstyle region in three-dimensional space for each of a plurality of pixels displayed by each of the plurality of first images; and
and obtaining the surface three-dimensional hair data based on the three-dimensional surface model.
3. The method of claim 2, wherein said obtaining said surface three-dimensional hair data based on said three-dimensional surface model comprises:
for each of the plurality of first images,
obtaining a line segment diagram and a camera pose corresponding to the first image, wherein the line segment diagram indicates a plurality of line segments of the hair style area on each of a plurality of hair threads displayed in the first image and direction information of each line segment in the plurality of line segments in the first image; and
and mapping the line segment graph corresponding to the first image onto the three-dimensional surface model based on the camera pose.
4. The method according to claim 1, wherein said obtaining a difference between said initial three-dimensional hairstyle data and said surface three-dimensional hairline data comprises:
for each first hair in the surface three-dimensional hair data,
obtaining a sixth hair thread having a position closest to the position of the first hair thread in the initial three-dimensional hairstyle data, and obtaining a first distance between the position of the first hair thread and the position of the sixth hair thread,
for the sixth hair, obtaining a third hair whose position in the surface three-dimensional hair data is closest to the position of the sixth hair, and obtaining a second distance between the position of the sixth hair and the position of the third hair, an
Obtaining a position chamfer difference corresponding to the hair based on the first distance and the second distance; and
obtaining the difference based on a plurality of position chamfer differences corresponding to the first hairlines in the surface three-dimensional hairline data.
5. The method according to claim 1, wherein said obtaining a difference between said initial three-dimensional hairstyle data and said surface three-dimensional hairline data comprises:
for each first hair in the surface three-dimensional hair data,
obtaining a fourth hair in the initial three-dimensional hairstyle data, wherein the direction of the fourth hair is closest to the direction of the first hair, and obtaining a first direction similarity between the direction of the first hair and the fourth hair,
for the fourth hair, obtaining a fifth hair with the direction closest to the direction of the fourth hair in the surface three-dimensional hair data, and obtaining a second direction similarity between the fourth hair and the fifth hair, an
Obtaining a direction chamfer difference corresponding to the hairline based on the first direction similarity and the second direction similarity; and
obtaining the difference based on a plurality of direction chamfer differences corresponding to the first hairs in the surface three-dimensional hair data.
6. The method according to claim 1, wherein the obtaining first three-dimensional hair style data corresponding to the hair style region based on the first hair style hidden vector comprises:
decoding the first hairstyle hidden vector by using a decoder to obtain the first three-dimensional hairstyle data, wherein the decoder is obtained by training by using the initial three-dimensional hairstyle data and the initial hairstyle hidden vector.
7. The method according to claim 6, wherein the decoder is further trained using a plurality of other three-dimensional hair style data distinct from the first three-dimensional hair style data and a corresponding plurality of hair style hidden vectors.
8. The method of any of claims 1-7, further comprising:
and rendering an avatar based on the first three-dimensional hair style data to obtain the avatar.
9. A three-dimensional hair styling apparatus comprising:
an image acquisition unit configured to obtain a plurality of first images regarding a first object including a hairstyle area including a plurality of hairs, the plurality of first images respectively corresponding to different perspectives;
a surface three-dimensional hair data obtaining unit configured to obtain surface three-dimensional hair data including information in a three-dimensional space of each of a plurality of first hairs of the hairstyle region displayed in the plurality of first images, based on the plurality of first images;
a hair style hidden vector obtaining unit configured to obtain a first hair style hidden vector based on the surface three-dimensional hair data, the first hair style hidden vector including information in a three-dimensional space of each of a plurality of second hair wires different from the plurality of first hair wires in the hair style region, the hair style hidden vector obtaining unit including:
an initial hair style hidden vector obtaining unit configured to obtain an initial hair style hidden vector corresponding to initial three-dimensional hair style data, the initial three-dimensional hair style data including coordinates of each node of a plurality of nodes on each of a plurality of hair in a hair style area of a second object in three-dimensional space, the second object being different from the first object and the plurality of hair in the hair style area of the second object including hair located in a surface and an inner area, the initial hair style hidden vector indicating information of each of the plurality of hair in the hair style area of the second object in three-dimensional space;
a difference obtaining unit configured to obtain a difference between the initial three-dimensional hairstyle data and the surface three-dimensional hairline data; and
an adjusting unit configured to adjust the initial hair style hiding vector based on the difference to obtain the first hair style hiding vector, the first hair style hiding vector including information of each of a plurality of first hair wires displayed in the plurality of first images in the hair style area and information of each of a plurality of second hair wires not displayed in the plurality of first images in the hair style area; and
a three-dimensional hairstyle data obtaining unit configured to obtain first three-dimensional hairstyle data corresponding to the hairstyle region based on the first hairstyle hidden vector, where the first three-dimensional hairstyle data includes hairline data of each of the plurality of hairlines, and the hairline data includes coordinates of each of a plurality of nodes on the hairline.
10. The apparatus according to claim 9, wherein the surface three-dimensional hair data acquisition unit comprises:
a three-dimensional surface model obtaining unit configured to perform three-dimensional reconstruction based on the plurality of first images to obtain a three-dimensional surface model indicating information of the hair style region in a three-dimensional space for each of a plurality of pixels displayed by each of the plurality of first images; and
a surface three-dimensional hair data obtaining subunit configured to obtain the surface three-dimensional hair data based on the three-dimensional surface model.
11. The apparatus according to claim 10, wherein the surface three-dimensional hair data acquisition subunit comprises:
a first obtaining subunit, configured to obtain, for each of the plurality of first images, a line segment map and a camera pose corresponding to the first image, where the line segment map indicates a plurality of line segments of the hairstyle area on each of a plurality of hairlines displayed in the first image and direction information of each of the plurality of line segments in the first image; and
and the second acquisition subunit is configured to map, for each of the plurality of first images, the line segment graph corresponding to the first image onto the three-dimensional surface model based on the camera pose.
12. The apparatus of claim 9, wherein the difference acquisition unit comprises:
a positional chamfer difference acquisition unit configured to acquire, for each first hair in the surface three-dimensional hair data,
obtaining a sixth hair thread having a position closest to the position of the first hair thread in the initial three-dimensional hairstyle data, and obtaining a first distance between the position of the first hair thread and the position of the sixth hair thread,
for the sixth hair, obtaining a third hair whose position in the surface three-dimensional hair data is closest to the position of the sixth hair, and obtaining a second distance between the position of the sixth hair and the position of the third hair, an
Obtaining a position chamfer difference corresponding to the hair based on the first distance and the second distance; and
a first difference obtaining subunit configured to obtain the difference based on a plurality of position chamfer differences corresponding to the plurality of first hairs in the surface three-dimensional hair data.
13. The apparatus according to claim 9, wherein said obtaining a difference between said initial three-dimensional hairstyle data and said surface three-dimensional hairline data comprises:
a position chamfer difference acquisition unit configured for each first hair in the surface three-dimensional hair data,
obtaining a fourth hair in the initial three-dimensional hairstyle data, wherein the direction of the fourth hair is closest to the direction of the first hair, and obtaining a first direction similarity between the direction of the first hair and the fourth hair,
for the fourth hairline, obtaining a fifth hairline with the direction closest to the direction of the fourth hairline in the surface three-dimensional hairline data, and obtaining a second direction similarity between the fourth hairline and the fifth hairline, an
Obtaining a direction chamfer difference corresponding to the hairline based on the first direction similarity and the second direction similarity;
a first difference obtaining subunit configured to obtain the difference based on a plurality of direction chamfer differences corresponding to the plurality of first hairs in the surface three-dimensional hair data.
14. The apparatus according to claim 9, wherein the obtaining of the first three-dimensional hair style data corresponding to the hair style region based on the first hair style hidden vector comprises:
decoding the first hairstyle hidden vector by using a decoder to obtain the first three-dimensional hairstyle data, wherein the decoder is obtained by training by using the initial three-dimensional hairstyle data and the initial hairstyle hidden vector.
15. The apparatus according to claim 14, wherein the decoder is further trained using a plurality of other three-dimensional hair style data distinct from the first three-dimensional hair style data and a corresponding plurality of hair style hidden vectors.
16. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
17. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202211680773.XA 2022-12-27 2022-12-27 Three-dimensional hair style generation method and device, electronic equipment and storage medium Active CN115661375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211680773.XA CN115661375B (en) 2022-12-27 2022-12-27 Three-dimensional hair style generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211680773.XA CN115661375B (en) 2022-12-27 2022-12-27 Three-dimensional hair style generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115661375A CN115661375A (en) 2023-01-31
CN115661375B true CN115661375B (en) 2023-04-07

Family

ID=85022179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211680773.XA Active CN115661375B (en) 2022-12-27 2022-12-27 Three-dimensional hair style generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115661375B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116580212B (en) * 2023-05-16 2024-02-06 北京百度网讯科技有限公司 Image generation method, training method, device and equipment of image generation model

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102800129B (en) * 2012-06-20 2015-09-30 浙江大学 A kind of scalp electroacupuncture based on single image and portrait edit methods
CN104376597B (en) * 2014-12-05 2017-03-29 北京航空航天大学 A kind of hair method for reconstructing based on multi-direction constraint
CN105405163B (en) * 2015-12-28 2017-12-15 北京航空航天大学 A kind of static scalp electroacupuncture method true to nature based on multi-direction field
US11030786B1 (en) * 2019-08-05 2021-06-08 Snap Inc. Hair styles system for rendering hair strands based on hair spline data
CN112541963B (en) * 2020-11-09 2023-12-26 北京百度网讯科技有限公司 Three-dimensional avatar generation method, three-dimensional avatar generation device, electronic equipment and storage medium
CN112862807B (en) * 2021-03-08 2024-06-25 网易(杭州)网络有限公司 Hair image-based data processing method and device
CN115409922B (en) * 2022-08-30 2023-08-29 北京百度网讯科技有限公司 Three-dimensional hairstyle generation method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115661375A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CN113313650B (en) Image quality enhancement method, device, equipment and medium
CN115409922B (en) Three-dimensional hairstyle generation method, device, electronic equipment and storage medium
CN117274491B (en) Training method, device, equipment and medium for three-dimensional reconstruction model
CN114972958B (en) Key point detection method, neural network training method, device and equipment
CN115482325B (en) Picture rendering method, device, system, equipment and medium
CN114723949A (en) Three-dimensional scene segmentation method and method for training segmentation model
CN116030185A (en) Three-dimensional hairline generating method and model training method
CN114119935B (en) Image processing method and device
CN115661375B (en) Three-dimensional hair style generation method and device, electronic equipment and storage medium
CN115170819A (en) Target identification method and device, electronic equipment and medium
CN116245998B (en) Rendering map generation method and device, and model training method and device
CN115761855B (en) Face key point information generation, neural network training and three-dimensional face reconstruction method
CN114120412B (en) Image processing method and device
CN114120448B (en) Image processing method and device
CN115393514A (en) Training method of three-dimensional reconstruction model, three-dimensional reconstruction method, device and equipment
CN114119154A (en) Virtual makeup method and device
CN114049472A (en) Three-dimensional model adjustment method, device, electronic apparatus, and medium
CN115423827B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115345981B (en) Image processing method, image processing device, electronic equipment and storage medium
CN116385641B (en) Image processing method and device, electronic equipment and storage medium
CN117218499B (en) Training method of facial expression capturing model, facial expression driving method and device
CN115937430B (en) Method, device, equipment and medium for displaying virtual object
CN115359194B (en) Image processing method, image processing device, electronic equipment and storage medium
CN117422831B (en) Three-dimensional eyebrow shape generating method and device, electronic equipment and storage medium
CN115953512A (en) Expression generation method, neural network training method, device, equipment and medium

Legal Events

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