Woven yarn and fabric bidirectional spectrum prediction construction method and system

By establishing a two-way relationship model between the yarn and fabric spectrum, the problem of inaccurate fabric color analysis in textile production is solved, and the yarn to fabric spectrum prediction is achieved, which improves production efficiency and inventory management.

CN119394969AActive Publication Date: 2025-02-07WUHAN TEXTILE UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411647760.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-07
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The fabric color analysis and production in textile production are inaccurate, resulting in the problem of "inconsistent goods" and waste of corporate resources and inventory backlog.

Method used

By establishing a bidirectional relationship model between the yarn and fabric spectrum, a spectrophotometer is used to measure the spectral reflectance of yarn and fabric, combining a multi-output wrap linear regression model and a multi-layer perceptron neural network to construct the positive of yarn to fabric Directional and reverse spectral prediction models.

Benefits of technology

The spectral prediction of the fabric after woven yarns of any color are realized and the corresponding yarn spectra of the fabric sample are accurately analyzed, which solves the problem of inaccurate fabric color and improves production efficiency and inventory management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119394969A_ABST
    Figure CN119394969A_ABST
Patent Text Reader

Abstract

The invention relates to a woven yarn and fabric bidirectional spectrum prediction construction method and system, and the method comprises the steps: collecting yarns of different colors, and making a yarn winding sample of the yarns; measuring by using a spectrophotometer to obtain spectral reflectivity data of the yarn; setting process parameters for manufacturing the woven fabric sample by using the yarns; manufacturing a woven fabric sample by using woven fabric proofing machine equipment according to the set process parameters; measuring by using a spectrophotometer to obtain spectral reflectivity data of the fabric sample; constructing a yarn-to-fabric forward spectrum prediction model based on fabric process parameters; constructing a fabric-to-yarn reverse spectrum prediction model based on fabric process parameters; manufacturing a test fabric according to the new process parameters, and respectively inspecting the bidirectional spectrum prediction model performance of the yarns and the fabric; and calculating the average value of the RMSE of the tested fabric under the two models, and taking the average value as an index for evaluating the overall performance of the two models to obtain a final bidirectional spectrum prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer digital image processing, and in particular relates to a method and system for constructing bidirectional spectrum prediction of woven yarns and fabrics. Background Art

[0002] In the textile production process, accurate analysis and production of fabric colors have always been a difficult problem faced by companies. Problems such as "goods not matching the specifications" caused by inaccurate fabric color production are emerging in an endless stream, causing companies to have large amounts of product inventory, causing huge human, material and economic losses to the textile industry. Currently, neither academia nor industry has proposed an effective solution.

[0003] As we all know, unlike the color measurement and management of the smooth surface of traditional printed products, textiles are usually woven from yarns according to a specific weaving process. Taking the weaving production process as an example, by weaving colored yarns according to the set warp density, weft density and other weaving parameters, plain, twill and satin fabrics with different texture characteristics can be obtained to meet the fabric needs of cloth merchants. In the weaving process, after the yarns of the same color are woven into fabrics according to different weaving process parameters, the change of process parameters will lead to texture differences on the surface of the woven fabric, which will cause differences in the transmission paths of light on the surface and inside of the fabric, and then lead to differences in fabric color under different process parameters. Therefore, the yarns of the same color are woven according to different weaving process parameters, and the final fabric colors are different. However, there is no relevant research to explore and reveal the mechanism and law of fabric color changes obtained by yarns under different weaving process parameters, which restricts the accurate analysis of the color of fabrics sampled by customers by enterprises, resulting in "goods not matching the board" of product colors and product inventory backlogs.

[0004] In addition, the spectrum is the fingerprint of color. On the premise of obtaining the spectrum information of yarn and fabric, the relationship modeling can be carried out based on the spectrum information of yarn, weaving process parameters, and corresponding fabric, so as to accurately predict the spectrum of the fabric of any color under specific weaving process parameters; conversely, the corresponding yarn spectrum can also be reversely solved according to the fabric spectrum and its corresponding weaving process parameters, so as to achieve accurate prediction of the two-way spectrum of yarn and fabric, support enterprises to accurately analyze and correctly produce samples from customers, improve enterprise supply efficiency, reduce enterprise inventory backlog, and bring tangible benefits to enterprises and industries. As for the construction of the relationship model between yarn spectrum, weaving process parameters, and fabric spectrum, the academic and industrial circles at home and abroad have not proposed a good solution. Summary of the invention

