Dye color matching and color difference training and prediction method and device based on multi-task learning

CN122990241APending Publication Date: 2026-10-27TIANJIN POLYTECHNIC UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611330074.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-10-27

Smart Images

  • Figure CN122990241A_ABST
    Figure CN122990241A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a dye matching and color difference training and prediction method and device based on multi-task learning, and belongs to the technical field of deep learning. The method comprises the following steps: obtaining the characteristics of dyed fabrics, processing the characteristics through a backbone network to obtain global context encoding characteristics, inputting the global context encoding characteristics into a first decoding head and a second decoding head respectively to predict dry-state and wet-state Lab color coordinates, inputting the encoding characteristics and real dry-state Lab color coordinates into a third decoding head after splicing to predict a dye formula, pre-training the backbone network and the first and second decoding heads based on dry-state and wet-state coordinate loss and freezing the weights, training the backbone network and the third decoding head based on formula regression loss and spectrum reconstruction auxiliary loss, predicting dry-state and wet-state Lab and color difference by using pre-training weights, predicting the dye formula by using formula weights, inputting the formula result into the first decoding head to verify the dry-state Lab, and regarding the formula result as an effective formula when the formula result meets preset requirements. Through multi-task learning and two-stage freezing training, the dry-state and wet-state color difference prediction and intelligent dye matching are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning technology, and in particular to a method and apparatus for dye color matching and color difference training prediction based on multi-task learning. Background Technology

[0002] In the field of natural dye textile dyeing, achieving high color reproducibility, precise control of wet and dry color difference, and intelligent formula design simultaneously is a core challenge at the intersection of green textiles and intelligent manufacturing. In particular, there is a systematic wet and dry color difference between dry and wet fabrics caused by the difference in refractive index matching between the fiber-air interface and the fiber-water interface. Operators often determine the color in the wet state, but significant color changes occur after drying, resulting in a large number of trial and error re-dyeings and waste of water resources and chemicals.

[0003] The main technical approaches at present include color card lookup based on human experience, physical modeling methods represented by Kubelka-Munk theory, shallow machine learning models such as support vector machines, random forests and artificial neural networks, as well as single-task deep learning methods that separate color matching and color difference prediction training. These methods attempt to solve the color prediction and recipe design problems from different perspectives.

[0004] However, existing natural dyeing prediction technologies have many inherent shortcomings. Traditional manual color matching has poor stability and significant batch-to-batch color difference fluctuations. Classical theoretical models and shallow intelligent algorithms cannot adapt to the complex dyeing characteristics of natural dyes. Furthermore, traditional deep learning training methods and loss functions have drawbacks. The overall model prediction accuracy is insufficient and does not closely match human visual perception, making it difficult to meet the industrial needs of high-precision intelligent dyeing. Summary of the Invention

[0005] This invention provides a dye color matching and color difference training prediction method and apparatus based on multi-task learning, in order to solve the technical problems of inaccurate color difference prediction, poor color matching stability, and inability to coordinate and optimize dry and wet color difference with formulation design in existing natural dye dyeing technology.

[0006] In a first aspect, embodiments of the present invention provide a dye color matching and color difference training prediction method based on multi-task learning, including: The feature information and true dry Lab color coordinates of the dyed fabric are obtained. The feature information is input into the backbone network to extract global context coding features. The global context coding features are input into the first decoder and the second decoder respectively, and the dry Lab color coordinates and wet Lab color coordinates are output. The global context coding features and the true dry Lab color coordinates are concatenated and input into the third decoder to output the dye formulation vector. Based on dry Lab color coordinates and wet Lab color coordinates, the backbone network, the first decoder head and the second decoder head are pre-trained using dry color coordinate loss and wet color coordinate loss to obtain pre-trained weights. The pre-trained weights are frozen. Based on the dye formulation vector, the backbone network and the third decoder head are trained using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The pre-trained weights are used to predict the dry and wet Lab color coordinates of the wet-dyed fabric to be tested and calculate the dry and wet color difference. The formula weights are used to predict the dye formula of the fabric to be tested. Based on the pre-trained weights, the dye formula prediction results are input into the first decoder to obtain the dry Lab color coordinate prediction results. When the dry Lab color coordinate prediction results meet the preset requirements, the dye formula prediction results are used as the effective dye formula scheme.

[0007] Secondly, embodiments of the present invention also provide a dye color matching and color difference training and prediction device based on multi-task learning, comprising: The feature processing output module is used to obtain the feature information and the true dry Lab color coordinates of the dyed fabric. The feature information is input into the backbone network to extract global context coding features. The global context coding features are input into the first decoder and the second decoder respectively, and the dry Lab color coordinates and wet Lab color coordinates are output. The global context coding features and the true dry Lab color coordinates are concatenated and input into the third decoder to output the dye formulation vector. The training weight generation module is used to pre-train the backbone network, the first decoder head, and the second decoder head based on dry Lab color coordinates and wet Lab color coordinates, using dry color coordinate loss and wet color coordinate loss to obtain pre-trained weights. The pre-trained weights are frozen, and the backbone network and the third decoder head are trained based on the dye formulation vector using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The testing module is used to predict the dry and wet Lab color coordinates of the wet-dyed fabric under test using pre-trained weights and calculate the dry and wet color difference. It also uses formulation weights to predict the dye formulation of the fabric under test. Based on the pre-trained weights, the dye formulation prediction results are input into the first decoding head to obtain the dry Lab color coordinate prediction results. When the dry Lab color coordinate prediction results meet the preset requirements, the dye formulation prediction results are taken as the effective dye formulation scheme.

