Textile color deviation detection method
Through digital image processing and clustering analysis, the color distribution feature vector of textiles is constructed, which solves the problem of rapid and accurate color deviation detection of textiles, and the propagation trend of color deviation is identified through time series analysis, which improves the stability of product quality.
Patent Information
- Application Number
- CN202411411078.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-10
AI Technical Summary
In the textile production process, it is difficult for the existing technology to quickly, accurately and comprehensively obtain the distribution characteristics of textile surface color deviations, and lack effective technical means to discover and capture the correlation and propagation of color deviations, which affects the stability of product quality.
By obtaining digital images of textiles, extracting fabric structural features and color features, performing clustering analysis and matching of standard color sample libraries, constructing color distribution feature vectors, calculating color deviation quantization indicators, and constructing a time series of color deviation indicators in continuous production, performing alignment and prediction, and identifying color deviation propagation trends and influencing factors.
It realizes the rapid and accurate detection of textile color deviations and comprehensive reflection of distribution characteristics, identify and warn of the propagation trend of color deviations, and improves the stability and consistency of product quality.
Smart Images

Figure CN119515776A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of information technology, and in particular to a method for detecting color deviation of textiles. Background Art
[0002] In the textile production process, due to differences in raw materials, dye ratios, process parameters and other factors, the product colors of different batches and different production lines often have certain deviations. In order to quantitatively evaluate the degree of color deviation, it is necessary to introduce an objective and accurate color deviation detection method. Traditional methods such as naked eye observation or colorimeter measurement can only obtain the color deviation value of a single point, which cannot fully reflect the distribution of color deviation on the entire textile surface. Moreover, the size of the color deviation value is greatly affected by the selection of the measurement position, and the measurement results at different positions are significantly different, resulting in poor consistency and repeatability of color deviation evaluation. How to quickly, accurately and comprehensively obtain the distribution characteristics of color deviation within the entire surface range of the textile has become a technical problem that needs to be solved urgently. At the same time, in the actual textile production process, due to some unknown systematic factors, the color deviation may show a certain correlation and propagation between different batches and different production lines. However, there is currently a lack of effective technical means to discover and capture these correlation characteristics, making it difficult to timely warn and regulate the production process, which ultimately affects the quality stability of the product. This is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The present invention provides a method for detecting color deviation of textiles, which mainly comprises:
[0004] Acquire a digital image of the textile to be tested, extract the fabric structure features, divide the image into regular sub-regions, extract the color histogram features of each sub-region, and obtain the color feature vector of the sub-region;
[0005] Perform cluster analysis on the color feature vectors of each sub-region, and map each sub-region to a color category in a pre-established standard color sample library according to the clustering results to obtain a color category label of the sub-region;
[0006] According to the color category labels of the sub-regions, the number of sub-regions corresponding to each color category is counted, their area proportions are calculated, and a color distribution feature vector with color category as the dimension is constructed to characterize the overall color distribution of the textile.
[0007] According to the overall color distribution, select the same type of standard samples in the standard color sample library, extract its color distribution feature vector, calculate the Euclidean distance between the color distribution feature vector of the current textile and the standard sample, and obtain the color deviation quantitative index;
[0008] In continuous multi-batch production, obtain the color deviation quantitative index of each batch of products, construct the color deviation index time series, and align the color deviation index series between different batches;
[0009] On the aligned color deviation index time series, calculate the color concentricity index of the current batch and the previous batches. When the color concentricity index is lower than the preset threshold, determine whether there is a color deviation propagation trend.
[0010] Predict the color deviation quantitative index of the current batch. If the predicted value exceeds the preset color deviation threshold range, combine the color concentricity calculation results to determine the influencing factors and propagation paths of the color deviation;
[0011] According to the influencing factors and propagation paths of color deviation, the corresponding process parameter adjustment strategy is generated, and the upstream key processes that cause color deviation are tracked and located.
[0012] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:
[0013] The invention discloses a method for detecting color deviation of textiles. The method obtains digital images of textiles, extracts color features, constructs color distribution feature vectors, and calculates color deviations from standard samples. In continuous production, time series analysis is performed on color deviation indicators of multiple batches of products, color concentricity is calculated, and color deviation trends are predicted. By constructing a color deviation propagation network, key propagation paths are identified and mapped to specific processes. Using a process and color deviation association matrix, the contribution of each process is quantified, the upstream key processes are traced, and the source of color deviation is determined. Finally, a targeted process parameter adjustment strategy is generated to achieve dynamic feedback control of textile color quality. The invention can effectively identify and control color deviations in the textile production process and improve product quality stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 The present invention is a flowchart of a method for detecting color deviation of textiles.
[0015] Figure 2 The figure is a schematic diagram of a method for detecting color deviation of textiles according to the present invention.
[0016] Figure 3 This is another schematic diagram of a method for detecting color deviation of textiles according to the present invention. DETAILED DESCRIPTION
[0017] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments. The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0018] like Figure 1 -3. A textile color deviation detection method in this embodiment may specifically include:
[0019] S101, obtaining a digital image of a textile to be inspected, extracting fabric structural features, dividing the image into regular sub-regions, extracting color histogram features of each sub-region, and obtaining a color feature vector of the sub-region.
[0020] The invention relates to a method for detecting a textile by obtaining a digital image of the textile to be detected, wherein the digital image contains fabric structure information and color information; extracting fabric structure features of the digital image to obtain a structure feature image of the textile; dividing the structure feature image into sub-regions to obtain a plurality of regular sub-regions; performing color space conversion on the regular sub-regions, wherein the color space conversion is from RGB color space to HSV color space; performing color quantization processing on the converted HSV color space image to obtain a plurality of color intervals; counting the number of pixels in each color interval in each regular sub-region to generate a color histogram; normalizing the color histogram to obtain a sub-region color feature vector; calculating the statistical features of the sub-region color feature vector to form a comprehensive feature vector of the entire image; classifying the comprehensive feature vector using a K nearest neighbor algorithm, wherein the K value is set to a preset value; and determining the structure feature and color feature of the textile to be detected according to the classification result of the K nearest neighbor algorithm.
[0021] Exemplarily, after obtaining a digital image of the textile to be detected, a Gabor filter is used to extract fabric structural features, and the image is divided into multiple regular sub-regions according to the extracted feature information. The color space conversion is performed on the divided sub-regions, and the RGB color space is converted to the HSV color space. The converted HSV color space image is color quantized, and the H channel is divided into 18 intervals, and the S and V channels are divided into 3 intervals each, so as to obtain a total of 162 color intervals. The number of pixels in each color interval in each sub-region is counted to generate a 162-dimensional color histogram, and the histogram data is normalized to obtain the sub-region color feature vector. For each sub-region, the mean, variance, skewness and kurtosis of the color feature vector are calculated to form a four-dimensional statistical feature vector. The statistical feature vectors of all sub-regions are spliced to form a comprehensive feature vector of the entire image. The feature vectors are classified using the K nearest neighbor algorithm, the K value is set to 5, and the Euclidean distance is used as the distance metric. The training samples are selected from the pre-labeled sample database. For each newly input textile image feature vector, the five nearest neighbor samples are found in the training samples. The majority category of these five samples is used as the classification result of the new sample. The classification results are output to complete the structural and color feature analysis of the textile to be tested. The digital image of the textile to be tested is obtained, and the image resolution is 2048x2048 pixels. The fabric structural features are extracted using Gabor filter. The filter parameters are set to frequency of 0.1, direction angles of 0°, 45°, 90°, 135°, and filter size of 15x15 pixels. According to the extracted feature information, the image is divided into 16x16 regular sub-regions, and the size of each sub-region is 128x128 pixels. Each sub-region is converted from RGB to HSV (hue, saturation, value) color space. The conversion formula is V=max(R, G, B), S=(V-min(R, G, B)) / V, and H has different calculation methods according to the different maximum values of RGB. The HSV space is color quantized. The H channel is divided into 18 intervals, one interval every 20°. The S and V channels are divided into 3 intervals each, 0-0.33, 0.33-0.66, and 0.66-1, resulting in a total of 162 color intervals. The number of pixels in each color interval in each sub-region is counted to generate a 162-dimensional color histogram. The histogram data is normalized to obtain the sub-region color feature vector. The mean, variance, skewness, and kurtosis of the color feature vector of each sub-region are calculated to form a four-dimensional statistical feature vector. For example, the statistical feature vector of a sub-region is [0.35, 0.12, 0.78, 2.45]. The statistical feature vectors of all 256 sub-regions are concatenated to form a 1024-dimensional comprehensive feature vector of the entire image. The K nearest neighbor algorithm is used for classification. The K value is set to 5, and the Euclidean distance is used as the distance metric.Select training samples from the 10,000 pre-labeled sample images, calculate the Euclidean distance between the newly input textile image feature vector and the training sample, and select the 5 samples with the smallest distance. Assuming that 3 of the 5 samples belong to category A and 2 belong to category B, the new sample is classified as category A. Output the classification results to complete the structural and color feature analysis of the textile to be tested.
[0022] S102 , performing cluster analysis on the color feature vectors of each sub-region, and mapping each sub-region to a color category in a pre-established standard color sample library according to the clustering result, to obtain a color category label of the sub-region.
[0023] Obtain the color feature vector of each sub-region, and cluster the color feature vector using the K-means clustering method, wherein the number of clusters K is a preset value; according to the clustering result, compare the color feature vector of the sub-region with samples in a pre-established standard color sample library, wherein the standard color sample library contains a preset number of common colors; determine the color category label corresponding to each sub-region, and generate a sub-region color category label matrix, wherein each element in the matrix represents the color category number of the corresponding sub-region; perform smoothing on the color category label matrix, and if the color category of a sub-region is different from the color category of its adjacent sub-region, and the area of the sub-region is less than a preset threshold, adjust the color category of the sub-region to be the same as the color category of its largest adjacent area; calculate the silhouette coefficient of the clustering result, and determine whether the silhouette coefficient is less than the preset threshold. If the silhouette coefficient is less than the preset threshold, increase the number of clusters K and re-execute the clustering process.
[0024] Exemplarily, the color feature vectors of each sub-region are subjected to K-means clustering analysis, the number of clusters K is set to 10, and the initial cluster center is selected using the K-means++ algorithm. The sub-region is assigned to the category of the nearest cluster center by calculating the Euclidean distance from the color feature vector of each sub-region to each cluster center. The center point of each cluster is recalculated, that is, the average value of all color feature vectors in the cluster, the cluster center is updated, and the distance calculation and category assignment process is repeated until the moving distance of the cluster center is less than the preset threshold value of 0.001 or the maximum number of iterations is 100. According to the clustering results, the color feature vector of each sub-region is compared with the samples in the pre-established standard color sample library. The standard color sample library contains 100 common colors, each color is represented by an HSV value, and the color difference between the color feature vector of the sub-region and the CIEDE2000 color difference formula of the color in the sample library is calculated, and the standard color sample with the smallest color difference is selected as the color category of the sub-region. For each sub-region, a corresponding color category label is assigned to generate a sub-region color category label matrix, and each element in the matrix represents the color category number of the corresponding sub-region. The color category label matrix is smoothed. If the color category of a sub-region is different from that of its adjacent sub-region and the area of the sub-region is less than the preset threshold, the color category of the sub-region is adjusted to be the same as the color category of its largest adjacent area. The silhouette coefficient of the clustering result is calculated to evaluate the clustering quality. If the silhouette coefficient is less than the preset threshold of 0.5, the number of clusters K is increased and the clustering process is re-executed. K-means clustering analysis is performed on the color feature vectors of each sub-region, and the initial number of clusters K is set to 10. The K-means++ algorithm is used to select the initial cluster center. The specific process is to randomly select the first center point, then calculate the shortest distance from each point to the selected center point, select the next center point with the square of the distance as the probability, and repeat this process until K center points are selected. Assume that there are 1000 sub-regions, and the color feature vector of each sub-region is 162-dimensional. The Euclidean distance from the color feature vector of each sub-region to each cluster center is calculated, and the sub-region is assigned to the category of the cluster center with the closest distance. The center point of each cluster is recalculated, that is, the average value of all color feature vectors in the cluster. After updating the cluster center, if the maximum moving distance between the new and old center points is less than the preset threshold 0.001 or the maximum number of iterations is 100, the iteration is stopped. According to the clustering results, the color feature vector of each sub-region is compared with the samples in the pre-established standard color sample library. The standard color sample library contains 100 common colors, each of which is represented by an HSV value, such as red (0, 100, 100), blue (240, 100, 100), etc. The CIEDE2000 color difference between the sub-region color feature vector and the color in the sample library is calculated, and the standard color sample with the smallest color difference is selected as the color category of the sub-region.For each sub-region, the corresponding color category label is assigned to generate a 32x32 sub-region color category label matrix. The value of each element in the matrix ranges from 1 to 100, indicating the color category number of the corresponding sub-region. The color category label matrix is smoothed by a 3x3 window median filter to reduce isolated color categories. If the color category of a sub-region is different from that of its adjacent sub-region and the area of the sub-region is less than 9 pixels, the color category of the sub-region is adjusted to be the same as the color category of its largest adjacent area. Finally, the silhouette coefficient of the clustering result is calculated to evaluate the clustering quality. The silhouette coefficient is calculated by calculating the average distance a of each sample from other samples of the same type and the average distance b from the nearest sample of the other class. The silhouette coefficient is the average value of (b-a) / max(a, b). If the silhouette coefficient is less than the preset threshold of 0.5, the number of clusters K is increased by 2, and the clustering process is re-executed until the silhouette coefficient is greater than 0.5 or K reaches 20.
[0025] S103. According to the color category labels of the sub-regions, the number of sub-regions corresponding to each color category is counted, their area proportions are calculated, and a color distribution feature vector with color category as a dimension is constructed to characterize the overall color distribution of the textile.
[0026] Receive matrix data containing sub-region color category labels, and pre-process the matrix data according to a preset color category range; if invalid or erroneous data is detected, correct it to a valid value. Obtain the pre-processed color category label matrix, and establish an area counter for each color category; by traversing each element in the matrix, accumulate the sub-region area corresponding to the color category, and obtain the total area statistics of each color category. Use the total area of all sub-regions as the denominator and the total area of each color category as the numerator to calculate the area ratio of the sub-region corresponding to each color category. Determine the area ratio of each color category; if the ratio is less than a preset threshold, merge the color category into the most similar color category, and the similarity is determined by calculating the Euclidean distance in the HSV space. Construct a color distribution feature vector, in which the vector dimension is the same as the number of color categories after merging; standardize the feature vector to obtain the final color distribution feature vector.
[0027] Exemplarily, the color category label matrix of the sub-region is preprocessed, invalid or erroneous data is checked and corrected, and the label value that exceeds the predetermined color category range is set to the closest valid value. According to the processed color category label matrix, the actual area of the sub-region corresponding to each color category is counted, a color category area counter is created, each element in the matrix is traversed, and the actual area of the sub-region corresponding to the color category is accumulated to obtain the total area statistics of each color category. The area proportion of the sub-region corresponding to each color category is calculated, and the total area of all sub-regions is used as the denominator and the total area of each color category is used as the numerator to obtain the area proportion of each color category. The color categories are merged, and the threshold is set to 0.01. The color categories with an area proportion less than the threshold are merged into the most similar color categories, and the similarity is determined by calculating the Euclidean distance of the color value in the HSV space. Construct a color distribution feature vector, the vector dimension is the same as the number of color categories after the merger, each dimension corresponds to a color category, and the vector element value is the area proportion of the color category. Perform z-score normalization on the color distribution feature vector and calculate the z score of each element. The z score = (x-μ) / σ, where x is the element value, μ is the vector mean, and σ is the vector standard deviation. Limit the normalized z score to the range of [-3, 3], and set the value outside the range as the boundary value to obtain the final color distribution feature vector. Calculate the entropy value of the color distribution feature vector to evaluate the uniformity of the color distribution. The entropy value = -Σ(pi*log2(pi)), where pi is the area ratio of the i-th color category. Preprocess the 32x32 sub-region color category label matrix to check and correct invalid or erroneous data. Assuming that the valid color category range is 1-100, set the label value outside this range to the closest valid value. For example, if the label value is found to be 0 or 101, it will be corrected to 1 and 100 respectively. According to the processed matrix, count the actual area of the sub-region corresponding to each color category. Assuming that the size of each sub-region is 10x10 pixels, create a 100-dimensional color category area statistics array, traverse the 1024 elements in the matrix, and accumulate the area of the corresponding color category, which is 100 square pixels. When calculating the area percentage, use 1024000 square pixels as the denominator and the total area of each color category as the numerator. Merge the color categories and set the threshold to 0.01. For example, if the red proportion is 0.005 and the orange proportion is 0.008, then merge these two colors into the most similar color category and determine the similarity by calculating the Euclidean distance in the HSV space. Construct a color distribution feature vector. Assuming that there are 50 color categories left after the merger, generate a 50-dimensional vector, and each dimension corresponds to the area percentage of a color category. Perform z-score normalization on the 50-dimensional vector and calculate the z score of each element.If the proportion of a color category is 0.15, the vector mean is 0.02, and the standard deviation is 0.03, then the z score of the element is (0.15-0.02) / 0.03=4.33. The z score is limited to the range of [-3, 3], so 4.33 will be set to 3. Finally, the entropy value of the color distribution feature vector is calculated to evaluate the uniformity of the color distribution. Assume that the standardized vector is.
[0028] [0.1, 0.2, 0.15, 0.05, ...], calculate -Σ(pi*log2(pi)) to get the entropy value, which is used to measure the complexity of color distribution.
[0029] S104, selecting a standard sample of the same type from a standard color sample library according to the overall color distribution, extracting its color distribution feature vector, calculating the Euclidean distance between the color distribution feature vector of the current textile and the standard sample, and obtaining a color deviation quantitative index.
[0030] According to the color distribution feature vector of the textile, the first preset standard samples with the highest similarity are selected as matching samples in the standard color sample library; the color distribution feature vectors of the preset matching standard samples are dimensionally aligned with the feature vector of the textile, and if the dimensions are inconsistent, upsampling is performed by linear interpolation or downsampling is performed by average pooling; the Euclidean distance between the color distribution feature vector of the textile and the color distribution feature vector of the preset matching standard samples is calculated, and the weighted average of the preset distance values is obtained as a color deviation quantification index; it is determined whether the color deviation quantification index is greater than a preset threshold value, and if so, the color distribution feature vector of the textile is added to the standard color sample library; cross-validation is performed on the newly added samples, and if the validation passes, the samples are retained, otherwise the newly added samples are discarded.
[0031] Exemplarily, according to the color distribution feature vector of the whole textile, select the same type of standard samples in the standard color sample library, use the color histogram similarity algorithm to calculate the similarity between the current textile and each standard sample in the sample library, and select the top 5 standard samples with the highest similarity as matching samples. Extract the color distribution feature vectors of the selected 5 matching standard samples, align the dimensions of these feature vectors with the feature vector of the current textile, and if the dimensions are inconsistent, upsample or downsample by average pooling to keep the feature vector dimensions consistent. Calculate the Euclidean distance between the color distribution feature vector of the current textile and the color distribution feature vectors of the 5 matching standard samples to obtain 5 distance values, calculate the weighted average of the 5 distance values, and determine the weight according to the similarity sorting as the final color deviation quantification index. According to the calculated color deviation quantification index, judge whether the color distribution of the current textile is within an acceptable range. If the deviation quantification index is greater than a preset threshold, add the color distribution feature vector of the current textile to the standard color sample library as a new standard sample, and the preset threshold is determined based on the statistical analysis results of historical data. The newly added samples are cross-validated to ensure their representativeness and reliability in the sample library. If the validation is passed, they are retained, otherwise they are removed. Take a blue striped shirt as an example, its color distribution feature vector is 100 dimensions. In the color sample library containing 1000 standard samples, the color histogram similarity algorithm is used to calculate the similarity. The algorithm divides the feature vector into 10 intervals, calculates the cumulative probability of each interval, and then compares the sum of the minimum values of the corresponding intervals of the two vectors. Select the 5 samples with the highest similarity, assuming that their similarities are 0.95, 0.93, 0.91, 0.88 and 0.85 respectively. The feature vectors of these 5 samples are dimensionally aligned, and it is found that 3 of them are 80 dimensions and 2 are 120 dimensions. The 80-dimensional vector is upsampled to 100 dimensions using linear interpolation, and the 120-dimensional vector is downsampled to 100 dimensions using 2x2 average pooling. Calculate the Euclidean distance between the current shirt and the five samples, and get distance values of 3.2, 3.5, 3.8, 4.1, and 4.3. According to the similarity, weights of 0.3, 0.25, 0.2, 0.15, and 0.1 are assigned, and the weighted average distance is calculated to be 3.58, which is used as a quantitative indicator of color deviation. Assuming the preset threshold is 4.0, 4.0 is based on the statistical analysis of the past 1,000 samples. 3.58 is less than 4.0, and the color distribution is judged to be within an acceptable range. If it is greater than 4.0, the feature vector of the shirt is added to the sample library. When adding a new sample, randomly select 100 samples from the existing sample library for cross-validation, calculate the average similarity between the new sample and these 100 samples, and retain it if it is higher than 0.75, otherwise remove it.
[0032] S105. In continuous multi-batch production, obtain a color deviation quantitative index for each batch of products, construct a color deviation index time series, and align the color deviation index sequences between different batches.
[0033] Obtain the color deviation quantitative indicators of multiple batches of products, record the production timestamp of each batch, and construct the color deviation indicator time series. Form a key-value pair based on the timestamp and the color deviation indicator and store it in a hash table. Unify the sequence length between different batches and set a fixed time window size. If the data points in the time period are sparse, the linear interpolation method is used to fill the missing data; if the data points in the time period are dense, the mean downsampling method is used to reduce the data points. The moving median method is used to identify outliers and determine whether the data points exceed the preset multiple standard deviation range. If exceeded, the data points are replaced with the average of the previous and next data points. The processed data is smoothed using the single exponential smoothing method. Select the batch with the longest time span as the benchmark sequence, align the batch with the benchmark sequence, and calculate the Euclidean distance matrix between the two sequences. Find the optimal matching path based on the Euclidean distance matrix, adjust the time axis, and obtain the aligned color deviation indicator sequence.
[0034] Exemplarily, the color deviation quantitative index of multiple batches of products is obtained, the production timestamp of each batch is recorded, the initial color deviation index time series is constructed, and the timestamp and the corresponding color deviation index form a key-value pair and are stored in a hash table. The sequence length between different batches is unified, and the fixed time window size is set to 24 hours. For the time period with sparse data points, the linear interpolation method is used to fill the missing data. For the time period with dense data points, the mean downsampling method is used to reduce the data points to ensure that the sequence length of all batches is consistent. The time series after the unified length is preprocessed, the outliers are identified using the 5-point moving median method, the data points beyond the range of 3 times the standard deviation are replaced with the average of the previous and next data points, and the processed data is smoothed using the single exponential smoothing method, and the smoothing factor is set to 0.3. Align the color deviation index sequences of different batches, select the batch with the longest time span as the benchmark sequence, align the sequences of other batches with the benchmark sequence through the dynamic time warping algorithm, calculate the Euclidean distance matrix between the two sequences, use dynamic programming to find the optimal matching path, adjust the time axis so that similar patterns correspond in time, and obtain the aligned color deviation index sequence. Taking textiles produced continuously for 30 days as an example, the color deviation quantitative index is obtained every hour, and a total of 720 data points are collected. These data points are stored in a hash table with Unix timestamp as the key and deviation index as the value. 24 hours is set as a fixed time window, and the 720 data points are divided into 30 batches. For batches with sparse data, such as only 20 valid data points on a certain day, linear interpolation is used to fill the missing 4 points, and the adjacent points with the highest correlation coefficient are selected for interpolation. For batches with dense data, such as 26 data points on a certain day, the average value is taken for every 6 points, and the number of points is downsampled to 24. For the sequence with unified length, the 5-point moving median method is used to identify outliers, and the global standard deviation σ=0.05 is calculated. The data points beyond the range of 3σ are replaced by the average value of the previous and next data points. Then single exponential smoothing is applied with smoothing factor α=0.3, and the smoothed value St=0.3*Xt+0.7*St-1, where Xt is the current observation value and St-1 is the previous smoothed value. Finally, we select the batch with the longest span in 30 days, such as day 1 to day 30, as the benchmark sequence, and calculate the Euclidean distance matrix between it and other batch sequences, with a matrix size of 24x24. We use dynamic programming to find the path with the minimum distance sum, and adjust the time axis of other batches according to this path, so that the color deviation indicator sequences of all batches are aligned in time, which is convenient for subsequent analysis and comparison.
[0035] S106 , calculating the color concentricity index of the current batch and the previous batches on the aligned color deviation index time series, and when the color concentricity index is lower than a preset threshold, determining whether there is a color deviation propagation trend.
[0036] Acquire the aligned color deviation index time series, perform sliding window processing on the time series, and calculate the color concentricity index according to the sliding window. Determine whether the color concentricity index is lower than a preset threshold. If the color concentricity index is lower than the preset threshold, perform anomaly detection, including identifying abnormal points, performing STL time series decomposition on the abnormal points, and obtaining trend components. Predict the trend components, and calculate the color deviation propagation speed according to the prediction results. Determine whether the color deviation propagation speed exceeds the preset threshold. If the color deviation propagation speed exceeds the preset threshold, perform the Mann-Kendall trend test method. Determine whether there is a significant color deviation propagation trend according to the Mann-Kendall trend test result.
[0037] Exemplarily, the aligned color deviation index time series is processed by sliding window, the window size is set to 24 hours, the step length is 1 hour, the most recent 10 batches are selected for comparison, the Pearson correlation coefficient between the current batch and the selected batch in each window is calculated, and the correlation coefficient is used as the color concentricity index. According to the statistical distribution of historical data, the preset threshold of the color concentricity index is set to 0.8. When the calculated color concentricity index is lower than the threshold, the anomaly detection mechanism is triggered, and the Z-score method is used to identify the anomaly points, and the data points exceeding 3 times the standard deviation are marked as abnormal. The detected anomaly points are decomposed by STL (Seasonal and Trend decomposition using Loess) time series, and the sequence is decomposed into trend, seasonal and random components. The trend component is extracted, and the trend component is predicted using the Holt-Winters triple exponential smoothing method, with smoothing parameters α=0.3, β=0.1, and γ=0.1. Based on the prediction results, the color deviation propagation speed is calculated, which is defined as the first-order difference of the trend component. If the propagation speed exceeds the preset threshold of 0.05, a Mann-Kendall trend test is performed. When the p-value is less than 0.05, it is determined that there is a significant color deviation propagation trend, triggering the early warning mechanism and adjusting the production parameters. The statistical distribution of the color concentricity index is recalculated using the latest data every 30 days, and the preset threshold is dynamically adjusted to adapt to different production environments and seasonal changes. Taking textiles produced continuously for 30 days as an example, the aligned color deviation index time series is processed. A 24-hour window is set, sliding once every hour, and the 10 most recent batches of data are selected. In each window, the Pearson correlation coefficient between the current batch and the other 9 batches is calculated to obtain 9 color concentricity indicators. Assume that the indicator calculated in a certain window is
[0038] [0.92, 0.88, 0.85, 0.79, 0.82, 0.90, 0.87, 0.91, 0.86]. Since 0.79 is lower than the preset threshold of 0.8, anomaly detection is triggered. Using the Z-score method, the mean μ=0.867 and the standard deviation σ=0.041 are calculated, and 0.79 is marked as an outlier, (0.79-0.867) / 0.041=-1.88, exceeding -3σ. The 720-hour (30-day) data where the outlier is located is subjected to STL decomposition to obtain trend, seasonal and random components. The Holt-Winters method is used to predict the trend of the next 24 hours, with parameters α=0.3, β=0.1, and γ=0.1. The first-order difference of the trend component is calculated as the propagation speed, and 24 speed values are obtained, with the maximum value being 0.06, exceeding the threshold of 0.05. The Mann-Kendall test was performed and the p value was 0.03 < 0.05, indicating that there was a significant spreading trend. At the same time, the color concentricity index distribution was recalculated using the data from the last 30 days, and a new mean of 0.85 and standard deviation of 0.05 were obtained. Based on this, the preset threshold was adjusted from 0.8 to 0.83 to adapt to the current production environment.
[0039] S107, predicting the color deviation quantitative index of the current batch, if the predicted value exceeds the preset color deviation threshold range, combining the color concentricity calculation result to determine the influencing factors and propagation path of the color deviation.
[0040] Acquire historical data of color deviation quantitative indicators, perform time series prediction based on the historical data, and take the color deviation quantitative indicator value and its preset confidence interval as output; determine whether the color deviation quantitative indicator prediction value exceeds a preset threshold range, wherein the preset threshold range is determined by the mean of the historical data; if the color deviation quantitative indicator prediction value or its confidence interval exceeds the preset threshold range, perform sensitivity analysis on the time point exceeding the threshold, and calculate the first-order and global sensitivity index of the color deviation quantitative indicator to each production parameter; construct a color deviation propagation map based on the sensitivity analysis results, determine the propagation nodes and propagation paths of the color deviation, and calculate the probability of each propagation path.
[0041] Exemplarily, according to the historical data of the color deviation quantitative index of the current batch, the ARIMA model is used for time series prediction to predict the color deviation quantitative index value of the next 24 hours, and the 95% confidence interval of the predicted value is calculated. Based on the statistical analysis results of historical data, the preset color deviation threshold range is set to mean ± 2 times the standard deviation, and the predicted color deviation quantitative index value is compared with the preset threshold range. If the predicted value or its confidence interval exceeds the threshold range, the further analysis process is triggered. Combined with the color concentricity calculation results, Sobol sensitivity analysis is performed on the time point exceeding the threshold, and the first-order and global sensitivity index of the color deviation quantitative index to each production parameter is calculated to determine the factors that have the greatest impact on the color deviation. Based on the analysis results of the influencing factors, a Bayesian network color deviation propagation map is constructed, and the propagation path of the color deviation is traced back using the probabilistic inference algorithm, the key propagation nodes and propagation paths are identified, and the probability of each propagation path is calculated. Through the cross-validation method, the data set is divided into a training set and a test set, a model is constructed on the training set, and the accuracy of the identified influencing factors and propagation paths is verified on the test set, the prediction accuracy and F1 score are calculated, and the reliability of the analysis results is evaluated. Taking the production data of a textile factory for 30 consecutive days as an example, the color deviation quantitative indicators are collected every hour, with a total of 720 data points. The ARIMA (2, 1, 2) model is used to fit the data and predict the color deviation index value for the next 24 hours. The prediction results show that the predicted value for the 23rd hour is 0.158, and the 95% confidence interval is [0.142, 0.174]. Based on historical data analysis, the mean of the color deviation index is 0.12 and the standard deviation is 0.02, so the preset threshold range is set to [0.08, 0.16]. Since the predicted value of 0.158 and its upper limit of the confidence interval of 0.174 exceed the threshold range, further analysis is triggered. Sobol sensitivity analysis is performed on this time point. Considering 10 production parameters such as temperature, humidity, and dye concentration, the first-order sensitivity index of temperature is calculated to be 0.42, and the global sensitivity index is 0.51, which is the most influential factor. The Bayesian network is used to construct a color deviation propagation map containing these 10 parameters, and the variational inference algorithm is used to approximate the conditional probability between parameters. The results show that the temperature has the highest probability of affecting the propagation path of color deviation by affecting the solubility of dyes, which is 0.38. A 5-fold cross validation was used to train the model on 80% of the data and validate it on 20% of the data. The validation results showed that the model had an accuracy of 85% in identifying the main influencing factors, with an F1 score of 0.82, confirming the reliability of the analysis results.
[0042] Calculate the color deviation gradient between adjacent batches, determine the trend of deviation growth or weakening, identify the periodic pattern of color deviation between batches, construct a color deviation propagation network diagram, determine the propagation direction by the connection strength between nodes, combine the propagation direction with the production process flow chart and map it to the process to identify the propagation path.
[0043] Obtain the color deviation gradient between adjacent batches and calculate the deviation change rate at each time point; determine the color deviation growth or weakening trend based on the deviation change rate; and obtain the trend curve by smoothing with the sliding window average method. Test the color deviation time series; if the time series is non-stationary, perform differential processing until it is stable. Analyze the spectral characteristics of the stationary series; identify the main periodic components of the stationary series. Construct a color deviation propagation network diagram; take each batch as a node and calculate the deviation correlation coefficient of adjacent batches; determine the connection strength between nodes based on the deviation correlation coefficient. Map the propagation network diagram to the production process flow chart; match the node timestamps of the propagation network diagram to the nearest process time point; calculate the in-degree and out-degree of each process node; and identify the key path of color deviation propagation based on the node importance score.
[0044] Exemplarily, the color deviation gradient between adjacent batches is calculated, the deviation change rate at each time point is calculated using a Savitzky-Golay filter, the deviation growth or weakening trend is judged based on the positive or negative change rate, and the trend curve is obtained by smoothing the sliding window average method. The Augmented Dickey-Fuller (ADF) enhanced Dickey-Fuller test is performed on the color deviation time series to determine the stationarity of the sequence. If the sequence is non-stationary, differential processing is performed until it is stationary. Wavelet transform is applied to the stationary sequence, the spectral characteristics are analyzed, the main periodic components are identified, and the periodic pattern of color deviation between batches is determined by combining autocorrelation function analysis. A color deviation propagation network diagram is constructed, each batch is used as a node, and the connection strength between nodes is determined by the deviation correlation coefficient of adjacent batches. A transition probability matrix is defined, in which the element Pij represents the transition probability from node i to node j, and the calculation method is Pij = Wij / ΣkWik, Wij is the connection strength between nodes i and j, and ΣkWik is the sum of the weights between node i and all its neighboring nodes k. The PageRank algorithm is used to iteratively calculate the node importance and identify key propagation nodes. The propagation network diagram was mapped with the production process flow chart, and the nearest neighbor algorithm was used to match the timestamps of the network nodes to the closest process time point. The in-degree and out-degree of each process node were calculated, and the critical path of color deviation propagation was identified by combining the node importance score. Multiple sets of simulation data were generated by Monte Carlo simulation method, and the critical path identification process was repeated. The frequency of each path being identified as a critical path was counted to verify the stability and reliability of the identification results. Taking the production data of a textile factory for 30 consecutive days as an example, 24 color deviation data points were collected every day. The Savitzky-Golay filter was used with a window size of 15 and a polynomial order of 3 to calculate the deviation gradient, and 720 gradient values were obtained. The trend curve was obtained by smoothing with a 5-hour sliding window average method. The ADF test was performed on the original sequence, and the p value was 0.06>0.05, indicating that the sequence was non-stationary. After the first-order difference, the p value dropped to 0.01<0.05, and the sequence became stationary. The db4 wavelet transform was applied to the stationary sequence, with the decomposition layer number of 4. The spectrum characteristics were analyzed and two main cycles of 12 hours and 24 hours were found. A 30x30 color deviation propagation network diagram was constructed, and the Pearson correlation coefficient between nodes was calculated as the connection strength. The transition probability matrix P was defined, for example, P12=0.15 means that the transition probability from day 1 to day 2 is 0.15. The PageRank algorithm was used with a damping factor of 0.85 and 10 iterations to obtain the node importance score, with the highest score being 0.068. The network nodes were matched with 10 production processes, such as matching the node with a timestamp of 14:30 to the dyeing process at 14:00. The average in-degree and out-degree of each process node were calculated, and combined with the importance score, "dyeing-drying-setting" was identified as the key propagation path.Through 1000 Monte Carlo simulations, this path was identified as the critical path in 92.5% of the cases, verifying the reliability of the results.
[0045] S108. Generate corresponding process parameter adjustment strategies based on the influencing factors and propagation paths of color deviation, and track and locate the upstream key processes that cause color deviation.
[0046] Acquire process parameters and color quality data, establish a parameter sensitivity matrix, and the parameter sensitivity matrix is used to quantify the nonlinear influence of process parameters on color quality; locate the upstream key process causing color deviation according to the process flow chart and the color deviation propagation network, and establish a correlation matrix between processes; each node in the correlation matrix records the process timestamp and related parameters; based on the parameter sensitivity matrix and the upstream key process information, design a process parameter adjustment strategy, including using a genetic algorithm to optimize the adjustment range, in which the chromosome encoding is a real number encoding; construct a dynamic feedback controller for real-time regulation of textile color quality, in which the control target is to minimize the sum of squares of color deviations in the next N steps.
[0047] Exemplarily, according to the influencing factors and propagation pathways of color deviation, a relationship model between process parameters and color quality is constructed, and a parameter sensitivity matrix is established by using the random forest regression method to quantify the nonlinear influence of each process parameter on color quality. Through the depth-first search algorithm, combined with the process flow chart and the color deviation propagation network, the upstream key process causing the color deviation is located, and the correlation matrix between the processes is established. Each node records the process timestamp and related parameters. Based on the parameter sensitivity matrix and the upstream key process information, a targeted process parameter adjustment strategy is established, and a genetic algorithm is used to optimize the adjustment range. The chromosome encoding is real number encoding, which represents the adjustment amount of each parameter. The crossover uses arithmetic crossover, and the mutation uses Gaussian mutation. The fitness function is the weighted sum of the inverse of the color deviation and the process constraint. A dynamic feedback controller is designed, and a model predictive control algorithm is used to realize real-time regulation of textile color quality. A prediction model based on random forest is constructed, and the control target is defined as minimizing the sum of squares of the color deviations in the next N steps. The optimal control sequence is solved by quadratic programming. The process parameters are dynamically adjusted according to the real-time monitoring data, and the abnormal warning mechanism is triggered when the deviation exceeds the preset threshold. A virtual production line was constructed through digital twin technology, and simulation experiments were carried out to verify the effect of the control strategy, evaluate the control performance under different parameter combinations, and optimize the control parameter settings. Taking the dyeing process of a textile factory as an example, 10 key process parameters such as temperature, pH value, dye concentration and color deviation data were collected, with a total of 1000 groups of samples. Random forest regression was used with 100 trees and a maximum depth of 10 to establish a parameter sensitivity matrix and obtain the importance score of each parameter, such as temperature 0.25, pH value 0.18, dye concentration 0.22, etc. Through the depth-first search algorithm, the color deviation was traced in the flowchart containing 20 process nodes, and three key upstream processes including ingredients, pretreatment and dyeing were identified, and a 3x3 process correlation matrix was established. A genetic algorithm was designed to optimize the parameter adjustment strategy, with a population size of 50, an iteration number of 100, a chromosome length of 10, corresponding to 10 parameters, a crossover probability of 0.8, and a mutation probability of 0.1. The fitness function was set as the weighted sum of the inverse of the color deviation and the degree of violation of the process constraint, with a weight ratio of 0.7:0.3. Implement model predictive control, with prediction step size N=5, control step size M=3, and rolling time domain optimization. Build a prediction model based on random forest, with 50 trees and a maximum depth of 8. Collect real-time data every 5 minutes to predict the color deviation in the next 25 minutes. Solve the optimal control sequence through quadratic programming, such as temperature adjustment [-0.5, 0.2, 0.1]℃. Use digital twin technology to build a virtual production line, simulate 100 batches of production processes, and compare the standard deviation of color deviation before and after optimization, which is reduced from 0.15 to 0.08, to verify the effectiveness of the control strategy.
[0048] Combined with the influencing factors of color deviation, a correlation matrix between process and color deviation is constructed to quantify the contribution of each process to the deviation. According to the propagation path of color deviation, the process is gradually traced back to the upstream process along the path. The key node process is identified by combining the topological structure of the propagation network. By comparing the influence intensity of processes on different propagation paths, the upstream process group that causes color deviation is determined, the upstream processes are prioritized, and the source process of color deviation is determined.
[0049] Obtain a process and color deviation association matrix, the association matrix is calculated by the partial least squares regression method, and is used to determine the contribution of each process to the color deviation; construct a weighted directed graph based on the contribution, the weighted directed graph represents the propagation relationship between processes; construct a propagation network topology, calculate the importance score of each node in the propagation network, if the node score exceeds a preset threshold, the node is determined to be a key node process; for the key node process, a judgment matrix is constructed by the hierarchical analysis method, the judgment matrix is used to calculate the eigenvector, and the weight of each process is obtained; according to the weight, the color deviation source process is determined; multiple groups of simulation data are generated by the Monte Carlo method, and the simulation data are used to repeatedly execute the source process identification process; the frequency of each process being identified as the source is counted, if the frequency of a process being identified as the source exceeds the preset threshold, it is determined as the final color deviation source process.
[0050] Exemplarily, a process-color deviation association matrix is constructed, and the partial least squares regression method is used to extract key influencing factors, and the contribution of each process to the color deviation is calculated to obtain the process contribution vector. According to the color deviation propagation path, a weighted directed graph is established to represent the propagation relationship between processes, and the weight reflects the influence intensity between processes, and the propagation network topology is constructed. The PageRank algorithm is applied to calculate the importance score of each node in the propagation network, and the key node process is identified by weighted summation in combination with the process contribution vector, and the process influence intensity on different propagation paths is calculated. The key upstream processes are prioritized by the hierarchical analysis method, and a judgment matrix is constructed based on the relative importance of the processes. The eigenvector is calculated to obtain the weight of each process and determine the source process of the color deviation. Multiple sets of simulation data are generated by the Monte Carlo simulation method, and the source process identification process is repeatedly executed. The frequency of each process being identified as the source is counted to verify the stability and reliability of the identification results. If the frequency of a process being identified as the source exceeds the preset threshold, it is determined as the final color deviation source process. According to the identification results, a sensitivity analysis is performed on the key parameters of the source process to quantify the degree of influence of parameter changes on color deviation, providing a basis for subsequent process parameter optimization. Taking the dyeing production line of a textile factory as an example, 20 process parameters and color deviation data of 10 key processes were collected, with a total of 1,000 sets of samples. The partial least squares regression method was used to construct the process and color deviation association matrix, and 5 principal components were extracted to explain 85% of the variance. The process contribution vector was calculated
[0051] [0.15, 0.22, 0.18, 0.10, 0.08, 0.05, 0.07, 0.06, 0.04, 0.05]. Based on the process flow, a 10x10 weighted directed graph adjacency matrix was constructed with a weight range of 0-1, reflecting the influence intensity between processes. The PageRank algorithm was applied with a damping factor of 0.85 and 100 iterations to calculate the node importance. The three nodes with the highest scores were [0.18, 0.16, 0.15]. Combined with the process contribution, a weight of 0.6:0.4 was used for weighted summation to identify three key node processes. A 3x3 judgment matrix was constructed using the hierarchical analysis method. Based on the set relative importance, the eigenvector [0.5, 0.3, 0.2] was calculated as the process weight. Through 1000 Monte Carlo simulations, the frequency of each process being identified as the source was counted. The highest frequency was 62%, exceeding the preset threshold of 60%, and it was determined to be the source process of color deviation. A sensitivity analysis was performed on the five key parameters of the process, and the Morris method was used to calculate the parameter importance index μ*. The parameter with the highest score was
[0052] [2.5, 1.8, 1.2, 0.9, 0.6], providing direction for subsequent process optimization.
[0053] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations. In addition, the various different embodiments of the present invention can also be combined arbitrarily, as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A method for detecting color deviation of textiles, characterized in that: The method comprises: Acquire a digital image of the textile to be tested, extract the fabric structure features, divide the image into regular sub-regions, extract the color histogram features of each sub-region, and obtain the color feature vector of the sub-region; Perform cluster analysis on the color feature vectors of each sub-region, and map each sub-region to a color category in a pre-established standard color sample library according to the clustering results to obtain a color category label of the sub-region; According to the color category labels of the sub-regions, the number of sub-regions corresponding to each color category is counted, their area proportions are calculated, and a color distribution feature vector with color category as the dimension is constructed to characterize the overall color distribution of the textile. According to the overall color distribution, select the same type of standard samples in the standard color sample library, extract its color distribution feature vector, calculate the Euclidean distance between the color distribution feature vector of the current textile and the standard sample, and obtain the color deviation quantitative index; In continuous multi-batch production, obtain the color deviation quantitative index of each batch of products, construct the color deviation index time series, and align the color deviation index series between different batches; On the aligned color deviation index time series, calculate the color concentricity index of the current batch and the previous batches. When the color concentricity index is lower than the preset threshold, determine whether there is a color deviation propagation trend. Predict the color deviation quantitative index of the current batch. If the predicted value exceeds the preset color deviation threshold range, combine the color concentricity calculation results to determine the influencing factors and propagation paths of the color deviation; According to the influencing factors and propagation paths of color deviation, the corresponding process parameter adjustment strategy is generated, and the upstream key processes that cause color deviation are tracked and located.
2. The method according to claim 1, wherein: The method of obtaining a digital image of the textile to be tested, extracting fabric structural features, dividing the image into regular sub-regions, extracting color histogram features of each sub-region, and obtaining a color feature vector of the sub-region includes: Acquire a digital image of the textile to be inspected, wherein the digital image contains fabric structure information and color information; Extracting fabric structural features of the digital image to obtain a structural feature image of the textile; Dividing the structural feature image into sub-regions to obtain a plurality of regular sub-regions; Performing color space conversion on the regular sub-region, wherein the color space conversion is from RGB color space to HSV color space; Perform color quantization processing on the converted HSV color space image to obtain multiple color intervals; Counting the number of pixels in each color interval in each of the regular sub-regions to generate a color histogram; Normalizing the color histogram to obtain a sub-region color feature vector; Calculating the statistical features of the sub-region color feature vector to form a comprehensive feature vector of the entire image; The comprehensive feature vector is classified using a K nearest neighbor algorithm, wherein the K value is set to a preset value; According to the classification result of the K nearest neighbor algorithm, the structural characteristics and color characteristics of the textile to be detected are determined.
3. The method according to claim 1, wherein: The color feature vectors of each sub-region are clustered and analyzed, and each sub-region is mapped to a color category in a pre-established standard color sample library according to the clustering result to obtain a color category label of the sub-region, including: Obtaining a color feature vector of each sub-region, and clustering the color feature vector using a K-means clustering method, wherein the number of clusters K is a preset value; According to the clustering result, the color feature vector of the sub-region is compared with samples in a pre-established standard color sample library, where the standard color sample library contains a preset number of common colors; Determine the color category label corresponding to each sub-region, and generate a sub-region color category label matrix, wherein each element in the matrix represents the color category number of the corresponding sub-region; Performing a smoothing process on the color category label matrix, if the color category of a sub-region is different from the color category of its adjacent sub-region, and the area of the sub-region is smaller than a preset threshold, adjusting the color category of the sub-region to be the same as the color category of its largest adjacent area; The silhouette coefficient of the clustering result is calculated to determine whether the silhouette coefficient is less than a preset threshold. If the silhouette coefficient is less than the preset threshold, the number of clusters K is increased and the clustering process is re-executed.
4. The method according to claim 1, wherein: According to the color category labels of the sub-regions, the number of sub-regions corresponding to each color category is counted, their area proportions are calculated, and a color distribution feature vector with color category as a dimension is constructed to characterize the overall color distribution of the textile, including: Receiving matrix data including sub-region color category labels, and preprocessing the matrix data according to a preset color category range; If invalid or erroneous data is detected, it is corrected to a valid value; Get the preprocessed color category label matrix and build an area counter for each color category; By traversing each element in the matrix, accumulating the sub-region area of the corresponding color category, and obtaining the total area statistics of each color category; Use the total area of all sub-regions as the denominator and the total area of each color category as the numerator to calculate the area ratio of the sub-region corresponding to each color category; Determine the area proportion of each color category; If the proportion is less than a preset threshold, the color category is merged into the most similar color category, and the similarity is determined by calculating the Euclidean distance in the HSV space; Construct a color distribution feature vector, where the vector dimension is the same as the number of merged color categories; The feature vector is standardized to obtain a final color distribution feature vector.
5. The method according to claim 1, wherein: According to the overall color distribution, a standard sample of the same type is selected from the standard color sample library, its color distribution feature vector is extracted, and the Euclidean distance between the color distribution feature vector of the current textile and the standard sample is calculated to obtain a color deviation quantitative index, including: According to the color distribution feature vector of the textile, the first preset standard samples with the highest similarity are selected from the standard color sample library as matching samples; Align the dimensions of the color distribution feature vectors of the preset matching standard samples with the feature vectors of the textiles. If the dimensions are inconsistent, up-sample by linear interpolation or down-sample by average pooling. Calculating the Euclidean distance between the color distribution feature vector of the textile and the color distribution feature vector of a preset matching standard sample, and obtaining a weighted average of the preset distance values as a color deviation quantification index; Determining whether the color deviation quantification index is greater than a preset threshold, and if so, adding the color distribution feature vector of the textile to a standard color sample library; Perform cross-validation on the newly added samples. If they pass the validation, they are retained; otherwise, the newly added samples are discarded.
6. The method according to claim 1, wherein: In the continuous multi-batch production, the color deviation quantitative index of each batch of products is obtained, the color deviation index time series is constructed, and the color deviation index series between different batches are aligned, including: Obtain the color deviation quantitative indicators of multiple batches of products, record the production timestamp of each batch, and construct the color deviation indicator time series; A key-value pair is formed based on the timestamp and the color deviation index and stored in a hash table; Unify the sequence lengths between different batches and set a fixed time window size; If the data points in the time period are sparse, linear interpolation is used to fill in the missing data; If the time period has dense data points, the mean downsampling method is used to reduce the data points; The moving median method is used to identify outliers and determine whether the data point exceeds the preset standard deviation range. If it exceeds, the data point is replaced with the average of the previous and next data points; The processed data are smoothed using single exponential smoothing method; Select the batch with the longest time span as the benchmark sequence, align the batch with the benchmark sequence, and calculate the Euclidean distance matrix between the two sequences; The optimal matching path is found according to the Euclidean distance matrix, and the time axis is adjusted to obtain the aligned color deviation indicator sequence.
7. The method according to claim 1, wherein: The color concentricity index of the current batch and the previous batches is calculated on the aligned color deviation index time series, and when the color concentricity index is lower than a preset threshold, it is determined whether there is a color deviation propagation trend, including: Acquire an aligned color deviation index time series, perform sliding window processing on the time series, and calculate a color concentricity index according to the sliding window; Determine whether the color concentricity index is lower than a preset threshold value. If the color concentricity index is lower than the preset threshold value, perform anomaly detection, including identifying anomalies, and performing STL time series decomposition on the anomalies to obtain trend components; Predicting the trend component, and calculating the color deviation propagation speed according to the prediction result; Determining whether the color deviation propagation speed exceeds a preset threshold, and if the color deviation propagation speed exceeds the preset threshold, performing a test using the Mann-Kendall trend test method; It is determined whether there is a significant color deviation propagation trend based on the Mann-Kendall trend test result.
8. The method according to claim 1, wherein: The color deviation quantitative index of the current batch is predicted. If the predicted value exceeds the preset color deviation threshold range, the influencing factors and propagation paths of the color deviation are determined in combination with the color concentricity calculation result, including: Acquire historical data of color deviation quantitative index, perform time series prediction based on the historical data, and take the color deviation quantitative index value and its preset confidence interval as output; Determine whether the color deviation quantitative index prediction value exceeds a preset threshold range, wherein the preset threshold range is determined by the mean of historical data; If the color deviation quantitative index prediction value or its confidence interval exceeds the preset threshold range, a sensitivity analysis is performed on the time point exceeding the threshold, and the first-order and global sensitivity indexes of the color deviation quantitative index to each production parameter are calculated; According to the sensitivity analysis results, a color deviation propagation map is constructed to determine the propagation nodes and propagation paths of the color deviation, and the probability of each propagation path is calculated; It also includes: calculating the color deviation gradient between adjacent batches, determining the trend of deviation growth or weakening, identifying the periodic pattern of color deviation between batches, constructing a color deviation propagation network diagram, judging the propagation direction by the connection strength between nodes, and mapping the propagation direction to the process after combining it with the production process flow chart to identify the propagation path, specifically including: obtaining the color deviation gradient between adjacent batches, calculating the deviation change rate at each time point; judging the color deviation growth or weakening trend according to the deviation change rate; obtaining the trend curve by smoothing through the sliding window averaging method; testing the color deviation time series; if the time series is non-stationary, performing differential processing until it is stable; analyzing the spectral characteristics of the stationary series; identifying the main periodic components of the stationary series; constructing a color deviation propagation network diagram; taking each batch as a node, calculating the deviation correlation coefficient of adjacent batches; determining the connection strength between nodes according to the deviation correlation coefficient; mapping the propagation network diagram with the production process flow chart; matching the node timestamps of the propagation network diagram to the nearest process time point; calculating the in-degree and out-degree of each process node; and identifying the key path of color deviation propagation in combination with the node importance score.
9. The method according to claim 1, wherein: According to the influencing factors and propagation paths of color deviation, the corresponding process parameter adjustment strategy is generated, and the upstream key processes causing color deviation are tracked and located, including: Acquire process parameters and color quality data, and establish a parameter sensitivity matrix, wherein the parameter sensitivity matrix is used to quantify the nonlinear influence of the process parameters on the color quality; According to the process flow chart and color deviation propagation network, the upstream key processes that cause color deviation are located, and the correlation matrix between processes is established; Each node in the association matrix records the process timestamp and related parameters; Based on the parameter sensitivity matrix and upstream key process information, designing a process parameter adjustment strategy, including optimizing the adjustment range using a genetic algorithm, wherein the chromosome encoding is a real number encoding; A dynamic feedback controller is constructed to control the color quality of textiles in real time, where the control objective is to minimize the sum of squares of color deviations in the next N steps. It also includes: combining the influencing factors of color deviation, constructing a process and color deviation association matrix, quantifying the contribution of each process to the deviation, tracing back to the upstream process along the path according to the propagation path of the color deviation, identifying the key node process in combination with the topological structure of the propagation network, and determining the upstream process group that causes the color deviation by comparing the process influence intensity on different propagation paths, prioritizing the upstream processes, and determining the source process of the color deviation, specifically including: obtaining a process and color deviation association matrix, the association matrix is calculated by the partial least squares regression method, and is used to determine the contribution of each process to the color deviation; constructing a weighted directed graph according to the contribution, the weighted directed graph A directed graph is used to represent the propagation relationship between processes; a propagation network topology is constructed, and the importance score of each node in the propagation network is calculated. If the node score exceeds a preset threshold, the node is determined to be a key node process; for the key node process, a judgment matrix is constructed using a hierarchical analysis method, and the judgment matrix is used to calculate a eigenvector to obtain the weight of each process; according to the weight, the color deviation source process is determined; multiple groups of simulation data are generated by a Monte Carlo method, and the simulation data are used to repeatedly execute the source process identification process; the frequency of each process being identified as the source is counted, and if the frequency of a process being identified as the source exceeds a preset threshold, it is determined as the final color deviation source process.
Citation Information
Patent Citations
Textile color difference detection method based on image data
CN115100186A
Printing quality control method and system
CN118570130A
Intelligent cloth inspection detection method, system, equipment and medium
CN118583802A
Color misregistration detector and color misregistration easing system
US5339159A
Cited By
Visual MicroLED color deviation identification method for improving yield
CN120279284A
Textile color difference identification method for optimizing process
CN121330317A
A textile color difference identification method for optimizing a process
CN121330317B