A yarn coating detection method and system based on multi-stage convolutional neural network

The yarn coating detection method combined with multi-stage convolutional neural network and support vector machine model solves the problems of low yarn coating detection accuracy and insufficient generalization ability in the existing technology, and realizes real-time defect detection and production process. Optimization improves yarn quality and market competitiveness.

CN118470002BActive Publication Date: 2024-10-29CHIZHOU GUIHONG INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410910893.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-29
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

Existing yarn covering detection methods are based on single-stage image processing, which makes it difficult to learn deep-level features, resulting in low recognition accuracy and insufficient generalization capabilities. It fails to effectively solve the problem of identifying and locating yarn covering defects.

Method used

A multi-stage convolutional neural network is used combined with a support vector machine model and a differential evolution algorithm to detect yarn coating defects through a multi-stage convolutional neural network. The optimization algorithm is used to optimize the production process parameters and raw material proportions to achieve real-time defect detection and production processes. optimization.

Benefits of technology

It improves the accuracy and identification ability of yarn coating defect detection, reduces the production of defective products, optimizes production efficiency and material use, and enhances the market competitiveness of yarn.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470002B_ABST
    Figure CN118470002B_ABST
Patent Text Reader

Abstract

The present invention discloses a yarn coating detection method and system based on a multi-stage convolutional neural network, and relates to the field of yarn detection. The yarn coating detection method based on the multi-stage convolutional neural network includes the following steps: screening out several factors from the production process data as input variables; training a support vector machine model through the input variables and corresponding labels to obtain a yarn coating quality prediction model; constructing a multi-stage convolutional neural network, and combining the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection classification; using a differential evolution algorithm to optimize parameters and raw material ratios in the production process. The present invention uses a multi-stage convolutional neural network to more accurately identify and classify different types of defects, optimizes production process parameters and raw material ratios using a differential evolution algorithm and the obtained defect detection classification results, and integrates different types of data to enhance generalization capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of yarn detection, and in particular to a yarn coating detection method and system based on a multi-stage convolutional neural network. Background Art

[0002] Yarn covering is a textile process that is mainly used to produce yarns with specific functionalities or improved physical properties. In this process, one or more fine yarns (called core yarns) are tightly wrapped or entangled with one or more different types of yarns (called covering yarns). In this way, yarns with desired elasticity, durability, feel or other specific properties can be produced. Covered yarns are widely used in clothing, home textiles, medical supplies, industrial supplies and other fields. For example, yarns coated with rubber or spandex can be used to make highly elastic knitwear such as underwear, sportswear, etc. In addition, covering technology is also often used to produce yarns with anti-static, UV protection or anti-bacterial functions.

[0003] Yarn covering detection is to identify and locate yarn covering defects in textiles. These defects may be caused by mechanical failures, material quality problems or operator errors during the production process. Yarn covering defects not only affect the appearance quality of textiles, but may also affect their performance and durability. Therefore, accurate yarn covering detection is essential to ensure the quality of textiles.

[0004] For example, Chinese patent 201910621954.7 discloses an image-based yarn defect detection method, which processes the collected yarn images, performs defect judgment on the processed yarn images, and completes yarn defect detection. However, the above method still has the following shortcomings: the single-stage image processing and defect judgment process is not conducive to learning the deep-level feature representation in the image, and thus is not conducive to obtaining higher recognition accuracy. At the same time, the detection method based solely on images has insufficient generalization ability for different situations.

[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0006] In response to the problems in the related art, the present invention proposes a yarn covering detection method and system based on a multi-stage convolutional neural network to overcome the above-mentioned technical problems existing in the existing related technology.

[0007] To this end, the specific technical solution adopted by the present invention is as follows:

[0008] According to one aspect of the present invention, a yarn covering detection method based on a multi-stage convolutional neural network is provided, and the yarn covering detection method based on the multi-stage convolutional neural network comprises the following steps:

[0009] S1. Collect the production process data of yarn coating, select several factors from the production process data as input variables, and obtain the labels corresponding to the input variables.

[0010] S2. Optimize the support vector machine model using an optimization algorithm, and train the support vector machine model by inputting variables and corresponding labels to obtain a yarn coating quality prediction model.

[0011] S3. Construct a multi-stage convolutional neural network and combine the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection and classification.

[0012] S4. Based on the defect detection and classification results of yarn coating, the differential evolution algorithm is used to optimize the parameters and raw material ratios in the production process.

[0013] Among them, constructing a multi-stage convolutional neural network and combining the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection and classification includes the following steps:

[0014] S31, collecting image data in yarn coating production, and obtaining corresponding annotation information based on the image data, wherein the image data includes defective samples and non-defective samples, and the image data is divided into a training set and a verification set;

[0015] S32, build and train the first stage convolutional neural network to identify preliminary defects in yarn coating;

[0016] S33. Construct and train the second-stage convolutional neural network, and combine the output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model to obtain the final yarn coating defect classification result.

[0017] Furthermore, the support vector machine model is optimized by using an optimization algorithm, and the support vector machine model is trained by inputting variables and corresponding labels to obtain a yarn coating quality prediction model, which includes the following steps:

[0018] S21, select the support vector machine model as the basic model;

[0019] S22, optimizing the parameters in the support vector machine model using a particle swarm optimization algorithm;

[0020] S23, using the input variables as features and the corresponding yarn coating quality evaluation as labels, training the optimized support vector machine model;

[0021] S24. Use cross-validation to evaluate the prediction performance of the support vector machine model to ensure the generalization ability of the model. If the pre-set goal is achieved, the trained support vector machine model will be used as the yarn coating quality prediction model.

[0022] Furthermore, optimizing the parameters in the support vector machine model using the particle swarm optimization algorithm includes the following steps:

[0023] S221, randomly generate positions and velocities of a number of particles, each particle representing a parameter in a support vector machine model;

[0024] S222, for each particle, setting the parameters of the support vector machine model and training the support vector machine model, and calculating the fitness at the same time;

[0025] S223, each particle compares its fitness with the optimal fitness and updates its individual extreme value;

[0026] S224, searching for a particle with the best fitness in the population, taking the particle position as the global optimal solution, and updating the global extreme value;

[0027] S225, updating the speed and position of each particle according to the individual extreme value and the global extreme value;

[0028] S226. Repeat S222 to S225 until a preset number of iterations is reached.

[0029] Furthermore, the fitness calculation formula is:

[0030] ;

[0031] In the formula, F represents the fitness value;

[0032] A represents accuracy, B represents F1 score, C represents recall, and D represents precision;

[0033] w 1. w 2. w 3 and w 4 represents the weights of accuracy, F1 score, recall and precision respectively.

[0034] Furthermore, the first-stage convolutional neural network is constructed and trained to identify preliminary defects in yarn coating, including the following steps:

[0035] S321. Construct a convolutional neural network based on a lightweight structure as the first stage convolutional neural network;

[0036] S322, training the first-stage convolutional neural network through the training set, applying the cross entropy loss function and the optimizer, and evaluating the first-stage convolutional neural network on the validation set;

[0037] S323, acquiring new image data and inputting it into the first stage convolutional neural network to obtain preliminary defect recognition results.

[0038] Furthermore, constructing and training the second-stage convolutional neural network, and combining the output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model to obtain the final yarn coating defect classification result includes the following steps:

[0039] S331, constructing a convolutional neural network that is deeper than the first-stage convolutional neural network, and obtaining a second-stage convolutional neural network;

[0040] S332, fusing the output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model, and dividing them into a fusion training set, a fusion test set, and a fusion verification set, and each sample has a corresponding true defect classification label;

[0041] S333, training, testing and verifying the second-stage convolutional neural network by integrating the training set, the test set and the verification set;

[0042] S334. The output of the first-stage convolutional neural network of the new image data and the yarn coating quality prediction result of the production process data corresponding to the new image data are fused and substituted into the second-stage convolutional neural network to obtain the final yarn coating defect classification result.

[0043] Furthermore, according to the defect detection and classification results of the yarn coating, the differential evolution algorithm is used to optimize the parameters and raw material ratios in the production process, including the following steps:

[0044] S41, calculating the defect rate according to the defect detection and classification result of the yarn coating;

[0045] S42, defining a fitness function for evaluating the performance of each set of production process parameters and raw material ratios;

[0046] S43, using a logical chaos sequence to initialize the population of the differential evolution algorithm;

[0047] S44, generating new mutant individuals and new offspring by using mutation operation and crossover operation;

[0048] S45, evaluate the new individuals according to the fitness function, and use the greedy strategy to select the best individuals to enter the next generation;

[0049] S46, adjusting the scaling factor and the crossover probability according to the current number of iterations;

[0050] S47. Repeat S44 to S46 until the stopping condition is met, and select the individual with the highest fitness from the final population.

[0051] Further, according to the defect detection and classification results of the yarn coating, the defect rate is calculated including the following steps:

[0052] S411, obtaining the number of each defect, the total number of defects and the total number of detections in the defect detection classification results of the yarn coating;

[0053] S412, assigning weights corresponding to different defects, and calculating the weighted defect rate;