[0008] Thirdly, embodiments of the present invention also provide a server, comprising: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the dye color matching and color difference training prediction method based on multi-task learning as provided in the above embodiments.

[0009] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the dye color matching and color difference training prediction method based on multi-task learning as provided in the above embodiments.

[0010] The present invention provides a dye color matching and color difference training prediction method and apparatus based on multi-task learning. This method acquires feature information and true dry-state Lab color coordinates of dyed fabrics. The feature information is input into a backbone network to extract global context encoding features. These global context encoding features are then input into a first decoder and a second decoder, outputting dry-state Lab color coordinates and wet-state Lab color coordinates. The global context encoding features are concatenated with the true dry-state Lab color coordinates and input into a third decoder, outputting a dye formulation vector. Based on the dry-state and wet-state Lab color coordinates, the backbone network and the first decoder are pre-trained using dry-state color coordinate loss and wet-state color coordinate loss, respectively. The system uses a first and second decoding heads to obtain pre-trained weights, freezes these weights, and trains the backbone network and a third decoding head based on the dye formulation vector using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The pre-trained weights are then used to predict the dry and wet Lab color coordinates of the fabric to be dyed and calculate the dry-wet color difference. The formulation weights are then used to predict the dye formulation of the fabric. Based on the pre-trained weights, the dye formulation prediction results are input into the first decoding head to obtain the dry Lab color coordinate prediction results. When the dry Lab color coordinate prediction results meet preset requirements, the dye formulation prediction results are taken as the effective dye formulation scheme. Through a multi-task learning architecture and a two-stage frozen training mechanism, the system coordinates forward dry-wet color coordinate prediction and inverse dye formulation solution, achieving accurate prediction of the dry-wet color difference and reliable intelligent color matching output. Attached Figure Description

[0011] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0012] Figure 1 This is a flowchart of the dye color matching and color difference training prediction method based on multi-task learning provided in Embodiment 1 of the present invention; Figure 2 This is a structural diagram of the dye color matching and color difference training prediction device based on multi-task learning provided in Embodiment 2 of the present invention; Figure 3 This is a structural diagram of the server provided in Embodiment 3 of the present invention. Detailed Implementation

[0013] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0014] Example 1 Figure 1 This is a flowchart of a dye color matching and color difference training prediction method based on multi-task learning provided in Embodiment 1 of the present invention. This embodiment can be applied to the prediction of dry and wet color differences and intelligent dye formulation design in the dyeing scenario of natural dye textiles. Specifically, it includes the following steps: Step 110: Obtain the feature information and true dry Lab color coordinates of the dyed fabric. Input the feature information into the backbone network to extract global context encoding features. Input the global context encoding features into the first decoder and the second decoder respectively. Output the dry Lab color coordinates and the wet Lab color coordinates. Concatenate the global context encoding features with the true dry Lab color coordinates and input them into the third decoder to output the dye formulation vector.

[0015] Dyed fabrics refer to fabric samples obtained by dyeing textile substrates with natural dyes, covering common textile substrates such as cotton, silk and linen. Their final color effect is jointly regulated by multiple factors such as dye composition, mordant system, process parameters and substrate properties. Furthermore, there is a systematic color change caused by the difference in refractive index at the fiber interface before and after drying. Dyed fabrics are the core research object for dry and wet color difference prediction and intelligent color matching optimization.

[0016] Obtaining the feature information and true dry-state Lab color coordinates of dyed fabrics is a fundamental data prerequisite for constructing a multi-task learning model. Multi-source feature information can comprehensively cover the core variables affecting dyeing results, providing sufficient input dimensions for the model to extract color-related features. True dry-state Lab color coordinates, as standardized supervision labels, provide an objective benchmark for the accuracy calibration of forward color difference prediction tasks and a basis for judgment in the forward verification of reverse formulations, thus being a necessary foundation for ensuring the convergence of model training and the reliability of prediction results.

[0017] Optionally, the sample dataset used for model training is constructed using a three-region sampling strategy, with a total scale of approximately 3,000 to 5,000 sets of experimental data. Layered sampling ensures comprehensive coverage of core process ranges, mixed dye systems, and extreme operating conditions, providing the model with a sufficiently comprehensive training sample base. The three sampling regions are: First, the core full-factor region, with approximately 2,000 sets of data, covering full-factor experiments of 5 single-component natural dyes and 3 types of substrates. Each combination has parameter gradients of 7 levels of H, 5 levels of dyeing temperature, and 6 levels of dye concentration. The mordant is fixed at 3% owf alum, forming the core data base for the model to learn the dyeing mapping rules. Second, the LHS sparse sampling region, with approximately 1,500 sets of data, covering the interaction parameter space of 15 binary mixed dye combinations and mordant types. A Latin hypercube sampling strategy is used to ensure uniform coverage of the parameter space, supporting the model's generalization ability for mixed dye color matching. Third, an extreme condition supplementary area, with approximately 500 sets of data, focuses on intensive sampling for boundary conditions such as low pH 3.0, high pH 9.0, high temperature 100℃, and high concentration 20% owf, to enhance the model's robustness to extreme industrial conditions.

