Coating color formula prediction method, system and equipment, medium and product
By acquiring spectral information of coatings in real time and constructing color feature vectors, and combining multi-channel formula generation and adaptive fusion of channel weights, the shortcomings of existing coating color formula prediction methods in terms of accuracy and stability are solved, and highly accurate and stable automated color formula prediction is achieved.
Patent Information
- Application Number
- CN202511839367.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for predicting paint color formulations have shortcomings in terms of accuracy. In particular, the prediction results are prone to large deviations when raw material batches change or pigment properties drift. Furthermore, data-driven methods are highly dependent on a large number of high-quality labeled samples, making it difficult to achieve stable and highly accurate automated color formulation prediction.
By collecting the spectral information of coatings in real time, a color feature vector is constructed, and a color formula prediction model is used for feature extraction and mapping. Combined with the joint optimization training of supervised and unsupervised loss functions, multi-channel formula generation and adaptive fusion of channel weights are realized, thereby improving the accuracy and stability of color formula prediction.
It improves the accuracy and stability of paint color formula prediction, enhances the model's adaptability to complex color structures, reduces noise interference, improves generalization ability under conditions of a small number of labeled samples, and avoids prediction bias caused by single-path modeling.
Smart Images

Figure CN121963943A_ABST
Abstract
Description
A method, system, equipment, medium, and product for predicting the color formulation of coatings. Technical Field
[0001] This invention relates to the field of color formulation prediction, and more particularly to a method, system, device, medium, and product for predicting the color formulation of coatings. Background Technology
[0002] In the paint production process, color is one of the most important indicators of product quality. The color consistency between different batches of products directly affects the product's appearance quality and market competitiveness. In actual production, paint colors are usually obtained by mixing various color masterbatches in a certain proportion. However, different color masterbatches vary significantly in terms of particle size distribution, dispersibility, light absorption characteristics, and binder compatibility, making the color synthesis process highly non-linear. To ensure that the finished paint achieves the expected target color, it is usually necessary to rationally determine the various color masterbatches and their proportions based on the target color parameters, combined with the characteristics of raw materials and production process conditions, thereby achieving accurate reproduction of the target color.
[0003] Existing methods for predicting paint color formulations still have shortcomings in terms of accuracy. On the one hand, some methods model the relationship between color and formulation based on simplified physical models, which makes it difficult to accurately depict the complex nonlinear mixing effects between pigments. When raw material batches change, environmental parameters fluctuate, or pigment properties drift, the prediction results are prone to significant deviations. On the other hand, while data-driven methods can improve prediction accuracy to some extent, they are highly dependent on a large number of high-quality labeled samples. When the number of training samples is insufficient or the color distribution is uneven, the model prediction results are prone to deviations, especially when faced with new color samples, where the prediction accuracy drops significantly. This means that in practical applications, manual formulation adjustments are still required, making it difficult to achieve stable and highly accurate automatic color formulation prediction. Summary of the Invention
[0004] This invention provides a method, system, device, medium, and product for predicting the color formula of coatings, which can improve the accuracy of predicting the color formula of coatings.
[0005] In a first aspect, embodiments of the present invention provide a method for predicting the color formula of a coating, comprising: real-time acquisition of spectral information of the coating; determining a color feature vector corresponding to the coating based on the spectral information; inputting the color feature vector into a preset color formula prediction model to extract features from the color feature vector to obtain a latent feature vector; mapping the latent feature vector to each formula generation channel to obtain a formula candidate vector corresponding to each formula generation channel; determining an initial formula prediction result based on each formula candidate vector; and weighting and fusing each initial formula prediction result with the channel weights corresponding to each formula generation channel to obtain a target color formula corresponding to the coating, wherein the color formula prediction model is obtained by iteratively training labeled samples and unlabeled samples using supervised loss functions and unsupervised loss functions respectively to satisfy a preset convergence condition.
[0006] This invention, through real-time acquisition of the spectral information of coating samples and conversion of continuous spectral reflectance data into color feature vectors, enables the input data to comprehensively characterize the optical response characteristics of the coating at various wavelengths, improving the completeness and precision of color characterization. This provides a more accurate and stable input basis for subsequent formulation prediction, thereby enhancing the accuracy of coating color formulation prediction. By inputting the color feature vectors into the color formulation prediction model for feature extraction, discriminative latent structural features are extracted from the original high-dimensional spectral data, reducing noise interference and compressing redundant information. This allows the model to more accurately establish the mapping relationship between color and formulation, thus improving the accuracy of coating color formulation prediction. Furthermore, by inputting the latent feature vectors into multiple formulation generation channels and mapping them separately, the model can analyze the target color from different structural perspectives. Modeling is performed to generate multiple sets of differentiated formulation candidate vectors, enhancing the model's adaptability to complex color structures and thus improving the stability and accuracy of paint color formulation prediction. By modeling the formulation candidate vectors output by each formulation generation channel and forming multiple initial formulation prediction results, multi-path exploration of the potential formulation space is achieved, thereby improving the model's coverage of different formulation structures and reducing the impact of local optima on the prediction results, thus improving the accuracy of paint color formulation prediction. By introducing a channel weight mechanism to weight and fuse multiple sets of initial formulation prediction results, the model can adaptively adjust the contribution ratio of each channel to the final result, suppress the interference of low-matching channels, and obtain a fused formulation result that better matches the target color characteristics, thereby improving the overall accuracy and reliability of paint color formulation prediction.
[0007] Furthermore, determining the color feature vector corresponding to the coating based on the spectral information includes: determining the original reflectance curve based on the spectral information; preprocessing the original reflectance curve to obtain reflectance data; performing feature dimensionality reduction on the reflectance data to obtain spectral feature components; and concatenating the spectral feature components with preset color space parameters to obtain a color feature vector.
[0008] This invention improves the stability and reliability of spectral data by preprocessing the spectral reflectance curve; extracts key spectral features highly correlated with color changes by performing feature reduction on the reflectance data; and fuses the spectral features with color space parameters to construct a multidimensional color feature vector, thereby enabling the model to more accurately characterize the color properties of coatings and improve the accuracy of color formula prediction.
[0009] Furthermore, the step of inputting the color feature vector into a preset color recipe prediction model to extract features from the color feature vector and obtain a latent feature vector includes: inputting the color feature vector into the preset color recipe prediction model to perform a nonlinear transformation on the color feature vector through several fully connected layers in the color coding network to obtain a deep feature representation, wherein the color recipe prediction model includes the color coding network; and performing feature compression on the deep feature representation to obtain a latent feature vector.
[0010] This invention employs multi-layer nonlinear transformation to perform deep feature extraction on color feature vectors, thereby achieving abstract modeling of color information. Furthermore, it generates latent feature vectors through feature compression, effectively removing redundant information, preserving key color semantic features, and improving the ability of the color recipe prediction model to express complex color changes and its prediction accuracy.
[0011] Furthermore, the step of mapping the latent feature vector to each recipe generation channel to obtain the recipe candidate vector corresponding to each recipe generation channel includes: inputting the latent feature vector into several parallel recipe generation channels, and performing a nonlinear transformation on the latent feature vector through a multilayer perceptron to obtain the prediction score vector corresponding to each recipe generation channel. The color recipe prediction model further includes several recipe generation channels and a sparsity probability mapping function, and the recipe generation channel includes the multilayer perceptron. The prediction score vector is processed through the sparsity probability mapping function until the processing result meets a preset condition, thereby determining each recipe candidate vector.
[0012] This invention achieves synchronous modeling of different formulation structure patterns by mapping potential feature vectors in parallel to multiple formulation generation channels. It also uses a sparsity probability mapping function to normalize each predicted score vector, thereby generating formulation candidate vectors that meet the constraints of nonnegativity, normalization, and sparsity. This improves the structural feasibility, diversity, and generalization ability of the formulation prediction results and avoids the problem of fixed formulation structure caused by single-path modeling.
[0013] Furthermore, the step of weightedly fusing the prediction results of each initial formula with the channel weights corresponding to each formula generation channel to obtain the target color formula for the paint includes: calculating the channel matching score of each formula generation channel, normalizing the channel matching scores to generate corresponding channel weights; and weightedly summing the prediction results of each initial formula based on the channel weights to obtain the target color formula for the paint.
[0014] This invention introduces a channel matching score and channel weight mechanism to achieve adaptive weighted fusion of multi-channel prediction results. This enables the model to dynamically select the optimal formula structure based on different color samples, thereby improving the accuracy and stability of the final color formula, avoiding the amplified impact of single-channel prediction bias on the overall result, and enhancing the robustness and generalization ability of the system in complex color scenarios.
[0015] Furthermore, the training process of the color recipe prediction model includes: inputting the labeled samples into a preset initial color recipe prediction model to obtain a first predicted recipe vector; inputting the first predicted recipe vector into a supervised loss function to obtain a supervised loss function value; inputting the unlabeled samples into a preset initial color recipe prediction model to obtain a second predicted recipe vector; inputting the second predicted recipe vector into an unsupervised loss function to obtain an unsupervised loss function value, wherein the unsupervised loss function value includes a self-supervised ranking comparison loss function value, a conditional mutual information regularization loss function value, and a dynamic structure perturbation loss function value; linearly combining the supervised loss function value and the unsupervised loss function value according to preset weights to obtain a joint optimization function value; and using a gradient backpropagation method to perform backpropagation iterative optimization on the joint optimization function value to minimize the joint optimization function value until a preset convergence condition is met, thereby obtaining the trained color recipe prediction model.
[0016] This invention, through the simultaneous introduction of supervised loss and multiple unsupervised constraints for joint optimization, enables the color recipe prediction model to fully utilize the structural information in unlabeled data even with a small number of labeled samples. This enhances the model's ability to learn the color-recipe mapping relationship, effectively alleviates the overfitting problem caused by insufficient supervised data, strengthens the stability and accuracy of prediction results under complex conditions, and improves the model's generalization ability to new color samples.
[0017] Secondly, embodiments of the present invention provide a paint color formula prediction system, the system comprising: an acquisition module and a prediction module; the acquisition module is used to acquire the spectral information of the paint in real time, and determine the color feature vector corresponding to the paint based on the spectral information; the prediction module is used to input the color feature vector into a preset color formula prediction model to extract features from the color feature vector to obtain a latent feature vector, map the latent feature vector to each formula generation channel to obtain a formula candidate vector corresponding to each formula generation channel, determine the corresponding initial formula prediction result based on each formula candidate vector, and perform weighted fusion of each initial formula prediction result with the channel weights corresponding to each formula generation channel to obtain the target color formula corresponding to the paint, wherein the color formula prediction model is obtained by iteratively training labeled samples and unlabeled samples using supervised loss functions and unsupervised loss functions respectively to meet preset convergence conditions.
[0018] This invention, through the introduction of a collaborative working mechanism between the acquisition and prediction modules at the system layer, achieves end-to-end automated processing from coating spectral data acquisition to color formula output. By employing multi-channel formula generation and adaptive channel weight fusion, it enhances the modeling capability for different color structural features. Furthermore, by combining supervised and unsupervised joint training mechanisms, it effectively mines potential structural information in unlabeled samples. Even with limited labeled samples, it can still improve the model's fitting accuracy and generalization ability regarding the relationship between coating color and formula, thereby improving the overall accuracy and stability of coating color formula prediction.
[0019] Thirdly, embodiments of the present invention provide a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, which causes the processor to perform an operation as described in this application of a color formula prediction method for a coating.
[0020] Fourthly, embodiments of the present invention provide a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device or system where the computer-readable storage medium is located to perform a color formulation prediction method for a coating as described in this application.
[0021] Based on the above-described method embodiments, another embodiment of the present invention provides a computer program product, including a computer program or instructions, which, when executed by a communication device, implements a color formula prediction method for coatings according to any embodiment of the present invention.
[0022] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0023] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 is a flowchart illustrating an embodiment of the color formula prediction method for coatings provided in this application; Figure 2 is a flowchart illustrating steps S201 to S202 provided in this application; Figure 3 is a flowchart illustrating steps S301 to S304 provided in this application; Figure 4 is a flowchart illustrating the training process of the color formula prediction model provided in this application; Figure 5 is a structural schematic diagram illustrating an embodiment of the color formula prediction method for coatings provided in this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0027] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0030] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0031] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0032] In the paint production process, color is one of the important indicators for measuring product quality. The color consistency between different batches of products directly affects the appearance quality and market competitiveness of the finished product. In actual production, paint colors are usually obtained by mixing multiple color masterbatches in a certain proportion. Different color masterbatches have significant differences in particle size distribution, dispersibility, light absorption characteristics, and binder compatibility, which makes the color synthesis process exhibit significant nonlinear characteristics. To achieve the expected target color, it is necessary to rationally determine various color masterbatches and their proportions based on the target color parameters and in combination with the characteristics of raw materials and process conditions. However, existing paint color formulation prediction methods still have shortcomings in terms of accuracy. On the one hand, some methods model the relationship between color and formulation based on simplified physical models, which makes it difficult to accurately characterize the complex nonlinear mixing effects between pigments. They are prone to large prediction errors when raw material batches change, environmental parameters fluctuate, or pigment characteristics drift. On the other hand, although data-driven methods can improve prediction accuracy to a certain extent, they are highly dependent on a large number of high-quality labeled samples. When the number of training samples is insufficient or the color distribution is uneven, the model prediction results are prone to deviating from reality. Therefore, in practical applications, manual correction of the formulation is still required, making it difficult to achieve stable and highly accurate automated color formulation prediction.
[0033] Referring to Figure 1, to improve the accuracy of paint color formula prediction, an embodiment of the present invention provides a paint color formula prediction method, including steps S101 to S102; step S101, real-time acquisition of the spectral information of the paint, and determination of the color feature vector corresponding to the paint based on the spectral information; in some embodiments, real-time acquisition of the spectral information of the paint specifically involves: using a spectrophotometer to acquire the spectrum of the paint sample to be tested, the spectrophotometer scanning the reflectance of the paint sample surface within a preset wavelength range point by point under standard light source conditions and standard observation angle; wherein, the light source is a D65 standard light source, the observation angle is a 2° or 10° standard viewing angle, the preset wavelength range covers the visible light band, and continuous sampling is performed at fixed wavelength intervals to obtain the reflectance value of the paint at each wavelength point. During the acquisition process, the paint sample is placed within the measurement window, ensuring that the measurement area covers a uniform area of the sample surface. The reflected light signal is synchronously acquired through the multi-channel photoelectric receiving array built into the spectrophotometer. The photoelectric signal is then converted into a digital signal by the analog-to-digital converter module, thereby obtaining a spectral reflectance data sequence arranged in wavelength order.
[0034] It should be noted that real-time caching and timestamping are performed on the collected spectral data to ensure data traceability during continuous measurement. If online acquisition is performed on the production line, the measured spectral information is synchronously transmitted to a host computer or edge computing device via an industrial communication interface for subsequent color feature extraction processing. After data acquisition, the spectral reflectance data is organized into a one-dimensional array structure according to wavelength order to form the original reflectance curve. This curve is then used as the original spectral information for the paint color and input into the subsequent spectral preprocessing module to construct a color feature vector, thereby providing input data in a unified format for the color formulation prediction model.
[0035] In some embodiments, determining the color feature vector corresponding to the coating based on the spectral information includes: determining the original reflectance curve based on the spectral information; preprocessing the original reflectance curve to obtain reflectance data; performing feature dimensionality reduction on the reflectance data to obtain spectral feature components; and concatenating the spectral feature components with preset color space parameters to obtain a color feature vector.
[0036] In some embodiments, an original reflectance curve is determined based on the spectral information. The original reflectance curve is then preprocessed to obtain reflectance data. Specifically, the original spectral information acquired by the spectrophotometer is arranged in wavelength order to form an original reflectance curve with wavelength as the horizontal axis and reflectance as the vertical axis. This original reflectance curve is composed of multidimensional reflectance numerical points acquired in the visible light band at fixed wavelength steps. Subsequently, spectral preprocessing is performed on the original reflectance curve to eliminate the influence of measurement noise, light source instability, and instrument errors on the subsequent feature extraction process.
[0037] It should be noted that the preprocessing of the original reflectance curve specifically includes the following steps: First, the original reflectance curve is subjected to smoothing filtering to suppress high-frequency noise interference. The smoothing processing adopts sliding window filtering or polynomial fitting filtering, that is, within a fixed window formed by adjacent wavelength points, the spectral curve is fitted and reconstructed by a polynomial function, so that the original spectral data reduces the local fluctuation amplitude while maintaining the overall curve shape, thereby obtaining a smooth spectral curve; Second, the smoothed spectral data is subjected to outlier detection and correction. By calculating the reflectance change gradient between adjacent wavelength points, when the reflectance offset of a certain sampling point exceeds a preset threshold, the point is identified as an outlier, and the outlier is replaced by linear interpolation or by the average of several adjacent normal sampling points to eliminate spectral jump phenomena; Then, the processed spectral data is subjected to amplitude normalization processing to uniformly map the reflectance values to a standard value range, for example, linearly mapping the reflectance to the [0,1] range, thereby eliminating the scale deviation caused by differences in light intensity or instrument sensitivity between different samples.
[0038] In some embodiments, the reflectance data is subjected to feature dimensionality reduction to obtain spectral feature components, and the spectral feature components are concatenated with preset color space parameters to obtain a color feature vector. Specifically, each reflectance data point is treated as a high-dimensional spectral sample vector, all samples are used to form a spectral sample matrix, and principal component analysis or an autoencoder dimensionality reduction process is performed on it. Principal component analysis involves eigenvalue decomposition of the covariance structure of the spectral sample matrix, projecting the original high-dimensional spectral data onto several mutually orthogonal principal axis directions. The retained principal axes are sorted from high to low according to their explanatory power for the variance of the original data. The first few principal components are selected as spectral feature components. If a neural network is used for dimensionality reduction, a symmetrical autoencoder network is constructed to compress the original spectral data and map it to a low-dimensional space. The original input is then reconstructed by the decoder, and training is performed with the goal of minimizing the reconstruction error, thereby obtaining the compressed spectral feature components in the hidden layer. After obtaining the spectral feature components, the reflectance data is simultaneously converted to a preset color space according to a standard colorimetric model to obtain color space parameters that characterize color perception attributes. For example, the spectral reflectance is mapped to the CIELab color space, and the corresponding luminance component is calculated. Red-green color components and blue-yellow hue components Then, the spectral feature components and color space parameters are concatenated along the feature dimension to construct a joint color feature representation. The spectral feature components are used to describe the optical structure information of the coating, and the color space parameters are used to describe the visual perception information. Both are used to model color from the physical and perceptual dimensions. After concatenation, a color feature vector containing spectral structure features and color perception features is obtained. This color feature vector is used as the input of the color coding network for subsequent latent representation learning and sparse formulation prediction model modeling, thereby providing a unified and highly expressive feature foundation for improving the accuracy and generalization ability of coating color formulation prediction.
[0039] Through the above steps, the system automatically constructs a highly expressive color feature vector from the original spectral signal of the coating. Spectral smoothing, anomaly correction, and normalization effectively suppress the impact of measurement noise and equipment errors on data stability, improving the reliability of the spectral data. By extracting spectral structural features through dimensionality reduction and fusing color space parameters, the color feature vector simultaneously considers both physical optical properties and human visual perception characteristics, thereby enhancing the ability of color features to represent the essential properties of the coating. This provides a more stable and discriminative input basis for subsequent formulation prediction models, contributing to an overall improvement in the accuracy and robustness of color formulation prediction.
[0040] Step S102: Input the color feature vector into a preset color formula prediction model to extract features from the color feature vector to obtain a latent feature vector. Map the latent feature vector to each formula generation channel to obtain a formula candidate vector corresponding to each formula generation channel. Determine the corresponding initial formula prediction result based on each formula candidate vector. Weightedly fuse each initial formula prediction result with the channel weights corresponding to each formula generation channel to obtain the target color formula corresponding to the paint. The color formula prediction model is obtained by iteratively training labeled and unlabeled samples using supervised and unsupervised loss functions to meet preset convergence conditions.
[0041] In some embodiments, the step of inputting the color feature vector into a preset color recipe prediction model to extract features from the color feature vector and obtain a latent feature vector includes: inputting the color feature vector into the preset color recipe prediction model to perform a nonlinear transformation on the color feature vector through several fully connected layers in a color coding network to obtain a deep feature representation, wherein the color recipe prediction model includes the color coding network; and performing feature compression on the deep feature representation to obtain a latent feature vector.
[0042] In some embodiments, the color feature vector is input into a preset color recipe prediction model to perform a nonlinear transformation on the color feature vector through several fully connected layers in a color coding network, thereby obtaining a deep feature representation. The color recipe prediction model includes the color coding network, specifically: the color coding network is used to perform layer-by-layer nonlinear mapping on the high-dimensional spectral input to complete the mapping process from the "original color numerical space" to the "structural semantic representation space," thus providing a highly discriminative feature representation for the subsequent recipe generation module. Let the input color feature vector be: ,in, The spectral sampling dimension is preferably greater than 100. The color encoding network consists of a multi-layer fully connected neural network, and its layer-by-layer mapping process is as follows: First, the color feature vector is subjected to a first-layer linear transformation and non-linear activation to obtain the first-layer hidden feature vector. : ;in, This is the first layer weight matrix; For the corresponding bias vector; The activation function is non-linear, preferably ReLU or GELU. The first layer feature vector is then input into the second fully connected network to obtain the second layer feature representation: ;in, This is the weight matrix for the second layer; For the corresponding bias vector; The activation function is non-linear, preferably ReLU or GELU. Furthermore, for color coding networks with a multi-layer structure, its... The general expression for a layer is: ;in: Indicates the number of layers in the coding network, preferably 2-4 layers; , The first Layer weight parameters and bias parameters; This is the deep feature representation. Through the above multi-layer nonlinear transformation, the model can map the high-dimensional reflectance curve features from the original spectral space to the abstract semantic space, so that the color presents a structural pattern related to the proportion distribution of the color matrix in the low-dimensional space, thereby improving the accuracy of the model in extracting color formula-related features.
[0043] In some embodiments, feature compression is performed on the deep feature representation to obtain a latent feature vector, specifically: due to the deep feature representation To reduce redundant information and improve computational efficiency, a latent feature space is further constructed using a linear mapping method, given the high dimensionality of the feature. For the deep feature vector, then the latent feature vector The generation method is as follows: ;in, For the characteristic compressed projection matrix; These are the bias parameters for the compression layer; These are potential feature vectors; The potential feature dimension is preferably set to 64, 128, or 256. In a further preferred embodiment, the potential feature vector can also be... Normalization is performed: Through the above normalization operation, the latent features achieve a consistent scale distribution across different dimensions, thereby improving the stability of the multi-channel formulation generation module when fusing channels with different structures. Through the aforementioned feature compression and latent representation construction process, the model compresses the original high-dimensional color information into a low-dimensional semantic vector, enabling the latent feature vector to simultaneously possess: the ability to express the overall color tone; the ability to perceive the color master combination structure; and the ability to distinguish subtle color differences. This provides a stable and highly expressive input foundation for the subsequent multi-channel collaborative generation system, further improving the accuracy of paint color formulation prediction.
[0044] Referring to Figure 2, in some embodiments, mapping the latent feature vector to each recipe generation channel to obtain the recipe candidate vector corresponding to each recipe generation channel includes: steps S201 to S202; step S201, inputting the latent feature vector to several parallel recipe generation channels, and performing a nonlinear transformation on the latent feature vector through a multilayer perceptron to obtain the prediction score vector corresponding to each recipe generation channel, wherein the color recipe prediction model further includes several recipe generation channels and a sparsity probability mapping function, and the recipe generation channel includes the multilayer perceptron; in some embodiments, firstly, the latent feature vector output by the color coding network is... Copy and input in parallel to One recipe generation channel, among which The preferred value is 3. Six channels, each used to learn a different formulation structure pattern. In the... In each recipe generation channel, a set of multilayer perceptrons (MLPs) is constructed to perform nonlinear transformations on the latent feature vectors. Each MLP includes at least two fully connected layers and a nonlinear activation function, specifically: The calculation process for the recipe prediction score vector in the channel is as follows: ;in, , For the first The weight matrix of the multilayer perceptron in the channel; , It is the bias vector; It is a non-linear activation function, preferably ReLU or GELU; Indicates the first The predicted score vector is output from each channel, and each dimension of the score vector corresponds to the initial predicted weight of a color masterbatch material.
[0045] It should be noted that the predicted score vector The unnormalized logits, whose values can be positive or negative, do not meet the requirements of non-negativity, normalization, and sparsity of the formulation ratio. They are only used to represent the "original usage tendency" of each color masterbatch in the current channel. Multiple structurally independent formulation generation channels are designed in parallel, allowing each channel to learn different types of formulation structure preferences, such as high-brightness structures, cool-color structures, and low-component environmentally friendly structures. This results in multiple sets of differentiated prediction scores, providing multi-path structure candidates for subsequent sparsity generation and fundamentally avoiding the structural rigidity problem caused by single-channel modeling.
[0046] Step S202: Process each of the predicted score vectors using the sparsification probability mapping function until the processing result meets the preset conditions, and determine each of the recipe candidate vectors.
[0047] In some embodiments, the prediction score vector output by each of the recipe generation channels Input to sparsification probability mapping function To obtain the corresponding candidate formula vector: ;in, For the first Channel-generated recipe candidate vectors; This is a sparsity control parameter used to adjust the sparsity of the output, with the optimal value being... .
[0048] It should be noted that the above It is a probability mapping function constructed using Tsallis entropy as the regularization term, and its mathematical definition is: Under the following constraints: The optimal solution is to be found, where: Let Tsallis be the entropy function. Solving the above optimization problem using the Lagrange multiplier method yields the following result. The element-wise solution is: ;in, For the first The first in the passage The predicted proportion of each color masterbatch; The normalization coefficients are determined numerically, such that: In specific implementation, the normalization coefficient... Solve using a binary search method or Newton's iteration method, and terminate the iteration when the following normalization condition is met: ,in, As an error tolerance, the preferred value is [value to be filled in]. The output results of each channel are judged to see if they meet preset conditions, which include at least one of the following: non-negativity condition: Normalization condition: Sparsity condition: ,in The threshold for the maximum non-zero color masterbatch quantity is preferably 5. 8; Stability condition: the output of two iterations Distance satisfies: ,in, For a stable threshold, the preferred value is... When the output of any recipe generation channel meets the preset condition, the sparse vector corresponding to that channel is confirmed as a final valid recipe candidate vector, and the output is: .pass The resulting candidate vectors for the formula after processing satisfy the following conditions: non-negative proportions, normalized total amount, and adaptive sparsity; thus ensuring that the output results can be directly used for color formula mixing in a physical sense.
[0049] It should be noted that, to more clearly illustrate the structural relationships and input-output mapping process of each channel in the Multi-Channel Co-Generation of Recipes (MCCG) module, the specific channel structure of the module is listed in tabular form. Each channel receives the same latent feature vector. Through their respective independent multilayer perceptrons Output unnormalized prediction score vector After Sparse normalization processing yields the corresponding candidate formulation vectors. The specific structure is shown in the table below: In some embodiments, the step of weightedly fusing the prediction results of each initial formula with the channel weights corresponding to each formula generation channel to obtain the target color formula corresponding to the paint includes: calculating the channel matching score of each formula generation channel, normalizing the channel matching score to generate the corresponding channel weight; and weightedly summing the prediction results of each initial formula based on the channel weights to obtain the target color formula corresponding to the paint.
[0050] In some embodiments, the channel matching score of each of the recipe generation channels is calculated, and the channel matching scores are normalized to generate corresponding channel weights. Specifically, the latent representation vector output by the color coding network is denoted as... ,in, For the latent feature dimension. Each recipe generation channel inputs the latent representation vector into the corresponding channel prediction network. This yields the original predicted output vector (logits) for that channel: ,in, This represents the total number of color masterbatch types. This represents the unnormalized prediction result of the channel's application tendency for each color masterbatch material. Furthermore, to characterize the degree of matching between each channel output and the current color input, a learnable weight vector is introduced: Based on this weight vector, a channel matching score is constructed for each channel output. The calculation method is as follows: ,in, It is a scalar value used to characterize the first... The response intensity of each channel under the current color input condition. Next, the channel matching score for all channels. Softmax normalization is performed to obtain the channel weights for each channel. The specific calculation formula is as follows: ;in, The total number of channels for generating the recipe; And satisfy Weights of each channel This reflects the contribution of the corresponding channel to the final output in the current prediction task. The channel weights constructed in this way can adaptively adjust as the input color features change, enabling the model to dynamically weigh the output results of multiple channels, thereby avoiding prediction bias caused by the rigidity of a single channel structure.
[0051] In some embodiments, the initial formula prediction results are weighted and summed based on the channel weights to obtain the target color formula corresponding to the paint. Specifically, firstly, an output logits vector for each channel is generated for each formula. Apply a sparse normalization mapping to obtain the initial recipe prediction result vector (i.e., the sparse recipe vector) corresponding to this channel: ;in, for The sparse control parameters of the activation function; the sparse prediction results. satisfy: And with parameters The adjustment can automatically generate partially zero components, thereby obtaining a sparse structure that conforms to the characteristics of industrial formulations. This is achieved after obtaining the initial formulation prediction results for all channels. and the corresponding channel weights Then, the target color formula is generated through weighted fusion. The calculation formula is as follows: ;in, The final output color formula vector; Indicates the first The weighted contribution of each channel to the final formula prediction result; the target formula By comprehensively modeling the multi-channel output, a better solution can be formed among various sparse structure candidates. Through the aforementioned weighted fusion mechanism, each channel automatically competes and collaborates under different color sample conditions, effectively fusing multi-dimensional prediction information such as cool color structure, brightness structure, and environmental protection structure. This avoids the structural bias problem caused by a single prediction path and improves the accuracy, stability, and industrial feasibility of paint color formulation prediction results.
[0052] Referring to Figure 3, in some embodiments, the training process of the color recipe prediction model includes: steps S301 to S304; step S301, inputting the labeled sample into a preset initial color recipe prediction model to obtain a first predicted recipe vector, and inputting the first predicted recipe vector into a supervised loss function to obtain a supervised loss function value; in some embodiments, to constrain the consistency between the predicted recipe vector and the real recipe vector in the overall structure, the difference between the prediction result output by the color recipe prediction model for the labeled sample and the real recipe result is measured. Specifically, for each sample, its color feature vector is... Input the color recipe prediction model to obtain the corresponding predicted recipe vector: And compare it with the real formula vector obtained from standard testing or historical databases. Probability distribution alignment is performed, and the difference between the two is measured using Kullback-Leibler divergence to assess the degree to which the model's current predictions deviate from the true recipe. The KL divergence calculation formula is as follows: By introducing the supervised loss function, the model continuously narrows the distributional difference between the predicted and actual recipes during training, thereby guiding the model output to more closely approximate the actual recipe structure.
[0053] Step S302: Input the unlabeled sample into a preset initial color recipe prediction model to obtain a second predicted recipe vector. Input the second predicted recipe vector into an unsupervised loss function to obtain an unsupervised loss function value. The unsupervised loss function value includes a self-supervised ranking comparison loss function value, a conditional mutual information regularization loss function value, and a dynamic structure perturbation loss function value. In some embodiments, to enable the model to still learn the relative relationships between colors on unlabeled samples, color similarity sample pairs and color dissimilar sample pairs are constructed for the unlabeled color samples, and the similarity relationship between their corresponding predicted recipes is constrained to be consistent with the distance relationship in the color space. Specifically, if the following conditions are met in the color feature space: Then, it is expected that the following condition will be met in the formula prediction space: ,in, Cosine similarity function: Based on the above constraints, a self-supervised ranking comparison loss function is constructed: By minimizing the self-supervised ranking contrastive loss function, the model can learn the implicit rule that "the closer the colors are, the more similar the corresponding recipes are" without relying on manual annotation. To improve the model's robustness to perturbations such as spectral acquisition errors and illumination changes, random perturbations are applied to the unlabeled color feature vectors: By inputting the samples before and after the perturbation into the model, the predicted recipe vector is obtained: To constrain the model to maintain predictive stability under small perturbations, KL divergence is used to measure the degree of change in the prediction distribution, thereby constructing a conditional mutual information regularized loss function: By minimizing the conditional mutual information regularization loss function, the prediction results become insensitive to input perturbations, thereby improving the stability and reliability of the model in real-world data acquisition environments. To prevent overfitting of local structures by multiple recipe generation channels, random perturbations are injected into the intermediate output layer of the model. The perturbation results are processed Activation function transformed into probability vector: The Jensen-Shannon distance between the predicted distributions before and after the perturbation is defined as a structural consistency evaluation index to construct a dynamic structural perturbation loss function: By minimizing this loss function, the multi-channel prediction results maintain overall distribution consistency under structural perturbation conditions, thereby improving the overall stability of the model structure. The unsupervised loss function is: .
[0054] Step S303: The supervised loss function value and the unsupervised loss function value are linearly combined according to preset weights to obtain the joint optimization function value; the supervised loss function value... Compared with unsupervised loss function value The joint optimization function values are constructed by linearly weighting the parameters as follows: ;in, , and The weight parameter is used to adjust the contribution ratio of each unsupervised subtask in the overall optimization; the weight parameter is a hyperparameter that can be manually set or adaptively updated.
[0055] Step S304: The joint optimization function value is iteratively optimized by using the gradient backpropagation method to minimize the joint optimization function value until the preset convergence condition is met, so as to obtain the trained color recipe prediction model.
[0056] In some embodiments, the backpropagation algorithm is used to update the gradients of the color coding network parameters, channel prediction network parameters, and channel weight parameters, with the following optimization objective: ;in, This represents all learnable parameters of the model; The learning rate; This represents the gradient of the joint optimization function value with respect to the parameters. The training process continues until preset convergence conditions are met, including but not limited to: the change in the joint optimization function value is less than a set threshold; the validation set error stabilizes and no longer decreases; and the preset maximum number of iterations is reached. When any of these conditions are met, the training process terminates, and the final color formula prediction model is output.
[0057] For ease of understanding, Figure 4 is a flowchart illustrating the training process of the color formula prediction model provided in this application. During the training phase, the model processes labeled and unlabeled samples in parallel: both types of samples first pass through a color encoder. Extracting latent representations Subsequently, the potential representation The input is given to the multi-channel recipe generation module, which generates a preliminary recipe prediction. For labeled samples, the prediction results are... The model parameters are updated through supervised optimization by comparing them with the actual recipe labels. For unlabeled samples, an unsupervised optimization mechanism consisting of Dynamic Structural Perturbation (DSD), Self-Supervised Ranking Comparison (ICE), and Conditional Mutual Information Regularization (CMIR) is used to mine the structural and semantic information within the data. Finally, the signals from both supervised and unsupervised optimization are incorporated into the joint loss. Unified optimization is performed to achieve efficient training of the model under a semi-supervised learning framework.
[0058] Through the above steps, end-to-end automatic modeling of color features from high-dimensional input to sparse formulation output is achieved; latent feature vectors are extracted through a color coding network to improve the semantic expression of color; multiple sets of differentiated formulation candidate results are obtained through a multi-channel parallel generation mechanism to avoid the prediction fixation problem caused by single-structure modeling; the formulation vectors are constrained to meet the requirements of non-negativity, normalization, and sparsity through a sparsity probability mapping function to improve the industrial usability of the prediction results; dynamic selection of different formulation structures is achieved through adaptive weighted fusion of channel weights; and the prediction accuracy of the model under small sample conditions and its stability and generalization ability under complex application scenarios are improved through a supervised and unsupervised joint training mechanism, thereby improving the overall accuracy and reliability of paint color formulation prediction.
[0059] As shown in Figure 5, based on the above method embodiments, a corresponding device embodiment is provided. One embodiment of the present invention provides a schematic diagram of a paint color formula prediction system, including: an acquisition module 100 and a prediction module 200; the acquisition module 100 is used to acquire the spectral information of the paint in real time and determine the color feature vector corresponding to the paint based on the spectral information; the prediction module 200 is used to input the color feature vector into a preset color formula prediction model to extract features from the color feature vector, obtain a latent feature vector, map the latent feature vector to each formula generation channel to obtain a formula candidate vector corresponding to each formula generation channel, determine the corresponding initial formula prediction result based on each formula candidate vector, and perform weighted fusion of each initial formula prediction result with the channel weights corresponding to each formula generation channel to obtain the target color formula corresponding to the paint. The color formula prediction model is obtained by iteratively training labeled and unlabeled samples using supervised and unsupervised loss functions to satisfy preset convergence conditions.
[0060] It is understood that the above-described apparatus embodiments correspond to the method embodiments of the present invention, and can implement the color formula prediction method for coatings provided by any of the above-described method embodiments of the present invention. More detailed workflows and principles of this system can be found, but are not limited to, the relevant descriptions of the above methods.
[0061] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0062] Based on the above-described embodiment of a color formula prediction method for coatings, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a color formula prediction method for coatings according to any embodiment of the present invention.
[0063] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0064] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0065] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0066] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the color formula prediction method for coatings described in any of the above-described method embodiments of the present invention.
[0067] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0068] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for predicting the color formula of a coating, characterized in that, include: The spectral information of the coating is acquired in real time, and the color feature vector corresponding to the coating is determined based on the spectral information. The color feature vector is input into a preset color formula prediction model to extract features from the color feature vector to obtain a latent feature vector. The latent feature vector is mapped to each formula generation channel to obtain a formula candidate vector corresponding to each formula generation channel. The corresponding initial formula prediction result is determined based on each formula candidate vector. The initial formula prediction result is weighted and fused with the channel weights corresponding to each formula generation channel to obtain the target color formula corresponding to the coating. The color formula prediction model is obtained by iteratively training labeled and unlabeled samples using supervised and unsupervised loss functions to meet preset convergence conditions.
2. The method for predicting the color formula of a coating as described in claim 1, characterized in that, The step of determining the color feature vector corresponding to the coating based on the spectral information includes: determining the original reflectance curve based on the spectral information; preprocessing the original reflectance curve to obtain reflectance data; performing feature dimensionality reduction on the reflectance data to obtain spectral feature components; and concatenating the spectral feature components with preset color space parameters to obtain a color feature vector.
3. The method for predicting the color formula of a coating as described in claim 1, characterized in that, The step of inputting the color feature vector into a preset color recipe prediction model to extract features from the color feature vector and obtain a latent feature vector includes: inputting the color feature vector into the preset color recipe prediction model to perform a nonlinear transformation on the color feature vector through several fully connected layers in a color coding network to obtain a deep feature representation, wherein the color recipe prediction model includes the color coding network; and performing feature compression on the deep feature representation to obtain a latent feature vector.
4. The method for predicting the color formula of a coating as described in claim 1, characterized in that, The step of mapping the latent feature vector to each recipe generation channel to obtain the recipe candidate vector corresponding to each recipe generation channel includes: inputting the latent feature vector into several parallel recipe generation channels, and performing a nonlinear transformation on the latent feature vector through a multilayer perceptron to obtain the prediction score vector corresponding to each recipe generation channel. The color recipe prediction model further includes several recipe generation channels and a sparsity probability mapping function, and the recipe generation channel includes the multilayer perceptron. The prediction score vector is processed through the sparsity probability mapping function until the processing result meets a preset condition, thereby determining each recipe candidate vector.
5. The method for predicting the color formula of a coating as described in claim 1, characterized in that, The step of weightedly fusing the prediction results of each initial formula with the channel weights corresponding to each formula generation channel to obtain the target color formula for the paint includes: calculating the channel matching score of each formula generation channel, normalizing the channel matching score to generate the corresponding channel weight; and weightedly summing the prediction results of each initial formula based on the channel weights to obtain the target color formula for the paint.
6. The method for predicting the color formula of a coating as described in claim 1, characterized in that, The training process of the color recipe prediction model includes: inputting the labeled samples into a preset initial color recipe prediction model to obtain a first predicted recipe vector; inputting the first predicted recipe vector into a supervised loss function to obtain a supervised loss function value; inputting the unlabeled samples into a preset initial color recipe prediction model to obtain a second predicted recipe vector; inputting the second predicted recipe vector into an unsupervised loss function to obtain an unsupervised loss function value, wherein the unsupervised loss function value includes a self-supervised ranking comparison loss function value, a conditional mutual information regularization loss function value, and a dynamic structure perturbation loss function value; linearly combining the supervised loss function value and the unsupervised loss function value according to preset weights to obtain a joint optimization function value; and using a gradient backpropagation method to perform backpropagation iterative optimization on the joint optimization function value to minimize the joint optimization function value until a preset convergence condition is met, thereby obtaining the trained color recipe prediction model.
7. A paint color formulation prediction system, characterized in that, The system includes an acquisition module and a prediction module. The acquisition module is used to acquire the spectral information of the coating in real time and determine the color feature vector corresponding to the coating based on the spectral information. The prediction module is used to input the color feature vector into a preset color formula prediction model to extract features from the color feature vector to obtain a latent feature vector. The latent feature vector is then mapped to each formula generation channel to obtain a formula candidate vector corresponding to each formula generation channel. Based on each formula candidate vector, an initial formula prediction result is determined. The initial formula prediction result is then weighted and fused with the channel weights corresponding to each formula generation channel to obtain the target color formula corresponding to the coating. The color formula prediction model is obtained by iteratively training labeled and unlabeled samples using supervised and unsupervised loss functions to meet preset convergence conditions.
8. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements a color formulation prediction method for a coating as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform a color formulation prediction method for a coating as described in any one of claims 1-6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the communication device, they implement a color formula prediction method for a coating as described in any one of claims 1 to 6.