Slub yarn fabric process detection method and system based on computer vision

By acquiring multiple local grayscale images and using the ConvNeXt model for feature extraction and global analysis, the accuracy and adaptability problems in the process parameter detection of bamboo yarn fabrics are solved, and detection of higher accuracy and reliability is achieved.

CN120374596AInactive Publication Date: 2025-07-25TEXHONG DAFENG(YANCHENG)TEXTILE CO LTD

Patent Information

Application Number
CN202510572993.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-07-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems of insufficient accuracy, poor adaptability, susceptibility to light and fabric type changes in the detection of bamboo yarn fabric process parameters, and it is difficult to deal with complex scenarios.

Method used

Multiple local grayscale images were acquired through digital image acquisition equipment, and bamboo yarn fabric images were generated using image feature extraction and global analysis based on the ConvNeXt model. The bamboo yarn fabric images were generated by combining image processing software to mark and locate bamboo nodes, and the position coordinates of adjacent bamboo nodes were recorded, and the bamboo node parameter calculation method was used for detection.

Benefits of technology

It improves the accuracy and reliability of bamboo joint parameter detection, can adapt to different fabric types and complex environmental conditions, reduce artifacts and distortions, and improves the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120374596A_ABST
    Figure CN120374596A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intelligent detection, and provides a slub yarn fabric process detection method and system based on computer vision, and the method comprises the steps: firstly obtaining a plurality of local grayscale images of a slub woven fabric through a digital image collection device, and then carrying out the feature-based global analysis of the images to generate a complete slub yarn fabric image; the method comprises the following steps of: firstly, acquiring an image of the slub yarn fabric, marking and positioning slubs in the image through image processing software, connecting adjacent slubs, recording position coordinates of a starting point and an ending point of each connected slub, and finally detecting key process parameters of the slub yarn fabric by using a specific slub parameter calculation method according to the coordinate data. Therefore, the method can better adapt to different fabric types and complex environmental conditions in detection, and is beneficial to improving the precision and reliability of bamboo joint parameter detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent detection, and more specifically, to a method and system for detecting the process of slub yarn fabrics based on computer vision. Background Art

[0002] In the modern textile industry, slub yarn fabrics are widely used in many fields such as clothing and home decoration due to their unique appearance and texture. With the continuous improvement of consumers' quality requirements for slub yarn fabrics and the increasing demands of textile enterprises for production efficiency and quality control, accurately detecting the process parameters of slub yarn fabrics has become crucial.

[0003] The existing patent CN108717706A proposes a semi-automatic identification method for slub yarn process parameters based on slub yarn fabrics. It first obtains the grayscale image of the slub fabric and arranges the slubs in a straight line by stepwise rotation, and determines the optimal rotation angle according to the standard deviation of the average value of each column or row. Then, it uses similarity matching technology to splice multiple images to obtain a complete view. Next, it marks and locates the slubs with the help of image processing software and records their coordinate positions. Finally, based on these coordinate data, parameters such as slub length, spacing, and period are calculated to achieve the semi-automatic identification of slub yarn process parameters. This patent obtains a complete slub yarn fabric image by rotating and splicing the image. Although a complete slub yarn fabric image can be effectively obtained by rotating and splicing the image and key parameters can be extracted from it, this method also has some drawbacks and defects. In terms of accuracy, relying on the standard deviation to select the rotation angle and matrix similarity matching for splicing are easily interfered by various factors, resulting in angle deviation and splicing misalignment, and there will also be local information loss. Rotation causes edge information loss, and splicing introduces artifacts or distortion, and it is difficult to guarantee the splicing accuracy of high-density fabrics. On the other hand, this method has poor adaptability, is sensitive to fabric types and shooting angle changes, and is difficult to handle complex scenarios such as wrinkled and deformed fabrics.

[0004] Therefore, a process detection scheme for slub yarn fabrics based on computer vision is expected. Summary of the Invention

[0005] This application aims at the disadvantages in the prior art and provides a method and system for detecting the process of slub yarn fabrics based on computer vision.

[0006] According to one aspect of this application, a method for detecting the process of slub yarn fabrics based on computer vision is provided, which includes:

[0007] Collecting multiple local grayscale images of slub woven fabrics through a digital image acquisition device;

[0008] Perform global analysis based on image features on multiple local grayscale images of the collected slub woven fabric to obtain the slub yarn fabric image, including: extracting fabric state features from each local grayscale image among the multiple local grayscale images to obtain a set of fabric state grayscale features; performing global generation processing based on significant aggregation of the fabric local state modal space on the set of fabric state grayscale features to obtain the slub yarn fabric image;

[0009] Mark and locate the slub yarn fabric image through image processing software, and after connecting adjacent slubs in the slub yarn fabric image, record the position coordinates of the starting point and the ending point of each connected slub;

[0010] Detect the process parameters of the slub yarn fabric based on the position coordinates of the starting point and the ending point of each connected slub and using the slub parameter calculation method.

[0011] According to another aspect of the present application, there is provided a slub yarn fabric process detection system based on computer vision, which includes:

[0012] A local grayscale image acquisition module for acquiring multiple local grayscale images of the slub woven fabric through a digital image acquisition device;

[0013] A local grayscale image analysis module for performing global analysis based on image features on multiple local grayscale images of the collected slub woven fabric to obtain the slub yarn fabric image, wherein the local grayscale image analysis module includes: a grayscale image encoding unit for extracting fabric state features from each local grayscale image among the multiple local grayscale images to obtain a set of fabric state grayscale features; a slub yarn fabric image generation unit for performing global generation processing based on significant aggregation of the fabric local state modal space on the set of fabric state grayscale features to obtain the slub yarn fabric image;

[0014] An image marking and positioning module for marking and positioning the slub yarn fabric image through image processing software, and after connecting adjacent slubs in the slub yarn fabric image, recording the position coordinates of the starting point and the ending point of each connected slub;

[0015] A process parameter detection module for detecting the process parameters of the slub yarn fabric based on the position coordinates of the starting point and the ending point of each connected slub and using the slub parameter calculation method.

[0016] Due to the adoption of the above technical solutions, the present application has significant technical effects:

[0017] The method and system for detecting the process of slub yarn fabric based on computer vision provided by this application first use a digital image acquisition device to obtain multiple local grayscale images of the slub fabric, then perform feature-based global analysis on these images to generate a complete slub yarn fabric image, and then mark and locate the slubs in the image through image processing software, connect adjacent slubs, record the position coordinates of the starting point and ending point of each connected slub, and finally use a specific slub parameter calculation method based on these coordinate data to detect the key process parameters of the slub yarn fabric. In this way, it can better adapt to different fabric types and complex environmental conditions during detection, which helps to improve the accuracy and reliability of slub parameter detection. Brief Description of the Drawings

[0018] By describing the embodiments of this application in more detail in conjunction with the drawings, the above and other purposes, features, and advantages of this application will become more obvious. The drawings are used to provide a further understanding of the embodiments of this application, and constitute a part of the specification, and are used to explain this application together with the embodiments of this application, and do not constitute a limitation to this application. In the drawings, the same reference numerals generally represent the same components or steps.