[0018] For example, the characteristic information of the dyed fabric and the real dry-state Lab color coordinates are collected, preprocessed and constructed according to a standardized process. The dry-state spectral reflectance sequence is detected by an integrating sphere spectrophotometer (such as Datacolor 650 or equivalent instrument) on the dyed and fully dried fabric. The reflectance values ​​R at 31 wavelength points at 10nm intervals in the visible light wavelength range of 400nm to 700nm are collected. Three different positions are selected for each sample and the average value is taken to reduce the measurement error caused by the non-uniformity of the fabric. Then, the minimum and maximum values ​​are normalized to the [0,1] interval to form a one-dimensional sequence that can characterize the color absorption and reflection characteristics of the fabric. The dyeing process parameters cover five core indicators: dye bath pH, ​​dyeing temperature, dyeing time, mordant concentration, and redox potential. The pH range covers 3.0-9.0 to adapt to all process conditions from acidic mordant dyeing to alkaline dyeing; the dyeing temperature range covers 40-100℃ to adapt to room temperature immersion dyeing to high temperature color fixing processes; the dyeing time range covers 15-120 minutes to adapt to light color rapid dyeing to dark color multiple re-dyeing processes; the mordant concentration range is 0-10% owf to cover no mordant to high concentration mordant systems; the redox potential is specifically set for indigo dye systems, and non-indigo systems are filled with preset fixed values ​​and additional mask flag bits. All process parameters are normalized to the [0,1] interval before being input into the model. The dye features consist of total dye usage, dye type coding, mordant type coding, and a mixed dye ratio vector. The total dye usage ranges from 1-20% owf, covering all dyeing needs from light to dark colors. Dye type coding corresponds to five natural dyes: Gardenia Yellow, Safflower Red, Indigo, Lithospermum, and Gallnut. Single-component dyes use one-heat coding, while mixed dye systems use multi-heat vector coding. Mordant type coding corresponds to three common mordants: alum, iron salts, and tannic acid. Zero coding is used when no mordant is used. The mixed dye ratio vector represents the proportion of each dye component used; for single-component dyeing, it is fixed as a unit vector of the corresponding dimension. This coding scheme remains constant during model training and inference. Substrate types include three mainstream natural textile substrates: cotton, silk, and linen. These are subsequently transformed into a feature form that the model can process through learnable labeled embedding vectors. The true dry-state Lab color coordinates use the standard color measurement results of the dried fabric as the true label, and use the three-dimensional values ​​of L, a, and b in the CIELab color space as the calculation benchmark for the dry-state color coordinate loss. They also serve as the target input for the reverse color matching task and the judgment basis for the forward verification.

[0019] Optionally, the feature information is then input into the backbone network consisting of a substrate label embedding module, a convolutional neural network, a feature fusion unit, and a Transformer self-attention encoder. After multi-stage progressive processing, global context-coded features are obtained. First, corresponding domain label embedding vectors are generated for each substrate type. Cotton, silk, and linen each have a learnable embedding vector with a dimension of 16, for a total of 48 learnable parameters. The embedding vectors function similarly to the [CLS] marker in Transformer, and are concatenated to the beginning of subsequent feature sequences to guide the self-attention encoder to interpret spectral data and process parameter information in a substrate-specific manner. The embedding vectors are randomly initialized before training and jointly optimized through backpropagation along with other network parameters during training, enabling the model to automatically learn the influence of different substrates on the mapping relationship between spectra and process parameters. After the substrate embedding is generated, only the 31-dimensional dry-state spectral reflectance sequence is processed by the convolutional neural network; dyeing process parameters, dye features, and substrate label embedding vectors are not included in the convolutional processing. The convolutional neural network consists of three one-dimensional convolutional layers stacked sequentially. The first layer has a kernel size of 3 and 64 output channels, the second layer has a kernel size of 5 and 128 output channels, and the third layer has a kernel size of 3 and 256 output channels. By forming differentiated receptive fields through convolutional kernels of different sizes, it can accurately capture the local spectral absorption peak features at different scales, such as the characteristic absorption peak of gardenia yellow near 440 nm and the broad absorption peak of indigo in the range of 600-650 nm, thus completing the extraction of multi-scale local spectral features.

[0020] Optionally, the process then proceeds to the feature fusion and positional encoding stage. The local spectral features output by the convolutional neural network, the original dyeing process parameters, dye features, and substrate marker embedding vectors are linearly transformed and projected onto a unified model dimension d_model=128, concatenating them to form a complete combined feature sequence. Next, a sinusoidal positional encoding is added to each position in the sequence. This encoding uses fixed sine and cosine functions and does not contain trainable parameters. Finally, the combined feature sequence with added positional encoding is input into a Transformer self-attention encoder to complete global interactive modeling. This encoder employs a pre-layer normalization structure to improve the stability of small-sample training. It consists of three encoder layers, each with eight independent attention heads. The model's base dimension is 128, the feedforward network's hidden dimension is 512, and the neuron dropout rate is set to 0.2. The multi-head self-attention mechanism adaptively learns the dependency between any two feature positions in the input sequence. The values ​​of the attention weight matrix correspond to the degree of attention a certain wavelength or process parameter pays to another feature position. For example, the color-changing effect of anthocyanin natural dyes with pH changes will cause the attention weights to form a significantly high weight between the 550-580nm spectral region and the pH parameter. The eight attention heads can focus on different types of physical interaction laws, such as absorption peak positions, spectral line shapes, and the influence of dyeing conditions. The global context encoding features output after global modeling by the encoder simultaneously integrate local spectral details and global dependencies between the spectrum, process, dye, and substrate, providing complete feature support for subsequent multi-task decoding head prediction.

[0021] The core functional carrier for constructing a multi-task collaborative dyeing intelligent model consists of three independent decoding heads that respectively receive global context encoding features and complete differentiated task outputs. The first and second decoding heads achieve synchronous prediction of dry and wet color coordinates in parallel based on shared backbone features. This allows for the prediction of color shifts after fabric drying in industrial scenarios where wet spectrum acquisition is not required, providing accurate quantitative references for wet color testing at the production end. The third decoding head introduces the target color coordinates as additional input to achieve inverse solution of the dye formulation, directly outputting practical dyeing process and dye component parameters.

