Method, device and equipment for generating UV texture image based on UV mapping transformation

By generating a 3D face model and performing UV mapping and image fusion, the problem of complex and low accuracy in UV texture image generation is solved, achieving high-resolution and high-accuracy UV texture image generation.

CN120014140BActive Publication Date: 2025-11-28CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510474916.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-11-28
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

In existing technologies, the UV texture image generation process is complex and has low accuracy, making it difficult to efficiently generate high-quality UV texture images.

Method used

A 3D face model is generated by acquiring a 2D face image. The vertex information of the 3D face model and the pixel information of the 2D face image are then subjected to UV mapping to generate first and second UV texture images. After image fusion, these images are input into the texture processing model to improve resolution and accuracy.

Benefits of technology

It improves the accuracy and resolution of UV texture image generation, effectively preserving the geometric structure information of 3D face models and the detailed information of 2D face images, and generating higher resolution target UV texture images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014140B_ABST
    Figure CN120014140B_ABST
Patent Text Reader

Abstract

The application relates to a UV texture image generation method, device and equipment based on UV mapping transformation, which can be used in the technical field of image processing. The method comprises the following steps: acquiring a two-dimensional face image, and generating a three-dimensional face model corresponding to the two-dimensional face image; performing UV mapping processing on vertex information in the three-dimensional face model according to a UV mapping relationship, obtaining a first UV texture image, and performing UV mapping processing on pixel point information in the two-dimensional face image according to the UV mapping relationship, obtaining a second UV texture image; performing image fusion processing on the first UV texture image and the second UV texture image, and obtaining a fusion UV texture image of the two-dimensional face image; and inputting the fusion UV texture image into a texture processing model, and obtaining a target UV texture image of the two-dimensional face image. The method does not need to be pre-trained by using a data set, and can improve the resolution and accuracy of the generated UV texture image based on a single two-dimensional image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a UV texture image generation method, device and equipment based on UV mapping transformation. BACKGROUND

[0002] With the development of three-dimensional computer graphics technology, three-dimensional face modeling and rendering have been widely used in virtual reality, game development, film special effects and other fields. In three-dimensional 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, but the operation process of generating UV texture images by this method is relatively complex (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

[0004] Therefore, 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.

[0005] In a first aspect, the present application provides a UV texture image generation method based on UV mapping transformation. The method comprises:

[0006] obtaining a two-dimensional face image, and generating a three-dimensional face model corresponding to the two-dimensional face image;

[0007] performing 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 performing 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;

[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] 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 that of the fused UV texture image.

[0010] In one of the embodiments, before the image fusion processing of the first UV texture image and the second UV texture image to obtain the fusion UV texture image of the two-dimensional face image, it further includes:

[0011] Skin region detection is performed on the two-dimensional face image to obtain skin region information of the two-dimensional face image;

[0012] According to the skin region information, skin mask information of the two-dimensional face image is determined;

[0013] The image fusion processing of the first UV texture image and the second UV texture image to obtain the fusion UV texture image of the two-dimensional face image includes:

[0014] According to the skin mask information, the image fusion processing of the first UV texture image and the second UV texture image is performed to obtain the fusion UV texture image.

[0015] In one of the embodiments, the vertex information includes coordinate information of a vertex and color information of the vertex;

[0016] The UV mapping processing of the vertex information in the three-dimensional face model according to the UV mapping relationship to obtain the first UV texture image of the two-dimensional face image includes:

[0017] According to the UV mapping relationship, the coordinate information of the vertex in the three-dimensional face model is subjected to UV mapping processing to obtain UV coordinate information corresponding to the coordinate information of the vertex;

[0018] According to the UV coordinate information and the color information of the vertex, the first UV texture image is generated.

[0019] In one of the embodiments, the input of the fusion UV texture image into the texture processing model to obtain the target UV texture image of the two-dimensional face image includes:

[0020] Through the multi-scale texture feature recognition processing of the texture processing model on the fusion UV texture image, multi-scale texture feature information of the fusion UV texture image is obtained;

[0021] According to the multi-scale texture feature information, texture enhancement processing is performed on the fusion UV texture image to obtain a UV texture image after texture enhancement as the target UV texture image.

[0022] In one of the embodiments, before the input of the fusion UV texture image into the texture processing model to obtain the target UV texture image of the two-dimensional face image, it further includes:

[0023] perform color correction processing on the fused UV texture image to obtain a color corrected fused UV texture image;

[0024] perform denoising processing on the color corrected fused UV texture image to obtain a denoised fused UV texture image;

[0025] perform normalization processing on the denoised fused UV texture image to obtain a preprocessed fused UV texture image;

[0026] 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] inputting the preprocessed fused UV texture image into the texture processing model to obtain the target UV texture image.

[0028] In one of the embodiments, the generating the 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] generating the three-dimensional face model 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 includes:

[0032] an image acquisition module configured 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 configured 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 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 configured 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 the two-dimensional face image;

[0035] an image input module configured 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 that of the fused UV texture image.

[0036] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0037] obtaining a two-dimensional face image, and generating a three-dimensional face model corresponding to the two-dimensional face image;

[0038] performing 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 performing 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;