[0019] Figure 1 It is a flowchart of the method for detecting the process of slub yarn fabric based on computer vision according to the embodiments of this application.

[0020] Figure 2 It is a flowchart of step S2 in the method for detecting the process of slub yarn fabric based on computer vision according to the embodiments of this application.

[0021] Figure 3 It is a flowchart of step S22 in the method for detecting the process of slub yarn fabric based on computer vision according to the embodiments of this application.

[0022] Figure 4 It is a flowchart of step S221 in the method for detecting the process of slub yarn fabric based on computer vision according to the embodiments of this application.

[0023] Figure 5 It is a system block diagram of the system for detecting the process of slub yarn fabric based on computer vision according to the embodiments of this application. Detailed Description of the Embodiments

[0024] Next, exemplary embodiments according to this application will be described in detail with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments of this application. It should be understood that this application is not limited by the exemplary embodiments described here.

[0025] In the modern textile industry, slub yarn fabrics are widely used in various fields such as clothing and home decoration due to their unique appearance and texture. With the improvement of consumers' requirements for the quality of slub yarn fabrics and the increasing demand of textile enterprises for production efficiency and quality control, accurately detecting the process parameters of slub yarn fabrics has become crucial.

[0026] The existing patent CN108717706A proposes a semi-automatic recognition method for the slub yarn process parameters based on slub yarn fabrics. This method first obtains the grayscale image of the slub fabric, and arranges the slubs in a straight line by stepwise rotation. The optimal rotation angle is determined according to the standard deviation of the average value of each column or row. Subsequently, a similarity matching technique is used to splice multiple images to obtain a complete view, and an image processing software is used to mark and locate the slubs, and record their coordinate positions. Based on these coordinate data, key parameters such as slub length, spacing, and period are calculated, so as to realize the semi-automatic recognition of the slub yarn process parameters.

[0027] However, although this method can effectively generate a complete image of the slub yarn fabric and extract key parameters, there are still some limitations. In terms of accuracy, relying on the standard deviation to select the rotation angle and matrix similarity matching for image splicing is easily interfered by various factors, resulting in problems such as angle deviation and splicing misalignment. At the same time, there may be local information loss, edge information loss, splicing artifacts or distortion, especially in high-density fabrics, it is difficult to guarantee the splicing accuracy. In addition, this method has poor adaptability, is sensitive to fabric types, lighting conditions, and shooting angle changes, and is difficult to handle complex scenarios such as wrinkled and deformed fabrics.

[0028] Based on this, the present application proposes a method for detecting the process of slub yarn fabrics based on computer vision. Figure 1 The flowchart of the method for detecting the process of slub yarn fabrics based on computer vision according to an embodiment of the present application. As Figure 1 shown, the method for detecting the process of slub yarn fabrics based on computer vision according to an embodiment of the present application includes: S1, collecting multiple local grayscale images of the slub woven fabric through a digital image acquisition device; S2, performing global analysis based on image features on the multiple local grayscale images of the collected slub woven fabric to obtain a slub yarn fabric image; S3, marking and positioning the slub yarn fabric image through an image processing software, and connecting adjacent slubs in the slub yarn fabric image, and then recording the position coordinates of the starting point and the ending point of each connected slub; S4, detecting the process parameters of the slub yarn fabric based on the position coordinates of the starting point and the ending point of each connected slub and using a slub parameter calculation method.

[0029] In step S1, multiple local grayscale images of the slub woven fabric are collected by a digital image acquisition device. It should be understood that the local grayscale images of the slub woven fabric contain information in many aspects. On the one hand, it is mainly the geometric shape information of the slubs. Since there are differences in thickness between the slubs and the base yarns, they will be presented with different grayscale values in the grayscale image. The thicker slub parts usually appear as areas with higher grayscale values, while the base yarn parts have relatively lower grayscale values, which enables the shape and contour of the slubs to be clearly shown. Whether the slubs are regular cylindrical or have special twisted forms can be observed from them. On the other hand, it is the texture information. The slub yarn fabric has unique texture characteristics, including the distribution law of the slubs and the interweaving mode of the yarns, etc. These are reflected as specific grayscale distribution patterns in the grayscale image. If the slubs are distributed according to a certain periodic law, then periodic grayscale changes will appear in the image; there will also be corresponding texture manifestations at the interweaving points of the yarns, reflecting the weaving structure of the fabric. On the further hand, it is the position information. Each local grayscale image not only shows the detailed features of the slubs but also implies their relative position relationships in the overall layout of the slub woven fabric. Generally speaking, by microscopically analyzing and reconstructing the multiple local grayscale images of the collected slub woven fabric, a complete image of the slub yarn fabric can be constructed. This can not only make up for the problem of limited information in a single local image but also effectively reduce the artifacts or distortions caused by rotation and splicing, effectively improving the quality of the slub yarn fabric image, and then based on this, more accurate detection of the process parameters of the slub yarn fabric can be achieved.

[0030] In step S2, global analysis based on image features is performed on the multiple local grayscale images of the collected slub woven fabric to obtain the slub yarn fabric image. It should be understood that since multiple local grayscale images of the slub woven fabric are collected, each image only reflects part of the fabric information. Through global analysis based on image features, these scattered local information can be integrated, the associations and overlapping parts between different local images can be identified, and thus complete image information about the entire slub yarn fabric can be constructed. For example, different parts of the slubs may exist in different local images, and by analyzing the image features, these parts can be accurately spliced to restore the complete form of the slubs.

[0031] Based on this, the technical concept of this application is to use computer vision-based image analysis and extraction techniques to extract the fabric state features of multiple local grayscale images, and then intelligently generate the slub yarn fabric image according to the modal significant local state aggregation representation between the grayscale features of each fabric state after feature extraction. This application can not only accurately present the slub morphology and fabric structure, but also focus on the image features related to subsequent parameter recognition and ignore other irrelevant image redundant information when generating the global slub yarn fabric image. At the same time, it can better adapt to different fabric types and complex environmental conditions, thus providing a more effective solution for the detection of slub yarn fabrics. That is, it can handle complex morphologies more flexibly, unlike traditional methods that are difficult to handle due to fabric deformation, thereby improving the ability to generate accurate slub yarn fabric images in complex scenarios.

