Garment modeling method and apparatus
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- LINGDI (ZHEJIANG) TECHNOLOGY CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-07-23
Smart Images

Figure CN2026072273_23072026_PF_FP_ABST
Abstract
Description
Clothing Modeling Methods and Devices Cross-references to related applications This application claims priority to the following Chinese patent applications filed on January 14, 2025, with application number 202510060351X, entitled "Method and Apparatus for Clothing Modeling"; filed on January 14, 2025, with application number 2025100594648, entitled "Method and Apparatus for Clothing Modeling"; filed on January 14, 2025, with application number 2025100594309, entitled "Method and Apparatus for Determining Sewing Relationships"; and filed on August 26, 2025, with application number 2025112030025, entitled "Method and Apparatus for Clothing Modeling", the entire contents of which are incorporated herein by reference. Technical Field
[0001] This specification relates to the field of clothing modeling technology, and more particularly to a clothing modeling method and apparatus. Background Technology
[0002] With the rapid development of artificial intelligence and deep learning technologies, automated virtual fashion modeling is gradually becoming possible, but it still faces many challenges. For example, some clothing modeling methods still have shortcomings in terms of automation, high accuracy, and subsequent editing capabilities when dealing with complex clothing models. Summary of the Invention
[0003] In view of the above, one or more embodiments of this specification provide the following technical solutions:
[0004] According to a first aspect of one or more embodiments of this specification, a clothing modeling method is proposed, the method comprising:
[0005] Based on the design information of the garment, topological structure data of the garment is generated; wherein, the topological structure data is used to represent the topological relationship and pattern information of several patterns contained in the garment; based on the topological structure data, a spatial structure model of the garment is generated through a geometric generation model; wherein, the spatial structure model is used to represent the position and size of each pattern in three-dimensional space; based on the position and size of each pattern in the three-dimensional space, and the pattern information, a three-dimensional model of each pattern is generated respectively, and the three-dimensional models of each pattern are combined to obtain a complete three-dimensional model of the garment.
[0006] In some implementations, generating the topological data of the garment based on its design information includes:
[0007] The design information of the garment is obtained, and the feature vector of the garment is extracted from the design information. The feature vector is input into the structure generation model, and the topological structure data of the garment is output.
[0008] In some implementations, the structure generation model is a neural network model obtained by training the feature vectors of the clothing samples as training samples and the topological structure data corresponding to the clothing samples as labels.
[0009] In some implementations, the spatial structure model includes three-dimensional geometric spaces located at positions corresponding to each of the plates; the step of generating three-dimensional models of each plate based on the position and size of each plate in the three-dimensional space and the plate information includes: performing detail optimization on each plate within the three-dimensional geometric space corresponding to each plate based on the plate information of each plate to generate three-dimensional models of each plate.
[0010] In some implementations, the three-dimensional geometric space includes a bounding box.
[0011] In some embodiments, the method further includes: generating two-dimensional plates corresponding to each of the plates based on the plate information.
[0012] In some embodiments, the method further includes: generating a three-dimensional spatial point set corresponding to each pattern of the garment based on the pattern information using a point set generation model; and constructing the connection relationship between the spatial points in the three-dimensional spatial point set of each pattern of the garment using a preset mesh pattern.
[0013] In some implementations, the pattern information of the garment is obtained by the following operation: obtaining a plurality of patterns contained in the garment;
[0014] By using a preset plate feature extraction model, plate information used to represent the features of each plate is extracted from the plurality of plates.
[0015] In some implementations, the point set generation model is a model obtained by training the pattern information of the pattern sample of the sample garment as training sample features and the three-dimensional spatial point set corresponding to the pattern sample as labels.
[0016] In some implementations, the step of constructing the connection relationship of each spatial point in the three-dimensional spatial point set of each piece of the garment using a preset grid pattern includes: constructing the connection relationship of the three-dimensional spatial point set of each piece of the garment using the preset grid pattern through a pre-trained topological model.
[0017] In some embodiments, the step of constructing the connection relationship between the spatial points in the three-dimensional spatial point set of each pattern piece of the garment using a preset grid pattern includes: constructing the connection relationship between the spatial points in the three-dimensional spatial point set of each pattern piece, and between the three-dimensional spatial point sets of adjacent patterns, using a preset grid pattern.
[0018] In some implementations, the preset grid pattern includes: triangular grid pattern, quadrilateral grid pattern, and other polygonal grid patterns.
[0019] In some embodiments, the plate information is used to indicate the geometric edges contained in the plate, and the method further includes:
[0020] Feature data of each plate is extracted from the plate information. The feature data includes geometric edge feature vectors corresponding to each geometric edge contained in the plate. Based on the geometric edge feature vectors, pairs of geometric edges with a sewing relationship are matched.
[0021] In some embodiments, the pattern information includes: geometric edge data for indicating the geometric edges of the pattern, semantic data for describing the pattern, and position data for indicating the spatial position of the pattern; the feature data includes: geometric edge feature vectors corresponding to the geometric edge data, semantic feature vectors corresponding to the semantic data, and position feature vectors corresponding to the position data; based on the geometric edge feature vectors, matching is performed to obtain geometric edge pairs with a sewing relationship, including:
[0022] Based on the geometric edge feature vector, the semantic feature vector, and the positional feature vector, the geometric edge pairs with the sewing relationship are matched to obtain.
[0023] In some implementations, the step of matching geometric edge pairs with the sewing relationship based on the geometric edge feature vector, the semantic feature vector, and the position feature vector includes: calculating the matching probability between each geometric edge based on the geometric edge feature vector, the semantic feature vector, and the position feature vector; and determining the geometric edge pairs with the sewing relationship from the geometric edge pairs with matching probabilities greater than a probability threshold.
[0024] In some implementations, calculating the matching probability between each geometric edge based on the geometric edge feature vector, the semantic feature vector, and the position feature vector includes: identifying the geometric edges to be matched that need to be sewn from the geometric edges contained in each pattern piece based on the geometric edge feature vector, the semantic feature vector, and the position feature vector, and calculating the matching probability between each geometric edge to be matched.
[0025] In some implementations, determining the geometric edge pairs with a sewing relationship from the geometric edge pairs with a matching probability greater than a probability threshold includes: determining the geometric edge pairs with a sewing relationship from the geometric edge pairs with a matching probability greater than the probability threshold based on preset constraints; wherein the constraints include: the number of geometric edges with a sewing relationship with any geometric edge is less than or equal to a number threshold.
[0026] In some implementations, extracting feature data of each plate from the plate information includes: converting the plate information into plate vectors for each plate through serialization; wherein the plate vectors include geometric edge vectors corresponding to the geometric edge data, semantic vectors corresponding to the semantic data, and position vectors corresponding to the position data; extracting geometric edge feature vectors, semantic feature vectors, and position feature vectors for each plate from the geometric edge vectors, semantic vectors, and position vectors respectively, and forming the feature data of each plate.
[0027] In some implementations, the feature vector includes a structured feature vector, which represents a set of structured data corresponding to each plate, and the structured data represents the 2D and 3D geometric data corresponding to each plate.
[0028] In some embodiments, the structured data of each pattern piece includes: first size data, second size data, and outline data; wherein, the first size data of the pattern piece is used to represent the 2D size of the pattern piece, the second size data of the pattern piece is used to represent the spatial position and 3D size of the 3D fabric corresponding to the pattern piece, and the outline data of the pattern piece is used to represent the 3D geometric data of the 3D fabric corresponding to the pattern piece and the shape of the pattern piece.
[0029] In some embodiments, the first size data of the pattern includes the length and width of the pattern; the second size data of the pattern includes the 3D coordinates of the center point of the 3D fabric and the length, width and height of the bounding box containing the 3D fabric; the outline data of the pattern includes the 3D coordinates of each pixel in an image block with a preset first resolution and an identifier indicating whether the 3D coordinates of each pixel are located within the 3D fabric.
[0030] In some embodiments, the outline data of the plate includes four-channel data of each pixel in an image block with a preset first resolution, wherein the first three channels of data represent the normalized 3D coordinates of the pixel, and the fourth channel of data is used to indicate whether the 3D coordinates of the pixel are located within the 3D fabric.
[0031] In some implementations, if the fourth channel data indicates that the 3D coordinates corresponding to the pixel are not located within the 3D fabric, then the 3D coordinates indicated by the corresponding first three channel data are all 0.
[0032] In some embodiments, the outline data of the plate is obtained by rasterizing the corresponding 3D fabric at a preset first resolution under UV parameterization of the plate.
[0033] In some implementations, extracting the feature vector of the garment from the design information of the garment includes: using the garment design information input by the user as input conditions, generating a structured feature vector of the garment through a pre-trained diffusion transformer.
[0034] In some implementations, the step of generating a structured feature vector of clothing using user-inputted clothing design information as input and a pre-trained diffusion model includes: using the user-inputted clothing design information as input and the pre-trained diffusion model to generate a set of latent markers corresponding to each of the patterns, wherein the latent markers of the patterns include first size data, second size data, and contour feature vectors of the patterns; and generating contour data of the patterns using a decoder based on the contour feature vectors of the patterns.
[0035] In some implementations, the step of inputting the structured feature vector into the structure generation model and outputting the topological data of the garment includes: inputting the structured feature vector into the structure generation model and outputting topological data representing the sewing relationship between the patterns.
[0036] In some implementations, inputting the structured feature vector into a structure generation model to obtain topological data representing the stitching relationship between the patterns includes: extracting a 2D contour point set for each pattern based on the contour data, and a 3D contour point set corresponding to each 2D contour point set of the pattern, wherein the 3D contour point set includes 3D contour points corresponding to each 2D contour point in the corresponding 2D contour point set; extracting a contour point feature matrix based on the geometric data of the 2D contour point set and the 3D contour point set, wherein the contour point feature matrix includes contour point feature vectors corresponding to each 2D contour point; and obtaining topological data representing the stitching relationship between the patterns based on the contour point feature matrix.
[0037] In some implementations, the step of extracting the 2D contour point set of each plate based on the contour data includes: extracting the 2D contour point set of each plate through an erosion operation based on the fourth channel data in the contour data.
[0038] In some implementations, obtaining topological data representing the sewing relationships between the panels based on the contour point feature matrix includes: identifying candidate sewing points from the 2D contour point set using a classifier based on the contour point feature matrix, and constructing a sewing point feature matrix containing contour point feature vectors corresponding to each sewing point; generating an adjacency probability matrix between each sewing point based on the sewing point feature matrix; and obtaining topological data representing the sewing relationships between the panels based on the adjacency probability matrix.
[0039] In some implementations, obtaining the adjacency probability matrix between each suture point based on the suture point feature matrix includes: separating the original features and dual features in the suture point feature matrix using two multilayer perceptrons; and performing Sinkhorn normalization based on the original features and dual features to obtain the adjacency probability matrix.
[0040] In some implementations, the topology data includes: the stitching relationship between the stitching points of each piece; generating topology data representing the stitching relationship between the pieces based on the adjacency probability matrix includes: determining the stitching relationship between each stitching point using a Hungarian algorithm based on the adjacency probability matrix.
[0041] In some implementations, the topology data includes: the stitching relationship between the contour curves of each plate; the contour curves are obtained by converting a number of 2D contour points of each plate.
[0042] In some embodiments, after obtaining the complete three-dimensional model of the garment, the method further includes: displaying a visual representation of the three-dimensional model of the garment based on the complete three-dimensional model of the garment.
[0043] According to a second aspect of one or more embodiments of this specification, a garment modeling apparatus is provided, comprising: a topology generation module, configured to generate topology data of the garment based on the garment's design information; wherein the topology data represents the topological relationships and pattern information of several patterns included in the garment; a spatial structure generation module, configured to generate a spatial structure model of the garment based on the topology data using a geometric generation model; wherein the spatial structure model represents the position and size of each pattern in three-dimensional space; and a three-dimensional model generation module, configured to generate three-dimensional models of each pattern based on the position and size of each pattern in three-dimensional space and the pattern information, and combine them to obtain a complete three-dimensional model of the garment.
[0044] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor implements the steps of the method described in the first aspect by executing the executable instructions.
[0045] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0046] According to a fifth aspect of one or more embodiments of this specification, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0047] As can be seen from the above embodiments, this specification generates topological data of clothing and then uses a geometric generation model to generate a spatial structure model, which can effectively handle complex clothing topological structures, such as multi-layered and irregular designs, thereby improving the efficiency and accuracy of clothing modeling. Attached Figure Description
[0048] Figure 1 is a schematic diagram of a clothing modeling system provided in an exemplary embodiment.
[0049] Figure 2 is a flowchart of a clothing modeling method provided in an exemplary embodiment.
[0050] Figure 3 is a schematic diagram of a graph structure generation method provided in an exemplary embodiment.
[0051] Figure 4 is a schematic diagram of a spatial structure model generation method provided in an exemplary embodiment.
[0052] Figure 5 is a schematic diagram of a three-dimensional model and a two-dimensional plate generation method provided in an exemplary embodiment.
[0053] Figure 6 is a schematic diagram of the module structure of a clothing modeling system provided in an exemplary embodiment.
[0054] Figure 7 is a schematic diagram of the structure of a device provided in an exemplary embodiment.
[0055] Figure 8 is a block diagram of a clothing modeling apparatus provided in an exemplary embodiment.
[0056] Figure 9 is a flowchart of another clothing modeling method provided in an exemplary embodiment.
[0057] Figure 10 is a flowchart of a structured feature vector generation method provided in an exemplary embodiment.
[0058] Figure 11 is a flowchart of a sewing relationship determination method provided in an exemplary embodiment.
[0059] Figure 12 is a block diagram of another garment modeling apparatus provided in an exemplary embodiment.
[0060] Figure 13 is a flowchart of a clothing modeling method provided in an exemplary embodiment.
[0061] Figure 14 is a schematic diagram of a three-dimensional spatial point set of a plate provided in an exemplary embodiment.
[0062] Figure 15 is a schematic diagram of a three-dimensional model of a garment provided in an exemplary embodiment.
[0063] Figure 16 is a schematic diagram of a clothing modeling system provided in an exemplary embodiment.
[0064] Figure 17 is a block diagram of a clothing modeling apparatus provided in an exemplary embodiment.
[0065] Figure 18 is a flowchart of a sewing relationship determination method provided in an exemplary embodiment.
[0066] Figure 19 is a schematic diagram of the structure of a feature extraction module provided in an exemplary embodiment.
[0067] Figure 20 is a schematic diagram of the structure of a sewing module provided in an exemplary embodiment.
[0068] Figure 21 is a schematic diagram of a sewing system provided in an exemplary embodiment.
[0069] Figure 22 is a block diagram of a sewing relationship determination device provided in an exemplary embodiment. Detailed Implementation
[0070] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0071] Traditional fashion design processes heavily rely on physical sample making and manual pattern making and cutting techniques, which are not only time-consuming but also costly. The emergence of virtual clothing modeling technology provides designers with the ability to design and preview clothing in a virtual environment, significantly improving design efficiency, reducing sample production costs, and minimizing fabric waste, thus possessing significant environmental and economic value. Furthermore, virtual fashion modeling has shown broad application prospects in fields such as games, film, e-commerce, and virtual try-on, greatly enriching the expression of clothing in the virtual world.
[0072] However, some virtual fashion modeling methods typically rely on design sketches provided by designers, with modelers manually performing multiple steps such as pattern making, sewing, pattern arrangement, simulation, and detail sculpting. While this approach ensures high detail and quality, it is inefficient and cannot meet the fashion industry's demand for rapid iteration. With the rapid development of artificial intelligence and deep learning technologies, automated virtual fashion modeling is gradually becoming possible, but these methods still face several challenges.
[0073] For example, deep learning models can be used to automatically generate clothing patterns. Most of these techniques are based on sequential generation, suitable for relatively simple clothing structures, but inadequate when dealing with complex topological structures. Furthermore, complex clothing often requires multi-layered, richly detailed models, and the method of automatically generating clothing patterns using deep learning models is still immature in handling such needs.
[0074] Another example is the clothing generation scheme based on differentiable 3D representation. This scheme can generate relatively realistic clothing models, especially excelling in displaying dynamic effects. However, the main drawback of this type of scheme is the lack of a good parametric structure in the model, resulting in poor quality UV mapping and an inability to support subsequent fine-grained editing and modification. This limits their application value in actual production.
[0075] Another example is the "pattern generation scheme based on parametric models (rules)." This scheme typically relies on a predefined set of rules to generate garment patterns based on specific design patterns and structures. These rules may involve aspects such as geometry, seam placement, and material properties, enabling the generation of usable patterns for standardized designs. However, rule-based generation schemes have significant limitations. Their core problem is that whenever a new design emerges, new rules often need to be developed for that design. This means the rule set is static and cannot dynamically adapt to changes in design. For the ever-changing fashion industry, this approach is insufficient in dealing with the flexibility and complexity of creative designs and cannot efficiently handle personalized, non-standard garment designs. Furthermore, the complexity of the rules increases exponentially with the diversity of designs, making this method impractical when dealing with complex topologies and multi-layered designs.
[0076] Overall, while the aforementioned technologies have made innovative progress, they still have shortcomings in terms of automation, high precision, and subsequent editing capabilities for complex clothing modeling.
[0077] In view of this, this specification proposes a clothing modeling method. The clothing modeling process is divided into three stages: topology generation, geometry generation, and detail sculpting, in order to obtain a 3D model of the clothing corresponding to the input design information.
[0078] In implementation, based on the design information of the garment, topological structure data of the garment is generated; wherein, the topological structure data is used to represent the topological relationship and pattern information of several patterns contained in the garment; based on the topological structure data, a spatial structure model of the garment is generated through a geometric generation model; wherein, the spatial structure model is used to represent the position and size of each pattern in three-dimensional space; based on the position and size of each pattern in three-dimensional space, three-dimensional models of each pattern are generated respectively, and the three-dimensional models of each pattern are combined to obtain the complete three-dimensional model of the garment.
[0079] In the above technical solutions, by generating the topological structure data of clothing and then using a geometric generation model to generate the spatial structure model of clothing, complex clothing topological structures, such as multi-layered and irregular designs, can be effectively handled, thus improving the efficiency and accuracy of clothing modeling. The clothing modeling methods and apparatus of some embodiments of this specification will be described below with reference to Figures 1-12.
[0080] Figure 1 is a schematic diagram of the architecture of a clothing modeling service system provided in an exemplary embodiment. As shown in Figure 1, the system may include a server 11, a network 12, and several electronic devices, such as a PC (Personal Computer) 13, a mobile phone 14, etc.
[0081] Server 11 can be a physical server containing an independent host, or it can be a virtual server hosted in a host cluster. During operation, server 11 can run server-side programs for a certain application to implement the relevant functions of that application. For example, when server 11 runs a clothing modeling service program, it can function as a corresponding clothing modeling service platform.
[0082] PC13 and mobile phone14 are just some of the types of electronic devices that users can use. In reality, users can obviously also use electronic devices such as tablets, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smartwatches, etc.), etc., and one or more embodiments in this specification do not limit this. During operation, the electronic device can run a client-side program of an application to achieve the relevant functions of that application. For example, when the electronic device runs a clothing modeling service program, it can act as a client for that clothing modeling service. The aforementioned clothing modeling service client application can be launched and run on the electronic device. This client-side program can be a native application installed on the electronic device, or it can be a mini-program, quick app, or other similar form. Of course, when using web technologies such as HTML5 or similar, the relevant functions can be achieved through a page displayed by a browser. This browser can be a standalone browser application or a browser module embedded in some applications.
[0083] As for the network 12 that enables interaction between electronic devices such as PC13 and mobile phone 14 and server 11, communication can be achieved using either wired or wireless networks, depending on the communication methods supported by the respective electronic devices. This specification does not impose any restrictions on this. For example, PC13 can support both wired and wireless communication, so it can use either wired or wireless networks as needed. Mobile phone 14 typically only supports wireless communication, so it can use a wireless network for communication.
[0084] Please refer to Figure 2, which illustrates an exemplary method for clothing modeling that can be applied to a clothing modeling platform. The method may include the following steps S201-S203.
[0085] S201. Based on the design information of the garment, generate the topological structure data of the garment; wherein, the topological structure data is used to represent the topological relationship and pattern information of several patterns contained in the garment.
[0086] In one implementation, design information of the clothing input by the user can be obtained. This design information can take many forms, such as reference images, text describing the clothing's design, and other formats like designer sketches or CAD drawings.
[0087] By analyzing the obtained design information, it is possible to determine which patterns the garment contains, the topological relationships between the patterns, and the pattern information corresponding to each pattern. Based on the above analysis results, the topological structure data of the garment can be generated.
[0088] For example, geometric decomposition can be performed first from the garment's design information to determine how many panels the overall design can be divided into, such as the skirt, sleeves, neckline, and waistband. Then, based on the sewing relationships between the panels, the connection relationships between them and their relative positions can be determined. Based on the geometric structure information obtained from this analysis, the garment's topological structure data can be constructed to represent the various panels contained within the garment and the connection relationships between them.
[0089] Topological data can be represented in various ways, such as graph structures, hierarchical tree structures, two-dimensional matrices, and so on.
[0090] A graph structure can include the following elements: nodes, edges, and node attributes. Each node can represent a pattern piece in clothing, edges between nodes represent the connection relationship between connected patterns, and node attributes can be used to record pattern information related to the pattern piece corresponding to the node, such as the semantic description of the pattern piece, etc.
[0091] Hierarchical tree structures can be used to represent the hierarchical relationships of clothing. Tree structures are suitable for representing the containment relationships between clothing components and sub-components.
[0092] Each cell in a two-dimensional matrix can represent a pattern of clothing, and the position in the matrix corresponds to the arrangement of the patterns of clothing.
[0093] For the sake of simplicity, the following embodiments will use graph structures as examples.
[0094] In one implementation, as shown in Figure 3, the graph structure generation process may include steps such as node diffusion, node attribute and topology generation, and node splitting.
[0095] Node diffusion refers to initializing the topology of a garment based on the acquired design information. For example, the patterns contained in the garment can be identified first, and each pattern can be assigned a corresponding initial node, with each node corresponding to one pattern. Then, the relationships between these nodes are expanded.
[0096] The node diffusion process involves propagating known node information to neighboring nodes, gradually generating the garment's topology. Node attributes and topology generation refer to configuring corresponding node attributes for each node and generating the garment's topology based on the connections between nodes. Node attributes can be used to record corresponding pattern information.
[0097] Node splitting refers to the node splitting operation performed when a pattern needs to be further divided into multiple smaller patterns. As shown in Figure 3, before node splitting, the entire topology of the garment includes nodes corresponding to patterns B1-B7 respectively. If patterns B2 and B4 need to be further split into B21, B22 and B41, B42, then node splitting is performed to split the original node corresponding to B2 into two nodes corresponding to B21 and B22 respectively, and to split the original node corresponding to B4 into two nodes corresponding to B41 and B42.
[0098] After the above generation process, topological data represented in graph form can be obtained.
[0099] S202. Based on topological data, generate a spatial structure model of the garment through a geometric generation model; wherein, the spatial structure model is used to represent the position and size of each piece in three-dimensional space.
[0100] In one implementation, the topological data of the garment can be input into a pre-trained geometric generative model to construct a three-dimensional skeleton of the garment, generating a spatial structural model of the garment to determine the rough spatial layout of each panel in three-dimensional space. For example, a spatial structural model conforming to human body proportions can be calculated based on the proportions, shapes, and design requirements of each panel.
[0101] Among them, the geometric generation model can adopt generative model architectures such as diffusion model or generative adversarial network (GAN), using the topological structure data corresponding to the clothing sample as the training sample features, and the corresponding spatial structure model as the sample label. The pre-trained diffusion model or GAN is fine-tuned to obtain the structure generation model.
[0102] S203. Based on the position and size of each pattern piece in three-dimensional space, as well as the pattern piece information, generate three-dimensional models of each pattern piece respectively, and combine the three-dimensional models of each pattern piece to obtain a complete three-dimensional model of the garment.
[0103] In one implementation, based on the position and size of each pattern piece in three-dimensional space and the pattern piece information represented by the spatial structure model of the garment, each pattern piece can be sculpted / optimized in detail in its corresponding three-dimensional geometric space to generate a three-dimensional model of each pattern piece. By combining the three-dimensional models of each pattern piece, a complete three-dimensional model of the garment can be obtained.
[0104] Based on the above embodiments, by generating the topological structure data of clothing and then using the geometric generation model to generate the spatial structure model, it is possible to effectively handle complex clothing topological structures, such as multi-layered and irregular designs, thereby improving the efficiency and accuracy of clothing modeling.
[0105] In one implementation, a structure generation model for generating topological data of clothing can be pre-trained. The structure generation model can employ a neural network model suitable for graph structure generation, such as a graph neural network (GNN) or a graph diffusion model.
[0106] Specifically, the design information of the clothing is first input into the structure generation model, and the model then outputs topological structure data represented by a graph structure.
[0107] In the above embodiments, the structure generation model can efficiently generate the topological data of clothing. This model is trained on clothing data labeled with pattern information.
[0108] In one implementation, the acquired design information can first undergo preprocessing through a feature extraction module. This module transforms multimodal inputs (such as text descriptions, reference images, or design diagrams) from the design information into a unified high-dimensional feature vector. The feature extraction module employs various deep learning techniques, including but not limited to Convolutional Neural Networks (CNNs), Transformer networks, Long Short-Term Memory (LSTM) networks, Variational Autoencoders (VAEs), or combinations thereof. Simultaneously, depending on the input data type, the module may also utilize traditional methods such as image filters and natural language processing techniques (e.g., Word2Vec word embedding) for preprocessing to extract feature information relevant to the design information.
[0109] After extracting feature vectors from the design information using the feature extraction module, these vectors can be passed as input to the structure generation model. The structure generation model then uses these feature vectors to generate the topological structure data of the garment. For example, as shown in Figure 3, based on the received feature vectors, the structure generation model generates the graph structure of the garment through node diffusion, node attribute and topology generation, and node splitting. Each node in this graph structure can correspond to a pattern piece, and the corresponding node attributes store the feature vector corresponding to that pattern piece. Accordingly, the structure generation model can be trained using the feature vectors of the garment sample as training samples and the topological structure data corresponding to the garment sample as labels.
[0110] In one implementation, the design information of the garment can be obtained, and the feature vectors of each pattern piece can be extracted from the design information of the garment. These feature vectors are then passed as input to the structure generation model, which generates a graph structure of the garment. Each node in the graph structure can correspond to a pattern piece, and the corresponding node attributes store the corresponding feature vectors.
[0111] In the above embodiments, the feature extraction module transforms multimodal design information into a unified high-dimensional feature vector, thereby enabling the application of various types of design information and increasing the applicability of the clothing modeling method.
[0112] In one implementation, using the topological data output by the structural generation model as input, the geometric generation model can further generate a spatial structural model of the garment. In the spatial structural model, each pattern piece is mapped to a corresponding three-dimensional geometric space to determine its position, rotation angle, scale, and relative relationship with other patterns in the three-dimensional space. That is, it can be considered that a three-dimensional geometric space surrounds the corresponding pattern piece, defining each pattern piece within its corresponding three-dimensional geometric space.
[0113] Based on the pattern information of each pattern piece, detailed optimization can be performed on each pattern piece within its three-dimensional geometric space to generate more detailed 3D models. This detail optimization process, also known as detail sculpting, can include smoothing and adjusting the shape of the pattern pieces, as well as modeling details such as garment materials, folds, seams, and textures. This can be done within the corresponding three-dimensional geometric space of each pattern piece, and through continuous adjustment and refinement, ensure that the geometric shape of each pattern piece in the three-dimensional geometric space matches the design intent as accurately as possible.
[0114] In the spatial structure model, the three-dimensional geometric space corresponding to each plate can take many forms. For example, it can be a bounding box, that is, using a cube or cuboid to enclose a plate; or it can be a convex hull, that is, a convex polyhedron that can completely enclose the plate; or it can be a sphere, polyhedron, etc. No specific limitation is made here.
[0115] As shown in Figure 4, the input to the geometric generation model includes the garment's structural diagram generated by the structural generation model and the initial bounding boxes corresponding to each pattern piece. Using the geometric database as a reference, a spatial structural model of the garment is generated. The initial bounding box can be the default shape and size of the bounding box corresponding to each pattern piece; the geometric database can contain a large number of bounding boxes for garment patterns and garment structural information.
[0116] In the above embodiments, a spatial structure model of three-dimensional geometric space including each pattern piece is generated by a geometric generation model, and then each pattern piece is sculpted in detail in the three-dimensional geometric space. This not only improves the quality and refinement of the three-dimensional clothing model, but also enhances the flexibility of the design.
[0117] As shown in Figure 5, based on the pattern information corresponding to each pattern piece, by optimizing the details of the bounding box corresponding to each pattern piece in the spatial structure model, a complete 3D model of the garment and its corresponding 2D pattern pieces can be accurately generated. The 2D pattern pieces can be generated directly from the pattern information, or they can be converted from the 3D models of each pattern piece.
[0118] Based on pattern information, by sculpting the details of the bounding box in the spatial structure model, the integrated generation of the three-dimensional model and two-dimensional pattern of clothing is realized, which greatly improves the compatibility between virtual design and actual production.
[0119] Figure 6 shows a schematic diagram of the modules of a clothing modeling system, which may include: a feature extraction module 61, a structural generation model 62, a geometric generation model 63, and a detail sculpting module 64.
[0120] Clothing modeling methods may include the following steps 1-5.
[0121] Step 1. Input the multimodal design information.
[0122] The pre-trained feature extraction module 61 encodes the input design information into feature vectors in a high-dimensional feature space.
[0123] The design information can take many forms, such as images, like clothing reference images; text describing clothing design information, such as a V-neck puff sleeve dress; and others, such as designer sketches or CAD drawings.
[0124] The feature extraction module 61 can employ a plate feature extraction model, which may be a neural network model trained on a large amount of pre-labeled plate data, or a manually designed filter, feature extraction encoder, or a combination of the above. Depending on the input data format, the neural network model may employ a convolutional neural network (CNN) model for processing two-dimensional data, such as a U-shaped network (UNet), a transformer network, a long short-term memory (LSTM) network, or a variational autoencoder (VAE). Preprocessing may also be performed using image filters and natural language processing (NLP) techniques (such as word embedding technology Word2Vec or the Transformer model).
[0125] The pre-training process is usually based on large-scale multimodal fashion data, including but not limited to textual design descriptions, design sketches, and finished garment images.
[0126] Step 2. Generate the topology data of the garment.
[0127] The encoded feature vectors are input into the structure generation model 62 to obtain the topological structure data of the garment, including the main patterns that make up the garment, the semantic labels (pattern information) of each pattern, and the sewing relationships between the patterns.
[0128] As shown in Figure 3, the structure generation model can adopt a neural network model suitable for graph structure generation, such as graph neural networks (GNN) or graph diffusion model. The generation process usually involves node diffusion, node semantics and topology generation, and node splitting (such as splitting a one-piece shirt into a two-piece shirt through nodes).
[0129] Structural generation models typically require training on clothing data labeled with structural information (such as pattern semantics). Usually, the generation model needs to be coupled with a simple semantic decoder to decode the pattern semantics from the high-dimensional vector.
[0130] Step 3. Input the topology data into the geometric generation model 63 to obtain a spatial structure model that represents the position and size of each plate in three-dimensional space.
[0131] Generally, geometric generative models can adopt generative model architectures such as diffusion models or GANs, using the topological structure data generated in the previous generation as the generation condition, and the generation result is a spatial structure model that is a pair of topological result data.
[0132] The geometric generation model can be trained using a dataset containing bounding boxes of each garment pattern and garment structure information.
[0133] Step 4. The detail sculpting module 64 can use the spatial structure model generated in the previous step as input to sculpt the specific 3D and 2D models of the plate within each bounding box. Geometric details can be represented in various ways, typically as point clouds or triangular meshes, but quadrilateral meshes or other polygonal meshes can also be used depending on the needs of different downstream tasks.
[0134] Step 5. The structural generation model 62, geometric generation model 63, and detail sculpting module 64 in the system can be used separately or in combination to achieve the following effects:
[0135] Using the structure generation model 62 alone, it is possible to parse clothing with multimodal design language as input. The input is multimodal design language such as text and images. The output topological structure data can be used to represent the structure of clothing, including the types and number of clothing patterns that make up the design, as well as the sewing relationship between the patterns.
[0136] By combining the structural generation model 62 and the geometric generation model 63, the spatial structure of the clothing, represented in the form of a bounding box, can be further recovered based on the obtained clothing topology.
[0137] Using the detailed sculpting model 64 alone, users can conveniently and efficiently generate high-precision digital garments by drawing bounding boxes in space. Simultaneously, users can edit the generated digital garments by modifying the bounding boxes. For example, a draped dress can be changed into a cardigan dress by splitting the front panel.
[0138] Combining the geometric generation model 63 and the detail sculpting module 64 can provide users with a new interactive way of modeling virtual fashion, that is, allowing users to model using topological data represented in a graph structure.
[0139] Please refer to Figure 9, which is an exemplary embodiment of a clothing modeling method, the method including the following steps S901-S906.
[0140] S901. Receive garment design information. In one implementation, interactive controls can be used to guide the user to upload garment design information; or, if the garment design information itself is also an output of other software, the garment design information can be automatically received through common software data transfer methods such as API interfaces.
[0141]
[0142] In another implementation, user-inputted clothing design information can be obtained. This clothing design information can be multimodal data, such as text prompts, sketch images, original sewing patterns, or unstructured point clouds, etc.
[0143] S902. Extract the feature vector of the garment from the design information of the garment; wherein, the feature vector includes a structured feature vector, which is used to represent a set of structured data corresponding to each pattern piece, and the structured data is used to represent the 2D and 3D geometric data corresponding to each pattern piece.
[0144] In one implementation, based on the clothing design information input by the user, a structured feature vector of the clothing can be extracted. This structured feature vector can be used to represent a set of structured data corresponding to each pattern piece. This structured data can be used to represent the 2D and 3D geometric data of the pattern piece.
[0145] In one implementation, based on user-inputted clothing design information, the clothing is modeled as a structured feature vector (or structured geometric image representation) comprising a set of structured data (or geometric image representation) divided according to the patterns of the clothing, wherein each piece of structured data can be considered as an encoding of the pattern and the corresponding 3D fabric.
[0146] In one embodiment, the structured data corresponding to each pattern piece may include first size data, second size data, and contour data, wherein the first size data is used to represent the 2D size of the pattern piece, the second size data is used to represent the spatial position and 3D size of the 3D fabric corresponding to the pattern piece, and the contour data is used to represent the 3D geometric data of the 3D fabric and the shape of the pattern piece.
[0147] In one embodiment, the first size data may include the length and width of the plate; the second size data includes the 3D coordinates of the center point of the 3D cloth corresponding to the plate and the length, width and height of the bounding box containing the 3D cloth; the contour data includes the 3D coordinates of the 3D vertex corresponding to each pixel in the image block of the preset resolution and an identifier indicating whether the 3D vertex corresponding to each pixel is located within the 3D cloth.
[0148] In one implementation, structured feature vectors It can be defined as:
[0149] Where i represents the i-th plate, and N represents the number of plates; first size data h i w represents the length of the plate. i This indicates the width of the plate, the second dimension data. o iThis represents the 3D coordinates of the center point of the 3D fabric corresponding to the pattern piece, s i The bounding box of the 3D fabric represents its length, width, and height; contour data. Including each pixel u in an image block with a preset first resolution of H×W p Four-channel data I i (u p The first three channels represent pixel u. p The 3D coordinates of the corresponding 3D vertex are normalized. The 4th channel data (also called the alpha channel data) is used to indicate whether the corresponding 3D vertex is within the 3D cloth (or whether the pixel is within the plate). For example, if the indicator is 1, it means that the corresponding 3D vertex is within the 3D cloth (or that the pixel is within the plate), and if the indicator is 0, it means that the corresponding 3D vertex is outside the 3D cloth (or that the pixel is outside the plate). The 4th channel data is equivalent to representing the occupancy map of the plate in the image block.
[0150] The first resolution H×W can be set according to actual needs, for example, H=W=256.
[0151] In one implementation, the contour data I of each image patch i You can use the plate P i Under UV parameterization, the corresponding 3D fabric C is parameterized at a preset first resolution H×W. i Obtained by rasterization.
[0152] Before rasterization, the plate P can be rotated first. i , so that its direction is similar to ν + Axis alignment, then via the first dimension data D i =(h i ,w i ) will pixel u p The 2D coordinates are normalized to [-1, 1]. 2 At the same time, the second size data B corresponding to the 3D fabric can be used. i =(o i ,s i ) 3D vertex v j The 3D coordinates are normalized to [-1, 1]. 3 Specifically, this can be achieved through the formula (v) j -o i ) / s i ∈[-1,1] 3 v of each 3D vertex j ∈C i Mapped to the normalized space.
[0153] For each pixel u p ∈[-1,1] 2 For a given 3D point p, we can test whether the 3D coordinates of point p fall within any triangle that makes up the 3D cloth; if so, we need to find the weight of the centroid containing the vertex j of that triangle and its relative weight. Then we get:
[0154] It is evident that if the test result indicates that the 3D coordinates do not fall within any triangle of the 3D cloth, that is, they fall outside the 3D cloth, then the relationship with pixel u is... p The 3D coordinates of the corresponding 3D points are all 0.
[0155] In one implementation, when rasterizing a plate with sharp features (such as a dart point), careful handling of boundary aliasing is required. Rasterization can be performed first at a second resolution, higher than the first resolution, for example, 1024×1024, and then downsampled to the first resolution of 256×256 using sparse pooling.
[0156] S903. Input the structured feature vector into the structure generation model and output the topological structure data of the clothing.
[0157] Among them, topology data can be used to represent the topological relationship and pattern information of several patterns contained in clothing.
[0158] In one implementation, the structured feature vectors of clothing can be used to generate sewing patterns, determine sewing relationships, generate 3D clothing models, and so on.
[0159] In one implementation, a structured feature vector containing 2D structural features and 3D geometric features can be input into a structure generation model (or a sewing relationship determination model) to generate topological data representing the sewing relationships between various patterns. Then, the patterns are sewn based on the sewing relationships represented by the topological data, and a corresponding 3D garment model is generated. For example, the method shown in steps S202-S203 of Figure 2 or other methods can be used; no specific limitations are specified here.
[0160] S904. Based on topological data, generate a spatial structure model of clothing through a geometric generation model.
[0161] S905. Based on the position and size of each pattern piece in three-dimensional space, as well as the pattern piece information, generate three-dimensional models of each pattern piece separately, and combine them to obtain a complete three-dimensional model of the garment.
[0162] It should be noted that steps S903-S904 can achieve all the relevant method embodiments of steps S202-S203 in Figure 2 and obtain the same or similar technical effects. The repeated parts will not be described again here.
[0163] S906. Based on the complete three-dimensional model of the garment, display the visual expression of the three-dimensional model of the garment.
[0164] In one implementation, after obtaining a complete 3D model of the garment, a visual representation of the garment's 3D model can be displayed based on this model. There are various ways to visually represent the garment's 3D model. One approach is to use common display technologies without any stylization, directly displaying the complete 3D model on the screen. Another approach is to further stylize the model, such as converting the complete 3D model into a 3D mesh model, further rendering the complete 3D model, or only displaying a portion of the 3D model to the user. These various visual representation methods help fashion designers flexibly adjust their observation methods of the 3D model during actual garment design to meet diverse design needs.
[0165] In the above embodiments, by generating a structured feature vector containing 2D dimensions, 3D spatial information, and contour data, unified modeling of 2D pattern pieces and 3D fabric geometry is achieved, solving the problem of separation between 2D structure and 3D geometry in traditional methods. At the same time, sewing relationships are generated based on this representation, and finally a garment model is generated, automatically completing the transformation from design information to a complete garment model. This significantly reduces the reliance on professional knowledge, improves the efficiency and flexibility of digital garment modeling, and meets the fast fashion industry's need for rapid iteration.
[0166] In one implementation, user-inputted design information can be used as input conditions to generate structured feature vectors for clothing through a pre-trained diffusion model.
[0167] In one implementation, patterns with similar functions typically exhibit similar shape features and have a consistent spatial relationship relative to the human body. For example, upper body patterns often have characteristic structural elements such as necklines and armholes, and are usually located above the chest area in 3D space.
[0168] This regularity means that the contour data I i 3D geometric data of 3D cloth in (I i The first 3 channels of data) and the shape of the plate (I i There is a strong correlation between the alpha channel data in the image, which allows structured feature vectors to be compressed into a unified latent space that captures both the shape and 3D geometry of the plate.
[0169] In one implementation, a pre-defined encoder (such as a variational autoencoder based on UNet) can be used to encode the contour data and extract its low-dimensional contour feature vector, for example, a 64-dimensional contour feature vector. Specifically, this can be represented as follows: Where, Φ ε For encoder, For decoders.
[0170] In one implementation, to further enhance the two-dimensional-three-dimensional correlation in the latent space, during training, I can be set with a probability of, for example, 0.25. i 3D geometric data input encoder Φ ε Previously, it was randomly masked out, and during inference, the decoder was forced to... The 3D geometry is reconstructed without discriminatory manipulation based on the shape of the garment's surface. This masking method also enables flexible garment generation from original sewing patterns.
[0171] In one implementation, after extracting the contour feature vector, the garment can be represented as a set of fixed-length latent tokens T. i :
[0172] As can be seen, the latent marker can consist of three parts, the first being the size data. Second dimension data Contour feature vector
[0173] The mean squared error loss can be used to train the encoder to minimize the reconstruction error, while approximating the encoder's posterior distribution. With standard normal plane Add a low-weight (λ) between reg =1e-6)KL divergence term, the loss function is expressed as follows:
[0174] In one implementation, a diffusion model (e.g., a diffusion transformer (DiT)) can be trained to take various design information input by the user as input conditions c, and then distribute the data from a standard normal distribution. Random samples are used to generate latent labels through diffusion model inference. The contour feature vectors in the latent labels are then restored to contour data through a decoder, thus obtaining structured feature vectors.
[0175] Specifically, during the forward process, the input latent labels can be processed using time steps of 0 ≤ t ≤ 1000. Interpolate gradually with random noise so that it becomes a noise state at each time step. In the reverse process, the noisy contour feature vector will be... Linearly embedded into the patch marker, combining the first and second size data. The noisy state is constructed by embedding the data into location markers and adding them to the embedded time step, and then training the diffusion transformer. The added noise is recovered from the previous time step t-1 to t based on the input condition c, as specifically expressed below:
[0176] Using predicted noise With added noise ∈ t Training with mean squared error between
[0177] Where, ∈ t This represents Gaussian noise added at time step t. All patterns in the structured feature vector are denoised in parallel, while the self-attention mechanism of the transport block backbone implicitly models the connections between patterns, ensuring the structural validity of the generated garment. For convenience, each garment is zero-padded during training, resulting in a preset number of patterns, e.g., N = 32. Thus, a preset number of latent labels can be inferred through the diffusion model, and any latent labels whose first and second size data do not meet the requirements can be discarded; for example, patterns whose bounding box area based on the first size data is less than the area threshold ||D||. i || 2 <1e- 4 Alternatively, based on the second dimension data, the bounding box volume of the 3D cloth may be less than the volume threshold |B. i |<0.075 etc.
[0178] In one implementation, the design information, which serves as input condition c, needs to be encoded into its own latent space by a pre-trained encoder and then injected into the denoiser of the diffusion model via cross-attention. For example, text prompts can be mapped to a 1024-dimensional text latent space using the CLIP text encoder; line drawings and sketches, etc., generate a 1024-dimensional image latent space using a pre-trained DINOv2 visual transformer; and unstructured point clouds are processed by the point transformer PTv3 to generate a 1024-dimensional point latent space.
[0179] For example, as shown in Figure 10, which is divided into two parts, the upper part is the Geometry Encoding Stage and the lower part is the Diffusion Generation Stage. A Variational Autoencoder (VAE) is used to compress the geometric information of the clothing, encoding each garment into a set of fixed-dimensional (72-dimensional) latent labels. These compact latent representations serve as the training targets for the subsequent Diffusion Generation Stage. In the Diffusion Generation Stage, a Diffusion Transformer (DiT) denoiser can be used to fuse multimodal design information through a cross-attention mechanism, generating a structured Garmage representation and achieving an end-to-end link from the original clothing data to the generative model.
[0180] In the above embodiments, a latent marker corresponding to the plate is generated by a diffusion transformer, and the contour data is recovered by a decoder. The data dimensionality is compressed by utilizing the latent space, which improves the generation efficiency. At the same time, the separate representation of the latent vector (size data and contour latent vector) enables the model to optimize the generation of each part of the data in a targeted manner, and the recovery process of the decoder ensures the fineness of the contour data, thus balancing generation efficiency and geometric accuracy.
[0181] In one implementation, after obtaining the structured feature vector of the garment, it can be based on the contour data I. i Extracting 2D contour point sets from the published film 2D contour point set Includes several 2D contour points;
[0182] Where, k i Indicates from contour data I i The number of 2D contour points extracted.
[0183] In one implementation, the contour data I can be used as a basis. i Fourth channel data [I] i ]4. Extract the 2D contour point set of each plate through erosion operation.
[0184] For example, the contour points can be extracted using the following formula:
[0185] in, This indicates binary erosion performed using the structuring element Λ. p :[I i ]4(u p )>0} represents all pixels where the fourth channel data is greater than 0. This indicates pixels whose values are still greater than 0 after the erosion operation. The erosion operation will "shrink" the plate area, remove boundary pixels, and retain only the internal area.
[0186] In addition, the first three channels of the contour data [I] i ] 0:3 It can obtain a set of 2D contour points The corresponding 3D contour point set ρI i 3D contour point set ρI i It includes several 3D contour points, and the 3D coordinates of each 3D contour point can be inversely normalized to world coordinates based on the corresponding second-dimensional data.
[0187] In one implementation, the plate produces a non-uniform dot density, which affects the particle density at a predefined particle distance. Resampling is performed to ensure that adjacent 2D contour points on all plates are at a consistent distance.
[0188] In one implementation, it can be based on a 2D contour point set. and 3D contour point set ρI i Geometric data, such as the 2D coordinates of each 2D contour point and the 3D coordinates of each 3D contour point, can be used to extract the contour point feature matrix. The contour point feature matrix includes contour point feature vectors of a preset dimension (e.g., 128 dimensions) corresponding to each 2D contour point. For example, two PointNet++ point encoders can be used. Contour point feature vectors are extracted from the 2D contour point set and the 3D contour point set respectively, and then fused into a contour point feature matrix. The contour point feature matrix includes the contour point feature vectors corresponding to each 2D contour point.
[0189] Where K = ∑ i k i It is the total number of outline points extracted from all plates.
[0190] Based on the contour point feature matrix, the stitching relationship between the panels can be generated.
[0191] In one implementation, a classifier Φ can be used first. cls (·) Filter all 2D contour points in the contour point feature matrix to predict the sewing probability of each 2D contour point, thereby identifying candidate sewing points from the 2D contour point set and constructing a sewing point feature matrix containing the contour point feature vectors corresponding to each sewing point. Then, based on the stitching point feature matrix, the stitching relationships between the panels can be generated.
[0192] In one implementation, sewing prediction can be performed based on the seam point feature matrix to generate an adjacency probability matrix. Then, the sewing relationship between each seam point can be determined based on the adjacency probability matrix, thereby generating the sewing relationship between the panels. The method of sewing prediction can be set according to actual needs; for example, feature matching can be performed on the feature vectors of the contour points of each seam point to calculate the matching probability of each seam point.
[0193] In one implementation, two multilayer sensor heads Φ can be applied. prime (·) and Φ dual (·) is used to separate the original features and dual features in the stitch point feature matrix:
[0194] Then, the original features and dual features are combined with a learnable symmetric weight matrix. Combined, then Sinkhorn normalization is performed to generate the adjacency probability matrix: Here, A ij ≈A ji This indicates the probability of suturing between the i-th and j-th suturing points, where τ is a temperature parameter.
[0195] The suturing relationship between each suturing point can be obtained based on the adjacency probability matrix.
[0196] In one implementation, the stitching relationship between each stitching point can be obtained using the Hungarian algorithm based on the adjacency probability matrix. Alternatively, the stitching relationship between each stitching point can also be obtained using a greedy algorithm or simulated annealing algorithm.
[0197] In one implementation, a stitching relationship determination module (also known as Garmagejigsaw) can be pre-trained to implement the above process. Its input is the structured feature vector (Garmage) of the garment, and its output is the stitching relationship between the stitching points on each piece of the garment.
[0198] In one implementation, the stitching relationship determination module can be trained end-to-end using two complementary loss terms: a binary cross-entropy loss. The difference between the predicted sewing point probabilities and the true labels is used to supervise the comparison; and a matching loss is applied. This is used to align the predicted adjacency probability matrix A with the true matrix. It's worth noting that this is done to prevent the network from minimizing the absolute optimal solution by omitting stitching pairs. The adjacency probability matrix A can be filled into a K*K matrix, where the columns and rows corresponding to non-seam points are all zero, and the matching loss can be calculated over the entire contour point set.
[0199] In one implementation, GarmageJigsaw is trained on vertex-level sewing data, where each stitch is represented as a tuple of vertex IDs. In real garment production, the vertices of the seams coincide perfectly, with a 3D Euclidean distance of zero. However, Garmages generated by diffusion often exhibit small seam gaps. To make the network robust to these artifacts, the following data augmentation method can be applied: First, the boundary planes of each panel are offset inwards by a random distance (e.g., between 2mm and 8mm) towards their centroid, transferring the original sewing relationships to these offset boundaries. Next, anisotropic noise is introduced along the seam direction at the actual sewing points, and isotropic noise is introduced at all other points on the offset boundaries. Finally, the 3D bounding box center and scale of each panel, as well as its 2D pattern dimensions, are slightly perturbed to compensate for the generated positional noise.
[0200] In the above embodiments, sewing relationships are generated by extracting the 2D and 3D coordinate features of contour points, realizing automated sewing relationship inference based on multi-dimensional features, avoiding the ambiguity of traditional edge matching methods; combining 2D contours and 3D geometric features improves the accuracy of sewing relationship inference, which is especially suitable for the association modeling of complex garment patterns and reduces the workload of manually defining sewing relationships.
[0201] In one implementation, a sewing pattern can be generated based on a structured feature vector, whereby the sewing pattern is represented as a vector curve and the sewing relationship between the curves is defined.
[0202] In one implementation, several 2D contour points of each plate can first be converted into several contour curves. For example, a specially designed one-dimensional convolutional filter can be used to detect corner points exhibiting sharp turning angles in the set of 2D contour points. Then, the 2D contour points between adjacent corner points are fitted into contour curves, thereby generating a smooth and compact vector representation for each plate. This vectorization process effectively smooths sloping boundaries and fills in small noise holes. Subsequently, a heuristic algorithm can be used to determine the stitching relationship between the contour curves of each plate based on the stitching relationship between the stitching points.
[0203] In one implementation, each sewing pattern panel can be triangulated into a grid using constrained Delaunay triangulation, guided by vectorized panel outlines and inferred sewing relationships. Specifically, the boundary face of each 3D fabric grid consists of outline points uniformly resampled according to the sewing correspondences, ensuring smooth and well-aligned seams between adjacent panels.
[0204] In one implementation, the vertex positions of these triangulated meshes are determined by sampling corresponding coordinates from their associated structured feature vectors using bilinear interpolation, resulting in a fine-grained initial drape state. Unlike garment modeling frameworks that rely on coarse rigidity transformations to position each pattern piece, structured feature vectors provide vertex-level precision in the initial 3D placement. This capability enables the accurate capture of complex folding behaviors and subtle garment structures.
[0205] For example, as shown in Figure 11, sewing relationships are recovered from the generated garment model (a) and an overview of sewing patterns that can be used for simulation is reconstructed. Unlike edge-based methods, this disclosure predicts sewing relationships at the vertex level. Specifically, contour points are first sampled from the generated garment model representation (c). A garment jigsaw puzzle tool takes the contour points as input and uses a point classifier to identify sewing points and non-sewing points (d), followed by a stitch predictor to recover point-to-point stitches (e), represented as an adjacency matrix. Simultaneously, vectorized sewing patterns (b) can be extracted from the garment model, and the predicted stitches of the points are transferred to these vectorized patterns (f). Then, based on the predicted stitches, a triangular mesh is reconstructed from the vectorized sewing patterns using Delaunay triangulation constraints. Finally, vertex-level overhang states are retrieved from the generated garment model, resulting in a triangular mesh (g) that can be directly integrated into any conventional fabric simulation engine to generate physically plausible garments.
[0206] In the above embodiments, contour points are converted into contour curves and the stitching relationship between curves is determined based on the probability matrix, which improves the stitching relationship from point-level precision to curve-level precision, better meeting the actual needs of the industry for garment sewing; the curve-level stitching relationship is easy to be compatible with traditional garment CAD software, realizing the seamless transformation of the generated results into production-level assets, and improving the practicality and industrial value of the technical solution.
[0207] In one implementation, a generative framework (which may be called GarmageNet) can be constructed to implement the above-described clothing modeling method, capable of generating complex clothing that can be used for simulation from various input modalities.
[0208] In one implementation, some garment datasets, limited to simple flat garments, present a critical limitation when modeling complex, multi-layered garments. To address this, a professionally curated, industrial-grade dataset (which may be referred to as GarmageSet) is pre-collected. This dataset demonstrates complex folding behavior and multi-layered structures, accompanied by manually validated structural and style annotations, and multimodal augmentations including line drawing sketches and sampled point clouds. Each garment in the dataset contains four key components: a high-resolution 3D garment mesh with per-vertex UV coordinates (aligned with the sewing pattern), realistic stitching relationships represented in vertex pairs, semantic labels for each pattern piece, and a detailed design description.
[0209] The clothing dataset contains a large number of unique garments, covering five main clothing categories: tops, pants, skirts, dresses, and coats, as well as several subcategories such as bras, vests, and pajamas. All clothing is draped over a standard virtual human in a pose A to reduce geometric differences caused by body size and posture.
[0210] GarmageSet is built efficiently using a component-based strategy. For example, it collects real sewing patterns, which are then labeled by professional pattern makers according to a hierarchical structure to form a reusable component library (such as garment body, sleeves, collar, etc.). Each component comes with a style tag (such as neckline type, sleeve type, etc.).
[0211] Garment assembly involves randomly selecting elements from the component library, generating 1-3 design modification instructions (such as adjusting length or adding decorations) using the large language model (QWen3), and having a professional modeler manually implement the modifications and assemble them into a complete 3D garment.
[0212] GarmageSet contains detailed structural and style annotations, including image semantics, structural lines, and fashion landmarks.
[0213] Pattern semantics: Define 8 types of structural patterns (collar, sleeve, front, back, etc.) and 7 types of decorative patterns (pocket, pleats, cuffs, etc.), and mark them on the 2D sewing pattern using the LabelStudio tool.
[0214] Structural lines: Extract five types of key structural lines, including neckline, armhole, and waistline, to simulate changes in design parameters (such as sleeve length and garment length adjustments).
[0215] Fashion Landmarks: Mark key positions such as shoulder points, chest points, and mid-neck points on 2D patterns and 3D models to unify the coordinate space of different garments and support precise alignment and fitting.
[0216] Each garment contains a structured geometric image representation, vertex-level sewing relationships, and multimodal data.
[0217] Structured geometric image representation (Garmage) includes first-dimensional data (D i ), second dimension data (B i ) and four-channel contour data (I i ).
[0218] Vertex-level sewing relationships are stored as vertex ID pairs.
[0219] Multimodal data is used for professional descriptive text (including categories, outlines, and design details), 24-view line drawing sketches, and Poisson sampling point clouds with occlusion awareness. GarmageSet not only provides training data for GarmageNet, but can also be expanded by generating new data through the model, forming a self-enhancing loop of "generation-labeling-training" to continuously improve model performance.
[0220] Figure 7 is a schematic structural diagram of a device provided in an exemplary embodiment. Referring to Figure 7, at the hardware level, the device includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile memory 710, and may also include other hardware required for its functions. One or more embodiments of this specification can be implemented in software, for example, the processor 702 reads the corresponding computer program from the non-volatile memory 710 into the memory 708 and then runs it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0221] Please refer to Figure 8. The garment modeling device can be applied to the equipment shown in Figure 7 to achieve the technical solution of this specification. The garment modeling device may include: a topology generation module 801, a spatial structure generation module 802, and a three-dimensional model generation module 803.
[0222] The topology generation module 801 is used to generate topology data of the garment based on the garment's design information; wherein, the topology data is used to represent the topological relationship and pattern information of several patterns included in the garment; the spatial structure generation module 802 is used to generate a spatial structure model of the garment based on the topology data through a geometric generation model; wherein, the spatial structure model is used to represent the position and size of each pattern in three-dimensional space; the three-dimensional model generation module 803 is used to generate three-dimensional models of each pattern based on the position and size of each pattern in three-dimensional space, as well as the pattern information, and combine the three-dimensional models of each pattern to obtain a complete three-dimensional model of the garment.
[0223] Optionally, the topology generation module 801 is used to obtain the design information of the garment and extract the feature vector of the garment from the design information; input the feature vector into the structure generation model and output the topology data of the garment.
[0224] Optionally, the structure generation model is a neural network model obtained by training the feature vector of the clothing sample as the training sample and the topological structure data corresponding to the clothing sample as the label.
[0225] Optionally, the spatial structure model includes a three-dimensional geometric space located at the position corresponding to each plate and corresponding to each plate; the three-dimensional model generation module 803 is used to perform detail optimization on each plate in the three-dimensional geometric space corresponding to each plate based on the plate information of each plate, so as to generate a three-dimensional model of each plate.
[0226] Optionally, the three-dimensional geometric space includes a bounding box.
[0227] Optionally, the 3D model generation module 803 is used to generate 2D plates corresponding to each plate based on the plate information.
[0228] Please refer to Figure 12. The garment modeling device can be applied to the equipment shown in Figure 7 to realize the technical solution of this specification. The garment modeling device may include: a design information input module 1201, a feature extraction module 1202, a topology generation module 1203, a spatial structure generation module 1204, a 3D model generation module 1205, and a model display module 1206.
[0229] The design information input module 1201 receives the design information of the garment; the feature extraction module 1202 extracts the feature vector of the garment from the design information; wherein the feature vector includes a structured feature vector, which represents a set of structured data corresponding to each pattern piece, and the structured data represents the 2D and 3D geometric data corresponding to each pattern piece; the topology generation module 1203 inputs the structured feature vector into a structure generation model and outputs the topology data of the garment; wherein the topology data represents several elements contained in the garment. The topological relationships and information of the pattern pieces; the spatial structure generation module 1204 is used to generate a spatial structure model of the garment based on the topological structure data through a geometric generation model; wherein, the spatial structure model is used to represent the position and size of each pattern piece in three-dimensional space; the three-dimensional model generation module 1205 is used to generate three-dimensional models of each pattern piece based on the position and size of each pattern piece in three-dimensional space, as well as the pattern piece information, and combine the three-dimensional models of each pattern piece to obtain a complete three-dimensional model of the garment; the model display module 1206 is used to display the visual expression of the three-dimensional model of the garment based on the complete three-dimensional model of the garment.
[0230] Optionally, the structured data of each pattern piece includes: first size data, second size data, and outline data; wherein, the first size data of the pattern piece is used to represent the 2D size of the pattern piece, the second size data of the pattern piece is used to represent the spatial position and 3D size of the 3D fabric corresponding to the pattern piece, and the outline data of the pattern piece is used to represent the 3D geometric data of the 3D fabric corresponding to the pattern piece and the shape of the pattern piece.
[0231] Optionally, the first size data of the pattern includes the length and width of the pattern; the second size data of the pattern includes the 3D coordinates of the center point of the 3D fabric and the length, width and height of the bounding box containing the 3D fabric; the outline data of the pattern includes the 3D coordinates of each pixel in the image block of the preset first resolution and an identifier for indicating whether the 3D coordinates of each pixel are located within the 3D fabric.
[0232] Optionally, the outline data of the plate includes four-channel data of each pixel in an image block with a preset first resolution, wherein the first three channels of data represent the normalized 3D coordinates of the pixel, and the fourth channel of data is used to indicate whether the 3D coordinates of the pixel are located within the 3D fabric.
[0233] Optionally, if the fourth channel data indicates that the 3D coordinates corresponding to the pixel are not located within the 3D fabric, then the 3D coordinates indicated by the corresponding first 3 channel data are all 0.
[0234] Optionally, the contour data is obtained by rasterizing the corresponding 3D fabric at a preset first resolution under the UV parameterization of the plate.
[0235] Optionally, the feature extraction module 1202 is used to generate a structured feature vector of the clothing by using the clothing design information input by the user as input conditions and through a pre-trained diffusion transformer.
[0236] Optionally, the feature extraction module 1202 is used to take the clothing design information input by the user as input conditions, and generate a set of potential labels corresponding to each pattern piece through a pre-trained diffusion model. The potential labels of the pattern pieces include the first size data, the second size data, and the contour feature vector of the pattern pieces. Based on the contour feature vector of the pattern pieces, the contour data of the pattern pieces is generated through a decoder.
[0237] Optionally, the topology generation module 1203 is used to input the structured feature vector into the structure generation model and output topology data representing the sewing relationship between the plates.
[0238] Optionally, the topology generation module 1203 is used to extract 2D contour point sets of each plate and 3D contour point sets corresponding to the 2D contour point sets based on the contour data, wherein the 3D contour point sets include 3D contour points corresponding to each 2D contour point in the 2D contour point sets; based on the geometric data of the 2D contour point sets and 3D contour point sets, extract a contour point feature matrix, wherein the contour point feature matrix includes contour point feature vectors corresponding to each 2D contour point; and based on the contour point feature matrix, obtain topology data for representing the stitching relationship between the plates.
[0239] Optionally, the topology generation module 1203 is used to extract the 2D contour point set of each plate based on the fourth channel data in the contour data through an erosion operation.
[0240] Optionally, the topology generation module 1203 is used to identify candidate stitching points from the 2D contour point set using a classifier based on the contour point feature matrix, and construct a stitching point feature matrix containing contour point feature vectors corresponding to each stitching point; generate an adjacency probability matrix between each stitching point based on the stitching point feature matrix; and obtain topology data representing the sewing relationship between the plates based on the adjacency probability matrix.
[0241] Optionally, the topology generation module 1203 is used to separate the original features and dual features in the stitching point feature matrix through two multilayer perceptrons; and to perform Sinkhorn normalization based on the original features and dual features to obtain the adjacency probability matrix.
[0242] Optionally, the topology data includes: the stitching relationship between the stitching points of each plate; the topology generation module 1203 is used to determine the stitching relationship between each stitching point based on the adjacency probability matrix using the Hungarian algorithm.
[0243] Optionally, the topology data includes: the stitching relationship between the contour curves of each plate; the contour curves are obtained by converting several 2D contour points of each plate.
[0244] Optionally, the structure generation model is a neural network model obtained by training the feature vector of the clothing sample as the training sample and the topological structure data corresponding to the clothing sample as the label.
[0245] Optionally, the spatial structure model includes a three-dimensional geometric space located at the position corresponding to each plate and corresponding to each plate; the three-dimensional model generation module 1205 is used to perform detail optimization on each plate in the three-dimensional geometric space corresponding to each plate based on the plate information of each plate, so as to generate a three-dimensional model of each plate.
[0246] Optionally, the three-dimensional geometric space includes a bounding box.
[0247] Optionally, the 3D model generation module 1205 is used to generate 2D plates corresponding to each plate based on the plate information.
[0248] With the accelerated digital transformation and virtualization trends in the apparel industry, especially in the fields of 3D garment modeling and virtual try-on, automation technology is gradually changing traditional garment design and production processes. In traditional garment design, patterns are the core carrier of the design, and multiple patterns are combined into three-dimensional garments through sewing threads. However, manually handling these patterns and their sewing relationships is tedious and time-consuming, driving the research and application of automated pattern modeling technology.
[0249] The core objective of automated garment pattern modeling technology is to automatically generate corresponding 3D garment models from 2D garment pattern data. This technology has wide applications in virtual garment design, digital garment displays, virtual fitting rooms in e-commerce, and in production for predicting the design effect and optimizing the pattern cutting process. Through automated modeling, designers can quickly verify the effect of garment designs without relying on time-consuming physical sample production and fitting processes, thereby significantly improving production efficiency, reducing costs, and minimizing material waste.
[0250] Current automated garment modeling processes typically involve several key steps: first, generating sewing lines in 2D space to connect various patterns; then, laying out the initial 3D positions of the patterns; and finally, assembling these patterns into a three-dimensional garment model through physical simulation (flexible simulation). Despite some progress in these technologies, these automated processes still face several challenges, such as the complexity of sewing line generation, the uncertainty of initial 3D positions, and the cumulative effect of errors.
[0251] 1. The complexity of sewing thread generation: Generating sewing thread requires extensive pattern making and sewing knowledge. Some automated systems still rely on manually set rules, resulting in limited applicability.
[0252] 2. Uncertainty of initial 3D position: The inference of the initial position of the plate in 3D space is crucial for the subsequent simulation effect, but some geometric inference methods cannot always accurately reflect the actual effect and are prone to introducing errors.
[0253] 3. Error accumulation effect: Errors in sewing thread generation and 3D position initialization will accumulate continuously during the flexible simulation process, resulting in a large deviation between the final 3D clothing model and the real effect, especially when dealing with complex clothing designs.
[0254] In view of this, and referring to Figures 13-17, this specification proposes a clothing modeling method and apparatus in some embodiments. The method involves first generating a set of three-dimensional spatial points corresponding to each pattern piece in three-dimensional space, and then connecting these sets using topological relationships to generate a complete three-dimensional model of the clothing.
[0255] In implementation, the pattern information of the garment is obtained; based on the pattern information, a point set generation model is used to generate a three-dimensional spatial point set of each pattern of the garment in three-dimensional space; based on a preset mesh, the connection relationship of the three-dimensional spatial point sets of each pattern of the garment is established to generate a complete three-dimensional model of the garment.
[0256] In the above technical solution, the garment modeling process is divided into two stages: a geometric data generation stage and a topology construction stage. First, a three-dimensional spatial point set is generated based on pattern information using a pre-trained point set generation model. Then, in the topology construction stage, these point sets are connected according to a preset mesh and topological relationships to complete the construction of the three-dimensional model. The significant advantage of this solution is that it avoids the tedious steps of generating sewing threads and initializing pattern positions in traditional modeling methods. Especially in complex garment designs, it can significantly reduce the accumulation of errors and improve the robustness and accuracy of modeling. Through this method, garment designers can more quickly and accurately generate high-precision 3D garment models that meet actual needs, thereby supporting various application scenarios such as virtual try-on and digital display. The exemplary embodiments of the garment modeling method and apparatus are described below with reference to Figures 13-17.
[0257] Please refer to Figure 13, which is an exemplary embodiment of a clothing modeling method, the method including the following steps S1301-S1303.
[0258] S1301. Obtain the pattern information of the garment.
[0259] In one implementation, several pattern pieces of the garment are first acquired. The pattern piece information typically includes 2D images of the garment's patterns, specifically design drawings of components such as the front, back, and sleeve pieces. In addition to the planar images of the patterns, other data related to the garment's structure may also be included, such as location, shape, size, pattern semantics, vector boundaries, marker points, cutting lines, and other relevant information.
[0260] There are various ways to obtain pattern information. For example, traditional paper pattern scanning can be used to convert paper design drawings into digital format using a high-resolution scanner, which serves as the basic information of the pattern. Alternatively, pattern information can be exported from clothing design software (such as AutoCAD) to obtain more accurate geometric data and cutting lines. Or, image processing algorithms can be used to extract boundaries and key marks from the design drawings, and pattern information can be extracted based on image recognition.
[0261] S1302. Based on the pattern information, generate three-dimensional spatial point sets corresponding to each pattern of the garment through a point set generation model.
[0262] After obtaining the information of each plate, unstructured geometric data for each plate can be generated in 3D space using a pre-trained point set generation model. This unstructured geometric data can be a 3D point set, comprising multiple 3D points that represent the shape and spatial location of the plate in 3D space. These points do not have definite connections between them and are therefore unstructured data. The spatial points can take the form of point clouds, geometric images, or Gaussian surface elements, etc.
[0263] The 3D spatial point sets of each pattern piece can be generated independently and can be divided. The pattern information of each pattern piece can be input separately into the point set generation model to obtain the corresponding 3D spatial point set; alternatively, the pattern information of all patterns pieces included in the garment can be input simultaneously into the point set generation model, which then generates an independent 3D spatial point set corresponding to each pattern piece. For example, Figure 3 shows a schematic diagram of a 3D spatial point set of a pattern piece. The pixels contained in each pattern piece in the figure can correspond to a 3D spatial point cloud. When generating the 3D spatial point cloud, the 3D spatial position information of each point can be converted into RGB colors for display to the user.
[0264] S1303. Using a preset mesh pattern, construct the connection relationship between the spatial points in the three-dimensional spatial point set of each piece of clothing to generate a complete three-dimensional model of the clothing.
[0265] After generating the three-dimensional spatial point sets corresponding to each pattern piece, a preset mesh pattern can be used to connect these spatial points in three-dimensional space to form the surface of the garment, thereby obtaining the three-dimensional model of the garment. For example, by establishing connection relationships between the three-dimensional spatial point sets corresponding to the patterns pieces shown in Figure 14, the three-dimensional model of the garment shown in Figure 15 can be obtained.
[0266] The generated 3D model conforms to the standards of a flexible simulation engine, facilitating subsequent virtual try-on or physical simulation. The flexible simulation engine allows for further processing and optimization of the 3D model, ultimately resulting in a model with realistic clothing physical properties. Common flexible simulation engines include game engines such as Unity and Unreal Engine, which provide efficient real-time simulation; alternatively, professional clothing design software such as Style3D, CLO 3D, and BW can be used. These tools focus on precise behavioral simulation and rendering effects of clothing, providing a higher-quality virtual try-on experience.
[0267] In one implementation, adjacent spatial points can be connected using a preset grid pattern based on the three-dimensional spatial position information of each point. Alternatively, the topological relationships between different panels and the three-dimensional spatial position information of the points can be combined to connect adjacent spatial points using a preset grid pattern, ensuring that the grid structure is reasonable and conforms to physical constraints.
[0268] In this context, "mesh pattern" refers to the style of the grid formed by connecting spatial points. It can employ triangular mesh, quadrilateral mesh, or other polygonal mesh patterns. A triangular mesh pattern forms a triangular face with every three adjacent spatial points. This mesh pattern is suitable for complex and free-form surfaces because it offers strong adaptability and flexibility, effectively handling irregular and curved garment patterns. A quadrilateral mesh pattern forms a quadrilateral face with every four adjacent spatial points, typically suitable for more regular or structured garment patterns. For example, for straight-cut skirts and trousers, quadrilateral meshes provide a simpler model and offer higher computational efficiency. Other polygonal meshes, such as hexagonal meshes, allow for selection of different shapes based on specific design requirements. These meshes are typically used for more detailed and specialized design needs, providing more precise connections in certain situations.
[0269] In one implementation, different grid patterns can be used for different boards. For example, a triangular grid pattern can be used for boards with complex structures, while a quadrilateral grid pattern can be used for boards with simple structures.
[0270] In the above technical solution, the garment modeling process is divided into two stages: a geometric data generation stage and a topology construction stage. First, a pre-trained point set generation model generates a 3D spatial point set based on the pattern information. Then, in the topology construction stage, these point sets are connected according to a preset mesh and topological relationships to complete the construction of the 3D model. The significant advantage of this solution is that it avoids the tedious steps of generating sewing lines and initializing pattern positions in traditional modeling methods. Especially in complex garment designs, it can significantly reduce the accumulation of errors and improve the robustness and accuracy of the modeling.
[0271] In one implementation, the system can first obtain the clothing pattern pieces input by the user, and then extract the pattern piece information corresponding to each pattern piece from the pattern pieces using a preset pattern piece feature extraction model.
[0272] The user-input plate can include a scalar plate image in scanned image format obtained by scanning traditional paper plate; or a vector plate file in DXF or PDF format exported by CAD plate making software such as ET, Optitex, and TUKAcad.
[0273] The feature extraction model for the printed circuit board can be a neural network model trained on a large amount of pre-labeled printed circuit board data, or a manually designed filter, feature extractor, or a combination of the above. Depending on the input data format, the neural network model may employ a convolutional neural network (CNN) model for processing two-dimensional data, such as the U-shaped network (UNet), or a transformer network and a long short-term memory (LSTM) network. The feature extraction model can extract feature vectors from the input printed circuit board to describe features such as position, shape, size, printed circuit board semantics, vector boundaries, and marker points.
[0274] Then, the pattern information output by the feature extraction model is input into the point set generation model, which generates unstructured geometric data for each pattern, i.e., three-dimensional spatial point sets. These three-dimensional spatial point sets represent the shape and spatial position of each pattern. Finally, a preset mesh pattern is used to connect the three-dimensional spatial point sets of each pattern included in the garment to construct a complete three-dimensional model of the garment.
[0275] In the above embodiments, by employing a preset plate feature extraction model, key feature data of the plate can be automatically and accurately extracted as plate information, thereby providing more accurate input for subsequent 3D modeling.
[0276] In one implementation, depending on the dataset size and training difficulty, diffusion models, flow models, or variational autoencoders (VAEs), generative adversarial networks (GANs), etc., can be used as the base model to construct the generative model. For example, a latent diffusion model (LDM) or a diffusion model with transformers (Dit) can be used.
[0277] Taking a pre-trained LDM as an example, a large number of garment pattern samples and their corresponding 3D spatial point sets are first collected. Using the pattern information as input features and the corresponding 3D spatial point sets as labels, the pre-trained LDM is fine-tuned to learn the mapping relationship between the pattern information and the 3D spatial point sets, thereby constructing a generative model.
[0278] In the above embodiments, by fine-tuning the diffusion model, it is optimized for the specific task of garment pattern making, enabling the model to generate a corresponding three-dimensional spatial point set based on the input pattern information. The trained point set generation model can generate corresponding three-dimensional spatial point sets based on the information of different garment patterns.
[0279] In one implementation, a topology model can be pre-built and trained. The three-dimensional spatial point sets of each pattern piece output by the point set generation model are input into the trained topology model. Based on the topological structure of each pattern piece, the topology model uses a preset mesh pattern to construct the connection relationship between the spatial points in the three-dimensional spatial point sets of each pattern piece of the garment, and outputs a complete three-dimensional model of the garment.
[0280] In one implementation, the topology model is typically modeled as a graph structure generation problem, and its output can be the edges of a given graph structure. Its data format includes, but is not limited to, adjacency matrices and adjacency lists. After inputting the 3D spatial point sets of each pattern piece into the topology model, it can output data representing the connection relationships between the spatial points in the 3D spatial point sets of each garment pattern piece, such as adjacency matrices and adjacency lists.
[0281] In one implementation, the topology model can be divided into two stages when establishing the connection relationship between the spatial points in the three-dimensional spatial point set of each plate: in the first stage, a preset mesh pattern is used to construct the connection relationship between the spatial points in the three-dimensional spatial point set of each plate; in the second stage, based on the topology between each plate, a preset mesh pattern is used to construct the connection relationship between the corresponding three-dimensional spatial point sets.
[0282] The first and second stages can use the same or different grid patterns. Different grid patterns can be used for different plates, and users can choose according to their actual needs.
[0283] It should be noted that, according to the requirements of the flexible simulation engine, the topology model does not need to perform the first stage of processing. The topology model only needs to construct the continuous relationship between the three-dimensional spatial point sets corresponding to each plate.
[0284] By constructing the connection relationships between the three-dimensional spatial point sets of clothing based on a topological model, the three-dimensional structure of the clothing can be accurately reproduced, and flexible mesh mode selection can be provided to meet different design needs. The phased processing method improves modeling accuracy and reduces computational complexity.
[0285] In one implementation, when generating a 3D model of clothing using a topological model, the 3D model can be optimized by combining display geometric features such as edge curvature, surface normal vectors, and length, as well as depth features extracted from 3D clothing data.
[0286] Edge curvature reflects the degree of change in curves or surfaces. Optimizing edge curvature can improve the transition effect of clothing models in curves, seams, or folds, making the shape of the clothing more natural and precise.
[0287] The surface normal vector represents the direction of the normal at each point on the surface of the garment. Optimizing the normal vector can ensure a smoother transition between the panels, avoid unnatural folds or deformities, and improve the lighting and visual effect of the garment.
[0288] The side lengths and dimensions of each part of the garment need to match the actual design. By optimizing the length, we can ensure that the proportions and shapes of each part of the garment are correct in three-dimensional space. Depth features (such as spatial distribution and volume) extracted from 3D garment data help optimize the three-dimensional form of the garment, especially in the modeling of complex folds, curves, or multi-layered fabric structures.
[0289] By optimizing these depth features, the details of clothing models can be improved, such as the drape of the fabric, the effect of folds, and the natural sense of weight of the fabric.
[0290] By integrating these geometric features, the optimization algorithm can effectively reduce sharp corners, overlaps, or irregular points in clothing models, thereby improving the smoothness and stability of the models.
[0291] Figure 16 shows a schematic diagram of the modules of a clothing modeling system according to an embodiment of this application. As shown in Figure 16, the clothing modeling system mainly includes three modules: a pattern feature extraction model 51, a point set generation model 52, and a topology model 53. When performing clothing modeling, this clothing modeling system mainly employs the following steps 1-3.
[0292] Step 1. Obtain several patterns of clothing input by the user, and extract pattern information from the input patterns using the pattern feature extraction model 51, such as information used to indicate features like position, shape, size, pattern semantics, vector edges, and marker points.
[0293] The pattern input by the user can be a 2D clothing pattern file, such as a vector file in DXF or PDF format, or a scanned scalar pattern image.
[0294] The feature extraction model 51 can be a neural network encoder trained on a large amount of pre-labeled plate data, or a manually designed filter or feature extractor, or a combination of the above. Depending on the data format of the input plate information, the neural network encoder includes convolutional neural networks such as UNet that process 2D data, or network structures such as Transformer and LSTM that process serialized data.
[0295] Step 2. Input the plate information into the point set generation model 52, and the point set generation model 52 converts the plate information into unstructured geometric data.
[0296] Among them, unstructured geometric data can be a set of three-dimensional spatial points. The spatial points in this set can be represented by point clouds, geometric images, or Gaussian Surfel, but there is no definite connection between the spatial points.
[0297] The three-dimensional spatial point set generated by the point set generation model 52 is independent and divisible for each plate.
[0298] Depending on the size of the dataset and the difficulty of training, point set generation models can be based on diffusion / flow models, or they can adopt model structures such as VAE and GAN.
[0299] For example, 2D image generation models such as LDM or DiT can be used to convert 2D images into 2D geometric images. As shown in Figure 14, the geometric image is equivalent to a set of points in three-dimensional space. Each pixel color value in the geometric image can correspond to the spatial position of a sampling point in three-dimensional space.
[0300] Step 3. Input the unstructured geometric data of each plate into the topology model 53, and the topology model will convert the unstructured geometric data into a three-dimensional model that conforms to the standard of the flexible simulation engine.
[0301] Among them, flexible simulation engines include game engines such as Unity and Unreal, as well as professional flexible simulation software such as Style3D, CLO 3D, and BW.
[0302] The output data format of this topology model can include, but is not limited to, connection relationship data constructed using triangular mesh, quad mesh, or other polygonal mesh patterns.
[0303] The topology model mainly constructs a two-level topology structure. In the first stage, triangulation is performed within each plate to build the relationships between various spatial points in the three-dimensional point set, resulting in plates represented in the form of triangular facets. In the second stage, the stitching relationship is restored by constructing connections between plates. Depending on the target flexible simulation engine, the first stage is sometimes optional.
[0304] This topological model is typically modeled as a graph structure generation problem, and its output is the edges of a certain graph structure. Its data format includes, but is not limited to, adjacency matrix, adjacency list, etc.
[0305] It can also be optimized by combining edge curvature, surface normal vector, length and other display geometric features, as well as depth features extracted from 3D clothing data.
[0306] The clothing modeling system of this application first obtains unstructured geometric data from pattern information, and then constructs topological connections such as sewing lines in 3D space based on the unstructured geometric data, making the system more robust and supporting higher precision 3D models.
[0307] Please refer to Figure 17. The garment modeling device can be applied to the device shown in Figure 7 to realize the technical solution of this specification. The garment modeling device may include: a feature extraction module 1701, a geometry generation module 1702, and a topology generation module 1703.
[0308] The feature extraction module 1701 is used to obtain the pattern information of the garment; the geometry generation module 1702 is used to generate a three-dimensional spatial point set corresponding to each pattern of the garment based on the pattern information through a point set generation model; the topology generation module 1703 is used to construct the connection relationship of each spatial point in the three-dimensional spatial point set of each pattern of the garment using a preset mesh pattern, so as to generate a three-dimensional model of the garment.
[0309] Optionally, the feature extraction module 1701 is used to acquire several patterns included in the garment; and to extract pattern information representing the features of each pattern from the several patterns using a preset pattern feature extraction model.
[0310] Optionally, the point set generation model is a model obtained by fine-tuning a pre-trained diffusion model, using the pattern information of clothing pattern samples as training sample features and the three-dimensional spatial point set corresponding to the pattern samples as labels.
[0311] Optionally, the topology generation module 1703 is used to construct the connection relationship of the three-dimensional spatial point set of each piece of the garment using a preset mesh pattern through a pre-trained topology model.
[0312] Optionally, the topology generation module 1703 is used to construct the connection relationship between spatial points in the three-dimensional spatial point set of each plate and between the three-dimensional spatial point sets of adjacent plates using a preset mesh pattern.
[0313] Optionally, the grid modes include: triangular grid mode, quadrilateral grid mode, and other polygonal grid modes.
[0314] As the apparel industry rapidly evolves towards digitalization and intelligentization, improving the automation level of sewing processes has become a key focus. The emergence of automated pattern sewing technology aims to replace traditional hand sewing by combining artificial intelligence, automated equipment, computer vision, and robotics, achieving full automation from design to sewing. This technology has significant practical value, greatly improving production efficiency, reducing labor costs, and enhancing sewing precision and quality consistency, particularly demonstrating enormous potential in handling complex designs and customized needs. Through automated sewing, garment production is no longer limited by the skill level of workers, enabling high-quality product output in a short time, meeting the market demands of fast fashion and personalized customization. Furthermore, the research and application of automated pattern sewing technology is expected to address the two major pain points in the current apparel manufacturing industry: "labor shortage" and "low efficiency," driving technological upgrading and transformation across the entire industry, and possessing significant research value and broad market prospects.
[0315] Traditional sewing processes largely rely on manual or semi-automatic sewing equipment. In the garment industry, sewing work depends on experienced sewing workers to perform steps such as fabric splicing, sewing, and finishing. This method is less efficient and makes it difficult to maintain high consistency and quality, especially when dealing with complex or customized designs.
[0316] With the widespread adoption of automated equipment in the sewing industry, such as automatic seam sewing machines and cut piece processing machines, these devices can complete simple sewing tasks, such as straight stitching, overlocking, and overlapping, significantly improving the efficiency of standardized garment production lines. However, some automated sewing equipment has limited capacity to handle complex garment structures, draping, and curved sewing, requiring significant manual intervention. Furthermore, these devices struggle to handle intricate customized designs and special fabrics.
[0317] Automated sewing robots are gradually appearing in some high-end manufacturing fields. These robots can automatically perform simple splicing and sewing tasks, achieving a certain degree of automated production with the help of vision systems and motion control technology. Nevertheless, the level of intelligence of these automated sewing robots is limited. When faced with complex pattern designs, differences in fabric properties, and curved structures, human intervention and correction are still required.
[0318] The relevant automated sewing technologies face the following main problems when dealing with complex and customized designs:
[0319] Poor design adaptability: Most automated sewing technologies can only handle standardized straight or curved sewing tasks and cannot dynamically adapt to different garment design structures.
[0320] Lack of diversity: Automated sewing equipment has limited ability to handle the diversity of garment styles and is difficult to adapt to complex and ever-changing pattern structures.
[0321] Reliance on prior knowledge: Geometric feature-based solutions often require prior knowledge from humans, such as the semantics of the sewing patterns, whether there are sewing relationships between the patterns, and whether it is a raglan sleeve, to apply different algorithmic rules. Furthermore, limited by the size of the algorithmic rule set, this solution often cannot guarantee sewing accuracy, thus requiring significant manual correction of the sewing results. Considering the human overhead of providing prior knowledge and subsequent corrections, in extreme cases, the efficiency of automated sewing using algorithms may be lower than that of purely manual sewing.
[0322] In recent years, some research has explored the use of computer vision and path planning algorithms to achieve fully automated path generation for garment sewing. Through 3D scanning technology, the system can acquire the three-dimensional structure of the garment, thereby automatically generating the sewing path. However, these methods still face certain technical bottlenecks when dealing with complex patterns, multi-layered fabrics, and intricate stitching, such as smooth sewing of complex curves and adapting to the mechanical properties of materials.
[0323] In view of this, and in conjunction with Figures 1 and 18-22, some embodiments of this specification propose a method and apparatus for determining sewing relationships. By analyzing the relevant information of the geometric edges contained in each garment pattern, the geometric edge feature vectors of each geometric edge of each pattern are extracted. Based on the geometric edge feature vectors, the geometric edges of each pattern are paired, and based on the matching results, pairs of geometric edges with sewing relationships are determined.
[0324] In implementation, the following steps are taken: First, information about several printing plates is obtained, which indicates the geometric edges contained in the printing plates. Then, feature data for each printing plate is extracted from the information, including geometric edge feature vectors corresponding to each geometric edge contained in the printing plate. Based on the geometric edge feature vectors, the matching probability between each geometric edge is calculated. Finally, from geometric edge pairs with matching probabilities greater than a probability threshold, pairs of geometric edges with a sewing relationship are identified.
[0325] In the above technical solutions, geometric edge feature vectors of each geometric edge contained in the printing plate are extracted from the plate information, and geometric edge matching is performed using the geometric edge feature vectors to determine geometric edge pairs with sewing relationships. This allows for automatic sewing operations using the determined sewing relationships. This application employs a data-driven automatic sewing method, improving the robustness and efficiency of sewing. The following description, in conjunction with Figures 1 and 18-22, illustrates a sewing relationship determination method and apparatus based on some embodiments of this specification.
[0326] In some embodiments, referring to FIG1, server 11 can run a server-side program of an application to implement the relevant functions of the application. For example, when server 11 runs a sewing relationship determination service program, it can implement a corresponding sewing relationship determination service platform or clothing modeling platform.
[0327] PC13 and mobile phone14 are just some of the types of electronic devices that users can use. During operation, these electronic devices can run client-side programs for a specific application to implement its functions. For example, when the electronic device runs a sewing relationship determination service program, it can act as a client for that service. The client application for the sewing relationship determination service can be launched and run on the electronic device.
[0328] Please refer to Figure 18, which illustrates an exemplary method for determining sewing relationships. This method can be applied to a garment modeling platform. The method may include the following steps.
[0329] S1801. Obtain plate information for several plates, the plate information being used to indicate the geometric edges contained in the plate.
[0330] In one embodiment, pattern information of several sewing patterns of a target garment can be obtained, wherein the pattern information may include structural information for indicating the structure or shape of each pattern, and the structural information may include geometric edge data for indicating the geometric edges that make up the pattern.
[0331] The geometric edge can be a regular geometric shape, such as a curved edge, a straight edge, or a combination of curves and straight lines. The corresponding geometric edge data can include curve expressions for curved edges or straight line expressions for straight edges. For example, it can be represented in the form (geometric edge type | geometric edge parameter). The geometric edge type can be represented by an integer type identifier, such as 0 for a straight line, 1 for an arc, and 2 for a second-order Bézier curve. The geometric edge parameter can be a floating-point sequence; the numerical type and length of the geometric edge parameter may differ depending on the curve type.
[0332] In one implementation, the acquired image can be a 2D image represented as a vector (such as DXF, SVG, etc.) or a bitmap (such as JPEG, PNG, etc.). If it is vector format data, the geometric edge data can be extracted directly; if it is bitmap format, it is necessary to first extract the geometric edge data through image recognition technology.
[0333] In one implementation, any pattern sheet may contain at least one panel, each panel being a closed loop formed by connecting multiple geometric edges. The pattern sheet information may include panel information of each panel contained in the pattern sheet, and each panel information may include geometric edge data for indicating the geometric edges used to form the panel.
[0334] In one implementation, clothing design information of the target garment can be obtained, and a pattern of the target garment and pattern information corresponding to the pattern can be generated based on the clothing design information. The pattern information includes geometric edge data for indicating the geometric edges that make up the pattern.
[0335] S1802. Extract the feature data of each plate from the plate information. The feature data includes the geometric edge feature vectors corresponding to each geometric edge contained in the plate.
[0336] After obtaining the information of each plate, feature extraction can be performed on the plate information to extract feature data corresponding to each plate. The feature data may include geometric edge feature vectors corresponding to each geometric edge.
[0337] In one implementation, feature data extraction can be achieved through a pre-trained feature extraction model or a hand-designed feature extraction method.
[0338] For example, feature extraction can be performed using neural network models trained on a large amount of labeled data (such as convolutional neural networks (CNNs), transformer networks (Transformers), long short-term memory networks (LSTMs), etc.). Neural network models can be tailored to specific data types to accommodate different input data formats.
[0339] S1803. Based on the geometric edge feature vector, match to obtain geometric edge pairs with sewing relationship.
[0340] By extracting the geometric edge feature vectors, geometric edge matching can be performed to determine which geometric edges have a stitching relationship. The matching process is mainly based on the similarity between the geometric edge feature vectors. The specific matching method can be set according to actual needs, and may include at least one of Euclidean distance matching, angle matching, Hausdorff distance matching, and deep learning-based neural network matching.
[0341] Euclidean distance matching involves calculating the distance between two geometric edges in the vector space corresponding to the feature vectors of the geometric edges. The smaller the distance, the closer the two geometric edges are, and the more similar their corresponding geometric feature vectors are. Geometric edge pairs with a distance less than a preset threshold can be identified as geometric edge pairs with a sewing relationship.
[0342] Angle matching is applicable to geometric edges with similar angles. It assesses the similarity between two geometric edges by calculating the difference in the angle between them. The closer the angles are, the higher the matching probability.
[0343] Hausdorff distance matching uses the Hausdorff distance metric to measure the farthest distance between curves for complex curve edges. If the Hausdorff distance between two curves is less than a predetermined threshold, they are considered to have similar shapes and can be identified as matching geometric edges.
[0344] Deep learning-based neural network matching uses a trained deep learning model to automatically determine which geometric edges have a stitching relationship by comparing the similarity of their feature vectors. Neural network models can consider complex nonlinear relationships and are suitable for large-scale data processing.
[0345] Once the geometric pairs with sewing relationships are identified, the actual sewing paths can be generated based on these relationships. These paths are then passed as input to an automated sewing machine to perform precise stitching operations.
[0346] In the above embodiments, by extracting the geometric edge feature vectors corresponding to the geometric edges contained in each pattern piece, and using a matching algorithm based on these feature vectors, pairs of geometric edges with sewing relationships can be accurately identified, thereby greatly improving the efficiency and accuracy of the garment production process. By matching based on the feature vectors of geometric edges, this disclosure can handle patterns of different types and shapes, accurately matching straight lines, curves, and complex mixed edges. Compared with traditional manual sewing path determination methods, this disclosure can complete complex sewing path planning in a shorter time, reducing manual intervention and errors, and greatly improving the automation level of garment design and production.
[0347] In one implementation, the pattern information obtained may include, in addition to geometric edge data indicating geometric edges, semantic data describing the pattern and position data indicating the spatial location of the pattern. The semantic data may represent elements that help describe the semantics and design intent of the pattern, such as name, size, piece number, and material information; the position data may indicate the initial position of the pattern in three-dimensional space or on the garment. Correspondingly, the feature data of each pattern extracted from the pattern information may include: a geometric edge feature vector corresponding to the geometric edge data, a semantic feature vector corresponding to the semantic data, and a position feature vector corresponding to the position data.
[0348] In one implementation, as shown in Figure 19, the feature extraction model may include three sub-modules: a geometric feature extraction sub-module 31, a semantic feature extraction sub-module 32, and a positional feature extraction sub-module 33, which respectively learn the extraction of corresponding geometric features, semantic features, and positional features through pre-training. Specifically, the geometric feature extraction sub-module is used to extract the corresponding geometric edge feature vector from the geometric edge data of the board information; the semantic feature extraction sub-module is used to extract the corresponding semantic feature vector from the semantic data of the board information; and the positional feature extraction sub-module is used to extract the corresponding positional feature vector from the positional data.
[0349] Based on the obtained geometric edge feature vectors, semantic feature vectors, and positional feature vectors, each geometric edge is matched to determine which geometric edges have sewing relationships. The matching process can be achieved by comprehensively considering the similarity between the geometric edge feature vectors, semantic feature vectors, and positional feature vectors corresponding to the geometric edges.
[0350] In one implementation, as shown in Figure 19, the geometric edge feature vectors, semantic feature vectors, and positional feature vectors of each geometric edge contained in the plate are superimposed to obtain a feature data matrix corresponding to each plate. Each row (or column) in this matrix corresponds to a geometric edge contained in the plate. Based on the feature data matrix of each plate, each geometric edge is matched to determine the pairs of geometric edges that have a sewing relationship.
[0351] In the above embodiments, by introducing feature vectors of semantic data and positional data, it is possible to not only rely on the shape information of geometric edges, but also to consider the semantic information and spatial layout of the plate, thereby improving the accuracy of matching and the adaptability of the system.
[0352] In one implementation, the matching probability between each geometric edge can be calculated based on the geometric edge feature vector, the semantic feature vector, and the positional feature vector. The comprehensive similarity of each pair of geometric edges can be calculated separately, taking into account the similarity of the geometric edge feature vector, semantic feature vector, and positional feature vector in their respective spaces, and the matching probability is calculated based on this similarity. A higher matching probability indicates that the two geometric edges are more similar in shape, semantics, and position, and the greater the likelihood of them being stitched together. Geometric edge pairs with a stitching relationship can be identified from those with matching probabilities greater than a probability threshold.
[0353] In one implementation, to achieve precise matching between multiple geometric edges, a many-to-many maximum matching problem can be used for modeling. That is, for each pair of geometric edges, the matching probability between them is calculated, and geometric edge pairs with a matching probability greater than a preset probability threshold k are identified as geometric edge pairs with a stitching relationship.
[0354] In one implementation, when determining pairs of geometric edges with a sewing relationship from the matching results, certain constraints can be preset. For example, when modeling a many-to-many maximum matching problem, corresponding constraints can be set. For instance, the number of geometric edges with a sewing relationship with any geometric edge is less than or equal to a number threshold M (such as 1 edge, 2 edges, etc.), and different number thresholds can be set for different geometric edges.
[0355] In one implementation, to avoid excessive redundant matching and improve the reasonableness of the matching results, certain constraints can be set during the matching process. For example, in many-to-many matching, the following constraint can be set: the number of geometric edges that have a sewing relationship with any geometric edge should be less than or equal to a preset threshold M (e.g., 1 edge, 2 edges, etc.). Different thresholds M can be set for different types of geometric edges. For example, some key parts (such as cuffs, collars, etc.) may need to be sewn with more edges, while the number of sewings for some simple geometric edges can be limited.
[0356] In one implementation, for each geometric edge, the M highest geometric edges sorted by matching probability can be selected as the geometric edges with which there is a sewing relationship; or, for each geometric edge, those geometric edges with a matching probability greater than a preset probability threshold k and sorted by matching probability can be selected as the geometric edges with which there is a sewing relationship.
[0357] In the above embodiments, by introducing constraints, it is possible to ensure matching accuracy while avoiding over-matching or incorrect matching, thereby improving the rationality and accuracy of the sewing path.
[0358] In one implementation, the geometric edge matching process can be divided into two parts:
[0359] As shown in Figure 20, the discriminator 41 can first use geometric edge feature vectors, semantic feature vectors and position feature vectors to identify the geometric edges to be matched that need to be sewn from the geometric edges contained in each pattern, or identify the geometric edges that do not need to be sewn from the geometric edges. For example, some geometric lines located at the edge of the garment (such as hem lines, cuff lines, etc.) usually do not participate in sewing. The black squares shown in Figure 20 are geometric edges that do not need to be sewn.
[0360] After identifying the geometric edges to be matched, the geometric edge matching submodule 42 calculates the matching probability between the geometric edges to be matched based on the geometric edge feature vector, semantic feature vector and position feature vector, and determines the geometric edge pairs that have a sewing relationship.
[0361] By first identifying the geometric edges that do not require sewing, it is easier to accurately identify and match geometric edge pairs with sewing relationships, greatly reducing the complexity of the matching process and improving matching efficiency.
[0362] In one implementation, the input board information can be converted into board vectors for each board using a serialization module; wherein the board vectors include geometric edge vectors corresponding to the geometric edge data, semantic vectors corresponding to the semantic data, and position vectors corresponding to the position data.
[0363] The main function of the serialization module is to transform different types of data into a unified vector representation. Geometric edge data represents the shape information of the plate, and the serialization module can use geometric feature extraction methods (such as curve fitting and parameterization) to transform these geometric edges into geometric edge vectors p. i Semantic data contains semantic information related to each version. The serialization module can use Natural Language Processing (NLP) (such as word embedding techniques like Word2Vec or Transformer models) to transform semantic information into numerical semantic vectors S. i Position data provides the relative position of the plate in two-dimensional or three-dimensional space, such as translation and rotation information. The serialization module can convert this position data into position vectors, which may include, for example, a three-dimensional translation vector T. i and rotation vector R i .
[0364] The geometric edge vectors, semantic vectors, and position vectors output by the serialization module are input into the feature extraction model to extract the geometric edge feature vectors, semantic feature vectors, and position feature vectors of each panel, and these are then used to assemble the feature data of each panel. For example, in one implementation, the serialization module can concatenate the geometric edge vectors, semantic vectors, and position vectors to obtain a vector representation of the panel information [S]. i ,p i ,T i ,R i The input is fed into the feature extraction model. In the feature extraction model, the geometric feature extraction module extracts geometric edge feature vectors from the geometric edge vectors, the semantic feature extraction module extracts semantic feature vectors from the semantic vectors, and the position feature extraction module extracts position feature vectors from the position vectors.
[0365] Based on the above implementation method, rich feature data can be extracted from the pattern sheet in a comprehensive manner, and different types of information can be transformed into standardized vector forms, thereby providing effective support for automatic sewing.
[0366] Figure 21 shows a schematic diagram of a sewing system. As shown in Figure 21, the system includes three main functional modules: a serialization module 10, a feature extraction module 20, and a sewing module 30.
[0367] 1. Serialization module 10
[0368] The serialization module can convert 2D sewing patterns represented in vector (e.g., DXF, SVG) or bitmap (e.g., JPEG, PNG) formats into geometric edge vectors indicating the individual geometric edges contained within the pattern, using methods such as curve fitting. Each pattern can contain N panels, each panel being a closed loop composed of multiple geometric edges connected end-to-end. Depending on the type, each geometric edge may be represented by a parameter column of varying length. In the actual serialization process, each geometric edge can be represented using the format (geometric edge type | geometric edge parameters), where the geometric edge type is usually identified by an integer type, such as 0 - straight line, 1 - arc, 2 - second-order Bézier curve, etc. The geometric edge parameters are usually floating-point vectors, and their length may vary depending on the geometric edge type. For example, a straight line typically only needs to be represented by its two endpoints, and its vector is e. i = (0|x1,y1,x2,y2). For at most N... edges The vector of the striped piece is Optional inputs such as semantic data and location data can also be converted into vector representations using the serialization module and concatenated with geometric edge vectors. Semantic vector S iLabeled with integer categories, such as 0 for the collar piece, 1 for the front bodice, etc. The position vector typically contains a floating-point 3D translation T. i and rotation R i Vector. The final serialization of this cut piece can be further updated to p. i =[S i ,p i ,T i ,R i The serialized representation of a pattern piece with N cut pieces is P. i =[p1,p2,...,p N ].
[0369] 2. Feature Extraction Module 20
[0370] The feature extraction module 20 deploys a feature extraction model, which can be modeled as a sequence-to-sequence neural network such as Transformer or LSTM. As shown in Figure 3, this feature extraction module can employ an independent encoder, with the geometric feature extraction submodule 31 extracting geometric edge feature vectors from the geometric edge vectors, for example, [e1, e2, ..., e...]. k → [f1,f2,…,f k For the semantic and positional vectors corresponding to the optional semantic and positional data, semantic feature vectors can be extracted from the semantic vectors using semantic feature extraction submodule 32, and positional feature vectors can be extracted from the positional vectors using positional feature extraction submodule 33. The dimensions of the extracted semantic and positional feature vectors are consistent with the geometric edge feature vectors. The feature vectors output by each submodule are superimposed to obtain the final feature data of the plate. The feature data can be represented by a matrix formed by connecting the features of each geometric edge, where each row (or column) of the matrix represents an independent geometric edge feature of the plate. The geometric feature extraction comprehensively considers the geometric features of each geometric edge, including length, curvature, etc.
[0371] 3. Suture module 30
[0372] As shown in Figure 20, the sewing module can consist of two parts. First, a discriminator 41 (such as a binary classification discriminator) determines whether each geometric edge is a free edge that does not participate in sewing, such as the hemline or cuffline. For the remaining geometric edges that participate in sewing, the geometric edge matching submodule 42 can model a many-to-many maximum matching problem. That is, for each pair of edges, the probability of their mutual matching is calculated. For each edge, the highest M matching edges whose probability is greater than a set probability threshold k and sorted by matching probability are taken as the geometric edges with a sewing relationship.
[0373] In the above embodiments, a data-driven automatic sewing system is proposed. This system is trained on a large-scale "pattern + sewing" dataset and can automatically extract the feature vectors of the pattern based on the vectorized representation. It can also achieve automatic sewing through high-dimensional space feature matching. This approach is applicable to a variety of complex sewing relationships and has better robustness than geometry-based automatic sewing methods.
[0374] Please refer to Figure 22. The sewing relationship determination device can be applied to the equipment shown in Figure 7 to implement the technical solution of this specification. The sewing relationship determination device may include: an information acquisition module 2201, a feature extraction module 2202, and a geometric edge matching module 2203.
[0375] Information acquisition module 2201 is used to acquire plate information of several plates, the plate information being used to indicate the geometric edges contained in the plate; feature extraction module 2202 is used to extract feature data of each plate from the plate information, the feature data including geometric edge feature vectors corresponding to each geometric edge contained in the plate; geometric edge matching module 2203 is used to match geometric edge pairs with a sewing relationship based on the geometric edge feature vectors.
[0376] Optionally, the pattern information includes: geometric edge data for indicating the geometric edges of the pattern, semantic data for describing the pattern, and position data for indicating the spatial position of the pattern; the feature data includes: geometric edge feature vectors corresponding to the geometric edge data, semantic feature vectors corresponding to the semantic data, and position feature vectors corresponding to the position data; the geometric edge matching module 2203 is used to match geometric edge pairs with a sewing relationship based on the geometric edge feature vectors, the semantic feature vectors, and the position feature vectors.
[0377] Optionally, the geometric edge matching module 2203 is used to calculate the matching probability between each geometric edge based on the geometric edge feature vector, the semantic feature vector, and the position feature vector; and to determine the geometric edge pairs with a sewing relationship from the geometric edge pairs with a matching probability greater than the probability threshold.
[0378] Optionally, the geometric edge matching module 2203 is used to identify the geometric edges to be matched that need to be sewn from the geometric edges contained in each pattern based on the geometric edge feature vector, the semantic feature vector and the position feature vector, and to calculate the matching probability between each geometric edge to be matched.
[0379] Optionally, the geometric edge matching module 2203 is used to determine the geometric edge pairs with a sewing relationship from the geometric edge pairs with a matching probability greater than a probability threshold based on preset constraints; wherein, the constraints include: the number of geometric edges with a sewing relationship with any geometric edge is less than or equal to a number threshold.
[0380] Optionally, the information acquisition module 2201 is used to extract feature data of each plate from the plate information, including: converting the plate information into plate vectors of each plate through a serialization module; wherein, the plate vector includes a geometric edge vector corresponding to the geometric edge data, a semantic vector corresponding to the semantic data, and a position vector corresponding to the position data; extracting geometric edge feature vectors, semantic feature vectors, and position feature vectors of each plate from the geometric edge vectors, semantic vectors, and position vectors respectively, and forming feature data of each plate.
[0381] Based on the same concept as the methods described above, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor performs the steps of the method as described in any of the above embodiments by executing the executable instructions.
[0382] Based on the same concept as the methods described above, this specification also provides a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.
[0383] Based on the same concept as the methods described above, this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.
Claims
1. A clothing modeling method, comprising: Based on the design information of the garment, topological structure data of the garment is generated; wherein, the topological structure data is used to represent the topological relationship and pattern information of several patterns contained in the garment; Based on the topological data, a spatial structure model of the garment is generated using a geometric generation model; wherein, the spatial structure model is used to represent the position and size of each pattern piece in three-dimensional space; Based on the position and size of each pattern piece in the three-dimensional space, and the pattern piece information, a three-dimensional model of each pattern piece is generated, and the three-dimensional models of each pattern piece are combined to obtain a complete three-dimensional model of the garment.
2. The method according to claim 1, wherein, The process of generating topological structure data for the garment based on its design information includes: Obtain the design information of the garment, and extract the feature vector of the garment from the design information; The feature vector is input into the structure generation model, and the topological structure data of the garment is output.
3. The method according to claim 2, wherein, The structure generation model is a neural network model obtained by training the feature vectors of clothing samples as training samples and the topological structure data corresponding to the clothing samples as labels.
4. The method according to claim 1, wherein, The spatial structure model includes three-dimensional geometric spaces located at positions corresponding to each of the plates; The step of generating a 3D model of each plate based on its position and size in the 3D space, and the plate information, includes: Based on the plate information of each plate, the details of each plate are optimized in the corresponding three-dimensional geometric space to generate a three-dimensional model of each plate.
5. The method according to claim 4, wherein, The three-dimensional geometric space includes a bounding box.
6. The method according to claim 1, wherein, The method further includes: Based on the plate information, two-dimensional plates corresponding to each plate are generated.
7. The method according to claim 1, wherein, The method further includes: Based on the pattern information, a three-dimensional spatial point set corresponding to each pattern of the garment is generated through a point set generation model; Using a preset grid pattern, the connection relationship between the spatial points in the three-dimensional spatial point set of each pattern piece of the garment is constructed.
8. The method according to claim 7, wherein, Obtain the pattern information of the garment through the following operations: Obtain the various patterns comprising the garment; By using a preset plate feature extraction model, plate information used to represent the features of each plate is extracted from the plurality of plates.
9. The method according to claim 7, wherein, The point set generation model is a model obtained by training the pattern information of the pattern sample of the sample garment as the training sample feature and the three-dimensional spatial point set corresponding to the pattern sample as the label.
10. The method according to claim 7, wherein, The process of constructing the connection relationships between spatial points in the three-dimensional spatial point set of each pattern piece of the garment using a preset mesh pattern includes: The connection relationship of the three-dimensional spatial point set of each piece of the garment is constructed by using a pre-trained topology model and the preset grid pattern.
11. The method according to claim 7, wherein, The process of constructing the connection relationships between spatial points in the three-dimensional spatial point set of each pattern piece of the garment using a preset mesh pattern includes: Using a preset grid pattern, the connection relationships between the spatial points are constructed within the three-dimensional spatial point sets of each plate, and between the three-dimensional spatial point sets of adjacent plates.
12. The method according to claim 7 or 11, wherein, The preset grid patterns include: triangular grid pattern, quadrilateral grid pattern, and other polygonal grid patterns.
13. The method according to claim 1, wherein, The plate information is used to indicate the geometric edges contained in the plate, and the method further includes: The feature data of each plate is extracted from the plate information, and the feature data includes geometric edge feature vectors corresponding to each geometric edge contained in the plate. Based on the geometric edge feature vectors, geometric edge pairs with a sewing relationship are matched.
14. The method according to claim 13, wherein, The plate information includes: geometric edge data for indicating the geometric edges of the plate, semantic data for describing the plate, and position data for indicating the spatial position of the plate; the feature data includes: geometric edge feature vectors corresponding to the geometric edge data, semantic feature vectors corresponding to the semantic data, and position feature vectors corresponding to the position data. Based on the geometric edge feature vector, pairs of geometric edges with a sewing relationship are matched, including: Based on the geometric edge feature vector, the semantic feature vector, and the positional feature vector, the geometric edge pairs with the sewing relationship are matched to obtain.
15. The method according to claim 14, wherein, The process of matching geometric edge pairs with the sewing relationship based on the geometric edge feature vector, the semantic feature vector, and the positional feature vector includes: Based on the geometric edge feature vector, the semantic feature vector, and the position feature vector, the matching probability between each geometric edge is calculated. From the geometric edge pairs whose matching probability is greater than the probability threshold, the geometric edge pairs that have the sewing relationship are determined.
16. The method according to claim 15, wherein, The step of calculating the matching probability between each geometric edge based on the geometric edge feature vector, the semantic feature vector, and the positional feature vector includes: Based on the geometric edge feature vector, the semantic feature vector, and the position feature vector, the geometric edges to be matched that need to be sewn are identified from the geometric edges contained in each pattern piece, and the matching probability between each geometric edge to be matched is calculated.
17. The method according to claim 16, wherein, The step of determining the geometric edge pairs with a sewing relationship from the geometric edge pairs with a matching probability greater than the probability threshold includes: Based on preset constraints, geometric edge pairs with sewing relationships are determined from geometric edge pairs with matching probabilities greater than the probability threshold. The limiting condition includes: the number of geometric edges that have a sewing relationship with any geometric edge is less than or equal to a number threshold.
18. The method according to claim 14, wherein, The step of extracting feature data for each plate from the plate information includes: Serialization transforms the plate information into plate vectors for each plate; wherein, the plate vectors include geometric edge vectors corresponding to the geometric edge data, semantic vectors corresponding to the semantic data, and position vectors corresponding to the position data; The geometric edge feature vector, semantic feature vector, and position feature vector of each plate are extracted from the geometric edge vector, the semantic vector, and the position vector, respectively, and the feature data of each plate are formed.
19. The clothing modeling method according to claim 2, wherein, The feature vector includes a structured feature vector, which represents a set of structured data corresponding to each plate, and the structured data represents the 2D and 3D geometric data corresponding to each plate.
20. The method according to claim 19, wherein, The structured data of each pattern piece includes: first size data, second size data, and outline data; wherein, the first size data of the pattern piece is used to represent the 2D size of the pattern piece, the second size data of the pattern piece is used to represent the spatial position and 3D size of the 3D fabric corresponding to the pattern piece, and the outline data of the pattern piece is used to represent the 3D geometric data of the 3D fabric corresponding to the pattern piece and the shape of the pattern piece.
21. The method according to claim 20, wherein, The first size data of the pattern includes the length and width of the pattern; the second size data of the pattern includes the 3D coordinates of the center point of the 3D fabric and the length, width and height of the bounding box containing the 3D fabric; the outline data of the pattern includes the 3D coordinates of each pixel in the image block of the preset first resolution and an identifier for indicating whether the 3D coordinates of each pixel are located within the 3D fabric.
22. The method according to claim 21, wherein, The outline data of the plate includes four-channel data of each pixel in an image block with a preset first resolution. The first three channels represent the normalized 3D coordinates of the pixel, and the fourth channel is used to indicate whether the 3D coordinates of the pixel are located within the 3D fabric.
23. The method according to claim 22, wherein, If the fourth channel data indicates that the 3D coordinates corresponding to the pixel are not located within the 3D fabric, then the 3D coordinates indicated by the corresponding first 3 channel data are all 0.
24. The method according to claim 22, wherein, The outline data of the plate is obtained by rasterizing the corresponding 3D fabric at a preset first resolution under UV parameterization of the plate.
25. The method according to claim 20, wherein, The step of extracting the feature vector of the garment from its design information includes: Using user-inputted clothing design information as input, a pre-trained diffusion transformer is used to generate structured feature vectors for the clothing.
26. The method of claim 25, wherein, The process of generating structured feature vectors for clothing using user-inputted clothing design information as input, through a pre-trained diffusion model, includes: Using the clothing design information input by the user as input conditions, a set of potential labels corresponding to each pattern piece is generated through the pre-trained diffusion model. The potential labels of the pattern pieces include the first size data, the second size data, and the outline feature vector of the pattern piece. Based on the contour feature vector of the plate, the contour data of the plate is generated by the decoder.
27. The method according to claim 26, wherein, The step of inputting the structured feature vector into the structure generation model and outputting the topological structure data of the garment includes: The structured feature vector is input into the structure generation model, and the output is topological data representing the sewing relationship between the plates.
28. The method according to claim 27, wherein, The step of inputting the structured feature vector into the structure generation model to obtain topological data representing the sewing relationships between the patterns includes: Based on the contour data, extract the 2D contour point set of each plate and the 3D contour point set corresponding to the 2D contour point set of each plate, wherein the 3D contour point set includes the 3D contour point corresponding to each 2D contour point in the corresponding 2D contour point set. Based on the geometric data of the 2D contour point set and the 3D contour point set, a contour point feature matrix is extracted, which includes contour point feature vectors corresponding to each 2D contour point. Based on the contour point feature matrix, topological data is obtained to represent the sewing relationship between the plates.
29. The method according to claim 28, wherein, The step of extracting the 2D contour point set for each panel based on the contour data includes: Based on the fourth channel data in the contour data, the 2D contour point set of each plate is extracted through erosion operation.
30. The method according to claim 28, wherein, The topological structure data obtained based on the contour point feature matrix to represent the sewing relationships between the patterns includes: Based on the contour point feature matrix, candidate stitching points are identified from the 2D contour point set by a classifier, and a stitching point feature matrix containing the contour point feature vectors corresponding to each stitching point is constructed. Based on the suture point feature matrix, an adjacency probability matrix between each suture point is generated; Based on the adjacency probability matrix, topological data is obtained to represent the sewing relationships between the panels.
31. The method according to claim 30, wherein, The process of obtaining the adjacency probability matrix between each suture point based on the suture point feature matrix includes: The original features and dual features in the stitch point feature matrix are separated by two multilayer sensing heads; Sinkhorn normalization is performed based on the original features and dual features to obtain the adjacency probability matrix.
32. The method according to claim 30, wherein, The topology data includes the stitching relationships between the stitching points of each plate; Based on the adjacency probability matrix, topological data for representing the sewing relationships between the patterns is generated, including: determining the sewing relationships between each sewing point using the Hungarian algorithm based on the adjacency probability matrix.
33. The method according to claim 30, wherein, The topology data includes: the stitching relationship between the contour curves of each plate; the contour curves are obtained by converting several 2D contour points of each plate.
34. The method according to claim 1, wherein, After obtaining the complete three-dimensional model of the garment, the method further includes: Based on the complete 3D model of the garment, a visual representation of the 3D model of the garment is displayed.
35. A garment modeling apparatus, comprising: The topology generation module is used to generate topology data of the garment based on its design information; wherein the topology data is used to represent the topological relationship and pattern information of several patterns contained in the garment. The spatial structure generation module is configured to generate a spatial structure model of the garment based on the topological structure data and through a geometric generation model; wherein, the spatial structure model is used to represent the position and size of each pattern piece in three-dimensional space; The 3D model generation module is used to generate 3D models of each pattern piece based on the position and size of each pattern piece in 3D space, as well as the pattern piece information, and combine them to obtain the complete 3D model of the garment.
36. An electronic device comprising: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method as described in any one of claims 1-34 by executing the executable instructions.
37. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1-34.
38. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1-34.