[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] inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image, wherein a resolution of the target UV texture image is higher than a 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 the computer program is executed by a processor to implement the following steps:

[0042] obtaining a two-dimensional face image, and generating a three-dimensional face model corresponding to the two-dimensional face image;

[0043] performing 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 performing 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;

[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] inputting the fused UV texture image into a texture processing model to obtain a target UV texture image of the two-dimensional face image, wherein a resolution of the target UV texture image is higher than a 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 comprises a computer program, and the computer program is executed by a processor to implement the following steps:

[0047] obtain a three-dimensional face model corresponding to the two-dimensional face image;

[0048] 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;

[0049] 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;

[0050] 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 that of the fused UV texture image.

[0051] The UV texture image generation method, device, computer device, computer readable storage medium, and computer program product based on UV mapping transformation described above obtain a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image. UV mapping processing is performed 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 UV mapping processing is performed 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. 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 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 that of the fused UV texture image. This scheme generates a three-dimensional face model from a two-dimensional face image, and performs UV mapping processing on vertex information of the three-dimensional face model and pixel point information of the two-dimensional face image respectively to obtain two UV texture images with complementary properties, which is conducive to retaining the geometric structure information of the three-dimensional face model and the detail information of the two-dimensional face image at the same time. The two UV texture images are fused to effectively integrate the three-dimensional geometric structure information and the two-dimensional detail information. The fused UV texture image is processed by the texture processing model to obtain a target UV texture image with higher resolution, which is conducive to further improving the performance of texture details, thereby improving the accuracy of UV texture image generation. Moreover, this scheme does not need to be pre-trained with a data set, and can improve the resolution and accuracy of generated UV texture images based on a single two-dimensional image. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the accompanying drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 A flowchart of a UV texture image generation method based on UV mapping transformation in an embodiment;

[0054] Figure 2 A flowchart of a step of obtaining a UV texture image in an embodiment;

[0055] Figure 3 A structural diagram of a SinGAN model in an embodiment;

[0056] Figure 4 A flowchart of a step of refining a texture in an embodiment;

[0057] Figure 5 A structural block diagram of a UV texture image generation device based on UV mapping transformation in an embodiment;

[0058] Figure 6 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0059] In order to make the purposes, technical solutions and advantages of the present application clearer, the content of the present application will be further described in detail below in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present 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 for analysis, stored data, displayed data, etc.) involved in the present application are all information and data allowed by the user or fully allowed by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0061] In an exemplary embodiment, as Figure 1As shown, a UV texture image generation method based on UV mapping transformation is provided, and the embodiment takes the method applied to a terminal as an example; 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 realized through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and the like; the server can be a physical server, or a server cluster or distributed system formed by multiple physical servers, or a cloud server providing cloud computing services. In the embodiment, the method includes the following steps:

[0062] In step S101, a two-dimensional face image is acquired, and a three-dimensional face model corresponding to the two-dimensional face image is generated.

[0063] In step S102, vertex information in the three-dimensional face model is subjected to UV mapping processing according to a UV mapping relationship, to obtain a first UV texture image of the two-dimensional face image, and pixel point information in the two-dimensional face image is subjected to UV mapping processing according to the UV mapping relationship, to obtain a second UV texture image of the two-dimensional face image.

[0064] In step S103, the first UV texture image and the second UV texture image are subjected to image fusion processing, to obtain a fused UV texture image of the two-dimensional face image.

[0065] In step S104, the fused UV texture image is input to 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 that of the fused UV texture image.

[0066] The UV refers to a two-dimensional texture coordinate system used in three-dimensional model texture mapping, wherein U represents a horizontal direction coordinate, and V represents a vertical direction coordinate; the UV mapping can be a process of mapping a texture coordinate (UV coordinate) on a surface of a three-dimensional model to a two-dimensional plane.

[0067] The UV mapping transformation can be a conversion process of mapping a texture coordinate on a surface of a three-dimensional model to a two-dimensional plane, for example, the UV mapping transformation can be a process of converting (X, Y, Z) coordinates in a three-dimensional space to (u, v) coordinates in a two-dimensional UV space through a camera model formula.

[0068] The UV texture image can be a texture image on a two-dimensional plane obtained through the UV mapping transformation.

[0069] The two-dimensional face image can be a plane image containing face information, for example, the two-dimensional face image can be a face photo obtained through a camera.

[0070] The three-dimensional face model can be a geometric model representing a face in a three-dimensional space. For example, the three-dimensional face model can be a three-dimensional model containing vertex coordinates and color information generated from a two-dimensional face image by a three-dimensional face generation network such as Deep3DFaceReconsturction, PRNet (Position Regression Network), or VRNet (Volume Regression Network). The vertex can be a vertex on the surface of the three-dimensional face model.

[0071] The UV mapping relationship can be a correspondence between the vertices of the three-dimensional model and the pixel points in the UV space. For example, the UV mapping relationship can be a coordinate conversion relationship established by an intrinsic matrix and a camera model formula.

[0072] The vertex information can be the spatial position and color information of each vertex in the three-dimensional face model. For example, the vertex information can be data containing (X, Y, Z) coordinate information and (R, G, B) color information.

