A garment pattern generation method, device and medium
By collecting full-body images from multiple perspectives to construct a virtual 3D model, the clothing effect under different postures is simulated, and the clothing pattern is automatically optimized, solving the problem of time-consuming and costly traditional clothing customization and realizing efficient and personalized customization.
Patent Information
- Application Number
- CN202610349901.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-19
Smart Images

Figure CN122244317A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of clothing design technology, specifically to a method, equipment, and medium for generating clothing patterns. Background Technology
[0002] Custom clothing generally requires taking measurements, but this is usually done statically and doesn't take into account the user's wearing experience in different postures. Usually, clothing designers need to design patterns and sizes based on their experience. Generally, after the clothes are made, the customer needs to try them on and make repeated modifications to meet their needs. This is costly, time-consuming, and reduces the user experience. Summary of the Invention
[0003] To address the aforementioned problems, this application proposes a method for generating clothing patterns, comprising: Collect full-body images of the user from multiple perspectives, analyze the full-body images to extract the user's body shape features, and determine the corresponding garment pattern topology based on the body shape features; Obtain the user's clothing customization requirements, and generate a basic clothing pattern corresponding to the user based on the clothing pattern topology and the clothing customization requirements; Based on the described body shape characteristics, a virtual 3D model corresponding to the user is constructed; The basic clothing pattern is loaded into the virtual 3D model, and the posture parameters corresponding to the preset key parts in the virtual 3D model are adjusted to simulate and render virtual clothing images of the user in different movement postures. The fit of the basic garment pattern is evaluated based on the surface deformation parameters of the garment in the virtual dressing image. If the fit is less than a preset fit threshold, the basic garment pattern is adjusted according to the garment surface deformation parameters until the adjusted basic garment pattern fits the user.
[0004] In one implementation of this application, determining the corresponding garment pattern topology based on the body shape characteristics specifically includes: The body shape features include linear dimension parameters, cross-sectional curvature parameters, and key point angle parameters; The user-customized basic clothing category, the linear size parameters, and the key point angle parameters are input into a preset global topology classifier to predict the basic structure category corresponding to the clothing that the user needs to customize. Based on the basic structure category and the cross-sectional curvature parameters, the garment's piece composition pattern is output through a preset local topology parser; wherein, the piece composition pattern includes the number of pieces, the type identifier of each piece, and the adjacency relationship between each piece; Based on the pattern of the cut pieces, the cut pieces are assembled to obtain the corresponding garment cut piece topology; wherein, the garment cut piece topology is represented as a stitching relationship diagram with the cut pieces as nodes and the stitching relationship between the cut pieces as edges.
[0005] In one implementation of this application, a basic garment pattern corresponding to the user is generated based on the garment pattern topology and the garment customization requirements, specifically including: Based on a preset pattern area mapping table, each pattern piece is divided into multiple geometric regions according to the type identifier of each pattern piece in the garment pattern topology. For each geometric region, the region type corresponding to the geometric region is determined according to the position of the geometric region in the pattern piece and the pattern piece type to which it belongs; wherein, the region type includes a first region type and a second region type, the pattern piece outline of the first region type is strongly correlated with the change of human body curvature, and the pattern piece outline of the second region type is weakly correlated with the change of human body curvature. Based on the region type, determine the offset corresponding to the curve control point located on the boundary of the geometric region; wherein, the curve control point refers to the point on the boundary of the geometric region that can change the geometric shape of the pattern piece outline. The offset is input into a preset geometry generator to generate vector pattern outlines for each pattern piece according to the geometry generator. Based on the vector pattern outline, a basic clothing pattern corresponding to the user is generated.
[0006] In one implementation of this application, generating the basic garment pattern corresponding to the user based on the vector pattern outline specifically includes: Based on the topological structure of the garment pieces, the vector garment outlines are virtually sewn together to generate a three-dimensional virtual garment model. The three-dimensional virtual clothing model is reprojected onto the two-dimensional plane containing the full-body images from multiple perspectives to obtain the reprojected images from multiple perspectives. The contour difference value and key point difference value between the reprojected image and the corresponding full-body image at each viewpoint are calculated to construct the reprojection loss function; wherein, the contour difference value is calculated using bidirectional Hausdorff distance, and the key point difference value is calculated using Euclidean distance between corresponding key points; Based on the reprojection loss function, the offset is optimized by backpropagation, and the basic garment pattern is updated according to the optimized offset to obtain the optimized basic garment pattern.
[0007] In one implementation of this application, the fit of the basic garment pattern is evaluated based on the garment surface deformation parameters in the virtual clothing image, specifically including: The surface deformation parameters of the garment include at least one or more of the following: deformation area ratio and deformation degree; The virtual clothing image is processed to obtain a corresponding grayscale image. Based on the mapping relationship between the user's human body key points and the basic clothing pattern, the grayscale image is decomposed into multiple local clothing areas. According to a preset grayscale threshold, the grayscale image is converted into a binary image, and based on the binary image, the deformation area ratio corresponding to the local clothing area is calculated according to the ratio of the surface deformation area in the local clothing area to the area of the local clothing area. The grayscale image is scanned to extract the image contour of the local clothing area. Based on the grayscale change gradient of the image contour in a preset direction, the degree of deformation corresponding to the local clothing area is calculated. Based on the degree of deformation and the ratio of the deformation area, the local fit degree corresponding to the local clothing area is determined; Based on the area weight corresponding to each local clothing area, the local fit is weighted and summed to obtain the fit of the basic clothing pattern.
[0008] In one implementation of this application, the degree of deformation corresponding to the local clothing area is calculated based on the grayscale change gradient of the image contour in a preset direction, specifically including: Determine the grayscale value sequence of the image contour in a preset direction; Based on the gray value sequence, the gray value extreme points of the image contour in a preset direction are determined; wherein, the gray value extreme points include gray value maxima representing surface protrusions and gray value minima representing surface depressions. For each grayscale maximum point, the depth deformation degree corresponding to the local clothing area is determined based on the grayscale change gradient between the grayscale maximum point and its adjacent grayscale minimum points on the left and right. The spacing deformation degree corresponding to the local clothing area is determined based on the pixel distance between the grayscale maximum point and its adjacent grayscale maximum points on the left and right.
[0009] In one implementation of this application, the depth deformation degree corresponding to the local clothing area is determined based on the grayscale change gradient between the grayscale maximum point and its adjacent grayscale minimum points on the left and right sides. Furthermore, the spacing deformation degree corresponding to the local clothing area is determined based on the pixel distance between the grayscale maximum point and its adjacent grayscale minimum points on the left and right sides. Specifically, this includes: The gray-scale maximum point and its matching adjacent gray-scale extreme points are used as a gray-scale calculation unit; Traverse all grayscale extreme points, and determine the depth deformation degree corresponding to the local clothing area based on the ratio between the standard deviation and the mean of the grayscale change gradient corresponding to each grayscale calculation unit. Also, determine the spacing deformation degree corresponding to the local clothing area based on the ratio between the standard deviation and the mean of the pixel distance corresponding to each grayscale calculation unit.
[0010] In one implementation of this application, adjusting the basic garment pattern according to the garment surface deformation parameters specifically includes: Identify a designated local clothing area in the local clothing area where the local fit is less than a preset value; Obtain the coordinates of the grayscale extreme points in the specified local clothing area, and determine the geometric distribution pattern corresponding to the specified local clothing area based on the distribution characteristics of the coordinates; wherein, the geometric distribution pattern includes a radial pattern, a parallel strip pattern, and a sparse line pattern; Based on the geometric distribution pattern, determine the pattern adjustment type corresponding to the designated clothing area, and based on the degree of deformation, determine the correction amount corresponding to the designated clothing area. The basic garment pattern is adjusted based on the pattern adjustment type and the correction amount.
[0011] This application embodiment provides a garment pattern generation device, the device comprising: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a garment pattern generation method as described above.
[0012] This application provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows: A method for generating a garment pattern, as described in any of the preceding items.
[0013] The clothing pattern generation method proposed in this application can bring the following beneficial effects: By collecting full-body images of users from multiple perspectives to extract body shape features and constructing a virtual 3D model, the limitations of traditional body measurement, which relies solely on static dimensions and struggles to consider dynamic wearing experience, are overcome. By simulating the wearing effect of users in different movement postures, the system automatically assesses the fit of clothing and iteratively optimizes the pattern. This eliminates the need for users to repeatedly try on clothes and make physical modifications to the pattern, significantly reducing customization costs and time, and improving clothing fit accuracy and user experience. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a method for generating a garment pattern, as provided in an embodiment of this application; Figure 2 This is a schematic diagram of a garment pattern generation device provided in an embodiment of this application. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0017] like Figure 1 As shown in the embodiments of this application, the method for generating clothing patterns includes: S101: Collect full-body images of the user from multiple perspectives, analyze the full-body images to extract the user's body shape features, and determine the corresponding garment pattern topology based on the body shape features.
[0018] When customizing clothing, users first need to obtain their own body shape information. Traditional methods mostly involve users providing their own body shape data or taking measurements on-site. However, the body shape data provided by users may have some deviation, and on-site measurements also consume a lot of time for users. In order to more conveniently realize users' clothing customization needs and comprehensively and accurately obtain users' body shape, this application embodiment achieves this by collecting full-body images of users from multiple perspectives. The above perspectives typically include key angles such as front, side, and back to ensure that the features of the user's body in various dimensions can be captured. After the acquisition is completed, these full-body images need to be analyzed and processed to extract the user's body shape features. Body shape features refer to a set of parameters that can quantify the size and shape of various parts of the user's body. Based on the body shape features, the corresponding garment pattern topology is further determined. The garment pattern topology is used to characterize the individual pattern pieces that make up the garment and how the pattern pieces are sewn together. It can be abstracted as a sewing relationship graph composed of pattern pieces as nodes and the sewing relationships between pattern pieces as edges.
[0019] Body shape features include linear dimensional parameters, cross-sectional curvature parameters, and keypoint angle parameters. Linear dimensional parameters refer to conventional measurements such as height, chest circumference, waist circumference, hip circumference, and shoulder width. Cross-sectional curvature parameters quantify the degree of curvature of specific cross-sectional contours of the body, such as the protrusion of the chest and scapula. Keypoint angle parameters describe the spatial angular relationships of key areas such as shoulder slope angle and neck tilt angle. A standard posture refers to a uniform, upright, and naturally relaxed posture. By mapping the user's body shape to a standard posture, the influence of posture differences during actual shooting can be eliminated, making the extracted body shape features stable.
[0020] After acquiring full-body images of multiple users from multiple viewpoints, the first step is to detect key human points in each image. An open-source 2D pose estimation model (such as OpenPose) can be used to detect major key human points in each image, including shoulder, elbow, wrist, neck, chest, waist, hip, knee, and ankle points. Each key point corresponds to 2D pixel coordinates on the image. The 2D key point coordinates from each viewpoint are then converted into 3D spatial coordinates. Specifically, based on pre-calibrated camera parameters, for each key point visible simultaneously in multiple viewpoints, triangulation is used to calculate its 3D coordinates. For example, for a shoulder point, if it is detected in front, side, and back images, its 3D spatial position can be solved using the least squares method. In this way, a keypoint cloud of the user in 3D space is obtained. Then, based on these 3D keypoint coordinates, the required body shape feature parameters are directly calculated. The linear dimensional parameters are calculated as follows: Chest circumference can be estimated by fitting an ellipse or circle to key points such as the left and right chest points, front chest point, and back point, or by extrapolating from the distance between key points using a pre-defined regression model; waist circumference can be estimated by the left and right waist points, front waist point, and back waist point; shoulder width can be directly calculated by calculating the Euclidean distance between the left and right shoulder points; arm length can be calculated by calculating the length of a broken line or a curve fitted from the shoulder point to the elbow point and then to the wrist point. To improve accuracy, a mapping relationship model between key point distances and actual circumferences can be pre-established, and regression coefficients can be obtained through training with a large number of samples. The cross-sectional curvature parameter is calculated as follows: For the part requiring curvature calculation, key points near that part are extracted, and a quadratic surface is fitted to these points. Then, the average curvature of the fitted surface at the target point is calculated as the cross-sectional curvature parameter for that part. For the chest, a local surface can be fitted using the chest point and its adjacent auxiliary key points (up, down, left, and right) to obtain a quantitative value of the chest protrusion. The key point angle parameter is calculated as follows: Based on the three-dimensional key point coordinates, the spatial vector angle is directly calculated. For example, the shoulder tilt angle can be calculated by the angle between the vector from the shoulder point to the neck point and the horizontal plane; the neck tilt angle can be calculated by the angle between the vector from the neck point to the chest point and the vertical axis; and the pelvic tilt angle can be calculated by the angle between the line connecting the hip point and the waist point and the horizontal plane.
[0021] In one embodiment, this application employs a hierarchical prediction strategy to progressively determine the topology of the garment pieces. When a user initiates a clothing customization request, they typically specify the basic garment category they wish to customize. This basic category includes at least tops, bottoms, and jumpsuits. The user actively selects a top, bottoms, or jumpsuit as their customization target, reflecting their intended wearing style. After defining the basic garment category, the category, linear dimension parameters, and key point angle parameters are input into a preset global topology classifier. The global topology classifier is a neural network model, such as a multilayer perceptron classifier, trained with extensive garment pattern design data and human body measurement data. Its function is to further refine the determination of the specific basic structure category within the known garment category, based on the user's body shape characteristics. The basic structure category refers to the clothing structure template further refined based on the user's personalized body shape characteristics, under the constraint of the basic clothing category selected by the user. Specifically, the basic clothing category, linear size parameters, and key point angle parameters are normalized and concatenated to form a feature vector, which is then input into the global topology classifier. After forward propagation, the classifier's output layer uses the softmax activation function to obtain K probability values, and the one with the highest probability is selected as the predicted basic structure category. For example, when a user selects a customized top, the global topology classifier will determine which structure template should be used for the top based on the user's linear size parameters such as shoulder width, chest circumference, and back length, as well as key point angle parameters such as shoulder slope angle and neck tilt angle. If the user has narrow shoulders and a flat chest, the classifier may output a standard fitted top; if the user has broad shoulders, the classifier may output a loose, dropped-shoulder top; if the user has obvious hunchback characteristics, the classifier may output a top with an extended back panel to adapt to the special body shape. Similarly, when a user selects to customize bottoms, the global topology classifier will output basic structural categories such as straight-leg pants, tapered pants, or slim-fit pants based on dimensions such as waist circumference, hip circumference, thigh circumference, and waist-hip angle.
[0022] After determining the basic structure category, the basic structure category and the previously extracted cross-sectional curvature parameters are input into a pre-defined local topology parser. The local topology parser, which can be a graph attention network (GAT), determines how the specific garment pieces should be divided based on the surface curvature characteristics of the user's body, given the basic structure category of the garment. The cross-sectional curvature parameters reflect the undulations of different parts of the user's body. The local topology parser integrates the cross-sectional curvature parameters and the basic structure category to output a garment piece composition pattern specific to that user. Specifically, based on the basic structure category, a predefined template library is searched to initialize the garment piece template graph corresponding to that category. The template graph contains candidate nodes (i.e., garment pieces) and candidate edges (i.e., stitching relationships) that the garment type may have. Then, the cross-sectional curvature parameters are added as global features to the initial features of the graph attention network. After multiple layers of GAT message passing and node updates, each candidate node and candidate edge are classified to determine whether the garment pieces are stitched. Finally, based on the classification results, the final garment piece composition graph is constructed, yielding the number of garment pieces, the type identifier of each garment piece, and the adjacency relationships between garment pieces. This pattern composition diagram is the pattern needed to generate the specific pattern outlines later. The pattern composition includes the number of patterns, the type identifier of each pattern, and the adjacency relationships between the patterns. The number of patterns indicates how many independent patterns will be sewn together to form the garment. For example, a shirt might include a front piece, a back piece, two sleeve pieces, and a collar piece, for a total of five patterns. The type identifier of each pattern piece assigns a semantic label, such as left front piece, right back piece, sleeve piece, collar piece, etc., clarifying the functional role of each pattern piece in the garment. The adjacency relationships between the patterns define which edges of which patterns need to be sewn together; for example, the side seam of the front piece needs to be sewn to the side seam of the back piece.
[0023] Based on the pattern of garment pieces, the pieces are virtually assembled according to their adjacency relationships, thereby constructing the garment piece topology structure corresponding to the user. Through the garment piece topology structure, the structural composition of the entire garment can be understood, that is, what pieces are, what each piece is, and how they are connected. This provides a structural framework for the next step of generating the specific vector contour curve of each piece.
[0024] S102: Obtain the user's clothing customization requirements, and generate the corresponding basic clothing pattern based on the clothing pattern topology and clothing customization requirements.
[0025] After determining the topology of the garment pieces for the user, it's necessary to further combine the user's garment customization needs to generate a specific basic garment pattern. Garment customization needs are the user's personalized requirements for clothing, including at least the fabric, wearing allowance preferences, and basic garment allowance. Wearing allowance preferences reflect the user's personal preference for the tightness of the garment, typically categorized as fitted, tailored, or loose, determining the extra space required beyond the basic body measurements. Basic garment allowance is a pre-set standard allowance value based on the garment type, ensuring basic freedom of movement and wearing comfort. Combining the pattern topology with customization needs allows the generated garment pattern to conform to both the user's body shape and their personalized wearing preferences, ultimately creating the basic garment pattern the user requires.
[0026] In one embodiment, based on a preset pattern area mapping table, each pattern piece is divided into multiple geometric regions according to the type identifiers of each pattern piece in the garment pattern piece topology. The pattern area mapping table is a knowledge base that predefines which geometric regions each type of pattern piece should be divided into, and the approximate location range of each geometric region on the pattern piece. For example, for the front piece, the pattern area mapping table defines it as including multiple geometric regions such as the neckline region, shoulder region, chest region, waist region, hem region, and armhole region; for the sleeve piece, it defines it as including the sleeve body region, cuff region, etc. Based on the pattern piece's type identifier, the corresponding region division template is found in the pattern area mapping table. Then, based on the actual boundary position and size of the pattern piece, the regions in the region division template are mapped onto the specific pattern piece, completing the geometric region division. In this way, each pattern piece is decomposed into several local units with independent functions.
[0027] Because different parts of the human body have fundamentally different requirements for pattern design, areas such as the chest and shoulders need to closely conform to the curves of the body to ensure a good fit, while areas like the hem and sleeves depend primarily on the user's subjective preference for looseness. Therefore, after dividing the geometric regions, it is necessary to determine the region type for each geometric region based on its position in the pattern and the type of pattern it belongs to. Region types include a first region type and a second region type. The first region type refers to regions strongly correlated with changes in the curvature of the human body; that is, the shape of these regions needs to closely follow the undulations of the body surface to achieve a good fit. For example, the chest area of the front piece is located above the chest, and the chest is a part of the body with significant curvature changes; therefore, the chest area is a first region type. The second region type refers to regions weakly correlated with changes in the curvature of the human body; the shape of these regions depends primarily on the user's preference for looseness, rather than local undulations of the body surface. In this way, the functional attributes corresponding to each geometric region are distinguished, ensuring that the generated pattern not only structurally adapts to human physiological characteristics but also responds to the user's subjective wishes in terms of style, significantly improving the fit and wearing comfort of the garment.
[0028] After determining the region type for each geometric region, the offsets corresponding to the curve control points located on the boundaries of these geometric regions are further determined. Curve control points are points on the boundaries of geometric regions that can change the geometric shape of the fabric piece outline; specifically, they are the control vertices of parametric curves (such as Bézier curves or B-spline curves) used to define the fabric piece vector outline curve. Each fabric piece boundary is composed of several parametric curve segments, and the shape of each curve segment is determined by the position of its control points. By adjusting the coordinates of these control points, the direction and curvature of the curve near that point can be changed, thereby achieving local fine-tuning of the fabric piece outline. The curve control point offset refers to the amount of movement of these control points relative to a preset reference position, quantifying the magnitude of local adjustments to the fabric piece outline. The offset can be positive or negative; a positive value indicates outward movement, increasing the outline convexity or size, while a negative value indicates inward movement, decreasing the outline convexity or size.
[0029] Different strategies are used to determine the offset of curve control points for geometric regions of different types. Specifically, for geometric regions classified as the first type, the initial range of their curve control point offsets is determined by linear mapping based on the curvature values of the corresponding parts in the cross-sectional curvature parameters. This is because the shape of the first type of region needs to closely conform to the human body surface, and the cross-sectional curvature parameters precisely quantify the degree of convexity or concavity of the human body at that location. For example, for the chest region of the front piece, the curvature values of the corresponding parts of the chest need to be extracted from the cross-sectional curvature parameters, and then converted into the offset range of curve control points for that region through a preset linear mapping function. The linear mapping function is specifically expressed as follows: ,in, Here, k represents the curvature parameter of the corresponding section, and a and b are preset mapping coefficients. a controls the intensity of the curvature change's influence on the offset; its value can be set based on empirical values such as fabric thickness and elasticity, or fitted from a large number of samples through multiple regression analysis. b is the base offset, reflecting the baseline protrusion amount under the average curvature level. When curvature k=0, i.e., the surface is flat, b=0. If the user's chest curvature is large, indicating a more prominent chest, the mapped offset value will be biased towards positive values with a larger upper limit, allowing the curve control point in that area to move outwards significantly, thus creating a raised curved surface on the fabric piece to accommodate the chest. Conversely, if the chest curvature is small, the offset value will be biased towards zero or negative values, making the fabric piece flatter in that area. Through this linear mapping relationship, an automated mapping is achieved, directly converting local curvature characteristics of the human body into local shape adjustment amounts for the fabric piece.
[0030] For geometric regions classified as the second region type, the initial range of their curve control point offsets is determined by looking up a table based on the clothing allowance preferences in the garment customization requirements. This is because the shape of the second region type primarily depends on the user's subjective preference for looseness, rather than the local undulations of the human body surface. A pre-constructed allowance mapping table maps different clothing allowance preference levels to the basic offset ranges for different cut pieces. For example, for the hem area, the offset range for a fitted preference might be -2mm to +2mm, for a close-fitting preference it might be +2mm to +5mm, and for a looser preference it might be +5mm to +10mm. When it is necessary to determine the offset of a certain second region type geometric region, this embodiment of the application looks up the corresponding range in the allowance mapping table based on the user's selected clothing allowance preference, using this range as the initial range of the curve control point offset for that region. In this way, the user's subjective preferences can be quantified into specific geometric adjustment parameters.
[0031] After determining the offsets of the curve control points corresponding to each geometric region, these offsets are input as local shape parameters for adjusting the garment pattern into a preset geometry generator. The geometry generator is a differentiable parametric curve generation tool. Its core function is to receive the coordinates of the curve control points as input and output a continuous, smooth vector curve through a built-in curve generation algorithm. The curve generation algorithm can be a cubic B-spline fitting algorithm. After the offsets are input into the geometry generator, for each boundary on the pattern piece, the geometry generator predefines the sequence of curve control points corresponding to that boundary. The initial positions of these curve control points originate from the base template, i.e., the preset reference contour. The final curve control point coordinates are obtained by superimposing the reference coordinates corresponding to the curve control points with the offset of their respective geometric regions. This superposition process is represented as follows: ,in, This represents the offset of the geometric region where the curve control point i is located. The preset adjustment direction for the curve control point is set. After obtaining the coordinates of the curve control point, the geometry generator will use the built-in cubic B-spline fitting algorithm to fit the vector contour curve corresponding to each piece of fabric, and finally assemble the basic garment pattern corresponding to the user based on all the generated vector fabric contours.
[0032] In one embodiment, after obtaining the vector outlines of each piece of fabric using a geometry generator, these initially generated outlines need further verification and optimization to ensure that they not only meet the user's body shape characteristics and customization needs at the parameter level, but also remain consistent with the user's actual body image at the visual level. To this end, this application implements a self-supervised optimization mechanism through reprojection. By performing virtual stitching, reprojection, difference calculation, and parameter optimization on the initially generated vector outlines, a more precise and fitting basic garment pattern is ultimately obtained.
[0033] Specifically, after obtaining the vector outlines of each garment piece, these two-dimensional vector outlines are first virtually stitched together according to the previously determined garment pattern topology to generate a three-dimensional virtual garment model. Virtual stitching refers to the process of piecing together the corresponding boundaries of each garment piece in virtual space according to the stitching relationship diagram in the garment pattern topology. After generating the three-dimensional virtual garment model, it is compared with the user's initially captured full-body image to evaluate whether the currently generated garment pattern visually matches the user's actual body shape. To achieve this comparison, this embodiment pre-constructs a virtual camera model, which simulates the internal and external parameters of the camera used when capturing the user's full-body image, including the camera's position, orientation, focal length, and viewing angle. Through the virtual camera model, the three-dimensional virtual garment model is reprojected onto a two-dimensional plane under multiple viewing angles to obtain a reprojected image from the same viewing angle as the original full-body image. The reprojected image shows the visual effect that should appear when the user wears the garment under the currently generated garment pattern.
[0034] After obtaining reprojected images from multiple viewpoints, the difference between the reprojected images and the original full-body images from the corresponding viewpoints is calculated. The difference reflects the visual deviation between the currently generated clothing pattern and the user's actual body shape; the larger the difference, the less well-fitting the pattern; the smaller the difference, the better the pattern. To quantify this difference, this embodiment calculates it from two dimensions: contour difference value and key point difference value.
[0035] Contour difference values are used to assess the degree of matching between the outer contour of clothing in the reprojected image and the outer contour of the human body in the original full-body image. This contour difference can be calculated using bidirectional Hausdorff distance. Hausdorff distance is a metric used to measure the similarity between two sets of points; it measures the maximum distance from a point in one set to the nearest point in the other set. Bidirectional Hausdorff distance combines distances in both directions, providing a more comprehensive reflection of the fit between the two contours. Specifically, the outer contour point set of clothing is first extracted from the reprojected image, and the outer contour point set of the human body is extracted from the original full-body image. Then, the bidirectional Hausdorff distance between these two point sets is calculated. The smaller the distance value, the better the clothing contour matches the human body contour; the larger the distance value, the more significant the deviation, such as clothing that is too tight causing the contour to shrink inward, or clothing that is too loose causing the contour to expand outward.
[0036] Keypoint difference values are used to evaluate the alignment between key feature points on clothing in the reprojected image and key points on the human body in the original full-body image. Keypoints here refer to predefined key nodes of the human skeleton, such as shoulder points, elbow points, wrist points, waist points, and knee points. These keypoints are determined during the construction of the 3D virtual model and have a mapping relationship with specific positions on the clothing pattern. Euclidean distance is used to calculate the difference between these corresponding keypoints, that is, to calculate the straight-line distance between keypoints on the clothing in the reprojected image and keypoints on the human body in the original full-body image. For example, for the shoulder point, the distance between the shoulder position of the clothing in the reprojected image and the shoulder position of the human body in the original image is compared. If the distance is too large, it indicates that the shoulder line position of the clothing is not designed properly and may need adjustment. By combining the Euclidean distances of multiple keypoints, the alignment accuracy of the clothing at key areas can be evaluated.
[0037] After calculating the contour difference and keypoint difference values from various viewpoints, these values are integrated to construct a reprojection loss function. The reprojection loss function is a comprehensive evaluation metric that quantifies the overall visual deviation between the generated clothing pattern and the user's actual body shape. A larger reprojection loss function value indicates that the pattern needs optimization; a smaller value indicates that the pattern is closer to the ideal state. The reprojection loss function is expressed as: Where V represents the number of viewpoints. and Let represent the outer contour points of the clothing in the reprojected image at the v-th viewpoint and the outer contour points of the human body in the original full-body image, respectively. and These represent the contour difference value and the key point difference value, respectively. and These are the preset weighting coefficients.
[0038] Based on the aforementioned reprojection loss function, the previously determined curve control point offsets are optimized. The optimization process employs a backpropagation algorithm, calculating the gradient of the reprojection loss function with respect to each parameter, and then adjusting the parameters in the opposite direction of the gradient to gradually reduce the value of the reprojection loss function. Specifically, the reprojection loss function is used as the objective function, and the curve control point offsets in each geometric region are used as optimization variables. The partial derivative of the reprojection loss function with respect to each offset, i.e., the gradient, is calculated. The gradient indicates the direction of adjustment for the current offset. If the gradient of an offset is positive, it means that increasing the offset will increase the reprojection loss function, therefore the offset needs to be decreased; conversely, if the gradient is negative, the offset needs to be increased. By updating each offset using a preset learning rate, a set of optimized offsets is obtained.
[0039] After one round of backpropagation optimization, the optimized offsets are re-input into the geometry generator to regenerate the vector outlines of each pattern piece. Then, virtual stitching, reprojection, loss calculation, and parameter optimization are performed again. This process can be iterated multiple times until the reprojection loss function converges to a small value or reaches the preset number of iterations. Finally, when the optimization process ends, the vector outlines generated based on the optimized offsets are assembled to form the optimized basic garment pattern.
[0040] S103: Construct a virtual 3D model corresponding to the user based on body shape characteristics.
[0041] The above process generates a basic clothing pattern for the user. However, this basic pattern is based solely on the user's static body measurements and customization needs, without considering dynamic changes during actual wear. To ensure the generated clothing pattern maintains a good fit and comfort during user activity, a corresponding virtual 3D model needs to be constructed. It's important to note that this virtual 3D model is different from the previously mentioned 3D virtual clothing model. The virtual 3D model is a digital reconstruction of the user's body shape, while the 3D virtual clothing model is a digital model of clothing generated based on the clothing pattern. Specifically, based on extracted user body features, a virtual 3D model is constructed using 3D modeling technology. First, the key point coordinates and contour information extracted from the 2D image are converted into coordinate data in 3D space, and a preliminary 3D point cloud model is generated using a point cloud reconstruction algorithm. Then, this point cloud model is meshed to generate a continuous 3D surface model, and the model surface is smoothed and refined to more closely resemble the shape of a real human body. This virtual 3D model will serve as the basis for subsequent simulations of clothing wearing effects in different postures.
[0042] S104: Load the basic clothing pattern into the virtual 3D model, and simulate and render the virtual clothing image of the user in different movement postures by adjusting the posture parameters corresponding to the preset key parts in the virtual 3D model.
[0043] After loading the basic clothing pattern into the virtual 3D model, to comprehensively evaluate the wearing effect of the clothing in dynamic states, it is necessary to simulate the user's wearing situation under different movement postures. First, several key parts are preset in the virtual 3D model. These key parts typically include the neck, shoulders, elbows, waist, hips, knees, and ankles. These parts undergo significant deformation during movement, directly affecting the fit and comfort of the clothing. Each key part corresponds to specific posture parameters, such as the bending angle and rotation angle of the joints. By adjusting these posture parameters, the virtual 3D model can be driven to perform various common movement postures, such as standing, walking, sitting, bending over, and raising arms. During the adjustment of posture parameters, the dynamic interaction between the clothing pattern and the virtual 3D model is calculated in real time, including physical changes such as the stretching, wrinkling, and drooping of the clothing fabric. The wearing state of the virtual 3D model under different movement postures is simulated and rendered to generate realistic virtual clothing images. Virtual clothing images can clearly show the changes in the silhouette of clothing under different movements, the dynamic performance of the fabric, and the degree of fit with different parts of the body, providing an intuitive visual basis for subsequent pattern optimization.
[0044] S105: Evaluate the fit of the basic garment pattern based on the surface deformation parameters of the garment in the virtual dressing image.
[0045] After rendering virtual images of the user in different motion postures, it is necessary to quantitatively evaluate the fit of the basic clothing pattern to determine whether it meets the user's wearing needs during dynamic activities. The specific evaluation process mainly relies on the clothing surface deformation parameters extracted from the virtual clothing images.
[0046] In one embodiment, the deformation parameters of the garment surface include at least one or more of the following: deformation area ratio and deformation degree. The deformation area ratio refers to the ratio of the area of the garment surface where significant deformation (such as wrinkles, stretching, or loosening) occurs to the total surface area of the garment. A larger ratio indicates a poorer fit of the garment in that posture. The deformation degree is measured by calculating indicators such as the displacement and curvature change of each pixel within the deformation area. A larger displacement and more drastic curvature change indicate a higher degree of deformation and a more prominent local fit problem in the garment.
[0047] Specifically, the generated virtual clothing image is converted to grayscale. The purpose of grayscale conversion is to simplify the image information, fusing the RGB channels of a color image into a single brightness information, thereby highlighting the texture and contour features of the image and facilitating subsequent image analysis and processing. After obtaining the grayscale image, it needs to be decomposed into multiple local clothing regions based on the mapping relationship between the user's key human body points and the basic clothing pattern. Key human body points refer to predefined key nodes of the human skeleton, such as shoulder points, elbow points, wrist points, hip points, and knee points, which have been determined during the construction of the virtual 3D model. When the basic clothing pattern is simulated to fit the virtual 3D model, there is a corresponding spatial mapping relationship between various parts of the pattern and the key human body points. Based on this mapping relationship, the clothing areas corresponding to different human body parts in the grayscale image can be divided into multiple independent local clothing regions, such as shoulder areas, chest areas, waist areas, hip areas, and arm areas. Since the fit requirements of clothing often differ in different areas—for example, the shoulders require freedom of movement but should not be too loose, while the waist may require a fitted look—by conducting independent assessments of each area, the specific location of fit problems can be identified more precisely.
[0048] After dividing the clothing into localized areas, a quantitative analysis of the deformation in each area is required. First, the grayscale image is converted to a binary image based on a preset grayscale threshold. The grayscale threshold can be adjusted according to the specific application scenario, typically selecting a threshold that effectively distinguishes between normally fitting areas and deformed areas. In the binary image, pixels are divided into two categories: pixels with grayscale values above the threshold, representing areas where the clothing surface is relatively flat and well-fitted; and pixels with grayscale values below the threshold, representing areas of surface deformation caused by wrinkles, stretching, or relaxation. By analyzing the binary image, the surface deformation areas in each localized clothing area can be identified, i.e., connected regions composed of deformed pixels. Then, the ratio of the area of the surface deformation area to the total area of that localized area is calculated, yielding the deformation area ratio for that area. The deformation area ratio reflects the extent of significant deformation in that localized area; a larger ratio indicates a more prevalent fit problem and poorer fit in that area.
[0049] Besides the area of deformation, the degree of deformation is also an important indicator for evaluating fit. Therefore, it is necessary to scan the grayscale image and extract the image contour of each local clothing area. The image contour refers to the set of pixels in the grayscale image where the grayscale value changes drastically, usually corresponding to the creases or recesses on the clothing surface. After extracting the image contour, the degree of deformation corresponding to the local clothing area is calculated based on the grayscale gradient of the image contour in a preset direction. The preset direction can be set according to the type of clothing and the body's posture; for example, for the arm area, the focus might be on the grayscale change along the arm axis; for the chest area, the focus might be on the grayscale change in the vertical direction.
[0050] Specifically, when calculating the degree of deformation, the grayscale value sequence on the image contour is analyzed to identify grayscale extreme points. These extreme points typically correspond to raised areas on the clothing surface, while the minimum points correspond to recessed areas. By analyzing the grayscale gradient between these extreme points, the severity of deformation can be quantified. For example, the greater the grayscale difference between adjacent extreme points, the more pronounced the undulations on the clothing surface, and the higher the degree of deformation. Conversely, the smaller the pixel distance between adjacent extreme points, the denser the deformed area, also indicating a higher degree of deformation. By combining this information, a deformation degree parameter for a local clothing area can be obtained. This parameter, in numerical form, reflects the morphological characteristics of the clothing surface in that area, such as the density and amplitude of the deformed area.
[0051] After obtaining the deformation area ratio and deformation degree of each local clothing area, these two parameters are fused to determine the local fit of that area. The fusion method can employ a weighted summation, with pre-set weight coefficients for the deformation area ratio and deformation degree based on the importance of different local areas. For example, for frequently moving areas like the elbows and shoulders, the weight of the deformation degree can be appropriately increased to emphasize its impact on fit; while for the relatively static back area, the weight of the deformation area ratio can be set higher to focus on the overall fit range. A larger deformation area ratio and a higher deformation degree result in a lower local fit score, indicating a poorer fit in that area.
[0052] Because different parts of the body are sensitive to clothing fit at varying degrees, it is necessary to weight and sum the fit of each localized area based on its corresponding weight, thus obtaining the overall fit of the basic garment pattern. The weights of each area can be pre-configured based on ergonomics and clothing design experience. For example, key areas of movement such as the shoulders and chest may be given higher weights, as the fit in these areas directly affects comfort and freedom of movement; while less important areas may be given lower weights. Through weighted summation, a comprehensive fit result is obtained, reflecting the overall fit of the garment. This fit will serve as a quantitative basis for subsequent judgments regarding whether adjustments to the pattern are necessary.
[0053] In one embodiment, to perform a more refined quantitative analysis of the deformation degree of a local clothing area, it is necessary to further extract information reflecting changes in the surface morphology of the clothing from the extracted image contour. After extracting the image contour of the local clothing area, the grayscale value sequence of the image contour in a preset direction is first determined. The choice of preset direction depends on the specific clothing part and the characteristics of the movement posture. For example, for the sleeve area, the arm axis can be selected as the preset direction; for the torso area, a vertical or horizontal direction can be selected. Pixels on the image contour are sampled along this direction to obtain the grayscale value of each pixel, thus forming a grayscale value sequence arranged according to spatial position. This grayscale value sequence is actually a one-dimensional projection of the undulation changes of the clothing surface in this direction, which contains key morphological information such as the peaks and troughs of the deformed area.
[0054] After obtaining the grayscale value sequence, extreme point detection is required to identify the grayscale maxima and minima in the sequence. Grayscale maxima correspond to brighter areas in the image, typically representing protruding parts of the deformed area in the case of clothing surface deformation; while grayscale minima correspond to darker areas, typically representing concave parts of the deformed area. By identifying these extreme points, the continuous grayscale variation curve can be discretized into a series of feature points with clear physical meaning, laying the foundation for subsequent deformation analysis.
[0055] After identifying the grayscale extreme points, this embodiment quantifies the degree of deformation from two different dimensions: depth deformation and spacing deformation. Depth deformation characterizes the severity of the undulations in the deformed region, while spacing deformation characterizes the density of the deformed region distribution.
[0056] Specifically, for each identified grayscale maxima, it is used as a reference point for the protrusion of the deformation region, and the relationship between it and the adjacent grayscale minima on its left and right is analyzed. Each maxima typically corresponds to a protrusion, while the minima on its left and right correspond to the two concave regions on the left and right sides of that protrusion. The grayscale gradient between the maxima and its adjacent minima is calculated, which is the difference in grayscale values divided by the pixel distance. The resulting gradient value reflects the rate of grayscale change from the concave region to the protruding region. The larger the grayscale gradient, the more drastic the grayscale value change within a short distance, indicating a steeper undulation and greater depth of the deformation region. By analyzing the grayscale gradient between each maxima and its adjacent minima, a set of gradient values reflecting the depth of surface deformation can be obtained. Simultaneously, for each grayscale maxima, the pixel distance between it and its adjacent grayscale maxima on its left and right sides also needs to be analyzed. The distance between adjacent maxima reflects the interval between adjacent deformation region protrusions; the smaller the distance, the denser the deformation region; the larger the distance, the sparser the deformation region. By analyzing the pixel distance between each maxima and its adjacent maxima, a set of spacing values reflecting the density of local deformation regions can be obtained.
[0057] To integrate the above local analysis results into a comprehensive evaluation of the entire local clothing area, each grayscale maximum point and its matching left and right adjacent grayscale maximum points are treated as an independent grayscale calculation unit. Each grayscale calculation unit corresponds to a local deformation region unit on the clothing surface, containing information about the protrusion positions, the concave positions on both sides, and the positions of adjacent protrusions within that deformation region. After completing the division of all grayscale calculation units, it is necessary to traverse all calculation units and perform statistical analysis on the grayscale gradient and pixel distance contained therein. Specifically, for the calculation of the depth of deformation, the grayscale gradient values involved in all grayscale calculation units are collected, and the ratio of the standard deviation to the mean of these gradient values is calculated. The standard deviation reflects the fluctuation of the deformation depth, while the mean reflects the average level of the deformation depth. The ratio of the two is actually a normalized dispersion index, i.e., the coefficient of variation. The larger this ratio, the more severe the unevenness of the deformation area within the clothing area, the more non-uniform the deformation state, and the higher the overall degree of deformation; conversely, the smaller the ratio, the more uniform the depth of the deformation area and the more stable the deformation state.
[0058] For calculating the degree of spacing deformation, a similar method is used: the pixel distances between adjacent grayscale maxima in all grayscale calculation units are collected, and the ratio of the standard deviation to the mean of these distance values is calculated. This ratio reflects the uniformity of the deformation region distribution. The larger the ratio, the more obvious the unevenness of the deformation region and the more irregular the deformation state; the smaller the ratio, the more uniform the deformation region distribution and the more regular the deformation state.
[0059] S106: If the fit is less than the preset fit threshold, adjust the basic garment pattern according to the garment surface deformation parameters until the adjusted basic garment pattern fits the user.
[0060] After obtaining the overall fit score of the basic garment pattern through the above steps, this score needs to be compared with a preset fit threshold to determine whether the current pattern meets the user's wearing needs. The preset fit threshold is a pre-defined quality standard that can be configured based on garment type, user group characteristics, or industry experience. For example, a higher threshold can be set for formal wear to ensure a good fit, while a more relaxed threshold can be used for casual wear to balance comfort. If the calculated fit score is greater than or equal to this threshold, it indicates that the generated basic garment pattern can adapt well to the user's body shape characteristics in both static and dynamic states and can be directly used as the final pattern for subsequent garment production. Conversely, if the fit score is less than the preset fit threshold, it indicates that the current pattern has local or overall fit problems and needs optimization and adjustment.
[0061] In one embodiment, when it is determined that adjustments to the basic garment pattern are needed, the correction is not applied indiscriminately to all areas. Instead, the pattern is precisely adjusted based on deformation characteristic patterns. Specifically, the first step is to filter out areas with significant fit problems from multiple localized clothing areas; that is, to identify designated localized clothing areas where the fit is less than a preset value. The preset value is a pass / fail standard for a localized area, which can be differentiated according to the importance of that area in the overall garment. For example, a higher standard can be set for key moving areas such as the shoulders and chest, while a more lenient standard can be set for less important areas. Through this screening step, the focus of adjustment can be concentrated on the areas with real problems, avoiding unnecessary modifications to areas that already meet the requirements, thereby improving the efficiency and accuracy of the adjustment.
[0062] After identifying the specific local clothing areas requiring adjustment, a thorough analysis of the deformation morphology of these areas is necessary to infer the type of pattern defect causing the fit problem. To this end, the coordinate information of the grayscale extreme points in this area is obtained. In the preceding steps, grayscale image analysis has already identified the grayscale maximum and minimum points on the image contour. These extreme points correspond to the concave and convex areas of the deformed region on the garment surface, respectively, and their spatial distribution directly reflects the geometric characteristics of the deformation. By performing cluster analysis and pattern recognition on the coordinates of these extreme points, the geometric distribution pattern corresponding to the specific local clothing area can be determined.
[0063] In the embodiments of this application, the geometric distribution patterns include at least three typical types: radial pattern, parallel stripe pattern, and sparse linear pattern. The radial pattern is characterized by extreme points radiating outwards from a central point, resembling a star-shaped or radial deformation. This pattern typically appears in areas with significant changes in the curvature of the garment surface, such as the scapular prominence or around the high point of the chest, often indicating insufficient three-dimensional surface matching of the pattern in that area. The parallel stripe pattern is characterized by extreme points distributed in parallel stripes along a specific direction, forming parallel stripes similar to Venetian blinds. This pattern typically appears in tubular parts such as sleeves and trouser legs, often indicating insufficient circumference allowance or proportional imbalance in that direction. The sparse linear pattern is characterized by sparsely distributed extreme points extending irregularly in a linear fashion, usually corresponding to slight localized looseness or sagging, possibly indicating insufficient support in specific areas of the pattern or natural deformation under gravity.
[0064] After identifying the geometric distribution pattern, the type of pattern adjustment corresponding to a specific garment area is determined based on the correspondence between the pattern and the pattern defect. Different geometric distribution patterns correspond to different pattern correction strategies. For example, for a radial pattern, it is usually necessary to add three-dimensional space to the corresponding protruding parts, which may be achieved by increasing the curvature of the surface in that area or increasing the depth of the darts; for a parallel strip pattern, it is usually necessary to adjust the circumference of that direction or change the position of the pattern's dividing lines to release tightness or tighten looseness; for a sparse linear pattern, it may be necessary to fine-tune the curvature of the local contour lines or add support structures. This method of determining the adjustment type based on deformation patterns provides a clear basis and target for pattern correction, avoiding secondary problems that may be caused by blind adjustments.
[0065] While determining the type of adjustment, it is also necessary to determine the specific correction amount based on the degree of deformation in the area. The degree of deformation has already been quantified in the preceding steps into indicators such as depth deformation and spacing deformation, which reflect the severity of the problem. The correction amount can be determined using a mapping relationship, establishing a linear or non-linear mapping between the degree of deformation and the correction amount; the greater the degree of deformation, the greater the correction amount. Specifically, for areas with high depth deformation, more allowance may be needed to alleviate deep wrinkles; for areas with abnormal spacing deformation, a significant adjustment to the proportional relationship may be necessary. By quantifying the degree of deformation into a correction amount, precise control of the adjustment range is achieved, ensuring that pattern correction effectively solves the problem without over-adjusting and causing new mismatches.
[0066] Based on the determined pattern adjustment type and correction amount, specific modifications are made to the basic garment pattern. This operation can be performed automatically in a computer-aided design system. For example, for areas requiring increased allowance, the specified correction amount is extended outward at the corresponding position on the pattern drawing; for areas requiring curvature adjustment, the position of the curve control points is modified to change the curve shape. The adjusted basic garment pattern will then serve as input for a new iteration, reloaded into a virtual 3D model for simulation and evaluation until a satisfactory fit is achieved.
[0067] The above are embodiments of the methods proposed in this application. Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0068] Figure 2 This is a schematic diagram of a garment pattern generation device provided in an embodiment of this application. Figure 2 As shown, it includes: At least one processor; and, At least one processor-communication-connected memory; wherein, The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform a garment pattern generation method as described above.
[0069] This application provides a non-volatile computer storage medium storing computer-executable instructions, which are configured as follows: A method for generating a garment pattern, as described in any of the preceding items.
[0070] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.
[0071] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0072] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. A garment pattern generation method, characterized by, The method includes: Collect full-body images of the user from multiple perspectives, analyze the full-body images to extract the user's body shape features, and determine the corresponding garment pattern topology based on the body shape features; Obtain the user's clothing customization requirements, and generate a basic clothing pattern corresponding to the user based on the clothing pattern topology and the clothing customization requirements; Based on the described body shape characteristics, a virtual 3D model corresponding to the user is constructed; The basic clothing pattern is loaded into the virtual 3D model, and the posture parameters corresponding to the preset key parts in the virtual 3D model are adjusted to simulate and render virtual clothing images of the user in different movement postures. The fit of the basic garment pattern is evaluated based on the surface deformation parameters of the garment in the virtual dressing image. If the fit is less than a preset fit threshold, the basic garment pattern is adjusted according to the garment surface deformation parameters until the adjusted basic garment pattern fits the user.
2. The method for generating a garment pattern according to claim 1, characterized in that, Based on the described body shape characteristics, the corresponding garment pattern topology is determined, specifically including: The body shape features include linear dimension parameters, cross-sectional curvature parameters, and key point angle parameters; The user-customized basic clothing category, the linear size parameters, and the key point angle parameters are input into a preset global topology classifier to predict the basic structure category corresponding to the clothing that the user needs to customize. Based on the basic structure category and the cross-sectional curvature parameters, the garment's piece composition pattern is output through a preset local topology parser; wherein, the piece composition pattern includes the number of pieces, the type identifier of each piece, and the adjacency relationship between each piece; Based on the pattern of the cut pieces, the cut pieces are assembled to obtain the corresponding garment cut piece topology; wherein, the garment cut piece topology is represented as a stitching relationship diagram with the cut pieces as nodes and the stitching relationship between the cut pieces as edges.
3. The method for generating a garment pattern according to claim 2, characterized in that, Based on the garment pattern topology and the garment customization requirements, a basic garment pattern corresponding to the user is generated, specifically including: Based on a preset pattern area mapping table, each pattern piece is divided into multiple geometric regions according to the type identifier of each pattern piece in the garment pattern topology. For each geometric region, the region type corresponding to the geometric region is determined according to the position of the geometric region in the pattern piece and the pattern piece type to which it belongs; wherein, the region type includes a first region type and a second region type, the pattern piece outline of the first region type is strongly correlated with the change of human body curvature, and the pattern piece outline of the second region type is weakly correlated with the change of human body curvature. Based on the region type, determine the offset corresponding to the curve control point located on the boundary of the geometric region; wherein, the curve control point refers to the point on the boundary of the geometric region that can change the geometric shape of the pattern piece outline. The offset is input into a preset geometry generator to generate vector pattern outlines for each pattern piece according to the geometry generator. Based on the vector pattern outline, a basic clothing pattern corresponding to the user is generated.
4. The method for generating a garment pattern according to claim 3, characterized in that, Based on the vector pattern outline, a basic garment pattern corresponding to the user is generated, specifically including: Based on the topological structure of the garment pieces, the vector garment outlines are virtually sewn together to generate a three-dimensional virtual garment model. The three-dimensional virtual clothing model is reprojected onto the two-dimensional plane containing the full-body images from multiple viewpoints to obtain the reprojected images from multiple viewpoints. The contour difference value and key point difference value between the reprojected image and the corresponding full-body image at each viewpoint are calculated to construct the reprojection loss function; wherein, the contour difference value is calculated using bidirectional Hausdorff distance, and the key point difference value is calculated using Euclidean distance between corresponding key points; Based on the reprojection loss function, the offset is optimized by backpropagation, and the basic garment pattern is updated according to the optimized offset to obtain the optimized basic garment pattern.
5. The method for generating a garment pattern according to claim 1, characterized in that, The fit of the basic garment pattern is evaluated based on the surface deformation parameters of the garment in the virtual dressing image, specifically including: The surface deformation parameters of the garment include at least one or more of the following: deformation area ratio and deformation degree; The virtual clothing image is processed to obtain a corresponding grayscale image. Based on the mapping relationship between the user's human body key points and the basic clothing pattern, the grayscale image is decomposed into multiple local clothing areas. According to a preset grayscale threshold, the grayscale image is converted into a binary image, and based on the binary image, the deformation area ratio corresponding to the local clothing area is calculated according to the ratio of the surface deformation area in the local clothing area to the area of the local clothing area. The grayscale image is scanned to extract the image contour of the local clothing area. Based on the grayscale change gradient of the image contour in a preset direction, the degree of deformation corresponding to the local clothing area is calculated. Based on the degree of deformation and the ratio of the deformation area, the local fit degree corresponding to the local clothing area is determined; Based on the area weight corresponding to each local clothing area, the local fit is weighted and summed to obtain the fit of the basic clothing pattern.
6. The method for generating a garment pattern according to claim 5, characterized in that, Based on the grayscale gradient of the image contour in a preset direction, the degree of deformation corresponding to the local clothing area is calculated, specifically including: Determine the grayscale value sequence of the image contour in a preset direction; Based on the gray value sequence, the gray value extreme points of the image contour in a preset direction are determined; wherein, the gray value extreme points include gray value maxima representing surface protrusions and gray value minima representing surface depressions. For each grayscale maximum point, the depth deformation degree corresponding to the local clothing area is determined based on the grayscale change gradient between the grayscale maximum point and its adjacent grayscale minimum points on the left and right. The spacing deformation degree corresponding to the local clothing area is determined based on the pixel distance between the grayscale maximum point and its adjacent grayscale maximum points on the left and right.
7. The method for generating a garment pattern according to claim 6, characterized in that, Based on the grayscale gradient between the grayscale maxima and the adjacent grayscale minima, the depth deformation degree of the local clothing area is determined; and based on the pixel distance between the grayscale maxima and the adjacent grayscale maxima, the spacing deformation degree of the local clothing area is determined, specifically including: The gray-scale maximum point and its matching adjacent gray-scale extreme points are used as a gray-scale calculation unit; Traverse all grayscale extreme points, and determine the depth deformation degree corresponding to the local clothing area based on the ratio between the standard deviation and the mean of the grayscale change gradient corresponding to each grayscale calculation unit. Also, determine the spacing deformation degree corresponding to the local clothing area based on the ratio between the standard deviation and the mean of the pixel distance corresponding to each grayscale calculation unit.
8. A method for generating a garment pattern according to claim 6, characterized in that, Based on the aforementioned garment surface deformation parameters, the basic garment pattern is adjusted, specifically including: Identify a designated local clothing area in the local clothing area where the local fit is less than a preset value; Obtain the coordinates of the grayscale extreme points in the specified local clothing area, and determine the geometric distribution pattern corresponding to the specified local clothing area based on the distribution characteristics of the coordinates; wherein, the geometric distribution pattern includes a radial pattern, a parallel strip pattern, and a sparse line pattern; Based on the geometric distribution pattern, determine the pattern adjustment type corresponding to the designated clothing area, and based on the degree of deformation, determine the correction amount corresponding to the designated clothing area. The basic garment pattern is adjusted based on the pattern adjustment type and the correction amount.
9. A garment pattern generating device, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a garment pattern generation method as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: A method for generating a garment pattern as described in any one of claims 1-8.