[0005] The purpose of the present invention is to solve the problems described in the background technology. By establishing a bidirectional relationship model between yarn and fabric spectra with textile process parameters as the medium, the spectrum prediction of yarn of any color after being woven into fabric and the accurate analysis of yarn spectrum corresponding to fabric samples of any color can be realized, thereby solving the problem of product color mismatch in actual production of enterprises. The implementation of this technology requires first collecting yarns of different colors to make yarn winding samples; secondly, using a spectrophotometer to measure the spectral reflectance of the winding samples; then, setting the process parameters for making woven fabric samples using yarns, and using woven fabric proofing equipment according to the set process parameters to prepare fabric samples with different texture characteristics; then, using a spectrophotometer to measure the spectral reflectance of the fabric samples; then, using a multi-output wrapped linear regression model, construct a yarn to fabric forward spectral prediction model based on fabric process parameters; then, using a multi-layer perceptron neural network, construct a fabric to yarn reverse spectral prediction model based on fabric process parameters; then, according to the new process parameters, make test fabrics, and test the performance of the bidirectional spectral prediction model of yarn and fabric respectively; finally, calculate the average value of the spectral root mean square error of the test fabric under the two models as an indicator for evaluating the overall performance of the two models, and obtain the final bidirectional spectral prediction model. The technical solution of the present invention is a method for constructing bidirectional spectral prediction of woven yarns and fabrics, which specifically includes the following steps:

[0006] Step 1, collect yarns of different colors and make yarn winding samples;

[0007] Step 2, using a spectrophotometer to measure and obtain spectral reflectance data of the yarn;

[0008] Step 3, setting process parameters for making woven fabric samples using yarn;

[0009] Step 4, using a woven fabric sampling device to make a woven fabric sample according to set process parameters;

[0010] Step 5, using a spectrophotometer to measure and obtain spectral reflectance data of the fabric sample;

[0011] Step 6, constructing a yarn-to-fabric forward spectrum prediction model based on fabric process parameters;

[0012] Step 7, constructing a fabric-to-yarn reverse spectrum prediction model based on fabric process parameters;

[0013] Step 8, using the methods of steps 3 and 4, making test fabric samples according to the new process parameters, and testing the performance of the bidirectional spectral prediction model of yarn and fabric respectively;

[0014] Step 9, calculate the average value of the spectral root mean square error of the test fabric under the two models as an indicator for evaluating the overall performance of the two models, and obtain the final bidirectional spectral prediction model.

[0015] Furthermore, in step 1, a total of N colors of yarn are collected, and the N colors of yarn need to be dispersed as much as possible in the color space to cover a sufficiently large color range. The N colors of yarn are respectively wound four layers on a white reflective standard plate to obtain a standard winding yarn sample.

[0016] Furthermore, in step 2, for each yarn winding sample, M measurements are performed on a desktop spectrophotometer, and the average value is taken to obtain the spectral reflectance data of the yarn.

[0017] Furthermore, in step 3, the main process parameters in the production of woven fabrics include texture and yarn density, among which the texture parameters mainly include plain weave, twill and satin. Under the premise of selecting the texture parameters, the fabric with a specific texture is obtained by interlacing the warp and weft yarns. Among them, the factors affecting the yarn density are divided into two aspects: warp density and weft density. The warp density is mainly determined by the number of reeds of the proofing equipment, and the weft density is mainly determined by the number of wefts of the proofing equipment. According to the range of the actual production process parameters of the enterprise, a reasonable parameter combination of texture, warp density and weft density is set through orthogonal experiments for proofing of actual fabric samples.

[0018] Furthermore, in step 4, proofing is performed using a fully automatic weaving sample machine according to the proofing parameters set in step 3. By setting the texture, the yarn is wound around the warp beam in sequence, and the warp beam gradually releases the yarn to ensure consistent tension and arrangement during weaving. After the yarn passes through the heald frame and the reed, the heald frame controls the up and down movement of the warp yarn to form a weaving fell, so that the weft yarn can be smoothly inserted and combined to form an interlaced fabric structure. The reed is used to arrange the warp yarn and the weft to ensure uniform yarn density and close combination of the fabric, thereby obtaining a fabric with a specific density and texture.

[0019] Furthermore, in step 5, each fabric sample obtained by proofing is measured M times on a desktop spectrophotometer, and the average value is taken to obtain the spectral reflectance data of the fabric sample.

[0020] Furthermore, in step 6, a yarn-to-fabric forward spectrum prediction model based on fabric process parameters is constructed, and the implementation method is as follows:

[0021] First, based on steps 1 to 5, the yarn spectral dataset and fabric spectral dataset were obtained respectively, and the datasets were preprocessed. The texture of the fabric was set as a categorical variable and converted into a numerical feature using one-hot encoding. The number of reeds and the number of wefts were taken as continuous numerical features. The above feature data were processed using the z-score standardization method to eliminate the influence of different dimensions. The standardization formula used is shown in formula (1):

[0022]

[0023] In the formula, x is the original eigenvalue, μ is the mean of the feature, σ is the standard deviation of the feature, and x * is the standardized eigenvalue.

[0024] Secondly, the standardized parameter features corresponding to each fabric sample and the spectral reflectance of the corresponding yarn are combined as the input features of the forward spectral prediction model from yarn to fabric. The spectral reflectance of each fabric sample is used as the output feature of the model to complete the construction of the paired data set required for model training.