[0032] Specifically, Figure 2 FIG. is a flowchart of step S2 in the computer vision-based slub yarn fabric process detection method according to an embodiment of the present application. As Figure 2As shown, step S2 includes: S21, extracting fabric state features from each of multiple local grayscale images to obtain a set of fabric state grayscale features; S22, performing global generation processing on the set of fabric state grayscale features based on significant aggregation in the fabric local state modal space to obtain a slub yarn fabric image. In step S21, fabric state features are extracted from each of multiple local grayscale images to obtain a set of fabric state grayscale features. Specifically, in the embodiment of the present application, step S21 includes: passing multiple local grayscale images through a fabric state feature extractor based on the ConvNeXt model to obtain a set of fabric state grayscale feature vectors as the set of fabric state grayscale features. Correspondingly, considering that each of the multiple local grayscale images contains the texture structure of the slub fabric surface in different regions, as well as the shape, size, and distribution of the slubs, etc. Therefore, in order to accurately capture these subtle and key features, such as distinguishing the boundary features between slubs and ordinary yarns, the texture differences inside the slubs, etc., the present application passes multiple local grayscale images through a fabric state feature extractor based on the ConvNeXt model to obtain a set of fabric state grayscale feature vectors. It should be understood that the ConvNeXt model is a deep learning model based on convolutional neural network (CNN), aiming to bridge the performance gap between convolutional neural networks and models based on the Transformer architecture while maintaining the advantages of convolutional neural networks. Specifically, the local grayscale image of the slub woven fabric contains rich but complex information, such as features like the morphology and texture of the slubs and the differences from the surrounding yarns. The ConvNeXt model has a multi-layer convolutional structure and can automatically learn and extract these complex image features. It performs multi-scale analysis on the image through different convolutional layers, capturing various features from fine textures to overall structures. For example, it can accurately identify the slub boundaries, unique internal textures, and features in the transition regions with ordinary yarns, providing key data for subsequent analysis. In this way, after being processed by the ConvNeXt model, the features related to the slubs in the local grayscale image of the slub woven fabric can be accurately extracted, forming an effective set of fabric state grayscale feature vectors. These feature vectors contain information on multiple aspects such as the length, width, spacing, and texture of the slubs, providing a reliable basis for accurately calculating the process parameters of the slub yarn fabric.

[0033] The following is a detailed elaboration of a specific implementation process of "obtaining a set of fabric state gray feature vectors through a fabric state feature extractor based on the ConvNeXt model from multiple local gray images as the set of fabric state gray features": First, perform model loading and initialization. Obtain a pre-trained ConvNeXt model from the public model library. Its training results on large-scale image datasets can provide strong support for the feature extraction of slub yarn fabrics. However, due to the characteristics of local gray images of slub yarn fabrics, it may be necessary to fine-tune the model structure. For example, adjust the input layer to be in a form suitable for single-channel gray images, and at the same time, reasonably adjust the parameters of the intermediate convolutional layers according to the task requirements and computing resources to balance the computational cost and feature extraction effect. Then, use a suitable initialization method to initialize the model weights to ensure that the parameters are within a reasonable range, laying a foundation for the stable training of the model.

[0034] Next, perform preprocessing on the local gray images. Since there are differences in the pixel value ranges of different images, in order to ensure stable model training and accelerate convergence, it is necessary to normalize the pixel values of the images and map them to the interval [0,1] or [-1,1]. The commonly used Min-Max normalization method can achieve this. At the same time, the ConvNeXt model has requirements for the input image size, so algorithms such as bilinear interpolation need to be used to adjust the images to an appropriate size, and attention should be paid to maintaining the aspect ratio to prevent feature distortion. In addition, to enhance data diversity and improve the generalization ability of the model, data augmentation operations such as random rotation and flipping can also be selected, but they should be carefully selected according to the data volume and model complexity to avoid negative impacts caused by over-augmentation. After completing the above preparatory work, enter the feature extraction stage. First, construct the preprocessed images into a data loader, which can input the images into the model in batches according to the specified batch size, improve the computational efficiency, and also support random shuffling and parallel loading of data. Subsequently, input a batch of images into the fabric state feature extractor based on the ConvNeXt model for forward propagation calculation. During this process, the image data sequentially passes through convolutional layers, normalization layers, activation function layers, etc. in the model. The convolutional layer extracts features of different scales through the sliding convolution of the convolutional kernel, the normalization layer stabilizes the data, and the activation function introduces non-linearity. Finally, feature vectors containing rich fabric information are output at specific layers of the model. Collect the feature vectors obtained from each batch of images to form a set of fabric state gray feature vectors.

[0035] Finally, post-process its features according to the actual situation. If the dimension of the feature vector is high and there is redundant information, dimensionality reduction algorithms such as principal component analysis (PCA) can be used to reduce the dimension while retaining the main features, improving the computational efficiency and model performance. In addition, to avoid the influence of feature scale differences on the results of subsequent operations, the feature vector can also be normalized. Commonly used L1 or L2 normalization methods are used to make different feature vectors have the same scale and ensure the accuracy of subsequent analysis. Through the implementation of these steps, multiple local grayscale images can be transformed into a set of fabric state grayscale feature vectors. In step S22, global generation processing based on significant aggregation of the fabric local state modal space is performed on the set of fabric state grayscale features to obtain a slub yarn fabric image. Specifically, Figure 3 FIG. Figure 3 is a flowchart of step S22 in the slub yarn fabric process detection method based on computer vision according to an embodiment of the present application. As Figure 3 shown, step S22 includes: S221, performing fabric local state aggregation of modal significant analysis on the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature significance aggregation coding vector; S222, obtaining a slub yarn fabric image based on the fabric state grayscale feature significance aggregation coding vector.

[0036] In step S221, fabric local state aggregation of modal significant analysis is performed on the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature significance aggregation coding vector. Specifically, Figure 4 FIG. Figure 4 is a flowchart of step S221 in the slub yarn fabric process detection method based on computer vision according to an embodiment of the present application. As Figure 4 shown, step S221 includes: S2211, performing fabric state grayscale information feature kernel coarse-grained aggregation on the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature coarse-grained aggregation coding vector; S2212, calculating the kernel aggregation compensation weight factor of each fabric state grayscale feature vector in the set of fabric state grayscale feature vectors based on the fabric state grayscale feature coarse-grained aggregation coding vector to obtain a set of fabric state grayscale feature kernel aggregation compensation weight factors; S2213, performing fabric state grayscale feature node fine-grained dynamic compensation aggregation on the set of fabric state grayscale feature kernel aggregation compensation weight factors, the fabric state grayscale feature coarse-grained aggregation coding vector, and the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature fine-grained compensation aggregation coding vector; S2214, performing residual fusion on the fabric state grayscale feature coarse-grained aggregation coding vector and the fabric state grayscale feature fine-grained compensation aggregation coding vector to obtain a fabric state grayscale feature significance aggregation coding vector.

[0037] It should be understood that the set of fabric state grayscale feature vectors obtained by the ConvNeXt model contains rich information, but there may be redundant features among them. Different feature vectors have different degrees of importance in reflecting the state of slub fabrics. Some features may have less value for subsequent analysis. Moreover, the local states of slub fabrics vary at different positions and scales, and a single feature vector is difficult to comprehensively reflect the overall state of the fabric. Therefore, in order to comprehensively consider the feature information of different local regions, obtain the state information of the fabric from multiple perspectives, more comprehensively grasp the characteristics of the fabric, and at the same time screen out the features that are truly crucial for fabric state representation and remove redundant information, this application performs modal saliency analysis on the set of fabric state grayscale feature vectors for fabric local state aggregation to obtain a fabric state grayscale feature saliency aggregation coding vector. In particular, through the modal saliency analysis of fabric local state aggregation, it is possible to go from a rough sketch to a meticulous carving. In this way, not only can the statistical laws of the fabric's global features be accurately grasped, but also the personalized features of each local node can be highlighted, realizing multi-level and multi-scale complex feature integration, making the subsequent detection of fabric process parameters more accurate.