[0022] For example, all three decoding heads employ a multilayer perceptron structure, performing their respective regression tasks based on the global context encoding features output from the same backbone network, with clearly defined task boundaries and input / output rules. The first decoding head is the dry-state color coordinate prediction branch. After receiving the global context encoding features output from the encoder, it outputs a 3D vector through discriminative regression, corresponding to the dry-state L, a, and b color coordinates of the dyed fabric after drying. This vector characterizes the standard color performance of the fabric in its final dried state, representing a deterministic mapping regression task. The second decoding head is the wet-state color difference prediction branch. It also receives global context encoding features and outputs the predicted wet-state Lab color coordinates. The core feature of the decoding heads is that during the inference phase, only dry-state spectral data and dyeing process parameters are required as input; measured wet-state spectral data is unnecessary. The model learns the implicit mapping relationship between dry-state spectral features and wet-state color coordinates during the training phase, enabling prediction of wet-state color performance based solely on dry-state data. The output wet-state color coordinates and wet-dry color difference values ​​help operators predict the final color effect after drying while the fabric is still wet. If the predicted color difference is too large, the dyeing process can be adjusted in time during the wet stage, avoiding the waste of water and chemicals caused by rework after drying. The third decoding head is the dye formulation reverse design branch. Its input is based on the global context encoding features, with the target dry-state Lab color coordinates additionally concatenated as an additional constraint input. After regression by a multilayer perceptron, the output is a complete dye formulation vector, which contains all-dimensional process parameters such as the amount of dye in each component, mordant concentration, target pH value, target dyeing temperature, and target dyeing time. Each component of the vector is processed by the Softplus activation function to ensure that the output values ​​are all non-negative, conforming to the physical value constraints of the dyeing process parameters, realizing the reverse solution from the target color to the executable dyeing scheme.

[0023] A multi-task learning architecture with shared feature encoding and multi-branch task decoding was constructed, simultaneously achieving dry and wet color coordinate prediction and inverse dye formulation solution in a unified feature space, achieving both computational efficiency and prediction accuracy. The backbone network performs unified global modeling of multi-source dyeing features, avoiding redundant computations of repeated feature extraction in single-task models, while leveraging the global dependency relationship between spectrum, process, and substrate to enhance the feature representation capability of each task. The first and second decoding heads output dry and wet color coordinates in parallel based on shared features, enabling simultaneous acquisition of the standard color of the fabric after drying and the apparent color in the wet state in industrial scenarios where wet spectrum measurement is not required. This provides accurate prediction of wet color judgment in the production process, supporting operators in advance management of dry and wet color differences. The third decoding head directly outputs the complete dye formulation vector inversely by introducing the target color coordinates as constraint input, realizing end-to-end solution from target color to dyeing scheme. The entire architecture connects the feature links of forward color difference prediction and inverse formulation design, ensuring the prediction accuracy of each task and achieving integrated functional collaboration.

[0024] Step 120: Based on dry Lab color coordinates and wet Lab color coordinates, pre-train the backbone network, the first decoder head, and the second decoder head using dry color coordinate loss and wet color coordinate loss to obtain pre-trained weights. Freeze the pre-trained weights. Based on the dye formulation vector, train the backbone network and the third decoder head using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights.

[0025] By prioritizing full-parameter training for dry and wet color coordinate prediction tasks, the shared backbone network and two sets of forward decoders can fully learn the mapping rules between multi-source staining features and color representation, establishing a color feature extraction system with industrial-grade perceptual consistency. Using color difference loss, which closely resembles human vision, as a supervisory signal solves the problem of disconnect between traditional mean square error loss and human color perception, making the prediction results more consistent with the color difference judgment standards of the production end. Simultaneously, freezing the corresponding parameters after pre-training completely isolates the feature extraction system from interference from subsequent reverse recipe training, providing a stable and unified feature benchmark for reverse tasks. This ensures a synergistic improvement in the accuracy of forward color difference prediction and the reliability of reverse recipe solving from the training mechanism perspective.

[0026] For example, during the pre-training phase, dry-state color coordinate loss and wet-state color coordinate loss are used as joint supervision signals. Both types of losses are constructed based on the differentiable CIEDE2000 color difference formula, corresponding to the perceptual bias calculation of the dry-state and wet-state color coordinate prediction tasks, respectively. The CIEDE2000 color difference formula uses a position-dependent lightness weighting factor. Chroma weighting factor Hue weighting factor And the blue area correction rotation item The CIELAB color space maps the lightness difference, chroma difference, and hue difference to a color difference scale consistent with human visual perception. The core calculation formula is as follows: ,in, The results are for CIEDE2000 color difference. , and These represent the differences in lightness, chroma, and hue between the model's output color coordinates and the actual color coordinates in the CIELAB color space. , and As a parameter factor, its value is always 1 in the textile dyeing color difference assessment scenario, without introducing additional manual weight adjustments, so that the color difference calculation relies entirely on the perceived uniformity of the CIEDE2000 formula itself. To adapt to the differentiability requirements of neural network backpropagation, the loss function employs three key technologies to achieve a numerically stable differentiable version: firstly, the hue angle is calculated using the atan2 two-parameter arctangent function, based on a... 、 The sign of 'b' is automatically determined to identify the quadrant, ensuring that the hue angle is in all quadrants. Correct mapping within the range avoids the abrupt transition problem of the traditional arctangent function at quadrant boundaries. Secondly, hue difference. Calculated using the sine half-angle formula, the specific form is as follows: ,in, and These are the chroma values ​​corresponding to the model's output color coordinates and the true color coordinates, respectively. The model outputs the difference between the hue angle and the true hue angle. As a lower bound for numerical stability protection, it takes the value of This fundamentally eliminates the gradient abrupt changes caused by the 2π periodic jump, ensuring gradient smoothness during backpropagation. Thirdly, a numerical stability protection lower bound ε=10 is added. -7 This prevents division by zero errors when chroma approaches zero, ensures that the calculation accuracy matches the float32 data type, and maintains the numerical stability of the training process.