[0025] Then, a linear multi-output regression model is used to construct a forward spectrum prediction model from yarn to fabric. For the sampled fabric, by testing the yarn density and the spectral reflectance of the corresponding fabric under different texture characteristics, it is found that there is a significant linear negative correlation between the yarn density and the spectral reflectance of the fabric, that is, the greater the yarn density, the lower the value of each wavelength of the spectral reflectance of the fabric. Therefore, the present invention uses a linear multi-output regression model to construct a mapping relationship between each band of the spectral reflectance of the fabric sample and the process parameters, with the goal of predicting the spectral reflectance of the fabric based on the spectral reflectance of the standard yarn and the process parameters of the fabric (texture, reed number and weft number).

[0026] For the i-th fabric sample and wavelength λ j , the linear regression model is expressed as shown in formula (2):

[0027]

[0028] Where: is the i-th sample at wavelength λ j The predicted response rate under is the wavelength λ j The intercept term of is the wavelength λ j The regression coefficient of feature k (k = 1, 2, 3, 4, 5, 6, 7), X Reed,i and X Weft,i are the number of reeds and the number of wefts, respectively, Plain,i , X TwillReverse,i , X TwillFront,i , X SatinReverse,i and X SatinFront,i is the one-hot encoded variable of the weaving process.

[0029] To estimate the regression coefficient matrix β and the intercept vector B, the Ordinary Least Squares (OLS) method is used, whose goal is to minimize the residual sum of squares. j , the loss function is defined as formula (3):

[0030]

[0031] Where: is the i-th sample at wavelength λ j The true response rate under is the i-th sample at wavelength λ j The predicted response rate.

[0032] Finally, the s-fold cross validation method is used to complete the model training and verification to ensure the robustness of the model. For each s-fold cross validation, the dataset Divide into s disjoint subsets D 1 ,D 2 ,...,D s , each subset size is n / s. In the i-th iteration (i∈{1,2,...,k}), select D i As the validation set, the remaining s-1 subsets are used as training sets. The training process of each fold is carried out independently. Finally, the results of the five experiments are summarized to calculate the performance of the model. A sample weight adjustment mechanism is introduced in each fold to improve the prediction effect of the model.

[0033] The weights of all samples are initialized to 1 at the beginning of training, which means that each sample contributes equally to the model during training, as shown in formula (4).

[0034]

[0035] In the formula, represents the initial weight of the i-th sample, and N is the total number of samples in the training set.

[0036] In each fold of training, based on the current sample feature X i and weight Train a regression model and generate predictions for each sample As shown in formula (5),

[0037]

[0038] In the formula, Indicates that at the tth iteration, the current weight is used The predicted value of the trained model for the i-th sample.

[0039] For each sample, calculate its prediction error And in the multi-output regression task, the errors of all outputs are averaged, as shown in formula (6):

[0040]

[0041] Where M is the output dimension (i.e. the number of wavelengths), and They represent the true value and predicted value of the i-th sample at the m-th output (wavelength), respectively.

[0042] The weight of each sample is adjusted according to its error. The weight of the sample with larger error increases, and the weight of the sample with smaller error decreases. The weight adjustment formula is shown in formula (7):

[0043]

[0044] In the formula, α is an adjustment coefficient (usually 0.1 or less) that controls the magnitude of the weight update. According to this formula, samples with larger errors will receive higher weights, thus having a greater impact on the model in the next round of training.

[0045] In order to prevent the weights of some samples from being too large or too small, the weights of all samples need to be normalized to ensure that the sum of all sample weights is 1 as shown in formula (8):

[0046]

[0047] The normalization process ensures the balance of sample weights, allowing the model to optimize its performance based on the weights of different samples during each training.

[0048] After each fold of training is completed, the model will predict the training set and calculate the error. The results of all folds will be summarized and their spectral root mean square error (RMSE) will be calculated to evaluate the overall performance of the model.

[0049] RMSE is used to measure the average deviation between the model prediction value and the actual value, reflecting the prediction accuracy of the model. Its calculation formula is formula (9):

[0050]

[0051] Where n is the number of samples; y i is the actual value of the i-th sample; is the predicted value of the i-th sample.

[0052] Furthermore, in step 7, a fabric-to-yarn reverse spectrum prediction model based on fabric process parameters is constructed, and the implementation method is as follows:

[0053] First, the data source is consistent with the forward spectral prediction model of yarn to fabric based on fabric process parameters. The difference is that the input of the reverse model is the spectral reflectance and process parameters of the fabric, and the output is the spectral reflectance of the yarn. The input feature X is generated using the spectral data of the fabric and the corresponding process parameters (texture, reed number and weft number), and the target variable y is generated using the corresponding yarn spectral emissivity.

[0054] Then, a multi-layer perceptron (MLP) neural network is used to learn the reverse mapping relationship from fabric spectral reflectance and process parameters to yarn spectrum. The core of the reverse model is a multi-layer perceptron (MLP) neural network, which includes two fully connected layers. The first layer contains 128 neurons and the second layer contains 32 neurons. Each layer contains ReLU activation function and L2 regularization to avoid overfitting. In order to further prevent overfitting, a Dropout layer is added. The Dropout layer uses Dropout after each layer to randomly discard the connections of some neurons to further reduce overfitting. The mathematical expression of the model can be expressed as formula (10):