[0038] Specifically, first, fabric state grayscale information feature kernel coarse-grained aggregation is performed on the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature coarse-grained aggregation coding vector. The above process can be expressed by the formula:

[0039]

[0040] where X is the set of fabric state grayscale feature vectors, x1, x2, x i and x n are the 1st, 2nd, i-th, and n-th fabric state grayscale feature vectors in the set of fabric state grayscale feature vectors respectively, max(x i ) and min(x i ) are the maximum and minimum values of taking x i respectively, e i is the i-th fabric state grayscale feature aggregation value in the set of fabric state grayscale feature aggregation values, softmax is the normalization function, a i is the i-th normalized fabric state grayscale feature aggregation value in the set of fabric state grayscale feature aggregation values, n is the number of vectors in X, and v coarse is the fabric state grayscale feature coarse-grained aggregation coding vector.

[0041] It should be understood that the set of fabric state gray - level feature vectors contains a large amount of local information about the fabric state. It is difficult to directly process this information and there is a lack of a macroscopic grasp of the overall slub fabric state. To simplify the subsequent processing flow and have a preliminary and general understanding of the overall slub fabric state, key features need to be extracted from a global perspective. Specifically, by performing a coarse - grained aggregation process on the set of fabric state gray - level feature vectors using a fabric state gray - level information feature kernel, a compressive modeling of the set of original feature vectors can be carried out, and the complex similarity structure among various fabric state gray - level features can be accurately captured in an implicit high - dimensional space. That is, the generated coarse - grained aggregation encoded vector of the fabric state gray - level features realizes the backbone characterization of the global features of the fabric state, summarizes the overall characteristics of the combination of the original feature vectors, and can provide a general framework for subsequent analysis of the slub fabric state.

[0042] Specifically, in the embodiment of the present application, step S2212 includes: calculating the fabric state gray - level feature kernel aggregation compensation factor of each fabric state gray - level feature vector in the set of fabric state gray - level feature vectors relative to the fabric state gray - level feature coarse - grained aggregation encoded vector to obtain a set of fabric state gray - level feature kernel aggregation compensation factors; performing explicit compensation based on a gating function on the set of fabric state gray - level feature kernel aggregation compensation factors to obtain a set of fabric state gray - level feature kernel aggregation compensation weight factors.

[0043] More specifically, in the embodiment of the present application, calculating the fabric state gray - level feature kernel aggregation compensation factor of each fabric state gray - level feature vector in the set of fabric state gray - level feature vectors relative to the fabric state gray - level feature coarse - grained aggregation encoded vector to obtain a set of fabric state gray - level feature kernel aggregation compensation factors includes: using a feature enhancement module based on point convolution and sigmoid function to enhance the features of the fabric state gray - level feature vector and the fabric state gray - level feature coarse - grained aggregation encoded vector respectively to obtain an enhanced fabric state gray - level feature vector and an enhanced fabric state gray - level feature coarse - grained aggregation encoded vector; calculating the difference feature between the enhanced fabric state gray - level feature vector and the enhanced fabric state gray - level feature coarse - grained aggregation encoded vector to obtain a fabric state gray - level feature difference encoded vector; performing a linear transformation process on the fabric state gray - level feature difference encoded vector based on the fabric state gray - level feature weight matrix, the fabric state gray - level feature bias term, and the fabric state gray - level feature scoring weight vector to obtain the fabric state gray - level feature kernel aggregation compensation factor corresponding to the fabric state gray - level feature vector. The above entire process can be expressed by the formula:

[0044]

[0045] where, x i is the i - th fabric state gray - level feature vector in the set of fabric state gray - level feature vectors, v coarseis the coarse-grained aggregation coding vector of the fabric state gray-scale feature, conv 1×1 is the point convolution coding, Sigmoid is the activation function, W 11 and W 21 are the weight matrices corresponding to x i and v coarse respectively, x i ′ is the enhanced fabric state gray-scale feature vector corresponding to x i , v coarse ′ is the enhanced fabric state gray-scale feature coarse-grained aggregation coding vector, is the pointwise subtraction by position, |·| is the absolute value operation, d i is the fabric state gray-scale feature difference coding vector between x i ′ and v coarse ′, W i is the fabric state gray-scale feature weight matrix corresponding to d i , b i is the fabric state gray-scale feature bias term corresponding to d i , is the fabric state gray-scale feature scoring weight vector corresponding to d i , m i is the i-th fabric state gray-scale feature kernel aggregation compensation factor in the set of fabric state gray-scale feature kernel aggregation compensation factors.

[0046] It should be understood that although the coarse-grained aggregation of the fabric state gray-scale information feature kernel effectively integrates the global features of the fabric state. However, in this process, some personalized information that is crucial for describing the local characteristics of the fabric may be lost. These personalized information are key to accurately grasping the differences in different local regions of the fabric. In order to retrieve this lost or diluted information, the calculation of the fabric state gray-scale feature kernel aggregation compensation factor is introduced. Specifically, the set of fabric state gray-scale feature kernel aggregation compensation factors is dynamically generated by measuring the deviation between each fabric state gray-scale feature vector and the coarse-grained aggregation coding vector of the fabric state gray-scale feature. These compensation factors are "correction tools" tailored for each fabric state gray-scale feature vector, describing the correction rules of each fabric local state feature to the fabric global state feature. As a local protection mechanism, it retains the personalized information of the fabric local state and can provide an important supplement for subsequent fine-grained compensation modeling.

[0047] More specifically, in the embodiments of the present application, in response to the two-norm of the enhanced fabric state grayscale feature vector being less than the two-norm of the enhanced fabric state grayscale feature coarse-grained aggregation coding vector, after adding one to the ratio between the two-norm of the enhanced fabric state grayscale feature vector and the two-norm of the enhanced fabric state grayscale feature coarse-grained aggregation coding vector, the logarithmic function value obtained by taking the logarithm with base 2 is used as the fabric state grayscale feature bias term; in response to the two-norm of the enhanced fabric state grayscale feature vector being greater than or equal to the two-norm of the enhanced fabric state grayscale feature coarse-grained aggregation coding vector, the ratio obtained by dividing the two-norm of the enhanced fabric state grayscale feature vector by the two-norm of the enhanced fabric state grayscale feature coarse-grained aggregation coding vector is used as the fabric state grayscale feature bias term. The above process can be expressed by the formula:

[0048]

[0049] where x i ′ is the corresponding enhanced fabric state grayscale feature vector of x i ; v coarse ′ is the enhanced fabric state grayscale feature coarse-grained aggregation coding vector, ‖·‖2 is the two-norm for calculating the vector, log2 is the logarithmic function value with base 2, and b i is the fabric state grayscale feature bias term corresponding to d i .

