Map generation method and device, electronic equipment and readable storage medium

Through the generative neural network model and low-rank decomposition technology based on small sample training, the light and shadow information is directly removed from the texture map to generate albedo maps, which solves the problem of low efficiency in the existing technology, and achieves high efficiency and automation map generation.

CN119027563APending Publication Date: 2024-11-26MIGU CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411071722.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the prior art, the generation efficiency of albedo maps is low, and the texture maps need to be manually edited, resulting in high time consumption and low efficiency.

Method used

By training the target model based on the small sample training method, removing the light and shadow information of the texture map, directly generating the albedo map, using the generative neural network model and low-rank decomposition technology for iterative training, reducing parameter adjustments, and improving training efficiency.

Benefits of technology

The generation efficiency and quality of albedo maps are improved, the dependence on a large number of training samples is reduced, data resources are saved, and an automated map generation process is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027563A_ABST
    Figure CN119027563A_ABST
Patent Text Reader

Abstract

The invention discloses a map generation method and device, electronic equipment and a readable storage medium, and belongs to the technical field of artificial intelligence. The map generation method in the embodiment of the invention comprises the following steps: acquiring a texture map of a target object; and removing light and shadow information of the texture map through a target model trained based on a small sample training method to obtain an albedo map of the target object. Therefore, the albedo map can be obtained without manually editing the texture map, so that the generation efficiency of the albedo map is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a map generation method, device, electronic device and readable storage medium. Background Art

[0002] In the related art, the albedo map is usually generated by first generating a geometric model of a target object (such as a user), then performing texture mapping on the geometric model of the target object to obtain a corresponding texture map, and finally manually editing the texture map to obtain a corresponding albedo map. In this case, since manually editing the texture map usually takes a certain amount of time, the albedo map generation efficiency will be low. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a map generation method, device, electronic device and readable storage medium to solve the problem of low albedo map generation efficiency in related technologies.

[0004] In order to solve the above technical problems, this application is implemented as follows:

[0005] In a first aspect, a method for generating a texture is provided, which is applied to an electronic device and includes:

[0006] Get the texture map of the target object;

[0007] The light and shadow information of the texture map is removed by a target model trained based on a small sample training method to obtain an albedo map of the target object.

[0008] Optionally, before acquiring the texture map of the target object, the method further includes:

[0009] Acquire a training data set, wherein the training data set includes a plurality of data pairs, each data pair consisting of a texture map and its corresponding albedo map;

[0010] The multiple groups of data are used to perform iterative training of the model, and during the iterative training process, the weight parameters of the corresponding model are decomposed by reduced rank to obtain the target model.

[0011] Optionally, the target model is obtained by following the steps:

[0012] Inputting the texture map included in the first data pair into a pre-established initial model for processing to obtain a first albedo map, and updating the weight parameters of the initial model by decomposing the weight parameters of the initial model into a low-rank matrix according to the first difference to obtain an updated model; wherein the first data pair is any one of the multiple data pairs, and the first difference is obtained by comparing the first albedo map with the albedo map included in the first data pair;

[0013] The updated model is used to perform the following iterative training process until the model convergence condition is met: the texture map included in the second data pair is input into the model updated in the previous round of iterative update for processing to obtain a second albedo map, and according to the second difference, the weight parameters of the model updated in the previous round of iterative update are updated by decomposing them into a low-rank matrix; wherein the second data pair is any one group of data pairs among the multiple groups of data pairs, and the second difference is obtained by comparing the second albedo map with the albedo map included in the second data pair.

[0014] Optionally, the multiple groups of data pairs are data pairs of the same object under different lighting conditions at the same time.

[0015] Optionally, the target model is a generative neural network model.

[0016] Optionally, obtaining a texture map of the target object includes:

[0017] Get the correspondence between the image and the two-dimensional UV map;

[0018] Texture mapping is performed on the image of the target object according to the corresponding relationship to obtain a texture map of the target object.

[0019] Optionally, the acquired correspondence between the image and the two-dimensional UV map includes:

[0020] Establishing a correspondence between the image and the three-dimensional model according to a correspondence between the two-dimensional key points in the image and the three-dimensional key points in the three-dimensional model constructed based on the image;

[0021] The corresponding relationship between the image and the three-dimensional model and the preset corresponding relationship between the two-dimensional UV map and the three-dimensional model are used to determine the corresponding relationship between the image and the two-dimensional UV map.

