UV texture image generation method, device and equipment based on UV mapping transformation
Through UV mapping transformation and texture processing models, high-resolution UV texture images are generated, which solves the problem of low accuracy in UV texture image generation in traditional methods, and achieves higher texture details and accuracy.
Patent Information
- Application Number
- CN202510474916.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-04-16
AI Technical Summary
The traditional UV texture image generation method has complex operation, resulting in low generation accuracy.
By acquiring a two-dimensional face image and generating a corresponding three-dimensional face model, the vertex information and pixel point information are processed using the UV mapping relationship, the first and second UV texture images are generated, and image fusion and texture processing are performed to generate a target UV texture image with higher resolution.
The accuracy of UV texture image generation can be improved, and the geometric structure information of the three-dimensional face model and the detailed information of the two-dimensional face image can be more effectively preserved.
Smart Images

Figure CN120014140A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device and equipment for generating a UV texture image based on UV mapping transformation. Background Art
[0002] With the development of 3D computer graphics technology, 3D face modeling and rendering have been widely used in virtual reality, game development, film and television special effects and other fields. In 3D face modeling, UV (texture coordinate) texture mapping is an important texture representation method, and how to efficiently generate UV texture images has become an important research direction.
[0003] Traditional technology usually generates UV texture images by manually adjusting texture maps; however, the operation process of generating UV texture images in this way is relatively complicated (for example, it is difficult to collect high-quality three-dimensional data sets, and texture details are easily lost during the reconstruction process), resulting in low accuracy of UV texture image generation. Summary of the invention
[0004] Based on this, it is necessary to provide a UV texture image generation method, device, computer equipment, computer-readable storage medium and computer program product based on UV mapping transformation, which can improve the accuracy of UV texture image generation, in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a method for generating a UV texture image based on UV mapping transformation. The method comprises:
[0006] Acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image;
[0007] According to the UV mapping relationship, UV mapping is performed on vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, UV mapping is performed on pixel point information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image;
[0008] Performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image;
[0009] The fused UV texture image is input into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
[0010] In one of the embodiments, before performing image fusion processing on the first UV texture image and the second UV texture image to obtain the fused UV texture image of the two-dimensional face image, the method further includes:
[0011] Performing skin area detection on the two-dimensional face image to obtain skin area information of the two-dimensional face image;
[0012] Determining skin mask information of the two-dimensional face image according to the skin area information;
[0013] The performing image fusion processing on the first UV texture image and the second UV texture image to obtain the fused UV texture image of the two-dimensional face image includes:
[0014] According to the skin mask information, image fusion processing is performed on the first UV texture image and the second UV texture image to obtain the fused UV texture image.
[0015] In one of the embodiments, the vertex information includes coordinate information of the vertex and color information of the vertex;
[0016] The step of performing UV mapping processing on vertex information in the three-dimensional face model according to the UV mapping relationship to obtain a first UV texture image of the two-dimensional face image includes:
[0017] According to the UV mapping relationship, UV mapping processing is performed on the coordinate information of the vertices in the three-dimensional face model to obtain UV coordinate information corresponding to the coordinate information of the vertex;
[0018] The first UV texture image is generated according to the UV coordinate information and the color information of the vertex.
[0019] In one embodiment, inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image includes:
[0020] Performing multi-scale texture feature recognition processing on the fused UV texture image through the texture processing model to obtain multi-scale texture feature information of the fused UV texture image;
[0021] According to the multi-scale texture feature information, the fused UV texture image is texture enhanced to obtain a UV texture image after texture enhancement as the target UV texture image.
[0022] In one of the embodiments, before inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image, the method further includes:
[0023] Performing color correction processing on the fused UV texture image to obtain a color-corrected fused UV texture image;
[0024] Performing denoising on the color-corrected fused UV texture image to obtain a denoised fused UV texture image;
[0025] Normalizing the denoised fused UV texture image to obtain a preprocessed fused UV texture image;
[0026] The step of inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image includes:
[0027] The preprocessed fused UV texture image is input into the texture processing model to obtain the target UV texture image.
[0028] In one embodiment, generating a three-dimensional face model corresponding to the two-dimensional face image includes:
[0029] Performing feature extraction processing on the two-dimensional face image to obtain facial feature information of the two-dimensional face image;
[0030] The three-dimensional face model is generated according to the facial feature information.
[0031] In a second aspect, the present application also provides a UV texture image generation device based on UV mapping transformation. The device comprises:
[0032] An image acquisition module, used to acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image;
[0033] An information processing module is used to perform UV mapping processing on vertex information in the three-dimensional face model according to a UV mapping relationship to obtain a first UV texture image of the two-dimensional face image, and to perform UV mapping processing on pixel point information in the two-dimensional face image according to the UV mapping relationship to obtain a second UV texture image of the two-dimensional face image;
[0034] An image fusion module, used for performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image;
[0035] The image input module is used to input the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
[0036] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0037] Acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image;
[0038] According to the UV mapping relationship, UV mapping is performed on vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, UV mapping is performed on pixel point information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image;
[0039] Performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image;
[0040] The fused UV texture image is input into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image;
[0043] According to the UV mapping relationship, UV mapping is performed on vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, UV mapping is performed on pixel point information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image;
[0044] Performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image;
[0045] The fused UV texture image is input into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
[0046] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0047] Acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image;
[0048] According to the UV mapping relationship, UV mapping is performed on vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, UV mapping is performed on pixel point information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image;
[0049] Performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image;
[0050] The fused UV texture image is input into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
[0051] The UV texture image generation method, device, computer equipment, computer-readable storage medium and computer program product based on UV mapping transformation obtain a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image; perform UV mapping processing on vertex information in the three-dimensional face model according to the UV mapping relationship to obtain a first UV texture image of the two-dimensional face image, and perform UV mapping processing on pixel point information in the two-dimensional face image according to the UV mapping relationship to obtain a second UV texture image of the two-dimensional face image; perform image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image; input the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image. This scheme generates a three-dimensional face model from a two-dimensional face image, and performs UV mapping on the vertex information of the three-dimensional face model and the pixel information of the two-dimensional face image respectively, to obtain two complementary UV texture images, which is beneficial to simultaneously retaining the geometric structure information of the three-dimensional face model and the detail information of the two-dimensional face image; by fusing the two UV texture images, it is beneficial to effectively integrate the three-dimensional geometric structure information and the two-dimensional detail information; and then the fused UV texture image is processed by the texture processing model to obtain a target UV texture image with a higher resolution, which is beneficial to further improve the performance of texture details, thereby improving the accuracy of UV texture image generation. Moreover, this scheme does not require pre-training of data sets, and can improve the resolution and accuracy of generated UV texture images based on a single two-dimensional image. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 It is a schematic diagram of a process of a UV texture image generation method based on UV mapping transformation in one embodiment;
[0054] Figure 2 A schematic diagram of a process for obtaining a UV texture map in one embodiment;
[0055] Figure 3 A schematic diagram of the structure of a SinGAN model in one embodiment;
[0056] Figure 4 A schematic diagram of a process of refining texture in one embodiment;
[0057] Figure 5 is a structural block diagram of a UV texture image generating device based on UV mapping transformation in one embodiment;
[0058] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of this application more clear, the content of this application is further described in detail below in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.
[0060] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data permitted by the user or with full permission from all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0061] In an exemplary embodiment, Figure 1As shown, a method for generating a UV texture image based on UV mapping transformation is provided. This embodiment uses the method applied to a terminal as an example for illustration; it can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:
[0062] Step S101, obtaining a two-dimensional face image, and generating a three-dimensional face model corresponding to the two-dimensional face image.
[0063] Step S102, according to the UV mapping relationship, UV mapping processing is performed on the vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, UV mapping processing is performed on the pixel point information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image.
[0064] Step S103, performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image.
[0065] Step S104, inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
[0066] Among them, UV refers to the two-dimensional texture coordinate system used in three-dimensional model texture mapping, where U represents the horizontal coordinate and V represents the vertical coordinate; UV mapping can be a process of mapping the texture coordinates (UV coordinates) of the surface of a three-dimensional model to a two-dimensional plane.
[0067] Among them, the UV mapping transformation can be a conversion process of mapping the texture coordinates of the surface of a three-dimensional model to a two-dimensional plane. For example, the UV mapping transformation can be a process of converting the (X, Y, Z) coordinates in the three-dimensional space to the (u, v) coordinates in the two-dimensional UV space through a camera model formula.
[0068] The UV texture image may be a texture image on a two-dimensional plane obtained through UV mapping transformation.
[0069] The two-dimensional face image may be a planar image containing face information, for example, the two-dimensional face image may be a face photo taken by a camera.
[0070] The 3D face model may be a geometric model representing a face in a 3D space, for example, the 3D face model may be a 3D model including vertex coordinates and color information generated from a 2D face image by a 3D face generation network such as Deep3DFaceReconsturction (deep 3D face reconstruction), PRNet (position regression network) or VRNet (volume regression network). The vertices may be vertices on the surface of the 3D face model.
[0071] The UV mapping relationship may be a correspondence relationship between vertices of a three-dimensional model and pixels in a UV space. For example, the UV mapping relationship may be a coordinate transformation relationship established by an intrinsic parameter matrix and a camera model formula.
[0072] The vertex information may be the spatial position and color information of each vertex in the three-dimensional face model. For example, the vertex information may be data including (X, Y, Z) coordinate information and (R, G, B) color information.
[0073] The pixel information may be the color and position information of each pixel in the two-dimensional image. For example, the pixel information may be the position coordinates and the corresponding color value of each point in the two-dimensional image.
[0074] The image fusion process may be a process of synthesizing a plurality of UV texture images into one UV texture image. For example, the image fusion process may be a process of performing Poisson fusion on the first UV texture image and the second UV texture image.
[0075] The texture processing model may be a deep learning model for optimizing UV texture image details. For example, the texture processing model may be a SinGAN (Single Image GAN, single image generative adversarial network) model, which enhances texture details through a multi-scale generator and discriminator structure.
[0076] Optionally, after acquiring the two-dimensional face image, the terminal generates a three-dimensional face model corresponding to the two-dimensional face image through a three-dimensional face generation network such as Deep3DFaceReconsturction, PRNet or VRNet. The terminal establishes a UV mapping relationship based on the intrinsic parameter matrix and focal length of the camera model, and the UV mapping relationship is used to convert the (X, Y, Z) coordinates in the three-dimensional space into the (u, v) coordinates in the UV space. The terminal uses the UV mapping relationship to map the (X, Y, Z) coordinates and (R, G, B) color information of each vertex in the three-dimensional face model to the UV space to obtain a first UV texture image of the two-dimensional face image; the terminal remaps the pixel points in the two-dimensional face image to the UV space through the UV mapping relationship to obtain a second UV texture image of the two-dimensional face image. The terminal performs skin detection on the two-dimensional face image to obtain a skin mask, and performs Poisson fusion on the first UV texture image and the second UV texture image based on the skin mask to obtain a fused UV texture image of the two-dimensional face image. The terminal inputs the fused UV texture image into the SinGAN (Single Image GAN, single image generative adversarial network) model to obtain the target UV texture image of the two-dimensional face image.
[0077] For example, the terminal first preprocesses the acquired 2D face image, including face detection and alignment. The terminal uses a 3D face generation network to convert the preprocessed 2D face image into a 3D face model, which contains the 3D coordinates and color information of the mesh vertices. The terminal generates a 3D face model based on the camera focal length f, pixel width d x and height d y , translation vector (c x , c y) calculates the internal parameter matrix and establishes a UV mapping relationship. The terminal uses the UV mapping relationship to perform UV mapping on the vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, performs UV mapping on the pixel information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image, wherein the second UV texture image retains the detail information in the two-dimensional face image. The terminal uses a skin detection algorithm based on deep learning to generate a binary skin mask to indicate a valid skin area. The terminal performs image fusion processing on the first UV texture image and the second UV texture image according to the skin mask to obtain a fused UV texture image of the two-dimensional face image. After the terminal performs preprocessing such as color correction, denoising and normalization on the fused UV texture image, the fused UV texture image is input into the SinGAN model to obtain a target UV texture image of the two-dimensional face image, wherein the SinGAN model adopts a pyramid structure, includes generators and discriminators of multiple scales, and gradually optimizes the texture details of the fused UV texture image from a coarse scale to a fine scale through layer-by-layer training, and finally generates a target UV texture image with a higher resolution.
[0078] In the above-mentioned UV texture image generation method based on UV mapping transformation, a two-dimensional face image is obtained to generate a three-dimensional face model corresponding to the two-dimensional face image; according to the UV mapping relationship, UV mapping processing is performed on the vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, UV mapping processing is performed on the pixel point information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image; image fusion processing is performed on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image; the fused UV texture image is input into the texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image. This scheme generates a three-dimensional face model from a two-dimensional face image, and performs UV mapping on the vertex information of the three-dimensional face model and the pixel information of the two-dimensional face image respectively, to obtain two complementary UV texture images, which is beneficial to simultaneously retaining the geometric structure information of the three-dimensional face model and the detail information of the two-dimensional face image; by fusing the two UV texture images, it is beneficial to effectively integrate the three-dimensional geometric structure information and the two-dimensional detail information; and then the fused UV texture image is processed by the texture processing model to obtain a target UV texture image with a higher resolution, which is beneficial to further improve the performance of texture details, thereby improving the accuracy of UV texture image generation. Moreover, this scheme does not require pre-training of data sets, and can improve the resolution and accuracy of generated UV texture images based on a single two-dimensional image.
[0079] In an exemplary embodiment, before performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of a two-dimensional face image, the following contents are also included: performing skin area detection on the two-dimensional face image to obtain skin area information of the two-dimensional face image; determining skin mask information of the two-dimensional face image based on the skin area information; performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image, which specifically includes the following contents: performing image fusion processing on the first UV texture image and the second UV texture image based on the skin mask information to obtain a fused UV texture image.
[0080] Among them, skin area detection can be a process of identifying and locating the skin part in a two-dimensional face image. For example, skin area detection can be a process of processing a two-dimensional face image using a skin detection algorithm based on deep learning.
[0081] The skin region information may be position and range information of the skin part in the two-dimensional face image obtained by skin region detection. For example, the skin region information may be region marking information representing the skin part in the two-dimensional face image.
[0082] The skin mask information may be binary image information used to indicate a valid skin area. For example, the skin mask information may be a binary mask image used to avoid the influence of occlusions (such as glasses, side face self-occlusion, etc.) when performing Poisson fusion.
[0083] Optionally, the terminal performs skin area detection on the two-dimensional face image, identifies the skin area in the two-dimensional face image through a skin detection algorithm based on deep learning, and obtains the skin area information of the two-dimensional face image. The terminal generates binary skin mask information based on the skin area information of the two-dimensional face image, and the skin mask information is used to mark the effective skin area to avoid the influence of obstructions such as glasses and side face self-occlusion. Based on the skin mask information, the terminal uses a Poisson fusion algorithm to perform image fusion processing on the first UV texture image and the second UV texture image, wherein the first UV texture image provides basic geometric structure information, and the second UV texture image provides rich texture detail information, and the fused UV texture image with the occlusion effect removed is obtained through fusion.
[0084] For example, after obtaining the skin mask information, the terminal uses the Poisson fusion algorithm to perform image fusion processing on the first UV texture image and the second UV texture image. Specifically, the terminal uses the first UV texture image (i.e., the UV texture image generated by the rough three-dimensional model) as the base image, and the second UV texture image (i.e., the UV texture image containing rich texture details obtained from the original two-dimensional face image through UV mapping) as the source image, and uses the skin mask information as the weight guidance of the fusion area. During the fusion process, the terminal preferentially uses the rich texture information in the second UV texture image for the skin area (the area with a skin mask value of 1), and retains the information in the first UV texture image for the non-skin area (the area with a skin mask value of 0) or the occluded area. At the same time, the Poisson equation is solved at the boundary to ensure the smooth and natural texture transition, and finally generates a fused UV texture image that removes the occlusion effect while retaining the details. The image not only retains the detailed texture of the skin area in the second UV texture image, but also avoids the influence of occlusion objects (such as glasses, hair, etc.) and uneven lighting on the texture quality.
[0085] The technical solution provided in this embodiment helps to accurately identify the effective skin area and the occluded area that needs to be excluded in the two-dimensional face image by performing skin area detection on the two-dimensional face image and generating skin mask information; by using the skin mask information to guide the fusion processing of the first UV texture image and the second UV texture image during the image fusion process, it helps to avoid the influence of obstructions such as glasses on the texture fusion result, thereby helping to improve the accuracy of generating the fused UV texture image.
[0086] In an exemplary embodiment, the vertex information includes vertex coordinate information and vertex color information; according to the UV mapping relationship, UV mapping processing is performed on the vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, which specifically includes the following contents: according to the UV mapping relationship, UV mapping processing is performed on the coordinate information of the vertices in the three-dimensional face model to obtain UV coordinate information corresponding to the coordinate information of the vertex; based on the UV coordinate information and the color information of the vertex, a first UV texture image is generated.
[0087] The coordinate information of the vertex may be the position information of each vertex in the three-dimensional face model in the three-dimensional space. For example, the coordinate information of the vertex may be the (X, Y, Z) coordinate value in the three-dimensional space.
[0088] The vertex color information may be color data corresponding to each vertex in the three-dimensional face model. For example, the vertex color information may be a (R, G, B) color value.
[0089] Among them, the UV coordinate information can be the position information of the vertices in the three-dimensional face model in the two-dimensional UV space. For example, the UV coordinate information can be the (u, v) coordinate value in the two-dimensional UV space obtained by converting the (X, Y, Z) coordinates in the three-dimensional space through the camera model formula.
[0090] Optionally, the terminal extracts the coordinate information and color information of each vertex from the three-dimensional face model, wherein the coordinate information of the vertex includes the (X, Y, Z) coordinate value in the three-dimensional space, and the color information of the vertex includes the (R, G, B) color value. The terminal converts the coordinate information of the vertices in the three-dimensional face model from the three-dimensional space to the UV space according to the intrinsic parameter matrix and UV mapping relationship of the camera model, and obtains the UV coordinate information corresponding to the coordinate information of the vertex. The terminal combines the UV coordinate information of the vertex with the color information of the corresponding vertex, and generates a first UV texture image in the UV space, and the first UV texture image retains the geometric structure information of the three-dimensional face model.
[0091] The technical solution provided in this embodiment helps to completely preserve the geometric structure characteristics and color characteristics of the three-dimensional face model by dividing the vertex information in the three-dimensional face model into two parts: coordinate information and color information for processing; the step-by-step processing method of first performing UV mapping on the coordinate information of the vertices to obtain UV coordinate information and then combining the color information of the vertices to generate a first UV texture image helps to ensure the accurate correspondence between the geometric structure and color information during the UV mapping process, thereby helping to improve the accuracy of the generated first UV texture image.
[0092] In an exemplary embodiment, the fused UV texture image is input into a texture processing model to obtain a target UV texture image of a two-dimensional face image, which specifically includes the following contents: multi-scale texture feature recognition processing is performed on the fused UV texture image through the texture processing model to obtain multi-scale texture feature information of the fused UV texture image; according to the multi-scale texture feature information, texture enhancement processing is performed on the fused UV texture image to obtain a texture-enhanced UV texture image as the target UV texture image.
[0093] Among them, the multi-scale texture feature recognition processing can be a process of extracting and analyzing features at various scale levels of the UV texture image. For example, the multi-scale texture feature recognition processing can be a process of extracting features at different levels from rough contours and shapes to fine textures and skin pores.
[0094] The multi-scale texture feature information may be texture feature data of different scales obtained through multi-scale texture feature recognition processing. For example, the multi-scale texture feature information may be a feature representation including multiple levels from overall structure to local details.
[0095] Among them, texture enhancement processing can be a process of optimizing and enhancing the details of a fused UV texture image based on multi-scale texture feature information. For example, texture enhancement processing can be a process of enhancing texture details through adversarial training of a generator network and a discriminator network.
[0096] The texture-enhanced UV texture image may be a UV texture image obtained after texture enhancement processing and having higher resolution and richer details than the fused UV texture image.
[0097] Optionally, the terminal inputs the fused UV texture image into a texture processing model based on SinGAN, which has a pyramid structure, and each layer contains a set of independent GANs (generative adversarial networks). The terminal performs multi-scale texture feature recognition processing on the fused UV texture image through the texture processing model, extracts features layer by layer starting from the lowest layer, and obtains texture feature information of various levels from rough contours and shapes to delicate textures and skin pores. In the feature extraction process of each layer of the texture processing model, the generator network first receives the upsampled image and random noise of the upper layer generation result as input to generate texture features of the current layer, and the discriminator network compares the generated features with the real data, and continuously optimizes the feature generation quality through adversarial training. After completing the feature extraction of all levels, the fused UV texture image is texture enhanced according to the obtained multi-scale texture feature information, and the texture details are continuously enhanced through layer-by-layer optimization iteration, and finally a texture-enhanced UV texture image is generated as the target UV texture image.
[0098] The technical solution provided in this embodiment, by performing multi-scale texture feature recognition processing on the fused UV texture image, is conducive to comprehensively capturing texture feature information from different levels and avoiding missing important texture details; by performing texture enhancement processing on the fused UV texture image based on multi-scale texture feature information, it is conducive to targeted optimization and enhancement of textures at different levels, thereby facilitating the generation of a target UV texture image with richer details.
[0099] In an exemplary embodiment, before the fused UV texture image is input into the texture processing model to obtain the target UV texture image of the two-dimensional face image, the following contents are also included: color correction is performed on the fused UV texture image to obtain a color-corrected fused UV texture image; denoising is performed on the color-corrected fused UV texture image to obtain a denoised fused UV texture image; normalization is performed on the denoised fused UV texture image to obtain a preprocessed fused UV texture image; the fused UV texture image is input into the texture processing model to obtain the target UV texture image of the two-dimensional face image, which specifically includes the following contents: the preprocessed fused UV texture image is input into the texture processing model to obtain the target UV texture image.
[0100] The color correction process may be a process of adjusting and optimizing the color of the fused UV texture image. For example, the color correction process may be a process of adjusting parameters such as color balance, color temperature, and saturation of the fused UV texture image.
[0101] Among them, the color-corrected fused UV texture image can be a UV texture image with more accurate color expression obtained after color correction processing. For example, the color-corrected fused UV texture image can be a UV texture image with a more natural and balanced color effect.
[0102] The denoising process may be a process of removing noise and interference information in the fused UV texture image. For example, the denoising process may be a process of removing random noise and unnecessary details in the image through a filtering algorithm.
[0103] The denoised fused UV texture image may be a UV texture image with clearer texture obtained after denoising. For example, the denoised fused UV texture image may be a UV texture image that is clearer after random noise is removed.
[0104] The normalization process may be a process of standardizing the numerical range of the fused UV texture image. For example, the normalization process may be a process of mapping the image pixel values to a specific range.
[0105] Among them, the preprocessed fused UV texture image can be a UV texture image obtained after a series of preprocessing operations such as color correction processing, denoising processing and normalization processing. For example, the preprocessed fused UV texture image can be a UV texture image with a standardized numerical range, clear texture and accurate color.
[0106] Optionally, the terminal first performs color correction processing on the fused UV texture image, and makes the color of the fused UV texture image more natural and balanced by adjusting parameters such as color balance, color temperature and saturation, thereby obtaining a color-corrected fused UV texture image. Then, the terminal performs denoising processing on the color-corrected fused UV texture image, and removes random noise and unnecessary details in the image through algorithms such as Gaussian filtering, thereby obtaining a denoised fused UV texture image. Then, the terminal performs normalization processing on the denoised fused UV texture image, and maps the pixel values of the image to a standard range between 0 and 1, thereby obtaining a preprocessed fused UV texture image. Finally, the terminal inputs the preprocessed fused UV texture image into a texture processing model based on SinGAN, thereby obtaining a target UV texture image.
[0107] The technical solution provided in this embodiment is beneficial to improving the image data quality of the input texture processing model and eliminating problems such as color deviation, noise interference and numerical irregularities in the image by performing three-step preprocessing operations on the fused UV texture image in sequence, namely, color correction processing, denoising processing and normalization processing; and is beneficial to generating a higher quality target UV texture image by inputting the preprocessed fused UV texture image obtained through a complete preprocessing process into the texture processing model.
[0108] In an exemplary embodiment, generating a three-dimensional face model corresponding to a two-dimensional face image specifically includes the following contents: performing feature extraction processing on the two-dimensional face image to obtain facial feature information of the two-dimensional face image; and generating a three-dimensional face model based on the facial feature information.
[0109] Among them, the feature extraction processing can be a process of analyzing and processing a two-dimensional face image to obtain key facial features. For example, the feature extraction processing can be a process of processing a two-dimensional face image through a network model such as Deep3DFaceReconsturction, PRNet or VRNet.
[0110] Among them, facial feature information can be key feature data of the face obtained through feature extraction processing. For example, facial feature information can be data information including key feature points and feature parameters such as face contour, facial features position, and facial shape.
[0111] Optionally, the terminal performs feature extraction processing on the two-dimensional face image, and extracts facial feature information such as key facial feature points, facial contours, and facial features positions in the two-dimensional face image through a three-dimensional face generation network such as Deep3DFaceReconsturction, PRNet, or VRNet. Then the terminal converts the extracted facial feature information into a corresponding three-dimensional representation, where the three-dimensional representation can be a specific data form used by different network models to represent a three-dimensional structure. For example, Deep3DFaceReconsturction uses 3DMM (3D deformable model, 3DMorphable Model) coefficient representation, PRNet uses UV position map representation, and VRNet uses voxel map representation, and finally generates a three-dimensional face model containing vertex coordinate information and color information.
[0112] The technical solution provided in this embodiment, by performing feature extraction processing on the two-dimensional face image, is conducive to accurately obtaining the key feature information of the face and avoiding the loss of important facial features in the process of two-dimensional to three-dimensional conversion; by generating a three-dimensional face model based on the extracted facial feature information, it is conducive to ensuring the feature consistency between the generated three-dimensional face model and the original two-dimensional face image, thereby facilitating the provision of accurate three-dimensional geometric basic data for subsequent texture optimization.
[0113] The following is an application example to illustrate the UV texture image generation method based on UV mapping transformation provided by the present application. This application example uses the method applied to a terminal as an example.
[0114] With the rapid development of computer graphics and artificial intelligence technology, 3D face modeling has been widely used in many fields, such as film and television special effects, game development, virtual reality, etc. Among them, face texture is an important factor affecting the similarity and realism of the model. However, reconstructing high-precision 3D face texture still faces many challenges, such as high cost and complex operation of high-quality 3D face data acquisition; loss of texture details during reconstruction, etc., which will affect the accuracy of generated texture. With the development of deep learning, GAN models and their variants have made significant progress in image generation, and can generate high-quality and realistic images, providing new ideas for texture optimization. UV mapping relationship can convert 3D model vertices to 2D images, thereby making full use of more relevant 2D data and efficient models for reconstruction.
[0115] This application example projects the rough texture of the three-dimensional model onto a two-dimensional image through UV mapping, and then performs related optimization operations without using three-dimensional data for training. Combining deep learning and the SinGAN model, only a single image is used for training and optimization, and a high-precision texture map with rich details is obtained. Among them, the application of the SinGAN model can effectively solve the problem of high acquisition costs of high-quality three-dimensional data sets; the refinement of the texture can effectively solve the problem of loss of texture details during the reconstruction process. The above operations effectively avoid the problem of difficulty in collecting three-dimensional data, and improve the detail expression and realism of the texture, meeting people's needs for high-quality face models in practical applications such as film, television, and games.
[0116] The technical solution of this application example includes three parts: UV mapping to obtain texture maps, SinGAN structure and training method, and enhancing texture details, which are explained in detail below.
[0117] 1.UV mapping:
[0118] refer to Figure 2 , Figure 2 This is a flowchart for generating a 3D model from a 2D image and then obtaining a UV texture map. Figure 2 In the method, it is divided into two parts: 3D face generation and UV texture map generation. First, a 2D face image is started, and after being processed by the 3D model generation network, a 3D face model is obtained. The 3D face model can be mapped to the 2D image for difference comparison. The 3D face model is UV mapped to obtain a rough UV texture map. The UV position map (UV position map is a representation of UV mapping relationship) can be determined according to the 3D face model. According to the UV position map, the 2D face image is remapped to obtain a detailed UV texture map.
[0119] This application example focuses on the task of texture refinement. The face model generated from a two-dimensional image can be Deep3DFaceReconsturction, PRNet or VRNet. Based on the initially generated face model, the (X, Y, Z) (three-dimensional space coordinate axis) coordinate information and (R, G, B) (red, green, and blue primary color channels) color information of each vertex in the three-dimensional space can be obtained, where each vertex corresponds to a pixel point in the UV space. Assume that the width of a pixel is d x , height d y , the translation vector is (c x , c y ), the intrinsic matrix is calculated based on the focal length and translation, and the coordinate transformation can be completed by the following camera model formula to achieve UV mapping. According to the color information corresponding to each vertex, the corresponding texture map can be obtained in the UV space.
[0120]
[0121] The parameters in the above camera model formula can be explained as follows:
[0122] u: U coordinate in the UV texture coordinate system, representing the texture coordinate in the horizontal direction;
[0123] v: V coordinate in the UV texture coordinate system, representing the texture coordinate in the vertical direction;
[0124] x: the horizontal position coordinate of the pixel in the image;
[0125] y: the vertical position coordinate of the pixel in the image;
[0126] d x : The width of a pixel;
[0127] d y : The height of a pixel;
[0128] c x : The translation of the camera principal point in the x direction, that is, the horizontal offset of the optical center;
[0129] cy : The translation of the camera principal point in the y direction, that is, the vertical offset of the optical center;
[0130] Z c : Depth value in the camera coordinate system, indicating the distance from the object to the camera;
[0131] f: The focal length of the camera, which affects the magnification of the image;
[0132] X c : The X coordinate of the camera coordinate system of the point in the three-dimensional space;
[0133] Y c : The Y coordinate of the camera coordinate system of the point in the three-dimensional space;
[0134] Z c : The camera coordinate system Z coordinate of the point in three-dimensional space.
[0135] Knowing the UV mapping relationship, we can match the pixels in the original face image with the UV texture map one by one to obtain a UV texture map with rich details. It is worth noting that the texture map remapped from the original face image will have occlusions in the original image, such as glasses, self-occlusion of the side face, etc., and is also easily affected by light factors. Therefore, it is necessary to perform skin detection on the texture map to obtain a skin mask to avoid the influence of occlusions.
[0136] 2. SinGAN structure and training method:
[0137] The SinGAN model can capture multi-scale representations of data from a single image. Its specific principles and structure refer to Figure 3 The model has a pyramid structure, that is, each layer is a set of independent GANs (Generative Adversarial Networks), and the input of each layer depends on the upsampling of the upper layer results. Therefore, during training, a layer-by-layer training method is adopted. First, the lowest layer is trained. This layer learns the global structure of the entire image. After each layer is trained, the training model and parameters are saved, and then the next layer is trained. In this way, a network model that can produce new pictures with many details and realism can be trained from coarse scale to fine scale. Figure 3 In Figure 1, the pyramid structure of SinGAN is shown, which consists of multiple layers of generator and discriminator networks. From the top, you can see the outputs marked as fake and real, representing the generated fake and real images. On the left side of the model is the generator part (multi-scale image patch generator), marked with G N , G N-1…G0 represents the generator network at different levels; on the right is the discriminator part (multi-scale image patch discriminator), marked with D N , D N-1 ...D0, represents the discriminator network at different levels. The input of the model includes different scales of the original image and the noise input Z N , Z N-1 ...Z0. The effective image block size is also marked in the figure. The whole structure clearly shows how SinGAN learns and generates texture details layer by layer from a single image (training process).
[0138] The input of the SinGAN model is only one picture. After receiving this picture, the model adjusts it to multiple input scales for subsequent use. The model is a macro structure of an adversarial generative network, that is, a generator and a discriminator. The generator and the discriminator are generative / discriminatory networks of different scales, and they correspond one to one, thus forming a pyramid structure. Inside the pyramid structure, the highest scale is recorded as 0 and the lowest scale is recorded as N. The model is trained from the Nth scale. The input of the generator is a noise, and the input of the discriminator is the generated image and the real image of the corresponding scale. Starting from the N-1 layer, the input of the model adds the previous layer on the basis of the noise, that is, the image generated by the generator of the Nth layer is upsampled to the image of the N-1 layer scale, and the rest is the same.
[0139] 3. Refine the texture:
[0140] refer to Figure 4 , texture refinement is divided into two steps: fusion and adversarial generation. Figure 4 In the method, it is divided into two parts: texture map fusion and texture map refinement. The two-dimensional face image is processed to obtain a skin mask. According to the skin mask, the rough UV texture map and the detail UV texture map are Poisson fused to obtain a fused UV texture map. The fused UV texture map is image preprocessed and then input into the model. The model performs multi-scale image processing and obtains a refined UV texture map after being processed by the generator and the discriminator.
[0141] Step 1: Fusion texture map.
[0142] Based on the UV mapping relationship, two UV texture maps can be obtained from the rough 3D model and the original face image. The former lacks some texture details, while the latter contains rich texture details in the original image. The two are Poisson fused based on the skin mask to obtain a UV texture map that removes the occlusion effect and has details.
[0143] Step 2: Generate texture map.
[0144] This UV texture map is trained through the SinGAN model to learn the distribution of real data and generate higher-precision textures. First, the UV texture map is preprocessed as necessary, including color correction, denoising, normalization, etc., to ensure the quality of the data input to the SinGAN model. The SinGAN model decomposes the texture into representations of multiple scales, from rough contours and shapes to delicate textures and skin pores, and each scale focuses on different levels of detail. In the process, each scale image output is adversarially trained, and the generator network learns how to produce details at that level, while the discriminator network tries to distinguish the difference between the generated details and the real data. Continuous optimization and iteration will eventually enhance the details of the texture, so that the generated texture has a higher resolution and a more realistic effect.
[0145] Among them, GAN (Generative Adversarial Network) is a deep learning model composed of two networks, which generates new data samples through adversarial training of the generator and the discriminator.
[0146] Among them, SinGAN (Single Image GAN): is an innovative generative adversarial network model, which is characterized by requiring only one natural image as training data to capture the internal statistics of the image and generate new samples.
[0147] Among them, UV mapping is a process of mapping the texture coordinates (UV coordinates) of the surface of a three-dimensional model to a two-dimensional plane, which is generally used for three-dimensional model mapping.
[0148] The technical solution provided in this application example generates a three-dimensional face model from a two-dimensional face image, and performs UV mapping processing on the vertex information of the three-dimensional face model and the pixel information of the two-dimensional face image respectively, so as to obtain two complementary UV texture images, which is beneficial to simultaneously retaining the geometric structure information of the three-dimensional face model and the detail information of the two-dimensional face image; by fusing the two UV texture images, it is beneficial to effectively integrate the three-dimensional geometric structure information and the two-dimensional detail information; and then the fused UV texture image is processed by the texture processing model to obtain a target UV texture image with a higher resolution, which is beneficial to further improve the performance of texture details, thereby facilitating the accuracy of UV texture image generation.
[0149] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0150] Based on the same inventive concept, the embodiment of the present application also provides a UV texture image generation device based on UV mapping transformation for implementing the UV texture image generation method based on UV mapping transformation involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more UV texture image generation device embodiments based on UV mapping transformation provided below can refer to the limitations of the UV texture image generation method based on UV mapping transformation above, and will not be repeated here.
[0151] In an exemplary embodiment, Figure 5 As shown, a UV texture image generation device based on UV mapping transformation is provided. The UV texture image generation device based on UV mapping transformation 500 may include:
[0152] An image acquisition module 501 is used to acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image;
[0153] The information processing module 502 is used to perform UV mapping processing on vertex information in the three-dimensional face model according to the UV mapping relationship to obtain a first UV texture image of the two-dimensional face image, and to perform UV mapping processing on pixel point information in the two-dimensional face image according to the UV mapping relationship to obtain a second UV texture image of the two-dimensional face image;
[0154] An image fusion module 503 is used to perform image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of a two-dimensional face image;
[0155] The image input module 504 is used to input the fused UV texture image into the texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
[0156] In an exemplary embodiment, the UV texture image generation device 500 based on UV mapping transformation also includes: a region detection module, which is used to perform skin region detection on a two-dimensional face image to obtain skin region information of the two-dimensional face image; based on the skin region information, determine the skin mask information of the two-dimensional face image; an image fusion module 503, which is also used to perform image fusion processing on the first UV texture image and the second UV texture image based on the skin mask information to obtain a fused UV texture image.
[0157] In an exemplary embodiment, the vertex information includes vertex coordinate information and vertex color information; the information processing module 502 is also used to perform UV mapping processing on the coordinate information of the vertices in the three-dimensional face model according to the UV mapping relationship to obtain UV coordinate information corresponding to the vertex coordinate information; and generate a first UV texture image according to the UV coordinate information and the vertex color information.
[0158] In an exemplary embodiment, the image input module 504 is also used to perform multi-scale texture feature recognition processing on the fused UV texture image through a texture processing model to obtain multi-scale texture feature information of the fused UV texture image; and perform texture enhancement processing on the fused UV texture image according to the multi-scale texture feature information to obtain a texture-enhanced UV texture image as a target UV texture image.
[0159] In an exemplary embodiment, the UV texture image generation device 500 based on UV mapping transformation also includes: a correction processing module, which is used to perform color correction processing on the fused UV texture image to obtain a color-corrected fused UV texture image; perform denoising processing on the color-corrected fused UV texture image to obtain a denoised fused UV texture image; perform normalization processing on the denoised fused UV texture image to obtain a preprocessed fused UV texture image; and an image input module 504, which is also used to input the preprocessed fused UV texture image into a texture processing model to obtain a target UV texture image.
[0160] In an exemplary embodiment, the image acquisition module 501 is further used to perform feature extraction processing on the two-dimensional face image to obtain facial feature information of the two-dimensional face image; and generate a three-dimensional face model based on the facial feature information.
[0161] Each module in the UV texture image generation device based on UV mapping transformation can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0162] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a UV texture image generation method based on UV mapping transformation is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0163] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0164] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0165] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0166] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0168] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0169] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A UV texture image generation method based on UV mapping transformation, characterized in that: The method comprises: Acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image; According to the UV mapping relationship, UV mapping is performed on vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and according to the UV mapping relationship, UV mapping is performed on pixel point information in the two-dimensional face image to obtain a second UV texture image of the two-dimensional face image; Performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image; The fused UV texture image is input into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
2. The method according to claim 1, characterized in that Before performing image fusion processing on the first UV texture image and the second UV texture image to obtain the fused UV texture image of the two-dimensional face image, the method further includes: Performing skin area detection on the two-dimensional face image to obtain skin area information of the two-dimensional face image; Determining skin mask information of the two-dimensional face image according to the skin area information; The performing image fusion processing on the first UV texture image and the second UV texture image to obtain the fused UV texture image of the two-dimensional face image includes: According to the skin mask information, image fusion processing is performed on the first UV texture image and the second UV texture image to obtain the fused UV texture image.
3. The method according to claim 1, characterized in that: The vertex information includes vertex coordinate information and vertex color information; The step of performing UV mapping processing on vertex information in the three-dimensional face model according to the UV mapping relationship to obtain a first UV texture image of the two-dimensional face image includes: According to the UV mapping relationship, UV mapping processing is performed on the coordinate information of the vertices in the three-dimensional face model to obtain UV coordinate information corresponding to the coordinate information of the vertex; The first UV texture image is generated according to the UV coordinate information and the color information of the vertex.
4. The method according to claim 1, characterized in that: The step of inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image includes: Performing multi-scale texture feature recognition processing on the fused UV texture image through the texture processing model to obtain multi-scale texture feature information of the fused UV texture image; According to the multi-scale texture feature information, the fused UV texture image is texture enhanced to obtain a UV texture image after texture enhancement as the target UV texture image.
5. The method according to claim 1, characterized in that Before inputting the fused UV texture image into the texture processing model to obtain the target UV texture image of the two-dimensional face image, the method further includes: Performing color correction processing on the fused UV texture image to obtain a color-corrected fused UV texture image; Performing denoising on the color-corrected fused UV texture image to obtain a denoised fused UV texture image; Normalizing the denoised fused UV texture image to obtain a preprocessed fused UV texture image; The step of inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image includes: The preprocessed fused UV texture image is input into the texture processing model to obtain the target UV texture image.
6. The method according to any one of claims 1 to 5, characterized in that The generating of the three-dimensional face model corresponding to the two-dimensional face image comprises: Performing feature extraction processing on the two-dimensional face image to obtain facial feature information of the two-dimensional face image; The three-dimensional face model is generated according to the facial feature information.
7. A UV texture image generation device based on UV mapping transformation, characterized in that: The device comprises: An image acquisition module, used to acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image; An information processing module is used to perform UV mapping processing on vertex information in the three-dimensional face model according to a UV mapping relationship to obtain a first UV texture image of the two-dimensional face image, and to perform UV mapping processing on pixel point information in the two-dimensional face image according to the UV mapping relationship to obtain a second UV texture image of the two-dimensional face image; An image fusion module, used for performing image fusion processing on the first UV texture image and the second UV texture image to obtain a fused UV texture image of the two-dimensional face image; The image input module is used to input the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image; the resolution of the target UV texture image is higher than the resolution of the fused UV texture image.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Texturing a 3d modeled object
CN105701857A
Image processing method and image processing apparatus, and storage medium
CN109325990A
Three-dimensional face reconstruction method and device, equipment and medium
CN118840476A
Method and device for mapping figure in image based on depth-of-field model
CN119810298A
Face image processing apparatus and computer program
JP2011039869A