[0055] y=f(X)(10)

[0056] Among them, X is the input feature vector, which contains the encoded features of the number of reeds, the number of wefts and the texture, as well as the predicted value of the fabric spectrum; y is the output of the model, which represents the predicted yarn spectral reflectance, and f(X) represents the mapping process through a multi-layer perceptron network, in which the output of each layer is converted by the weighted sum of the previous layer through an activation function. The mean square error (MSE) is used as the loss function to measure the difference between the prediction and the actual value. The mean square error is a commonly used loss function in regression tasks, and its formula is:

[0057]

[0058] Among them, y i is the true value; is the predicted value; N is the sample size.

[0059] Finally, in order to evaluate the generalization ability of the model, the s-fold cross-validation method is also used to complete the training and validation of the model to ensure the robustness of the model. In the training and validation process of each fold, the neural network will update the weights and biases according to the loss function through the back propagation algorithm to optimize the parameters of the network. For each s-fold cross-validation, according to the method in step 6, the data is also divided into a training set and a validation set, and the model is trained using the training set and evaluated on the validation set.

[0060] Further, in step 8, the test fabric samples are prepared according to the new process parameters using the methods of steps 3 and 4, and the yarn spectral reflectance, process parameters and test fabric spectral reflectance are processed in the same way according to the data processing methods used in the forward and reverse spectral prediction model building, and the performance of the bidirectional spectral prediction model of yarn and fabric is tested respectively;

[0061] Furthermore, in step 9, the RMSE averages of all test samples under the forward and reverse models are calculated respectively, and the overall average of the RMSE averages of all test samples under the two models is taken as an indicator for evaluating the overall performance of the two models to obtain the final bidirectional spectral prediction model. At this point, the construction of the bidirectional spectral prediction model for woven yarns and fabrics is completed.

[0062] The present invention also provides a system for constructing a bidirectional spectrum prediction model for woven yarns and fabrics, comprising:

[0063] one or more processors;

[0064] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a method for constructing a bidirectional spectral prediction model for woven yarns and fabrics as described in the above technical solution.

[0065] The present invention solves the current color consistency management problem and proposes to establish a mapping model between fabric process parameters and fabric spectral reflectance to accurately predict the spectral reflectance of fabric and yarn, which has important application value for color control of textiles, fabric color matching and product design. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 is a flow chart of an embodiment of the present invention.

[0067] Figure 2 This is the forward spectrum prediction result from yarn to fabric of the test fabric in the present invention.

[0068] Figure 3 This is the reverse spectrum prediction result from fabric to yarn for the test fabric in the present invention. DETAILED DESCRIPTION

[0069] When the technical solution of the present invention is specifically implemented, it can be operated by those skilled in the art using computer software technology.

[0070] Combined with Figure 1 The embodiment of the present invention proposes a method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics, which specifically includes the following steps:

[0071] Step 1, collect yarns of different colors and make yarn winding samples;

[0072] Step 2, using a spectrophotometer to measure and obtain spectral reflectance data of the yarn;

[0073] Step 3, setting process parameters for making woven fabric samples using yarn;

[0074] Step 4, using a woven fabric sampling device to make a woven fabric sample according to set process parameters;

[0075] Step 5, using a spectrophotometer to measure and obtain spectral reflectance data of the fabric sample;

[0076] Step 6, constructing a yarn-to-fabric forward spectrum prediction model based on fabric process parameters;

[0077] Step 7, constructing a fabric-to-yarn reverse spectrum prediction model based on fabric process parameters;

[0078] Step 8, using the methods of steps 3 and 4, making test fabric samples according to the new process parameters, and testing the performance of the bidirectional spectral prediction model of yarn and fabric respectively;

[0079] Step 9, calculate the average value of the spectral root mean square error of the test fabric under the two models as an indicator for evaluating the overall performance of the two models, and obtain the final bidirectional spectral prediction model.

[0080] The processing process of each step is specifically described below through an example: The example is based on a SGA598 fully automatic rapier loom, an X-rite Colori7 desktop spectrophotometer, a white reflection standard plate, and 32-count pure cotton yarn to test the method of the present invention.

[0081] In step 1, a total of N colors of yarn are collected, and each color of yarn is twisted from 32 pure cotton yarns. The N colors of yarn need to be dispersed as much as possible in the color space to cover a sufficiently large color range. The N colors of yarn are respectively wound four layers on a white reflective standard plate to obtain a standard winding yarn sample. As a test, a total of 6 colors of yarn are collected in the embodiment, namely red, green, yellow, blue, purple, and gray, and the colors are sufficiently dispersed.

[0082] In step 2, for each yarn winding sample, an X-rite Colori7 desktop spectrophotometer is used to perform M measurements in a 20 mm large aperture and SCE mode, and the average value is taken to obtain the spectral reflectance data of the yarn. In the embodiment, the value of M is taken as 10 times.

