A clothing automatic arrangement method, device, equipment and storage medium
By automatically extracting graph structure features and predicting the allocation of arrangement points using a graph neural network model, the problem of relying on manual operation for the layout of two-dimensional sewing patterns on three-dimensional human body models is solved. This achieves efficient and accurate automated layout, adapting to complex clothing and diverse human body models, and improving the automation level and accuracy of clothing design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the layout of two-dimensional sewing patterns on three-dimensional human body models relies on manual operation, resulting in low efficiency, inconsistency, and difficulty in repeatability. Furthermore, rule-based auxiliary tools are not sufficiently applicable to complex clothing and diverse human body models, and lack generalization and robustness in specific scenarios that meet actual needs.
By constructing an automatic garment arrangement device, the automated layout of two-dimensional sewing patterns on a three-dimensional human body model, which previously relied on manual operation, is now possible. This provides an automatic garment arrangement method that utilizes a graph neural network model to automatically extract graph structure features, predict the allocation of arrangement points and local displacement vectors, thereby achieving efficient and accurate layout of two-dimensional sewing patterns on the surface of a three-dimensional human body model.
It enables efficient, precise, and automated layout of two-dimensional sewing patterns on the surface of three-dimensional human body models, reducing reliance on manual operation, improving adaptability and generalization to complex clothing styles and diverse human body models, and enhancing the automation and accuracy of layout.
Smart Images