[0073] The pixel point information can be the color and position information of each pixel in the two-dimensional image. For example, the pixel point information can be the position coordinates and corresponding color values of each point in the two-dimensional image.

[0074] The image fusion processing can be a process of combining multiple UV texture images into one UV texture image. For example, the image fusion processing can be a process of Poisson fusion on the first UV texture image and the second UV texture image.

[0075] The texture processing model can be a deep learning model for optimizing the details of the UV texture image. For example, the texture processing model can be a SinGAN (Single Image GAN) model that enhances texture details through a multi-scale generator and discriminator structure.

[0076] Optionally, after the terminal obtains the two-dimensional face image, the terminal generates a three-dimensional face model corresponding to the two-dimensional face image by using a three-dimensional face generation network such as Deep3DFaceReconsturction, PRNet, or VRNet. The terminal establishes a UV mapping relationship according to an intrinsic matrix and a focal length of a camera model, and the UV mapping relationship is used to convert (X, Y, Z) coordinates in a three-dimensional space into (u, v) coordinates in a UV space. The terminal maps (X, Y, Z) coordinates and (R, G, B) color information of each vertex in the three-dimensional face model to the UV space by using the UV mapping relationship, to obtain a first UV texture image of the two-dimensional face image. The terminal re-maps pixel points in the two-dimensional face image to the UV space by using 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 a SinGAN (Single Image GAN, single image generative adversarial network) model, to obtain a target UV texture image of the two-dimensional face image.

[0077] For example, the terminal first performs preprocessing on the obtained two-dimensional face image, including face detection and alignment on the two-dimensional face image. The terminal converts the preprocessed two-dimensional face image into a three-dimensional face model by using a three-dimensional face generation network, and the three-dimensional face model includes three-dimensional coordinates and color information of grid vertices. The terminal establishes a UV mapping relationship according to a camera focal length f, a pixel width d x and a height d y , a translation vector (c x , c y)computes the intrinsic matrix and establishes the UV mapping relationship. The terminal uses the UV mapping relationship to perform UV mapping processing on the vertex information in the three-dimensional face model to obtain a first UV texture image of the two-dimensional face image, and performs UV mapping processing on the 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, 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 for indicating the effective 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 performing preprocessing such as color correction, denoising, and normalization on the fused UV texture image, the terminal inputs the fused UV texture image into a SinGAN model to obtain a target UV texture image of the two-dimensional face image, wherein the SinGAN model adopts a pyramid structure and includes multiple scale generators and discriminators, and the texture details of the fused UV texture image are gradually optimized from a coarse scale to a fine scale through a layer-by-layer training manner, and finally a target UV texture image with higher resolution is generated.

[0078] In the above UV texture image generation method based on UV mapping transformation, a two-dimensional face image is obtained, and a three-dimensional face model corresponding to the two-dimensional face image is generated; vertex information in the three-dimensional face model is processed by UV mapping according to a UV mapping relationship to obtain a first UV texture image of the two-dimensional face image, and pixel point information in the two-dimensional face image is processed by UV mapping according to the UV mapping relationship 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 a texture processing model to obtain a target UV texture image of the two-dimensional face image; and the resolution of the target UV texture image is higher than that of the fused UV texture image. This scheme 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 point information of the two-dimensional face image respectively to obtain two UV texture images with complementary information, which is conducive to retaining the geometric structure information of the three-dimensional face model and the detail information of the two-dimensional face image. Through fusion processing of the two UV texture images, the three-dimensional geometric structure information and the two-dimensional detail information can be effectively integrated. Then, the fused UV texture image is processed by the texture processing model to obtain a target UV texture image with higher resolution, which is conducive to further improving the performance of texture details, thereby improving the accuracy of UV texture image generation. Moreover, this scheme does not need to be pre-trained with a data set, and can improve the resolution and accuracy of the generated UV texture image based on a single two-dimensional image.

[0079] In an example embodiment, before the image fusion processing of 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 following is further included: performing skin region detection on the two-dimensional face image to obtain skin region information of the two-dimensional face image; determining skin mask information of the two-dimensional face image according to the skin region information; and 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, specifically including the following: performing image fusion processing on the first UV texture image and the second UV texture image according to the skin mask information to obtain the fused UV texture image.

[0080] The skin region detection can be a process of identifying and locating the skin part in the two-dimensional face image, for example, the skin region detection can be a process of processing the two-dimensional face image using a deep learning-based skin detection algorithm.

[0081] The skin region information can be position and range information of the skin part in the two-dimensional face image obtained through the skin region detection, for example, the skin region information can be region marking information indicating the skin part in the two-dimensional face image.

[0082] The skin mask information can be binary image information for indicating the valid skin region, for example, the skin mask information can 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 region detection on the two-dimensional face image, identifies the skin region in the two-dimensional face image through a deep learning-based skin detection algorithm, and obtains skin region information of the two-dimensional face image. The terminal generates binary skin mask information according to the skin region information of the two-dimensional face image, and the skin mask information is used to mark the valid skin region and avoid the influence of occlusions such as glasses and side face self-occlusion. The terminal performs image fusion processing on the first UV texture image and the second UV texture image according to the skin mask information, wherein the first UV texture image provides basic geometric structure information, and the second UV texture image provides rich texture detail information, and a fused UV texture image without occlusion influence is obtained through fusion.