[0083] In step 3, the main process parameters in the production of woven fabrics include texture and yarn density, among which the texture parameters mainly include plain, twill and satin. Under the premise of selecting the texture parameters, the fabric with a specific texture is obtained by interlacing the warp and weft yarns. Among them, the factors affecting the yarn density are divided into two aspects: warp density and weft density. The warp density is mainly determined by the number of reeds of the proofing equipment, and the weft density is mainly determined by the number of wefts of the proofing equipment. According to the range of the actual production process parameters of the enterprise, a reasonable parameter combination of texture, warp density and weft density is set by orthogonal experiments for proofing of actual fabric samples. In the embodiment, the values ​​of the number of reeds are 40, 50, and 60, respectively, and the values ​​of the number of wefts are 1, 5, 10, and 20, respectively. The texture parameters mainly include plain, twill front, twill back, satin front, and satin back.

[0084] In step 4, according to the proofing parameters set in step 3, the SGA598 fully automatic rapier weaving machine is used for proofing. By setting the texture, the yarn is wound around the warp beam in sequence, and the warp beam gradually releases the yarn to ensure consistent tension and arrangement during weaving. After the yarn passes through the heald frame and the reed, the heald frame controls the up and down movement of the warp yarn to form a weaving fell, so that the weft yarn can be smoothly inserted and combined to form an interlaced fabric structure. The reed is used to arrange the warp yarn and the weft yarn to ensure that the yarn density is uniform and the fabric is tightly combined, so as to obtain a fabric with a specific density and texture. In the embodiment, a total of 360 fabric samples are obtained using 6 colors of yarn and the proofing parameters in step 3.

[0085] Further, in step 5, for each fabric sample obtained by proofing, an X-rite Colori7 desktop spectrophotometer is used to perform M measurements in a 20 mm large aperture and SCE mode, and the average value is taken to obtain the spectral reflectance data of the fabric sample. In the embodiment, the value of M is 10 times.

[0086] In step 6, a yarn-to-fabric forward spectrum prediction model based on fabric process parameters is constructed, and the implementation method is as follows:

[0087] First, based on steps 1 to 5, the yarn spectral dataset and fabric spectral dataset were obtained respectively, and the datasets were preprocessed. The texture of the fabric was set as a categorical variable and converted into a numerical feature using one-hot encoding. The number of reeds and the number of wefts were taken as continuous numerical features. The above feature data were processed using the z-score standardization method to eliminate the influence of different dimensions. The standardization formula used is shown in formula (1):

[0088]

[0089] In the formula, x is the original eigenvalue, μ is the mean of the feature, σ is the standard deviation of the feature, and x * is the standardized eigenvalue.

[0090] Secondly, the standardized parameter features corresponding to each fabric sample and the spectral reflectance of the corresponding yarn are combined as the input features of the forward spectral prediction model from yarn to fabric. The spectral reflectance of each fabric sample is used as the output feature of the model to complete the construction of the paired data set required for model training.

[0091] Then, a linear multi-output regression model is used to construct a forward spectrum prediction model from yarn to fabric. For the sampled fabric, by testing the yarn density and the spectral reflectance of the corresponding fabric under different texture characteristics, it is found that there is a significant linear negative correlation between the yarn density and the spectral reflectance of the fabric, that is, the greater the yarn density, the lower the value of each wavelength of the spectral reflectance of the fabric. Therefore, the present invention uses a linear multi-output regression model to construct a mapping relationship between each band of the spectral reflectance of the fabric sample and the process parameters, with the goal of predicting the spectral reflectance of the fabric based on the spectral reflectance of the standard yarn and the process parameters of the fabric (texture, reed number and weft number).

[0092] For the i-th fabric sample and wavelength λ j , the linear regression model is expressed as shown in formula (2):

[0093]

[0094] Where: is the i-th sample at wavelength λ j The predicted response rate under is the wavelength λ j The intercept term of is the wavelength λ j The regression coefficient of feature k (k = 1, 2, 3, 4, 5, 6, 7), X Reed,i and X Weft,i are the number of reeds and the number of wefts, respectively, Plain,i , X TwillReverse,i , X TwillFront,i , X SatinReverse,i and X SatinFront,i is the one-hot encoded variable of the weaving process.

[0095] To estimate the regression coefficient matrix β and the intercept vector B, the Ordinary Least Squares (OLS) method is used, whose goal is to minimize the residual sum of squares. j , the loss function is defined as formula (3):

[0096]

[0097] Where: is the i-th sample at wavelength λ j The true response rate under is the predicted response rate of the ith sample at wavelength λj.

[0098] Finally, the s-fold cross validation method is used to complete the model training and verification to ensure the robustness of the model. For each s-fold cross validation, the dataset Divide into s disjoint subsets D 1 ,D 2 ,...,D s , each subset size is n / s. In the i-th iteration (i∈{1,2,...,k}), select D i As the validation set, the remaining s-1 subsets are used as training sets. The training process of each fold is carried out independently. Finally, the results of the five experiments are summarized to calculate the performance of the model. A sample weight adjustment mechanism is introduced in each fold to improve the prediction effect of the model. In the embodiment, the value of s is taken as 5 fold and 10 fold for model construction and verification.