[0027] Optionally, during training, the dry-state color coordinate loss uses the predicted dry-state Lab color coordinates and the corresponding real dry-state labels as input to calculate the dry-state perceived color difference. The wet-state color coordinate loss uses the predicted wet-state Lab color coordinates and the corresponding real wet-state labels as input to calculate the wet-state perceived color difference. The two types of losses are then combined and iteratively optimized simultaneously using the backpropagation algorithm to optimize the backbone network consisting of the convolutional neural network and the Transformer encoder, as well as all trainable parameters of the first and second decoders, until the losses converge. Finally, a pre-trained weight file containing all parameters of the backbone network and the two sets of forward decoders is generated.

[0028] For example, after completing the forward pre-training phase, all network parameters corresponding to the pre-trained weights are first frozen. That is, all trainable parameters of the backbone network composed of the convolutional neural network and encoder, the first decoder head, and the second decoder head are kept fixed and no longer participate in subsequent parameter updates. This ensures the stability and consistency of the forward color feature extraction system and avoids interference from the training process of the reverse formulation task with the converged color difference prediction feature benchmark. Subsequently, the dye formulation vector output by the third decoder head is used as the core calculation basis. The second stage of training is carried out through the joint supervision signal composed of formulation regression loss and spectral reconstruction auxiliary loss. Throughout the training process, only backpropagation is used to optimize the network parameters of the third decoder head and its supporting functional branches, and finally, formulation weights specifically for dye formulation reverse design are generated.

[0029] The formula regression loss is constructed using the mean squared error formula, directly calculating the numerical deviations between the predicted dye formula vector and the actual dye formula vector in each dimension. It covers all formula components, including dye dosage, mordant concentration, and dyeing process parameters. This serves as the main supervisory loss for the inverse color matching task, directly constraining the numerical accuracy of the formula output. The spectral reconstruction auxiliary loss is implemented using an MLP auxiliary branch attached to the third decoder. This branch receives the complete dye formula vector output from the third decoder, maps it through a multilayer perceptron to generate a 31-dimensional reflectance spectrum curve consistent with the input spectral dimension, and then uses the mean squared error formula to calculate the deviation between the reconstructed spectrum and the corresponding real dry-state spectrum, using this as an auxiliary supervisory term. This loss only participates in parameter optimization during model training; it is not enabled during inference and does not output results. Its core function is to compress the multi-solution space of formula inverse solving through spectral consistency constraints, fundamentally alleviating the metamerism problem and improving the color reproducibility and batch stability of the final color matching scheme.

[0030] During training, the recipe regression loss and the spectral reconstruction auxiliary loss are weighted and summed according to preset weight coefficients to obtain the total loss value. Backpropagation is then performed based on this total loss, with gradients only propagated back to the trainable parameters of the third decoder head and the spectral reconstruction auxiliary MLP branch. The frozen backbone network and forward decoder parameters do not participate in gradient updates. Once the total loss converges to a stable interval, all trainable parameters of the third decoder head and its auxiliary branches are saved as independent recipe weights. These weights do not overlap with the pre-trained weights and can be loaded and used separately.

[0031] The two-stage freeze-training mechanism achieves a synergistic improvement in the accuracy of forward color difference prediction and the reliability of reverse formulation through task-based progressive parameter optimization. In the first stage, perceptual color difference loss is used as joint supervision to simultaneously optimize the backbone network and two sets of forward decoders. This guides the shared feature space to fully learn the mapping rules between multi-source staining features and dry / wet color representation, establishing a color representation system that closely matches human visual perception and fundamentally improving the prediction accuracy and visual consistency of dry / wet color coordinates. In the second stage, after freezing all pre-trained parameters, dual-constraint training of formulation regression and spectral reconstruction is performed only on the third decoder. This completely avoids the negative interference of the reverse task on the converged forward feature system, ensuring the stability and reliability of forward color difference prediction. Furthermore, the spectral consistency constraint compresses the multi-solution space of formulation reverse solution, effectively alleviating the metamerism problem and improving the color reproducibility and batch stability of the final dye formulation. Simultaneously, the entire training architecture balances the computational efficiency of shared features across multiple tasks with the controllability of accuracy in single-task optimization.

[0032] Step 130: Use pre-trained weights to predict the dry and wet Lab color coordinates of the wet dyed fabric to be tested and calculate the dry and wet color difference. Use formula weights to predict the dye formula of the dyed fabric to be tested. Based on the pre-trained weights, input the dye formula prediction result into the first decoder to obtain the dry Lab color coordinate prediction result. When the dry Lab color coordinate prediction result meets the preset requirements, the dye formula prediction result is taken as the effective dye formula scheme.