[0022] In a second aspect, a texture generation device is provided, which is applied to an electronic device, and includes:

[0023] A first acquisition module is used to acquire a texture map of a target object;

[0024] The processing module is used to remove the light and shadow information of the texture map through a target model trained based on a small sample training method to obtain the albedo map of the target object.

[0025] Optionally, the map generating device further includes:

[0026] A second acquisition module is used to acquire a training data set, wherein the training data set includes a plurality of data pairs, each data pair consisting of a texture map and its corresponding albedo map;

[0027] The training module is used to perform iterative training of the model using the multiple sets of data pairs, and to perform rank reduction decomposition on the weight parameters of the corresponding model during the iterative training process to obtain the target model.

[0028] Optionally, the target model is obtained by following the steps:

[0029] Inputting the texture map included in the first data pair into a pre-established initial model for processing to obtain a first albedo map, and updating the weight parameters of the initial model by decomposing the weight parameters of the initial model into a low-rank matrix according to the first difference to obtain an updated model; wherein the first data pair is any one of the multiple data pairs, and the first difference is obtained by comparing the first albedo map with the albedo map included in the first data pair;

[0030] The updated model is used to perform the following iterative training process until the model convergence condition is met: the texture map included in the second data pair is input into the model updated in the previous round of iterative update for processing to obtain a second albedo map, and according to the second difference, the weight parameters of the model updated in the previous round of iterative update are updated by decomposing them into a low-rank matrix; wherein the second data pair is any one group of data pairs among the multiple groups of data pairs, and the second difference is obtained by comparing the second albedo map with the albedo map included in the second data pair.

[0031] Optionally, the multiple groups of data pairs are data pairs of the same object under different lighting conditions at the same time.

[0032] Optionally, the target model is a generative neural network model.

[0033] Optionally, the first acquisition module includes:

[0034] An acquisition unit, used for acquiring a corresponding relationship between an image and a two-dimensional UV map;

[0035] A mapping unit is used to perform texture mapping on the image of the target object according to the corresponding relationship to obtain a texture map of the target object.

[0036] Optionally, the acquisition unit is specifically used to: establish a correspondence between the image and the three-dimensional model based on the correspondence between the two-dimensional key points in the image and the three-dimensional key points in the three-dimensional model constructed based on the image; determine the correspondence between the image and the two-dimensional UV map based on the correspondence between the image and the three-dimensional model and the correspondence between the pre-set two-dimensional UV map and the three-dimensional model.

[0037] In a third aspect, an electronic device is provided, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0038] In a fourth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0039] In a fifth aspect, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0040] In the embodiment of the present application, after obtaining the texture map of the target object, the albedo map of the target object can be directly generated by a pre-trained model, without manually editing the texture map to obtain the albedo map, thereby improving the generation efficiency of the albedo map and improving the quality of the generated albedo map. Furthermore, by using the target model trained based on the small sample training method to generate the albedo map, it is not necessary to rely on a large number of training samples to train the model, thereby saving data resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1A is a schematic diagram of a texture map in an embodiment of the present application;

[0042] Figure 1B In the embodiment of the present application Figure 1A Schematic diagram of the albedo map corresponding to the texture map shown;

[0043] Figure 2 is a flow chart of a method for generating a map provided in an embodiment of the present application;

[0044] Figure 3 It is a schematic diagram of the model training process in the embodiment of the present application;

[0045] Figure 4 is a schematic diagram of the reasoning process in the embodiment of the present application;

[0046] Figure 5is a structural schematic diagram of a map generation device provided in an embodiment of the present application;

[0047] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] In order to facilitate understanding of the embodiments of the present application, the following contents are first described.

[0050] The texture map can be selected as a map that records the color reflected by the three-dimensional model under the ambient light at that time when the three-dimensional model is reconstructed.

[0051] Albedo map is a map used in computer graphics and 3D rendering. It describes the color and reflectivity of the surface of an object. It is usually used to assign color and material properties to the surface of a 3D model in order to simulate lighting and shadow effects during the rendering process. Albedo map includes both basic color information and other material properties, such as glossiness and roughness. During the rendering process, the albedo map can affect the reaction of the surface of the object to the light, thereby affecting the realism and visual effect of the final rendering result. Albedo map and texture map are both pictures. The difference is that the texture map is affected by the ambient light when the 3D model is reconstructed. For the same object / object, the texture map obtained by 3D reconstruction under different lighting is different; while the albedo map describes the inherent optical properties of the object / object corresponding to a 3D model, which has nothing to do with the external lighting. An intuitive relationship can be: texture map = lighting * albedo map.