[0050] Here, for the deviation compensation between the fabric state grayscale feature vector and the fabric state grayscale feature coarse-grained aggregation coding vector, the performance deviation of the kernel aggregation strategy as a scenario strategy can be measured by quantifying the regret metric based on the information kernel compression hypothesis in the kernel aggregation decision-making process, that is, the game-theoretic counterfactual regret value. Specifically, the normalized decision point loss description based on the vector norm representation of the counterfactual regret value is provided through the vector norm representation, that is, the vector norm representations of the fabric state grayscale feature vector and the fabric state grayscale feature coarse-grained aggregation coding vector. Then, for the possible differences in vector distribution action game scenarios, the compensation rule correction of the personalized information of the fabric local state is carried out respectively in terms of the information distribution degree of the regret value and the relative distribution amplitude of the regret value, so as to consider the personalized information of the fabric local state as the un-taken action in the decision-making, and perform bias compensation in the way of assuming its potential benefits based on the information kernel aggregation hypothesis.

[0051] Immediately afterwards, an explicit compensation based on a gating function is performed on the set of fabric state grayscale feature kernel aggregation compensation factors to obtain the set of fabric state grayscale feature kernel aggregation compensation weight factors. The above process can be expressed by the formula:

[0052]

[0053] where m iis the i-th fabric state grayscale feature kernel convergence compensation factor in the set of fabric state grayscale feature kernel convergence compensation factors, Gate(m i ) performs gating compensation on m i , ω is a preset threshold, and τ i is the i-th fabric state grayscale feature kernel convergence compensation weight factor in the set of fabric state grayscale feature kernel convergence compensation weight factors.

[0054] It should be understood that in order to ensure that only significant local features of the fabric state are highlighted while suppressing irrelevant or redundant information, it is necessary to screen and regulate the action intensity of the fabric state grayscale feature kernel convergence compensation factors. Here, by using a gating function to perform explicit compensation on the set of fabric state grayscale feature kernel convergence compensation factors, information can be dynamically selected based on non-linear constraints, thereby helping the model to more accurately capture the interaction relationship between the global and local information of the fabric state, so as to ensure that the model can capture key features when analyzing fabric state information.

[0055] Then, the set of fabric state grayscale feature kernel convergence compensation weight factors, the fabric state grayscale feature coarse-grained convergence coding vector, and the set of fabric state grayscale feature vectors are subjected to fabric state grayscale feature node fine-grained dynamic compensation convergence to obtain the fabric state grayscale feature fine-grained compensation convergence coding vector. The above process can be expressed by the formula:

[0056]

[0057] where x i is the i-th fabric state grayscale feature vector in the set of fabric state grayscale feature vectors, v coarse is the fabric state grayscale feature coarse-grained convergence coding vector, τ i is the i-th fabric state grayscale feature kernel convergence compensation weight factor in the set of fabric state grayscale feature kernel convergence compensation weight factors, and v com is the fabric state grayscale feature fine-grained compensation convergence coding vector.

[0058] It should be understood that the global features (coarse-grained aggregation coding vectors of fabric state gray-scale features) and local compensation information (set of kernel aggregation compensation weight factors of fabric state gray-scale features) are respectively obtained in the previous analysis. However, these information still need to be integrated in a way that can adapt to the dynamic changes of global features, so as to more accurately describe the local details of each fabric part state, make the feature representation more accurate and comprehensive, and meet the requirements of refined analysis of fabric state. Based on this, in this application, the set of kernel aggregation compensation weight factors of fabric state gray-scale features, the coarse-grained aggregation coding vectors of fabric state gray-scale features, and the set of fabric state gray-scale feature vectors are subjected to fine-grained dynamic compensation aggregation processing of fabric state gray-scale feature nodes to introduce high fidelity, so that the compensated fabric state gray-scale features can more accurately describe the local details of fabric parts, while adapting to the dynamic changes of global feature constraints of fabric state, and further making the model's understanding of fabric state deeper and more detailed.

[0059] Finally, the coarse-grained aggregation coding vectors of fabric state gray-scale features and the fine-grained compensation aggregation coding vectors of fabric state gray-scale features are subjected to residual fusion to obtain the significant aggregation coding vectors of fabric state gray-scale features. The above process can be expressed by the formula:

[0060] v fine =α·v coarse +β·v com

[0061] where, v com is the fine-grained compensation aggregation coding vector of fabric state gray-scale features, α and β are weighted hyperparameters, and v fine is the significant aggregation coding vector of fabric state gray-scale features.

[0062] It should be understood that the coarse-grained aggregation coding vectors of fabric state gray-scale features provide a global view of fabric state, and the fine-grained compensation aggregation coding vectors of fabric state gray-scale features contain rich local significant details. In order to make full use of the advantages of these two vectors and avoid problems such as information loss or gradient disappearance during the fusion process, in this application, it is necessary to perform residual fusion processing on the coarse-grained aggregation coding vectors of fabric state gray-scale features and the fine-grained compensation aggregation coding vectors of fabric state gray-scale features. The significant aggregation coding vectors of fabric state gray-scale features obtained by residual fusion inherit both the global view of coarse-grained features and retain local significant details, which can effectively improve the accuracy and reliability of fabric state feature representation.

[0063] In step S222, based on the fabric state gray - scale feature saliency aggregation coding vector, a slub yarn fabric image is obtained. Specifically, in the embodiment of the present application, step S222 includes: passing the fabric state gray - scale feature saliency aggregation coding vector through an AIGC - based global image generator for slub yarn fabrics to obtain a slub yarn fabric image. That is, generation processing is performed on the fabric state gray - scale feature saliency aggregation coding vector obtained by performing significant coding on a set of fabric state gray - scale feature vectors, so as to intelligently generate a slub yarn fabric image. It should be understood that the slub yarn fabric image has a unique texture and structure, and its generation needs to consider various factors. Through learning a large amount of slub yarn fabric image data, the AIGC technology can master the characteristic rules and generation patterns of slub yarn fabrics. Compared with traditional image generation methods, it can better handle complex problems in the generation of slub yarn fabric images, such as the generation of the morphology of different slub types and the natural presentation of fabric textures, ensuring that the generated image is more in line with the actual characteristics of slub yarn fabrics. In this way, by analyzing the generated image, parameters such as slub length and spacing can be measured more accurately to improve product quality.

[0064] The following is a detailed elaboration of a specific implementation process of "passing the fabric state gray - scale feature saliency aggregation coding vector through an AIGC - based global image generator for slub yarn fabrics to obtain a slub yarn fabric image":

[0065] First, to achieve precise image generation, an image generation model based on AIGC needs to be constructed and trained. In the selection of the model architecture, generative adversarial networks (GANs), variational autoencoders (VAEs), diffusion models, etc. all have their own advantages and disadvantages. Among them, the diffusion model shows unique advantages in the generation of slub yarn fabric images due to its excellent generation effect. To enable the model to learn rich and diverse slub yarn fabric features, it is essential to collect a large amount of high-quality slub yarn fabric image data. These images should comprehensively cover slub yarn fabrics of different types, colors, textures, and processes. Only in this way can the model learn a wide enough range of feature information. After collection, the images are preprocessed, including operations such as cropping and normalization. The images are uniformly adjusted to a suitable size, for example, all images are cropped to 256×256 pixels in size, and at the same time, the pixel values are normalized to the range [-1, 1] to meet the training requirements of the model. After preparing the data, it enters the model training stage. During the training process, the model continuously learns the feature distribution and generation rules of slub yarn fabric images. Taking the diffusion model as an example, in the forward process, Gaussian noise is gradually added to the real image according to a certain rule, and in the reverse process, the neural network is used to predict and remove the noise, making the generated image gradually approach the real image. In this process, loss functions such as mean squared error (MSE) are used to measure the difference between the generated image and the real image. Through optimizers, such as the commonly used Adam optimizer, the model parameters are continuously adjusted to minimize the value of the loss function, thereby achieving the optimization of the model.