[0033] In the practical inference application stage, pre-trained weights and formula weights are loaded respectively, supporting three typical industrial scenarios: new formula development, wet-state online color difference correction, and process parameter optimization. For the wet-state online color difference correction scenario, pre-trained weights are loaded to perform dry and wet color coordinate prediction. After dyeing, a wet fabric sample is taken, dried for 5-10 minutes, and its dry spectral reflectance sequence is collected using a spectrophotometer. Combined with the actual process parameters of this dyeing and the dye characteristics input model, the dry and wet Lab color coordinates are output simultaneously through the first and second decoders, and the dry and wet color difference value is calculated. Operators do not need to wait for the fabric to dry naturally; they can predict the final color performance after drying based on the prediction results, compare it with the target color, and determine whether additional dyeing or formula parameter adjustment is needed. This significantly shortens the production judgment cycle and reduces trial-and-error re-dyeing caused by experience-based color judgment. For scenarios involving new formulation development and process parameter optimization, formula weights are loaded to perform inverse dye formulation prediction. In the new formulation development scenario, operators first use a spectrophotometer to measure the Pantone color number of the fabric to be dyed provided by the customer or the Lab color coordinate value of the actual fabric sample to determine the substrate type of the fabric to be dyed. After inputting the target color coordinates and substrate type into the inverse design mode of the third decoder, a recommended dye formulation vector can be obtained. In the process parameter optimization scenario, for production variables such as seasonal temperature and humidity changes and batch-to-batch variations of natural dye raw materials, the process parameters such as dye bath pH, ​​dyeing temperature, and dyeing time are also fine-tuned through the inverse design mode of the third decoder to compensate for color differences caused by raw material and environmental fluctuations. Moreover, the model can automatically adapt to three types of substrates—cotton, silk, and linen—through substrate domain labeling, without the need to train a separate model for each substrate. After completing the formulation prediction, pre-trained weights are loaded to perform forward verification. The predicted dye formulation vector is substituted into the first decoder to complete forward propagation, obtaining the dry-state Lab color coordinate prediction result corresponding to the formulation, and calculating its perceived color difference with the target color coordinates. If the color difference is below a preset threshold, the predicted result of the dye formula is deemed valid and can be directly used for subsequent sampling verification. If the color difference does not meet the threshold requirement, the formula is reported as invalid. Operators can adjust the formula scheme or expand the dataset coverage according to the actual situation. The closed-loop verification mechanism ensures the color reproducibility and industrial usability of the final output formula. The inference process can simultaneously realize online prediction of wet and dry color differences and intelligent solution of dye formulas, covering core scenarios in dyeing production such as wet color testing, new formula development, and process optimization, effectively reducing the production judgment cycle and color matching development costs. Through the closed-loop mechanism of reverse formula generation and forward verification screening, the accuracy of color matching scheme implementation can be guaranteed from the output end, significantly reducing the frequency of trial and error re-dyeing and reducing the ineffective consumption of water resources and dyeing chemicals.

[0034] This embodiment acquires the feature information and true dry-state Lab color coordinates of the dyed fabric. The feature information is input into the backbone network to extract global context encoding features. These global context encoding features are then input into the first and second decoders, outputting dry-state and wet-state Lab color coordinates. The global context encoding features are concatenated with the true dry-state Lab color coordinates and input into the third decoder, outputting a dye formulation vector. Based on the dry and wet Lab color coordinates, the backbone network, the first and second decoders are pre-trained using dry and wet color coordinate losses to obtain pre-trained weights. These pre-trained weights are then frozen. Based on the dye formulation vector, the backbone network and the third decoder are trained using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The pre-trained weights are used to predict the dry and wet Lab color coordinates of the wet-state dyed fabric under test and calculate the dry-wet color difference. The formulation weights are used to predict the dye formulation of the fabric under test. Based on the pre-trained weights, the dye formulation prediction result is input into the first decoder to obtain the dry-state Lab color coordinate prediction result. When the dry-state Lab color coordinate prediction result meets preset requirements, the dye formulation prediction result is taken as an effective dye formulation scheme. By employing a multi-task learning architecture and a two-stage frozen training mechanism, the system collaboratively predicts the color coordinates of both wet and dry states and solves the dye formulation in reverse, thereby achieving accurate prediction of the color difference between wet and dry states and reliable intelligent color matching output.

[0035] Example 2 Figure 2 This is a schematic diagram of the structure of the dye color matching and color difference training prediction device based on multi-task learning provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, the device includes: The feature processing output module 210 is used to obtain the feature information and the true dry Lab color coordinates of the dyed fabric. The feature information is input into the backbone network to extract global context coding features. The global context coding features are input into the first decoder and the second decoder respectively, and the dry Lab color coordinates and wet Lab color coordinates are output. The global context coding features and the true dry Lab color coordinates are concatenated and input into the third decoder to output the dye formulation vector. The training weight generation module 220 is used to pre-train the backbone network, the first decoder head and the second decoder head based on dry Lab color coordinates and wet Lab color coordinates, using dry color coordinate loss and wet color coordinate loss to obtain pre-trained weights, freeze the pre-trained weights, and train the backbone network and the third decoder head based on the dye formulation vector using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The testing module 230 is used to predict the dry and wet Lab color coordinates of the wet-dyed fabric under test using pre-trained weights and calculate the dry-wet color difference. It also uses formulation weights to predict the dye formulation of the fabric. Based on the pre-trained weights, the dye formulation prediction results are input into the first decoding head to obtain the dry Lab color coordinate prediction results. When the dry Lab color coordinate prediction results meet preset requirements, the dye formulation prediction results are taken as valid dye formulation schemes.