[0052] for example Figure 1A and Figure 1B As shown, Figure 1A This is a schematic diagram of a texture map of a human face in an embodiment of the present application. There are some brighter highlight areas on the texture map, that is, there is light and shadow information; Figure 1B for Figure 1A Schematic diagram of the albedo map corresponding to the texture map shown in the figure. The color on the albedo map is relatively flat and uniform, and the light and shadow information has been removed.

[0053] The following, in conjunction with the accompanying drawings, describes in detail the map generation method, device, electronic device and readable storage medium provided by the embodiments of the present application through specific embodiments and their application scenarios.

[0054] See also Figure 2 , Figure 2 is a flowchart of a method for generating a map provided by an embodiment of the present application, the method is applied to electronic devices, such as Figure 2 As shown, the method comprises the following steps:

[0055] Step 21: Get the texture map of the target object;

[0056] Step 22: Remove the light and shadow information of the texture map through a target model trained based on a small sample training method to obtain an albedo map of the target object.

[0057] In the embodiment of the present application, the target object may be a human face, an object (such as a table, a chair, etc.), etc., which is not limited. The target model is a model used to remove light and shadow information of a texture map.

[0058] The above-mentioned removal of light and shadow information from the texture map by a target model trained based on a small sample training method can be understood as: achieving basic semantic alignment of the texture map and the albedo map through the target model, and removing the light and shadow information from the texture map to obtain the corresponding albedo map. The basic semantic alignment of the texture map and the albedo map is due to the fact that the albedo map is generated by the texture map. By smoothing the highlight part of the texture map and brightening the shadow part of the texture map, the corresponding albedo map can be obtained. Since the basic semantic alignment is implemented by processing the lighting information of the texture map, the regional information in the texture map will not change. For example, if a certain pixel corresponds to the eye area, it still corresponds to the eye area after processing. For example, if a certain pixel corresponds to the mouth area, it still corresponds to the mouth area after processing. Removing light and shadow information to obtain the albedo map is for subsequent applications. For example, when a model generated based on the albedo map is placed in a three-dimensional digital scene, the lighting of the three-dimensional digital scene will be adjusted according to the needs of the application. If the albedo map retains the light and shadow information on the initial texture map, the final model will be distorted.

[0059] Optionally, the target model may be a generative neural network model, such as a Stable Diffusion model, etc., so as to utilize the generative neural network model to project / process the input texture map in the albedo map space, thereby generating a corresponding albedo map.

[0060] The advantage of the small sample training method is that a relatively good model training effect can be obtained with a smaller sample size. The strategies related to the small sample training method can be selected as but not limited to: 1) low-rank decomposition of the model weight parameters during model training, thereby reducing the number of parameters that need to be adjusted; 2) training data enhancement, such as using the learned transformation rules to modify the original training data, thereby increasing the size of the training data set; 3) using pre-trained models, such as using pre-trained models trained on large data sets to initialize model training on small data sets to improve training efficiency on small data sets; 4) freezing some model layers, such as freezing some layers of the pre-trained model during small sample training, so that the weights of these layers will not be updated during the training process, which helps the model converge faster; and so on.

[0061] In the embodiment of the present application, after obtaining the texture map of the target object, the albedo map of the target object can be directly generated by a pre-trained model, without manually editing the texture map to obtain the albedo map, thereby improving the generation efficiency of the albedo map and improving the quality of the generated albedo map. Furthermore, by using a target model trained based on a small sample training method to generate an albedo map, it is not necessary to rely on a large number of training samples to train the model, thereby saving data resources.

[0062] Optionally, the solution in this application can be applied to scenarios such as the generation of three-dimensional face models. The generation process of a three-dimensional face model usually includes the following processes: data acquisition, data processing, topology generation, material assignment, texture mapping, rendering, and animation production; the solution in this application targets the "texture mapping" step and optimizes the method of obtaining the albedo map. With the help of the solution in this application, it is possible to generate a high-quality albedo map from a single photo, thereby solving the problems of high production cost and long production cycle of three-dimensional face models.

