Three-dimensional costume pattern generation method and device, equipment and storage medium
By identifying the clothing model and identifying the multi-level structure and fabric materials in the clothing image, a three-dimensional clothing style that is close to the target clothing is solved, and the problem of poor reality in the existing technology is achieved efficient three-dimensional clothing style generation and adaptation is achieved. .
Patent Information
- Application Number
- CN202311775231.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-01-10
AI Technical Summary
The prior art is difficult to generate a three-dimensional clothing style that matches multi-level structural clothing, resulting in a poor sense of reality.
By obtaining the target clothing image, inputting a pre-trained clothing recognition model, identifying each level of structure and fabric materials, generating clothing data, and generating a three-dimensional clothing style close to the target clothing, including stitching and adapting standard or non-standard body shapes, based on this, it can be generated. .
It realizes a three-dimensional clothing style that is close to the target clothing in all aspects, improving the sense of reality and adaptability and reducing manual intervention.
Smart Images

Figure CN119295643A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a three-dimensional clothing pattern generation method, device, equipment and storage medium. Background Art
[0002] In the related art, a three-dimensional clothing pattern corresponding to the target clothing can be generated based on a two-dimensional clothing image containing the target clothing. However, since the clothing generally worn by the character is not a single structure, but often has a multi-level structure, the three-dimensional clothing pattern generated by the related art is single-layer and integrated, and the degree of conformity with the actual clothing is low. For example, a skirt includes the outermost layer of fabric and three layers of lining. The outermost layer of fabric and the three layers of lining should be separable from each other, but the corresponding three-dimensional clothing pattern generated by the related art is integrated, that is, the outermost layer of fabric and the three layers of lining are integrated to form a skirt with only one layer. It can be seen that the three-dimensional clothing pattern generated by the related art has a poor sense of reality. Summary of the invention
[0003] The embodiments of the present invention provide a three-dimensional clothing pattern generation method, device, equipment and storage medium, which are used to automatically output a three-dimensional clothing pattern that is close to a target clothing in all aspects.
[0004] In a first aspect, an embodiment of the present invention provides a method for generating a three-dimensional clothing pattern, the method comprising:
[0005] Acquire a target clothing image, wherein the target clothing image includes target clothing having a multi-level structure;
[0006] Inputting the target clothing image into a pre-trained clothing recognition model to obtain at least one clothing pattern corresponding to each hierarchical structure of the target clothing;
[0007] Identifying the fabric materials used in each layer structure of the target clothing;
[0008] Generate clothing data based on fabric materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern;
[0009] Based on the clothing data, a three-dimensional clothing pattern corresponding to the target clothing is generated.
[0010] Optionally, the identifying the fabric material used by each hierarchical structure of the target clothing includes:
[0011] Inputting the target clothing image into the clothing recognition model to obtain a target clothing classification corresponding to the target clothing;
[0012] Based on the target clothing classification, the correspondence between the preset clothing classification and the hierarchical structure and the fabric material is queried to obtain the fabric material used by each hierarchical structure of the target clothing.
[0013] Optionally, generating clothing data based on cloth materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern includes:
[0014] For each hierarchical structure of the target clothing, performing stitching processing on at least one clothing pattern corresponding to the hierarchical structure;
[0015] Clothing data is generated based on the clothing patterns and fabric materials after stitching corresponding to each hierarchical structure.
[0016] Optionally, the method further comprises:
[0017] Displaying the three-dimensional clothing pattern to a user;
[0018] In response to the clothing adjustment instruction triggered by the user, the three-dimensional clothing pattern is adjusted.
[0019] Optionally, the three-dimensional clothing pattern is adapted to a character with a preset standard body shape;
[0020] The method further comprises:
[0021] Get the character image corresponding to the target character;
[0022] Inputting the character image into a pre-trained body shape recognition model to obtain a target body shape corresponding to the target character;
[0023] Based on the target body shape, the three-dimensional clothing pattern is adjusted so that the adjusted three-dimensional clothing pattern is suitable for the target character.
[0024] Optionally, the method further comprises:
[0025] Acquire a first training data set, wherein the first training data set includes sample clothing images of a plurality of different characters wearing different sample clothing, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing;
[0026] The clothing recognition model to be trained is trained based on the first training data set to obtain the pre-trained clothing recognition model.
[0027] Optionally, the method further comprises:
[0028] Acquire a second training data set, wherein the second training data set includes sample clothing images of different sample clothing in at least one sewing teaching material and / or at least one pattern description teaching material, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing;
[0029] The clothing recognition model to be trained is trained based on the second training data set to obtain the pre-trained clothing recognition model.
[0030] Optionally, the method further comprises:
[0031] Receive target clothing demand text input by the user;
[0032] The step of inputting the target clothing image into a pre-trained clothing recognition model comprises:
[0033] The target clothing requirement text and the target clothing image are input into a pre-trained clothing recognition model to obtain at least one clothing version that corresponds to each hierarchical structure of the target clothing and meets the requirements in the target clothing requirement text.
[0034] In a second aspect, an embodiment of the present invention provides a three-dimensional clothing pattern generation device, comprising:
[0035] An acquisition module, used for acquiring a target clothing image, wherein the target clothing image includes a target clothing having a multi-level structure;
[0036] An input module, used for inputting the target clothing image into a pre-trained clothing recognition model to obtain at least one clothing pattern corresponding to each hierarchical structure of the target clothing;
[0037] An identification module, used to identify the fabric material used in each layer structure of the target clothing;
[0038] A generation module is used to generate clothing data based on cloth materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern; based on the clothing data, generate a three-dimensional clothing pattern corresponding to the target clothing.
[0039] Optionally, the identification module is used to:
[0040] Inputting the target clothing image into the clothing recognition model to obtain a target clothing classification corresponding to the target clothing;
[0041] Based on the target clothing classification, the correspondence between the preset clothing classification and the hierarchical structure and the fabric material is queried to obtain the fabric material used by each hierarchical structure of the target clothing.
[0042] Optionally, the generating module is used to:
[0043] For each hierarchical structure of the target clothing, performing stitching processing on at least one clothing pattern corresponding to the hierarchical structure;
[0044] Clothing data is generated based on the clothing patterns and fabric materials after stitching corresponding to each hierarchical structure.
[0045] Optionally, the device further comprises an adjustment module, wherein the adjustment module is configured to:
[0046] Displaying the three-dimensional clothing pattern to a user;
[0047] In response to the clothing adjustment instruction triggered by the user, the three-dimensional clothing pattern is adjusted.
[0048] Optionally, the three-dimensional clothing pattern is adapted to a character with a preset standard body shape;
[0049] The adjustment module is further used for:
[0050] Get the character image corresponding to the target character;
[0051] Inputting the character image into a pre-trained body shape recognition model to obtain a target body shape corresponding to the target character;
[0052] Based on the target body shape, the three-dimensional clothing pattern is adjusted so that the adjusted three-dimensional clothing pattern is suitable for the target character.
[0053] Optionally, the device further comprises a training module, wherein the training module is used to:
[0054] Acquire a first training data set, wherein the first training data set includes sample clothing images of a plurality of different characters wearing different sample clothing, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing;
[0055] The clothing recognition model to be trained is trained based on the first training data set to obtain the pre-trained clothing recognition model.
[0056] Optionally, the training module is further used to:
[0057] Acquire a second training data set, wherein the second training data set includes sample clothing images of different sample clothing in at least one sewing teaching material and / or at least one pattern description teaching material, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing;
[0058] The clothing recognition model to be trained is trained based on the second training data set to obtain the pre-trained clothing recognition model.
[0059] Optionally, the input module is used to:
[0060] Receive target clothing demand text input by the user;
[0061] The target clothing requirement text and the target clothing image are input into a pre-trained clothing recognition model to obtain at least one clothing version that corresponds to each hierarchical structure of the target clothing and meets the requirements in the target clothing requirement text.
[0062] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor can at least implement the three-dimensional clothing pattern generation method in the first aspect.
[0063] In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the three-dimensional clothing pattern generation method in the first aspect.
[0064] By adopting the method provided by the present invention, it is not necessary for technicians to manually produce three-dimensional clothing patterns of the same style based on the target clothing image. It is only necessary to input the target clothing image into the trained clothing recognition model, and the clothing recognition model can automatically identify at least one clothing pattern contained in the target clothing. For the clothing recognition model provided by the present invention, it is not required that the target clothing has only a single-level structure, but can have a multi-level structure, which is in line with the structural production of most clothing on the market. When the target clothing image corresponding to the target clothing with a multi-level structure is input into the above-mentioned clothing recognition model, the clothing recognition model can not only identify at least one clothing pattern corresponding to the multiple hierarchical structures of the target clothing, but also automatically and reasonably supplement the parts that are blocked by the inner layer. The whole process does not require manual intervention, and can automatically output a three-dimensional clothing pattern that is close to the target clothing in all aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0066] Figure 1 A schematic diagram of a flow chart of a method for generating a three-dimensional clothing pattern provided by an embodiment of the present invention;
[0067] Figure 2 A schematic diagram of a model training process provided by an embodiment of the present invention;
[0068] Figure 3 A schematic diagram of a sample garment provided by an embodiment of the present invention;
[0069] Figure 4 A schematic diagram of another model training process provided by an embodiment of the present invention;
[0070] Figure 5 A schematic diagram of a cutting pattern description provided by an embodiment of the present invention;
[0071] Figure 6 A schematic diagram of the structure of a three-dimensional clothing pattern generation device provided by an embodiment of the present invention;
[0072] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0074] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0075] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0076] In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.
[0077] Figure 1The present invention provides a flowchart of a method for generating a three-dimensional clothing pattern, which can be applied to electronic devices. The electronic device can be, for example, a terminal, a server, or other devices. Figure 1 As shown, the method comprises the following steps:
[0078] 101. Acquire a target clothing image, wherein the target clothing image includes target clothing having a multi-level structure.
[0079] 102. Input the target clothing image into a pre-trained clothing recognition model to obtain at least one clothing pattern corresponding to each hierarchical structure of the target clothing.
[0080] 103. Identify the fabric materials used in each level structure of the target clothing.
[0081] 104. Generate clothing data based on cloth materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern.
[0082] 105. Generate a three-dimensional clothing pattern corresponding to the target clothing based on the clothing data.
[0083] In practical applications, a target clothing image can be received. It should be noted that the target clothing in the target clothing image can have a multi-level structure and may not be a single garment with a single-level structure. For example, a cake skirt commonly seen in daily life has more than three layers with an unfixed number of layers. Therefore, the cake skirt has a multi-level structure. It is not integrally formed, but there is a certain height difference between the hems of each layer. Except for the hem of the outermost layer, the hems of the inner layers are partially covered by the hems of the previous layers.
[0084] After acquiring the target clothing image, the target clothing image can be input into a pre-trained clothing recognition model, and the clothing recognition model can be used to recognize at least one clothing pattern contained in the target clothing. It is worth noting that, although for target clothing with a multi-level structure, its internal structure is often blocked by the external structure, the technical solution provided by the embodiment of the present invention can reasonably supplement the blocked part, and the target clothing can be split into at least one clothing pattern according to the target clothing image of the target clothing, rather than treating the target clothing as a whole clothing pattern.
[0085] For instance, still taking the cake skirt as an example, assuming that a target clothing image corresponding to a cake skirt with three overlapping layers is input into the clothing recognition model provided by an embodiment of the present invention, the three-layer cake skirt can be split into three clothing patterns through the clothing recognition model, and each clothing pattern corresponds to one overlapping layer. Moreover, for the obscured parts of the second layer and the innermost layer, the clothing recognition model can still be reasonably supplemented, so that the clothing pattern of the second layer and the innermost layer is a complete structure, that is, it can be sewn into a complete skirt, rather than just the part exposed to the outside.
[0086] It should be noted that the training process of the above-mentioned clothing recognition model in the embodiment of the present invention will be described in detail later and will not be elaborated here.
[0087] On the other hand, in addition to identifying at least one clothing pattern of the target clothing, the fabric material used in each hierarchical structure of the target clothing can also be identified. Still taking the cake skirt as an example, assuming that the cake skirt includes three layers, the outermost layer and the second layer are both made of embroidered mesh material, and the innermost layer is ordinary mesh, the fabric material used in each of the three layers of the cake skirt can be identified by the method provided in the embodiment of the present invention. In addition, it is worth noting that the method provided in the embodiment of the present invention can not only identify the fabrics used in each hierarchical structure of the target clothing, and refer to the fabrics used in the target clothing to create a similar or identical texture, but also identify the pattern style in the fabric, and add the same pattern style to the fabric material, so as to achieve an effect close to the real target clothing.
[0088] Optionally, the process of identifying the fabric material used in each hierarchical structure of the target clothing can be implemented as follows: inputting the target clothing image into a clothing recognition model to obtain a target clothing classification corresponding to the target clothing; based on the target clothing classification, querying the correspondence between the preset clothing classification and the hierarchical structure and the fabric material to obtain the fabric material used in each hierarchical structure of the target clothing.
[0089] In a possible implementation, the target clothing can be classified first. Among them, clothing categories can include, for example, suits, windbreakers, jackets, T-shirts, cheongsams, horse-faced skirts, evening gowns, etc. Of course, in addition to those listed here, more classifications can be set, and more detailed clothing classifications can be set. After determining the target clothing classification to which the target clothing belongs, the correspondence between the preset clothing classification and the hierarchical structure and the fabric material can be queried with the target clothing classification to obtain the fabric material used in each hierarchical structure of the target clothing. For example, it is currently determined that the target clothing classification is a cake skirt, and the fabric material of the cake skirt is generally a mesh fabric on the outer layer and an inner lining on the inner layer. By searching for "cake skirt" in the above correspondence, it can be determined that the outer layer of the cake skirt is a mesh fabric and the inner layer is an inner lining.
[0090] Next, clothing data may be generated based on the cloth materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern. In other words, at least one clothing pattern may be sewn to generate clothing data.
[0091] Optionally, based on the fabric materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern, the process of generating clothing data can be implemented as follows: for each hierarchical structure of the target clothing, stitching is performed on at least one clothing pattern corresponding to the hierarchical structure; based on the stitched clothing patterns and fabric materials corresponding to each hierarchical structure, clothing data is generated.
[0092] After obtaining the clothing data, a three-dimensional clothing pattern corresponding to the target clothing can be generated based on the clothing data. Specifically, the clothing data can be imported into clothing model making software, and a three-dimensional clothing pattern corresponding to the target clothing can be generated through the clothing model making software. The clothing model making software can be, for example, Marvelous Designer or other software.
[0093] By adopting the method provided by the embodiment of the present invention, it is not necessary for technicians to manually produce three-dimensional clothing patterns of the same style based on the target clothing image. It is only necessary to input the target clothing image into the trained clothing recognition model, and the clothing recognition model can automatically identify at least one clothing pattern contained in the target clothing. For the clothing recognition model provided by the embodiment of the present invention, it is not required that the target clothing has only a single-level structure, but can have a multi-level structure, which is in line with the structural production of most clothing on the market. When the target clothing image corresponding to the target clothing with a multi-level structure is input into the above-mentioned clothing recognition model, the clothing recognition model can not only identify at least one clothing pattern corresponding to the multiple hierarchical structures of the target clothing, but also automatically and reasonably supplement the parts that are blocked by the inner layer. The whole process does not require manual intervention, and can automatically output a three-dimensional clothing pattern that is close to the target clothing in all aspects.
[0094] In an optional embodiment, the method provided by the embodiment of the present invention may further include: displaying a three-dimensional clothing pattern to a user; and adjusting the three-dimensional clothing pattern in response to a clothing adjustment instruction triggered by the user.
[0095] In practical applications, after generating a three-dimensional clothing pattern, the generated three-dimensional clothing pattern can be displayed to the user, and the user can manually adjust the three-dimensional clothing pattern. The user can adjust the three-dimensional clothing pattern in the interface displaying the three-dimensional clothing pattern, and accordingly, the device can receive the clothing adjustment instruction. In response to the clothing adjustment instruction, the three-dimensional clothing pattern can be adjusted accordingly. In a possible implementation, the user can modify the three-dimensional clothing pattern in the MarvelousDesigner software.
[0096] Specifically, users can be allowed to adjust the structure of a three-dimensional clothing pattern, such as removing a layer of hem. In addition, users can also adjust the stitching effect of the pattern. Alternatively, users can also adjust the fabric material, the physical effects of clothing, etc. Finally, users can also adjust some elements in clothing. For example, if the target clothing originally has a stand-up collar, users can manually change it to a sweetheart collar, etc. Clothing elements can include puff sleeves, buttons, stand-up collars, embroidery, slanted lapels, sweetheart collars, etc. These clothing elements can be added to the target clothing according to actual needs.
[0097] The process of training the clothing recognition model is described below. The embodiment of the present invention specifically provides two different training methods. Of course, other possible training methods can be added according to actual needs to train the clothing recognition model.
[0098] In the first training method, Figure 2 As shown, the training process may include:
[0099] 201. Obtain a first training data set, wherein the first training data set includes sample clothing images of a plurality of different characters wearing different sample clothing, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing.
[0100] 202. Based on the first training data set, train the clothing recognition model to be trained to obtain a pre-trained clothing recognition model.
[0101] First, a first training data set can be set. Specifically, sample clothing images of multiple different characters wearing different sample clothing can be collected. At the same time, at least one sample clothing pattern corresponding to the multiple hierarchical structures of each sample clothing needs to be obtained through existing data. If the above existing data does not exist, at least one sample clothing pattern corresponding to the multiple hierarchical structures of each sample clothing can also be drawn through manual annotation. Figure 3 As shown, there are some sample costumes or sample costume images of characters wearing sample costumes, and these images can be used as training content.
[0102] After setting the first training data set, the clothing recognition model can be trained. During the training process, the sample clothing image can be input into the clothing recognition model, and the clothing recognition model can predict the clothing pattern corresponding to the sample clothing image. Then the predicted clothing pattern can be compared with the sample clothing pattern corresponding to the sample clothing image. Specifically, they can be substituted into the loss function to calculate the loss value, and then the weight of the clothing recognition model is adjusted by the loss value and back propagation until the loss value meets the preset requirements or the number of training times reaches the preset threshold.
[0103] Through the training process, the clothing recognition model can be enabled to have the capabilities of clothing element recognition, occluded part supplementation, hierarchical structure splitting, and basic tailoring detail change detection.
[0104] In addition to the above training, the clothing recognition model can also be enabled to have the ability to classify clothing, so that when the target clothing image is input into the clothing recognition model, the clothing recognition model can output the target clothing classification corresponding to the target clothing in the target clothing image.
[0105] The first training method is introduced above. Next, the second training method is introduced. In the second training method, if Figure 4 As shown, the training process may include:
[0106] 401. Obtain a second training data set, wherein the second training data set includes sample clothing images of different sample clothing items in at least one sewing teaching material and / or at least one pattern description teaching material, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing item.
[0107] 402. Based on the second training data set, the clothing recognition model to be trained is trained to obtain a pre-trained clothing recognition model.
[0108] In the second method, the main training logic is similar to that of the first method, so the specific training logic will not be repeated. You can refer to the training logic described in the first training method.
[0109] Different from the previous method, in the second method, a different training data set is used. In the second training data set, sewing teaching materials or pattern instruction materials can be directly used as training content, such as Figure 5 The following are some examples of clothing patterns. Through sewing teaching materials or pattern description teaching materials, the clothing recognition model can know how clothing is sewn and made, and then know what kind of clothing pattern is needed to sew the corresponding clothing. At the same time, it can also have a deeper understanding of which clothing patterns make up different clothing.
[0110] It is understandable that the three-dimensional clothing pattern produced by the clothing pattern output by the clothing recognition model is suitable for a character with a preset standard body shape. However, the three-dimensional clothing pattern is not necessarily to be worn by a character with a preset standard body shape, and there may be a need to wear the three-dimensional clothing pattern to a character who does not have a standard body shape. For the case where the three-dimensional clothing pattern is worn by a character who does not have a standard body shape, the user can be allowed to manually adjust the size of the three-dimensional clothing pattern. For example, a character has long legs, and the three-dimensional clothing pattern is a long skirt. The general way to wear it is that the skirt just covers the instep, and in the case of adjusting the three-dimensional clothing pattern, if it is worn by a long-legged character, then the effect of the long skirt just covering the knees will be obtained, which is obviously inconsistent with the design concept. Based on this, the user is allowed to manually drag the lower skirt of the three-dimensional clothing pattern so that the modified three-dimensional clothing pattern can cover the instep.
[0111] In addition to the manual adjustment method described above, another adjustment method is also provided in an embodiment of the present invention: obtaining a character image corresponding to the target character; inputting the character image into a pre-trained body shape recognition model to obtain a target body shape corresponding to the target character; and adjusting the three-dimensional clothing pattern based on the target body shape so that the adjusted three-dimensional clothing pattern is suitable for the target character.
[0112] In practical applications, a character image corresponding to a target character to be worn in a three-dimensional clothing pattern may be obtained. The character image may then be input into a trained body shape recognition model, which may output a target body shape corresponding to the target character, which may be body shape data such as height, waist circumference, leg length, etc. After obtaining the target body shape, the three-dimensional clothing pattern may be automatically adaptively adjusted based on the target body shape, so that the adjusted three-dimensional clothing pattern is suitable for the target character.
[0113] For example, through the character image of a certain character, it is recognized that the character's leg length is 90, and the skirt length of the three-dimensional clothing pattern is 60. In order to adapt to the character, the tail of the skirt can be automatically lengthened to between 90 and 100, so that the modified three-dimensional clothing pattern can adapt to the body shape of the above-mentioned character.
[0114] In addition to the above application scenarios, in the embodiment of the present invention, the user is also allowed to describe the user needs by text input. For example, the user sees a target clothing image and is generally satisfied with the style of the target clothing in the target clothing image, but wants to replace the pattern on the target clothing. Based on this, the target user can input the target clothing demand text used to describe the personalized needs while uploading the target clothing image. The clothing recognition model can combine the target clothing image and the target clothing demand text to output a clothing pattern that is the same as the target clothing in the target clothing image and consistent with the description in the target clothing demand text.
[0115] Based on this, the method provided by the embodiment of the present invention may further include receiving a target clothing requirement text input by a user. Accordingly, the process of inputting the target clothing image into the pre-trained clothing recognition model may include: inputting the target clothing requirement text and the target clothing image into the pre-trained clothing recognition model to obtain at least one clothing version corresponding to each hierarchical structure of the target clothing and meeting the requirements in the target clothing requirement text.
[0116] The following will describe in detail one or more embodiments of the three-dimensional clothing pattern generation device of the present invention. Those skilled in the art will appreciate that these three-dimensional clothing pattern generation devices can be configured using commercially available hardware components through the steps taught in this solution.
[0117] Figure 6 A schematic diagram of the structure of a three-dimensional clothing pattern generation device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the device comprises:
[0118] An acquisition module 61 is used to acquire a target clothing image, wherein the target clothing image includes a target clothing having a multi-level structure;
[0119] An input module 62, used for inputting the target clothing image into a pre-trained clothing recognition model to obtain at least one clothing pattern corresponding to each hierarchical structure of the target clothing;
[0120] An identification module 63, used to identify the fabric material used in each layer structure of the target clothing;
[0121] The generating module 64 is used to generate clothing data based on the cloth materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern; and to generate a three-dimensional clothing pattern corresponding to the target clothing based on the clothing data.
[0122] Optionally, the identification module 63 is used to:
[0123] Inputting the target clothing image into the clothing recognition model to obtain a target clothing classification corresponding to the target clothing;
[0124] Based on the target clothing classification, the correspondence between the preset clothing classification and the hierarchical structure and the fabric material is queried to obtain the fabric material used by each hierarchical structure of the target clothing.
[0125] Optionally, the generating module 64 is used to:
[0126] For each hierarchical structure of the target clothing, performing stitching processing on at least one clothing pattern corresponding to the hierarchical structure;
[0127] Clothing data is generated based on the clothing patterns and fabric materials after stitching corresponding to each hierarchical structure.
[0128] Optionally, the device further comprises an adjustment module, wherein the adjustment module is configured to:
[0129] Displaying the three-dimensional clothing pattern to a user;
[0130] In response to the clothing adjustment instruction triggered by the user, the three-dimensional clothing pattern is adjusted.
[0131] Optionally, the three-dimensional clothing pattern is adapted to a character with a preset standard body shape;
[0132] The adjustment module is further used for:
[0133] Get the character image corresponding to the target character;
[0134] Inputting the character image into a pre-trained body shape recognition model to obtain a target body shape corresponding to the target character;
[0135] Based on the target body shape, the three-dimensional clothing pattern is adjusted so that the adjusted three-dimensional clothing pattern is suitable for the target character.
[0136] Optionally, the device further comprises a training module, wherein the training module is used to:
[0137] Acquire a first training data set, wherein the first training data set includes sample clothing images of a plurality of different characters wearing different sample clothing, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing;
[0138] The clothing recognition model to be trained is trained based on the first training data set to obtain the pre-trained clothing recognition model.
[0139] Optionally, the training module is further used to:
[0140] Acquire a second training data set, wherein the second training data set includes sample clothing images of different sample clothing in at least one sewing teaching material and / or at least one pattern description teaching material, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing;
[0141] The clothing recognition model to be trained is trained based on the second training data set to obtain the pre-trained clothing recognition model.
[0142] Optionally, the input module 62 is used to:
[0143] Receive target clothing demand text input by the user;
[0144] The target clothing requirement text and the target clothing image are input into a pre-trained clothing recognition model to obtain at least one clothing version that corresponds to each hierarchical structure of the target clothing and meets the requirements in the target clothing requirement text.
[0145] Figure 6 The device shown can perform the aforementioned Figures 1 to 5 The three-dimensional clothing pattern generation method provided in the illustrated embodiment, the detailed execution process and technical effects are described in the aforementioned embodiment, and will not be repeated here.
[0146] In one possible design, the above Figure 6 The structure of the three-dimensional clothing pattern generating device shown can be realized as an electronic device, such as Figure 7 As shown, the electronic device may include: a processor 91 and a memory 92. The memory 92 stores executable code, and when the executable code is executed by the processor 91, the processor 91 can at least implement the above-mentioned Figures 1 to 5 The three-dimensional clothing pattern generation method provided in the illustrated embodiment.
[0147] Optionally, the electronic device may further include a communication interface 93 for communicating with other devices.
[0148] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, wherein an executable code is stored on the non-transitory machine-readable storage medium. When the executable code is executed by a processor of an electronic device, the processor can at least implement the above-mentioned Figures 1 to 5 The three-dimensional clothing pattern generation method provided in the illustrated embodiment.
[0149] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.
[0150] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0151] The three-dimensional clothing pattern generation method provided in the embodiment of the present invention can be executed by a certain program / software, and the program / software can be provided by the network side. The electronic device mentioned in the above embodiment can download the program / software to a local non-volatile storage medium, and when it needs to execute the above three-dimensional clothing pattern generation method, the program / software is read into the memory by the CPU, and then the program / software is executed by the CPU to implement the three-dimensional clothing pattern generation method provided in the above embodiment. The execution process can refer to the above Figures 1 to 5 Instructions in .
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a three-dimensional clothing pattern, characterized in that: include: Acquire a target clothing image, wherein the target clothing image includes target clothing having a multi-level structure; Inputting the target clothing image into a pre-trained clothing recognition model to obtain at least one clothing pattern corresponding to each hierarchical structure of the target clothing; Identifying the fabric materials used in each layer structure of the target clothing; Generate clothing data based on fabric materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern; Based on the clothing data, a three-dimensional clothing pattern corresponding to the target clothing is generated.
2. The method according to claim 1, characterized in that The identifying of the fabric materials used in each hierarchical structure of the target clothing includes: Inputting the target clothing image into the clothing recognition model to obtain a target clothing classification corresponding to the target clothing; Based on the target clothing classification, the correspondence between the preset clothing classification and the hierarchical structure and the fabric material is queried to obtain the fabric material used by each hierarchical structure of the target clothing.
3. The method according to claim 1, characterized in that The generating of clothing data based on the cloth materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern comprises: For each hierarchical structure of the target clothing, performing stitching processing on at least one clothing pattern corresponding to the hierarchical structure; Clothing data is generated based on the clothing patterns and fabric materials after stitching corresponding to each hierarchical structure.
4. The method according to claim 1, characterized in that: The method further comprises: Displaying the three-dimensional clothing pattern to a user; In response to the clothing adjustment instruction triggered by the user, the three-dimensional clothing pattern is adjusted.
5. The method according to claim 1, characterized in that The three-dimensional clothing pattern is adapted to a character with a preset standard body shape; The method further comprises: Get the character image corresponding to the target character; Inputting the character image into a pre-trained body shape recognition model to obtain a target body shape corresponding to the target character; Based on the target body shape, the three-dimensional clothing pattern is adjusted so that the adjusted three-dimensional clothing pattern is suitable for the target character.
6. The method according to claim 1, characterized in that The method further comprises: Acquire a first training data set, wherein the first training data set includes sample clothing images of a plurality of different characters wearing different sample clothing, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing; The clothing recognition model to be trained is trained based on the first training data set to obtain the pre-trained clothing recognition model.
7. The method according to claim 1, characterized in that The method further comprises: Acquire a second training data set, wherein the second training data set includes sample clothing images of different sample clothing in at least one sewing teaching material and / or at least one pattern description teaching material, and at least one sample clothing pattern corresponding to a plurality of hierarchical structures of each sample clothing; The clothing recognition model to be trained is trained based on the second training data set to obtain the pre-trained clothing recognition model.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Receive target clothing demand text input by the user; The step of inputting the target clothing image into a pre-trained clothing recognition model comprises: The target clothing requirement text and the target clothing image are input into a pre-trained clothing recognition model to obtain at least one clothing version that corresponds to each hierarchical structure of the target clothing and meets the requirements in the target clothing requirement text.
9. A three-dimensional clothing pattern generation device, characterized in that: include: An acquisition module, used for acquiring a target clothing image, wherein the target clothing image includes a target clothing having a multi-level structure; An input module, used for inputting the target clothing image into a pre-trained clothing recognition model to obtain at least one clothing pattern corresponding to each hierarchical structure of the target clothing; An identification module, used to identify the fabric material used in each layer structure of the target clothing; A generation module is used to generate clothing data based on cloth materials corresponding to each hierarchical structure of the target clothing and at least one clothing pattern; based on the clothing data, generate a three-dimensional clothing pattern corresponding to the target clothing.
10. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the three-dimensional clothing pattern generation method according to any one of claims 1 to 8.
11. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes the three-dimensional clothing pattern generation method according to any one of claims 1 to 8.