Virtual image generation method and device, terminal device, and computer readable medium
By processing the input vector to generate a texture map through a pre-trained virtual image generation model and combining it with the human body model, it solves the problem of non-universal virtual image generation in the existing technology and achieves efficient generation of full-body virtual images.
Patent Information
- Application Number
- CN202210574992.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-25
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-05-25
AI Technical Summary
Existing avatar generation technology mainly focuses on the generation of faces or heads, which lacks universality and requires the use of pre-built facial models or avatars with multiple attributes. The generation steps are lengthy and inefficient.
By pre-training the avatar generation model, the input vectors are obtained for processing to generate texture maps, rasterized with the preset human body model, and finally rendered to generate a complete full-body avatar, which simplifies the generation process.
It realizes the generation of a virtual image including the whole body and clothing, simplifying the process and improving efficiency. There is no need to build a three-dimensional human body model or a virtual image with multiple attributes in advance, which reduces the consumption of computing and storage resources.
Smart Images

Figure CN114863002B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of image processing, and in particular to a virtual image generation method, a virtual image generation device, a computer-readable medium, and a terminal device. Background Art
[0002] With the rapid development of artificial intelligence technology, virtual images are widely used in live broadcasting, games, instant messaging and other scenarios. However, existing technical solutions generally generate virtual images based on the human head or face; or, in some technical solutions, a pre-built facial model and a virtual image reference model are required when generating virtual images, so they are not universal.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] The present disclosure provides a virtual image generation method, a virtual image generation device, a computer-readable medium and a terminal device, which can generate a complete virtual image.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0006] According to a first aspect of the present disclosure, there is provided a method for generating a virtual image, comprising:
[0007] Obtaining a first vector, using the first vector as an input parameter of a virtual image generation model, and processing the first vector to obtain a corresponding second feature vector;
[0008] Processing the second feature vector to obtain a texture map;
[0009] Performing rasterization processing on the texture map and the preset human body model to obtain an initial virtual image;
[0010] The initial virtual image is rendered to obtain a corresponding color virtual image.
[0011] According to a second aspect of the present disclosure, there is provided a virtual image generating device, comprising:
[0012] A vector processing module, used to obtain a first vector, use the first vector as an input parameter of a virtual image generation model, and process the first vector to obtain a corresponding second feature vector;
[0013] A texture map generation module, used for processing the second feature vector to obtain a texture map;
[0014] A rasterization processing module, used for performing rasterization processing on the texture map and the preset human body model to obtain a plurality of initial virtual images with different viewing angles;
[0015] The target virtual image generation module is used to render the initial virtual image to obtain a corresponding color virtual image as an output parameter of the virtual image generation module.
[0016] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned virtual image generation method is implemented.
[0017] According to a fourth aspect of the present disclosure, a terminal device is provided, including:
[0018] Processor; and
[0019] A memory, configured to store executable instructions of the processor;
[0020] Wherein, the processor is configured to implement the above-mentioned network standard switching method by executing the executable instructions.
[0021] An embodiment of the present disclosure provides a method for generating a virtual image. By pre-training a virtual image generation model, the first vector is obtained as an input parameter of the virtual image generation model, the first vector is first processed to obtain a corresponding second feature vector of a higher dimension, and then a corresponding texture map is generated for the second feature vector; the texture map and a preset human body model are then processed to obtain an initial virtual image, and the initial virtual image is rendered to obtain a color virtual image, thereby generating a complete virtual image including the whole body and clothing. The method for generating a virtual image is simplified.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0024] Figure 1A schematic diagram schematically illustrates a method for generating a virtual image in an exemplary embodiment of the present disclosure;
[0025] Figure 2 A schematic diagram schematically illustrates a method for obtaining a texture map according to an exemplary embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram schematically illustrates a rasterization processing method according to an exemplary embodiment of the present disclosure;
[0027] Figure 4 A schematic diagram schematically illustrates a method for training a virtual image generation model according to an exemplary embodiment of the present disclosure;
[0028] Figure 5 A schematic diagram schematically shows the composition of a virtual image generating device in an exemplary embodiment of the present disclosure;
[0029] Figure 6 The figure schematically shows a composition diagram of a terminal device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0031] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0032] In the related technologies, most of the existing virtual image generation technologies are only aimed at the virtual image generation of local areas of the human body such as the face or head; and some virtual image generation technologies also require the use of pre-built facial models and virtual image reference models, so they are not universal; and some virtual image generation schemes require the use of multiple virtual images with different attributes, and the generation steps are relatively lengthy and inefficient.
[0033] In view of the above-mentioned shortcomings and deficiencies of the prior art, this exemplary embodiment provides a method for generating a virtual image, which can generate a full-body virtual image of a human body. Figure 1 As shown in , the above-mentioned virtual image generation method may include:
[0034] Step S11, obtaining a first vector, taking the first vector as an input parameter of a virtual image generation model, and processing the first vector to obtain a corresponding second feature vector;
[0035] Step S12, using a texture generation module to process the second feature vector to obtain a texture map;
[0036] Step S13, performing rasterization processing on the texture map and the preset human body model to obtain an initial virtual image;
[0037] Step S14, rendering the initial virtual image to obtain a corresponding color virtual image as an output parameter of the virtual image generation module;
[0038] The virtual image generation method provided in this exemplary embodiment trains the virtual image generation model in advance, uses the obtained first vector as the input parameter of the virtual image generation model, first processes the first vector to obtain the corresponding second feature vector, and then generates the corresponding texture map for the second feature vector; then processes the texture map and the preset human body model to obtain the initial virtual image, and renders the initial virtual image to obtain a color virtual image, thereby generating a complete virtual image including the whole body and clothing. And the virtual image generation method is simplified.
[0039] Below, each step of the method for generating a virtual image in this example implementation will be described in more detail with reference to the accompanying drawings and embodiments.
[0040] In this example implementation, the above method can be applied to smart mobile terminal devices such as mobile phones, tablet computers, smart watches, smart bracelets, etc.; or, it can also be applied to desktop computers, laptop computers or servers.
[0041] In step S11, a first vector is obtained, the first vector is used as an input parameter of a virtual image generation model, and the first vector is processed to obtain a corresponding second feature vector.
[0042] In this example implementation, the first vector mentioned above may be a low-dimensional vector input by the user, and the low-dimensional vector may be randomly generated, or a low-dimensional vector used to describe the characteristics of an existing non-full-body virtual image. Specifically, the above-mentioned step S11 may include: inputting the first vector into the input layer of the multi-layer neural network, and performing convolution processing in sequence using the input layer, hidden layer and output layer of the multi-layer neural network to obtain a second feature vector after dimensionality increase. For example, a vector processing module based on a multi-layer neural network may be used to perform dimensionality increase operation on the first vector to obtain a second feature vector of a higher dimension; a multi-layer neural network may generally include an input layer, a hidden layer and an output layer. For example, the above-mentioned first vector may be a 64-dimensional feature vector, and the second feature vector may be a 128-dimensional feature vector.
[0043] In step S12, the second feature vector is processed to obtain a texture map.
[0044] In this example implementation, a texture generation module of a trained texture generation model based on Style GAN can be used to calculate the texture map. Figure 2 As shown, the above step S12 may include:
[0045] Step S121, obtaining target tensor parameters;
[0046] Step S122, using an adaptive instance normalization module to normalize the target tensor parameter and the second feature vector to obtain intermediate parameters;
[0047] Step S123, performing convolution processing on the intermediate parameters to obtain the texture map.
[0048] Specifically, the texture generation model can first initialize and generate a high-order tensor and superimpose noise, then the tensor and the above-mentioned second eigenvector enter the adaptive instance normalization module (AdaIN), and its output result is convolved; repeat the above steps several times, and finally output the texture map.
[0049] In step S13, the texture map and the preset human body model are subjected to rasterization processing to obtain an initial virtual image;
[0050] In this example implementation, the preset human body model is a SMPL-X parameterized human body model. Figure 3 As shown, the above step S13 may include:
[0051] Step S131, converting the preset human body model from the world coordinate system to the camera coordinate system;
[0052] Step S132, using perspective transformation to transform the preset human body model from the camera coordinate system to the image coordinate system to obtain the projection coordinates of each three-dimensional point;
[0053] Step S133, loading the texture map into the preset human body model according to the projection coordinates to obtain the initial virtual image.
[0054] For example, a rasterization processing model may be used to perform rasterization processing. After the rasterization processing, at least one initial virtual image may be generated. In addition, when a plurality of initial virtual images are generated using the rasterization model, different viewing angles may be configured between the initial virtual images.
[0055] In step S14, the initial virtual image is rendered to obtain a corresponding color virtual image as an output parameter of the virtual image generation module.
[0056] In this example implementation, the trained neural rendering model is used to calculate the color value of the initial virtual image, so as to perform color rendering on the initial virtual image according to the color value calculation result. For example, when only an initial virtual image of a single perspective is generated in the above steps, the initial virtual image is rendered to obtain a color virtual image of a single perspective. Alternatively, when the above steps generate initial virtual images of multiple different perspectives, the neural rendering model can be used to render the initial virtual images of different perspectives respectively to obtain color virtual images of multiple different perspectives. At this time, a color virtual image of one perspective can be selected for output according to a preset rule; alternatively, the color virtual images of multiple perspectives can be subjected to image fusion processing to output a three-dimensional model of a fused full-body color virtual image.
[0057] In this example implementation, the above method may include pre-training the virtual image generation model based on the GAN network, referring to Figure 4 As shown, it may include:
[0058] Step S201, in the generator, the sample data is processed to obtain a corresponding sample feature vector; the sample feature vector is processed to obtain a sample texture map; the sample texture map and a preset human body model are rasterized to obtain an initial virtual image sample; the initial virtual image sample is rendered to obtain a color virtual image sample;
[0059] Step S202: input the virtual image sample into a discriminator to obtain a discrimination result of the virtual image sample, and perform back-propagation training on the virtual image generation model based on the discrimination result to obtain the virtual image generation model based on the GAN network.
[0060] Specifically, the virtual image generation model based on the GAN network may include a generator and a discriminator; wherein the generator may be used to generate a virtual image of the entire human body according to an input feature vector; the generator may include a vector processing module, a texture generation module, a rasterization processing module, and a rendering module. The discriminator may be used to determine whether the color virtual image generated by the generator is real; and the virtual image generation model is iteratively trained using a back propagation algorithm.
[0061] A sample data set may be constructed first. For example, on the user side or the server side, a specified type of image may be screened as sample data in response to the user's demand for a virtual image generation model or a virtual image. For example, when it is necessary to generate a virtual image of a female character, full-body images of female characters may be screened as samples, such as images in comic style, oil painting style, ordinary real images, etc. as samples. Alternatively, when it is necessary to generate a virtual image of a male character, full-body images of male characters may be screened as samples. Alternatively, in some exemplary embodiments, one or more types of images may be selected as sample data. For example, a sample image may be an image of size 60*500=30k, represented by a 64-dimensional vector.
[0062] The above-mentioned vector processing module can be a module based on an MLP (Multilayer Perceptron) network, which can be used to increase the dimension of a vector. For example, the input of the MLP network can be a 64-dimensional vector z corresponding to a sample image, and the output is a high-dimensional feature vector w, such as a 128-dimensional feature vector w, as the above-mentioned sample feature vector. The MLP network is used to upsample the input vector z, which can actually be the multiplication of multiple high-order matrices. For example, the calculation formula may include: w=ABCz; wherein w is a high-dimensional feature vector, z is a low-dimensional vector, and A, B, and C are different high-order matrices.
[0063] The texture generation module can be trained based on the Style v2 GAN network. The feature vector z output by the MLP network can be used as an input parameter of the Style v2 GAN network; the output of the Style v2GAN network is a texture map.
[0064] Specifically, in the texture generation module, a high-order tensor of a target dimension can be initialized and noise can be superimposed, for example, a 4*4*512-dimensional tensor can be generated. The feature vector w output by the above MLP and the high-order tensor after superimposing noise are input into the adaptive instance normalization module (AdaIN), and the output result is convolved; the above process is repeated to a preset number of times, and a texture map is output as a sample texture map. For example, the number of iterations of the above process can be configured to be 2 times, or other numbers.
[0065] The input parameters of the above-mentioned rasterization processing module include the sample texture map obtained in the above steps and the SMPL-X parameterized human body model, and the output parameter can be a human body image loaded with a texture map; or, it can also be two, three, four, or other numbers of human body images loaded with texture maps with different perspectives as the initial virtual image samples. Specifically, the rasterization process may include: converting the preset human body model from the world coordinate system to the camera coordinate system; using perspective transformation to convert the preset human body model from the camera coordinate system to the image coordinate system to obtain the projection coordinates of each three-dimensional point; loading the texture map into the preset human body model according to the projection coordinates to obtain the initial virtual image.
[0066] The above-mentioned rendering module can be a neural renderer. The initial virtual image samples of multiple different perspectives obtained after the above-mentioned rasterization processing can be input into the neural renderer, and the initial color value is obtained through the forward operation of the neural rendering model; the model parameters are adjusted by back propagation; the neural renderer model outputs the correct color value, and finally outputs the corresponding color virtual image samples under each perspective as the output parameters of the generator.
[0067] The color virtual image samples with various viewing angles output by the generator are input into the discriminator to judge whether the input image is true or false. If the discriminator outputs false, the back propagation technology of the neural network is used to optimize the network parameters of the neural renderer and iterative training is performed; if the judgment is true, the input human color image is retained to generate a virtual image of the whole body. This realizes the training of the virtual image generation model.
[0068] The virtual image generation method provided in the embodiment of the present disclosure proposes a full-body virtual human image generation method based on a GAN network, which combines the GAN network and the neural renderer to generate a full-body virtual image of the human body. By using the SMPL-X parameterized human body model, a full-body virtual image of the human body including the face, head and clothing can be generated, which is fuller and more realistic than the existing partial virtual images of the human body. The virtual image can be dressed efficiently and accurately using the renderer. In addition, the pipeline method of this scheme is simpler and more efficient, and a full-body virtual image of the human body can be efficiently generated after one training; at the same time, there is no need to construct a three-dimensional human body model in advance or to construct multiple virtual images of various attributes, and there is no need to explicitly reconstruct the three-dimensional mesh of the human body, which reduces the consumption of computing and storage resources and generates a corresponding full-body virtual image of the human body.
[0069] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0070] For further reference, Figure 5 As shown, in the embodiment of this example, a virtual image generation device 50 is also provided, and the device includes: a vector processing module 501, a texture map generation module 502, a rasterization processing module 503 and a target virtual image generation module 504.
[0071] The vector processing module 501 can be used to obtain a first vector, use the first vector as an input parameter of a virtual image generation model, and use the vector processing module to process the first vector to obtain a corresponding second feature vector.
[0072] The texture map generation module 502 may be configured to process the second feature vector using a texture generation module to obtain a texture map.
[0073] The rasterization processing module 503 can be used to process the texture map and the preset human body model using a rasterization processing model to obtain a plurality of initial virtual images with different viewing angles.
[0074] The target virtual image generation module 504 may be used to render the initial virtual image to obtain a corresponding color virtual image as an output parameter of the virtual image generation module.
[0075] In some exemplary embodiments, the vector processing module is a multi-layer neural network; the vector processing module 501 can be used to input the first vector into the input layer of the multi-layer neural network, and use the input layer, hidden layer and output layer of the multi-layer neural network to perform convolution processing in sequence to obtain a second eigenvector after dimensionality increase.
[0076] In some exemplary embodiments, the texture generation module is a trained texture generation model based on Style GAN; the texture map generation module 502 may include: obtaining target tensor parameters; using an adaptive instance normalization module to normalize the target tensor parameters and the second feature vector to obtain intermediate parameters; and performing convolution on the intermediate parameters to obtain the texture map.
[0077] In some exemplary embodiments, the preset human body model is a SMPL-X parameterized human body model; the rasterization processing module 503 may include: converting the preset human body model from a world coordinate system to a camera coordinate system; using a perspective transformation to convert the preset human body model from the camera coordinate system to an image coordinate system to obtain the projection coordinates of each three-dimensional point; and loading the texture map into the preset human body model according to the projection coordinates to obtain the initial virtual image.
[0078] In some exemplary embodiments, the target virtual image generation module 504 may include: calculating the color value of the initial virtual image using a trained neural rendering model, so as to perform color rendering on the initial virtual image according to the color value calculation result.
[0079] In some exemplary embodiments, the apparatus further comprises: a model training module.
[0080] The model training module can be used to pre-train the virtual image generation model based on the GAN network, including: in the generator, processing the sample data to obtain the corresponding sample feature vector; processing the sample feature vector to obtain a sample texture map; rasterizing the sample texture map and a preset human body model to obtain an initial virtual image sample; rendering the initial virtual image sample to obtain a color virtual image sample; inputting the color virtual image sample into the discriminator to obtain the discrimination result of the virtual image sample, and performing back-propagation training on the virtual image generation model based on the discrimination result to obtain the virtual image generation model based on the GAN network.
[0081] In some exemplary embodiments, the rasterization processing model outputs a plurality of the initial virtual image samples with different viewing angles, and renders each of the initial virtual image samples separately to obtain a plurality of the color virtual image samples with different viewing angles, which serve as input parameters of the discriminator.
[0082] The specific details of each module in the above-mentioned virtual image generation device 50 have been described in detail in the corresponding virtual image generation method, so they will not be repeated here.
[0083] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0084] Figure 6 A schematic diagram of a terminal device suitable for implementing an embodiment of the present invention is shown.
[0085] It should be noted that Figure 6 The terminal device 1000 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0086] like Figure 6 As shown, the terminal device 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other through a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0087] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0088] In particular, according to an embodiment of the present invention, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.
[0089] Specifically, the terminal device may be a smart mobile terminal device such as a mobile phone, a tablet computer or a laptop computer, or may be a smart terminal device such as a desktop computer.
[0090] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0091] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0092] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0093] It should be noted that, as another aspect, the present application also provides a computer-readable medium, which may be included in an electronic device; or may exist independently without being installed in the electronic device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments. For example, the electronic device may implement the following Figure 1 The steps shown.
[0094] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0095] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0096] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for generating a virtual image, characterized in that: The method comprises: Obtaining a first vector, using the first vector as an input parameter of a virtual image generation model, and processing the first vector to obtain a corresponding second feature vector; Processing the second feature vector to obtain a texture map; Performing rasterization processing on the texture map and the preset human body model to obtain an initial virtual image; The initial virtual image is rendered to obtain a corresponding color virtual image.
2. The method for generating a virtual image according to claim 1, characterized in that: The processing of the first vector to obtain a corresponding second eigenvector includes: The first vector is input into an input layer of a multi-layer neural network, and convolution processing is performed in sequence using the input layer, hidden layer and output layer of the multi-layer neural network to obtain a second eigenvector after dimension increase.
3. The method for generating a virtual image according to claim 1, characterized in that: The step of processing the second feature vector to obtain a texture map includes: Get the target tensor parameters; Using an adaptive instance normalization module to normalize the target tensor parameter and the second eigenvector to obtain an intermediate parameter; The intermediate parameters are subjected to convolution processing to obtain the texture map.
4. The method for generating a virtual image according to claim 1, wherein: The preset human body model is a SMPL-X parameterized human body model; The rasterizing process of the texture map and the preset human body model includes: Converting the preset human body model from a world coordinate system to a camera coordinate system; The preset human body model is transferred from the camera coordinate system to the image coordinate system by using perspective transformation to obtain the projection coordinates of each three-dimensional point; The texture map is loaded into the preset human body model according to the projection coordinates to obtain the initial virtual image.
5. The method for generating a virtual image according to claim 1, characterized in that: The rendering of the initial virtual image to obtain a corresponding color virtual image comprises: The trained neural rendering model is used to calculate the color value of the initial virtual image, so as to perform color rendering on the initial virtual image according to the color value calculation result.
6. The method for generating a virtual image according to claim 1, characterized in that: The method further includes: pre-training the virtual image generation model based on the GAN network, including: In the generator, the sample data is processed to obtain a corresponding sample feature vector; the sample feature vector is processed to obtain a sample texture map; the sample texture map and a preset human body model are rasterized to obtain an initial virtual image sample; the initial virtual image sample is rendered to obtain a color virtual image sample; The color virtual image sample is input into the discriminator to obtain the discrimination result of the virtual image sample, and the virtual image generation model is back-propagated and trained based on the discrimination result to obtain the virtual image generation model based on the GAN network.
7. The method for generating a virtual image according to claim 6, characterized in that: The method further comprises: The rasterization processing model outputs a plurality of the initial virtual image samples with different viewing angles, and renders each of the initial virtual image samples respectively to obtain a plurality of the color virtual image samples with different viewing angles, which serve as input parameters of the discriminator.
8. A virtual image generating device, characterized in that: The device comprises: A vector processing module, used to obtain a first vector, use the first vector as an input parameter of a virtual image generation model, and process the first vector to obtain a corresponding second feature vector; A texture map generation module, used for processing the second feature vector to obtain a texture map; A rasterization processing module, used for performing rasterization processing on the texture map and the preset human body model to obtain a plurality of initial virtual images with different viewing angles; The target virtual image generation module is used to render the initial virtual image to obtain a corresponding color virtual image as an output parameter of the virtual image generation module.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the virtual image generation method according to any one of claims 1 to 7 is implemented.
10. A terminal device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the virtual image generation method according to any one of claims 1 to 7 by executing the executable instructions.