[0066] When the model training is completed, it enters the stage of generating images using the trained model. The fabric state gray feature saliency aggregation coding vector calculated previously is input into the trained slub yarn fabric global image generator based on AIGC. Before input, necessary format adjustments or dimensionality transformations need to be performed on the coding vector according to the input requirements of the model to ensure that it can be accurately input into the model. After receiving the coding vector, the model starts to generate images based on the slub yarn fabric image features and generation rules learned during the training process. Taking the diffusion model as an example, it usually starts from a random noise vector and gradually denoises the noise in multiple time steps. In this process, the key feature information of the slub yarn fabric carried by the coding vector plays a guiding role, and the model predicts the denoised image based on the current noise state and the coding vector. Through continuous iteration, the details and features of the image are gradually adjusted, and finally, an image close to the real slub yarn fabric is generated.

[0067] After generating the image, post - processing and optimization are required to ensure that the image quality meets the requirements of slub yarn fabric process inspection. First is the quality assessment step. Multiple evaluation metrics such as Peak Signal - to - Noise Ratio (PSNR) and Structural Similarity Index (SSIM) are used to quantitatively evaluate the similarity between the generated image and the real slub yarn fabric image. PSNR mainly measures the pixel error between the generated image and the real image, and a higher value represents better image quality; while SSIM, from the perspective of structural similarity, pays more attention to the structural information of the image. Through these metrics, it is possible to comprehensively judge whether the generated image meets the requirements. If the quality of the generated image does not reach the expected standard, the generation process needs to be optimized and adjusted. For example, one can try to adjust the hyperparameters of the model, such as the noise scheduling parameter in the diffusion model, to change the speed and intensity of the denoising process, thereby affecting the effect of the generated image; or increase the diversity of the training data and retrain the model so that the model learns more comprehensive slub yarn fabric features. In addition, other image - processing techniques, such as filtering and enhancement methods, can be combined to post - process the generated image to further improve the clarity and quality of the image. After quality assessment and optimization adjustment, the generated image that meets the requirements is output as the final slub yarn fabric image.

[0068] In summary, step S2 is clearly described. It uses computer - vision - based image analysis and extraction techniques to extract the fabric state features of multiple local grayscale images, and then intelligently generates a slub yarn fabric image based on the modal - significant local state aggregation representation between the gray - scale features of each fabric state after feature extraction. In this way, not only can the slub shape and fabric structure be accurately presented, but when generating the global slub yarn fabric image, it can also focus on the image features related to subsequent parameter recognition and ignore other irrelevant image redundancy information. At the same time, it can better adapt to different fabric types and complex environmental conditions, thus providing a more effective solution for the inspection of slub yarn fabrics.

[0069] In step S3, the slub yarn fabric image is marked and located through image - processing software. After connecting adjacent slubs in the slub yarn fabric image, the position coordinates of the starting point and the ending point of each connected slub are recorded. It should be understood that by connecting adjacent slubs, it can be ensured that no slub segment or base - yarn segment is missed during the calculation process. This method helps to accurately identify the specific position and length of each slub, thereby improving the accuracy of the overall measurement. The connected slubs can help the software automatically record the coordinates of the starting point and the ending point of each slub, thus simplifying the subsequent calculation steps.

[0070] The following is a detailed description of a specific implementation process of "marking and positioning the slub yarn fabric image through image processing software, connecting adjacent slubs in the slub yarn fabric image, and recording the position coordinates of the starting and ending points of each connected slub":

[0071] First, perform image segmentation on the slub yarn fabric image. Image segmentation is an important step in separating the slubs from the base yarn area. Due to the characteristics of the slub yarn fabric, there are differences in its gray-scale distribution. Utilizing this feature, an appropriate threshold segmentation method can be used to initially divide the slubs and the base yarn. For example, based on the gray-scale statistical data of a large number of slub yarn fabric images, an empirical threshold is set. By comparing the gray-scale value of each pixel in the image with this threshold, pixels with gray-scale values higher than the threshold are classified into the slub area, and those lower than the threshold are classified into the base yarn area. However, the actual slub yarn fabric images are complex, and a single fixed threshold is difficult to handle various changes, such as uneven illumination or gray-scale changes caused by the characteristics of the fabric itself. At this time, the adaptive threshold segmentation algorithm comes into play. It can dynamically adjust the threshold according to the gray-scale characteristics of local regions of the image, using different thresholds for segmentation at different positions in the image, thereby more accurately distinguishing the slubs and the base yarn. In addition to the threshold-based method, the segmentation algorithm based on clustering can also effectively achieve image segmentation. Taking the K-means clustering algorithm as an example, it will cluster the pixels in the image according to their gray-scale values or other features. Through multiple iterations, the pixels are automatically divided into different categories, and then the slub and base yarn areas are identified. This method can better adapt to the complex distribution of image data.

[0072] After image segmentation, the initially separated bamboo joint regions are obtained. However, there may be some noise and irregular regions, which need to be further processed to accurately identify and label the bamboo joints. Morphological operations play a crucial role in this process. Through dilation and erosion operations, the shape of the bamboo joint regions can be optimized. The dilation operation expands the bamboo joint regions outward, filling the possible internal holes to ensure the continuity of the bamboo joints; the erosion operation, on the contrary, can remove some isolated noise points and small interfering regions with small areas, making the contours of the bamboo joints clearer and more regular. After completing the morphological operations, a contour detection algorithm is used to extract the contours of the bamboo joints. Common boundary-tracking-based algorithms can track along the boundaries of the bamboo joint regions to accurately obtain their contour information. Among the numerous detected contours, the contours that truly belong to the bamboo joints need to be screened out. This is achieved by setting a series of thresholds for shape features. For example, bamboo joints usually have a certain area range. Contours with too small an area are likely to be noise or other small objects and can be excluded by setting a minimum area threshold; at the same time, the aspect ratio of the bamboo joints also has certain characteristics, and contours that do not conform to this characteristic range will also be discarded. After determining the bamboo joint contours, for the convenience of subsequent analysis and processing, each bamboo joint is marked on the original image with a specific color or symbol to make the bamboo joints more prominent and distinguishable in the image.

[0073] After marking the bamboo joints, it enters the step of connecting adjacent bamboo joints. First, based on the position information of the bamboo joints in the image, the possible pairs of adjacent bamboo joints are initially determined. By calculating the distance between the bamboo joints for screening, a reasonable distance threshold is set. If the distance between two bamboo joints is less than this threshold, then they may be adjacent. However, distance is only a preliminary judgment basis, and further matching based on the contour direction and shape of the bamboo joints is required. Because in the natural state, the contour directions of adjacent bamboo joints tend to be similar, and their shapes can be naturally connected. For example, if the end shape of one bamboo joint can be well spliced with the start shape of another bamboo joint, and the difference in their contour directions is within a certain range, then it can be determined that these two bamboo joints are adjacent. After determining the adjacent bamboo joints, the shortest path between them is connected with a straight line. During the connection process, to ensure the accuracy of the connection and avoid incorrect connections, multiple verifications are required. The connection path can be optimized and adjusted by checking the pixel characteristics on the connection path to see if they conform to the characteristics of the bamboo joints or the base yarn, ensuring the reliability of the connection.