[0054] Among them, the calculation formula of the weighted defect rate is:

[0055] ;

[0056] In the formula, Dr represents the weighted defect rate;

[0057] D i Indicates i The number of defects, β i Indicates i The weight of the defect;

[0058] N represents the total number of inspections, and n represents the total number of defect types.

[0059] Furthermore, initializing the population of the differential evolution algorithm using the logical chaos sequence includes the following steps:

[0060] S431, using a logical mapping equation to generate a chaotic sequence, and mapping the value of the chaotic sequence to a value range in the problem solution space;

[0061] S432, generating a number of corresponding solutions for each individual in the population, forming an initial population, and calculating the fitness value of each individual in the initial population;

[0062] S433. Select the best position in the initial population according to the fitness value to complete the population initialization.

[0063] According to another aspect of the present invention, a yarn covering detection system based on a multi-stage convolutional neural network is provided, and the yarn covering detection system based on the multi-stage convolutional neural network includes an input variable acquisition module, a quality prediction module, a defect classification module and an optimization production module; wherein the input variable acquisition module is connected to the quality prediction module, the quality prediction module is connected to the defect classification module, and the defect classification module is connected to the optimization production module.

[0064] The input variable acquisition module is used to collect the production process data of yarn coating, select several factors from the production process data as input variables, and obtain the labels corresponding to the input variables.

[0065] The quality prediction module is used to optimize the support vector machine model using an optimization algorithm, and train the support vector machine model through input variables and corresponding labels to obtain a yarn coating quality prediction model.

[0066] The defect classification module is used to construct a multi-stage convolutional neural network and combine the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection and classification.

[0067] The production optimization module is used to optimize the parameters and raw material ratios in the production process using a differential evolution algorithm based on the defect detection and classification results of the yarn covering.

[0068] The beneficial effects of the present invention are:

[0069] (1) The present invention provides a yarn coating detection method and system based on a multi-stage convolutional neural network. By collecting the production process data of yarn coating and combining it with a multi-stage convolutional neural network for image data analysis, it can realize real-time defect detection and quickly discover quality problems in the production process. The use of a multi-stage convolutional neural network can more accurately identify and classify different types of defects, thereby helping to quickly take measures to solve specific problems and reduce the flow of defective products into the market. By optimizing the production process parameters and raw material ratios using a differential evolution algorithm and the obtained defect detection classification results, the production parameters can be adjusted based on feedback, the production process can be optimized, and the production efficiency and material usage can be optimized. By optimizing the raw material ratio and production parameters, resource waste and production costs can be reduced, while the overall quality and market competitiveness of the yarn can be improved.

[0070] (2) By dividing defect detection into two stages, the present invention allows the model to focus on solving problems of different complexity. The first stage deals with more obvious defects, while the second stage deals with more subtle and complex problems. Deep convolutional neural networks can capture more complex and abstract features, and can provide more sophisticated analysis compared to shallow networks, thereby improving classification accuracy. The lightweight structure of the first stage means that preliminary defects can be quickly identified when resources are limited, reducing the burden on subsequent processing. Staged processing allows the system to process information step by step, reducing the one-time computing burden, and helping to optimize the allocation and use of computing resources. The second stage convolutional neural network not only considers image data, but also combines the output of the yarn coating quality prediction model. This method of fusing different types of data can enhance the model's generalization ability for various situations. By fusing data from different sources, the model can learn features of more dimensions, which help improve adaptability and robustness to new scenarios or data.

[0071] (3) By converting the defect detection results of yarn coating into actionable data, the production parameters can be dynamically optimized, which can quickly respond to problems in production and reduce the generation of defective products, thereby facilitating the production of higher quality yarns and enhancing the competitiveness of products in the market. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0073] Figure 1 is a flow chart of a yarn covering detection method based on a multi-stage convolutional neural network according to an embodiment of the present invention;

[0074] Figure 2 is a principle block diagram of a yarn covering detection system based on a multi-stage convolutional neural network according to an embodiment of the present invention;

[0075] Figure 3 It is a schematic diagram showing the structure of a computer device according to an exemplary embodiment.

[0076] In the figure:

[0077] 1. Input variable acquisition module; 2. Quality prediction module; 3. Defect classification module; 4. Production optimization module. DETAILED DESCRIPTION

[0078] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0079] According to an embodiment of the present invention, a yarn covering detection method and system based on a multi-stage convolutional neural network are provided.

[0080] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to one embodiment of the present invention, a yarn covering detection method based on a multi-stage convolutional neural network is provided, and the yarn covering detection method based on the multi-stage convolutional neural network comprises the following steps:

[0081] S1. Collect the production process data of yarn coating, which includes yarn characteristics and production environment parameters, and select several factors that have the greatest impact on the quality of yarn coating from the production process data as input variables, and obtain the labels corresponding to the input variables. Specifically, the following steps are included:

[0082] S11. Collect yarn characteristics (such as diameter, strength, elasticity, etc.) and production environment parameters (such as temperature and humidity, equipment speed, tension, etc.).

[0083] S12. Clean the collected data, including correcting erroneous data points, filling missing values, removing irrelevant data, and data standardization.

[0084] S13. Use statistical analysis methods to identify and select the factors that have the greatest impact on the quality of yarn coating.

[0085] S14. Determine the quality level or defect type of each sample through professional testing equipment or expert evaluation to ensure that the labels corresponding to the input variables are accurate.

[0086] S2. Optimize the support vector machine model using an optimization algorithm, and train the support vector machine model by inputting variables and corresponding labels to obtain a yarn coating quality prediction model.

[0087] In a further embodiment, the support vector machine model is optimized by using an optimization algorithm, and the support vector machine model is trained by inputting variables and corresponding labels to obtain a yarn coating quality prediction model, which includes the following steps:

[0088] S21. Select the support vector machine model as the basic model. The support vector machine is suitable for classification and regression problems.

[0089] S22. Use the particle swarm optimization algorithm to optimize the parameters in the support vector machine model, such as the penalty factor C and the kernel function parameter γ. The penalty factor C is used to balance the classification interval and the classification error. The parameter γ is the parameter of the kernel function, which is used to define the similarity in the high-dimensional space in the nonlinear SVM.

[0090] S23. Using the input variables as features and the corresponding yarn coating quality evaluation as labels, such as category labels such as "qualified" or "unqualified", the optimized support vector machine model is trained.

[0091] S24. Use cross validation to evaluate the prediction performance of the support vector machine model to ensure the generalization ability of the model. If the pre-set goal is achieved, the trained support vector machine model is used as the yarn coating quality prediction model. For example, in k-fold cross validation, the data set is divided into k subsets. Each subset is used as a test set in turn, and the rest are used as training sets.

[0092] In a further embodiment, optimizing the parameters in the support vector machine model using the particle swarm optimization algorithm comprises the following steps:

[0093] S221. Randomly generate the positions and velocities of several particles, each particle represents a parameter in the support vector machine model, that is, the parameters optimized by the particle swarm optimization algorithm are the penalty factor in the support vector machine model and the Gaussian kernel parameters of the radial basis function, and the velocity of the particle represents the direction and speed of its search in the parameter space. The initial position and velocity of the particle are usually randomly selected to cover a wide range of possible solutions.

[0094] S222. For each particle, set the parameters of the support vector machine model and train the support vector machine model, and calculate the fitness at the same time. The higher the fitness, the better the parameter combination.

[0095] S223. Each particle updates its individual extreme value based on the comparison between the fitness of the particle and the optimal fitness, thus ensuring that the particle can remember its best position in history.

[0096] S224. Search for the particle with the best fitness in the population, take the position of the particle as the global optimal solution, and update the global extreme value.

[0097] S225. Update the speed and position of each particle according to the individual extreme value and the global extreme value.

[0098] S226, repeat S222 to S225 until a preset number of iterations is reached (eg, a maximum number of iterations is reached or the fitness is high enough).

[0099] In a further embodiment, the calculation formula of fitness is:

[0100] ;

[0101] In the formula, F represents the fitness value.

[0102] A represents accuracy, B represents F1 score, C represents recall, and D represents precision.

[0103] w 1. w 2. w 3 and w 4 represents the weights of accuracy, F1 score, recall and precision respectively.

[0104] Classification accuracy refers to the ratio of correctly predicted samples to the total number of samples. Precision refers to the ratio of samples predicted as positive by the model that are actually positive. Recall refers to the ratio of samples correctly predicted as positive by the model among all samples that are actually positive. F1 score refers to the harmonic mean of precision and recall.

[0105] In order to facilitate understanding of the above technical solutions of the present invention, the working principle or operation mode of the present invention in the actual process is described in detail below.

[0106] 1,000 samples were collected, each including the diameter, strength, elasticity of the yarn, and the temperature, humidity, equipment speed, and tension of the production environment. The collected data was cleaned, 2% of the erroneous data points were corrected, 1% of the missing values ​​were filled, 5% of the irrelevant data were removed, and data standardization was performed. Using statistical analysis methods, yarn diameter, strength, equipment speed, and tension were identified as the factors that have the greatest impact on yarn coating quality. The yarn coating quality of each sample was rated, of which 200 samples were marked as defective and 800 samples were marked as defect-free.