[0063] Optionally, the texture map of the target object can be obtained by texture mapping the scan result of the target object by an artist, or it can be obtained based on the correspondence between the pre-acquired image and the two-dimensional UV map. The "UV" in the two-dimensional UV map refers to the abbreviation of U, V texture map coordinates, which defines the position information of each point on the image. These points are interconnected with the three-dimensional model to determine the position of the surface texture map.

[0064] Optionally, the process of obtaining the texture map of the target object in step 21 may include:

[0065] Get the correspondence between the image and the two-dimensional UV map;

[0066] Texture mapping is performed on the image of the target object according to the corresponding relationship to obtain a texture map of the target object.

[0067] Optionally, the above-mentioned acquisition of the correspondence between the image and the two-dimensional UV map may include: first, establishing the correspondence between the image and the three-dimensional model according to the correspondence between the two-dimensional key points in the image and the three-dimensional key points in the three-dimensional model constructed based on the image; then, determining the correspondence between the image and the two-dimensional UV map according to the correspondence between the image and the three-dimensional model and the pre-set correspondence between the two-dimensional UV map and the three-dimensional model. For example, when reconstructing a three-dimensional model based on an image, the correspondence between the image and the three-dimensional model may be established through the correspondence between the three-dimensional key points in the three-dimensional model and the two-dimensional key points in the image, and then the correspondence between the image and the two-dimensional UV map may be established in combination with the correspondence between the pre-made two-dimensional UV map and the three-dimensional model.

[0068] In the embodiment of the present application, in order to improve the efficiency of model training, a small sample training method using low-rank adaptation (LoRA) or ControlNet can be used to train the LoRA model. For example, the LoRA technology can be used to fine-tune the Stable Diffusion model with a small number of samples to obtain the desired model. The ControlNet method can copy the original model during model training, and then fix the parameters of the original model during training, while adjusting the other copied parts, so as to ensure that after training with a small sample, problems such as "mode collapse" will not occur.

[0069] Optionally, the map generation method in this embodiment may further include:

[0070] Obtain a training data set, wherein the training data set includes a plurality of data pairs, each data pair consisting of a texture map and its corresponding albedo map; wherein the texture map in each data pair can be understood as an albedo map with light interference, and the albedo map in each data pair can be understood as a clean albedo map;

[0071] The multiple sets of data are used to perform iterative training of the model, and the weight parameters of the corresponding model are decomposed by reduced rank during the iterative training process to obtain the target model. For the reduced rank decomposition method, the existing method can be adopted, and this is not limited. Thus, with the help of reduced rank decomposition, a relatively good model training effect can be obtained with a smaller sample size.

[0072] Optionally, the target model is obtained by following the steps:

[0073] Input the texture map included in the first data pair into a pre-established initial model for processing (such as removing light and shadow information of the texture map) to obtain a first albedo map (i.e., the processed texture map), and according to the first difference, update the weight parameters of the initial model by decomposing the weight parameters of the initial model into a low-rank matrix to obtain an updated model; wherein the first data pair is any one of the multiple data pairs, and the first difference is obtained by comparing the first albedo map with the albedo map included in the first data pair;

[0074] The updated model is used to perform the following iterative training process until the model convergence condition is met: the texture map included in the second data pair is input into the model of the previous round of iterative update for processing (such as removing the light and shadow information of the texture map), and the second albedo map (i.e., the processed texture map) is obtained, and according to the second difference, the weight parameters of the model of the previous round of iterative update are decomposed into a low-rank matrix to update the weight parameters of the model of the previous round of iterative update; wherein, the second data pair is any one of the multiple groups of data pairs, and the second difference is obtained by comparing the second albedo map with the albedo map included in the second data pair. This update is specifically to optimize the objective function to obtain a minimum value. The model convergence condition can be set based on actual needs, such as the number of iterations reaching a set value.

[0075] In an optional embodiment, about 100 groups of data pairs may be constructed to obtain a training data set.