Figure CN121413049B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for automatic clothing arrangement. Background Technology
[0002] In the fields of digital clothing design, virtual fitting, and clothing simulation, arranging two-dimensional sewing patterns onto the surface of a three-dimensional mannequin (three-dimensional human body model) is one of the core and crucial steps. This step directly determines the accuracy, sewing feasibility, and final presentation effect of the virtual clothing in subsequent physical simulations, and is widely used in scenarios such as clothing industrial design, e-commerce virtual display, and film and game character costume design.
[0003] The task of laying out two-dimensional sewing patterns around a three-dimensional human body model mainly relies on manual layout. Designers need to manually place, adjust, and align each piece of two-dimensional sewing pattern to ensure that the stitching relationships between different patterns match. This process is tedious and time-consuming, and it is difficult to guarantee the consistency and repeatability of the layout, becoming a core bottleneck restricting the industrialization and large-scale application of digital design processes in clothing.
[0004] To reduce the burden of manual operation, some systems have introduced auxiliary tools based on simple geometric rules. These methods achieve preliminary positioning of some patterns by pre-setting fixed rules (such as placing sleeve pieces near the arm area, collar pieces near the neck area, and main body pieces corresponding to the torso area). However, the rules they rely on have significant limitations, only applicable to standardized, simple garments. When faced with non-traditional designs, complex sewing structures, or 3D human models with significant differences in body shape and posture, their generalization and robustness drop sharply, failing to generate reasonable layouts that meet actual needs, and severely limiting their applicability. Summary of the Invention
[0005] In view of this, the present invention provides an automatic garment arrangement method, device, electronic device and storage medium to achieve efficient, accurate and automated layout of two-dimensional sewing paper patterns onto the surface of a three-dimensional human body model, reduce reliance on manual operation and improve adaptability and generalization to complex garment styles and diverse human body models.
[0006] In a first aspect, a method for automatically arranging clothing is provided, comprising: constructing a pattern diagram structure based on acquired two-dimensional sewing patterns and sewing relationship data, and determining the graph structure features corresponding to the pattern diagram structure; the pattern diagram structure uses each two-dimensional sewing pattern as a graph node, and the sewing relationship between the two-dimensional sewing patterns as the connecting edge between the graph nodes; determining a candidate arrangement point set based on a three-dimensional human body model; inputting the graph structure features and the candidate arrangement point set into a graph neural network model to predict the arrangement point allocation and local displacement vector of each graph node; and mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model based on the arrangement point allocation and the local displacement vector.
[0007] In one embodiment, the step of constructing a pattern diagram structure based on the acquired two-dimensional sewing pattern and stitching relationship data, and determining the graph structure features corresponding to the pattern diagram structure, includes: extracting the shape features, symmetry features, and topological features of each two-dimensional sewing pattern based on the two-dimensional sewing pattern to obtain graph node features; extracting the geometric features of the stitching lines corresponding to each stitching relationship based on the stitching relationship data to obtain edge features; and determining the graph structure features based on the graph node features and the edge features.
[0008] In one implementation, determining a set of candidate arrangement points based on a three-dimensional human body model includes: constructing a spatial arrangement template around the human body based on the three-dimensional human body model, and uniformly sampling on the surface of the arrangement template to obtain a discretized set of candidate arrangement points.
[0009] In one embodiment, the step of constructing a spatial arrangement template of the human body based on a three-dimensional human body model and uniformly sampling on the surface of the arrangement template to obtain a discretized set of candidate arrangement points includes: identifying the spatial position and geometry of the torso, limbs, neck, and waist based on key anatomical landmarks of the three-dimensional human body model to obtain spatial region divisions of various parts of the human body; constructing cylindrical arrangement templates for the torso and limb regions and truncated cone arrangement templates for the neck and waist regions based on the spatial region divisions of various parts of the human body; and uniformly sampling on the surface of each arrangement template through local coordinate system parameterization to obtain the discretized set of candidate arrangement points.
[0010] In one embodiment, the step of obtaining the discretized candidate arrangement point set by parameterizing and uniformly sampling on the surface of each arrangement template using a local coordinate system includes: for the cylindrical arrangement template, establishing a cylindrical coordinate system and uniformly discretizing in the axial and circumferential directions to obtain uniformly distributed arrangement points on the cylindrical surface; for the truncated cone arrangement template, establishing a conical coordinate system and uniformly discretizing in the axial and circumferential directions, and adjusting the sampling density according to the change in the radius of the truncated cone to obtain uniformly distributed arrangement points on the truncated cone surface; and merging the sampling points on all arrangement templates based on the uniformly distributed arrangement points on the cylindrical surface and the uniformly distributed arrangement points on the truncated cone surface to obtain the discretized candidate arrangement point set.
[0011] In one implementation, predicting the permutation point allocation and local displacement vector of each graph node includes: calculating the node embedding features of each graph node based on the graph structure features, through multi-layer message passing and feature aggregation of the graph neural network model; calculating the score of each candidate permutation point by mapping to the candidate permutation point space through a fully connected layer based on the node embedding features, thereby obtaining a permutation point score vector; normalizing the permutation point score vector to determine the probability distribution of the permutation point allocation; and performing regression prediction through a fully connected layer based on the node embedding features to obtain the local displacement vector of the graph node in three-dimensional space.
[0012] In one embodiment, mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model based on the arrangement point allocation and the local displacement vector includes: selecting the candidate point with the highest probability from the candidate arrangement point set based on the arrangement point allocation, and obtaining the three-dimensional coordinates of the candidate point on the corresponding arrangement template; determining the three-dimensional center position of the two-dimensional sewing pattern based on the three-dimensional coordinates and the local displacement vector; and mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model according to the three-dimensional center position.
[0013] In one embodiment, mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model based on the three-dimensional center position includes: determining the placement position and local normal vector of each two-dimensional sewing pattern on the surface of the three-dimensional human body model based on the three-dimensional center position of each two-dimensional sewing pattern, thereby obtaining the spatial pose of the two-dimensional sewing pattern; transforming the geometry of the two-dimensional sewing pattern into three-dimensional space based on the spatial pose of the two-dimensional sewing pattern, rotating and scaling the two-dimensional sewing pattern to fit the human body surface, thereby obtaining a three-dimensional mesh representation of the two-dimensional sewing pattern; and adjusting the relative positions between adjacent patterns based on the three-dimensional mesh representation of the two-dimensional sewing pattern and the stitching relationship data to ensure that the gap between the stitches meets the constraint requirements, thereby obtaining the result of mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model.
[0014] In one embodiment, the training process of the graph neural network model includes: acquiring a labeled dataset and an unlabeled dataset for training, constructing a semi-supervised training dataset, wherein the labeled dataset contains labels for the actual arrangement points of the two-dimensional sewing; constructing a constraint-driven loss function based on the semi-supervised training dataset, wherein the loss function includes a supervised loss term and a geometric constraint loss term; and iteratively optimizing the graph neural network parameters based on the loss function using backpropagation and gradient descent algorithms to obtain the trained graph neural network model.
[0015] In one implementation, constructing the semi-supervised training dataset includes: acquiring multiple sets of clothing pattern data, each set containing multiple two-dimensional sewing patterns and their sewing relationship data; manually labeling a portion of the clothing pattern data, labeling the correct arrangement point positions of each two-dimensional sewing pattern on a three-dimensional human body model, to obtain the labeled dataset; leaving the remaining sets of clothing pattern data unlabeled, to obtain the unlabeled dataset; and obtaining the semi-supervised training dataset based on the labeled dataset and the unlabeled dataset.
[0016] In one implementation, constructing the constraint-driven loss function includes: calculating the cross-entropy loss between the predicted permutation point assignments and the true labels based on the labeled dataset in the semi-supervised training dataset to obtain the supervised loss term; calculating the stitching gap constraint loss, collision and overlap penalty loss, hierarchical consistency constraint loss, and local offset minimization constraint loss based on the semi-supervised training dataset to obtain the geometric constraint loss term; and combining the loss terms according to weighted coefficients based on the supervised loss term and the geometric constraint loss term to obtain the loss function.
[0017] In one embodiment, determining the suture gap constraint loss includes: obtaining two corresponding suture lines based on each suture relationship edge; parameterizing the arc length of each suture line; uniformly sampling multiple point pairs on the suture lines to obtain a set of suture line sampling points; calculating the Euclidean distance between corresponding point pairs based on the set of suture line sampling points; averaging the distances of all point pairs to obtain the average distance between suture lines; and when the average distance is greater than the maximum allowable gap threshold, calculating the square of the distance difference as a penalty term to obtain the suture gap constraint loss.
[0018] In one embodiment, determining the collision and overlap penalty loss includes: based on each two-dimensional sewing paper pattern, uniformly sampling the surface of the two-dimensional sewing paper pattern according to its three-dimensional center position and geometry to obtain a set of sampling points on the paper pattern surface; based on the set of sampling points on the paper pattern surface, for each sampling point, calculating the signed distance field from that point to all other paper pattern surfaces, taking the minimum signed distance to obtain the signed distance value of the sampling point; averaging the penalty term results of each sampling point to obtain the collision and overlap penalty loss; the penalty term result is obtained by applying a penalty term to the signed distance value.
[0019] In one implementation, the geometric constraint loss term further includes a pseudo-label loss. Determining the pseudo-label loss includes: predicting unlabeled data based on the trained graph neural network model, calculating the probability distribution of permutation points for each graph node to obtain the predicted permutation point distribution; selecting the candidate point with the highest probability as a pseudo-label based on the predicted permutation point distribution, and filtering prediction results with confidence levels higher than a threshold to obtain a high-confidence pseudo-label set; and calculating the cross-entropy loss between the model prediction and the pseudo-label based on the high-confidence pseudo-label set to obtain the pseudo-label loss.
[0020] In one implementation, the geometric constraint loss term further includes a consistency regularization loss. Determining the consistency regularization loss includes: applying a perturbation to the graph node features or the 3D human body model to obtain enhanced training samples; based on the enhanced training samples, using the graph neural network model in training to make predictions, obtaining prediction results before and after the perturbation, and obtaining prediction results before and after the perturbation; calculating the consistency loss between the prediction results before and after the perturbation, and obtaining the consistency regularization loss.
[0021] Secondly, an automatic garment arrangement device is provided, comprising:
[0022] A construction module is used to acquire multiple two-dimensional sewing patterns and their stitching relationship data to be processed, construct a pattern diagram structure based on the two-dimensional sewing patterns and their stitching relationship data, and determine the graph structure features corresponding to the pattern diagram structure; the pattern diagram structure uses each two-dimensional sewing pattern as a graph node, and the stitching relationship between different two-dimensional sewing patterns as the connecting edge between graph nodes; the graph structure features include graph node features and edge features;
[0023] The sampling module is used to determine the set of candidate arrangement points based on a 3D human body model;
[0024] The model prediction module is used to input the graph structure features and the candidate permutation set into the graph neural network model to predict the permutation allocation and local displacement vector of each graph node;
[0025] The mapping module is used to map the two-dimensional sewing paper pattern onto the surface of the three-dimensional human body model based on the arrangement point allocation and the local displacement vector.
[0026] Thirdly, an electronic device is provided, comprising:
[0027] At least one processor; and a memory communicatively connected to said at least one processor;
[0028] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any of the above embodiments.
[0029] Fourthly, a computer-readable storage medium is provided, storing a computer program, characterized in that the computer program is executed by a processor to implement the method described in any of the above embodiments.
[0030] Fifthly, a computer program product is provided, the computer program product including computer program code, wherein when the computer program code is executed by a computer device, the computer device performs the method described in any of the above embodiments.
[0031] The automatic garment arrangement method, apparatus, equipment, and storage medium provided in this invention use two-dimensional sewing patterns as nodes and sewing relationships as edges to automatically extract graph structure features without requiring manual rule definition. The graph neural network model automatically learns the correspondence between the pattern and the human body space, outputting arrangement point allocation and local displacement vectors without manual adjustment or correction. This method can be implemented entirely without human intervention, significantly reducing the labor costs of digital garment design. Furthermore, this invention discretizes the continuous three-dimensional human body space into a set of candidate arrangement points, avoiding blind searching of an infinite continuous space and significantly reducing computational load. The graph neural network can quickly capture the sewing dependencies between patterns without calculating the physical interactions between them individually, greatly improving processing efficiency compared to manual layout. Moreover, this invention, through a dual positioning mechanism of arrangement point allocation and local displacement vectors, ensures the global position rationality of the pattern while eliminating errors caused by discretization through three-dimensional displacement vectors, allowing each pattern to be accurately mapped onto the surface of the three-dimensional human body model, improving the accuracy of automatic arrangement.
[0032] Furthermore, the embodiments of this invention can be adapted to any clothing style, human body shape, and posture, exhibiting strong generalization ability. For example, the paper pattern structure abstracts two-dimensional sewing patterns and their sewing relationships in the form of nodes and edges. Regardless of whether the clothing is a standard or complex style, or whether the paper pattern is a regular shape or an irregular cut, modeling can be completed by extracting graph structure features without modifying the core logic. The graph neural network learns the general mapping relationship between graph structure features and human spatial position, rather than specific rules for particular clothing or human body, enabling it to quickly adapt to different clothing styles and human body models.
[0033] In summary, the embodiments of the present invention effectively improve the automation, efficiency, accuracy, and generalizability of clothing arrangement. Attached Figure Description
[0034] Figure 1 This is a schematic diagram illustrating an automatic clothing arrangement method according to an exemplary embodiment of the present invention;
[0035] Figure 2 A schematic diagram of a two-dimensional sewing paper pattern shown in an exemplary embodiment of the present invention;
[0036] Figure 3 This is a schematic diagram illustrating the feature representation of a graph node as shown in an exemplary embodiment of the present invention;
[0037] Figure 4 This is a schematic diagram illustrating the construction of a human body spatial arrangement template and the sampling of arrangement points, as shown in an exemplary embodiment of the present invention.
[0038] Figure 5 This is a schematic diagram illustrating the propagation and aggregation of graph node features as an exemplary embodiment of the present invention;
[0039] Figure 6 This is a schematic diagram illustrating the encoding of node features into a latent space, as shown in an exemplary embodiment of the present invention.
[0040] Figure 7 This is a schematic diagram illustrating the prediction of arrangement information from hidden node features, as shown in an exemplary embodiment of the present invention.
[0041] Figure 8 An exemplary embodiment of the present invention illustrates a schematic diagram of a 2D sewing pattern being arranged in a 3D human body space;
[0042] Figure 9 This is a schematic diagram of an automatic clothing arrangement device 900 shown in an exemplary embodiment of the present invention;
[0043] Figure 10 This is a schematic diagram of the structure of an electronic device 100 as shown in an exemplary embodiment of the present invention. Detailed Implementation
[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0045] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0046] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this invention should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0047] Furthermore, the symbol " / " in this invention indicates that there is an "or" relationship between the related objects before and after the symbol, or that the related objects have an exemplary relationship that can coexist.
[0048] Research has revealed that most technologies related to automated garment arrangement rely on manual layout, which is extremely inefficient and struggles to guarantee consistency and repeatability. This has become a core bottleneck hindering the industrialization and large-scale application of digital garment design processes. Semi-automatic methods based on heuristic rules are only suitable for standardized, simple garments, lacking generalization and robustness. Some studies have attempted to transform the pattern layout problem into a physics-driven optimization problem by constructing an energy function (penalizing gaps and collisions between patterns) to automatically absorb the remaining patterns into place, based on manually selected initial seed patterns. While this method improves automation, it still relies on manual selection of initial seed patterns. Furthermore, the energy function optimization process is computationally expensive, has slow convergence, and is difficult to adapt to large-scale patterns or complex garment structures. It is also sensitive to the complexity of garment styles, easily getting trapped in local optima, leading to layout failures or failure to meet sewing requirements.
[0049] Based on this, this invention proposes an automatic garment arrangement method. It models the two-dimensional sewing pattern and its stitching relationships as a graph structure, with the two-dimensional sewing pattern as the nodes and the stitching relationships as the edges. The method automatically extracts graph structure features, such as node features (e.g., shape, symmetry, topological features) and edge features (seam geometry), eliminating the need for manual rule definition or seed pattern selection. Based on the graph structure, a candidate arrangement point set is constructed using a three-dimensional human body model. A graph neural network is then used to predict the arrangement point allocation and local displacement vectors, achieving efficient, accurate, and automated layout of the two-dimensional sewing pattern onto the surface of the three-dimensional human body model. This effectively reduces reliance on manual operation while significantly improving adaptability and generalization to complex garment styles and diverse human body models.
[0050] like Figure 1 As shown, the automatic clothing arrangement method provided in this embodiment of the invention includes:
[0051] S101: Construct a pattern diagram structure based on the acquired two-dimensional sewing paper patterns and stitching relationship data, and determine the diagram structure features corresponding to the pattern diagram structure; the pattern diagram structure uses each two-dimensional sewing paper pattern as a diagram node, and the stitching relationship between the two-dimensional sewing paper patterns as the connecting edge between the diagram nodes.
[0052] like Figure 2 The image shows a schematic diagram of multiple two-dimensional sewing patterns obtained. In a specific implementation, multiple two-dimensional sewing patterns to be processed, as well as the sewing relationship data between each pattern, can be obtained first. Then, a pattern graph structure is constructed using a single two-dimensional sewing pattern as a graph node and the sewing relationship between the patterns as the connecting edges between the graph nodes. The graph structure features corresponding to the pattern graph structure are then determined, such as graph node features (pattern-related features) and edge features (sewing relationship-related features).
[0053] For example, sewing patterns can be generated using an undirected graph. The representation is constructed, where V is the set of patterns and E is the set of seams. Node features include the inherent geometric properties of the patterns and semantic information that needs to be learned through graph features, while edge features encode specific attributes of the seams, such as the patterns the seams connect to, the seam length, direction, alignment, and relative position. Based on this representation, the graph feature learning algorithm can perform message passing between nodes, thereby capturing the dependencies and local / global geometric constraints between patterns. This structured modeling approach lays the foundation for subsequent node feature learning and prediction. Figure 3 The diagram shows the feature representation of a graph node. The feature representation of a local graph node is as follows: The characteristics of its neighboring nodes are as follows: The characteristics of the corresponding connecting edges are as follows: .
[0054] In one embodiment, the step of constructing a pattern diagram structure based on the two-dimensional sewing pattern and its stitching relationship data, and determining the graph structure features corresponding to the pattern diagram structure, may include: extracting the shape features, symmetry features, and topological features of each two-dimensional sewing pattern based on the two-dimensional sewing pattern to obtain graph node features; extracting the geometric features of the suture lines corresponding to each stitching relationship based on the stitching relationship data to obtain the edge features; and determining the graph structure features based on the graph node features and the edge features.
[0055] Here, a single two-dimensional sewing pattern is used as a node in the graph. Shape features (such as geometric attributes like area, perimeter, and rectangularity), symmetry features (such as left-right area ratio and mirror similarity), and topological features (such as the number of seams between this pattern and other patterns, and the size of its connected components) are extracted from each pattern. These three types of features together constitute a complete description of the node. Furthermore, the sewing relationships between different patterns are used as connecting edges between nodes in the graph. Geometric features of the suture lines (such as the total length of the suture lines and the coordinates of the suture line sampling points at both ends of the patterns) are extracted from the suture relationship data to accurately characterize the key constraint information of the suture relationships, providing a basis for subsequent pattern alignment and preventing gaps. The extracted graph node features and edge features are integrated to form a complete graph structure feature.
[0056] Here, the shape features in the graph node features can include the UV bounding box width, UV bounding box height, pixel area, contour length, rectangularity, circularity, Hu norm, maximum internal distance, and UV coordinates of the sampled points of the paper pattern contour. The rectangularity is the ratio of the paper pattern area to its minimum bounding rectangle area. The circularity is 4π times the area divided by the square of the perimeter. The maximum internal distance is the maximum distance between the points inside the mask and the contour after distance transformation. The number of sampled points for the paper pattern contour is 64. The symmetry features can include the normalized horizontal offset of the paper pattern centroid relative to the image center, the left-right area ratio, the contour mean X-coordinate, the minimum bounding rectangle angle, the mean curvature, and the mirror Hausdorff distance. The left-right area ratio is the proportion of the area of the paper pattern to the left of the centerline in the image. The contour mean X-coordinate is the average X-coordinate of all points on the contour. The minimum bounding rectangle angle describes the main orientation of the paper pattern. The mean curvature reflects the ratio of positive to negative contour curvature. The mirror Hausdorff distance measures the similarity between the paper pattern and its horizontal mirror version. The topological features may include the degree of a graph node, the size of a connected component, the local index within the component, the normalized local index, the local density, the average distance within the component, the level of the node, and the global topological location code. The degree is the number of other patterns directly sewn with the current pattern; the size of the connected component is the size of the connected graph to which the current pattern belongs; the local index within the component is the index sorted by node ID within its connected component; the normalized local index is the result of dividing the local index by the size of the connected component minus 1; the local density is the ratio of the number of neighboring nodes to the size of the connected component; the average distance within the component is the average shortest path length to all other nodes within its connected component; the level of the node is the distance between the node and the root node determined by breadth-first search; and the global topological location code is a unique global ID generated based on the sorting rules of level, degree, local density, and node ID.
[0057] The edge features may include the total length of the suture pair, the length of the first pattern suture line, the UV coordinates of the sampling point of the first pattern suture line, the length of the second pattern suture line, and the UV coordinates of the sampling point of the second pattern suture line, wherein the number of suture line sampling points is 32.
[0058] S102: Determine the set of candidate arrangement points based on a 3D human body model.
[0059] Here, the continuous space around the three-dimensional human body model (three-dimensional mannequin) can be transformed into discrete, uniform selectable positioning points, that is, candidate arrangement points, which provides a basis for the accurate mapping of subsequent two-dimensional sewing patterns.
[0060] In practice, a human body spatial arrangement template can be constructed based on a three-dimensional human body model, and the surface of the arrangement template can be uniformly sampled to obtain a set of discretized candidate arrangement points.
[0061] This step uses a 3D human body model as a basis to build an arrangement template covering the entire space around the human body; uniform sampling is performed on the surface of the arrangement template to transform the continuous space around the human body into a set of discretized candidate arrangement points, providing optional positions for subsequent pattern positioning.
[0062] In specific implementation, the process of constructing a spatial arrangement template for the entire human body and performing uniform sampling may include: identifying the spatial position and geometry of the torso, limbs, neck, and waist based on the key anatomical landmarks of the three-dimensional human body model, thereby obtaining spatial region divisions for each part of the human body; based on the spatial region divisions for each part of the human body, constructing cylindrical arrangement templates for the torso and limb regions, and constructing truncated cone arrangement templates for the neck and waist regions; and obtaining the discretized candidate arrangement point set by parameterizing and uniformly sampling on the surface of each arrangement template using a local coordinate system.
[0063] For example, constructing a cylindrical arrangement template for the torso and limb regions may specifically include: based on the spatial division of the various parts of the human body, fitting a cylindrical template to each torso or limb region, determining the axis, radius, and height parameters of the cylinder, and obtaining the cylindrical arrangement template. Constructing a truncated cone arrangement template for the neck and waist regions may specifically include: based on the spatial division of the various parts of the human body, fitting a truncated cone template to each neck or waist region, determining the axis, upper and lower base radii, and height parameters of the truncated cone, and obtaining the truncated cone arrangement template.
[0064] In one embodiment, the step of obtaining the discretized candidate arrangement point set by parameterizing and uniformly sampling on the surface of each arrangement template using a local coordinate system may include: for the cylindrical arrangement template, establishing a cylindrical coordinate system and uniformly discretizing in the axial and circumferential directions to obtain uniformly distributed arrangement points on the cylindrical surface; for the truncated cone arrangement template, establishing a conical coordinate system and uniformly discretizing in the axial and circumferential directions, and adjusting the sampling density according to the change in the radius of the truncated cone to obtain uniformly distributed arrangement points on the truncated cone surface; and merging the sampling points on all arrangement templates based on the uniformly distributed arrangement points on the cylindrical surface and the uniformly distributed arrangement points on the truncated cone surface to obtain the discretized candidate arrangement point set.
[0065] Here, a cylindrical coordinate system is established for the cylindrical template covering the human torso and limbs. Uniform discretization is performed along the axial direction (e.g., the length of the torso, the extension direction of the limbs) and circumferential direction (the circumference surrounding the torso / limbs) of the template, directly obtaining uniformly distributed points on the cylindrical surface. A conical coordinate system is established for the truncated cone template covering the neck and waist areas, similarly with uniform discretization along the axial and circumferential directions. Considering the different radii of the upper and lower bases of the truncated cone, the sampling density is dynamically adjusted according to the radius changes to avoid overly dense or sparse local points due to the gradual change in radius, ultimately resulting in uniformly distributed points on the truncated cone surface. All uniformly distributed points sampled from the cylindrical and truncated cone templates are merged to form a discretized candidate point set covering all key areas of the human body, providing a comprehensive and uniform basis for subsequent pattern layout.
[0066] like Figure 4 The diagram illustrates the construction of a human body spatial arrangement template and the sampling of arrangement points. The 3D human model is represented as a 3D mesh with key anatomical landmarks (such as joints, neck, and waist) to provide semantic information about the human body. By aligning the graph structure features of the pattern with human semantics, the graph neural network model can better learn the interaction between clothing and the human body. To simplify the continuous 3D space into a finite set of candidate positions, the human body spatial arrangement template can be discretized based on regular geometry. Specifically, the torso and limbs of the 3D human model are covered by cylindrical templates, while the neck and waist use truncated cone templates (the specific arrangement templates can be designed in various ways as needed). Arrangement points are evenly distributed on the surface of each template. These arrangement points are parametrically sampled using the local coordinate system (such as cylindrical coordinates) of the arrangement template to ensure the uniformity of spatial distribution. Finally, the placement position of each 2D sewing pattern is determined by a candidate point and a local displacement vector relative to that candidate point, ensuring the continuity of the space to which the pattern placement position belongs. This mechanism, which combines discretization with continuous adjustment, reduces the complexity of the search space while retaining the flexibility for fine-grained local adjustments.
[0067] S103: Input the graph structure features and the candidate arrangement point set into the trained graph neural network model to predict the arrangement point allocation and local displacement vector of each graph node.
[0068] For example, the graph neural network model may include at least one of graph convolutional network (GCN), graph attention network (GAT), or GraphSAGE.
[0069] Here, the constructed graph structure features and the discretized set of candidate arrangement points are input into the trained graph neural network model; through model operation, two key results are output, including the arrangement point allocation corresponding to each graph node (i.e. each two-dimensional sewing pattern) (matching the optimal position from the candidate points) and the local displacement vector (finely correcting the position of the candidate points).
[0070] In some embodiments, predicting the permutation point allocation and local displacement vector of each graph node may include: calculating the embedding feature vector of each graph node based on the graph structure features, through multi-layer message passing and feature aggregation of the graph neural network model, to obtain node embedding features; mapping the node embedding features to the candidate permutation point space through a fully connected layer, calculating the score of each candidate permutation point, to obtain a permutation point score vector; normalizing the permutation point score vector to determine the probability distribution of the permutation point allocation; and performing regression prediction through a fully connected layer based on the node embedding features to obtain the local displacement vector of the graph node in three-dimensional space.
[0071] Here, using graph structure features as input, the graph neural network transforms the original features of each graph node (two-dimensional sewing paper pattern) into high-dimensional node embedding features through multi-layer message passing (passing feature associations between nodes and adjacent nodes and edges) and feature aggregation (integrating global and local information). This comprehensively characterizes the paper pattern's own attributes and the structural dependencies between paper patterns. The node embedding features are input into a fully connected layer, mapped to the candidate arrangement point space, and the fit score of each candidate point with the current paper pattern is calculated, forming an arrangement point score vector. The score vector is normalized (e.g., using the SoftMax function or Gumbel-SoftMax function) to obtain the allocation probability distribution of each candidate point, providing a basis for selecting the optimal candidate point. Based on the same node embedding features, regression prediction is performed through another fully connected layer, outputting a local displacement vector in three-dimensional space. This vector is used to finely correct the candidate point positions, compensating for the accuracy deviation of discretized sampling and ensuring that the three-dimensional position of the paper pattern fits the human body surface more closely.
[0072] The following diagram illustrates the graph node feature learning and prediction process, including graph node feature propagation and aggregation, node embedding feature generation, and layout information prediction.
[0073] like Figure 5 The diagram illustrates the propagation and aggregation of graph node features. It demonstrates the dynamic update process of graph neural networks on paper pattern node features, capturing key stitching dependencies between patterns through an attention mechanism. Specific elements and their functions are as follows: F in the diagram... n For the current target pattern node to be updated (corresponding to a 2D sewing pattern), F no ~F n5 Is with Fn Adjacent pattern nodes with a suture relationship, F eo ~F e5 These are the edge features corresponding to the stitching relationship between nodes (such as stitch length, sampling point coordinates). For each adjacent node feature (such as F... no ) and corresponding edge features (such as F) eo The process involves fusing the paper pattern's inherent properties and stitching constraints into transferable feature signals. Through graph cross-attention and attention message aggregation modules, differentiated weights are assigned to features of different adjacent nodes / edges (e.g., with F...). n F with longer suture length n1 Higher weights ensure the model prioritizes stitching relationships that have a greater impact on the layout, improving the accuracy of feature aggregation. BatchNorm (normalization), ReLU (activation function), and Dropout (to prevent overfitting) are used to optimize the propagated features, avoiding data distribution shifts or model overfitting. All propagated, attention-weighted neighboring features are then compared with the target node F. n The original features are fused to output the updated node features F. n This completes multi-layer message passing and feature aggregation, laying the foundation for subsequent node embedding features.
[0074] like Figure 6 The diagram illustrates the process of encoding node features into the latent space. It demonstrates the abstract dimensionality enhancement of the paper pattern node features, transforming features that have undergone propagation and aggregation (such as...) Figure 5 Output F n ') is transformed into high-dimensional latent space features. Figure 6 In the diagram, the left side shows the node features after propagation and aggregation (integrating their own attributes and adjacent stitching constraints), while the right side shows the latent space features (abstracted high-dimensional vectors). Through the feature encoding module, the original features of the paper pattern, such as shape, symmetry, and topology, along with stitching dependencies (edge features), are compressed and recombined into a unified latent space representation. This abstract representation can more efficiently capture the mapping patterns between the paper pattern and the human body's spatial positions, providing a high-information-density feature foundation for subsequent point allocation and displacement prediction, and avoiding the low prediction efficiency caused by redundant original feature dimensions.
[0075] like Figure 7The diagram illustrates the prediction of arrangement information from hidden node features. It showcases a bi-branch prediction process based on latent space features. The core of this process involves two independent fully connected layers that simultaneously achieve discrete arrangement point selection and continuous position correction, ensuring the efficiency and accuracy of the 3D pattern positioning. The hidden node features on the left side of the diagram, representing the abstract features output in Figure 6, are the sole basis for prediction, ensuring a strong correlation between the prediction results and the pattern attributes and stitching constraints. Specifically, the hidden node features are input into the fully connected layer, mapped to the constructed candidate arrangement point space, and the fit score between each candidate point and the current pattern is calculated. The final output is the arrangement point allocation result (i.e., the arrangement point allocation probability distribution). The other fully connected layer, through regression calculation, outputs the local displacement vector (δ) in 3D space. i ∈R 3 The parameters g(p) and rotation are used to fine-tune the candidate point positions (e.g., fine-tuning the front-back and top-bottom positions of the paper pattern on the human body surface), compensating for the accuracy deviation of discretization sampling (corresponding to local displacement vectors). This is achieved through the function g(p) a , δ a , r a )(p a For the candidate point coordinates, δ a For the displacement vector, r a (For rotation parameters) Integrate the results of the two branches to output the 3D arrangement information of the paper pattern, providing direct input for calculating the three-dimensional center position of the paper pattern.
[0076] S104: Based on the arrangement point allocation and the local displacement vector, determine the three-dimensional center position of each of the two-dimensional sewing patterns, and map the two-dimensional sewing patterns onto the surface of the three-dimensional human body model according to the three-dimensional center position.
[0077] Here, by combining the arrangement point allocation and local displacement vector output by S103, the three-dimensional center position of each two-dimensional sewing pattern is calculated; based on this three-dimensional center position, the two-dimensional sewing pattern is accurately mapped onto the corresponding surface of the three-dimensional human body model, thus completing the three-dimensional layout of the two-dimensional pattern.
[0078] In some embodiments, mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model based on the arrangement point allocation and the local displacement vector may include: selecting the candidate point with the highest probability from the candidate arrangement point set based on the arrangement point allocation, and obtaining the three-dimensional coordinates of the candidate point on the corresponding arrangement template; determining the three-dimensional center position of the two-dimensional sewing pattern based on the three-dimensional coordinates and the local displacement vector; and mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model according to the three-dimensional center position.
[0079] Here, based on the probability distribution of the arrangement points output by the graph neural network, the candidate point with the highest probability is selected from the candidate arrangement point set. This point serves as the basic reference point for the three-dimensional position of the paper pattern. Simultaneously, the three-dimensional coordinates of this candidate point on the corresponding arrangement template (cylinder / truncated cone) are obtained as the initial three-dimensional position of the arrangement point. These initial three-dimensional positions are then superimposed with the local displacement vector predicted by the model. Fine-tuning of the initial positions in three-dimensional space is performed using the displacement vector, ultimately obtaining the three-dimensional center position of each two-dimensional sewing paper pattern. This approach leverages the efficient positioning advantage of discrete candidate points while compensating for the accuracy deviation of discrete sampling through continuous displacement correction, ensuring a precise fit between the center position and the human body surface.
[0080] For example, for each node, when predicting the permutation point allocation, the optimal candidate point is selected from the discrete permutation point set and compared with the local displacement vector. The candidate point positions are continuously corrected. The predicted three-dimensional center position of the paper pattern is expressed as: , in The coordinates of the candidate point on the corresponding arrangement template.
[0081] In some embodiments, mapping the two-dimensional sewing paper pattern onto the surface of the three-dimensional human body model based on the three-dimensional center position may include: determining the placement position and local normal vector of each two-dimensional sewing paper pattern on the surface of the three-dimensional human body model based on the three-dimensional center position of each two-dimensional sewing paper pattern, thereby obtaining the spatial pose of the two-dimensional sewing paper pattern; transforming the geometry of the two-dimensional sewing paper pattern into three-dimensional space based on the spatial pose of the two-dimensional sewing paper pattern, rotating and scaling the two-dimensional sewing paper pattern to fit the human body surface, thereby obtaining a three-dimensional mesh representation of the two-dimensional sewing paper pattern; and adjusting the relative positions between adjacent patterns based on the three-dimensional mesh representation of the two-dimensional sewing paper pattern and the stitching relationship data to ensure that the gap between the stitches meets the constraint requirements, thereby obtaining the result of mapping the two-dimensional sewing paper pattern onto the surface of the three-dimensional human body model.
[0082] Here, using the three-dimensional center position of each two-dimensional sewing pattern as a reference, its corresponding placement position on the surface of the three-dimensional human body model is determined. Simultaneously, local normal vectors are calculated (ensuring the pattern orientation is perpendicular / fitted to the human body surface), collectively constituting the spatial posture of the pattern and providing directional guidance for subsequent three-dimensional transformations. Based on the determined spatial posture, the geometry of the two-dimensional pattern is mapped to three-dimensional space. By rotating and adjusting the pattern orientation and scaling to match the dimensions of corresponding parts of the human body, the pattern is initially fitted to the human body surface, ultimately forming a three-dimensional mesh representation of the two-dimensional pattern (a digitized three-dimensional form). Combining the three-dimensional mesh representation with the stitching relationship data, the relative positions of adjacent patterns are fine-tuned to ensure the gaps between stitches meet the constraints (avoiding excessive gaps or overlaps), ultimately obtaining a mapping result where the pattern accurately fits the human body surface and can be directly used for subsequent sewing or simulation.
[0083] In some embodiments, the training process of the above-described graph neural network model may include:
[0084] Obtain labeled and unlabeled datasets for training, and construct a semi-supervised training dataset, wherein the labeled dataset contains labels for the actual arrangement points of the two-dimensional sewing; based on the semi-supervised training dataset, construct a constraint-driven loss function, which includes a supervised loss term and a geometric constraint loss term; based on the loss function, iteratively optimize the graph neural network parameters through backpropagation and gradient descent algorithms to obtain the trained graph neural network model.
[0085] The above training process first combines a small amount of labeled data with real arrangement point labels with a large amount of unlabeled data to construct a semi-supervised dataset (to reduce labeling costs); then, it designs a constraint-driven loss function that includes supervised loss (to ensure prediction accuracy) and geometric constraint loss (to ensure the layout can be sewn); finally, it iteratively optimizes the model parameters through backpropagation and gradient descent to obtain a graph neural network model that can accurately predict paper pattern layouts.
[0086] In one implementation, constructing the semi-supervised training dataset may include: acquiring multiple sets of clothing pattern data, each set containing multiple two-dimensional sewing patterns and their sewing relationship data; manually labeling a portion of the clothing pattern data, labeling the correct arrangement point positions of each two-dimensional sewing pattern on a three-dimensional human body model, to obtain the labeled dataset; leaving the remaining sets of clothing pattern data unlabeled, to obtain the unlabeled dataset; and obtaining the semi-supervised training dataset based on the labeled dataset and the unlabeled dataset.
[0087] This method is the basic data preparation for semi-supervised training. First, multiple sets of clothing data containing two-dimensional paper patterns and sewing relationships are acquired. Then, the correct arrangement points of the paper patterns on the three-dimensional human body are manually labeled on some of the data (forming a labeled dataset to provide supervision signals). The remaining data is left unlabeled (forming an unlabeled dataset to reduce labeling costs). Finally, the two types of datasets are merged to provide sufficient data support for subsequent semi-supervised training and to balance labeling accuracy and data scale.
[0088] In one implementation, constructing the constraint-driven loss function may include: calculating the cross-entropy loss between the predicted permutation point assignments and the true labels based on the labeled dataset in the semi-supervised training dataset to obtain the supervised loss term; calculating the stitching gap constraint loss, collision and overlap penalty loss, hierarchical consistency constraint loss, and local offset minimization constraint loss based on the semi-supervised training dataset to obtain the geometric constraint loss term; and combining the loss terms according to weighted coefficients based on the supervised loss term and the geometric constraint loss term to obtain the loss function.
[0089] Here, the loss term is constructed as follows: Supervised loss term: that is, the cross-entropy loss between the predicted arrangement points and the true labels is calculated using labeled data to ensure that the model learns the basic correspondence between the pattern and the arrangement points; Geometric constraint loss term: by minimizing the loss through stitching gaps, collision overlaps, hierarchical consistency, and local offsets, the layout is forced to meet the stitching and spatial rules (such as avoiding excessive gaps and pattern interweaving); Finally, a weighted combination is performed, and the two types of losses are assigned weights according to actual needs to flexibly balance the prediction accuracy and layout rationality, forming the final optimization objective.
[0090] Here, the supervision loss can be the cross-entropy loss:
[0091] , in This represents a set of nodes with actual labels. For the model to nodes At candidate point The predicted score on the screen Indicates the number of paper pattern nodes The scores of all candidate permutations are summed after exponential operation (exp). For paper pattern nodes The actual arrangement of point labels. For the model to the paper pattern nodes Predicted true permutation points The corresponding score. This represents taking the negative logarithm of the predicted probability. If the predicted probability is close to 1 (accurate prediction), the negative logarithm result is close to 0; if the predicted probability is close to 0 (incorrect prediction), the negative logarithm result will increase significantly, thus imposing a greater penalty on incorrect predictions.
[0092] The aforementioned supervised loss ensures that the model can accurately learn the selection rules for discrete arrangement points, thereby capturing the semantic and geometric correspondences of clothing patterns in space. Through the constraints of the supervised part, the model can learn the spatial semantic distribution of clothing patterns from limited labeled data, thus providing a stable and reliable initialization for subsequent unsupervised constraints and significantly improving the accuracy of overall layout prediction.
[0093] In 3D sewing pattern layout tasks, supervised learning methods rely on explicitly labeled datasets, where each pattern piece corresponds to its target arrangement points in 3D space. By utilizing this labeled data, the model can directly learn the mapping relationship from input features to the target layout. In practice, the following types of supervised learning methods can be employed:
[0094] Classification Method: The selection of the arrangement points for the paper pattern pieces is treated as a multi-class classification problem. Each candidate arrangement point is modeled as a class, and the model predicts the probability distribution of each class using SoftMax or Gumbel-SoftMax. Cross-entropy loss is used to train the labeled samples, enabling the model to learn the semantic correspondence between the geometric features of the paper pattern and the stitching relationships to the spatial location. This method effectively solves the discrete arrangement point assignment problem and demonstrates stability in training convergence and generalization ability.
[0095] Supervised methods for graph neural networks: In a sewing graph structure, strong dependencies exist between nodes. By introducing graph convolutional networks (GCN), graph attention networks (GAT), or GraphSAGE, the model can learn higher-order interactions between nodes under supervised signals. For example, supervised signals not only constrain the prediction of individual nodes but also propagate to neighboring nodes through edge features, enabling the model to better capture sewing semantics and spatial dependencies.
[0096] Sequence and Matching Methods: For garments with complex sewing sequences, supervised learning can be extended to sequence modeling and structural matching. For example, sequence-to-sequence (Seq2Seq) models or pointer networks can be used to predict the sewing sequence and its correspondence. Supervised learning ensures that the model not only predicts the arrangement points but also understands the sewing process, thereby generating layout results that better reflect the actual process.
[0097] In summary, supervised learning methods in 3D sewing pattern layout tasks mainly focus on discrete classification, graph structure modeling, and sequence matching. These methods rely on labeled datasets and can explicitly map geometric features, semantic information, and sewing constraints into learnable predictive targets, thus providing a foundation for efficient, stable, and accurate automatic layout.
[0098] When labeled data is scarce, supervised learning alone is insufficient to support the model's generalization ability. Therefore, this invention introduces an unsupervised learning component during training, utilizing a large amount of unlabeled dataset and driving optimization through geometric and physical constraints.
[0099] like Figure 8 As shown, when 2D sewing patterns are arranged in the 3D human body space, large seam gaps exist between the 3D patterns before physical simulation of the garment. These gaps are unavoidable and can only be eliminated through physical simulation. However, if the pattern arrangement is incorrect, these seam gaps will become even larger. Therefore, it is necessary to constrain the gaps to correct incorrect predictions of the arrangement points and enhance the robustness of the arrangement and its generalization to garment styles. Furthermore, due to the connections between different parts of the human body, different arrangement templates overlap. Therefore, overlaps also occur at the edges of the 3D patterns. Edge overlaps can be eliminated by applying a minimum local offset to the predicted arrangement points. To ensure that the generated layout meets both seam and geometric constraints, this invention employs an efficient constraint strategy, including gap constraint: parameterizing the arc length of each seam and uniformly sampling point pairs along the seam to calculate the seam distance error. A Euclidean distance loss function is used to penalize cases where the gap exceeds the target gap. Pattern overlap constraint: A penalty term based on unidirectional Chamfer distance is used to calculate the minimum distance from one pattern sampling point to another surface. If the distance is less than the safety margin, a penalty is applied. The sampling process progresses from coarse to fine to balance computational efficiency and accuracy. Hierarchical constraint: Ensures that patterns with hierarchical relationships (such as lining and outer fabric) maintain the correct vertical order in space, avoiding overlap or reversal. Minimum local offset constraint: To obtain the most suitable candidate arrangement points, a constraint minimizing the local offset relative to the arrangement points needs to be applied.
[0100] In one embodiment, determining the above-mentioned suture gap constraint loss may include: obtaining two corresponding suture lines based on each suture relationship edge, parameterizing the arc length of each suture line, uniformly sampling multiple point pairs on the suture line to obtain a set of suture line sampling points; calculating the Euclidean distance between corresponding point pairs based on the set of suture line sampling points, averaging the distances of all point pairs to obtain the average distance between suture lines; when the average distance is greater than the maximum allowable gap threshold, calculating the square of the distance difference as a penalty term to obtain the suture gap constraint loss.
[0101] Here, the arc length of the two suture lines corresponding to each suture relationship is parameterized and point pairs are sampled uniformly. The average Euclidean distance between the point pairs is calculated to determine whether it exceeds the maximum allowable gap threshold. If it exceeds the threshold, the square of the distance difference is used as a penalty term to force the model to optimize the paper pattern position, ensuring the proximity of adjacent paper pattern suture lines and meeting the sewing requirements. (Suture gap constraint loss) The calculation formula can be:
[0102] Where E is the set of stitching edges, d ij ε is the average Euclidean distance between the sampling point pairs between suture line i and suture line j, and ε is the maximum allowable gap threshold.
[0103] In one implementation, determining the collision and overlap penalty loss may include: based on each two-dimensional sewing paper pattern, uniformly sampling the surface of the two-dimensional sewing paper pattern according to its three-dimensional center position and geometry to obtain a set of sampling points on the paper pattern surface; based on the set of sampling points on the paper pattern surface, for each sampling point, calculating the signed distance field from that point to all other paper pattern surfaces, taking the minimum signed distance to obtain the signed distance value of the sampling point; averaging the penalty term results of each sampling point to obtain the collision and overlap penalty loss; the penalty term result is obtained by applying a penalty term to the signed distance value.
[0104] This method is another core of geometric constraints, which can solve the problems of paper patterns intersecting and spatial conflicts. Specifically, it first uniformly samples each two-dimensional paper pattern surface (to obtain key points on the paper pattern surface); calculates the minimum signed distance from each sampling point to all other paper pattern surfaces (the distinguishing point is inside or outside the paper pattern); applies a penalty to sampling points whose distance is less than the safety spacing, and then calculates the average value of the penalty terms for all sampling points, forcing the model to avoid paper pattern overlap and ensuring the rationality of the layout space.
[0105] Here, to prevent the paper patterns from intersecting, a penalty function based on Chamfer distance or a signed distance field can be used. Specifically, if a sampling point of a paper pattern falls inside another pattern, a penalty is applied: This constraint can effectively reduce local overlap and interpenetration. Among them, Intersection / Overlap Penalty Loss is the output of the formula, used to measure the severity of overlap between patterns. Point To remove paper sample p i The signed distance from the surface of other paper patterns; if x is inside other paper patterns, It is a negative number; if x is outside other patterns, It is a positive number; if it happens to fall on the surface of another paper pattern, The ReLU activation function is used to filter the sampling points that need to be penalized. When x is inside other patterns, , The ReLU outputs this positive value (preserving the penalty signal); when x is outside or on other patterns or surfaces, , ReLU outputs 0 (no penalty). This indicates traversing the paper pattern p. i Each sampling point x on the surface; For paper pattern p i A uniform set of sampling points on the surface, where each sampling point is a key location on the paper pattern surface, used to characterize the spatial contour of the paper pattern. This indicates traversing all the 2D sewing patterns to be processed (the pattern index covers all patterns involved in the layout). N is the total number of surface sampling points of all 2D sewing patterns (normalization factor). Dividing by N is to unify the magnitude of the loss value, avoid abnormal loss values due to too many or too few sampling points, and ensure the stability of the model optimization process.
[0106] In one implementation, the geometric constraint loss term further includes a pseudo-label loss. Determining the pseudo-label loss includes: predicting unlabeled data based on the trained graph neural network model, calculating the probability distribution of permutation points for each graph node to obtain the predicted permutation point distribution; selecting the candidate point with the highest probability as a pseudo-label based on the predicted permutation point distribution, and filtering prediction results with confidence levels higher than a threshold to obtain a high-confidence pseudo-label set; and calculating the cross-entropy loss between the model prediction and the pseudo-label based on the high-confidence pseudo-label set to obtain the pseudo-label loss.
[0107] This approach is a key supplement to semi-supervised training. It can make full use of unlabeled data, using the trained model to predict the probability distribution of permutations in the unlabeled data; select the prediction results with the highest probability and confidence exceeding the threshold as pseudo-labels (considered as reliable indirect labels); calculate the cross-entropy loss between the model's new prediction and the pseudo-label, allowing unlabeled data to provide additional supervision signals, alleviating the label scarcity problem, and improving the model's generalization ability.
[0108] In one implementation, the geometric constraint loss term further includes a consistency regularization loss. Determining the consistency regularization loss includes: applying a perturbation to the graph node features or the 3D human body model to obtain enhanced training samples; based on the enhanced training samples, using the graph neural network model in training to make predictions, obtaining prediction results before and after the perturbation, and obtaining prediction results before and after the perturbation; calculating the consistency loss between the prediction results before and after the perturbation, and obtaining the consistency regularization loss.
[0109] This approach is key to improving model robustness, addressing the issue of prediction fluctuations caused by minor input changes. Specifically, slight perturbations are applied to graph node features (such as pattern shape features) or 3D human models (such as pose fine-tuning) to generate enhanced samples. The model's prediction results before and after the perturbation are compared, and a consistency loss (such as prediction distribution differences) is calculated. This loss forces the model to be insensitive to input changes, ensuring that layout predictions remain stable and reliable even with different human poses and subtle differences in the pattern.
[0110] The above implementation further employs consistency loss and pseudo-label mechanisms to enhance model robustness on unlabeled data. Specifically, pseudo-labels are generated for high-confidence predictions and cross-entropy loss is applied to guide the model to perform self-supervised correction on unlabeled samples; entropy minimization constraints are applied to low-confidence predictions to encourage a sharper distribution in the model's output, thereby improving discriminative ability.
[0111] The aforementioned hierarchical consistency constraint loss is used to ensure that patterns with hierarchical relationships maintain the correct vertical order in space, avoiding the interweaving or reversal of lining, fabric, and interlining.
[0112] The above local offset minimization constraint loss The calculation formula is: , where N is the total number of two-dimensional sewing patterns involved in the layout. Dividing by this value is to normalize the loss, avoid fluctuations in the magnitude of the loss value due to the number of patterns, and ensure the stability of the model optimization process. δi is the local displacement vector of pattern i. This represents traversing every pattern i in the set of all pattern nodes V. This loss constraint model generates more accurate position corrections in continuous space, ensuring improved local geometric matching accuracy while maintaining global structural correctness.
[0113] Ultimately, the overall loss of the unsupervised learning component can be expressed as the sum of the losses mentioned above. Through these multiple constraints, the model can fully learn sewing relationships and geometric rationality on large-scale unlabeled data, thereby significantly enhancing its generalization ability for different clothing styles, body shapes, and postures.
[0114] Unlike supervised learning, which relies on explicit labels, unsupervised learning methods guide model optimization through structural constraints, geometric consistency, and physical plausibility, enabling training on large-scale unlabeled data. In the context of 3D sewing pattern layout, the following unsupervised learning strategies are particularly crucial:
[0115] Geometric constraint-driven methods: Gap constraints, by sampling the seams of adjacent pattern pieces, constrain their distance in 3D space to not exceed a given threshold, thus ensuring stitchability; Overlap constraints, using penalty functions based on signed distance fields (SDF) or Chamfer distance, prevent pattern pieces from intersecting. These constraint methods do not require manual labeling but directly use geometric consistency signals to guide optimization. Energy minimization methods: Modeling the layout problem as an energy optimization process, the energy function consists of multiple geometric and physical terms, such as gap energy, overlap penalty energy, and collision energy. By minimizing the energy, the model can automatically converge to a physically reasonable and geometrically consistent layout solution. These methods are similar to traditional physical simulations but are implemented in the form of differentiable loss functions in a deep learning framework, enabling end-to-end optimization. Consistency regularization methods: Consistency methods apply perturbations or data augmentations to the input and require the model's output to remain consistent before and after the perturbation. For example, making small deformations to the human pose or adding noise to the pattern features requires the model's predicted layout to remain geometrically stable. This method can improve the model's robustness to input changes. Pseudo-labeling and self-training methods: High-confidence predictions from the model are used as pseudo-labels on unlabeled data and reused in the training process. Through this self-training mechanism, the model can gradually improve its predictive ability for unlabeled samples. This method is particularly effective when combined with geometric constraints, avoiding misleading pseudo-labels. Entropy minimization method: Entropy minimization constraints are applied to the predicted distribution of unlabeled samples, encouraging the model to output a sharper class distribution (i.e., higher confidence in permutation point assignment). This method can alleviate uncertainty and improve the model's discriminative ability on large-scale data. Contrastive learning method: By constructing positive and negative sample pairs, patterns belonging to the same clothing structure or human body region are placed closer to each other in the embedding space, while unrelated sample pairs are pushed away. Contrastive learning can learn a structured representation of clothing patterns on unlabeled data, thereby enhancing downstream layout prediction capabilities. These unsupervised learning methods can replace consistency regularization and pseudo-labeling methods for unsupervised learning in the embodiments of this invention.
[0116] Corresponding to the aforementioned embodiments of the automatic garment arrangement method, the present invention also provides embodiments of an automatic garment arrangement device.
[0117] Please refer to Figure 9 This is a schematic diagram illustrating an automatic clothing arrangement device 900 according to an exemplary embodiment of the present invention. Figure 9 As shown in the figure, the automatic garment arrangement device 900 provided in this embodiment of the invention includes:
[0118] The construction module 91 is used to construct a pattern diagram structure based on the acquired two-dimensional sewing paper patterns and sewing relationship data, and to determine the diagram structure features corresponding to the pattern diagram structure; the pattern diagram structure uses each two-dimensional sewing paper pattern as a diagram node, and the sewing relationship between the two-dimensional sewing paper patterns as the connecting edge between the diagram nodes.
[0119] Sampling module 92 is used to determine the set of candidate arrangement points based on a 3D human body model;
[0120] The model prediction module 93 is used to input the graph structure features and the candidate permutation set into the graph neural network model to predict the permutation allocation and local displacement vector of each graph node;
[0121] The mapping module 94 is used to map the two-dimensional sewing paper pattern onto the surface of the three-dimensional human body model based on the arrangement point allocation and the local displacement vector.
[0122] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0123] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0124] Based on the same technical concept, this invention also provides an electronic device 100, referring to... Figure 10 The diagram shown is a structural schematic of an electronic device 100 according to an exemplary embodiment of the present invention, comprising:
[0125] The processor 101, memory 102, and bus 103 are included. The memory 102 is used to store execution instructions and includes main memory 1021 and external memory 1022. The main memory 1021, also known as internal memory, is used to temporarily store the operation data in the processor 101 and the data exchanged with external memory 1022 such as hard disk. The processor 101 exchanges data with external memory 1022 through main memory 1021.
[0126] In this embodiment of the invention, the memory 102 is specifically used to store application code that executes the solution of the present invention, and its execution is controlled by the processor 101. That is, when the electronic device 100 is running, the processor 101 communicates with the memory 102 through the bus 103, or the processor 101 communicates with the memory 102 through other means, so that the processor 101 executes the application code stored in the memory 102, and then executes the steps of the automatic clothing arrangement method described in any of the foregoing embodiments.
[0127] The memory 102 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0128] Processor 101 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.
[0129] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of the present invention, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0130] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the automatic clothing arrangement method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0131] This invention also provides a computer program product, which stores a computer program. When the computer program is run by a processor, it executes the steps of the automatic clothing arrangement method provided in any of the above embodiments of this invention. For details, please refer to the above method embodiments, which will not be repeated here.
[0132] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium, which can be a volatile or non-volatile computer-readable storage medium. In another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0133] Furthermore, embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.
[0134] The processing and logic flows described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flows can also be executed by dedicated logic circuits—such as field-programmable gate arrays (FPGAs) or application-specific integrated circuits (ASICs), and the device can also be implemented as dedicated logic circuits.
[0135] Suitable computers for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name a few.
[0136] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0137] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0138] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0139] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0140] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for automatically arranging clothing, characterized in that, include: Based on the acquired two-dimensional sewing paper pattern and sewing relationship data, a paper pattern diagram structure is constructed, and the diagram structure features corresponding to the paper pattern diagram structure are determined. The paper pattern structure uses each two-dimensional sewing paper pattern as a diagram node, and the sewing relationship between the two-dimensional sewing paper patterns as the connecting edge between the diagram nodes; Determine the set of candidate arrangement points based on a 3D human body model; The graph structure features and the candidate arrangement point set are input into the graph neural network model to predict the arrangement point allocation and local displacement vector of each graph node; Based on the arrangement of points and the local displacement vector, the two-dimensional sewing pattern is mapped onto the surface of the three-dimensional human body model; The training process of the graph neural network model includes: Obtain labeled and unlabeled datasets for training, and construct a semi-supervised training dataset, wherein the labeled dataset contains labels assigned to the true arrangement points of the two-dimensional sewing. Based on the semi-supervised training dataset, a constraint-driven loss function is constructed, which includes a supervised loss term and a geometric constraint loss term; Based on the loss function, the graph neural network parameters are iteratively optimized through backpropagation and gradient descent algorithms to obtain the trained graph neural network model. The construction of the constraint-driven loss function includes: Based on the labeled dataset in the semi-supervised training dataset, the cross-entropy loss between the predicted permutation point assignment and the true label is calculated to obtain the supervised loss term; Based on the semi-supervised training dataset, the stitch gap constraint loss, collision and overlap penalty loss, hierarchy consistency constraint loss, and local offset minimization constraint loss are calculated to obtain the geometric constraint loss term. Based on the supervision loss term and the geometric constraint loss term, the loss function is obtained by combining the loss terms according to the weighting coefficients.
2. The method according to claim 1, characterized in that, The step of constructing a pattern diagram structure based on the acquired two-dimensional sewing pattern and stitching relationship data, and determining the diagram structure features corresponding to the pattern diagram structure, includes: Based on the two-dimensional sewing paper pattern, the shape features, symmetry features, and topological features of each two-dimensional sewing paper pattern are extracted to obtain graph node features; Based on the suture relationship data, the geometric features of the suture line corresponding to each suture relationship are extracted to obtain the edge features; The graph structure features are determined based on the graph node features and the edge features.
3. The method according to claim 1, characterized in that, The candidate arrangement point set is determined based on a 3D human body model, including: A spatial arrangement template for the human body is constructed based on a 3D human body model, and a discrete set of candidate arrangement points is obtained by uniformly sampling the surface of the arrangement template.
4. The method according to claim 3, characterized in that, The process involves constructing a spatial arrangement template for the human body based on a three-dimensional human model, and uniformly sampling the surface of the template to obtain a discretized set of candidate arrangement points, including: Based on the key anatomical landmarks of the three-dimensional human body model, the spatial positions and geometric shapes of the trunk, limbs, neck and waist are identified, and the spatial regions of each part of the human body are divided. Based on the spatial division of the human body, cylindrical templates are constructed for the torso and limbs, and truncated cone templates are constructed for the neck and waist. The discretized candidate arrangement point set is obtained by uniformly sampling the surface of each arrangement template through local coordinate system parameterization.
5. The method according to claim 4, characterized in that, The step of obtaining the discretized candidate arrangement point set by uniformly sampling through a local coordinate system on the surface of each arrangement template includes: For the cylindrical arrangement template, a cylindrical coordinate system is established, and uniform discretization is performed in the axial and circumferential directions to obtain uniformly distributed arrangement points on the surface of the cylinder. For the truncated cone arrangement template, a cone coordinate system is established, and uniform discretization is performed in the axial and circumferential directions. The sampling density is adjusted according to the change of the truncated cone radius to obtain a uniformly distributed arrangement of points on the surface of the truncated cone. Based on the uniformly distributed points on the surface of the cylinder and the uniformly distributed points on the surface of the truncated cone, the sampling points on all the arrangement templates are merged to obtain the discretized candidate arrangement point set.
6. The method according to claim 1, characterized in that, The prediction of the arrangement of points and local displacement vectors for each of the graph nodes includes: Based on the graph structure features, the node embedding features of each graph node are calculated through multi-layer message passing and feature aggregation of the graph neural network model. Based on the node embedding features, a fully connected layer is used to map to the candidate permutation point space, and the score of each candidate permutation point is calculated to obtain the permutation point score vector; the permutation point score vector is normalized to determine the probability distribution of the permutation point allocation. Based on the node embedding features, regression prediction is performed through a fully connected layer to obtain the local displacement vector of the graph node in three-dimensional space.
7. The method according to claim 1, characterized in that, Based on the arrangement of points and the local displacement vector, the two-dimensional sewing pattern is mapped onto the surface of the three-dimensional human body model, including: Based on the arrangement point allocation, the candidate point with the highest probability is selected from the candidate arrangement point set, and the three-dimensional coordinates of the candidate point on the corresponding arrangement template are obtained. Based on the three-dimensional coordinates and the local displacement vector, the three-dimensional center position of the two-dimensional sewing pattern is determined; Based on the three-dimensional center position, the two-dimensional sewing paper pattern is mapped onto the surface of the three-dimensional human body model.
8. The method according to claim 7, characterized in that, Based on the stated three-dimensional center position, mapping the two-dimensional sewing pattern onto the surface of the three-dimensional human body model includes: Based on the three-dimensional center position of each of the two-dimensional sewing paper patterns, the placement position and local normal vector of each two-dimensional sewing paper pattern on the surface of the three-dimensional human body model are determined, and the spatial posture of the two-dimensional sewing paper pattern is obtained. Based on the spatial posture of the two-dimensional sewing paper pattern, the geometry of the two-dimensional sewing paper pattern is transformed into three-dimensional space, and the two-dimensional sewing paper pattern is rotated and scaled to fit the human body surface, thereby obtaining a three-dimensional mesh representation of the two-dimensional sewing paper pattern. Based on the three-dimensional mesh representation of the two-dimensional sewing paper pattern and the stitching relationship data, the relative positions between adjacent paper patterns are adjusted to ensure that the gap between the stitches meets the constraint requirements, thus obtaining the result of mapping the two-dimensional sewing paper pattern onto the surface of the three-dimensional human body model.
9. The method according to claim 1, characterized in that, The construction of the semi-supervised training dataset includes: Acquire multiple sets of garment pattern data, each set of garment pattern data containing multiple two-dimensional sewing patterns and their sewing relationship data; Manually annotate a portion of the garment pattern data, marking the correct arrangement points of each two-dimensional sewing pattern on the three-dimensional human body model to obtain the labeled dataset. The remaining groups of garment pattern data are left unlabeled to obtain the unlabeled dataset. The semi-supervised training dataset is obtained based on the labeled dataset and the unlabeled dataset.
10. The method according to claim 1, characterized in that, Determining the suture gap constraint loss includes: Based on each suture relationship edge, obtain the corresponding two suture lines, parameterize the arc length of each suture line, and uniformly sample multiple point pairs on the suture line to obtain the suture line sampling point set; Based on the set of suture sampling points, the Euclidean distance between corresponding point pairs is calculated, and the average distance between all point pairs is obtained by averaging the distances of all point pairs. When the average distance is greater than the maximum allowable gap threshold, the square of the distance difference is calculated as a penalty term to obtain the suture gap constraint loss.
11. The method according to claim 1, characterized in that, Determining the collision and overlap penalty loss includes: Based on each two-dimensional sewing paper pattern, according to the three-dimensional center position and geometry of the two-dimensional sewing paper pattern, uniform sampling is performed on the surface of the two-dimensional sewing paper pattern to obtain a set of sampling points on the paper pattern surface; Based on the set of sampling points on the paper pattern surface, for each sampling point, the signed distance field from that point to all other paper pattern surfaces is calculated, and the minimum signed distance is taken to obtain the signed distance value of the sampling point; The collision and overlap penalty loss is obtained by averaging the penalty terms for each sampling point; the penalty terms are obtained by applying a penalty term to the signed distance value.
12. The method according to claim 1, characterized in that, The geometric constraint loss term also includes pseudo-label loss, and determining the pseudo-label loss includes: Based on the trained graph neural network model, predictions are made on unlabeled data, the probability distribution of the permutation points of each graph node is calculated, and the predicted permutation point distribution is obtained. Based on the predicted distribution of the permutation points, the candidate point with the highest probability is selected as the pseudo-label, and the prediction results with confidence higher than the threshold are filtered to obtain a set of high-confidence pseudo-labels. Based on the set of high-confidence pseudo-labels, the cross-entropy loss between the model prediction and the pseudo-labels is calculated to obtain the pseudo-label loss.
13. The method according to claim 1, characterized in that, The geometric constraint loss term also includes a consistency regularization loss, which is determined by: Perturbations are applied to graph node features or 3D human models to obtain enhanced training samples; Based on the enhanced training samples, the graph neural network model in training is used to make predictions, and the prediction results before and after the perturbation are obtained, resulting in the prediction results before and after the perturbation. The consistency loss between the prediction results before the perturbation and the prediction results after the perturbation is calculated to obtain the consistency regularization loss.
14. An automatic garment arrangement device, characterized in that, include, The construction module is used to construct a pattern diagram structure based on the acquired two-dimensional sewing pattern and sewing relationship data, and to determine the diagram structure features corresponding to the pattern diagram structure. The paper pattern structure uses each two-dimensional sewing paper pattern as a diagram node, and the sewing relationship between the two-dimensional sewing paper patterns as the connecting edge between the diagram nodes; The sampling module is used to determine the set of candidate arrangement points based on a 3D human body model; The model prediction module is used to input the graph structure features and the candidate permutation set into the graph neural network model to predict the permutation allocation and local displacement vector of each graph node; The training process of the graph neural network model includes: acquiring labeled and unlabeled datasets for training, constructing a semi-supervised training dataset, wherein the labeled dataset contains labels for the actual arrangement points of the two-dimensional sewing; constructing a constraint-driven loss function based on the semi-supervised training dataset, wherein the loss function includes a supervised loss term and a geometric constraint loss term; iteratively optimizing the graph neural network parameters based on the loss function using backpropagation and gradient descent algorithms to obtain the trained graph neural network model; constructing the constraint-driven loss function includes: calculating the cross-entropy loss between the predicted arrangement point assignments and the actual labels based on the labeled dataset in the semi-supervised training dataset to obtain the supervised loss term; calculating the stitch gap constraint loss, collision and overlap penalty loss, hierarchy consistency constraint loss, and local offset minimization constraint loss based on the semi-supervised training dataset to obtain the geometric constraint loss term; and combining the loss terms according to weighted coefficients based on the supervised loss term and the geometric constraint loss term to obtain the loss function. The mapping module is used to map the two-dimensional sewing paper pattern onto the surface of the three-dimensional human body model based on the arrangement point allocation and the local displacement vector.
15. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1 to 13.
16. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by a processor to implement the method described in any one of claims 1 to 13.
17. A computer program product, characterized in that, The computer program product includes computer program code, which, when executed by a computer device, performs the method described in any one of claims 1 to 13.
Citation Information
Patent Citations
Paper pattern automatic arrangement method and device for clothing simulation by using neural network model
CN118057394A
Costume design assisting method and system based on artificial intelligence
CN120671216A