[0084] For example, after the terminal acquires the skin mask information, the terminal performs image fusion processing on the first UV texture image and the second UV texture image by using a Poisson fusion algorithm. Specifically, the terminal takes the first UV texture image (i.e., the UV texture image generated by the rough three-dimensional model) as a base image, takes the second UV texture image (i.e., the UV texture image containing rich texture details obtained by UV mapping from the original two-dimensional face image) as a source image, and simultaneously uses the skin mask information as a weight guide for the fusion area. In 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, while ensuring smooth and natural texture transition at the boundary by solving the Poisson equation, and finally generates a fused UV texture image that removes the influence of occlusions while retaining details. This image retains the detailed texture of the skin area in the second UV texture image, and avoids the influence of occlusions (such as glasses, hair, etc.) and uneven lighting on the texture quality.

[0085] The technical solution provided by the embodiment is advantageous in accurately identifying the effective skin area and the occluded area that needs to be excluded in the two-dimensional face image by detecting the skin area of the two-dimensional face image and generating skin mask information, and is advantageous in avoiding the influence of glasses and other occlusions on the texture fusion result by using the skin mask information to guide the fusion processing of the first UV texture image and the second UV texture image in the image fusion process, thereby improving the accuracy of generating the fused UV texture image.

[0086] In an exemplary embodiment, the vertex information includes coordinate information of the vertex and color information of the vertex; and the vertex information in the three-dimensional face model is subjected to UV mapping processing according to the UV mapping relationship to obtain a first UV texture image of the two-dimensional face image, specifically including the following contents: the coordinate information of the vertex in the three-dimensional face model is subjected to UV mapping processing according to the UV mapping relationship to obtain UV coordinate information corresponding to the coordinate information of the vertex; and the first UV texture image is generated according to the UV coordinate information and the color information of the vertex.

[0087] The coordinate information of the vertex can be the position information of each vertex in the three-dimensional face model in a three-dimensional space, for example, the coordinate information of the vertex can be (X, Y, Z) coordinate values in the three-dimensional space.

[0088] The color information of the vertex can be the color data corresponding to each vertex in the three-dimensional face model, for example, the color information of the vertex can be (R, G, B) color values.

[0089] The UV coordinate information can be position information of a vertex in a three-dimensional face model in a two-dimensional UV space, for example, the UV coordinate information can be a (u, v) coordinate value in a two-dimensional UV space converted from a (X, Y, Z) coordinate in a three-dimensional space through a camera model formula.

[0090] Optionally, the terminal extracts coordinate information and color information of each vertex from the three-dimensional face model, wherein the coordinate information of the vertex includes a (X, Y, Z) coordinate value in a three-dimensional space, and the color information of the vertex includes an (R, G, B) color value. The terminal converts the coordinate information of the vertex in the three-dimensional face model from the three-dimensional space to the UV space according to an intrinsic matrix of the camera model and a UV mapping relationship, to obtain 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, to generate a first UV texture image in the UV space, which retains the geometric structure information of the three-dimensional face model.

[0091] The technical scheme provided in this embodiment is advantageous in retaining the geometric structure features and color features of the three-dimensional face model completely by processing the vertex information in the three-dimensional face model into two parts of coordinate information and color information; and is advantageous in ensuring the accurate correspondence between the geometric structure and the color information in the UV mapping process by the step-by-step processing mode of first performing UV mapping processing on the coordinate information of the vertex to obtain the UV coordinate information, and then combining the color information of the vertex to generate the first UV texture image, thereby being advantageous in improving the accuracy of the generated first UV texture image.

[0092] In one exemplary embodiment, 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, specifically including the following contents: performing multi-scale texture feature recognition processing on the fused UV texture image by the texture processing model to obtain multi-scale texture feature information of the fused UV texture image; performing texture enhancement processing on the fused UV texture image according to the multi-scale texture feature information to obtain a UV texture image after texture enhancement as the target UV texture image.

[0093] The multi-scale texture feature recognition processing can be a process of feature extraction and analysis at each scale level of the UV texture image, for example, the multi-scale texture feature recognition processing can be a feature extraction process at different levels from rough outlines and shapes to delicate textures and skin pores.

[0094] The multi-scale texture feature information can be texture feature data at different scales obtained through the multi-scale texture feature recognition processing, for example, the multi-scale texture feature information can be a feature representation including multiple levels from the overall structure to the local details.

[0095] The texture enhancement processing can be a process of optimizing and enhancing details of the fused UV texture image based on multi-scale texture feature information. For example, the texture enhancement processing can be a process of enhancing texture details through adversarial training of a generator network and a discriminator network.

[0096] The UV texture image after texture enhancement can be a UV texture image with higher resolution and richer details than the fused UV texture image after texture enhancement processing.