[0074] After the connection is completed, record the position coordinates of the starting point and the ending point of each connected bamboo joint. In the image coordinate system, with the upper left corner of the image as the origin, the horizontal direction as the x-axis, and the vertical direction as the y-axis. For each connected bamboo joint, obtain the coordinate values of its starting point and ending point in the image coordinate system. Use the coordinate acquisition tools or functions provided by the image processing software to accurately read the coordinate values and store these coordinate data in a suitable data structure, such as a database. When storing, in order to facilitate subsequent data analysis and processing, add a unique identifier to the coordinate data of each bamboo joint and record relevant metadata, such as the image number where the bamboo joint is located, etc.

[0075] In step S4, based on the position coordinates of the starting point and the ending point of each connected slub and using the slub parameter calculation method, the process parameters of the slub yarn fabric are detected. It should be understood that by accurately identifying and analyzing the slub characteristics in the slub yarn fabric, key process parameters such as slub length, slub spacing, and slub period can be calculated, which helps to ensure the quality consistency of the slub yarn fabric and also helps to improve the production efficiency and product quality control of the slub yarn fabric. Specifically, the detection method of the slub length is as follows: It should be noted that the starting point of the slub length is defined as the place where the base yarn begins to thicken, and the ending point is the place where the slub turns into the base yarn. After marking the connected slubs, the image processing software records the coordinates of the starting point and the ending point of each slub. Taking the weft slub yarn fabric as an example, if the coordinate of the starting point A of the slub AB is (x1, y1) and the coordinate of the ending point B is (x1, y2), since the length direction of the weft slub is related to the vertical coordinate direction, by calculating the difference between the recorded vertical coordinate values (i.e., LAB = y2 - y1), the length of this slub can be obtained. For the warp slub yarn fabric, the slub length is also determined based on the coordinate difference between the starting point and the ending point in the warp direction (a certain direction in the corresponding coordinates). The detection method of the slub spacing (referring to the length of the base yarn between two adjacent slubs) is as follows: When detecting, the ratio relationship between the ordinary yarn and the slub yarn needs to be considered. For the weft slub yarn fabric, due to different weft insertion methods, the calculation methods are also different. If it is shuttle weft insertion and the weft yarn is introduced from the left side, assuming that the slub CD adjacent to the slub AB, A(x1, y1), B(x1, y2), C(x2, y3), D(x2, y4), then the slub spacing can be estimated by "2 × width - y4 - y2"; if the weft yarn is introduced from the right side, the slub spacing is "y1 + y3". When it is rapier weft insertion (usually the weft yarn is introduced from the left side), ignoring the influence of the selvedge and waste edge, the slub spacing is estimated by "width - y4 + y1". For the warp slub yarn fabric, detecting the slub spacing is relatively simple. Just subtract the starting point coordinate of an adjacent slub on the same warp yarn from the ending point coordinate of the previous slub, and the slub spacing can be obtained. The detection method of the slub period is as follows: First, classify the slubs according to the slub length and slub spacing calculated previously. For example, classification can be carried out according to the size range, change rule, etc. of the slub length and spacing. After classification, for each type of slub, calculate its period length respectively. Analyze the repetition rule between adjacent slubs for the slubs belonging to the same type according to their appearance order on the fabric, and determine the period length of this type of slub by calculating the distance or time interval between adjacent slubs (in a continuous production scenario, if the production speed is known, the distance can be converted into time). After calculating and statistically analyzing the period lengths of all types of slubs, the slub period characteristics of the slub yarn fabric can be comprehensively understood.

[0076] In summary, a method for detecting the process of slub yarn fabric based on computer vision according to an embodiment of the present application is elucidated. First, a plurality of local grayscale images of the slub fabric are acquired using a digital image acquisition device. Then, global analysis based on features is performed on these images to generate a complete slub yarn fabric image. Next, the slub in the image is marked and located through image processing software, and adjacent slubs are connected. The position coordinates of the starting point and the ending point of each connected slub are recorded. Finally, based on these coordinate data, a specific slub parameter calculation method is used to detect the key process parameters of the slub yarn fabric. In this way, it can better adapt to different fabric types and complex environmental conditions during the detection, which helps to improve the accuracy and reliability of slub parameter detection.

[0077] Figure 5 FIG. is a system block diagram of a slub yarn fabric process detection system based on computer vision according to an embodiment of the present application. As Figure 5 shown, a slub yarn fabric process detection system 100 based on computer vision according to an embodiment of the present application includes: a local grayscale image acquisition module 110, configured to acquire a plurality of local grayscale images of the slub fabric through a digital image acquisition device; a local grayscale image analysis module 120, configured to perform global analysis based on image features on the plurality of local grayscale images of the acquired slub fabric to obtain a slub yarn fabric image; an image marking and positioning module 130, configured to mark and position the slub yarn fabric image through image processing software, connect adjacent slubs in the slub yarn fabric image, and record the position coordinates of the starting point and the ending point of each connected slub; and a process parameter detection module 140, configured to detect the process parameters of the slub yarn fabric based on the position coordinates of the starting point and the ending point of each connected slub and using a slub parameter calculation method.

[0078] Here, those skilled in the art can understand that the specific functions and operations of each unit and module in the above-mentioned slub yarn fabric process detection system 100 based on computer vision have been described above with reference to Figures 1 to 4The description of the computer vision-based process detection method for slub yarn fabrics has been introduced in detail, and therefore, its repeated description will be omitted. In summary, the computer vision-based process detection system 100 according to the embodiments of the present application is elucidated. It first uses a digital image acquisition device to obtain multiple local grayscale images of the slub woven fabric, then performs feature-based global analysis on these images to generate a complete slub yarn fabric image, then marks and locates the slubs in the image through image processing software, connects adjacent slubs, records the position coordinates of the starting point and the ending point of each connected slub, and finally, according to these coordinate data, uses a specific slub parameter calculation method to detect the key process parameters of the slub yarn fabric. In this way, it can better adapt to different fabric types and complex environmental conditions during detection, which helps to improve the accuracy and reliability of slub parameter detection.

Claims

1. A method for detecting the process of slub yarn fabric based on computer vision, characterized in that, Including: Collecting multiple local grayscale images of slub woven fabrics through a digital image acquisition device; Performing global analysis based on image features on the multiple local grayscale images of the slub woven fabrics collected to obtain a slub yarn fabric image, including: extracting fabric state features from each local grayscale image among the multiple local grayscale images to obtain a set of fabric state grayscale features; performing global generation processing based on significant aggregation of the fabric local state modal space on the set of fabric state grayscale features to obtain the slub yarn fabric image; Marking and positioning the slub yarn fabric image through image processing software, and after connecting adjacent slubs in the slub yarn fabric image, recording the position coordinates of the starting point and the ending point of each connected slub; Detecting the process parameters of the slub yarn fabric based on the position coordinates of the starting point and the ending point of each connected slub and using a slub parameter calculation method.