[0076] In an optional embodiment, the model weight parameters are decomposed into a low-rank matrix such as: for each weight parameter W in the model, assuming that W is a tensor of m*n*i*o dimensions, then W can be regarded as i*o m*n-dimensional matrices. If each m*n-dimensional matrix is ​​decomposed into the product of two matrices A*B, where A is of m*2 order and B is of 2*n order, then A*B is still an m*n-dimensional matrix, but the number of parameters has changed from the original m*n parameters to m*2+2*n=2(m+n) parameters; when m and n are relatively large, the number of parameters of A*B is much smaller than the original number of parameters; therefore, when updating the model weights, it is only necessary to find a suitable A and B so that A*B meets the optimization requirements, and the optimization requirements refer to the optimization objective function to obtain the minimum value. Since the rank of A*B is relatively low, it can better maintain some properties of the original matrix, so that the phenomenon of "overfitting" is not easy to occur. "Overfitting" is a common phenomenon in data-driven machine learning. The specific performance is: the model achieves good results on the training data, but performs poorly on the test set.

[0077] Optionally, when obtaining the texture map contained in the data pair in the training data set, it can be obtained by an artist through texture mapping of the scanning result, or it can be obtained based on the correspondence between the pre-acquired image and the two-dimensional UV map.

[0078] Optionally, in order to improve the model training effect, the multiple data pairs included in the training data set can be selected as data pairs of the same object under different illumination at similar times. Preferably, in order to further reduce the error, the multiple data pairs included in the training data set are data pairs of the same object under different illumination at the same time.

[0079] For example, see Figure 3 As shown, the model training process in this scheme can be summarized as follows: in each round of iterative training, the albedo map with light interference (i.e., the texture map in the training data pair) is input into the generative neural network model for processing to obtain a repaired albedo map, and then the model parameters are updated according to the difference between the repaired albedo map and the clean albedo map (i.e., the albedo map in the training data pair) to optimize the objective function and obtain the minimum value.

[0080] For example, see Figure 4 As shown, the model reasoning / usage process in this scheme can be summarized as follows: the albedo map with light interference (such as obtained from a photo, which can be a face photo taken by a mobile phone or other camera device) is input into the generative neural network model for reasoning / repairing to obtain the repaired albedo map.

[0081] It should be noted that the sticker generation method provided in the embodiment of the present application can be executed by a sticker generation device or a control module in the sticker generation device for executing the sticker generation method. In the embodiment of the present application, the sticker generation device provided in the embodiment of the present application is described by taking the sticker generation device executing the sticker generation method as an example.

[0082] See also Figure 5 , Figure 5 is a schematic diagram of a structure of a map generation device provided in an embodiment of the present application, and the device is applied to electronic devices, such as Figure 5 As shown, the map generating device 50 includes:

[0083] A first acquisition module 51 is used to acquire a texture map of a target object;

[0084] The processing module 52 is used to remove the light and shadow information of the texture map through the target model trained based on the small sample training method to obtain the albedo map of the target object.

[0085] In the embodiment of the present application, after obtaining the texture map of the target object, the albedo map of the target object can be directly generated by a pre-trained model, without manually editing the texture map to obtain the albedo map, thereby improving the generation efficiency of the albedo map and improving the quality of the generated albedo map. Furthermore, by using a target model trained based on a small sample training method to generate an albedo map, it is not necessary to rely on a large number of training samples to train the model, thereby saving data resources.

[0086] Optionally, the map generating device 50 further includes:

[0087] A second acquisition module is used to acquire a training data set, wherein the training data set includes a plurality of data pairs, each data pair consisting of a texture map and its corresponding albedo map;

[0088] The training module is used to perform iterative training of the model using the multiple sets of data pairs, and to perform rank reduction decomposition on the weight parameters of the corresponding model during the iterative training process to obtain the target model.

[0089] Optionally, the target model is obtained by following the steps:

[0090] Inputting the texture map included in the first data pair into a pre-established initial model for processing to obtain a first albedo map, and updating the weight parameters of the initial model by decomposing the weight parameters of the initial model into a low-rank matrix according to the first difference to obtain an updated model; wherein the first data pair is any one of the multiple data pairs, and the first difference is obtained by comparing the first albedo map with the albedo map included in the first data pair;

[0091] The updated model is used to perform the following iterative training process until the model convergence condition is met: the texture map included in the second data pair is input into the model updated in the previous round of iterative update for processing to obtain a second albedo map, and according to the second difference, the weight parameters of the model updated in the previous round of iterative update are updated by decomposing them into a low-rank matrix; wherein the second data pair is any one group of data pairs among the multiple groups of data pairs, and the second difference is obtained by comparing the second albedo map with the albedo map included in the second data pair.