[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, extracts features layer by layer from the lowest layer, and obtains texture feature information at each level from rough contours and shapes to delicate textures and skin pores, and the like. In the feature extraction process at each layer, the generator network first receives an up-sampled image of the generation result of the upper layer and random noise as input to generate texture features at the current level, and the discriminator network compares the generated features with real data, continuously optimizes the feature generation quality through adversarial training, and after completing feature extraction at all levels, performs texture enhancement processing on the fused UV texture image according to the obtained multi-scale texture feature information, continuously enhances texture details through iterative optimization layer by layer, and finally generates a UV texture image after texture enhancement as a target UV texture image.

[0098] The technical scheme provided in this embodiment is advantageous in capturing texture feature information comprehensively from different levels and avoiding missing important texture details, by performing multi-scale texture feature recognition processing on the fused UV texture image. The technical scheme is advantageous in performing targeted optimization and enhancement of texture at different levels based on multi-scale texture feature information, thereby being advantageous in generating a target UV texture image with richer details.

[0099] In an exemplary embodiment, 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 following contents are further included: performing color correction processing on the fused UV texture image to obtain a color corrected fused UV texture image; performing denoising processing on the color corrected fused UV texture image to obtain a denoised fused UV texture image; performing normalization processing on the denoised fused UV texture image to obtain a preprocessed fused UV texture image; inputting the fused UV texture image into the texture processing model to obtain the target UV texture image of the two-dimensional face image, specifically including the following contents: inputting the preprocessed fused UV texture image into the texture processing model to obtain the target UV texture image.

[0100] The color correction processing can be a process of adjusting and optimizing the color of the fused UV texture image. For example, the color correction processing can be a process of adjusting color balance, color temperature, saturation, and the like of the fused UV texture image.

[0101] The color-corrected fused UV texture image can be a UV texture image with more accurate color representation after color correction processing. For example, the color-corrected fused UV texture image can be a UV texture image with more natural and balanced color effects.

[0102] The denoising processing can be a process of removing noise and interference information in the fused UV texture image. For example, the denoising processing can be a process of removing random noise and unnecessary details in the image by a filtering algorithm.

[0103] The denoised fused UV texture image can be a UV texture image with clearer texture after denoising processing. For example, the denoised fused UV texture image can be a UV texture image with clearer texture after removing random noise.

[0104] The normalization processing can be a process of standardizing the numerical range of the fused UV texture image. For example, the normalization processing can be a process of mapping the image pixel value to a specific range.

[0105] 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, adjusts the color balance, color temperature, saturation, and the like to make the color of the fused UV texture image more natural and balanced, and obtains a color-corrected fused UV texture image. Then the terminal performs denoising processing on the color-corrected fused UV texture image, removes random noise and unnecessary details in the image by a Gaussian filtering algorithm, and obtains a denoised fused UV texture image. Next, the terminal performs normalization processing on the denoised fused UV texture image, maps the pixel value of the image to a standard range of 0 to 1, and obtains a preprocessed fused UV texture image. Finally, the terminal inputs the preprocessed fused UV texture image into the SinGAN-based texture processing model to obtain a target UV texture image.

[0107] The technical scheme provided by the embodiment is advantageous in improving the image data quality of the input texture processing model, eliminating color deviation, noise interference and non-standard numerical values in the image, and the like, by sequentially performing color correction processing, denoising processing and normalization processing on the fused UV texture image; the preprocessed fused UV texture image obtained through the complete preprocessing process is input into the texture processing model, thereby being advantageous in generating a target UV texture image with higher quality.

[0108] In one exemplary embodiment, a three-dimensional face model corresponding to a two-dimensional face image is generated, specifically including the following contents: performing feature extraction processing on the two-dimensional face image to obtain face feature information of the two-dimensional face image; generating a three-dimensional face model according to the face feature information.

[0109] The feature extraction processing can be a process of analyzing and processing the two-dimensional face image to obtain key facial features, for example, the feature extraction processing can be a process of processing the two-dimensional face image through a network model such as Deep3DFaceReconsturction, PRNet or VRNet.

[0110] The face feature information can be key facial feature data obtained through the feature extraction processing, for example, the face feature information can be data information containing key feature points and feature parameters such as face contour, facial feature position and face shape.

[0111] Optionally, the terminal performs feature extraction processing on the two-dimensional face image, extracts face feature information such as face key feature points, face contour and facial feature position 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 face feature information into a corresponding three-dimensional representation form, wherein the three-dimensional representation form can be a specific data form used by different network models to represent a three-dimensional structure, for example, Deep3DFaceReconsturction adopts 3DMM (3D Morphable Model) coefficient representation, PRNet adopts UV position map representation, and VRNet adopts voxel map representation, and finally generates a three-dimensional face model containing vertex coordinate information and color information.

[0112] The technical scheme provided by the embodiment is advantageous to accurately obtain key feature information of a face, avoids loss of important facial features in the two-dimensional to three-dimensional conversion process, generates a three-dimensional face model based on the extracted facial feature information, is advantageous to ensure feature consistency between the generated three-dimensional face model and the original two-dimensional face image, and is thus advantageous to provide accurate three-dimensional geometric basic data for subsequent texture optimization.

[0113] The following describes the UV texture image generation method based on UV mapping transformation provided by the present application by using an application example. The application example is used to illustrate that the method is applied to a terminal.

[0114] With the rapid development of computer graphics and artificial intelligence technology, three-dimensional face modeling has wide application in many fields, such as film and television special effects, game development, virtual reality, and the like. Among them, face texture is an important factor affecting the similarity and degree of realism of a model. However, there are still many challenges in reconstructing high-precision three-dimensional face texture, such as high cost and complex operation of high-quality three-dimensional face data acquisition, loss of texture details in the reconstruction process, and the like, which will affect the precision of the generated texture. With the development of deep learning, GAN models and their variants have made significant progress in image generation, which provides a new idea for texture optimization. The UV mapping relationship can convert three-dimensional model vertices to a two-dimensional image, so as to fully utilize more related two-dimensional data and efficient models for reconstruction.

[0115] The application example projects the rough texture of a three-dimensional model to a two-dimensional image through the UV mapping relationship, and then performs related optimization operations without using three-dimensional data for training. Combined with deep learning and the SinGAN model, only a single image is used for training and optimization, and a high-precision texture image with rich details is obtained. The application of the SinGAN model can effectively solve the problem of high cost of high-quality three-dimensional data set acquisition, and the refinement of the texture can effectively solve the problem of loss of texture details in the reconstruction process. The above operations effectively avoid the problem of difficult acquisition of three-dimensional data, and improve the detail performance and degree of realism of the texture, meeting the demand of people for high-quality face models in practical applications such as film and television and games.

[0116] The technical scheme of the application example includes three parts of UV mapping to obtain a texture image, a SinGAN structure and training method, and enhancement of texture details, which are described in detail as follows.

[0117] 1. UV mapping:

[0118] Reference Figure 2 , Figure 2 is a flowchart from generating a three-dimensional model from a two-dimensional image to obtaining a UV texture image. InFigure 2 In the method, the generation of the three-dimensional face and the generation of the UV texture map are two parts. The three-dimensional face model is obtained by processing a two-dimensional face image through a three-dimensional model generation network, and the three-dimensional face model can be mapped to a two-dimensional image for difference comparison. The three-dimensional face model is subjected to UV mapping to obtain a rough UV texture map. The UV position map (which is a representation of the UV mapping relationship) can be determined according to the three-dimensional face model, and the two-dimensional face image is subjected to remapping processing according to the UV position map to obtain a detailed UV texture map.

[0119] The application instance focuses on the task of refining the texture. The generation of the face model from the two-dimensional image can be Deep3DFaceReconsturction, PRNet or VRNet, etc. Based on the preliminarily generated face model, the (X, Y, Z) (three-dimensional space coordinate axis) coordinate information and (R, G, B) (red, green and blue three primary color channels) color information of each vertex in the three-dimensional space can be obtained, wherein each vertex corresponds to a pixel point in the UV space. Assuming that the width of a pixel is d x , the height is d y , and the translation vector is (c x , c y ), the intrinsic matrix is calculated according to the focal length and the translation amount, the coordinate transformation can be completed by the following camera model formula, and the UV mapping is realized. According to the color information corresponding to each vertex, the corresponding texture map in the UV space can be obtained.

[0120]

[0121] The parameters in the above camera model formula can be explained as follows:

[0122] u: U coordinate in UV texture coordinate system, representing the horizontal direction texture coordinate;

[0123] v: V coordinate in UV texture coordinate system, representing the vertical direction texture coordinate;

[0124] x: horizontal position coordinate of the pixel in the image;

[0125] y: vertical position coordinate of the pixel in the image;

[0126] d x : width value of a pixel;

[0127] d y : height value of a pixel;

[0128] c x : translation amount of the principal point of the camera in the x direction, that is, the horizontal offset of the optical center;

[0129] cy : translation of camera principal point in y direction, i.e. vertical offset of optical center;

[0130] Z c : depth value in camera coordinate system, representing the distance of an object to the camera;

[0131] f: focal length of the camera, affecting the magnification of the image;

[0132] X c : X coordinate of a point in camera coordinate system in three-dimensional space;

[0133] Y c : Y coordinate of a point in camera coordinate system in three-dimensional space;

[0134] Z c : Z coordinate of a point in camera coordinate system in three-dimensional space.

[0135] Given the UV mapping relationship, the pixel points in the original face image can be one-to-one corresponding to the UV texture map, obtaining a UV texture map with rich details. It is worth noting that the texture map remapped from the original face image will have the occlusion in the original image, such as glasses, side face self-occlusion, etc., and is also easily affected by light factors. Therefore, skin detection needs to be performed on the texture map to obtain a skin mask to avoid the influence of occlusions.

[0136] 2. SinGAN structure and training method:

[0137] SinGAN model can capture multi-scale representation of data from a single image. Its specific principle and structure refer to Figure 3 . The model is a pyramid structure, that is, each layer is a set of independent GAN (Generative Adversarial Network), and the input of each layer depends on the up-sampling of the upper layer result. Therefore, during training, a layer-by-layer training method is adopted, and the lowest layer is trained first. This layer learns the global structure of the entire image. After the training of each layer is completed, the trained model and parameters are saved, and the next layer is trained. In this way, a network model that can generate many detailed and realistic new pictures can be trained from coarse scale to fine scale. In Figure 3 , the pyramid structure of SinGAN is shown, including multiple levels of generator (Generator) and discriminator (Discriminator) networks. From the top, you can see the outputs labeled as fake and real, indicating the generated fake image and the real image. On the left side of the model is the generator part (multi-scale image block generator), labeled with G N , G N-1… G0, denotes the generator network at different levels; on the right is the discriminator part (multi-scale image patch discriminator), marked as D N , D N-1 … D0, denotes the discriminator network at different levels. The input of the model includes different scales of the original image, as well as 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 the process of 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, and the model adjusts it to multiple input scales for subsequent use after receiving it. The model is a structure of an adversarial generative network in a macroscopic sense, that is, a generator (Generator) and a discriminator (Discriminator), and the generator and the discriminator are respectively different scales of generation / discrimination networks, and one-to-one correspondence, thus forming a pyramid structure. Inside the pyramid structure, the highest scale is marked as 0, and the lowest scale is marked as N. The model starts training 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, from the N-1 layer, the input of the model is added to the noise on the basis of the last layer, that is, the image generated by the Nth layer generator is up-sampled to the N-1 layer scale, and the rest is the same.

[0139] 3. Refine the texture:

[0140] Reference Figure 4 , the refinement of the texture is divided into two steps of fusion and adversarial generation. In Figure 4 , it is divided into two parts of texture map fusion and texture map refinement; a two-dimensional face image is processed to obtain a skin mask, and Poisson fusion is performed on the coarse UV texture map and the detail UV texture map according to the skin mask to obtain a fused UV texture map. The fused UV texture map is preprocessed, and then input into the model, the model performs multi-scale image processing, and after being processed by the generator and the discriminator, a refined UV texture map is obtained.

[0141] Step 1: Fuse the texture map.

[0142] Based on the UV mapping relationship, two UV texture maps can be obtained from the coarse three-dimensional model and the original face image respectively, the former lacks part of the texture details, and the latter contains rich texture details in the original image. Poisson fusion is performed on the two based on the skin mask to obtain a UV texture map with details while removing the influence of occlusion.

[0143] Step 2: Generate the texture map.

[0144] This UV texture map is trained by 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 into the SinGAN model. The SinGAN model decomposes the texture into multiple scale representations, from rough contours and shapes to detailed textures and skin pores, with each scale focusing on different levels of detail. During 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 between the generated details and real data. Through continuous optimization and iteration, the details of the texture are enhanced, resulting in higher-resolution and more realistic generated textures.

[0145] GAN (Generative Adversarial Network): a deep learning model composed of two networks, which generates new data samples through the adversarial training of the generator and the discriminator.

[0146] SinGAN (Single Image GAN): an innovative generative adversarial network model that only requires a natural image as training data to capture the internal statistics of the image and generate new samples.

[0147] UV mapping: a process of mapping the texture coordinates (UV coordinates) of a three-dimensional model surface to a two-dimensional plane, commonly used for three-dimensional model mapping.

[0148] The technical solution provided by the 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 point information of the two-dimensional face image respectively, obtaining two UV texture images with complementary properties, which is beneficial to retaining the geometric structure information of the three-dimensional face model and the detail information of the two-dimensional face image simultaneously; 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 processing the fused UV texture image through the texture processing model to obtain a higher-resolution target UV texture image, which is beneficial to further improve the performance of texture details, thereby improving the accuracy of UV texture image generation.

[0149] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.

[0150] Based on the same inventive concept, the embodiments of the present application also provide a UV texture image generation device based on UV mapping transformation for implementing the UV texture image generation method based on UV mapping transformation described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described 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 described above, which will not be repeated here.

[0151] In one exemplary embodiment, as shown in Figure 5 a UV texture image generation device based on UV mapping transformation is provided, which can include:

[0152] An image acquisition module 501 is configured to acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image.

[0153] An information processing module 502 is configured 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 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 configured 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 the two-dimensional face image.

[0155] An image input module 504 is configured to input the fused UV texture image to a texture processing model to obtain a target UV texture image of the two-dimensional face image, wherein the resolution of the target UV texture image is higher than that of the fused UV texture image.

[0156] In an example embodiment, the UV texture image generation apparatus 500 based on UV mapping transformation further comprises: a region detection module configured to perform skin region detection on the two-dimensional face image to obtain skin region information of the two-dimensional face image; and determine skin mask information of the two-dimensional face image according to the skin region information; and the image fusion module 503 is further configured to perform image fusion processing on the first UV texture image and the second UV texture image according to the skin mask information to obtain a fused UV texture image.

[0157] In an example embodiment, the vertex information comprises coordinate information of the vertex and color information of the vertex; and the information processing module 502 is further configured to perform UV mapping processing on the coordinate information of the vertex in the three-dimensional face model according to the UV mapping relationship to obtain UV coordinate information corresponding to the coordinate information of the vertex; and generate the first UV texture image according to the UV coordinate information and the color information of the vertex.

[0158] In an example embodiment, the image input module 504 is further configured to perform 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; and perform texture enhancement processing on the fused UV texture image according to the multi-scale texture feature information to obtain a UV texture image after texture enhancement as the target UV texture image.

[0159] In an example embodiment, the UV texture image generation apparatus 500 based on UV mapping transformation further comprises: a correction processing module configured to perform color correction processing on the fused UV texture image to obtain a fused UV texture image after color correction; perform denoising processing on the fused UV texture image after color correction to obtain a fused UV texture image after denoising; perform normalization processing on the fused UV texture image after denoising to obtain a preprocessed fused UV texture image; and the image input module 504 is further configured to input the preprocessed fused UV texture image to the texture processing model to obtain the target UV texture image.

[0160] In an example embodiment, the image acquisition module 501 is further configured to perform feature extraction processing on the two-dimensional face image to obtain face feature information of the two-dimensional face image; and generate the three-dimensional face model according to the face feature information.

[0161] The above-mentioned modules of the UV texture image generation apparatus based on UV mapping transformation can be realized by software, hardware and combinations thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned modules.

[0162] In an exemplary embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram thereof can be as shown in FIG. 1. Figure 6 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 configured 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 running the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program is executed by the processor to implement a UV texture image generation method based on UV mapping transformation. The display unit of the computer device is configured 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. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0163] Those skilled in the art can understand that Figure 6 The structure shown in the above embodiment is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the diagram, or combine certain components, or have a different arrangement of components.

