Printing pattern embroidery style evaluation feedback generation method based on deep learning
By constructing a deep learning model for information fusion and feedback, the problem of loss of embroidery style characteristics in digital printing is solved, and high-quality embroidery stylization and embroidery style embroidery style of fabrics is achieved.
Patent Information
- Application Number
- CN202510290507.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-12
AI Technical Summary
When the prior art imparts the embroidery style of fabrics through digital printing, there is a loss of high-dimensional features and semantic features, resulting in weak embroidery style, and the penetration effect of printing and dyeing ink can easily lead to loss of pattern on the fabric pattern on the embroidery style.
Using the deep learning-based printing pattern embroidery style evaluation feedback generation method, a four-path information fusion embroidery printing generation model and a printing style realism evaluation model are constructed, and the embroidery style printing patterns are generated and input into a digital printing machine. The images are collected through the image acquisition system for realism evaluation and feedback, so as to achieve high-quality generation of embroidery style and embroidery style embroidery style imparting of fabrics.
The authenticity and quality of embroidery-style images are improved through the feedback mechanism, and the information fusion operator ensures minimized feature losses, achieving high-quality embroidery stylization and editable print generation.
Smart Images

Figure CN119808192A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for generating evaluation feedback of a printing pattern embroidery style based on deep learning, and belongs to the technical field of digital printing. Background Art
[0002] Embroidery is a fabric style with distinctive characteristics. Traditional embroidery technology mainly relies on manual labor, which has high requirements for designers and consumes a lot of manpower, time and material costs, and is also limited by traditional styles. Using digital printing can quickly give fabrics an embroidery style, so generating images with embroidery style to guide digital printing to generate printed design patterns with embroidery style can effectively promote resource conservation.
[0003] The Chinese patent with publication number CN118015127A discloses a method and device for synthesizing a design pattern with embroidery texture, and an electronic device, which mainly includes a generator and a discriminator, and performs style transfer on the embroidery design draft to achieve the generation of embroidery texture, but the style is single and there will be feature loss. The Chinese patent with publication number CN117094882A discloses a lossless digital embroidery image style transfer method, system, device and medium, which realizes embroidery style transfer through a reversible residual module to achieve the generation of embroidery style printed pattern images, but this method is limited to embroidery image generation and does not generate fabrics through digital printing.
[0004] Due to the limitation of printing technology, embroidery style printing patterns often suffer from great loss of embroidery style when guiding digital printing to generate fabrics. Many high-dimensional features and semantic features will be lost, resulting in a weak embroidery style. Moreover, the penetration of printing and dyeing inks can easily lead to the loss of embroidery style in the patterns on the fabrics. Therefore, the Chinese patent with publication number CN117290902A discloses a parametric modeling method for hand-embroidery patterns used in digital printing technology. By extracting the key features of embroidery texture, the realism of embroidery images is improved. This method can effectively improve the clarity of embroidery fabric style, but it still requires a lot of manual intervention and experience, and the operation is complicated.
[0005] The Chinese patent with publication number CN101333740A discloses a computer embroidery process using simulated image technology. By processing the collected pictures and outputting the images, this method further reduces manual intervention, but the embroidery style of the fabric is damaged to a certain extent. The Chinese patent with publication number CN117156070A discloses an intelligent parameter control method and system for an embroidery machine. By performing process decomposition and label encryption on the embroidery image, an intelligent parameter adjustment scheme is further obtained. The intelligent parameter control of the embroidery machine can be realized, so as to weave fabrics with embroidery style effects; however, the system load is cumbersome and there are problems with the adaptation of the embroidery machine.
[0006] In summary, the above methods are still immature in giving fabrics embroidery style through digital printing. Summary of the invention
[0007] In order to solve the problems existing in the above-mentioned prior art, the present invention provides a method for generating embroidery style evaluation feedback of printed patterns based on deep learning, which generates embroidery style printed patterns through a four-path information fusion embroidery printing generation model and inputs them into a digital printing machine, and collects images through an image acquisition system and inputs them into a printing style realism evaluation model, outputs a realism evaluation and gives feedback, and gives the fabric an embroidery style through digital printing. The above process realizes the digital printing generation of embroidery style printed cloth, and improves the authenticity through a feedback mechanism, and realizes the controllability and pertinence of elements through editability; the method realizes the digital printing generation of embroidery style printed cloth by constructing two deep learning models, namely a four-path information fusion embroidery printing generation model and a printing style realism evaluation model.
[0008] The purpose of the present invention is to provide a method for generating embroidery style evaluation feedback of printed patterns based on deep learning. The method realizes the generation of embroidery style printed patterns by constructing a four-path information fusion embroidery print generation model and a printing style realism evaluation model.
[0009] The specific steps of the method proposed by the present invention are as follows: Step 1: Collect print design patterns and corresponding embroidery style print patterns to construct dataset 1, and divide dataset 1 into training set, validation set and test set; Step 2: Use the training set obtained in step 1 to train and obtain a four-path information fusion embroidery print generation model; Step 3: Collect embroidery style print patterns and their subjective evaluation levels as Dataset 2, and divide Dataset 2 into training set, validation set and test set; Step 4: Use the training set obtained in step 3 to train and obtain a printing style realism evaluation model; Step 5: Input the print design pattern into the four-path information fusion embroidery print generation model obtained in step 2 to generate an embroidery style print pattern; Step 6: Input the embroidery style print pattern image obtained in step 5 into the print style realism evaluation model obtained in step 4, obtain the corresponding evaluation and feed it back to the four-path information fusion embroidery print generation model; Step 7: Input the print design pattern into the four-path information fusion embroidery print generation model that has been evaluated and fed back in step 6 to generate an embroidery style print pattern, thereby realizing the embroidery of prints; In one embodiment, the ratio of the training set, the validation set, and the test set in the data set 1 of step 1 is 8:1:1; In one embodiment, the four-path information fusion embroidery print generation model in step 2 includes four information processing paths, an information fusion operator and a decoder, wherein: The first path includes a knitting needle process editing software and a knitting needle information encoder, the input of the knitting needle information encoder is a knitting needle process feature map, and the output is a knitting needle trajectory feature; The second path includes an edge information extraction module and an edge information encoder, the input of the edge information extraction module is the printing design pattern, and the output is the edge information feature map, the input of the edge information encoder is the edge information feature map, and the output is the edge information feature; The third path includes a color block information extraction module and a color block positioning encoder, the input of the color block information extraction module is the printing design pattern, and the output is the color block information feature map, and the input of the color block positioning encoder is the color block information feature map, and the output is the color clustering feature; The fourth path includes a raw information encoder, whose input is the printing design pattern and whose output is the raw features of the printing design pattern; The input of the information fusion operator is the needle trajectory features, edge information features, color clustering features and original features of the printing design pattern, and the output is a high-dimensional vector of embroidery printing.
[0010] The input of the decoder is the embroidery print high-dimensional vector, and the output is the embroidery style print pattern, which is calculated as follows: (1.1) in, is a high-dimensional vector for embroidery printing, Embroidery style printed pattern. is a nonlinear transformation function, where Representative Nonlinear calculation of layers, is a fully connected layer, where Representative Fully connected layer calculation, It is a nonlinear changing function.
[0011] In one embodiment, in the first path, the knitting needle process diagram is derived from the knitting needle process editing software, and the calculation method thereof is: (1.2) in, To input the print design pattern, To output the knitting needle process feature map, It is the processing process of the knitting needle process editing software, and the knitting process feature map is obtained by custom editing in the process feature vector matrix.
[0012] The knitting needle information encoder in the first path has a knitting needle process feature map as input and a knitting needle trajectory feature as output, and the calculation method is: (1.3) in, This is a characteristic diagram of knitting needle technology. is the needle trajectory feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling calculation method. is a high-dimensional mapping, which is calculated as: (1.4) in, is the weight learned by the knitting needle information encoder, Bias learned for the needle information encoder.
[0013] In one embodiment, in the second path, the input of the edge information extraction module is the printing design pattern, and the output is the edge information feature map, which is calculated by: (1.5) in, To input the print design pattern, Design the coordinates for the print. is the edge information feature map, is a Laplace filter used to supplement high frequencies. is the weight used for Laplace filtering, Indicated in The gradient of the direction, Representative filter The usage weight, Representative filter The direction of the edge or change of interest, Representative direction A collection of filters The calculation method is: (1.6) in, To input the print design pattern, is to input the coordinates of the printed design pattern, is a nonlinear activation function, The edge information encoder in the second path takes the edge information feature map as input and outputs the edge information feature, which is calculated as follows: (1.7) in, is the edge information feature map, is the edge information feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling method. is a high-dimensional mapping, which is calculated as follows: (1.8) in, are the weights learned by the edge information encoder, Bias learned for the edge information encoder.
[0014] In one embodiment, in the third path, the input of the color block information extraction module is the print design pattern, and the output is the color block information feature map, and the calculation method is: (1.9) in, is to input the coordinates of the printed design pattern, is the color block information feature map, Represents the number of color blocks, is the center of the color block. It is the type of color block. is a pre-trained neural network. represents the number of convolution scales, represents the total number of convolution scales, Represents the morphological gradient, which is used to extract the color block boundary. is a color clustering method. Represents the convolution calculation with a convolution kernel size of 5x5.
[0015] In the third path, the input of the color block location encoder is the color block information feature map, and the output is the color clustering feature. The calculation method is: (1.10) in, is the color block information feature map, is the color clustering feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling method. is a high-dimensional mapping, which is calculated as follows: (1.10) in, The weights learned by the encoder for patch localization, Bias learned by the patch localization encoder.
[0016] In one embodiment, the input of the information fusion operator is the needle trajectory feature, the edge information feature, the color clustering feature, and the original feature of the printing design pattern, and the output is the embroidery printing high-dimensional vector. The calculation method is: (1.11) in, is a high-dimensional vector for embroidery printing, is the needle trajectory feature, Edge information feature 1, is the edge information feature 2, is the color clustering feature, Design the original features of the print pattern. is a nonlinear activation function, is the nonlinear activation function 2, represents the dot product, It is a weighted merging operation, and its calculation process is as follows: the input edge information features are divided into edge information feature 1 and edge information feature 2 along the channel dimension; edge information feature 1 is added to the needle trajectory feature, and edge information feature 2 is multiplied by the color clustering feature. Finally, the two are weighted merged with the original features of the printing design pattern to obtain the embroidery printing high-dimensional vector. The weighted average operation calculation method is as follows: (1.12) in, is a high-dimensional vector for embroidery printing, , , They represent different learnable weights, which are used to adjust the proportion of different information in the generation of embroidery style print patterns. , , The calculation method is as follows: (1.13) (1.14) (1.15) In one embodiment, the total loss function of the model is The calculation method is as follows: (1.16) Total loss function The first loss function and the second loss function Composition, the first loss function Used to judge the color difference, the second loss function Evaluate the authenticity of the needle technique; Used to adjust the first loss function Total loss function The specific gravity is set in the range of (0.35-0.45). Used to adjust the second loss function Total loss function The specific gravity is set in the range of (0.55-0.65); Among them, the first loss function The calculation method is: (1.17) in, Representative label embroidery style printed pattern The color value of a pixel, Representative generated embroidery style print pattern The color value of a pixel, Represents the total number of pixel values; The second loss function The calculation method is: (1.18) in, is the total number of pixels in the image, Representative label embroidery style printed pattern The Hessian matrix of the position, Representative generated embroidery style printed pattern in Hessian matrix of the position; The second loss function The calculation process is to use a Gaussian high-pass filter to extract the high-frequency texture features of the image and perform Fourier transform to obtain a spectrum map. The Hessian matrix is used to describe the second-order derivative information of the local area of the spectrum map to capture the local changes of the texture. The specific calculation method is: (1.19) in, , The spectrum is and The second derivative of the direction, , is the mixed second-order derivative of the spectrogram; this matrix can describe the local curvature and directionality of the texture.
[0017] When the loss function reaches a minimum, the model training is completed.
[0018] In one embodiment, the ratio of the training set, the validation set, and the test set in the data set 2 of step 3 is 8:1:1; In one embodiment, the print style realism evaluation model in step 4 is a convolutional neural network with multiple convolution blocks stacked, the input is an image of embroidery style printed cloth, and the output is a realism evaluation index. Its main structure is: the first two layers are convolution layers with a convolution kernel size of 7x7 and a maximum pooling layer of 3x3, followed by six convolution blocks, each of which contains 2-3 convolution layers, and residual connections are used between convolution blocks. Different evaluation components are connected after every two convolution blocks. The specific calculation method of the convolution block is: (2.1) in is the convolutional block input, is the output of the convolutional block, It is a nonlinear activation method. Represents the convolutional block The convolutional layer pair of layers Calculation of The range is (2,3), and the specific calculation method is: (2.2) GY is the normalized calculation method, It is The convolutional layer of the layer has a 3×3 convolution operation.
[0019] In one embodiment, the loss function is used The printing style realism evaluation model is constrained, and the loss function The expression is: (2.3) in, is the loss function of the print style realism evaluation model, is the number of images in dataset 2, represents the realism evaluation index, Represents the realistic evaluation index of the model prediction results. When the loss function When the value is minimum, the model training is completed.
[0020] In one embodiment, the realism evaluation index is constructed as follows: Step 1: Embroidery style evaluation: The image feature map of the printed design pattern and the embroidery style printed cloth is used through the pre-trained neural network model to obtain the overall embroidery style evaluation of the embroidery style. The specific calculation method is as follows: (2.4) in, For embroidery style evaluation, Design patterns for printing, For embroidery style printed cloth images, It is a pre-trained neural network model that can extract the main style features of embroidery styles for comparison and scoring.
[0021] Step 2: Texture feature evaluation: The image feature maps of the printed design pattern and the embroidery style printed cloth are extracted with Gabor filters and compared to obtain texture feature evaluation. The specific calculation method is as follows: (2.5) in, For texture feature evaluation, Design patterns for printing, For embroidery style printed cloth images, It is Gabor filters, is the cosine similarity, is the number of Gabor filters; through texture feature evaluation, the local detail texture of the image of the embroidery style printed cloth can be fed back and optimized.
[0022] Step 3: Color migration evaluation: convert the image feature maps of the printed design pattern and the embroidery style printed cloth into a unified Lab color space, and analyze the main color tone, contrast and saturation distribution of the two through the color clustering algorithm. Finally, the color histogram matching degree is used to quantify the degree of color distribution preservation. The specific calculation method is as follows: (2.6) in, For color migration evaluation, Represents the weight of contrast and saturation evaluation, Represents the weight of the color histogram matching degree, Design patterns for printing, For embroidery style printed cloth images, For color space conversion, is the color clustering algorithm, is the contrast and saturation comparison of the two images, Color histogram for designing patterns for prints, Color histogram for an image of embroidery-style printed fabric.
[0023] In one implementation, the specific process of feeding back the realism evaluation index to the four-path information fusion embroidery print generation model is as follows: Step (1): Supplementing the embroidery style; when the embroidery style evaluation does not meet expectations, increase the weight of the edge information feature plus the needle trajectory feature. , enhancing the complement of embroidery style.
[0024] Step (2): Texture feature supplementation: Use the knitting needle process editing software to add multi-channel embroidery stitches to the knitting needle process feature map to enhance the stitch texture supplementation and change the weights learned by the edge information encoder .
[0025] Step (3): Color migration alignment; when the color migration evaluation does not meet expectations, increase the weight of the multiplication of edge information feature 2 and color clustering feature , ensuring the alignment of the image colors of the printed design pattern and embroidery style printed fabric.
[0026] Beneficial effects of the present invention: High-quality embroidery stylization: The feedback mechanism promotes the high-quality generation of embroidery style images and the assignment of embroidery style to the corresponding fabrics. The information fusion operator enables the model to accept and fuse multiple feature information inputs, thereby minimizing feature loss.
[0027] Editable print generation: There are four ways to achieve this: pattern editing of the information fusion embroidery print generation model and process parameter editing on the digital printing machine, which can provide a channel for experienced designers to participate and improve the embroidery style effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] 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 only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 It is a technical roadmap of the printing pattern embroidery style generation and evaluation feedback method based on deep learning provided by the present invention; Figure 2 It is a structural diagram of a four-path information fusion embroidery print generation model of a print pattern embroidery style generation and evaluation feedback method based on deep learning provided by the present invention; Figure 3 It is a structural diagram of a printing style realism evaluation model of a printing pattern embroidery style generation and evaluation feedback method based on deep learning provided by the present invention; Figure 4 It is a structural diagram of an information fusion operator of a printing pattern embroidery style generation and evaluation feedback method based on deep learning provided by the present invention. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0031] Embodiment 1 This embodiment provides a method for generating embroidery style evaluation feedback of printed patterns based on deep learning. The method generates embroidery style printed patterns by constructing a four-path information fusion embroidery print generation model and a print style realism evaluation model. The technical roadmap of the method is as follows: Figure 1 As shown, the printing design pattern is input into the four-path information fusion embroidery printing generation model, and the four-path information fusion embroidery printing generation model is used to realize the generation of embroidery style printing patterns and input into the digital printing machine, and the digital printing machine outputs embroidery style printed cloth, and the image generated by the image acquisition system is input into the printing style realism evaluation model, and the authenticity of the image is evaluated by the printing style realism evaluation model and the evaluation result is fed back to the four-path information fusion embroidery printing generation model to further constrain the generation of the image. The method steps of the present invention are as follows: Step 1: Collect print design patterns and corresponding embroidery style print patterns to construct dataset 1, and divide dataset 1 into training set, validation set and test set; Step 2: Use the training set obtained in step 1 to train and obtain a four-path information fusion embroidery print generation model; Step 3: Collect embroidery style print patterns and their subjective evaluation levels as Dataset 2, and divide Dataset 2 into training set, validation set and test set; Step 4: Use the training set obtained in step 3 to train and obtain a printing style realism evaluation model; Step 5: Input the print design pattern into the four-path information fusion embroidery print generation model obtained in step 2 to generate an embroidery style print pattern; Step 6: Input the embroidery style print pattern image obtained in step 5 into the print style realism evaluation model obtained in step 4, obtain the corresponding evaluation and feed it back to the four-path information fusion embroidery print generation model; Step 7: Input the print design pattern into the four-path information fusion embroidery print generation model that has been evaluated and fed back in step 6 to generate an embroidery style print pattern, thereby realizing the embroidery of prints; The steps to construct the four-path information fusion embroidery print generation model are as follows: 1. Collect print design patterns and corresponding embroidery style print patterns to construct data set 1, and divide data set 1 into training set, validation set and test set; 2. Use the data set 1 obtained in 1 to train and obtain a four-path information fusion embroidery print generation model; 3. Input the four-path information in step 2 into the embroidery print generation model to generate an embroidery style print pattern, thus realizing the embroidery of prints; The ratio of training set, validation set and test set in data set 1 is 8:1:1; like Figure 2 As shown in FIG. 1 , the four-path information fusion embroidery print generation model includes four information processing paths, an information fusion operator and a decoder, where: The first path includes a knitting needle process editing software and a knitting needle information encoder, the input of the knitting needle information encoder is a knitting needle process feature map, and the output is a knitting needle trajectory feature; The second path includes an edge information extraction module and an edge information encoder, the input of the edge information extraction module is the printing design pattern, and the output is the edge information feature map, the input of the edge information encoder is the edge information feature map, and the output is the edge information feature; The third path includes a color block information extraction module and a color block positioning encoder, the input of the color block information extraction module is the printing design pattern, and the output is the color block information feature map, and the input of the color block positioning encoder is the color block information feature map, and the output is the color clustering feature; The fourth path includes a raw information encoder, whose input is the printing design pattern and whose output is the raw features of the printing design pattern; like Figure 4 As shown, the input of the information fusion operator is the needle trajectory feature, edge information feature, color clustering feature and original feature of the printing design pattern, and the output is the embroidery print high-dimensional vector.
[0032] The input of the decoder is the embroidery print high-dimensional vector, and the output is the embroidery style print pattern, which is calculated as follows: (1.1) in, is a high-dimensional vector for embroidery printing, Embroidery style printed pattern. is a nonlinear transformation function, where Representative Nonlinear calculation of layers, is a fully connected layer, where Representative Fully connected layer calculation, It is a nonlinear changing function.
[0033] The calculation method is: (1.20) in, is a fully connected layer, where Representative Fully connected layer calculation; It is a nonlinear change function. The specific calculation method is as follows: (1.21) In the first path, the knitting needle process diagram comes from the knitting needle process editing software Vilcom Embroidery Studio, version number is e4.2h, and the main functions used include digitizing flat needles and displaying needles.
[0034] The input of the knitting needle information encoder is the knitting needle process feature map, and the output is the knitting needle trajectory feature. The calculation method is: (1.3) in, This is a characteristic diagram of knitting needle technology. is the needle trajectory feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling calculation method, and the calculation method is as follows: (1.22) in, Representative feature map Pixel points of a certain area block; is a high-dimensional mapping, which is calculated as: (1.4) in, is the weight learned by the knitting needle information encoder, Bias learned for the needle information encoder.
[0035] In the second path, the input of the edge information extraction module is the printing design pattern, and the output is the edge information feature map, which is calculated as follows: (1.5) in, To input the print design pattern, Design the coordinates for the print. is the edge information feature map, is a Laplace filter used to supplement high frequencies. is the weight used for Laplace filtering, Indicated in The gradient of the direction, Representative filter The usage weight, Representative filter The direction of the edge or change of interest, Representative direction A collection of filters The calculation method is: (1.6) in, To input the print design pattern, is to input the coordinates of the printed design pattern, is a nonlinear activation function, The edge information encoder in the second path takes the edge information feature map as input and outputs the edge information feature, which is calculated as follows: (1.7) in, is the edge information feature map, is the edge information feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling method, and the calculation method is as follows: (1.22) Representative feature map Pixel points of a certain area block; is a high-dimensional mapping, which is calculated as follows: (1.8) in, are the weights learned by the edge information encoder, Bias learned for the edge information encoder.
[0036] In the third path, the input of the color block information extraction module is the printing design pattern, and the output is the color block information feature map. The calculation method is: (1.9) in, is to input the coordinates of the printed design pattern, is the color block information feature map, is the center of the color block. It is the type of color block. is a pre-trained neural network. represents the number of convolution scales, represents the total number of convolution scales, Represents the morphological gradient, which is used to extract the color block boundary. is a color clustering method. Represents the convolution calculation with a convolution kernel size of 5x5.
[0037] The input of the color block location encoder is the color block information feature map, and the output is the color clustering feature. The calculation method is: (1.10) in, is the color block information feature map, is the color clustering feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling method, and the calculation method is: (1.23) in, Representative feature map ; is a high-dimensional mapping, which is calculated as follows: (1.10) in, The weights learned by the encoder for patch localization, Bias learned by the patch localization encoder.
[0038] The input of the information fusion operator is the needle trajectory feature, edge information feature, color clustering feature, and original feature of the printing design pattern. The output is the embroidery printing high-dimensional vector. The calculation method is: (1.11) in is a high-dimensional vector for embroidery printing, is the needle trajectory feature, Edge information feature 1, is the edge information feature 2, is the color clustering feature, Design the original features of the print pattern. is a nonlinear activation function, It is the second nonlinear activation function. The specific method is: (1.24) (1.25) in, It is a weighted merging operation, and its calculation process is as follows: the input edge information features are divided into edge information feature 1 and edge information feature 2 along the channel dimension; edge information feature 1 is added to the needle trajectory feature, and edge information feature 2 is multiplied by the color clustering feature. Finally, the two are weighted merged with the original features of the printing design pattern to obtain the embroidery printing high-dimensional vector; among them, the weighted average operation calculation method is as follows: (1.12) in is a high-dimensional vector for embroidery printing, , , They represent different learnable weights, which are used to adjust the proportion of different information in the generation of embroidery style print patterns. , , The calculation method is as follows: (1.13) (1.14) (1.15) The total loss function of the model is calculated as follows: (1.16) Total loss function The first loss function and the second loss function Composition, the first loss function Used to judge the color difference, the second loss function Evaluate the authenticity of the needle technique; Used to adjust the first loss function Total loss function The specific gravity is set in the range of (0.35-0.45). Used to adjust the second loss function Total loss function The proportion of is set in the range of (0.55-0.65); among them, the first loss function The calculation method is: (1.17) in, Representative label embroidery style printed pattern The color value of a pixel, Representative generated embroidery style print pattern The color value of a pixel, Represents the total number of pixel values; The second loss function The calculation method is: (1.18) in, is the total number of pixels in the image, Representative label embroidery style printed pattern The Hessian matrix of the position, Representative generated embroidery style printed pattern in Hessian matrix of the position; The second loss function The calculation process is to use a Gaussian high-pass filter to extract the high-frequency texture features of the image and perform Fourier transform to obtain a spectrum map. The Hessian matrix is used to describe the second-order derivative information of the local area of the spectrum map to capture the local changes of the texture. The specific calculation method is: (1.19) in, , The spectrum is and The second derivative of the direction, , is the mixed second-order derivative of the spectrogram; this matrix can describe the local curvature and directionality of the texture.
[0039] When the total loss function When it is minimum and no longer decreases with training, the training of the four-path information fusion embroidery print generation model is completed.
[0040] The specific steps to build a printing style realism evaluation model are as follows: (1) Collect embroidery style print patterns and their subjective evaluation levels as Dataset 2, and divide Dataset 2 into training set, validation set and test set; (2) Using the dataset 2 obtained in (1) to train a print style realism evaluation model; (3) Input the embroidery style print pattern image collected by the image acquisition system into the print style realism evaluation model in (2), obtain the corresponding evaluation and feed it back to the four-path information fusion embroidery print generation model; The ratio of training set, validation set and test set in dataset 2 of (1) is 8:1:1; like Figure 3As shown in the figure, the print style realism evaluation model is a convolutional neural network with multiple convolutional blocks stacked. The input is the image of embroidery style printed cloth, and the output is the realism evaluation index. Its main structure is: the first two layers are convolutional layers with a convolution kernel size of 7x7 and a 3x3 maximum pooling layer, followed by six convolutional blocks. Each convolutional block contains 2-3 convolutional layers. Different evaluation components are connected after every two convolutional blocks, and residual connections are used between convolutional blocks. The specific calculation method of the convolutional block is: (2.1) in is the convolutional block input, is the output of the convolutional block, It is a nonlinear activation method. The specific calculation method is: (2.7) Represents the convolutional block The convolutional layer pair of layers Calculation of The range is (2,3), and the specific calculation method is: (2.2) This is a normalized calculation method. The specific calculation method is: (2.8) It is The convolutional layer of the layer has a 3×3 convolution operation.
[0041] In one embodiment, the loss function is used The printing style realism evaluation model is constrained, and the loss function The expression is: (2.3) in, is the loss function of the print style realism evaluation model, is the number of images in dataset 2, represents the realism evaluation index, Represents the realistic evaluation index of the model prediction results. When the loss function When it is minimum and does not decrease during the training process, the training of the print style realism evaluation model is completed.
[0042] The realism evaluation index is constructed as follows: (1) Embroidery style evaluation: The image feature maps of the printed design pattern and the embroidery style printed cloth are used through the pre-trained neural network model to obtain the overall embroidery style evaluation. The specific calculation method is as follows: (2.4) in, For embroidery style evaluation, Design patterns for printing, For embroidery style printed cloth images, It is a pre-trained neural network model that can extract the main style features of embroidery styles for comparison and scoring.
[0043] (2) Texture feature evaluation: The image feature maps of the printed design pattern and the embroidery style printed cloth are extracted through Gabor filters and compared to obtain texture feature evaluation. The specific calculation method is as follows: (2.5) in, For texture feature evaluation, Design patterns for printing, For embroidery style printed cloth images, It is Gabor filters, is the cosine similarity, is the number of Gabor filters; through texture feature evaluation, the local detail texture of the image of the embroidery style printed cloth can be fed back and optimized.
[0044] (3) Color migration evaluation: The image feature maps of the printed design pattern and the embroidery style printed fabric are converted to a unified Lab color space, and the main color tone, contrast, and saturation distribution of the two are analyzed by the color clustering algorithm. Finally, the color histogram matching degree is used to quantify the degree of color distribution preservation. The specific calculation method is as follows: (2.6) in, For color migration evaluation, Represents the weight of contrast and saturation evaluation, Represents the weight of the color histogram matching degree, Design patterns for printing, For embroidery style printed cloth images, For color space conversion, is the color clustering algorithm, is the contrast and saturation comparison of the two images, Color histogram for designing patterns for prints, Color histogram for an image of embroidery-style printed fabric.
[0045] The specific process of feedback of the realism evaluation index to the four-path information fusion embroidery print generation model is as follows: (1) Embroidery style supplement: When the embroidery style evaluation does not meet expectations, increase the weight of the edge information feature plus the needle trajectory feature. , enhancing the complement of embroidery style.
[0046] (2) Texture feature supplementation: Use the knitting needle process editing software to add multi-channel embroidery stitches to the knitting needle process feature map to enhance the stitch texture supplementation and change the weights learned by the edge information encoder .
[0047] (3) Color migration alignment: When the color migration evaluation does not meet expectations, increase the weight of the multiplication of edge information feature 2 and color clustering feature. , ensuring the alignment of the image colors of the printed design pattern and embroidery style printed fabric.
[0048] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.
[0049] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating evaluation feedback of printed pattern embroidery style based on deep learning, characterized in that: The method comprises: S1: Collect print design patterns and corresponding embroidery style print patterns to construct data set 1, which is divided into training set, validation set and test set; S2: training the training set obtained in S1 to obtain a four-path information fusion embroidery print generation model; S3: collect embroidery style print patterns and their corresponding subjective evaluation levels as data set 2, and divide them into training set, validation set and test set; S4: training the training set obtained in S3 to obtain a printing style realism evaluation model; S5: Input the print design pattern into the four-path information fusion embroidery print generation model obtained in S2 to generate an embroidery style print pattern; S6: input the embroidery style print pattern obtained in S5 into the print style realism evaluation model obtained in S4, obtain the corresponding evaluation and feed it back to the four-path information fusion embroidery print generation model; S7: Generate embroidery style print patterns through the embroidery print generation model by fusing the four-path information after feedback; The four-path information fusion embroidery print generation model in S2 includes four information processing paths, an information fusion operator and a decoder, wherein: The first path includes a knitting needle information encoder; The second path includes an edge information extraction module and an edge information encoder; The third path includes a color block information extraction module and a color block positioning encoder; The fourth path includes a raw information encoder; The main structure of the print style realism evaluation model in S4 is as follows: the first two layers are a convolution layer with a convolution kernel size of 7x7 and a 3x3 maximum pooling layer, followed by six convolution blocks, each of which contains 2-3 convolution layers, and residual connections are used between the convolution blocks, and different evaluation components are connected after every two convolution blocks.
2. The method according to claim 1, characterized in that: In the first path, the knitting needle process diagram is derived from the knitting needle process editing software, and the calculation method is: To input the print design pattern, To output the knitting needle process feature map, It is the process of knitting needle process editing software, which obtains the knitting process feature map by custom editing in the process feature vector matrix; The knitting needle information encoder in the first path has a knitting needle process feature map as input and a knitting needle trajectory feature as output, and the calculation method is: in, This is a characteristic diagram of knitting needle technology. is the needle trajectory feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling calculation method. is a high-dimensional mapping, which is calculated as: in, are the weights learned by the knitting needle information encoder, Bias learned for the needle information encoder; In the second path, the input of the edge information extraction module is the printing design pattern, and the output is the edge information feature map, which is calculated by: in, To input the print design pattern, Design the coordinates for the print. is the edge information feature map, is a Laplace filter used to supplement high frequencies. is the weight used for Laplace filtering, Indicated in The gradient of the direction, Representative filter The usage weight, Representative filter The direction of the edge or change of interest, Representation direction A collection of filters The calculation method is: in, To input the print design pattern, is to input the coordinates of the printed design pattern, is a nonlinear activation function; The edge information encoder in the second path has an edge information feature map as input and an edge information feature as output, which is calculated as follows: in, is the edge information feature map, is the edge information feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling method. is a high-dimensional mapping, which is calculated as follows: in, are the weights learned by the edge information encoder, Bias learned for edge information encoder; In the third path, the input of the color block information extraction module is the printing design pattern, and the output is the color block information feature map. The calculation method is: is to input the coordinates of the printed design pattern, is the color block information feature map, is the center of the color block. It is the type of color block. is a pre-trained neural network. represents the number of convolution scales, represents the total number of convolution scales, Represents the morphological gradient, which is used to extract the color block boundary. It is a color clustering method; In the third path, the input of the color block location encoder is the color block information feature map, and the output is the color clustering feature. The calculation method is: is the color block information feature map, is the color clustering feature, It is composed of three stacked convolutional layers, and the convolution kernel size of each convolutional layer is 3x3. It is a pooling method. is a high-dimensional mapping, which is calculated as follows: in, The weights learned by the encoder for patch localization, Bias learned by the encoder for patch localization; In the fourth path, the input of the original information encoder is the original information feature map, and the output is the original features of the printing design map.
3. The method according to claim 1, characterized in that The input of the information fusion operator is the needle trajectory feature, edge information feature, color clustering feature, and original feature of the printed design pattern, and the output is the embroidery print high-dimensional vector. The calculation method is: in O is a high-dimensional vector for embroidery printing, is the needle trajectory feature, Edge information feature 1, is the edge information feature 2, is the color clustering feature, Design the original features of the print pattern. is a nonlinear activation function, is the nonlinear activation function 2, It is a weighted merging operation, and its calculation process is as follows: the input edge information features are divided into edge information feature 1 and edge information feature 2 along the channel dimension; edge information feature 1 is added to the needle trajectory feature, and edge information feature 2 is multiplied by the color clustering feature. Finally, the two are weighted merged with the original features of the printing design pattern to obtain the embroidery printing high-dimensional vector. The weighted average operation calculation method is as follows: in is a high-dimensional vector for embroidery printing, , , They represent different learnable weights, which are used to adjust the proportion of different information in the generation of embroidery style print patterns.
4. The method according to claim 1, characterized in that The input of the decoder is an embroidery print high-dimensional vector, and the output is an embroidery style print pattern, which is calculated as follows: in, O is a high-dimensional vector for embroidery printing, Embroidery style printed pattern. Indicates Layer nonlinear transformation function calculation, Indicates A fully connected layer is calculated, and sig is a nonlinear transformation function.
5. The method according to claim 1, characterized in that The total loss function calculation method of the four-path information fusion embroidery printing generation model is as follows: Total loss function The first loss function and the second loss function Composition, the first loss function Used to judge the color difference, the second loss function Evaluate the authenticity of the needle technique; Used to adjust the first loss function Total loss function The specific gravity is set in the range of (0.35-0.45). Used to adjust the second loss function Total loss function The specific gravity is set in the range of (0.55-0.65); Among them, the first loss function The calculation method is: in, Representative embroidery style print pattern The color value of a pixel, Represents the generated embroidery style print pattern The color value of a pixel, N Represents the total number of pixel values; The second loss function The calculation method is: in, N is the total number of pixels in the image, Representative embroidery style printed patterns The Hessian matrix of the position, Representative generated embroidery style print pattern in Hessian matrix of the position; The second loss function The calculation process is to use a Gaussian high-pass filter to extract the high-frequency texture features of the image and perform Fourier transform to obtain a spectrum map. The Hessian matrix is used to describe the second-order derivative information of the local area of the spectrum map to capture the local changes of the texture. The specific calculation method is: in, , The spectrum is and The second derivative of the direction, , is the mixed second-order derivative of the spectrum map; this matrix describes the local curvature and directionality of the texture; When the total loss function When it is minimum and does not decrease with the training process, the training of the four-path information fusion embroidery print generation model is completed.
6. The method according to claim 1, characterized in that The specific calculation method of the convolution block in the printing style realism evaluation model is: in is the convolutional block input, is the output of the convolutional block, It is a nonlinear activation method. Represents the convolutional block The convolutional layer pair of layers Calculation of The range is (2,3), and the specific calculation method is: GY is the normalized calculation method, It is The 3×3 convolution operation in the convolutional layer of the layer; A loss function is used to constrain the print style realism evaluation model, and the expression of the loss function is: in, is the loss function of the print style realism evaluation model, is the number of images in dataset 2, represents the realism evaluation index, An evaluation index representing the realism of the model prediction results; When the loss function When it is minimum and does not decrease during the training process, the training of the print style realism evaluation model is completed.
7. The method according to claim 1, characterized in that The purpose of the evaluation component is to construct a realism evaluation index, and there are three evaluation indexes as follows: Indicator 1: Embroidery style evaluation: The image feature map of the printed design pattern and the embroidery style printed cloth is used through the pre-trained neural network model to obtain the overall embroidery style evaluation of the embroidery style. The specific calculation method is as follows: For embroidery style evaluation, Design patterns for printing, For embroidery style printed cloth images, It is a pre-trained neural network model that can extract the main style features of embroidery styles for comparison and scoring; Indicator 2: Texture feature evaluation: The image feature maps of the printed design pattern and the embroidery style printed cloth are extracted with Gabor filters and compared to obtain texture feature evaluation. The specific calculation method is as follows: For texture feature evaluation, Design patterns for printing, For embroidery style printed cloth images, It is Gabor filters, is the cosine similarity, N is the number of Gabor filters; through texture feature evaluation, the local detail texture of the image of the embroidery style printed cloth can be fed back and optimized; Indicator 3: Color migration evaluation: convert the image feature maps of the printed design pattern and the embroidery style printed cloth into a unified Lab color space, and analyze the main color tone, contrast and saturation distribution of the two through the color clustering algorithm; finally, use the color histogram matching degree to quantify the degree of color distribution retention. The specific calculation method is as follows: in, For color migration evaluation, Represents the weight of contrast and saturation evaluation, Represents the weight of the color histogram matching degree, Design patterns for printing, For embroidery style printed cloth images, For color space conversion, is the color clustering algorithm, is the contrast and saturation comparison of the two images, Color histogram for designing patterns for prints, Color histogram for an image of embroidery-style printed fabric.
8. The method according to claim 7, characterized in that The specific process of feeding back the realism evaluation index to the four-path information fusion embroidery print generation model is as follows: Indicator 1 feedback: embroidery style supplement; when the embroidery style evaluation does not meet expectations, the weight of the edge information feature 1 plus the needle trajectory feature is increased , to achieve the complement of embroidery style; Feedback for indicator 2: Texture feature supplementation; add multi-channel embroidery stitches to the knitting needle process feature map through the knitting needle process editing software to supplement the stitch texture, and change the weights learned by the edge information encoder ; Indicator 3 feedback: color migration alignment; When the color migration evaluation does not meet expectations, the weight of the edge information feature 2 multiplied by the color clustering feature is increased. , ensuring the alignment of the image colors of the printed design pattern and embroidery style printed fabric.
Citation Information
Patent Citations
Computer anglicanum applying emulation image technology
CN101333740A
Intelligent parameter regulation and control method and system of embroidery machine
CN117156070A
Manual embroidery imitating pattern parametric modeling method for digital printing process
CN117290902A
Method and device for synthesizing design pattern with embroidery texture and electronic equipment
CN118015127A
Embroidery stitch pattern feature point extraction and matching method
CN111950568A