[0092] Optionally, the multiple groups of data pairs are data pairs of the same object under different lighting conditions at the same time.

[0093] Optionally, the target model is a generative neural network model.

[0094] Optionally, the first acquisition module 51 includes:

[0095] An acquisition unit, used for acquiring a corresponding relationship between an image and a two-dimensional UV map;

[0096] A mapping unit is used to perform texture mapping on the image of the target object according to the corresponding relationship to obtain a texture map of the target object.

[0097] Optionally, the acquisition unit is specifically used to: establish a correspondence between the image and the three-dimensional model based on the correspondence between the two-dimensional key points in the image and the three-dimensional key points in the three-dimensional model constructed based on the image; determine the correspondence between the image and the two-dimensional UV map based on the correspondence between the image and the three-dimensional model and the correspondence between the pre-set two-dimensional UV map and the three-dimensional model.

[0098] The map generation device 50 of the embodiment of the present application can realize the above Figure 2 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0099] Optional, such as Figure 6 As shown, the embodiment of the present application also provides an electronic device 60, including a processor 61, a memory 62, and a program or instruction stored in the memory 62 and executable on the processor 61. When the program or instruction is executed by the processor 61, each process of the above-mentioned map generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0100] The present application also provides a computer program product, including computer instructions, which can achieve the above-mentioned Figure 2 The various processes of the method embodiment shown can achieve the same technical effect, and to avoid repetition, they will not be described again here.

[0101] The embodiment of the present application also provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned map generation method embodiment can be implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0102] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0103] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0104] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a service classification device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0106] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a texture, characterized in that: include: Get the texture map of the target object; The light and shadow information of the texture map is removed by a target model trained based on a small sample training method to obtain an albedo map of the target object.

2. The method according to claim 1, characterized in that Before obtaining the texture map of the target object, the method further includes: Acquire a training data set, wherein the training data set includes a plurality of data pairs, each data pair consisting of a texture map and its corresponding albedo map; The multiple groups of data are used to perform iterative training of the model, and during the iterative training process, the weight parameters of the corresponding model are decomposed by reduced rank to obtain the target model.

3. The method according to claim 2, characterized in that The target model is obtained by the following steps: Inputting the texture map included in the first data pair into a pre-established initial model for processing to obtain a first albedo map, and updating the weight parameters of the initial model by decomposing the weight parameters of the initial model into a low-rank matrix according to the first difference to obtain an updated model; wherein the first data pair is any one of the multiple data pairs, and the first difference is obtained by comparing the first albedo map with the albedo map included in the first data pair; The updated model is used to perform the following iterative training process until the model convergence condition is met: the texture map included in the second data pair is input into the model updated in the previous round of iterative update for processing to obtain a second albedo map, and according to the second difference, the weight parameters of the model updated in the previous round of iterative update are updated by decomposing them into a low-rank matrix; wherein the second data pair is any one group of data pairs among the multiple groups of data pairs, and the second difference is obtained by comparing the second albedo map with the albedo map included in the second data pair.

4. The method according to claim 2 or 3, characterized in that: The multiple groups of data pairs are data pairs of the same object under different illumination at the same time.

5. The method according to claim 1, characterized in that The step of obtaining a texture map of a target object comprises: Get the correspondence between the image and the two-dimensional UV map; Texture mapping is performed on the image of the target object according to the corresponding relationship to obtain a texture map of the target object.

6. The method according to claim 5, characterized in that The acquiring of the correspondence between the image and the two-dimensional UV map includes: Establishing a correspondence between the image and the three-dimensional model according to a correspondence between the two-dimensional key points in the image and the three-dimensional key points in the three-dimensional model constructed based on the image; The corresponding relationship between the image and the three-dimensional model and the preset corresponding relationship between the two-dimensional UV map and the three-dimensional model are used to determine the corresponding relationship between the image and the two-dimensional UV map.

7. A map generating device, characterized in that: include: A first acquisition module is used to acquire a texture map of a target object; The processing module is used to remove the light and shadow information of the texture map through a target model trained based on a small sample training method to obtain the albedo map of the target object.

8. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method according to any one of claims 1 to 6.

9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction 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, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 6.