[0164] In an exemplary embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram thereof can be as shown in FIG. 1.

[0165] In an exemplary embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[0166] In an exemplary embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.

[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. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present 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 storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric 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 but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0168] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0169] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for generating UV texture images based on UV mapping transformation, characterized in that, The method includes: A two-dimensional face image is acquired, and a three-dimensional face model corresponding to the two-dimensional face image is generated; According to the UV mapping relationship, the vertex information in the 3D face model is subjected to UV mapping processing to obtain the first UV texture image of the 2D face image, and according to the UV mapping relationship, the pixel information in the 2D face image is subjected to UV mapping processing to obtain the second UV texture image of the 2D face image; the first UV texture image retains the geometric structure information of the 3D face model; the second UV texture image retains the texture detail information of the 2D face image; The Poisson fusion algorithm is used to perform 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; wherein, the skin masking information of the two-dimensional face image is used as the weight guide for the fusion region of the fused UV texture image. During the fusion process, the texture detail information in the second UV texture image is used for the skin region, while the information in the first UV texture image is retained for the non-skin region or the occluded region. 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 resolution of the target UV texture image is higher than that 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: Skin region detection is performed on the two-dimensional face image to obtain skin region information of the two-dimensional face image; Based on the skin region information, determine the skin masking information of the two-dimensional face image; The step of 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: Based on the skin masking information, the first UV texture image and the second UV texture image are subjected to image fusion processing to obtain the fused UV texture image.