[0107] The support vector machine was selected as the basic model, and 50 particles were randomly generated, each particle representing a set of SVM parameters. The support vector machine corresponding to each particle was trained, and its classification accuracy on the validation set was calculated as the fitness. After 30 iterations, the optimal parameters were found, making the classification accuracy of the support vector machine reach 95%.

[0108] S3. Construct a multi-stage convolutional neural network and combine the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection and classification.

[0109] Constructing a multi-stage convolutional neural network and combining the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection and classification includes the following steps:

[0110] S31. Collect image data from yarn covering production, and perform appropriate preprocessing on the images, such as cropping, normalization, and enhancement, to improve the effect and efficiency of model training; based on the image data, obtain corresponding annotation information, and the image data includes defective samples and non-defective samples, and divide the image data into a training set and a validation set.

[0111] S32. Build and train the first stage convolutional neural network to identify preliminary defects in yarn coating. The network at this stage does not need to be very deep, and its main task is to identify obvious defects and non-defects from the image.

[0112] S33, construct and train the second stage convolutional neural network, and combine the output of the first stage convolutional neural network and the output of the yarn coating quality prediction model to obtain the final yarn coating defect classification result. Combined with the output from the yarn coating quality prediction model, and further refining the defect classification through this comprehensive information, more subtle or complex defect types can be identified.

[0113] In a further embodiment, constructing and training a first stage convolutional neural network to identify preliminary defects in yarn coating comprises the following steps:

[0114] S321. Construct a convolutional neural network based on a lightweight structure as the first stage convolutional neural network.

[0115] S322. The first-stage convolutional neural network is trained using the training set, and the cross entropy loss function and Adam optimizer are applied, and the first-stage convolutional neural network is evaluated on the validation set; the cross entropy loss function can quantify the difference between the model output and the true label, and the Adam optimizer is an optimization algorithm with an adaptive learning rate.

[0116] S323. Acquire new image data and input it into the first-stage convolutional neural network to obtain preliminary defect recognition results. Once the model training is completed and performs well on the validation set, new image data can be input into the model to identify whether there are defects and perform preliminary classification.

[0117] In a further embodiment, constructing and training a second-stage convolutional neural network, and combining the output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model to obtain the final yarn coating defect classification result includes the following steps:

[0118] S331. Construct a convolutional neural network that is deeper than the first-stage convolutional neural network to obtain a second-stage convolutional neural network.

[0119] S332. The output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model are fused, and divided into a fusion training set, a fusion test set, and a fusion verification set, and each sample has a corresponding true defect classification label.

[0120] S333. Train, test and verify the second-stage convolutional neural network by integrating the training set, the test set and the verification set.

[0121] S334, the output of the first-stage convolutional neural network of the new image data and the yarn coating quality prediction result of the production process data corresponding to the new image data are fused, and substituted into the second-stage convolutional neural network to obtain the final yarn coating defect classification result. That is, the new image data is obtained through the first-stage convolutional neural network. Features are then combined with the output of the yarn coating quality prediction model to form fusion features, and finally input into the second-stage convolutional neural network to obtain the final defect classification result.

[0122] In order to facilitate understanding of the above technical solutions of the present invention, the working principle or operation mode of the present invention in the actual process is described in detail below.

[0123] A high-resolution camera was used to capture images of each roll of yarn on the production line. 1,000 yarn images were collected, including defective and non-defective samples. Technicians annotated these images, identified the specific types of defects present, and divided the data into a training set (800 images) and a test set (200 images).

[0124] Phase 1: Build a simple convolutional neural network with three convolutional layers. The first layer uses 32 3x3 filters, the second layer uses 64 filters, and the third layer uses 128 filters. Each layer is followed by a max pooling layer and a ReLU activation function. The model is trained on the training set and its ability to identify large and obvious defects is verified on the validation set. The model can initially identify significant defects with an accuracy of about 90%.

[0125] Phase II: Build a deeper convolutional neural network with five convolutional layers, each followed by batch normalization and dropout to enhance the generalization of the model. Combine the output of the primary inspection with the results predicted by the yarn coating quality prediction model, and use feature fusion technology to synthesize this information. Train the network to finely identify and classify minor defects. The second phase model is able to identify and classify more subtle defects with an accuracy rate of 95%, effectively supplementing the details that may be missed in the primary inspection stage.

[0126] S4. Based on the classification results of yarn coating defect detection, the differential evolution algorithm is used to optimize the parameters and raw material ratios in the production process to minimize costs and optimize quality.