[0036] The dye color matching and color difference training and prediction device based on multi-task learning provided in this embodiment acquires the feature information and real dry-state Lab color coordinates of the dyed fabric. The feature information is input into the backbone network to extract global context encoding features. These global context encoding features are then input into the first and second decoding heads, outputting dry-state and wet-state Lab color coordinates. The global context encoding features are concatenated with the real dry-state Lab color coordinates and input into the third decoding head, outputting the dye formulation vector. Based on the dry and wet Lab color coordinates, the backbone network and the first decoding head are pre-trained using dry and wet color coordinate losses. The second decoder head is used to obtain pre-trained weights, which are then frozen. Based on the dye formulation vector, the backbone network and the third decoder head are trained using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The pre-trained weights are used to predict the dry and wet Lab color coordinates of the wet-dyed fabric and calculate the dry-wet color difference. The formulation weights are then used to predict the dye formulation of the fabric. Based on the pre-trained weights, the dye formulation prediction results are input into the first decoder head to obtain the dry Lab color coordinate prediction results. When the dry Lab color coordinate prediction results meet preset requirements, the dye formulation prediction results are taken as the effective dye formulation scheme. Through a multi-task learning architecture and a two-stage frozen training mechanism, the forward dry-wet color coordinate prediction and the inverse dye formulation solution are coordinated to achieve accurate prediction of the dry-wet color difference and reliable intelligent color matching output.

[0037] Based on the above embodiments, the feature processing output module includes: The feature information acquisition unit is used to acquire feature information of the dyed fabric, including dry spectral reflectance sequence, dyeing process parameters, dye characteristics and substrate type. The dry-state spectral reflectance sequence acquisition unit is used to collect the reflectance values ​​of dyed fabrics at equal intervals within a preset wavelength range using an integrating sphere spectrophotometer, and to form a dry-state spectral reflectance sequence after normalization. The dyeing process parameter acquisition unit is used to acquire the dyeing process parameters of the dyed fabric and normalize the dyeing process parameters. The dyeing process parameters include the dye bath pH value, dyeing temperature, dyeing time, mordant concentration and redox potential. A dye feature acquisition unit is used to acquire the dye features of dyed fabrics, wherein the dye features include total dye usage, dye type code, mordant type code, and mixed dye ratio vector. The local spectral feature extraction unit is used to generate a labeled embedding vector based on the substrate type, and to process the dry spectral reflectance sequence using a convolutional neural network to extract local spectral features. The global context encoding feature acquisition unit is used to project local spectral features, dyeing process parameters, dye features and label embedding vectors to a unified dimension and then concatenate them to obtain a combined feature sequence. After adding sinusoidal position encoding to the combined feature sequence, it is input into the Transformer self-attention encoder and outputs global context encoding features.

[0038] Based on the above embodiments, the training weight generation module includes: The dry-state color coordinate loss calculation unit is used to calculate the dry-state color coordinate loss based on the dry-state Lab color coordinates and the corresponding real dry-state Lab color coordinates using the differentiable CIEDE2000 color difference formula. The wet color coordinate loss calculation unit is used to calculate the wet color coordinate loss based on the wet Lab color coordinates and the corresponding real wet Lab color coordinates using the differentiable CIEDE2000 color difference formula; The pre-trained weight generation unit is used to perform backpropagation optimization on the backbone network, the first decoder head, and the second decoder head based on the dry color coordinate loss and the wet color coordinate loss to obtain pre-trained weights. The spectral reconstruction auxiliary loss calculation unit is used to map the dye formulation vector through MLP auxiliary branch processing to generate a 31-dimensional reflectance spectrum curve, and to calculate the spectral reconstruction auxiliary loss between the 31-dimensional reflectance spectrum curve and the real dry-state spectral reflectance sequence using mean square error. The formulation regression loss calculation unit is used to calculate the formulation regression loss of the dye formulation vector and the real dye formulation vector using mean square error; The formulation weight acquisition unit is used to perform a weighted summation of the spectral reconstruction auxiliary loss and the formulation regression loss, and to perform backpropagation optimization on the backbone network and the third decoder to obtain the formulation weight.

[0039] The dye color matching and color difference training prediction device based on multi-task learning provided in the embodiments of the present invention can execute the dye color matching and color difference training prediction method based on multi-task learning provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0040] Example 3 Figure 3 This is a schematic diagram of the structure of a server provided in Embodiment 3 of the present invention. Figure 3A block diagram is shown of an exemplary server 12 suitable for implementing embodiments of the present invention. Figure 3 The server 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0041] like Figure 3 As shown, server 12 is presented in the form of a general-purpose computing server. The components of server 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0042] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0043] Server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by server 12, including volatile and non-volatile media, removable and non-removable media.

[0044] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. Server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 3 Not shown; usually referred to as a "hard drive"). Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0045] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0046] Server 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing server, display 24, etc.), and with one or more servers that enable users to interact with server 12, and / or with any server (e.g., network card, modem, etc.) that enables server 12 to communicate with one or more other computing servers. This communication can be performed via input / output (I / O) interface 22. Furthermore, server 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of server 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with server 12, including but not limited to: microcode, server drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0047] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the dye color matching and color difference training prediction method based on multi-task learning provided in the embodiments of the present invention.

[0048] Example 4 Embodiment 4 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the dye color matching and color difference training prediction method based on multi-task learning as described in any of the above embodiments.

