A plate layout network training method, an electronic device, and a storage medium
Patent Information
- Application Number
- CN202611026784.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-08-07
AI Technical Summary
当面对服装版片数量多、结构复杂时,则往往表现出显著的局限性:
[0013] Therefore, this disclosure provides a training method for a pattern layout network. The method first acquires several samples, each sample using a garment stitching diagram and a body semantic map as feature values, and the corresponding body semantic regions and affine transformation parameters of each garment piece in the garment stitching diagram as label values. The garment stitching diagram includes several garment pieces and the stitching relationships between them, and the body semantic map includes several body semantic regions and the connection relationships between them. Next, the samples are input into the pattern layout network, enabling the network to encode the features of any sample's garment stitching diagram and predict the corresponding body semantic regions and affine transformation parameters of each garment piece in the garment stitching diagram based on the encoding results and the body semantic map. Then, the prediction loss is calculated based on the difference between the prediction results and the label values, and the network parameters are updated based on the loss. Finally, the above prediction steps are repeated until the network training converges, and the converged network parameters are saved.
Smart Images

Figure CN122529957A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of tile layout technology, and more particularly to a tile layout network training method, electronic device, and storage medium. Background Technology
[0002] In the digital garment manufacturing process, mapping two-dimensional garment patterns onto a three-dimensional body model and arranging them appropriately enables virtual try-on. This technology primarily relies on manual placement, requiring designers to adjust the position, orientation, and deformation of each pattern piece in three-dimensional space based on their personal experience. This process is not only time-consuming and labor-intensive but also demands high levels of professional skill, making it difficult to scale and standardize. Although some commercial design software provides preset templates, these are only suitable for garment styles with simple structures. When faced with a large number of garment patterns and complex structures, significant limitations often emerge. On the one hand, optimization methods that rely on manually specifying initial seed patterns and iterative calculations are slow and unstable. On the other hand, insufficient automation often results in problems such as misaligned seams, large gaps or overlaps between patterns and between patterns and the semantic area of the body. This means that the pattern layout of complex styles still requires a lot of repeated manual adjustments, which is not only inefficient but also prone to human error, making it difficult to achieve efficient and robust automated processing. Summary of the Invention
[0003] In view of this, firstly, this disclosure provides a method for training a layout network, the method comprising: Several samples are obtained. Each sample uses a garment stitching diagram and a body semantic map as feature values, and the body semantic region and affine transformation parameters corresponding to each garment piece in the garment stitching diagram as label values. The garment stitching diagram includes: several garment pieces and the stitching relationship between the pieces. The body semantic map includes: several body semantic regions and the connection relationship between the regions. The samples are input into the pattern layout network so that the network encodes the features of the garment stitching diagram of any sample and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding results and the body semantic map. The prediction loss is calculated based on the difference between the prediction result and the label value, and then the network parameters are updated based on the loss. Repeat the above prediction steps until the network training converges, and save the converged network parameters.
[0004] Optionally, the tag value may also include layout points within the body semantic region corresponding to each garment piece in the garment stitching diagram; The step of inputting the sample set into the pattern layout network, so that the network encodes the features of any sample's garment stitching diagram, and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map, includes: The sample set is input into the pattern layout network so that the network encodes the features of the garment stitching diagram of any sample, and predicts the body semantic region corresponding to each garment pattern in the garment stitching diagram, the layout points in the body semantic region, and the affine transformation parameters based on the encoding result and the body semantic map.
[0005] Optionally, each garment piece in the garment stitching diagram is represented in the form of nodes, and the stitching relationship between the pieces is used to determine the connection relationship between each node. The network is specifically used for: Using a convolutional neural network, the geometric features of each garment piece in the garment stitching diagram of any sample are extracted; Attention aggregation is performed on the stitching relationships between the garment pieces included in the garment stitching diagram, as well as the geometric features of each garment piece, to obtain the node features of the updated garment piece; Based on the node features of the updated clothing pattern, predict the body semantic region corresponding to each clothing pattern, the layout points within the body semantic region, and the affine transformation parameters.
[0006] Optionally, the step of predicting the body semantic region corresponding to each garment pattern, the layout points within the body semantic region, and the affine transformation parameters based on the node features of the updated garment pattern includes: The node features of the updated clothing pattern are semantically classified to obtain the body semantic region corresponding to each clothing pattern; On the obtained layout template of the body semantic region, the relationship model of each garment piece in the same body semantic region is performed through message passing to obtain the layout points of each garment piece on the layout template; The affine transformation parameters are obtained by constraining the positions of each garment pattern piece based on the layout points.
[0007] Optionally, the step of constraining the position of each garment pattern piece based on the layout points to obtain the affine transformation parameters includes: The initial positioning of each garment pattern piece is determined based on the layout points; Based on the initial positioning of each garment pattern, position constraint processing is performed on each garment pattern to obtain the affine transformation parameters, which include in-plane rotation angle, in-plane scaling factor and three-dimensional translation vector. The position constraint processing includes at least one of the following: minimizing the seam distance between adjacent garment patterns, preventing overlapping or interweaving between garment patterns or between garment patterns and the layout template, and preventing excessive affine updates.
[0008] Optionally, the three-dimensional translation vector includes the normal offset distance; The step of performing position constraint processing on each garment pattern based on its initial positioning to obtain the affine transformation parameters includes: Based on the initial positioning of each garment pattern and the stacking level of each garment pattern, a normal offset distance corresponding to the stacking level of each garment pattern is applied at the initial positioning of each garment pattern. The in-plane scaling factor of each garment pattern is calculated based on the ratio of the area of each garment pattern to the area of the layout template of the corresponding body semantic region.
[0009] Optionally, each garment piece in the garment stitching diagram is represented in the form of nodes, and the stitching relationship between the pieces is used to determine the connection relationship of each node; The method of extracting the geometric features of each garment piece in a garment stitching diagram of any sample using a convolutional neural network includes: Convert each garment pattern piece in any sample's garment stitching diagram into a binary mask representation; The geometric features of the binary mask are extracted using a convolutional neural network to obtain the geometric features of each garment pattern node in the garment stitching diagram of any sample.
[0010] Secondly, this disclosure provides a method for garment pattern layout using a pattern layout network as described in the first aspect, the method comprising: Construct a garment stitching diagram and a body semantic diagram. The garment stitching diagram includes several garment pieces and the stitching relationships between the pieces. The body semantic diagram includes several body semantic regions and the connection relationships between the regions. The garment stitching diagram and the body semantic map are input into the pattern layout network so that the pattern layout network performs feature encoding on the garment stitching diagram and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map. Based on the predicted body semantic regions and affine transformation parameters corresponding to each garment pattern, each garment pattern in the garment stitching diagram is mapped to the corresponding position in the corresponding body semantic region.
[0011] Thirdly, this disclosure also provides an electronic device, including a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the above method by invoking the machine-readable instructions.
[0012] Fourthly, this disclosure also provides a machine-readable storage medium storing machine-readable instructions that, when called and executed by a processor, implement the above-described method.
[0013] Therefore, this disclosure provides a training method for a pattern layout network. The method first acquires several samples, each sample using a garment stitching diagram and a body semantic map as feature values, and the corresponding body semantic regions and affine transformation parameters of each garment piece in the garment stitching diagram as label values. The garment stitching diagram includes several garment pieces and the stitching relationships between them, and the body semantic map includes several body semantic regions and the connection relationships between them. Next, the samples are input into the pattern layout network, enabling the network to encode the features of any sample's garment stitching diagram and predict the corresponding body semantic regions and affine transformation parameters of each garment piece in the garment stitching diagram based on the encoding results and the body semantic map. Then, the prediction loss is calculated based on the difference between the prediction results and the label values, and the network parameters are updated based on the loss. Finally, the above prediction steps are repeated until the network training converges, and the converged network parameters are saved.
[0014] By introducing structured features that include the stitching relationships between garment pieces and the connectivity relationships between body semantic regions, this disclosure enables the network to jointly encode garment structure and body semantics, implicitly learning semantic consistency constraints (such as sleeves must be located near the arm) and stitching proximity constraints (connected garment pieces must remain close in space). This allows for accurate prediction of garment piece layout schemes that conform to anatomical structure and meet sewing requirements. The above process requires no additional manual annotation or post-processing steps, resulting in high layout efficiency, adaptability to diverse body shapes, and improved intelligence in garment piece layout. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating an exemplary embodiment of a patch layout network training method; Figure 2 This is a schematic diagram illustrating a body semantic map and a garment stitching diagram, as shown in an exemplary embodiment. Figure 3 This is a schematic diagram illustrating the layout of points for a body semantic region, as shown in an exemplary embodiment. Figure 4 This is a schematic diagram of a network architecture for a patch layout network, as illustrated in an exemplary embodiment. Figure 5 This is a schematic diagram illustrating an exemplary embodiment of a garment pattern fitting to an upper arm cylindrical template; Figure 6 This is a schematic diagram illustrating the interlacing area of a garment pattern, as shown in an exemplary embodiment. Figure 7 This is a schematic diagram illustrating an exemplary embodiment of geometric feature extraction for a garment pattern. Figure 8 This is a schematic diagram illustrating the feature extraction of the seam orientation of a garment pattern piece, as shown in an exemplary embodiment. Figure 9 This is an exemplary embodiment illustrating a method for garment pattern layout based on a pattern layout network; Figure 10 This is an exemplary embodiment illustrating a pattern layout effect for a garment. Figure 11 This is an exemplary embodiment illustrating another possible garment pattern layout. Figure 12 This is an exemplary embodiment illustrating the hardware structure of an electronic device; Figure 13 This is a block diagram illustrating a patch layout network training apparatus, as shown in an exemplary embodiment. Figure 14 This is an exemplary embodiment illustrating the hardware structure of another electronic device; Figure 15 This is a block diagram illustrating an apparatus for garment pattern layout based on a pattern layout network, as shown in an exemplary embodiment. Detailed Implementation
[0017] To enable those skilled in the art to better understand the technical solutions in this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.
[0018] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this disclosure in other embodiments. In some other embodiments, the methods may include more or fewer steps than those described in this disclosure. Furthermore, a single step described in this disclosure may be broken down into multiple steps in other embodiments; and multiple steps described in this disclosure may be combined into a single step in other embodiments.
[0019] In the digital garment manufacturing process, mapping two-dimensional garment patterns onto a three-dimensional body model and arranging them appropriately enables virtual try-on. This technology primarily relies on manual placement, requiring designers to adjust the position, orientation, and deformation of each pattern piece in three-dimensional space based on their personal experience. This process is not only time-consuming and labor-intensive but also demands high levels of professional skill, making it difficult to scale and standardize. Although some commercial design software provides preset templates, these are only suitable for garment styles with simple structures. When faced with a large number of garment patterns and complex structures, significant limitations often emerge. On the one hand, optimization methods that rely on manually specifying initial seed patterns and iterative calculations are slow and unstable. On the other hand, insufficient automation often results in problems such as misaligned seams, large gaps or overlaps between patterns and between patterns and the semantic area of the body. This means that the pattern layout of complex styles still requires a lot of repeated manual adjustments, which is not only inefficient but also prone to human error, making it difficult to achieve efficient and robust automated processing.
[0020] In view of this, the present disclosure aims to propose a technical solution for training a clothing pattern layout network that is efficient and robust.
[0021] The technical solution first acquires several samples. Each sample uses a garment stitching diagram and a body semantic map as feature values, and the body semantic regions and affine transformation parameters corresponding to each garment piece in the garment stitching diagram as label values. The garment stitching diagram includes several garment pieces and the stitching relationships between them, and the body semantic map includes several body semantic regions and the connection relationships between them. Next, the samples are input into a pattern layout network, enabling the network to encode the features of any sample's garment stitching diagram and predict the body semantic regions and affine transformation parameters corresponding to each garment piece in the stitching diagram based on the encoding results and the body semantic map. Then, the prediction loss is calculated based on the difference between the prediction results and the label values, and the network parameters are updated based on the loss. Finally, the above prediction steps are repeated until the network training converges, and the converged network parameters are saved.
[0022] For example, the pattern layout network training system (hereinafter referred to as the "training system") uses a digital sample library containing 1000 common clothing styles (such as T-shirts, shirts, dresses, and suits) as its initial dataset. For each type of clothing, a garment stitching diagram is first constructed, where nodes represent specific garment pieces (such as left front piece, right back piece, sleeve piece, etc.), and edges represent the stitching relationships between garment pieces (such as center front stitching, shoulder line stitching). Simultaneously, a corresponding body semantic map is constructed, where nodes represent body semantic regions (such as left chest, right arm, back, etc.), and edges represent whether there are connections between body regions. These 1000 sets of garment stitching diagrams and body semantic maps are used as feature values, and the manually labeled body region to which each feature value belongs and the affine transformation parameters are used as label values to construct a training sample set. Subsequently, the training system inputs this sample set into the pattern layout network (hereinafter referred to as the "network") for training. The network first extracts topological features from the garment stitching diagram using a graph encoder to capture the structural dependencies between garment pieces. Next, the training system decodes and predicts the body semantic region to which each garment piece should be mapped (e.g., the "front piece" should fit the "abdomen" and "chest" regions) and specific affine transformation parameters (including in-plane rotation angles, in-plane scaling factors, and 3D translation vectors) by fusing contextual information from the body semantic map. After prediction, the training system uses a cross-entropy loss function to measure the accuracy of the body semantic region prediction and a mean squared error loss function to measure the deviation of the affine transformation parameter prediction, and then weights and sums the two to obtain the total prediction loss. Then, the training system updates the network weights using a backpropagation algorithm. After several training epochs, the network loss stabilizes, and the network converges. Finally, the training system saves the network parameters, resulting in a garment layout network that can automatically generalize to various garment styles and accurately complete the 3D layout of garment pieces.
[0023] Therefore, this disclosure provides a training method for a pattern layout network. The method first acquires several samples, each sample using a garment stitching diagram and a body semantic map as feature values, and the corresponding body semantic regions and affine transformation parameters of each garment piece in the garment stitching diagram as label values. The garment stitching diagram includes several garment pieces and the stitching relationships between them, and the body semantic map includes several body semantic regions and the connection relationships between them. Next, the samples are input into the pattern layout network, enabling the network to encode the features of any sample's garment stitching diagram and predict the corresponding body semantic regions and affine transformation parameters of each garment piece in the garment stitching diagram based on the encoding results and the body semantic map. Then, the prediction loss is calculated based on the difference between the prediction results and the label values, and the network parameters are updated based on the loss. Finally, the above prediction steps are repeated until the network training converges, and the converged network parameters are saved.
[0024] By introducing structured features that include the stitching relationships between garment pieces and the connectivity relationships between body semantic regions, this disclosure enables the network to jointly encode garment structure and body semantics, implicitly learning semantic consistency constraints (such as sleeves must be located near the arm) and stitching proximity constraints (connected garment pieces must remain close in space). This allows for accurate prediction of garment piece layout schemes that conform to anatomical structure and meet sewing requirements. The above process requires no additional manual annotation or post-processing steps, resulting in high layout efficiency, adaptability to diverse body shapes, and improved intelligence in garment piece layout.
[0025] The present disclosure will now be described through specific embodiments and in conjunction with specific application scenarios.
[0026] Please see Figure 1 , Figure 1 This is a flowchart illustrating an exemplary embodiment of a patch layout network training method, which may perform the following steps: Step 102: Obtain several samples. Each sample uses the garment stitching diagram and body semantic map as feature values, and the body semantic region and affine transformation parameters corresponding to each garment piece in the garment stitching diagram as label values. The garment stitching diagram includes: several garment pieces and the stitching relationship between the pieces. The body semantic map includes: several body semantic regions and the connection relationship between the regions.
[0027] For example, the training system uses a digital sample library containing 1000 common clothing styles (such as T-shirts, shirts, dresses, and suits) as the initial dataset. For each type of clothing, a garment stitching diagram is first constructed, where nodes represent specific garment pieces (such as left front piece, right back piece, sleeve piece, etc.), and edges represent the stitching relationships between garment pieces (such as center front seam, shoulder seam). Simultaneously, a corresponding body semantic map is constructed, where nodes represent body semantic regions (such as left chest, right arm, back, etc.), and edges represent whether there are connections between body regions. These 1000 sets of garment stitching diagrams and body semantic maps are used as feature values, and the manually labeled body semantic regions corresponding to each garment piece and the affine transformation parameters are used as label values to construct a training sample set.
[0028] Please see Figure 2 , Figure 2This is an exemplary embodiment illustrating a body semantic map and a garment stitching diagram. As shown in Figure 2, the left side displays the body model and its corresponding body semantic region divisions. Different colored blocks represent areas such as the collar, front piece, back piece, left sleeve, right sleeve, front skirt, back skirt, left front pants, right front pants, left back pants, right back pants, and waistband. These areas are connected by solid or dashed lines to indicate their topological adjacency. The right side displays a garment stitching diagram of a typical garment style. Each garment piece is distinguished by a different color and is also connected by solid or dashed lines to indicate the stitching relationship between the garment pieces. Solid lines represent stitching connections on the same side, while dashed lines represent stitching connections between different sides. The left side of the figure illustrates the mapping relationship between garment pieces and corresponding body semantic regions. For example, the front piece maps to the chest and abdomen area, the sleeve piece maps to the upper arm area, and the skirt or pants piece maps to the lower limb area. This presents the spatial layout correspondence between the garment stitching diagram and the body semantic map, providing structured supervision signals for the network to learn the pattern layout.
[0029] In this system, the garment stitching diagram and the body semantic graph can exist in the form of nodes and edges. For example, the garment stitching diagram can contain nodes such as front piece, back piece, and sleeve piece, while the body semantic graph contains nodes such as torso and arm. For two adjacent nodes, there is a seam edge between them. In the label values, the body semantic region corresponding to the sleeve piece node is the arm region, and the affine transformation parameters corresponding to the sleeve piece node record the precise 3D pose of the sleeve piece relative to the arm region in a standard pose. Through the sample construction of this dual-graph structure, domain knowledge can be explicitly encoded into structured data that the network can learn.
[0030] Step 104: Input the samples into the pattern layout network so that the network encodes the features of any sample's garment stitching diagram and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding results and the body semantic map.
[0031] For example, the training system inputs this sample set into the network for training. The network first extracts the geometric features and topological context information of each garment pattern node in the garment stitching diagram through a graph encoder to capture the structural dependencies between garment patterns; then, the training system decodes and predicts the body semantic region that each garment pattern should be mapped to (e.g., the "front piece" should fit the "abdomen" and "chest" regions) and the specific affine transformation parameters (including in-plane rotation angle, in-plane scaling factor, and three-dimensional translation vector) by fusing the context information of the body semantic graph.
[0032] The graph encoder is implemented using a multi-layer graph convolutional network. It generates a pattern embedding vector containing global topological information by aggregating the node and edge features of adjacent garment patterns. The contextual information of the body semantic graph is fused by performing cross-graph attention interaction between the graph features of the body semantic region and the pattern embedding vector to obtain the association weight between the pattern and the body semantic region. The three-dimensional translation vector refers to the coordinate offset of the center point of the garment pattern in the three-dimensional coordinate system, the in-plane rotation angle refers to the rotation angle of the garment pattern around its normal vector, and the in-plane scaling factor indicates the degree of proportional scaling of the garment pattern in the length and width directions in the two-dimensional plane, so that the garment pattern is adapted to the size of the corresponding body semantic region.
[0033] Step 106: Calculate the prediction loss based on the difference between the prediction result and the label value, and then update the network parameters based on the loss.
[0034] For example, after prediction, the training system uses the cross-entropy loss function to measure the accuracy of the network's prediction of body semantic regions and the mean squared error loss function to measure the network's deviation from the prediction of affine transformation parameters. The weighted sum of these two loss functions is then used as the total prediction loss. The training system then updates the network weights using the backpropagation algorithm. Specifically, if the network incorrectly predicts a collar panel in a sample as the corresponding leg region, the classification loss term will generate a large gradient value, forcing the network to adjust the weights of the feature extractor in the next iteration, enhancing the correlation between the collar geometric features and the neck semantic region. Simultaneously, if the predicted panel rotation angle deviates by 5 degrees from the true angle, the regression loss term will drive the network to correct the parameters of its pose estimation branch, gradually bringing the rotation angle closer to the true value.
[0035] Among them, the layout network is an end-to-end trainable deep learning model, preferably using a GNN (Graph Neural Network) architecture, supplemented by a CNN (Convolutional Neural Network) as a feature extractor.
[0036] Step 108: Repeat the above prediction steps until the network training converges, and save the converged network parameters.
[0037] For example, the training system is set to a maximum of 500 training epochs. During training, when it reaches the 320th epoch, it is found that the validation loss fluctuation is less than 0.001 for 20 consecutive epochs, and the prediction errors of pattern semantics and affine transformation parameters converge to within the set threshold of 2%. The network loss tends to stabilize, at which point the network is determined to have converged, training is stopped, and the model parameter file is exported. This file contains optimized network parameter weights, thus obtaining a pattern layout network that can automatically generalize to various clothing styles and accurately complete the 3D layout of clothing patterns.
[0038] Repeating the above prediction steps refers to performing multiple rounds of iterative training on the training set. In each round, all samples are traversed to perform forward prediction, loss calculation, and parameter update operations. Network training convergence means that as the number of training rounds increases, the prediction loss no longer decreases significantly and tends to stabilize, or the prediction accuracy reaches a preset threshold, indicating that the network has fully learned the distribution patterns in the samples and has good generalization ability. Saving the converged network parameters can refer to storing the network's weight file at the end of training in non-volatile memory to form the final pattern layout model, which can be directly loaded and used in the inference stage to quickly predict the layout of newly input clothing stitching diagrams and body semantic maps.
[0039] In one embodiment shown, the label value further includes layout points within the body semantic region corresponding to each garment piece in the garment stitching diagram; the step of inputting the sample set into the pattern layout network, so that the network performs feature encoding on the garment stitching diagram of any sample, and predicts the body semantic region and affine transformation parameters corresponding to each garment piece in the garment stitching diagram based on the encoding result and the body semantic map, includes: inputting the sample set into the pattern layout network, so that the network performs feature encoding on the garment stitching diagram of any sample, and predicts the body semantic region, the layout points within the body semantic region, and the affine transformation parameters corresponding to each garment piece in the garment stitching diagram based on the encoding result and the body semantic map.
[0040] For example, taking a training sample of a long-sleeved shirt as an example, the network first encodes the topological features of nodes such as collar, front, sleeve, and back pieces in the garment stitching diagram. Then, it combines the information of the torso, neck, and upper arm regions in the body semantic map to determine the body region to which each garment piece belongs through semantic classification, such as the collar corresponding to the neck and the sleeve corresponding to the upper arm. Next, on the cylindrical cone layout template of each body semantic region, it predicts discrete layout point indices for each garment piece, such as the left sleeve front piece corresponding to point 45 on the upper arm cylindrical template and the left sleeve back piece corresponding to point 46 on the upper arm cylindrical template, ensuring that the two points are symmetrically distributed front and back. Finally, based on the layout points, it constrains the position of the sleeve piece, predicting that the sleeve piece rotates 12° around the normal, translates 3mm along the arm axis, and is slightly scaled to match the human upper arm posture and arm circumference size.
[0041] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating the layout of points in a body semantic region, as shown in an exemplary embodiment. Figure 3As shown, when the body semantic region is the left upper arm, the corresponding layout template is a cylindrical surface extending along the arm's axis, with four layout points evenly distributed along the axis on this cylindrical surface. When creating training samples, the annotators not only specify that the clothing pattern belongs to the left upper arm region, but also need to select the layout point closest to the centroid projection of the clothing pattern from these four layout points as the layout point label for that clothing pattern. Through this discretization annotation method, the network does not need to directly learn complex continuous coordinate mappings, but instead learns the correspondence between the geometric features of the pattern and discrete topological positions.
[0042] By adding layout points as positioning criteria, the network can explicitly constrain the spatial relationship of clothing patterns within the same body semantic region, avoiding issues of pattern stacking or penetration. In addition to being evenly distributed along the axial direction, the layout points can also be evenly or non-uniformly distributed in a grid pattern, and this disclosure does not limit this.
[0043] In one embodiment shown, each garment piece in the garment stitching diagram is represented as a node, and the stitching relationship between the pieces is used to determine the connection relationship between the nodes. The network is specifically used to: extract the geometric features of each garment piece in any sample garment stitching diagram using a convolutional neural network; perform attention aggregation on the stitching relationship between the pieces included in the garment stitching diagram and the geometric features of each garment piece to obtain the node features of the updated garment pieces; and predict the body semantic region corresponding to each garment piece, the layout points within the body semantic region, and the affine transformation parameters based on the node features of the updated garment pieces.
[0044] For example, see Figure 4 , Figure 4 This is a schematic diagram illustrating a network architecture for a tile layout network, as shown in an exemplary embodiment. Figure 4 As shown, the network architecture includes an input layer, hidden layers, and an output layer; in the input layer, the CNN encoder processes the garment stitching diagram. Includes clothing prints Multi-layer convolution operations are performed to extract pattern features, while the MLP (Multilayer Perceptron) is used to analyze the garment stitching diagram. Included suture relationships The system processes the data to extract stitching features. In the hidden layer, the GAT (Graph Attention Network) receives both garment pattern features and stitching features, aggregating feature information from adjacent garment patterns through message passing to capture global structural dependencies between garment patterns and generate pattern embedding vectors containing geometric and semantic information. In the output layer, the decoder predicts the corresponding body semantic regions and affine transformation parameters for each garment pattern based on the pattern embedding vectors. During training, the network jointly optimizes the classification and regression losses to ensure that the pattern embedding vectors accurately map to different body semantic regions and precisely regress the affine transformation parameters, achieving layout adaptation of each garment pattern on the body model.
[0045] Among them, garment stitching diagrams Includes clothing prints and suture relationship Each node of the garment sewing diagram Each edge of the garment stitching diagram corresponds to a separate garment pattern. This indicates the stitching relationship between a pair of garment patterns. Each node... The pattern features integrate the geometric properties, semantic information, and initial layout priors of the pattern, while edge features encode sewing-related attributes such as stitch length, alignment direction, and relative orientation. To highlight key interactions, the graph attention network uses pattern and sewing features to calculate normalized attention weights and aggregates information from neighboring nodes and edges in a weighted summation manner, enabling the network to prioritize connections with higher information content. This attention mechanism is integrated in each layer, supporting global information interaction and contextual reasoning, and generating node representations that can characterize complex sewing dependencies. The graph attention network... l The formal definition of layer node updates is:
[0046] in, and They represent the first Layer node and edge embedding, Let be the set of the neighborhood of a node. and It is a learnable linear transformation matrix. and For attention weights, This represents a nonlinear activation function. The attention-weighted message passing mechanism can fuse node and edge information, capture local pattern geometric features and their sewing context, and improve the network's inference capabilities for tasks such as body semantic region prediction, layout point prediction, and affine transformation parameter prediction based on clothing patterns.
[0047] In one embodiment shown, predicting the body semantic region corresponding to each garment pattern, the layout points within the body semantic region, and the affine transformation parameters based on the node features of the updated garment pattern includes: semantically classifying the node features of the updated garment pattern to obtain the body semantic region corresponding to each garment pattern; modeling the relationship between garment patterns within the same body semantic region through message passing on the layout template of the obtained body semantic region to obtain the layout points of each garment pattern on the layout template; and applying positional constraints to each garment pattern based on the layout points to obtain the affine transformation parameters.
[0048] For example, taking a training sample of a long-sleeved shirt as an example, the network first uses the updated node features of the collar, front, sleeve, and back pieces to directly perform semantic classification, and combines the body semantic map information to determine the body semantic region to which each garment piece belongs, such as the collar corresponding to the neck and the sleeve corresponding to the upper arm. Then, on the cylindrical cone layout template of each body semantic region, the network models the relationship between the left sleeve front piece and the left sleeve back piece in the same upper arm region through a message passing mechanism, coordinates the relative positions of the two, and predicts discrete layout point indices, such as the left sleeve front piece corresponding to point 45 of the upper arm cylindrical template and the left sleeve back piece corresponding to point 46 of the upper arm cylindrical template, ensuring that the two points are symmetrically distributed front and back. Finally, the network constrains the position of the sleeve piece based on the layout points, predicting that the sleeve piece rotates 12° around the normal, translates 3mm along the arm axis, and is slightly scaled, so that the adjusted sleeve piece matches the human upper arm posture and arm circumference size.
[0049] The layout template is a pre-constructed spatial discretization model associated with a specific body semantic region. The layout template is cylindrical, enclosing the body semantic region, and its surface is uniformly sampled with several discrete layout points. Each layout point represents a potential center position for a garment pattern. Layout points are used to discretize the continuous placement space, reducing regression difficulty. Relationship modeling refers to message passing between pattern nodes assigned to the same body semantic region. Its function is to coordinate the spatial arrangement of multiple garment patterns within the same body semantic region, avoiding overlap. For example, within the same arm region, the sleeve cap and cuff patterns need to be staggered. Position constraints involve using selected layout points as anchor points to solve for local geometric transformation parameters that satisfy requirements such as seam proximity and anti-interlacing. These parameters are used to fine-tune the garment patterns to conform to the body's curvature and align the seams.
[0050] In one embodiment shown, the step of constraining the position of each garment pattern based on the layout points to obtain the affine transformation parameters includes: determining the initial positioning of each garment pattern based on the layout points; performing position constraint processing on each garment pattern based on the initial positioning to obtain the affine transformation parameters, wherein the affine transformation parameters include an in-plane rotation angle, an in-plane scaling factor, and a three-dimensional translation vector; wherein the position constraint processing includes at least one of minimizing the seam distance between adjacent garment patterns, preventing overlapping and interweaving between garment patterns or between garment patterns and the layout template, and preventing excessive affine updates.
[0051] For example, for the left front and left back sleeves of a long-sleeved shirt, the initial positioning of the two sleeve pieces on the upper arm cylindrical template is first determined based on the predicted layout points (the left front sleeve corresponds to point 45 of the upper arm cylindrical template, and the left back sleeve corresponds to point 46 of the upper arm cylindrical template), thus clarifying the approximate placement and basic posture of the sleeve pieces. Then, positional constraints are applied to the two sleeve pieces: on the one hand, the seam distance between the left front and left back sleeve pieces is minimized to ensure precise alignment of their seam edges and reduce subsequent sewing deviations; on the other hand, collision detection prevents overlapping and interweaving between the two sleeve pieces, while also preventing penetration between the sleeve pieces and the upper arm cylindrical template, ensuring the rationality of the sleeve piece layout. Furthermore, affine transformation parameters are limited to prevent the in-plane rotation angle of the sleeve pieces from exceeding 30° and the in-plane scaling factor from deviating from the standard range of 0.8-1.2, thereby avoiding sleeve piece posture distortion due to excessive affine updates. By constraining the positions of the left sleeve front and back pieces, the affine transformation parameters for the left sleeve front piece are calculated as follows: in-plane rotation angle 12°, in-plane scaling factor 1.05, and three-dimensional translation vector (X:15mm, Y:8mm, Z:20mm). The affine transformation parameters for the left sleeve back piece are calculated as follows: in-plane rotation angle 10°, in-plane scaling factor 1.03, and three-dimensional translation vector (X:17mm, Y:8mm, Z:20mm). This ensures that the layout of the two sleeve pieces conforms to the shape of the human upper arm and meets the sewing requirements.
[0052] It should be noted that the above-mentioned multiple prediction tasks (predicting the body semantic region to which the clothing pattern belongs, predicting layout points, predicting in-plane rotation angles, predicting in-plane scaling factors, and predicting 3D translation vectors) share common features. Figure 4 The network architecture of the pattern layout network is shown, using the same garment pattern mask image and stitching relationship input. The stitching relationship includes information such as seam alignment, relative seam orientation, and seam length. Different loss functions are designed for different tasks within the pattern layout network.
[0053] Minimizing the seam distance between adjacent garment patterns ensures that the seam edges of each garment pattern fit together perfectly; avoiding the overlapping between garment patterns and between garment patterns and the layout template ensures the spatial rationality of the three-dimensional layout of each garment pattern; and constraining the adjustment range of the affine transformation of each garment pattern avoids abnormal deformation of the garment pattern caused by drastic changes in the affine transformation parameters, thus maintaining the regularity and realistic rationality of the overall layout of each garment pattern.
[0054] In this embodiment, the prediction loss includes the prediction loss of affine transformation parameters and the prediction loss of pattern semantic classification. The prediction loss of affine transformation parameters includes the prediction loss of in-plane rotation angle, the prediction loss of in-plane scaling factor, and the prediction loss of 3D translation vector. The network's clothing pattern semantic classification is trained in a supervised manner on labeled data with known clothing patterns and their corresponding body semantic regions, and the prediction loss of pattern semantic classification is calculated using the cross-entropy loss function.
[0055] in, Indicates that the clothing version Assigned to the body semantic region The predicted probability, For the clothing edition The corresponding real body semantic region label.
[0056] Each garment pattern needs to be correctly rotated in-plane to maintain consistency with the local human body surface geometry. The network's in-plane rotation angle prediction is trained in a supervised manner on labeled data with known garment patterns and their corresponding in-plane rotation angles, and the prediction loss for the in-plane rotation angle is calculated using mean squared error.
[0057] in, and They represent clothing patterns. The predicted in-plane rotation angle and the actual in-plane rotation angle.
[0058] In the clothing pattern After determining the corresponding body semantic region and in-plane rotation angle, the clothing pattern... The layout template (such as a cylindrical template) will be placed onto the body semantic region. The corresponding 3D human body surface of this type of layout template is composed of several standardized 2D triangular facets, which can be represented by unified 2D parametric coordinates, thus supporting the mapping and transformation between 2D parametric coordinates and 3D spatial coordinates. To avoid the difficulty of directly regressing continuous coordinates in a highly nonlinear space, the template is discretized into a finite number of layout points, and the placement process is described as the selection of discrete layout points, followed by local affine refinement.
[0059] The network's layout points are selected and trained in a supervised manner on labeled data with known clothing patterns and their corresponding layout points. The prediction loss for the layout points is calculated using class cross-entropy.
[0060] in, Indicates a given clothing pattern and its corresponding body semantic region Under the conditions, the clothing pattern Assigned to layout point The predicted probability, For the clothing edition The actual layout points to be adapted.
[0061] In the clothing pattern After determining the corresponding body semantic region, in-plane rotation angle, and layout point, only the clothing pattern can be determined. The rough initial position is often insufficient to meet sewing constraints or avoid collisions, so it is also necessary to modify the garment pattern. Predict the affine transformation parameters for local refinement:
[0062] in, Including three-dimensional translation 2D in-plane scaling along the local coordinate axes of the plate and an in-plane rotation angle (Using the results learned in the aforementioned supervised task). The affine transformation parameters in the clothing pattern... The calculations are applied in a two-dimensional local coordinate system, and then based on the garment pattern. For the corresponding body semantic area, call the layout template for that area and place the clothing pattern. The pattern pose is mapped onto the selected layout points on the layout template to obtain the garment pattern. The location of the center of mass is:
[0063] in, This represents the three-dimensional coordinates of the selected layout points. This refinement process enables precise seam alignment and prevents collisions between garment patterns. Given a garment pattern... Two-dimensional coordinates of all vertices Clothing prints Layout points With clothing prints affine transformation parameters Final costume version The three-dimensional coordinates are calculated by the following formula:
[0064] For example, see Figure 5 , Figure 5 This is a schematic diagram illustrating an exemplary embodiment of a garment pattern fitting to a cylindrical template on the upper arm. (See diagram below.) Figure 5 As shown, a garment pattern (left) in 2D space is mapped onto the surface of a cylindrical upper arm template in 3D space. The center of the garment pattern is determined by a given layout point. With affine transformation parameters Calculated.
[0065] In this embodiment, the affine transformation parameter prediction of the network is trained in an unsupervised manner, and its objective function is... Including loss of suture proximity Collision avoidance loss Regularization terms to prevent excessively large affine updates :
[0066] Among them, collision avoidance losses This mainly covers three types of situations: (i) overlap between clothing patterns within the same body semantic region; (ii) interweaving between clothing patterns and the layout template of the body semantic region; and (iii) collisions between clothing patterns across different body semantic regions. Since clothing patterns assigned to the same body semantic region share the same layout template, they are prone to overlapping. Therefore, this is suppressed by a separation penalty based on the overlap area. Furthermore, since clothing patterns are mapped through layout templates, body interweaving and collisions across body semantic regions can be mitigated through predefined interweaving areas. The collision loss is processed uniformly, and penalties are applied to corresponding overlaps. The comprehensive collision loss is defined as follows:
[0067] in, This indicates the area of overlap between two clothing patterns, or between a clothing pattern and the semantic area of the body.
[0068] For example, see Figure 6 , Figure 6 This is a schematic diagram illustrating the interlacing area of a garment pattern, as shown in an exemplary embodiment. Figure 6 As shown in the diagram, the boxed areas represent the overlapping areas of the garment pattern. These include the overlapping areas between the layout template of the body semantic area (such as the cylindrical template) and the body, as well as the overlapping areas between different cylindrical templates, mainly concentrated between the shoulders and legs. When laying out the garment pattern, these overlapping areas need to be avoided.
[0069] Loss of proximity of sutures This is used to force seam alignment between two garment patterns, penalizing deviations from a target proximity threshold. For any connected garment pattern... and seams In the clothing section and After the affine transformation, its boundary is uniformly sampled according to the arc length, and point pairs corresponding to the indices are established. A tolerance threshold is defined. Robust suture loss for the target:
[0070] in, This represents the set of seams connecting all the garment pieces in the stitching diagram. Indicates the total number of stitches; Indicates by stitches A linked pair of garment pattern indexes; and They represent clothing patterns. With clothing prints After affine transformation, its two-dimensional sampling points Mapped to coordinates in three-dimensional space; For stitches Obtained by uniform sampling Group corresponding point pairs; This indicates a preset tolerance threshold, which allows for minute gaps between sutures without penalty. This represents a cutoff function that only applies to points where the distance between them is greater than a threshold. The deviation will be punished.
[0071] Robust suture loss maintains suture congruence while suppressing outliers. To avoid excessively large affine updates, a regularization term needs to be introduced during network training:
[0072] in, This indicates that all clothing patterns have been traversed. Indicates the first Affine transformation parameters for each garment pattern piece This represents the square of the translation magnitude (L2 norm). This represents the total number of garment patterns to be laid out. Introducing regularization terms makes the network more inclined to adjust the affine transformation parameters of the garment patterns with smaller amplitudes and greater physical reasonableness, while retaining the flexibility required to meet the sewing constraints of the garment patterns.
[0073] In one embodiment shown, the three-dimensional translation vector includes a normal offset distance; the position constraint processing of each garment pattern based on its initial positioning to obtain the affine transformation parameters includes: applying the normal offset distance corresponding to the stacking level of each garment pattern at its initial positioning based on its initial positioning and its stacking level; and calculating the in-plane scaling factor of each garment pattern based on the ratio of its area to the area of the layout template of the body semantic region corresponding to each garment pattern.
[0074] For example, when processing a garment consisting of a T-shirt and a jacket, the T-shirt is labeled as layer 1 and the jacket as layer 2. If the reference offset distance for layer 1 is set to 0.5cm and for layer 2 to 1.5cm, a normal offset of 0.5cm is applied to the initial positioning of the T-shirt garment pattern, and a normal offset of 1.5cm is applied to the initial positioning of the jacket garment pattern. If the area of the sleeve piece in the T-shirt garment pattern is 4 square centimeters, and the area of its corresponding arm area layout template is 3.8 square centimeters, the calculated in-plane scaling factor is approximately 1.05, instructing the training system to shrink the sleeve piece in the T-shirt garment pattern by 5% to fit the arm area layout template; conversely, if the area of the sleeve piece in the jacket garment pattern is 3.2 square centimeters, and the area of its corresponding arm area layout template is 3.8 square centimeters, the calculated in-plane scaling factor is approximately 0.84, instructing the training system to enlarge the sleeve piece in the jacket garment pattern by 19% to fit the arm area layout template.
[0075] In this design, because the outer jacket pattern is pushed outwards a greater distance along the normal direction of the layout template surface than the T-shirt pattern, it geometrically ensures that the outer garment is always outside the inner garment, avoiding mesh overlap caused by coordinate coincidence. Calculating the in-plane scaling factor of the garment patterns ensures that different garment patterns maintain a reasonable coverage density in the body semantic region, avoiding both excessive stretching leading to texture distortion and excessive shrinkage creating gaps. The in-plane scaling factor can be represented as a single number or as a pair of values, including the X-axis scaling factor and the Y-axis scaling factor.
[0076] In one embodiment shown, each garment piece in the garment stitching diagram is represented in the form of nodes, and the stitching relationship between the pieces is used to determine the connection relationship of each node; the step of using a convolutional neural network to extract the geometric features of each garment piece in any sample garment stitching diagram includes: converting each garment piece in any sample garment stitching diagram into a binary mask representation; and using a convolutional neural network to extract the geometric features of the binary mask to obtain the geometric features of each garment piece node in the garment stitching diagram of any sample.
[0077] For example, see Figure 7 , Figure 7 This is a schematic diagram illustrating an exemplary embodiment of geometric feature extraction from a garment pattern. (As shown...) Figure 7 As shown, for a certain sample of clothing stitching diagram, the training system first converts each garment piece in the clothing stitching diagram into a two-dimensional binary mask image, where the pixel value of the area occupied by the garment piece is set to 1 (white) and the background area is set to 0 (black). Then, the binary mask image is input into a convolutional neural network based on an efficient network architecture, and the feature maps output by each convolutional layer of the network are concatenated to form a compact latent embedding vector, which is used as the geometric feature of the garment piece node.
[0078] Furthermore, to comprehensively characterize the stitching relationships between garment patterns, the training system also constructs connection features between garment patterns at two levels: (i) at a coarse-grained level, it constructs garment pattern connectivity features to indicate which garment patterns are physically connected by seams; (ii) at a fine-grained level, it extracts seam-corresponding features to characterize specific stitching methods. (See also: [link to relevant documentation]) Figure 8 , Figure 8 This is a schematic diagram illustrating the feature extraction of the seam orientation of a garment pattern piece, as shown in an exemplary embodiment. Figure 8 As shown in the figure, the left side is a T-shirt sleeve piece, and the right side is another adjacent garment piece. The black dot is the geometric center of the garment piece, the gray dot pointed to by the arrow is the center of the seam, and the arrow is the direction vector from the geometric center to the center of the seam. The training system selects the longest set of seams between the two garment pieces, calculates the direction vector from the geometric center of the garment piece to the center of the seam, and uses this direction vector as a feature describing the relative orientation of the seam.
[0079] Finally, the training system fuses the geometric features, coarse-grained connectivity features, and fine-grained orientation features of the pattern node as the input representation of each node in the garment stitching diagram in the graph neural network.
[0080] Secondly, this disclosure also provides a method for garment pattern layout based on the pattern layout network described above. Please see [link to relevant documentation]. Figure 9 , Figure 9 This is a flowchart illustrating an exemplary embodiment of a method for garment pattern layout based on a pattern layout network. (See attached flowchart.) Figure 9 As shown, the method can perform the following steps: Step 902: Construct a garment stitching diagram and a body semantic diagram. The garment stitching diagram includes several garment pieces and the stitching relationships between the pieces. The body semantic diagram includes several body semantic regions and the connection relationships between the regions.
[0081] For example, see Figure 10 , Figure 10 This is an exemplary embodiment illustrating a pattern layout effect for a garment. (As shown...) Figure 10 As shown in Figure (a), the pattern layout network operating system (hereinafter referred to as the "operating system") obtains a set of garment patterns to be laid out and constructs a garment stitching diagram based on the seam information in the pattern design drawings. Each node of the garment stitching diagram represents a garment pattern, and the edges of the garment stitching diagram represent the stitching relationship between garment patterns. At the same time, a body model containing areas such as the torso, arms, and legs is constructed, and the body model is divided into several predefined body semantic regions (such as left sleeve, right sleeve, upper body, hem, etc.). A body semantic graph is constructed based on the adjacency relationship of each body semantic region in the body topology.
[0082] The garment stitching diagram is used to represent the topological constraints of the garment, while the body semantic diagram is used to provide geometric priors and semantic guidance for the layout of garment patterns. In this disclosure, "body" can refer to a human body or an animal body, and this disclosure does not impose any limitation on this.
[0083] Step 904: Input the garment stitching diagram and the body semantic map into the pattern layout network, so that the pattern layout network performs feature encoding on the garment stitching diagram, and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map.
[0084] For example, such as Figure 10 Figure (b) in the middle Figure 10 As shown in Figure (d), the operating system inputs the garment stitching diagram and body semantic map into the pattern layout network. The pattern layout network first encodes the garment stitching diagram to extract the geometric and stitching features of the garment pattern. Then, it combines the body semantic map to perform graph matching or classification regression calculations, outputting the target body semantic region (e.g., "upper body" region or "sleeve" region) to which each garment pattern belongs, and the affine transformation parameters of each garment pattern in three-dimensional space, including rotation angles (e.g., ...). Figure 10 (as shown in Figure (c)), 3D translation vectors, in-plane scaling factors, etc. (e.g.) Figure 10 (as shown in Figure (e) in the diagram), and the layout points in the target body semantic region to which each garment pattern belongs (e.g., Figure 10 (The layout points shown in Figure (d) are placed at their positions).
[0085] Among them, the pattern layout network can learn the mapping relationship between clothing patterns and body areas, and can directly infer a reasonable layout strategy from an unordered set of clothing patterns, avoiding the tedious process of manually specifying the initial position of clothing patterns.
[0086] Step 906: Based on the predicted body semantic regions and affine transformation parameters corresponding to each garment pattern, map each garment pattern in the garment stitching diagram to the corresponding position in the corresponding body semantic region.
[0087] For example, such as Figure 10 As shown in Figure (e), based on the body semantic regions and affine transformation parameters corresponding to each garment pattern predicted in step 904, the operating system performs corresponding rotations, translations, and in-plane scaling on each garment pattern in three-dimensional space, so that it initially covers the surface of the corresponding body semantic regions, and handles the hierarchical occlusion relationship between garment patterns to solve the overlap problem; subsequently, the operating system performs physical simulation based on the mapped pattern layout to obtain the following... Figure 10 The final wearing effect is shown in Figure (f).
[0088] By accurately mapping the garment pattern to the corresponding body semantic region through affine transformation parameters, it is possible to ensure that the initial distribution of the garment pattern in three-dimensional space conforms to ergonomics and clothing design logic, thereby significantly reducing the amount of collision detection calculation in subsequent physical simulation and avoiding garment pattern interlacing errors.
[0089] Through the above methods, the embodiments of this disclosure can achieve stable and accurate garment pattern layouts across various clothing categories, including but not limited to dresses, trousers, and tops. These clothing categories have high pattern layout complexity; dresses typically span a large area of the body, trousers require precise alignment of the legs and waist, and tops need to accommodate diverse upper body postures. By utilizing graph neural networks to explicitly model the relationship between clothing structure and human semantics, accurate garment pattern layout results can be consistently generated across different clothing styles.
[0090] Please see Figure 11 , Figure 11 This is an exemplary embodiment illustrating another possible garment pattern layout.
[0091] like Figure 11 Figure (a) in the middle - Figure 11 As shown in Figure (d), the solution disclosed herein has strong generalization ability and is applicable to multi-layered garments with complex structures. It can also arrange multiple garments together to assemble a complete set. Specifically, by explicitly specifying the order of garment layers and applying normal offset during the garment pattern layout process, multi-layered garments such as shirts and trousers can be reliably stacked without collision.
[0092] like Figure 11 Figure (e) in the middle - Figure 11As shown in Figure (l), the solution disclosed herein has strong generalization and is applicable to the precise layout of clothing patterns under different body postures. Specifically, the present disclosure utilizes layout templates associated with body semantic regions to naturally adapt to diverse body shapes and posture changes.
[0093] like Figure 11 (m) diagram in Figure 11 As shown in Figure (p), the solution disclosed herein has strong generalization and is applicable to the precise layout of clothing patterns for different species (bipedal, quadrupedal, etc.). Specifically, this disclosure can extend to quadrupedal clothing scenes by adjusting the body semantic map to match the anatomical structure of quadrupedal animals, thereby achieving accurate layout of clothing patterns on the body structure of quadrupedal animals.
[0094] Thirdly, corresponding to the embodiments of the above-described layout network training method, this disclosure also provides an embodiment of a layout network training device.
[0095] Please see Figure 12 , Figure 12 This is an exemplary embodiment illustrating the hardware structure of an electronic device. At the hardware level, the device includes a processor 1202, an internal bus 1204, a network interface 1206, memory 1208, and non-volatile memory 1210, and may also include other necessary hardware. One or more embodiments of this disclosure can be implemented in software, for example, the processor 1202 reads the corresponding computer program from the non-volatile memory 1210 into memory 1208 and then runs it. Of course, besides software implementation, one or more embodiments of this disclosure do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0096] Please see Figure 13 , Figure 13 This is a block diagram illustrating an exemplary embodiment of a layout network training apparatus. This layout network training apparatus 1300 can be applied to, for example... Figure 12 The illustrated electronic device is used to implement the technical solution of this disclosure. The device includes: The acquisition unit 1302 is used to acquire several samples. Each sample uses a garment sewing diagram and a body semantic map as feature values, and the body semantic region and affine transformation parameters corresponding to each garment piece in the garment sewing diagram as label values. The garment sewing diagram includes: several garment pieces and the sewing relationship between the pieces. The body semantic map includes: several body semantic regions and the connection relationship between the regions. Input unit 1304 is used to input the plurality of samples into the pattern layout network so that the network performs feature encoding on the garment stitching diagram of any sample and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map. Update unit 1306 is used to calculate prediction loss based on the difference between the prediction result and the label value, and then update network parameters based on the loss; The storage unit 1308 is used to repeat the above prediction steps until the network training converges and to save the converged network parameters.
[0097] In some embodiments, the tag value also includes layout points within the body semantic region corresponding to each garment piece in the garment stitching diagram; The step of inputting the sample set into the pattern layout network, so that the network encodes the features of any sample's garment stitching diagram, and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map, includes: The sample set is input into the pattern layout network so that the network encodes the features of the garment stitching diagram of any sample, and predicts the body semantic region corresponding to each garment pattern in the garment stitching diagram, the layout points in the body semantic region, and the affine transformation parameters based on the encoding result and the body semantic map.
[0098] In some embodiments, each garment piece in the garment stitching diagram is represented in the form of nodes, and the stitching relationship between the pieces is used to determine the connection relationship between the nodes. The network is specifically used for: Using a convolutional neural network, the geometric features of each garment piece in the garment stitching diagram of any sample are extracted; Attention aggregation is performed on the stitching relationships between the garment pieces included in the garment stitching diagram, as well as the geometric features of each garment piece, to obtain the node features of the updated garment piece; Based on the node features of the updated clothing pattern, predict the body semantic region corresponding to each clothing pattern, the layout points within the body semantic region, and the affine transformation parameters.
[0099] In some embodiments, predicting the body semantic region corresponding to each garment pattern, the layout points within the body semantic region, and the affine transformation parameters based on the node features of the updated garment pattern includes: The node features of the updated clothing pattern are semantically classified to obtain the body semantic region corresponding to each clothing pattern; On the obtained layout template of the body semantic region, the relationship model of each garment piece in the same body semantic region is performed through message passing to obtain the layout points of each garment piece on the layout template; The affine transformation parameters are obtained by constraining the positions of each garment pattern piece based on the layout points.
[0100] In some embodiments, the step of constraining the position of each garment pattern piece based on the layout points to obtain the affine transformation parameters includes: The initial positioning of each garment pattern piece is determined based on the layout points; Based on the initial positioning of each garment pattern, position constraint processing is performed on each garment pattern to obtain the affine transformation parameters, which include in-plane rotation angle, in-plane scaling factor and three-dimensional translation vector. The position constraint processing includes at least one of the following: minimizing the seam distance between adjacent garment patterns, preventing overlapping or interweaving between garment patterns or between garment patterns and the layout template, and preventing excessive affine updates.
[0101] In some embodiments, the three-dimensional translation vector includes a normal offset distance; The step of performing position constraint processing on each garment pattern based on its initial positioning to obtain the affine transformation parameters includes: Based on the initial positioning of each garment pattern and the stacking level of each garment pattern, a normal offset distance corresponding to the stacking level of each garment pattern is applied at the initial positioning of each garment pattern. The in-plane scaling factor of each garment pattern is calculated based on the ratio of the area of each garment pattern to the area of the layout template of the corresponding body semantic region.
[0102] In some embodiments, each garment piece in the garment stitching diagram is represented in the form of a node, and the stitching relationship between the pieces is used to determine the connection relationship between the nodes. The method of extracting the geometric features of each garment piece in a garment stitching diagram of any sample using a convolutional neural network includes: Convert each garment pattern piece in any sample's garment stitching diagram into a binary mask representation; The geometric features of the binary mask are extracted using a convolutional neural network to obtain the geometric features of each garment pattern node in the garment stitching diagram of any sample.
[0103] Fourthly, corresponding to the above-described embodiments of the method for garment pattern layout based on a pattern layout network, this disclosure also provides an embodiment of an apparatus for garment pattern layout based on a pattern layout network.
[0104] Please see Figure 14 , Figure 14This is an exemplary embodiment illustrating the hardware structure of another electronic device. At the hardware level, the device includes a processor 1402, an internal bus 1404, a network interface 1406, memory 1408, and non-volatile memory 1410, and may also include other necessary hardware. One or more embodiments of this disclosure can be implemented in software, for example, the processor 1402 reads the corresponding computer program from the non-volatile memory 1410 into memory 1408 and then runs it. Of course, besides software implementation, one or more embodiments of this disclosure do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0105] Please see Figure 15 , Figure 15 This is a block diagram illustrating an apparatus for garment pattern layout based on a pattern layout network, as shown in an exemplary embodiment. This apparatus 1500 for garment pattern layout based on a pattern layout network can be applied to, for example... Figure 8 The illustrated electronic device is used to implement the technical solution of this disclosure. The device includes: Construction unit 1502 is used to construct a garment stitching diagram and a body semantic diagram. The garment stitching diagram includes: several garment pieces and the stitching relationship between the pieces. The body semantic diagram includes: several body semantic regions and the connection relationship between the regions. Input unit 1504 is used to input the garment stitching diagram and the body semantic map into the pattern layout network, so that the pattern layout network performs feature encoding on the garment stitching diagram and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map. The mapping unit 1506 is used to map each garment pattern in the garment stitching diagram to the corresponding position of the corresponding body semantic region based on the predicted body semantic region and affine transformation parameters.
[0106] 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.
[0107] 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 this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0108] The systems, devices, modules, or units described in the above embodiments can be implemented by a computer or entity, or by a product with a certain function. A typical implementation device is a computer, which can be a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0109] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0110] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0111] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0112] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation portals shall be provided for users to choose to authorize or refuse.
[0113] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0114] The foregoing has described specific embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0115] The terminology used in one or more embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this disclosure. The singular forms “a,” “the,” and “the” as used in one or more embodiments of this disclosure 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 associated listed items.
[0116] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this disclosure, such information 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 one or more embodiments of this disclosure, 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."
[0117] The above description is merely a preferred embodiment of one or more embodiments of this disclosure and is not intended to limit the scope of one or more embodiments of this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this disclosure should be included within the scope of protection of one or more embodiments of this disclosure.
Claims
1. A method for training a layout network, characterized in that, The method includes: Several samples are obtained. Each sample uses a garment stitching diagram and a body semantic map as feature values, and the body semantic region and affine transformation parameters corresponding to each garment piece in the garment stitching diagram as label values. The garment stitching diagram includes: several garment pieces and the stitching relationship between the pieces. The body semantic map includes: several body semantic regions and the connection relationship between the regions. The samples are input into the pattern layout network so that the network encodes the features of the garment stitching diagram of any sample and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding results and the body semantic map. The prediction loss is calculated based on the difference between the prediction result and the label value, and then the network parameters are updated based on the loss. Repeat the above prediction steps until the network training converges, and save the converged network parameters.
2. The method according to claim 1, characterized in that, The tag value also includes the layout points within the body semantic area corresponding to each garment piece in the garment stitching diagram; The step of inputting the sample set into the pattern layout network, so that the network encodes the features of any sample's garment stitching diagram, and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map, includes: The sample set is input into the pattern layout network so that the network encodes the features of the garment stitching diagram of any sample, and predicts the body semantic region corresponding to each garment pattern in the garment stitching diagram, the layout points in the body semantic region, and the affine transformation parameters based on the encoding result and the body semantic map.
3. The method according to claim 2, characterized in that, In the garment stitching diagram, each garment piece is represented by a node. The stitching relationship between the pieces is used to determine the connection relationship between the nodes. The network is specifically used for: Using a convolutional neural network, the geometric features of each garment piece in the garment stitching diagram of any sample are extracted; Attention aggregation is performed on the stitching relationships between the garment pieces included in the garment stitching diagram, as well as the geometric features of each garment piece, to obtain the node features of the updated garment piece; Based on the node features of the updated clothing pattern, predict the body semantic region corresponding to each clothing pattern, the layout points within the body semantic region, and the affine transformation parameters.
4. The method according to claim 3, characterized in that, The step of predicting the body semantic region corresponding to each garment pattern, the layout points within the body semantic region, and the affine transformation parameters based on the node features of the updated garment pattern includes: The node features of the updated clothing pattern are semantically classified to obtain the body semantic region corresponding to each clothing pattern; On the obtained layout template of the body semantic region, the relationship model of each garment piece in the same body semantic region is performed through message passing to obtain the layout points of each garment piece on the layout template; The affine transformation parameters are obtained by constraining the positions of each garment pattern piece based on the layout points.
5. The method according to claim 4, characterized in that, The step of constraining the position of each garment pattern piece based on the layout points to obtain the affine transformation parameters includes: The initial positioning of each garment pattern piece is determined based on the layout points; Based on the initial positioning of each garment pattern, position constraint processing is performed on each garment pattern to obtain the affine transformation parameters, which include in-plane rotation angle, in-plane scaling factor and three-dimensional translation vector. The position constraint processing includes at least one of the following: minimizing the seam distance between adjacent garment patterns, preventing overlapping or interweaving between garment patterns or between garment patterns and the layout template, and preventing excessive affine updates.
6. The method according to claim 5, characterized in that, The three-dimensional translation vector includes the normal offset distance; The step of performing position constraint processing on each garment pattern based on its initial positioning to obtain the affine transformation parameters includes: Based on the initial positioning of each garment pattern and the stacking level of each garment pattern, a normal offset distance corresponding to the stacking level of each garment pattern is applied at the initial positioning of each garment pattern. The in-plane scaling factor of each garment pattern is calculated based on the ratio of the area of each garment pattern to the area of the layout template of the corresponding body semantic region.
7. The method according to claim 3, characterized in that, Each garment piece in the garment stitching diagram is represented by a node, and the stitching relationship between the pieces is used to determine the connection relationship between the nodes. The method of extracting the geometric features of each garment piece in a garment stitching diagram of any sample using a convolutional neural network includes: Convert each garment pattern piece in any sample's garment stitching diagram into a binary mask representation; The geometric features of the binary mask are extracted using a convolutional neural network to obtain the geometric features of each garment pattern node in the garment stitching diagram of any sample.
8. A method for garment pattern layout based on the pattern layout network according to any one of claims 1 to 7, characterized in that, The method includes: Construct a garment stitching diagram and a body semantic diagram. The garment stitching diagram includes several garment pieces and the stitching relationships between the pieces. The body semantic diagram includes several body semantic regions and the connection relationships between the regions. The garment stitching diagram and the body semantic map are input into the pattern layout network so that the pattern layout network performs feature encoding on the garment stitching diagram and predicts the body semantic region and affine transformation parameters corresponding to each garment pattern in the garment stitching diagram based on the encoding result and the body semantic map. Based on the predicted body semantic regions and affine transformation parameters corresponding to each garment pattern, each garment pattern in the garment stitching diagram is mapped to the corresponding position in the corresponding body semantic region.
9. An electronic device, characterized in that, It includes a communication interface, a processor, a memory, and a bus, wherein the communication interface, the processor, and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 7 or claim 8 by invoking the machine-readable instructions.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-readable instructions, which, when invoked and executed by a processor, implement the method described in any one of claims 1 to 7 or claim 8.