[0099] The weights of all samples are initialized to 1 at the beginning of training, which means that each sample contributes equally to the model during training, as shown in formula (4).

[0100]

[0101] In the formula, represents the initial weight of the i-th sample, and N is the total number of samples in the training set.

[0102] In each fold of training, based on the current sample feature X i and weight Train a regression model and generate predictions for each sample As shown in formula (5),

[0103]

[0104] In the formula, Indicates that at the tth iteration, the current weight is used The predicted value of the trained model for the i-th sample.

[0105] For each sample, calculate its prediction error And in the multi-output regression task, the errors of all outputs are averaged, as shown in formula (6):

[0106]

[0107] Where M is the output dimension (i.e. the number of wavelengths), and They represent the true value and predicted value of the i-th sample at the m-th output (wavelength), respectively.

[0108] The weight of each sample is adjusted according to its error. The weight of the sample with larger error increases, and the weight of the sample with smaller error decreases. The weight adjustment formula is shown in formula (7):

[0109]

[0110] In the formula, α is an adjustment coefficient (usually 0.1 or less) that controls the magnitude of the weight update. According to this formula, samples with larger errors will receive higher weights, thus having a greater impact on the model in the next round of training.

[0111] In order to prevent the weights of some samples from being too large or too small, the weights of all samples need to be normalized to ensure that the sum of all sample weights is 1 as shown in formula (8):

[0112]

[0113] The normalization process ensures the balance of sample weights, allowing the model to optimize its performance based on the weights of different samples during each training.

[0114] After each fold of training is completed, the model will predict the training set and calculate the error. The results of all folds will be summarized and their spectral root mean square error (RMSE) will be calculated to evaluate the overall performance of the model.

[0115] RMSE is used to measure the average deviation between the model prediction value and the actual value, reflecting the prediction accuracy of the model. Its calculation formula is formula (9):

[0116]

[0117] Where n is the number of samples; y i is the actual value of the i-th sample; is the predicted value of the i-th sample. Since the output variable is the spectral reflectance data in the wavelength range of 400nm to 700nm, with a total of 31 wavelength points, the RMSE is calculated for each wavelength point. This wavelength-by-wavelength RMSE calculation method helps to analyze the prediction performance of the model at different wavelengths.

[0118] In step 7, a fabric-to-yarn reverse spectrum prediction model based on fabric process parameters is constructed, and the implementation method is as follows:

[0119] First, the data source is consistent with the forward spectral prediction model of yarn to fabric based on fabric process parameters. The difference is that the input of the reverse model is the spectral reflectance and process parameters of the fabric, and the output is the spectral reflectance of the yarn. The input feature X is generated using the spectral data of the fabric and the corresponding process parameters (texture, reed number and weft number), and the target variable y is generated using the corresponding yarn spectral emissivity.

[0120] Then, a multi-layer perceptron (MLP) neural network is used to learn the reverse mapping relationship from fabric spectral reflectance and process parameters to yarn spectrum. The core of the reverse model is a multi-layer perceptron (MLP) neural network, which includes two fully connected layers. The first layer contains 128 neurons and the second layer contains 32 neurons. Each layer contains ReLU activation function and L2 regularization to avoid overfitting. In order to further prevent overfitting, a Dropout layer is added. The Dropout layer uses Dropout after each layer to randomly discard the connections of some neurons to further reduce overfitting. The mathematical expression of the model can be expressed as formula (10):

[0121] y=f(X) (10)

[0122] Among them, X is the input feature vector, which contains the encoded features of the number of reeds, the number of wefts and the texture, as well as the predicted value of the fabric spectrum; y is the output of the model, which represents the predicted yarn spectral reflectance, and f(X) represents the mapping process through a multi-layer perceptron network, in which the output of each layer is converted by the weighted sum of the previous layer through an activation function. The mean square error (MSE) is used as the loss function to measure the difference between the prediction and the actual value. The mean square error is a commonly used loss function in regression tasks, and its formula is:

[0123]

[0124] Among them, y i is the true value; is the predicted value; N is the sample size.

[0125] Finally, in order to evaluate the generalization ability of the model, the s-fold cross validation method is also used to complete the training and verification of the model to ensure the robustness of the model. In the training and verification process of each fold, the neural network updates the weights and biases according to the loss function through the back propagation algorithm to optimize the parameters of the network. For each s-fold cross validation, according to the method in step 6, the data is also divided into a training set and a verification set, and the training set is used to train the model and evaluate it on the verification set. In the embodiment, the value of s is taken as 5 fold and 10 fold respectively for model construction and verification.

[0126] In step 8, using the methods of steps 3 and 4, 6 test fabric samples are made according to the new process parameters, and the yarn spectral reflectance, process parameters and test fabric spectral reflectance are processed in the same way according to the data processing methods used in the forward and reverse spectral prediction model building, and the performance of the bidirectional spectral prediction model of yarn and fabric is tested respectively.