[0127] In a further embodiment, based on the defect detection classification results of the yarn coating, optimizing the parameters and raw material ratios in the production process using the differential evolution algorithm includes the following steps:

[0128] S41. Calculate the defect rate according to the defect detection and classification results of the yarn covering.

[0129] S42. Define a fitness function to evaluate the performance of each set of parameters and raw material ratios in the production process; the optimization goal is to minimize the defect rate while considering cost-effectiveness, ensuring that the fitness function can reflect the comprehensive performance of these key production indicators.

[0130] S43. Use a logical chaotic sequence to initialize the population of the differential evolution algorithm to ensure the diversity of the population; determine the control parameter μ of the logical mapping, which is usually taken as 4.

[0131] S44. Generate new mutant individuals and new offspring using mutation and crossover operations.

[0132] S45. Evaluate new individuals according to the fitness function and use a greedy strategy to select the best individuals to enter the next generation. Only when the fitness of the new individual is better than that of its parent will it be selected as the next generation.

[0133] S46. According to the current number of iterations, adjust the scaling factor and the crossover probability to maintain the dynamic balance of the algorithm.

[0134] S47. Repeat S44 to S46 until the stopping condition is met, and select the individual with the highest fitness from the final population.

[0135] In a further embodiment, according to the defect detection classification result of the yarn coating, calculating the defect rate comprises the following steps:

[0136] S411, obtaining the number of each defect, the total number of defects and the total number of detections in the defect detection classification results of the yarn coating.

[0137] S412. Assign corresponding weights to different defects and calculate the weighted defect rate to more accurately reflect the impact of various defects on the quality of the final product.

[0138] Among them, the calculation formula of the weighted defect rate is:

[0139] ;

[0140] In the formula, Dr Represents the weighted defect rate.

[0141] D i Indicates i The number of defects, β i Indicates i The weight of the defect.

[0142] N represents the total number of inspections, and n represents the total number of defect types.

[0143] In a further embodiment, initializing the population of the differential evolution algorithm using a logistic chaotic sequence includes the following steps:

[0144] S431. Generate a chaotic sequence using a logical mapping equation, and map the value of the chaotic sequence into a value range of the problem solution space.

[0145] S432. Generate a number of corresponding solutions for each individual in the population, form an initial population, and calculate the fitness value of each individual in the initial population.

[0146] S433. Select the best position in the initial population according to the fitness value to complete the population initialization.

[0147] In order to facilitate understanding of the above technical solutions of the present invention, the working principle or operation mode of the present invention in the actual process is described in detail below.

[0148] Total number of inspections (N=1000), total number of defects (200), and number of each defect type according to actual classification results, such as yarn breakage, scarring, etc. Assign weights to different defect types and calculate the weighted defect rate Dr .

[0149] The differential evolution algorithm is used to optimize the production parameters and the individuals with the highest fitness are selected as the optimal production parameters.

[0150] like Figure 2 As shown, according to another embodiment of the present invention, a yarn covering detection system based on a multi-stage convolutional neural network is provided, and the yarn covering detection system based on a multi-stage convolutional neural network includes an input variable acquisition module 1, a quality prediction module 2, a defect classification module 3 and an optimization production module 4; wherein the input variable acquisition module 1 is connected to the quality prediction module 2, the quality prediction module 2 is connected to the defect classification module 3, and the defect classification module 3 is connected to the optimization production module 4.

[0151] The input variable acquisition module 1 is used to collect the production process data of the yarn coating, select several factors from the production process data as input variables, and obtain the labels corresponding to the input variables.

[0152] The quality prediction module 2 is used to optimize the support vector machine model by using an optimization algorithm, and to train the support vector machine model by inputting variables and corresponding labels to obtain a yarn coating quality prediction model.

[0153] The defect classification module 3 is used to construct a multi-stage convolutional neural network and combine the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection and classification.

[0154] The production optimization module 4 is used to optimize the parameters and raw material ratios in the production process using a differential evolution algorithm according to the defect detection and classification results of the yarn coating.

[0155] Figure 3An embodiment of a computer device of the present invention is shown, which may be a server, and includes a processor, a memory and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps in the above method embodiment are implemented.

[0156] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0157] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiment when executing the computer program.

