A method and system for automatically generating textile lace patterns
By creating a textile lace pattern generation model, using feature extraction, coding, pattern generation, fine-tuning and identification modules, the problems of traditional designs are solved, and efficient automatic generation and quality improvement of complex lace patterns are achieved.
Patent Information
- Application Number
- CN202411688985.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-04
AI Technical Summary
Traditional textile lace pattern design relies on manual creation, which is time-consuming, cost-effective and difficult to respond to market changes quickly. Existing pattern generation technology based on artificial intelligence is difficult to deal with the continuity, symmetry and richness of complex lace patterns.
By creating a textile lace pattern generation model, including feature extraction module, coding module, pattern generation module, fine-tuning module and identification module, a large number of historical textile images and description text are trained to generate textile lace patterns that meet user needs, and fine-tune them through user feedback.
It has achieved the improvement of the quality and efficiency of textile lace patterns, and can automatically generate complex lace patterns, quickly respond to market changes, reduce design costs, and improve user experience.
Smart Images

Figure CN119762606A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of textile lace pattern design, in particular to a method and system for automatically generating textile lace patterns. Background Art
[0002] Textile lace patterns are patterns around the outside of textile products, such as lace patterns around the edge of a tablecloth. Before producing textile products, textile lace patterns need to be designed. Traditionally, the design of textile lace patterns mainly relies on manual creation by designers, a process that is time-consuming, costly, and difficult to respond quickly to market changes. Although there are some AI-based pattern generation technologies on the market, most of them are limited to the generation of simple patterns and cannot effectively handle the continuity, symmetry, and detail richness requirements of complex lace patterns. It is also often difficult to generate satisfactory textile lace patterns directly based on reference images or text descriptions provided by users.
[0003] Therefore, how to provide a method and system for automatically generating textile lace patterns to improve the quality and efficiency of generating textile lace patterns has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method and system for automatically generating textile lace patterns, so as to improve the quality and efficiency of generating textile lace patterns.
[0005] In a first aspect, the present invention provides a method for automatically generating a textile lace pattern, comprising the following steps:
[0006] Step S1, creating a textile lace pattern generation model based on a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module and an identification module;
[0007] Step S2, setting the loss function and hyperparameters of the textile lace pattern generation model;
[0008] Step S3, obtaining a large number of historical textile images and historical description texts, and constructing a data set after preprocessing each of the historical textile images and historical description texts;
[0009] Step S4, training the textile lace pattern generation model using the data set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process;
[0010] Step S5, obtaining an input reference image or real-time description text, and inputting the reference image or real-time description text into the trained textile lace pattern generation model to generate a textile lace pattern;
[0011] Step S6: fine-tune the textile lace pattern based on the input user feedback.
[0012] Further, in the step S1, the feature extraction module is used to extract pattern features from historical textile images or historical description texts;
[0013] The encoding module is used to map each of the pattern features into a feature vector according to a preset vector mapping table, and bind each of the pattern features and the corresponding feature vector to store in a feature space;
[0014] The pattern generation module is used to extract feature vectors from the feature space to generate an initial lace pattern;
[0015] The fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern;
[0016] The identification module is used to perform pattern quality judgment on the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal.
[0017] Furthermore, the step S2 is specifically as follows:
[0018] The loss function of the textile lace pattern generation model is set to a least squares loss function, and the textile lace pattern generation model is set to include at least hyperparameters of a learning rate, a number of iterations, a batch size, a number of neurons, and a convolution kernel size.
[0019] Furthermore, the step S3 is specifically as follows:
[0020] Acquire a large number of historical textile images and historical description texts from a database through an ETL tool, perform preprocessing on each of the historical textile images including at least resizing, color correction, cropping, rotation, scaling, filtering, and sharpening, and perform preprocessing on each of the historical description texts including at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction, and duplicate content removal;
[0021] The pre-processed historical textile images and historical description texts are annotated with pattern features to construct a data set.
[0022] Furthermore, the step S4 is specifically as follows:
[0023] Dividing the data set into a training set, a validation set, and a test set based on a ratio of 7:2:1, training the textile lace pattern generation model through the training set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process;
[0024] The PSNR index, SSIM index and LP IPS index of the trained textile lace pattern generation model are calculated by using the verification set to verify the textile lace pattern generation model, and if the verification fails, the training set is expanded to continue training;
[0025] Calculating the confidence of the verified textile lace pattern generation model through the test set to test the textile lace pattern generation model, and if the test fails, expanding the training set to continue training;
[0026] The step S6 is specifically as follows:
[0027] The input user feedback is obtained, and when the user feedback is unsatisfactory, the textile lace pattern is input into the textile lace pattern generation model for fine-tuning.
[0028] In a second aspect, the present invention provides a system for automatically generating textile lace patterns, comprising the following modules:
[0029] A textile lace pattern generation model creation module is used to create a textile lace pattern generation model based on a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module and an identification module;
[0030] A parameter setting module, used for setting the loss function and hyper parameters of the textile lace pattern generation model;
[0031] A data set construction module, used to obtain a large number of historical textile images and historical description texts, and to construct a data set after preprocessing each of the historical textile images and historical description texts;
[0032] A textile lace pattern generation model training module, used for training the textile lace pattern generation model through the data set until the loss function is less than a preset loss threshold, and the hyperparameters are continuously optimized during the training process;
[0033] A textile lace pattern generation module, used to obtain an input reference image or real-time description text, input the reference image or real-time description text into a trained textile lace pattern generation model, and generate a textile lace pattern;
[0034] The textile lace pattern fine-tuning module is used to fine-tune the textile lace pattern based on input user feedback.
[0035] Further, in the textile lace pattern generation model creation module, the feature extraction module is used to extract pattern features from historical textile images or historical description texts;
[0036] The encoding module is used to map each of the pattern features into a feature vector according to a preset vector mapping table, and bind each of the pattern features and the corresponding feature vector to store in a feature space;
[0037] The pattern generation module is used to extract feature vectors from the feature space to generate an initial lace pattern;
[0038] The fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern;
[0039] The identification module is used to perform pattern quality judgment on the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal.
[0040] Furthermore, the parameter setting module is specifically used for:
[0041] The loss function of the textile lace pattern generation model is set to a least squares loss function, and the textile lace pattern generation model is set to include at least hyperparameters of a learning rate, a number of iterations, a batch size, a number of neurons, and a convolution kernel size.
[0042] Furthermore, the data set construction module is specifically used for:
[0043] Acquire a large number of historical textile images and historical description texts from a database through an ETL tool, perform preprocessing on each of the historical textile images including at least resizing, color correction, cropping, rotation, scaling, filtering, and sharpening, and perform preprocessing on each of the historical description texts including at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction, and duplicate content removal;
[0044] The pre-processed historical textile images and historical description texts are annotated with pattern features to construct a data set.
[0045] Furthermore, the textile lace pattern generation model training module is specifically used for:
[0046] Dividing the data set into a training set, a validation set, and a test set based on a ratio of 7:2:1, training the textile lace pattern generation model through the training set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process;
[0047] The PSNR index, SSIM index and LP IPS index of the trained textile lace pattern generation model are calculated by using the verification set to verify the textile lace pattern generation model, and if the verification fails, the training set is expanded to continue training;
[0048] Calculating the confidence of the verified textile lace pattern generation model through the test set to test the textile lace pattern generation model, and if the test fails, expanding the training set to continue training;
[0049] The textile lace pattern fine-tuning module is specifically used for:
[0050] The input user feedback is obtained, and when the user feedback is unsatisfactory, the textile lace pattern is input into the textile lace pattern generation model for fine-tuning.
[0051] The advantages of the present invention are:
[0052] 1. Create a textile lace pattern generation model through a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module and an identification module, and set the loss function and hyperparameters of the textile lace pattern generation model; then obtain a large number of historical textile images and historical description texts, pre-process each historical textile image and historical description text to construct a data set, and train the textile lace pattern generation model through the data set until the loss function is less than a preset loss threshold, and continuously optimize the hyperparameters during the training process; then obtain an input reference image or real-time description text, input the reference image or real-time description text into the trained textile lace pattern generation model, generate a textile lace pattern, and fine-tune the textile lace pattern based on the input user feedback; the feature extraction module is used to extract pattern features from historical textile images or historical description texts; the encoding module is used to map each pattern feature into a vector mapping table according to a preset vector mapping table. The feature vector is used to bind and store each pattern feature and the corresponding feature vector into the feature space; the pattern generation module is used to extract the feature vector from the feature space and generate the initial lace pattern; the fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern; the identification module is used to judge the pattern quality of the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal; that is, the textile lace pattern is generated by the textile lace pattern generation model trained with a large amount of historical data, and the generation process combines the layout adjustment of the fine-tuning module and the adversarial training of the identification module. If the user is not satisfied with the feedback, the generated textile lace pattern can be input into the textile lace pattern generation model for fine-tuning. The whole process is automatically generated without relying on the manual creation of the designer as traditionally, which ultimately greatly improves the quality and efficiency of the textile lace pattern generation.
[0053] 2. By acquiring a large number of historical textile images and historical description texts to train the textile lace pattern generation model, the textile lace pattern generation model can automatically generate textile lace patterns based on reference images or real-time description texts. Users can choose the generation method as needed, which greatly improves the user experience.
[0054] 3. By preprocessing each historical textile image at least including resizing, color correction, cropping, rotation, scaling, filtering and sharpening, and preprocessing each historical description text at least including text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction and duplicate content removal, the quality of the dataset is effectively improved, thereby greatly improving the training effect of the textile lace pattern generation model.
[0055] 4. By continuously optimizing the hyperparameters during the training process of the textile lace pattern generation model, the PSNR index, SSIM index and LPIPS index of the trained textile lace pattern generation model are calculated through the validation set to verify the textile lace pattern generation model, and the confidence of the verified textile lace pattern generation model is calculated through the test set to test the textile lace pattern generation model. That is, the training process of the textile lace pattern generation model is continuously tuned and tested to keep the textile lace pattern generation model in the optimal performance state, thereby further ensuring the quality of textile lace pattern generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0057] Figure 1 The present invention is a flowchart of a method for automatically generating a textile lace pattern.
[0058] Figure 2 The invention is a structural schematic diagram of a system for automatically generating textile lace patterns. DETAILED DESCRIPTION
[0059] The technical solution in the embodiments of the present application has the following overall idea: a textile lace pattern is generated by a textile lace pattern generation model trained with a large amount of historical data; the generation process combines the layout adjustment of the fine-tuning module and the adversarial training of the identification module; if the user is not satisfied with the feedback, the generated textile lace pattern can be input into the textile lace pattern generation model for fine-tuning; the whole process is automatically generated, without relying on the manual creation of the designer as traditionally done, so as to improve the quality and efficiency of the textile lace pattern generation.
[0060] Please refer to Figure 1 to Figure 2 As shown, a preferred embodiment of a method for automatically generating a textile lace pattern of the present invention comprises the following steps:
[0061] Step S1, creating a textile lace pattern generation model based on a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module and an identification module; in specific implementation, the textile lace pattern generation model can be constructed based on a Flux model and a comfy i framework;
[0062] Step S2, setting the loss function and hyperparameters of the textile lace pattern generation model;
[0063] Step S3, obtaining a large number of historical textile images and historical description texts, and constructing a data set after preprocessing each of the historical textile images and historical description texts;
[0064] Step S4, training the textile lace pattern generation model using the data set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process;
[0065] Step S5, obtaining an input reference image or real-time description text, and inputting the reference image or real-time description text into the trained textile lace pattern generation model to generate a textile lace pattern;
[0066] Step S6: fine-tune the textile lace pattern based on the input user feedback.
[0067] In the step S1, the feature extraction module is used to extract pattern features from historical textile images or historical description texts;
[0068] The encoding module is used to map each of the pattern features into a feature vector according to a preset vector mapping table, and bind each of the pattern features and the corresponding feature vector to store in a feature space; the encoding module is constructed based on a deep learning model (such as a convolutional neural network CNN or a Transformer model); the encoding module needs to retain the key attributes (pattern features) of the textile lace pattern, such as continuity, symmetry, etc.;
[0069] The pattern generation module is used to extract feature vectors from the feature space to generate an initial lace pattern; the pattern generation module is a generator, which is constructed based on a diffusion adversarial model (such as ProgressiveGAN or StyleGAN);
[0070] The fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern; the fine-tuning module is a low-rank lightweight module; the layout rule is that the lace pattern should be in a circle around the periphery of the image and meet a certain proportional relationship;
[0071] The identification module is used to perform pattern quality judgment on the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal.
[0072] The step S2 is specifically as follows:
[0073] The loss function of the textile lace pattern generation model is set to a least squares loss function, and the textile lace pattern generation model is set to include at least hyperparameters of a learning rate, a number of iterations, a batch size, a number of neurons, and a convolution kernel size.
[0074] The step S3 is specifically as follows:
[0075] Acquire a large number of historical textile images and historical description texts from a database through an ETL tool, perform preprocessing on each of the historical textile images including at least resizing, color correction, cropping, rotation, scaling, filtering, and sharpening, and perform preprocessing on each of the historical description texts including at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction, and duplicate content removal;
[0076] The pre-processed historical textile images and historical description texts are annotated with pattern features to construct a data set.
[0077] By acquiring a large number of historical textile images and historical description texts to train the textile lace pattern generation model, the textile lace pattern generation model can automatically generate textile lace patterns based on reference images or real-time description texts. Users can choose the generation method as needed, which greatly improves the user experience.
[0078] By preprocessing each historical textile image with at least resizing, color correction, cropping, rotation, scaling, filtering and sharpening, and preprocessing each historical description text with at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction and duplicate content removal, the quality of the dataset is effectively improved, thereby greatly improving the training effect of the textile lace pattern generation model.
[0079] The step S4 is specifically as follows:
[0080] Dividing the data set into a training set, a validation set, and a test set based on a ratio of 7:2:1, training the textile lace pattern generation model through the training set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process;
[0081] The PSNR index, SSIM index and LP IPS index of the trained textile lace pattern generation model are calculated by using the verification set to verify the textile lace pattern generation model, and if the verification fails, the training set is expanded to continue training;
[0082] Calculating the confidence of the verified textile lace pattern generation model through the test set to test the textile lace pattern generation model, and if the test fails, expanding the training set to continue training;
[0083] By continuously optimizing hyperparameters during the training process of the textile lace pattern generation model, the PSNR index, SSIM index and LPIPS index of the trained textile lace pattern generation model are calculated through the validation set to verify the textile lace pattern generation model, and the confidence of the verified textile lace pattern generation model is calculated through the test set to test the textile lace pattern generation model. That is, the training process of the textile lace pattern generation model is continuously tuned and tested, so that the textile lace pattern generation model is in the optimal performance state, which further ensures the quality of textile lace pattern generation.
[0084] The step S6 is specifically as follows:
[0085] The input user feedback is obtained. When the user feedback is unsatisfactory, the textile lace pattern is input into the textile lace pattern generation model for fine-tuning, that is, the textile lace pattern is post-processed to perform operations such as color adjustment, texture optimization, and detail enhancement until the user requirements are met. In specific implementation, the finally generated textile lace pattern can be output in a digital format and directly used for printing or embroidery production of textile machines, and multiple formats and resolution options are provided to meet the needs of different application scenarios.
[0086] A preferred embodiment of a system for automatically generating textile lace patterns according to the present invention comprises the following modules:
[0087] A textile lace pattern generation model creation module is used to create a textile lace pattern generation model based on a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module, and an identification module; in specific implementation, the textile lace pattern generation model can be constructed based on a Flux model and a comfy framework;
[0088] A parameter setting module, used for setting the loss function and hyper parameters of the textile lace pattern generation model;
[0089] A data set construction module, used to obtain a large number of historical textile images and historical description texts, and to construct a data set after preprocessing each of the historical textile images and historical description texts;
[0090] A textile lace pattern generation model training module, used for training the textile lace pattern generation model through the data set until the loss function is less than a preset loss threshold, and the hyperparameters are continuously optimized during the training process;
[0091] A textile lace pattern generation module, used to obtain an input reference image or real-time description text, input the reference image or real-time description text into a trained textile lace pattern generation model, and generate a textile lace pattern;
[0092] The textile lace pattern fine-tuning module is used to fine-tune the textile lace pattern based on input user feedback.
[0093] In the textile lace pattern generation model creation module, the feature extraction module is used to extract pattern features from historical textile images or historical description texts;
[0094] The encoding module is used to map each of the pattern features into a feature vector according to a preset vector mapping table, and bind each of the pattern features and the corresponding feature vector to store in a feature space; the encoding module is constructed based on a deep learning model (such as a convolutional neural network CNN or a Transformer model); the encoding module needs to retain the key attributes (pattern features) of the textile lace pattern, such as continuity, symmetry, etc.;
[0095] The pattern generation module is used to extract feature vectors from the feature space to generate an initial lace pattern; the pattern generation module is a generator, which is constructed based on a diffusion adversarial model (such as ProgressiveGAN or StyleGAN);
[0096] The fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern; the fine-tuning module is a low-rank lightweight module; the layout rule is that the lace pattern should be in a circle around the periphery of the image and meet a certain proportional relationship;
[0097] The identification module is used to perform pattern quality judgment on the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal.
[0098] The parameter setting module is specifically used for:
[0099] The loss function of the textile lace pattern generation model is set to a least squares loss function, and the textile lace pattern generation model is set to include at least hyperparameters of a learning rate, a number of iterations, a batch size, a number of neurons, and a convolution kernel size.
[0100] The data set construction module is specifically used for:
[0101] Acquire a large number of historical textile images and historical description texts from a database through an ETL tool, perform preprocessing on each of the historical textile images including at least resizing, color correction, cropping, rotation, scaling, filtering, and sharpening, and perform preprocessing on each of the historical description texts including at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction, and duplicate content removal;
[0102] The pre-processed historical textile images and historical description texts are annotated with pattern features to construct a data set.
[0103] By acquiring a large number of historical textile images and historical description texts to train the textile lace pattern generation model, the textile lace pattern generation model can automatically generate textile lace patterns based on reference images or real-time description texts. Users can choose the generation method as needed, which greatly improves the user experience.
[0104] By preprocessing each historical textile image with at least resizing, color correction, cropping, rotation, scaling, filtering and sharpening, and preprocessing each historical description text with at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction and duplicate content removal, the quality of the dataset is effectively improved, thereby greatly improving the training effect of the textile lace pattern generation model.
[0105] The textile lace pattern generation model training module is specifically used for:
[0106] Dividing the data set into a training set, a validation set, and a test set based on a ratio of 7:2:1, training the textile lace pattern generation model through the training set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process;
[0107] The PSNR index, SSIM index and LPIPS index of the trained textile lace pattern generation model are calculated by the verification set to verify the textile lace pattern generation model, and if the verification fails, the training set is expanded to continue training;
[0108] Calculating the confidence of the verified textile lace pattern generation model through the test set to test the textile lace pattern generation model, and if the test fails, expanding the training set to continue training;
[0109] By continuously optimizing hyperparameters during the training process of the textile lace pattern generation model, the PSNR index, SSIM index and LPIPS index of the trained textile lace pattern generation model are calculated through the validation set to verify the textile lace pattern generation model, and the confidence of the verified textile lace pattern generation model is calculated through the test set to test the textile lace pattern generation model. That is, the training process of the textile lace pattern generation model is continuously tuned and tested, so that the textile lace pattern generation model is in the optimal performance state, which further ensures the quality of textile lace pattern generation.
[0110] The textile lace pattern fine-tuning module is specifically used for:
[0111] The input user feedback is obtained. When the user feedback is unsatisfactory, the textile lace pattern is input into the textile lace pattern generation model for fine-tuning, that is, the textile lace pattern is post-processed to perform operations such as color adjustment, texture optimization, and detail enhancement until the user requirements are met. In specific implementation, the finally generated textile lace pattern can be output in a digital format and directly used for printing or embroidery production of textile machines, and multiple formats and resolution options are provided to meet the needs of different application scenarios.
[0112] In summary, the advantages of the present invention are:
[0113] 1. Create a textile lace pattern generation model through a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module and an identification module, and set the loss function and hyperparameters of the textile lace pattern generation model; then obtain a large number of historical textile images and historical description texts, pre-process each historical textile image and historical description text to construct a data set, and train the textile lace pattern generation model through the data set until the loss function is less than a preset loss threshold, and continuously optimize the hyperparameters during the training process; then obtain an input reference image or real-time description text, input the reference image or real-time description text into the trained textile lace pattern generation model, generate a textile lace pattern, and fine-tune the textile lace pattern based on the input user feedback; the feature extraction module is used to extract pattern features from historical textile images or historical description texts; the encoding module is used to map each pattern feature into a vector mapping table according to a preset vector mapping table. The feature vector is used to bind and store each pattern feature and the corresponding feature vector into the feature space; the pattern generation module is used to extract the feature vector from the feature space and generate the initial lace pattern; the fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern; the identification module is used to judge the pattern quality of the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal; that is, the textile lace pattern is generated by the textile lace pattern generation model trained with a large amount of historical data, and the generation process combines the layout adjustment of the fine-tuning module and the adversarial training of the identification module. If the user is not satisfied with the feedback, the generated textile lace pattern can be input into the textile lace pattern generation model for fine-tuning. The whole process is automatically generated without relying on the manual creation of the designer as traditionally, which ultimately greatly improves the quality and efficiency of the textile lace pattern generation.
[0114] 2. By acquiring a large number of historical textile images and historical description texts to train the textile lace pattern generation model, the textile lace pattern generation model can automatically generate textile lace patterns based on reference images or real-time description texts. Users can choose the generation method as needed, which greatly improves the user experience.
[0115] 3. By preprocessing each historical textile image at least including resizing, color correction, cropping, rotation, scaling, filtering and sharpening, and preprocessing each historical description text at least including text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction and duplicate content removal, the quality of the dataset is effectively improved, thereby greatly improving the training effect of the textile lace pattern generation model.
[0116] 4. By continuously optimizing the hyperparameters during the training process of the textile lace pattern generation model, the PSNR index, SSIM index and LPIPS index of the trained textile lace pattern generation model are calculated through the validation set to verify the textile lace pattern generation model, and the confidence of the verified textile lace pattern generation model is calculated through the test set to test the textile lace pattern generation model. That is, the training process of the textile lace pattern generation model is continuously tuned and tested to keep the textile lace pattern generation model in the optimal performance state, thereby further ensuring the quality of textile lace pattern generation.
[0117] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A method for automatically generating a textile lace pattern, characterized in that: The steps include: Step S1, creating a textile lace pattern generation model based on a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module and an identification module; Step S2, setting the loss function and hyperparameters of the textile lace pattern generation model; Step S3, obtaining a large number of historical textile images and historical description texts, and constructing a data set after preprocessing each of the historical textile images and historical description texts; Step S4, training the textile lace pattern generation model using the data set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process; Step S5, obtaining an input reference image or real-time description text, and inputting the reference image or real-time description text into the trained textile lace pattern generation model to generate a textile lace pattern; Step S6: fine-tune the textile lace pattern based on the input user feedback.
2. A method for automatically generating a textile lace pattern according to claim 1, characterized in that: In the step S1, the feature extraction module is used to extract pattern features from historical textile images or historical description texts; The encoding module is used to map each of the pattern features into a feature vector according to a preset vector mapping table, and bind each of the pattern features and the corresponding feature vector to store in a feature space; The pattern generation module is used to extract feature vectors from the feature space to generate an initial lace pattern; The fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern; The identification module is used to perform pattern quality judgment on the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal.
3. The method for automatically generating a textile lace pattern according to claim 1, characterized in that: The step S2 is specifically as follows: The loss function of the textile lace pattern generation model is set to a least squares loss function, and the textile lace pattern generation model is set to include at least hyperparameters of a learning rate, a number of iterations, a batch size, a number of neurons, and a convolution kernel size.
4. A method for automatically generating a textile lace pattern as claimed in claim 1, characterized in that: The step S3 is specifically as follows: Acquire a large number of historical textile images and historical description texts from a database through an ETL tool, perform preprocessing on each of the historical textile images including at least resizing, color correction, cropping, rotation, scaling, filtering, and sharpening, and perform preprocessing on each of the historical description texts including at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction, and duplicate content removal; The pre-processed historical textile images and historical description texts are annotated with pattern features to construct a data set.
5. The method for automatically generating a textile lace pattern according to claim 1, characterized in that: The step S4 is specifically as follows: Dividing the data set into a training set, a validation set, and a test set based on a ratio of 7:2:1, training the textile lace pattern generation model through the training set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process; The PSNR index, SSIM index and LPIPS index of the trained textile lace pattern generation model are calculated by the verification set to verify the textile lace pattern generation model, and if the verification fails, the training set is expanded to continue training; Calculating the confidence of the verified textile lace pattern generation model through the test set to test the textile lace pattern generation model, and if the test fails, expanding the training set to continue training; The step S6 is specifically as follows: The input user feedback is obtained, and when the user feedback is unsatisfactory, the textile lace pattern is input into the textile lace pattern generation model for fine-tuning.
6. A textile lace pattern automatic generation system, characterized in that: Includes the following modules: A textile lace pattern generation model creation module is used to create a textile lace pattern generation model based on a feature extraction module, an encoding module, a pattern generation module, a fine-tuning module and an identification module; A parameter setting module, used for setting the loss function and hyper parameters of the textile lace pattern generation model; A data set construction module, used to obtain a large number of historical textile images and historical description texts, and to construct a data set after preprocessing each of the historical textile images and historical description texts; A textile lace pattern generation model training module, used for training the textile lace pattern generation model through the data set until the loss function is less than a preset loss threshold, and the hyperparameters are continuously optimized during the training process; A textile lace pattern generation module, used to obtain an input reference image or real-time description text, input the reference image or real-time description text into a trained textile lace pattern generation model, and generate a textile lace pattern; The textile lace pattern fine-tuning module is used to fine-tune the textile lace pattern based on input user feedback.
7. A textile lace pattern automatic generation system as claimed in claim 6, characterized in that: In the textile lace pattern generation model creation module, the feature extraction module is used to extract pattern features from historical textile images or historical description texts; The encoding module is used to map each of the pattern features into a feature vector according to a preset vector mapping table, and bind each of the pattern features and the corresponding feature vector to store in a feature space; The pattern generation module is used to extract feature vectors from the feature space to generate an initial lace pattern; The fine-tuning module is used to adjust the layout of the initial lace pattern to meet the preset layout rules and output the textile lace pattern; The identification module is used to perform pattern quality judgment on the output textile lace pattern, generate an adversarial training supervision signal, and tune the pattern generation module based on the adversarial training supervision signal.
8. A textile lace pattern automatic generation system as claimed in claim 6, characterized in that: The parameter setting module is specifically used for: The loss function of the textile lace pattern generation model is set to a least squares loss function, and the textile lace pattern generation model is set to include at least hyperparameters of a learning rate, a number of iterations, a batch size, a number of neurons, and a convolution kernel size.
9. A textile lace pattern automatic generation system as claimed in claim 6, characterized in that: The data set construction module is specifically used for: Acquire a large number of historical textile images and historical description texts from a database through an ETL tool, perform preprocessing on each of the historical textile images including at least resizing, color correction, cropping, rotation, scaling, filtering, and sharpening, and perform preprocessing on each of the historical description texts including at least text cleaning, stop word removal, part-of-speech tagging, noise removal, spelling correction, and duplicate content removal; The pre-processed historical textile images and historical description texts are annotated with pattern features to construct a data set.
10. A textile lace pattern automatic generation system as claimed in claim 6, characterized in that: The textile lace pattern generation model training module is specifically used for: Dividing the data set into a training set, a validation set, and a test set based on a ratio of 7:2:1, training the textile lace pattern generation model through the training set until the loss function is less than a preset loss threshold, and continuously optimizing the hyperparameters during the training process; The PSNR index, SSIM index and LPIPS index of the trained textile lace pattern generation model are calculated by the verification set to verify the textile lace pattern generation model, and if the verification fails, the training set is expanded to continue training; Calculating the confidence of the verified textile lace pattern generation model through the test set to test the textile lace pattern generation model, and if the test fails, expanding the training set to continue training; The textile lace pattern fine-tuning module is specifically used for: The input user feedback is obtained, and when the user feedback is unsatisfactory, the textile lace pattern is input into the textile lace pattern generation model for fine-tuning.
Citation Information
Cited By
Textile vamp jacquard pattern intelligent generation method and system based on double LoRA models
CN121685695A