[0127] In step 9, the RMSE averages of all test samples under the forward and reverse models are calculated respectively, and the overall average of the RMSE averages of all test samples under the two models is taken as an indicator to evaluate the overall performance of the two models, and the final bidirectional spectral prediction model is obtained. At this point, the construction of the bidirectional spectral prediction model for woven yarns and fabrics is completed.

[0128] In the embodiment, the specific results are shown in Table 1 and Table 2, respectively. The average RMSE of the two models at 5 fold and 10 fold are 0.0090 and 0.0081 respectively. The spectral prediction results of the corresponding forward and reverse models for the six test fabrics are shown in Table 1 and Table 2, respectively. Figure 2 and Figure 3 shown.

[0129] Table 1

[0130]

[0131] Table 2

[0132]

[0133]

[0134] On the other hand, an embodiment of the present invention further provides a system for constructing a bidirectional spectrum prediction model for woven yarns and fabrics, comprising:

[0135] one or more processors;

[0136] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement a method for constructing a bidirectional spectral prediction model for woven yarns and fabrics as described in the above technical solution.

[0137] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.

Claims

1. A method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics, characterized in that: The specific steps include: Step 1, collect yarns of different colors and make yarn winding samples; Step 2, using a spectrophotometer to measure and obtain spectral reflectance data of the yarn; Step 3, setting process parameters for making woven fabric samples using yarn; Step 4, using a woven fabric sampling device to make a woven fabric sample according to set process parameters; Step 5, using a spectrophotometer to measure and obtain spectral reflectance data of the fabric sample; Step 6, constructing a yarn-to-fabric forward spectrum prediction model based on fabric process parameters; Step 7, constructing a fabric-to-yarn reverse spectrum prediction model based on fabric process parameters; Step 8, using the methods of steps 3 and 4, making test fabric samples according to the new process parameters, and testing the performance of the bidirectional spectral prediction model of the yarn and the fabric respectively, the bidirectional spectral prediction model includes a yarn to fabric forward spectral prediction model and a fabric to yarn reverse spectral prediction model; Step 9, calculate the average value of the spectral root mean square error of the test fabric under the two models as an indicator for evaluating the overall performance of the two models, and obtain the final bidirectional spectral prediction model.

2. A method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 1, characterized in that: A total of N colors of yarns are collected, and the N colors of yarns are respectively wound four times on a white reflective standard plate to obtain a standard winding yarn sample.

3. The method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 1, characterized in that: In step 2, for each yarn winding sample, M measurements are performed on a desktop spectrophotometer, and the average value is taken to obtain the spectral reflectance data of the yarn.

4. The method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 1, characterized in that: In step 3, the process parameters include texture and yarn density, wherein the texture parameters include plain weave, twill and satin. Under the premise of selecting the texture parameters, the fabric with a specific texture is obtained by interlacing the warp and weft yarns; wherein, the factors affecting the yarn density are divided into two aspects: warp density and weft density. The warp density is determined by the reed number of the proofing equipment, and the weft density is determined by the weft number of the proofing equipment. According to the range of the actual production process parameters of the enterprise, a reasonable parameter combination of texture, warp density and weft density is set through orthogonal experiments for proofing of actual fabric samples.

5. The method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 1, characterized in that: In step 6, a yarn-to-fabric forward spectrum prediction model based on fabric process parameters is constructed, and the implementation method is as follows: Firstly, based on steps 1 to 5, the yarn spectral dataset and fabric spectral dataset were obtained respectively, and the datasets were preprocessed; the texture of the fabric was set as a categorical variable and converted into a numerical feature using one-hot encoding, and the number of reeds and wefts were taken as continuous numerical features. The above feature data were processed using the z-score standardization method to eliminate the influence of different dimensions; Secondly, the standardized parameter features corresponding to each fabric sample and the spectral reflectance of the corresponding yarn are combined as the input features of the forward spectral prediction model from yarn to fabric. The spectral reflectance of each fabric sample is used as the output feature of the model to complete the construction of the paired data set required for model training. Then, a linear multi-output regression model is used to build a yarn-to-fabric forward spectral prediction model: For the i-th fabric sample and wavelength λ j , the linear regression model is expressed as shown in formula (2): Where: is the i-th sample at wavelength λ j The predicted response rate under is the wavelength λ j The intercept term of is the wavelength λ j The regression coefficient of feature k, k = 1, 2, 3, 4, 5, 6, 7, X Reed,i and X Weft,i are the number of reeds and the number of wefts, respectively, Plain,i , X TwillReverse,i , X TwillFront,i , X SatinReverse,i and X SatinFront,i is the one-hot encoded variable of weaving process; To estimate the regression coefficient matrix β and the intercept vector B, the least squares method is used, whose goal is to minimize the residual sum of squares; for the wavelength λ j , the loss function is defined as formula (3): Where: is the i-th sample at wavelength λ j The true response rate under is the i-th sample at wavelength λ j The predicted response rate.

