Data-driven uv map generation method, electronic device, and program product
By segmenting the 3D model into graphs and optimizing the parameterization and packaging of UV islands using the Transformer architecture, the inefficiency and low quality of existing UV mapping methods are solved, achieving efficient and automated UV mapping generation, applicable to complex models and improving visual quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WAZIDA TECH CO LTD
- Filing Date
- 2025-08-05
- Publication Date
- 2026-05-19
AI Technical Summary
Existing UV mapping methods are insufficient in terms of mapping efficiency and quality, have difficulty in handling complex non-manifold models, and are computationally intensive and time-consuming.
The 3D model is divided into multiple graphs. The Transformer architecture is used to parameterize and pack the UV islands. By combining self-attention mechanism and multi-layer neural network, the UV coordinates are optimized in a data-driven manner. A special loss function is used to improve the mapping quality and efficiency.
It achieves efficient and automated generation of high-quality UV mapping, can handle complex models, reduces texture stretching and distortion, improves UV space utilization, and conforms to human aesthetics and design habits.
Smart Images

Figure CN120976397B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of 3D image processing technology, and in particular relates to a data-driven UV mapping generation method, electronic device and program product. Background Technology
[0002] UV mapping is the process of parameterizing the surface of a 3D model onto a 2D texture space, and it is a crucial step in the 3D content creation workflow. The generated UV map, as the carrier of the 3D model's surface texture coordinates, determines how the 2D texture image is applied to the 3D model's surface, directly affecting the final rendering effect. Improper UV mapping can lead to texture stretching, distortion, and obvious seams, reducing the model's visual quality.
[0003] The existing method is as follows:
[0004] Geometry-based methods: These methods utilize the model's geometric information (such as curvature, area, geodesic distance, etc.) to guide the generation of UV mappings. For example, conformal mapping algorithms can preserve the model's angles to some extent and reduce texture stretching. However, these methods typically have requirements on the model's topological structure and struggle to handle complex non-manifold models.
[0005] Optimization-based methods: These methods transform the UV mapping problem into an energy optimization problem, finding the optimal UV layout by minimizing an energy function. The energy function typically includes multiple constraints, such as reducing texture stretching, preserving UV shape, and avoiding UV overlap. However, these methods are usually computationally intensive and time-consuming.
[0006] Parametric methods: These methods transform the UV mapping problem into a parametric problem, generating UV maps by parameterizing the model surface. For example, LSCM (Least Squares Conformal Maps) is a commonly used parametric method that can generate conformal UV maps. However, these methods typically require pre-specifying some cut lines and are difficult to handle complex models.
[0007] UV mapping generation methods based on Graph Convolutional Networks (GCNs): These methods represent the 3D model as a graph structure, where vertices are nodes and edges are connections. Then, a GCN is used to learn the UV coordinates of each vertex. These methods can handle the model's topological structure and learn the global structure of the UV mapping.
[0008] In summary, existing technologies suffer from low mapping efficiency and quality. Summary of the Invention
[0009] In view of the problems existing in the prior art, the present invention provides a data-driven UV mapping generation method, electronic device and program product, which at least partially solves the problems of low mapping efficiency and quality in the prior art.
[0010] In a first aspect, embodiments of this disclosure provide a data-driven UV mapping generation method, including:
[0011] The 3D model is divided into multiple charts, and each chart is parameterized onto a two-dimensional plane to generate UV islands;
[0012] The UV island coordinates are input into the trained UV mapping generation model to obtain the optimized UV coordinate sequence.
[0013] UV islands are packaged based on the UV coordinate sequence to obtain mapped UV data.
[0014] Optionally, the step of inputting the UV island coordinates into the trained UV mapping generation model to obtain the optimized UV coordinate sequence includes:
[0015] The vertex normal information of the UV islands is used as an auxiliary feature input into the trained UV mapping generation model.
[0016] Optionally, UV mapping generation model training includes:
[0017] The acquired data is filtered to obtain UV mapping data that meets the set conditions. The filtering conditions include texture stretching degree, texture distortion degree, UV island shape, texture space utilization, and UV island overlap.
[0018] The filtered data is then converted to a uniform format.
[0019] Optionally, the degree of texture stretching is calculated using an area ratio;
[0020] The degree of texture distortion is calculated using angular deviation;
[0021] The texture space utilization rate is calculated based on the ratio of the total area of the UV islands to the total area of the UV space.
[0022] Optionally, the training of the UV mapping generation model further includes data augmentation based on the acquired data, including geometric transformation, UV perturbation, UV island cutting, UV island cutting merging, and texture space transformation.
[0023] Optionally, the trained UV mapping generation model is based on the Transformer architecture;
[0024] The encoder of the trained UV mapping generation model includes a multi-layer self-attention mechanism and a feedforward neural network, wherein the self-attention mechanism is used to capture long-range dependencies between UV island coordinates.
[0025] The decoder of the trained UV mapping generation model includes a multi-layer self-attention mechanism, an encoder-decoder attention mechanism, and a feedforward neural network. The encoder-decoder attention mechanism passes the feature representation of the encoder to the decoder to guide the generation of UV island coordinates.
[0026] Optionally, the loss function of the trained UV mapping generation model is used to measure the difference between the UV island coordinates predicted by the model and the true UV island coordinates.
[0027] Optionally, the loss function includes L1 loss function, L2 loss function, Chamfer distance function, perception loss function and angle preservation loss function.
[0028] Secondly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0029] At least one processor; and,
[0030] A memory communicatively connected to the at least one processor; wherein,
[0031] The memory stores instructions executable by the at least one processor, which, when executed, enable the at least one processor to perform the data-driven UV mapping generation method described in any of the first aspects.
[0032] Thirdly, embodiments of this disclosure also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the data-driven UV mapping generation method described in any of the first aspects.
[0033] The present invention provides a data-driven UV mapping generation method, electronic device, and program product. The data-driven UV mapping generation method obtains UV islands by dividing a 3D model into two dimensions, and optimizes the coordinates of the UV islands using a UV mapping generation model, thereby improving the mapping quality. Furthermore, the optimized UV islands are packaged to maximize the utilization of UV space and reduce the overlap between UV islands, thereby achieving the goal of improving mapping efficiency and quality. Attached Figure Description
[0034] The above and other objects, features and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.
[0035] Figure 1 A flowchart of a data-driven UV mapping generation method provided in embodiments of this disclosure;
[0036] Figure 2 This is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0037] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0038] It should be understood that the following specific examples illustrate the implementation of this disclosure, and those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0039] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0040] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The illustrations only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0041] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0042] A "chart" is a local, approximately flat, two-dimensional region segmented from an original three-dimensional model.
[0043] A UV island is a continuous region in a two-dimensional UV coordinate system that appears after the surface of a 3D model has been cut open and flattened.
[0044] This embodiment proposes a new paradigm that cleverly reduces and reconstructs the complex 3D UV mapping problem into a sequence processing problem. Based on this, the Transformer architecture is successfully adapted to this task, and many technical problems of traditional methods are solved through customized processes and objective functions.
[0045] The immense success of Transformer in Natural Language Processing (NLP) has led to its widespread acceptance as the best model for handling sequential data. Researchers in the 3D field, however, naturally tend to favor models capable of directly processing graph / mesh structures, such as Graph Neural Networks (GNNs) or geometric deep learning methods. Using Transformer to solve UV mapping problems requires bridging the cognitive gap of "sequential models handling geometric problems." The biggest technical hurdle is how to effectively transform non-serialized 3D model data into a sequence. While methods like GNNs seem more suitable, researchers lack sufficient motivation to overcome this challenge. This embodiment serializes 3D models using UV islands, thereby applying the Transformer architecture to the field of 3D model processing.
[0046] The Transformer architecture, designed for processing one-dimensional sequences (such as natural language), cannot be directly applied to UV mapping of three-dimensional models with complex topological and geometric information. Instead, it requires a series of specific adaptation improvements and problem refactoring.
[0047] 3D models are essentially graph structures, not sequences. This embodiment addresses how to convert them into sequence inputs that Transformer can understand through the following technical solution:
[0048] 1. First, divide the 3D model into multiple relatively flat charts.
[0049] 2. Then, extract the boundary (Seam) vertices of each Chart and construct a sequence of their UV coordinates.
[0050] 3. The core technical insight of this invention is the concept of "transforming the UV mapping problem into a problem of 'predicting the internal and global layout based on boundary sequences'". It cleverly reconstructs a geometric topology problem into a sequence-to-sequence (Seq2Seq) generation problem, so that the Transformer can be applied to solve the 3D model in this embodiment.
[0051] In this embodiment, the Transformer architecture takes not only UV coordinate sequences as input, but also geometric information such as vertex normals as auxiliary features, which enhances the model's understanding of 3D geometry.
[0052] This embodiment aims to achieve "end-to-end" generation, meaning the model not only predicts UV coordinates, but its design goals also implicitly consider the overall segmentation and layout of UV islands. This is fundamentally different from previous deep learning methods (such as GCN) that only predict vertex coordinates. The Transformer's powerful global information capture capability (through its self-attention mechanism) enables it to learn the layout relationships between UV islands, something that models like GCN, which rely on local information, struggle to achieve.
[0053] To enable the model to generate high-quality UVs, this embodiment employs a composite loss function specifically designed for UV mapping tasks, which may include:
[0054] 1. Coordinate regression loss (L1 / L2): Ensures the accuracy of generated coordinates.
[0055] 2. Chamfer Distance (Angle Preservation Loss): Ensures that the UV islands do not experience severe stretching and twisting.
[0056] 3. Perceptual Loss: Makes the generated UVs more in line with human visual habits.
[0057] 4. This combination of loss functions for specific graphics tasks is a key improvement over general machine learning models.
[0058] This embodiment discloses a data-driven UV mapping generation method, including:
[0059] Step S101: Divide the 3D model into multiple charts, parameterize each chart onto a two-dimensional plane, and generate UV islands;
[0060] Step S102: Input the UV island coordinates into the trained UV mapping generation model to obtain the optimized UV coordinate sequence;
[0061] Step S103: Pack UV islands based on the UV coordinate sequence to obtain mapped UV data.
[0062] Optionally, the step of inputting the UV island coordinates into the trained UV mapping generation model to obtain the optimized UV coordinate sequence includes:
[0063] The vertex normal information of the UV islands is used as an auxiliary feature input into the trained UV mapping generation model.
[0064] Optionally, UV mapping generation model training includes:
[0065] The acquired data is filtered to obtain UV mapping data that meets the set conditions. The filtering conditions include texture stretching degree, texture distortion degree, UV island shape, texture space utilization, and UV island overlap.
[0066] The filtered data is then converted to a uniform format.
[0067] Optionally, the texture stretching degree is calculated using an area ratio; the texture stretching degree compares the area of a small region (usually a triangle) on the surface of the 3D model with the area of the corresponding UV triangle in 2D UV space. Ideally, this ratio should be 1 everywhere. A ratio greater than 1 means the texture is magnified at that location, while a ratio less than 1 means it is minified. In this embodiment, its function is to automatically remove low-quality UV data that would cause uneven texture pixel density, loss of detail, or blurring in the final rendered image.
[0068] The degree of texture distortion is calculated using angular deviation; the degree of texture distortion is compared to the interior angle of a triangle on the surface of the 3D model and the interior angle of its corresponding triangle in UV space. An ideal UV mapping (conformal map) will keep the angles constant. The larger the angular deviation, the more severe the visual shearing and distortion of the texture. Classic parametric algorithms such as LSCM (Least Squares Conformal Maps) primarily aim to minimize angular distortion. In this embodiment, its role is to ensure that the data used for training is geometrically faithful, thereby enabling the model to learn to generate a more natural, distortion-free UV layout.
[0069] The texture space utilization rate is calculated based on the ratio of the total area of UV islands to the total area of the UV space. Texture space utilization measures the percentage of the total area actually covered by UV islands within a 0-1 UV square space. Higher utilization means less wasted texture space, allowing more detail to be contained in the same size texture. All professional UV packing tools aim to maximize this metric. In this embodiment, its role is to filter out samples that efficiently utilize texture space, training the model to generate compact and efficient UV layouts, which is crucial for performance- and resource-sensitive applications such as games and film.
[0070] Optionally, the training of the UV mapping generation model further includes data augmentation based on the acquired data, including geometric transformation, UV perturbation, UV island cutting, UV island cutting merging, and texture space transformation.
[0071] Optionally, the trained UV mapping generation model is based on the Transformer architecture;
[0072] The encoder of the trained UV mapping generation model includes a multi-layer self-attention mechanism and a feedforward neural network, wherein the self-attention mechanism is used to capture long-range dependencies between UV island coordinates.
[0073] The decoder of the trained UV mapping generation model includes a multi-layer self-attention mechanism, an encoder-decoder attention mechanism, and a feedforward neural network. The encoder-decoder attention mechanism passes the feature representation of the encoder to the decoder to guide the generation of UV island coordinates.
[0074] Optionally, the loss function of the trained UV mapping generation model is used to measure the difference between the UV island coordinates predicted by the model and the true UV island coordinates.
[0075] Optionally, the loss function includes L1 loss function, L2 loss function, Chamfer distance function, perception loss function and angle preservation loss function.
[0076] In a specific application scenario, the method in this embodiment is a data-driven UV mapping generation method based on Transformer. Its core idea is to leverage the powerful sequence modeling capabilities of Transformer to learn patterns and rules from a large amount of high-quality UV mapping data, thereby achieving automatic mapping from a 3D Mesh model to a UV unfolded map. This section will elaborate on the dataset construction, model training, UV island packaging, model generalization verification, and specific implementation details.
[0077] Specifically, the following steps are included:
[0078] Data Collection: Collect a large amount of artificially generated UV mapping data from sources including public 3D model libraries (e.g., ShapeNet, ModelNet), commercial model libraries (e.g., TurboSquid, CGTrader), and internal assets. Ensure the collected data is diverse, covering various model types, topologies, and UV mapping styles.
[0079] High-quality UV mapping data is selected based on criteria including texture stretching degree (calculated using area ratio), texture distortion degree (calculated using angle deviation), UV island shape, texture space utilization (calculated as the ratio of total UV island area to total UV space area), and UV island overlap (direct detection). A combination of automated script evaluation (automatic filtering by setting thresholds) and manual review is employed.
[0080] Convert the filtered data into a uniform format, such as .obj (Mesh model) and .txt (UV coordinates), where each line contains the UV coordinates of a vertex.
[0081] Improve the model's generalization ability using the following data augmentation methods:
[0082] Geometric transformations: Randomly rotate the 3D model (e.g., rotate it by -30 to 30 degrees around the X, Y, and Z axes), scale it (e.g., scale it by a ratio between 0.8 and 1.2), and translate it (e.g., translate it by -0.1 to 0.1 units on each axis).
[0083] UV perturbation: Add a small amount of noise to the UV coordinates (e.g., Gaussian noise with a mean of 0 and a standard deviation of 0.01).
[0084] UV Island Cutting and Merging: Randomly select some UV islands and cut them into smaller pieces. Alternatively, merge adjacent UV islands into larger UV islands.
[0085] Texture space transformation: Randomly rotate the UV coordinates (90 degrees, 180 degrees, 270 degrees), mirror flip, and scale.
[0086] UV mapping generation model based on Transformer
[0087] Mesh surface segmentation into charts: This involves dividing the 3D mesh model into multiple relatively flat charts. Common chart segmentation algorithms include those based on curvature, geodesic distance, or graph cuts. The boundary line (seam) of each chart is determined. The selection of the seam should consider factors such as curvature variations and visual effects, choosing areas with significant curvature changes and those that do not negatively impact visual quality. Existing mesh segmentation algorithms can be used, or manual segmentation can be performed in software such as Blender / Maya. The UV coordinates of the vertices on the chart boundary are input as a sequence into the Transformer model.
[0088] Chart parameterization: Each chart is parameterized onto a 2D plane, generating UV islands. Commonly used parameterization methods include LSCM, ABF, and ARAP. During parameterization, the chart boundaries need to be fixed to prevent UV islands from exceeding texture space.
[0089] Transformer model structure:
[0090] Input representation: A sequence of UV coordinates of the boundary vertices of the chart, such as [(u1, v1), (u2, v2), ..., (un,vn)]. Vertex normal information can be considered as an auxiliary feature.
[0091] The encoder consists of multiple layers of self-attention mechanisms and a feedforward neural network, learning feature representations of the input sequence. The self-attention mechanism can capture long-range dependencies between UV coordinates.
[0092] The decoder consists of multiple layers of self-attention mechanisms, an encoder-decoder attention mechanism, and a feedforward neural network, generating new UV coordinates. The encoder-decoder attention mechanism passes the encoder's feature representation to the decoder to guide the generation of UV coordinates.
[0093] Output: A new sequence of UV coordinates, used to replace the original UV coordinates.
[0094] Loss function: The loss function measures the difference between the UV coordinates predicted by the model and the true UV coordinates. Commonly used loss functions include L1 loss, L2 loss, Chamfer distance, perceptual loss, and angle preservation loss (calculated using triangle area ratio or angle deviation).
[0095] Training process:
[0096] Data preparation: Divide the dataset into training set, validation set and test set.
[0097] Model Training: Train the Transformer model using the training set, updating the model's parameters via backpropagation. Select the Adam optimizer, set an initial learning rate (e.g., 0.001), and use a learning rate decay strategy (e.g., cosine annealing or step decay). Set an appropriate batch size (e.g., 32 or 64) and the number of training epochs (e.g., 100 epochs).
[0098] Model validation: Evaluate the model's performance using a validation set and tune the model's hyperparameters. Monitor the loss function and performance metrics on the validation set (e.g., L1 loss, L2 loss, texture stretching, angle distortion, etc.).
[0099] Model testing: Evaluate the model's generalization ability using a test set. Monitor the training process in real time and perform tuning using TensorBoard or other visualization tools.
[0100] UV island packing: This involves arranging the parameterized chart (UV islands) in a reasonable manner within the 0-1 UV space, aiming to maximize UV space utilization and reduce overlap between UV islands. Existing UV packing tools (e.g., Blender's built-in UV packing function or RizomUV) can be used, or a custom UV packing algorithm (e.g., greedy algorithm, simulated annealing algorithm, or genetic algorithm) can be implemented. The spacing between UV islands is set to prevent texture bleeding.
[0101] Model generalization validation: The generalization ability of the model is evaluated using the Mesh model in the test set. Evaluation metrics include texture stretching, texture distortion, texture space utilization, automated evaluation (using scripts to automatically evaluate UV mapping quality), and manual evaluation (compared with manual UV mapping).
[0102] Hardware requirements for this method: Processor: CPU with multiple cores (e.g., Intel Xeon or AMD Ryzen Threadripper).
[0103] GPU: High-performance GPUs (such as NVIDIA GeForce RTX or AMD Radeon RX) are used to accelerate the training and inference of deep learning models.
[0104] Memory: At least 16GB RAM, 32GB or more recommended.
[0105] Storage: Solid-state drives (SSDs) are used to store datasets and models.
[0106] Software environment:
[0107] Operating system: Linux (e.g., Ubuntu or CentOS).
[0108] Deep learning frameworks: PyTorch or TensorFlow.
[0109] Programming language: Python.
[0110] 3D modeling software: Blender, Maya, or 3ds Max (for data preprocessing and result visualization).
[0111] Dependencies: NumPy, SciPy, Scikit-learn, Open3D, etc.
[0112] Model Deployment:
[0113] A trained Transformer model can be deployed on various platforms, such as:
[0114] Local deployment: Deploy the model to your local computer for use by 3D artists.
[0115] Cloud deployment: Deploy the model to a cloud server to provide online UV mapping services.
[0116] Integration into 3D modeling software: Integrate the model into 3D modeling software such as Blender, Maya, or 3ds Max, and use it as a plugin.
[0117] This embodiment utilizes data to learn the generation rules of UV mapping, rather than relying on manual or geometry-based methods.
[0118] The Transformer architecture is used to model the UV mapping generation process, especially by leveraging the Transformer's self-attention mechanism to capture long-range dependencies between UV islands.
[0119] By dividing complex 3D models into multiple charts and parameterizing each chart, the UV mapping generation process is simplified.
[0120] The Transformer model directly generates complete UV mappings, including the segmentation and layout of UV islands, without the need for additional post-processing steps.
[0121] This embodiment has the following advantages:
[0122] This data-driven approach automatically learns the rules for generating UV mappings without human intervention. By collecting enough data, the model can automatically learn and generate high-quality UV mappings.
[0123] Deep learning can handle 3D models of various types and complexities. As long as the training data is diverse enough, the model can generalize to new and unseen models.
[0124] By learning from a large amount of artificial UV mapping data, it is possible to generate UV mappings that better align with human aesthetics and design habits. This takes into account the surface details and texture features of the model, resulting in more natural UV mappings.
[0125] When new model types need to be supported, simply add new training data. The model can automatically adapt to the new data without manual intervention.
[0126] It can fully utilize existing UV mapping data and improve the quality and efficiency of UV mapping by learning patterns and rules within the data. It can also learn from the experience and skills of manually designing UV mapping.
[0127] This embodiment offers advantages such as higher automation, stronger generalization ability, the ability to generate more natural UV mappings, better scalability, and better utilization of existing UV mapping data. These advantages enable the present invention to generate high-quality UV mappings more efficiently and conveniently, thereby improving the efficiency of 3D content creation.
[0128] The electronic device disclosed in this embodiment includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0129] The processor may be a central processing unit (CPU) or other processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute computer-readable instructions stored in the memory, causing the electronic device to perform all or part of the steps of the data-driven UV mapping generation method of the foregoing embodiments of this disclosure.
[0130] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.
[0131] like Figure 2This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. It illustrates a structural schematic diagram suitable for implementing the electronic device in the embodiment of the present disclosure. Figure 2 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0132] like Figure 2 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0133] Typically, the following devices can be connected to the I / O interface: input devices, such as sensors or visual information acquisition devices; output devices, such as displays; storage devices, such as magnetic tapes or hard drives; and communication devices. Communication devices allow electronic devices to exchange data wirelessly or via wired communication with other devices, such as edge computing devices. Although Figure 2 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0134] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, all or part of the steps of the data-driven UV mapping generation method of embodiments of this disclosure are performed.
[0135] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0136] The computer-readable storage medium disclosed in this embodiment stores non-transitory computer-readable instructions. When these non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the data-driven UV mapping generation method of the foregoing embodiments of this disclosure are performed.
[0137] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
[0138] For a detailed description of this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0139] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0140] In this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, devices, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.
[0141] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.
[0142] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0143] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0144] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0145] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A data-driven UV mapping generation method, characterized in that, include: The 3D model is divided into multiple charts, and each chart is parameterized onto a two-dimensional plane to generate UV islands; The UV island coordinates are input into the trained UV mapping generation model to obtain the optimized UV coordinate sequence. UV islands are packaged based on the UV coordinate sequence to obtain mapped UV data; UV island packaging includes arranging the parameterized UV islands reasonably in the 0-1 UV space; The step of inputting the UV island coordinates into the trained UV mapping generation model to obtain the optimized UV coordinate sequence includes: The UV island vertex normal information is used as an auxiliary feature and input into the trained UV mapping generation model. The trained UV mapping generation model is based on the Transformer architecture; The encoder of the trained UV mapping generation model includes a multi-layer self-attention mechanism and a feedforward neural network, wherein the self-attention mechanism is used to capture long-range dependencies between UV island coordinates. The decoder of the trained UV mapping generation model includes a multi-layer self-attention mechanism, an encoder-decoder attention mechanism, and a feedforward neural network. The encoder-decoder attention mechanism passes the feature representation of the encoder to the decoder to guide the generation of UV island coordinates.
2. The data-driven UV mapping generation method according to claim 1, characterized in that, Training the UV mapping generation model includes: The acquired data is filtered to obtain UV mapping data that meets the set conditions. The filtering conditions include texture stretching degree, texture distortion degree, UV island shape, texture space utilization, and UV island overlap. The filtered data is then converted to a uniform format.
3. The data-driven UV mapping generation method according to claim 2, characterized in that, The degree of texture stretching is calculated using the area ratio; The degree of texture distortion is calculated using angular deviation; The texture space utilization rate is calculated based on the ratio of the total area of the UV islands to the total area of the UV space.
4. The data-driven UV mapping generation method according to claim 2, characterized in that, The training of the UV mapping generation model also includes data augmentation based on the acquired data. Data augmentation includes geometric transformation, UV perturbation, UV island cutting, UV island cutting merging, and texture space transformation.
5. The data-driven UV mapping generation method according to claim 1, characterized in that, The loss function of the trained UV mapping generation model is used to measure the difference between the UV island coordinates predicted by the model and the actual UV island coordinates.
6. The data-driven UV mapping generation method according to claim 5, characterized in that, The loss functions include L1 loss function, L2 loss function, Chamfer distance function, perception loss function, and angle preservation loss function.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the data-driven UV mapping generation method according to any one of claims 1-6.
8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the data-driven UV mapping generation method according to any one of claims 1-6.