[0158] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0160] In summary, the present invention provides a yarn coating detection method and system based on a multi-stage convolutional neural network. By collecting the production process data of yarn coating and combining the multi-stage convolutional neural network for image data analysis, real-time defect detection can be achieved, and quality problems in the production process can be quickly discovered. The use of a multi-stage convolutional neural network can more accurately identify and classify different types of defects, thereby helping to quickly take measures to solve specific problems and reduce the flow of defective products into the market. By optimizing the production process parameters and the proportion of raw materials using the differential evolution algorithm and the obtained defect detection classification results, the production parameters can be adjusted according to the feedback, the production process can be optimized, and the production efficiency and material use can be optimized. By optimizing the raw material ratio and production parameters, resource waste and production costs can be reduced, while the overall quality and market competitiveness of the yarn can be improved. By dividing the defect detection into two stages, the present invention allows the model to focus on solving problems of different complexity. The first stage deals with more obvious defects, while the second stage deals with more subtle and complex problems. Deep convolutional neural networks can capture more complex and abstract features, and can provide more sophisticated analysis compared to shallow networks, thereby improving the accuracy of classification. The lightweight structure of the first stage means that preliminary defects can be quickly identified with limited resources, reducing the burden for subsequent processing. Phased processing allows the system to process information step by step, reducing the one-time computing burden, and helping to optimize the allocation and use of computing resources. The second-stage convolutional neural network not only considers image data, but also combines the output of the yarn coating quality prediction model. This method of fusing different types of data can enhance the model's generalization ability for various situations. By fusing data from different sources, the model is able to learn features in more dimensions, which help improve adaptability and robustness to new scenarios or data. By converting the defect detection results of yarn coating into actionable data, production parameters can be dynamically optimized, which can quickly respond to problems in production and reduce the production of defective products, which is conducive to the production of higher quality yarns and enhance the competitiveness of products in the market.

[0161] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A yarn coating detection method based on a multi-stage convolutional neural network, characterized in that: The yarn coating detection method based on a multi-stage convolutional neural network comprises the following steps: S1. Collecting the production process data of yarn coating, and selecting several factors from the production process data as input variables, and obtaining labels corresponding to the input variables; S2. Optimizing the support vector machine model using an optimization algorithm, and training the support vector machine model by inputting variables and corresponding labels to obtain a yarn coating quality prediction model; The method of optimizing the support vector machine model by using an optimization algorithm and training the support vector machine model by inputting variables and corresponding labels to obtain a yarn coating quality prediction model comprises the following steps: S21, select the support vector machine model as the basic model; S22, optimizing the parameters in the support vector machine model using a particle swarm optimization algorithm; S23, using the input variables as features and the corresponding yarn coating quality evaluation as labels, training the optimized support vector machine model; S24, using cross validation to evaluate the prediction performance of the support vector machine model to ensure the generalization ability of the model, and if the pre-set goal is achieved, the trained support vector machine model is used as the yarn coating quality prediction model; S3, construct a multi-stage convolutional neural network, and combine the output of the yarn coating quality prediction model and image data to perform yarn coating defect detection and classification; S4. Based on the defect detection and classification results of yarn coating, the differential evolution algorithm is used to optimize the parameters and raw material ratios in the production process; The construction of a multi-stage convolutional neural network and the combination of the output of the yarn coating quality prediction model and image data for yarn coating defect detection and classification include the following steps: S31, collecting image data in yarn coating production, and obtaining corresponding annotation information based on the image data, wherein the image data includes defective samples and non-defective samples, and the image data is divided into a training set and a verification set; S32, build and train the first stage convolutional neural network to identify preliminary defects in yarn coating; S33, constructing and training a second-stage convolutional neural network, and combining the output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model to obtain a final yarn coating defect classification result; The construction and training of the second-stage convolutional neural network, and combining the output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model to obtain the final yarn coating defect classification result includes the following steps: S331, constructing a convolutional neural network that is deeper than the first-stage convolutional neural network, and obtaining a second-stage convolutional neural network; S332, fusing the output of the first-stage convolutional neural network and the output of the yarn coating quality prediction model, and dividing them into a fusion training set, a fusion test set, and a fusion verification set, and each sample has a corresponding true defect classification label; S333, training, testing and verifying the second-stage convolutional neural network by integrating the training set, the test set and the verification set; S334. The output of the first-stage convolutional neural network of the new image data and the yarn coating quality prediction result of the production process data corresponding to the new image data are fused and substituted into the second-stage convolutional neural network to obtain the final yarn coating defect classification result.

2. A yarn coating detection method based on a multi-stage convolutional neural network according to claim 1, characterized in that: Optimizing the parameters in the support vector machine model using the particle swarm optimization algorithm comprises the following steps: S221, randomly generate positions and velocities of a number of particles, each particle representing a parameter in a support vector machine model; S222, for each particle, setting the parameters of the support vector machine model and training the support vector machine model, and calculating the fitness at the same time; S223, each particle compares its fitness with the optimal fitness and updates its individual extreme value; S224, searching for a particle with the best fitness in the population, taking the particle position as the global optimal solution, and updating the global extreme value; S225, updating the speed and position of each particle according to the individual extreme value and the global extreme value; S226. Repeat S222 to S225 until a preset number of iterations is reached.