6. A method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 5, characterized in that: The s-fold cross validation method is used to complete the training and verification of the yarn-to-fabric forward spectrum prediction model to ensure the robustness of the model; For each s-fold cross validation, the dataset Divide into s disjoint subsets D1, D2, ..., D s , each subset size is n / s; in the i-th iteration, select D i As the validation set, the remaining s-1 subsets are used as training sets. The training process of each fold is carried out independently. Finally, the results of the five experiments are summarized to calculate the performance of the model. The sample weight adjustment mechanism is introduced in each fold to improve the prediction effect of the model. The weights of all samples are initialized to 1 at the beginning of training, which means that each sample contributes equally to the model during training, as shown in formula (4). In the formula, represents the initial weight of the i-th sample, and N is the total number of samples in the training set; In each fold of training, based on the current sample feature X i and weight Train a regression model and generate predictions for each sample As shown in formula (5), In the formula, Indicates that at the tth iteration, the current weight is used The predicted value of the trained model for the i-th sample; For each sample, calculate its prediction error And in the multi-output regression task, the errors of all outputs are averaged, as shown in formula (6): Where M is the output dimension, i.e. the number of wavelengths, and Respectively represent the true value and predicted value of the i-th sample at the m-th output; The weight of each sample is adjusted according to its error. The weight of the sample with larger error is increased, and the weight of the sample with smaller error is reduced. The weight adjustment formula is shown in formula (7): In the formula, α is the adjustment coefficient, which controls the amplitude of weight update; In order to prevent the weights of some samples from being too large or too small, the weights of all samples need to be normalized to ensure that the sum of all sample weights is 1, as shown in formula (8): After each fold of training is completed, the model will predict the training set and calculate the error. The results of all folds will be summarized to calculate the spectral root mean square error (RMSE) to evaluate the overall performance of the model. The calculation formula is (9): Where n is the number of samples; y i is the actual value of the i-th sample; is the predicted value of the i-th sample.

7. The method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 1, characterized in that: In step 7, a fabric-to-yarn reverse spectrum prediction model based on fabric process parameters is constructed, and the implementation method is as follows: First, the data source is consistent with the forward spectrum prediction model from yarn to fabric based on fabric process parameters. The difference is that the input of the reverse model is the spectral reflectance and process parameters of the fabric, and the output is the spectral reflectance of the yarn. The input feature X is generated using the spectral data of the fabric and the corresponding process parameters, and the target variable y is generated using the corresponding yarn spectral emissivity. Then, a multi-layer perceptron (MLP) neural network is used to learn the reverse mapping relationship from fabric spectral reflectance and process parameters to yarn spectrum. The core of the reverse model is a multi-layer perceptron (MLP) neural network, which includes two fully connected layers. The first layer contains 128 neurons and the second layer contains 32 neurons. Each layer contains ReLU activation function and L2 regularization to avoid overfitting. In order to further prevent overfitting, a Dropout layer is added. The Dropout layer uses Dropout after each layer to randomly discard the connections of some neurons to further reduce overfitting. The mathematical expression of the model can be expressed as formula (10): y=f(X)(10) Where X is the input feature vector, which contains the encoded features of the number of reeds, number of wefts and texture, as well as the predicted value of the fabric spectrum; y is the output of the model, which represents the predicted yarn spectral reflectance; f(X) represents the mapping process through a multi-layer perceptron network, in which the output of each layer is converted by the weighted sum of the previous layer through an activation function; the mean square error MSE is used as the loss function to measure the difference between the prediction and the actual value, and its formula is: Among them, y i is the true value; is the predicted value; N is the sample size.

8. A method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 7, characterized in that: In step 7, the s-fold cross-validation method is used to complete the training and verification of the fabric-to-yarn reverse spectral prediction model. In each fold of training and verification, the neural network updates the weights and biases according to the loss function through the back propagation algorithm to optimize the network parameters.

9. The method for constructing a bidirectional spectrum prediction model for woven yarns and fabrics according to claim 1, characterized in that: In step 9, the RMSE averages of all test samples under the yarn-to-fabric forward spectral prediction model and the fabric-to-yarn reverse spectral prediction model are calculated respectively, and the overall average of the RMSE averages of all test samples under the two models is taken as an indicator for evaluating the overall performance of the two models to obtain the final bidirectional spectral prediction model. At this point, the construction of the bidirectional spectral prediction model for woven yarns and fabrics is completed.

10. A system for constructing a bidirectional spectrum prediction model for woven yarns and fabrics, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement a method for constructing a bidirectional spectral prediction model for woven yarns and fabrics as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Colored fiber mixed color matching method based on double-constant Kubelka-Munk theory

    CN106469258A

  • Halftone equipment spectral color separation algorithm optimization and correction method and system

    CN107509005A

  • Machine learning method for quickly constructing super-surface as required

    CN112199892A

  • Vegetation canopy water content remote sensing inversion method based on radiation transfer model

    CN115329681A

  • Modeling method for chlorophyll content of corn canopy

    CN118212525A