2. The method for detecting the slub yarn fabric process based on computer vision according to claim 1, wherein Extracting fabric state features from each local grayscale image among the multiple local grayscale images to obtain a set of fabric state grayscale features, including: passing the multiple local grayscale images through a fabric state feature extractor based on the ConvNeXt model to obtain a set of fabric state grayscale feature vectors as the set of fabric state grayscale features.

3. The method for detecting the slub yarn fabric process based on computer vision according to claim 1, wherein, Performing global generation processing based on significant aggregation of the fabric local state modal space on the set of fabric state grayscale features to obtain the slub yarn fabric image, including: Performing fabric local state aggregation with modal significant analysis on the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature significant aggregation coding vector; Based on the fabric state grayscale feature significant aggregation coding vector, obtaining the slub yarn fabric image.

4. The method for detecting the slub yarn fabric process based on computer vision according to claim 3, wherein, Performing fabric local state aggregation with modal significant analysis on the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature significant aggregation coding vector, including: Performing fabric state grayscale information feature kernel coarse-grained aggregation on the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature coarse-grained aggregation coding vector; Based on the fabric state grayscale feature coarse-grained aggregation coding vector, calculating the kernel aggregation compensation weight factor of each fabric state grayscale feature vector in the set of fabric state grayscale feature vectors to obtain a set of fabric state grayscale feature kernel aggregation compensation weight factors; Performing fabric state grayscale feature node fine-grained dynamic compensation aggregation on the set of fabric state grayscale feature kernel aggregation compensation weight factors, the fabric state grayscale feature coarse-grained aggregation coding vector, and the set of fabric state grayscale feature vectors to obtain a fabric state grayscale feature fine-grained compensation aggregation coding vector; Performing residual fusion on the fabric state grayscale feature coarse-grained aggregation coding vector and the fabric state grayscale feature fine-grained compensation aggregation coding vector to obtain the fabric state grayscale feature significant aggregation coding vector.

5. The method for detecting the slub yarn fabric process based on computer vision according to claim 4, characterized in that, Based on the coarse-grained aggregation coding vector of the fabric state gray-scale features, calculating the kernel aggregation compensation weight factors of each fabric state gray-scale feature vector in the set of fabric state gray-scale feature vectors to obtain a set of fabric state gray-scale feature kernel aggregation compensation weight factors, including: Calculating the fabric state gray-scale feature kernel aggregation compensation factors of each fabric state gray-scale feature vector in the set of fabric state gray-scale feature vectors relative to the coarse-grained aggregation coding vector of the fabric state gray-scale features to obtain a set of fabric state gray-scale feature kernel aggregation compensation factors; Performing explicit compensation based on a gating function on the set of fabric state gray-scale feature kernel aggregation compensation factors to obtain the set of fabric state gray-scale feature kernel aggregation compensation weight factors.

6. The method for detecting the slub yarn fabric process based on computer vision according to claim 5, characterized in that, Calculating the fabric state gray-scale feature kernel aggregation compensation factors of each fabric state gray-scale feature vector in the set of fabric state gray-scale feature vectors relative to the coarse-grained aggregation coding vector of the fabric state gray-scale features to obtain a set of fabric state gray-scale feature kernel aggregation compensation factors, including: Using a feature enhancement module based on point convolution and sigmoid function to perform feature enhancement on the fabric state gray-scale feature vector and the coarse-grained aggregation coding vector of the fabric state gray-scale features respectively to obtain an enhanced fabric state gray-scale feature vector and an enhanced coarse-grained aggregation coding vector of the fabric state gray-scale features; Calculating the difference features between the enhanced fabric state gray-scale feature vector and the enhanced coarse-grained aggregation coding vector of the fabric state gray-scale features to obtain a fabric state gray-scale feature difference coding vector; Performing a linear transformation process on the fabric state gray-scale feature difference coding vector based on the fabric state gray-scale feature weight matrix, the fabric state gray-scale feature bias term, and the fabric state gray-scale feature scoring weight vector to obtain the fabric state gray-scale feature kernel aggregation compensation factor corresponding to the fabric state gray-scale feature vector.

7. The method for detecting the slub yarn fabric process based on computer vision according to claim 6, characterized in that, In response to the two-norm of the enhanced fabric state gray-scale feature vector being less than the two-norm of the enhanced coarse-grained aggregation coding vector of the fabric state gray-scale features, adding one to the ratio between the two-norm of the enhanced fabric state gray-scale feature vector and the two-norm of the enhanced coarse-grained aggregation coding vector of the fabric state gray-scale features, and taking the logarithmic function value with base 2 as the fabric state gray-scale feature bias term; In response to the two-norm of the enhanced fabric state gray-scale feature vector being greater than or equal to the two-norm of the enhanced coarse-grained aggregation coding vector of the fabric state gray-scale features, taking the ratio of the two-norm of the enhanced fabric state gray-scale feature vector divided by the two-norm of the enhanced coarse-grained aggregation coding vector of the fabric state gray-scale features as the fabric state gray-scale feature bias term.

8. The method for detecting the slub yarn fabric process based on computer vision according to claim 7, wherein, Based on the fabric state gray-scale feature saliency aggregation coding vector, obtaining the slub yarn fabric image, including: passing the fabric state gray-scale feature saliency aggregation coding vector through a slub yarn fabric global image generator based on AIGC to obtain the slub yarn fabric image.

9. A computer vision-based process detection system for slub yarn fabrics, characterized in that, Including: A local gray-scale image acquisition module, configured to acquire multiple local gray-scale images of a slub fabric through a digital image acquisition device; Local grayscale image analysis module, which is used to perform global analysis based on image features on multiple local grayscale images of the slub woven fabric collected to obtain the slub yarn fabric image. Among them, the local grayscale image analysis module includes: a grayscale image encoding unit, which is used to extract fabric state features from each local grayscale image in the multiple local grayscale images to obtain a set of fabric state grayscale features; a slub yarn fabric image generation unit, which is used to perform global generation processing based on significant aggregation of the fabric local state modal space on the set of fabric state grayscale features to obtain the slub yarn fabric image; Image marking and positioning module, which is used to mark and position the slub yarn fabric image through image processing software, and after connecting adjacent slubs in the slub yarn fabric image, record the position coordinates of the starting point and the ending point of each connected slub; Process parameter detection module, which is used to detect the process parameters of the slub yarn fabric based on the position coordinates of the starting point and the ending point of each connected slub and using the slub parameter calculation method.

10. The computer vision-based slub yarn fabric process detection system according to claim 9, characterized in that, The grayscale image encoding unit is used to: obtain a set of fabric state grayscale feature vectors as the set of fabric state grayscale features by passing the multiple local grayscale images through a fabric state feature extractor based on the ConvNeXt model.

Citation Information

Patent Citations

  • Slub yarn fabric-based semi-automatic identification method for process parameters of slub yarn

    CN108717706A

Cited By

  • Artificial intelligence slub yarn fabric visual detection method and system

    CN121545139A