[0049] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0050] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0051] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0052] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0053] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A dye color matching and color difference training prediction method based on multi-task learning, characterized in that, include: The feature information and the true dry Lab color coordinates of the dyed fabric are obtained. The feature information is input into the backbone network to extract global context coding features. The global context coding features are input into the first decoder and the second decoder respectively, and the dry Lab color coordinates and wet Lab color coordinates are output. The global context coding features and the true dry Lab color coordinates are concatenated and input into the third decoder to output the dye formulation vector. Based on dry Lab color coordinates and wet Lab color coordinates, the backbone network, the first decoder head and the second decoder head are pre-trained using dry color coordinate loss and wet color coordinate loss to obtain pre-trained weights. The pre-trained weights are frozen. Based on the dye formulation vector, the backbone network and the third decoder head are trained using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The pre-trained weights are used to predict the dry and wet Lab color coordinates of the wet-dyed fabric to be tested and calculate the dry and wet color difference. The formula weights are used to predict the dye formula of the fabric to be tested. Based on the pre-trained weights, the dye formula prediction results are input into the first decoder to obtain the dry Lab color coordinate prediction results. When the dry Lab color coordinate prediction results meet the preset requirements, the dye formula prediction results are used as the effective dye formula scheme.

2. The method according to claim 1, characterized in that, The acquisition of feature information of the dyed fabric includes: The characteristic information of the dyed fabric is obtained, including the dry spectral reflectance sequence, dyeing process parameters, dye characteristics, and substrate type. An integrating sphere spectrophotometer was used to collect the reflectance values ​​of dyed fabrics at equal intervals within a preset wavelength range. After normalization, the values ​​were used to construct a dry-state spectral reflectance sequence. Obtain the dyeing process parameters of the dyed fabric and normalize the dyeing process parameters, which include dye bath pH value, dyeing temperature, dyeing time, mordant concentration and redox potential; Obtain the dye characteristics of the dyed fabric, including the total amount of dye used, dye type code, mordant type code, and mixed dye ratio vector.

3. The method according to claim 2, characterized in that, The step of inputting feature information into the backbone network to extract global context-coded features includes: A marker embedding vector is generated using the substrate type, and a convolutional neural network is used to process the dry spectral reflectance sequence to extract local spectral features. The local spectral features, dyeing process parameters, dye features, and label embedding vectors are projected onto a unified dimension and then concatenated to obtain a combined feature sequence. After adding sinusoidal positional encoding to the combined feature sequence, it is input into the Transformer self-attention encoder, and the output is the global context-coded feature.

4. The method according to claim 3, characterized in that, The convolutional neural network includes: 3×3 one-dimensional convolutional layers, 5×5 one-dimensional convolutional layers, and 3×3 one-dimensional convolutional layers are used to capture local spectral features under different receptive fields through convolutional kernels of different sizes; The Transformer self-attention encoder adopts a pre-layer normalized structure, which contains 3 encoder layers, and each encoder layer has 8 attention heads.

5. The method according to claim 1, characterized in that, The process involves pre-training the backbone network, the first decoder head, and the second decoder head based on dry and wet Lab color coordinates, using dry and wet color coordinate loss respectively, to obtain pre-trained weights, including: Based on the dry Lab color coordinates and the corresponding real dry Lab color coordinates, the dry color coordinate loss is calculated using the differentiable CIEDE2000 color difference formula. Based on the wet Lab color coordinates and the corresponding real wet Lab color coordinates, the wet color coordinate loss is calculated using the differentiable CIEDE2000 color difference formula. Based on the dry-state color coordinate loss and the wet-state color coordinate loss, backpropagation optimization is performed on the backbone network, the first decoder head, and the second decoder head to obtain pre-trained weights.

6. The method according to claim 2, characterized in that, The process of training the backbone network and third decoder based on dye formulation vectors using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights includes: The dye formulation vector is processed by MLP auxiliary branching to generate a 31-dimensional reflectance spectrum curve. The mean square error is used to calculate the spectral reconstruction auxiliary loss between the 31-dimensional reflectance spectrum curve and the real dry-state spectral reflectance sequence. The mean squared error is used to calculate the formulation regression loss of the dye formulation vector and the actual dye formulation vector; The weighted sum of the spectral reconstruction auxiliary loss and the formulation regression loss is used to optimize the backbone network and the third decoder through backpropagation to obtain the formulation weights.

7. The method according to claim 1, characterized in that, The dye formulation vector includes: The dye dosage, mordant concentration, target pH value, target dyeing temperature, and target dyeing time for each component are specified, with the dye dosage for each component being a k-dimensional continuous real number.

8. A dye color matching and color difference training and prediction device based on multi-task learning, characterized in that, include: The feature processing output module is used to obtain the feature information and the true dry Lab color coordinates of the dyed fabric. The feature information is input into the backbone network to extract global context coding features. The global context coding features are input into the first decoder and the second decoder respectively, and the dry Lab color coordinates and wet Lab color coordinates are output. The global context coding features and the true dry Lab color coordinates are concatenated and input into the third decoder to output the dye formulation vector. The training weight generation module is used to pre-train the backbone network, the first decoder head, and the second decoder head based on dry Lab color coordinates and wet Lab color coordinates, using dry color coordinate loss and wet color coordinate loss to obtain pre-trained weights. The pre-trained weights are frozen, and the backbone network and the third decoder head are trained based on the dye formulation vector using formulation regression loss and spectral reconstruction auxiliary loss to generate formulation weights. The testing module is used to predict the dry and wet Lab color coordinates of the wet-dyed fabric under test using pre-trained weights and calculate the dry and wet color difference. It also uses formulation weights to predict the dye formulation of the fabric under test. Based on the pre-trained weights, the dye formulation prediction results are input into the first decoding head to obtain the dry Lab color coordinate prediction results. When the dry Lab color coordinate prediction results meet the preset requirements, the dye formulation prediction results are taken as the effective dye formulation scheme.

9. A server, characterized in that, The server includes: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the dye color matching and color difference training prediction method based on multi-task learning as described in any one of claims 1-7.

10. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the dye color matching and color difference training prediction method based on multi-task learning as described in any one of claims 1-7.