3. A yarn coating detection method based on a multi-stage convolutional neural network according to claim 2, characterized in that: The calculation formula of the fitness is: ; In the formula, F represents the fitness value; A represents accuracy, B represents F1 score, C represents recall, and D represents precision; w 1. w 2. w 3 and w 4 represents the weights of accuracy, F1 score, recall and precision respectively.

4. A yarn coating detection method based on a multi-stage convolutional neural network according to claim 3, characterized in that: The construction and training of the first stage convolutional neural network to identify preliminary defects in yarn coating includes the following steps: S321. Construct a convolutional neural network based on a lightweight structure as the first stage convolutional neural network; S322, training the first-stage convolutional neural network through the training set, applying the cross entropy loss function and the optimizer, and evaluating the first-stage convolutional neural network on the validation set; S323, acquiring new image data and inputting it into the first stage convolutional neural network to obtain preliminary defect recognition results.

5. The yarn coating detection method based on a multi-stage convolutional neural network according to claim 1 is characterized in that: The method of optimizing the parameters and raw material ratios in the production process using a differential evolution algorithm according to the defect detection and classification results of the yarn coating includes the following steps: S41, calculating the defect rate according to the defect detection and classification result of the yarn coating; S42, defining a fitness function for evaluating the performance of each set of production process parameters and raw material ratios; S43, using a logical chaos sequence to initialize the population of the differential evolution algorithm; S44, generating new mutant individuals and new offspring by using mutation operation and crossover operation; S45, evaluate the new individuals according to the fitness function, and use the greedy strategy to select the best individuals to enter the next generation; S46, adjusting the scaling factor and the crossover probability according to the current number of iterations; S47. Repeat S44 to S46 until the stopping condition is met, and select the individual with the highest fitness from the final population.

6. A yarn coating detection method based on a multi-stage convolutional neural network according to claim 5, characterized in that: The calculation of the defect rate according to the defect detection and classification results of the yarn coating comprises the following steps: S411, obtaining the number of each defect, the total number of defects and the total number of detections in the defect detection classification results of the yarn coating; S412, assigning weights corresponding to different defects, and calculating the weighted defect rate; Among them, the calculation formula of the weighted defect rate is: ; In the formula, Dr represents the weighted defect rate; D i Indicates i The number of defects, β i Indicates i The weight of the defect; N represents the total number of inspections, and n represents the total number of defect types.

7. A yarn coating detection method based on a multi-stage convolutional neural network according to claim 6, characterized in that: The process of initializing the population of the differential evolution algorithm using a logical chaotic sequence comprises the following steps: S431, using a logical mapping equation to generate a chaotic sequence, and mapping the value of the chaotic sequence to a value range in the problem solution space; S432, generating a number of corresponding solutions for each individual in the population, forming an initial population, and calculating the fitness value of each individual in the initial population; S433. Select the best position in the initial population according to the fitness value to complete the population initialization.

8. A yarn covering detection system based on a multi-stage convolutional neural network, used to implement the yarn covering detection method based on a multi-stage convolutional neural network according to any one of claims 1 to 7, characterized in that: The yarn coating detection system based on multi-stage convolutional neural network includes an input variable acquisition module, a quality prediction module, a defect classification module and a production optimization module; Wherein, the input variable acquisition module is connected to the quality prediction module, the quality prediction module is connected to the defect classification module, and the defect classification module is connected to the production optimization module; The input variable acquisition module is used to collect the production process data of the yarn coating, and select several factors from the production process data as input variables, and obtain the labels corresponding to the input variables; The quality prediction module is used to optimize the support vector machine model using an optimization algorithm, and train the support vector machine model by inputting variables and corresponding labels to obtain a yarn coating quality prediction model; The defect classification module is used to construct a multi-stage convolutional neural network and perform yarn coating defect detection and classification in combination with the output of the yarn coating quality prediction model and image data; The production optimization module is used to optimize the parameters and raw material ratios in the production process using a differential evolution algorithm based on the defect detection and classification results of the yarn coating.

Citation Information

Patent Citations

  • Image-based yarn defect detection method

    CN110298840A

  • Cascaded depth neural network-based face attribute recognition method

    CN103824054A

  • Multilevel model cloth defect detection method and system

    CN106996935A