3. The method according to claim 1, characterized in that, The vertex information includes the vertex's coordinate information and the vertex's color information; The step of performing UV mapping processing on the vertex information in the 3D face model according to the UV mapping relationship to obtain the first UV texture image of the 2D face image includes: According to the UV mapping relationship, the coordinate information of the vertices in the 3D face model is processed by UV mapping to obtain the UV coordinate information corresponding to the coordinate information of the vertices; The first UV texture image is generated based on the UV coordinate information and the color information of the vertices.

4. The method according to claim 1, characterized in that, The step of inputting the fused UV texture image into the texture processing model to obtain the target UV texture image of the two-dimensional face image includes: The texture processing model is used to perform multi-scale texture feature recognition processing on the fused UV texture image to obtain multi-scale texture feature information of the fused UV texture image; Based on the multi-scale texture feature information, the fused UV texture image is subjected to texture enhancement processing to obtain a texture-enhanced UV texture image, which is used 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: The fused UV texture image is subjected to color correction processing to obtain a color-corrected fused UV texture image; The color-corrected fused UV texture image is denoised to obtain a denoised fused UV texture image. The denoised fused UV texture image is normalized to obtain a preprocessed fused UV texture image; The step of inputting the fused UV texture image into the texture processing model to obtain the 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 process of generating the three-dimensional face model corresponding to the two-dimensional face image includes: The two-dimensional face image is subjected to feature extraction processing to obtain the facial feature information of the two-dimensional face image; The three-dimensional face model is generated based on the facial feature information.

7. A UV texture image generation device based on UV mapping transformation, characterized in that, The device includes: The image acquisition module is used to acquire a two-dimensional face image and generate a three-dimensional face model corresponding to the two-dimensional face image. The information processing module is used to perform UV mapping processing on the 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 the pixel 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; the first UV texture image retains the geometric structure information of the three-dimensional face model; the second UV texture image retains the texture detail information of the two-dimensional face image; The image fusion module is used to perform image fusion processing on the first UV texture image and the second UV texture image using the Poisson fusion algorithm to obtain the fused UV texture image of the two-dimensional face image; wherein, the skin masking information of the two-dimensional face image is used as the weight guide for the fusion region of the fused UV texture image, and during the fusion process, the texture detail information in the second UV texture image is used for the skin region, while the information in the first UV texture image is retained for the non-skin region or the occluded region; An 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, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Three-dimensional face reconstruction method and device, equipment and medium

    CN118840476A