Two-for-one twister broken line detection method based on improved Yov8

By introducing the improved YOLO-V8 vision system into the inspection robot of the textile twister, the convenience, cost, efficiency and adaptability of the existing disconnection detection methods are solved, and high accuracy and high efficiency disconnection detection are achieved.

CN120182934APending Publication Date: 2025-06-20CHANGZHOU UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510238505.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The existing textile twister wire break detection methods have poor convenience, high cost, low efficiency, poor adaptability, and are difficult to achieve comprehensive coverage and real-time prediction.

Method used

The double twister line break detection method based on improved Yolov8 is adopted. By introducing a visual system into the patrol robot, the main component analysis method and the control variable method are used to optimize the detection area selection, the C2f module in the YOLO-V8 network is improved, and the FasterBlock and EMA attention mechanism are introduced to form a C2f-FSE network to realize real-time line break detection.

Benefits of technology

Real-time detection of the disconnection of the twister is achieved, and the recognition accuracy is improved to 98.6%, the detection speed is accelerated, power consumption is reduced, and the system stability and performance are significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182934A_ABST
    Figure CN120182934A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of broken yarn detection, in particular to a two-for-one twister broken yarn detection method based on improved Yolov8, and aims to solve the problems of poor convenience, high cost, low efficiency, poor adaptability and the like in traditional spinning two-for-one twister broken yarn detection. A visual system is introduced into an inspection robot to detect the disconnection condition, Jeston Orin NX is adopted as a main controller of the visual detection system, and an improved Yolov8 model is locally deployed. Wherein a Faster Block module and an EMA attention mechanism are introduced into the Yov8 model, the network structure of Yov8 is improved, finally, the improved Yov8 is used for multi-thread target detection, and real-time detection of broken lines is successfully achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of broken yarn detection, and particularly relates to a broken yarn detection method for a doubling machine based on improved Yolov8. Background Art

[0002] The textile doubling machine is a key device in the textile industry, mainly used for twisting single-strand yarns into double-strand or multi-strand yarns. In the face of possible broken yarn situations during the production process, if the broken yarn cannot be detected and processed in time, it may cause huge losses to production and affect the quality and performance of the final textile products. In modern textile production, the stable operation of the doubling machine and product quality control are directly related to the efficiency of the entire production line and the product quality.

[0003] In order to deal with the broken yarn situation during the production process, the existing method is for experienced staff to regularly patrol the workshop and visually inspect the operation status of the equipment; or use sensors for broken yarn detection. Sensor detection usually includes the following types: 1. Photoelectric sensor detection: Install a photoelectric sensor on the yarn path and use the principle of light occlusion to judge the breakage condition of the yarn; 2. Mechanical tension detection: Install a spring or other mechanical device at key positions of the doubling machine to sense the change in yarn tension and judge the condition of the yarn; 3. Hall / capacitance sensor detection: Use magnetic induction and capacitance changes to detect the rotation of the roller, detect the continuity of magnetic marks on the yarn, and judge the condition of the yarn. The above sensor detection methods all require additional modification of the doubling machine when it is shut down, which is inconvenient for users. Moreover, they can only monitor preset fixed positions, making it difficult to achieve full coverage. At the same time, sensor detection is easily affected by various environments, with great uncertainty, and there are also significant differences in the detection effects for different yarns. In addition, most of the above existing detections are passive detections, making it difficult to actively predict and respond to emergencies in a timely manner. Summary of the Invention

[0004] The technical problem to be solved by the present invention is: In order to solve the problems of poor convenience, high cost, low efficiency, and poor adaptability in the broken yarn detection of traditional textile doubling machines, the present invention provides a broken yarn detection method for a doubling machine based on improved Yolov8, which does not require modifying the structure of the doubling machine, can detect broken yarns in the doubling machine in real time, and calculate the coordinate position of the broken yarn. The detection speed is fast, the accuracy is high, and it has strong real-time performance, which can minimize losses and ensure the normal operation of the doubling machine.

[0005] The technical solution adopted by the present invention to solve its technical problems is: A broken yarn detection method for a doubling machine based on improved Yolov8, based on the images captured by the camera of the inspection robot, introducing a vision system in the inspection robot to detect the broken yarn situation, including the following steps:

[0006] S1: Selection and optimization of the broken wire detection area of the doubling twister: Analyze the original variables that may affect the selection of the detection area through the principal component analysis method and the control variable method;

[0007] S2: Screen the image samples taken by the camera of the inspection robot to make a data set;

[0008] S3: Form the C2f-Faster optimization structure: Improve the C2f module in the YOLO-V8 network, use the FasterBlock module in FasterNet to replace the Bottleneck module in Yolov8, optimize the C2f module, and form the C2f-Faster structure;

[0009] S4: Introduce the EMA attention mechanism after the split layer: Introduce the EMA attention mechanism after the split layer of the FasterBlock module in the network structure to form the C2f-FSE network;

[0010] S5: Train a suitable model: Divide the data set labeled in step S2 into a training set, a test set, and a validation set according to a ratio, and use the YOLO-V8-FSE model for training, testing, and validation. The Yolov8 introduced with the FasterBlock module and the EMA attention mechanism in steps S3 and S4 is the YOLO-V8-FSE model.

[0011] In step S1, through the control variable method, batch change the original variable factors that affect the selection of the detection area, and record the relevant parameters; then eliminate the noise and redundant information that affect the selected detection area through the principal component analysis method, determine the main factors that affect the selection of the detection area, and finally select the best detection area.

[0012] In step S1, the following steps are included:

[0013] S11: Data standardization: Organize the data of the original variables into the original data matrix X. Each row in the original data matrix X represents a sample, and each column represents a feature. First, calculate the mean u j and the standard deviation σ j , where X ij represents the j-th feature value of the i-th sample, n represents the total number of samples, and X i ′ j represents the data after standardizing the j-th feature value of the i-th sample:

[0014]

[0015] Then standardize each feature:

[0016]

[0017] S12: Calculate the covariance matrix: For the standardized data matrix X′, calculate the covariance matrix Z:

[0018]

[0019] where X′ T is the transpose of X′, and n represents the total number of samples;

[0020] S13: Solve for eigenvalues and eigenvectors: Perform eigen - decomposition on the covariance matrix Z to obtain eigenvalues λ1, λ2,..., λ P and the corresponding eigenvectors υ1, υ2,..., υ p , and the eigenvalues and eigenvectors satisfy the following equation:

[0021] Cυ k = λ k υ k

[0022] where k = 1, 2,..., p, and p represents the number of features;

[0023] S14: Select the principal components: Select the first k eigenvectors with the largest eigenvalues as the principal components. These principal components can explain most of the variance in the data, and the cumulative variance contribution rate K″ is calculated as follows:

[0024]

[0025] Select the principal components with a cumulative variance contribution rate reaching 85% - 95%;

[0026] S15: Analyze the relationship between the principal components and the original variables:

[0027] Each principal component PC k is expressed as a linear combination of the original variables:

[0028]

[0029] where υ jk is the j - th element of the k - th eigenvector, X j ′ represents the j - th standardized variable, p represents the number of features. By analyzing the magnitudes of υ jk , determine the original variables that contribute the most to the principal components;

[0030] S16: According to the variance contribution rate of the principal components and the relationship between the principal components and the original variables, and based on multiple principal component factors that have the greatest impact on the selection of the detection area, select the detection area.

[0031] In the inspection environment of the two-for-one twister, in step S16, the three main component factors that have the greatest impact on the selection of the detection area are the installation angle of the camera, the moving speed of the inspection robot and the visual recognition speed, and the winding roller of the two-for-one twister is selected as the detection area.

[0032] At the same time, the camera installation angle is determined to be 60° downward, the speed of the inspection robot is 50 cm / s, and the recognition speed is 0.1 s.

[0033] In step S2, suitable samples are selected from the samples taken by the camera of the twister inspection robot, difficult samples with overexposure and unclear images are eliminated, and a data set with a sample capacity of 6000-8000 is annotated and produced.

[0034] Step S4 includes the following steps:

[0035] S41: Feature grouping: EMA processes the input feature image by cross-channel grouping, dividing it into G sub-feature maps, where G is much smaller than the number of channels c, and learns different semantic information. Each sub-feature map generates an attention weight descriptor to enhance the feature representation of the region of interest.

[0036] S42: Parallel subgraph: EMA then adopts a parallel subgraph structure, which includes two branches: 1x1 convolution branch and 3x3 convolution branch. The 1x1 convolution branch extracts the feature weights in the vertical and horizontal directions through two lines respectively, generating feature vectors in two directions; these vectors are multiplied and aggregated with the original feature map after being fitted by the Sigmoid function to achieve the fusion of directional information and original features; the 3x3 convolution branch captures multi-scale features through cross-channel interaction and expands the spatial range of features;

[0037] S43: Cross-space learning: Finally, EMA references the information of two channels to achieve cross-space information aggregation. The information of the two channels refers to the channel information of the 1x1 convolution branch and the channel information of the 3x3 convolution branch. Then, 2D global average pooling is used to encode the global spatial information. The 1x1 convolution branch and the 3x3 convolution branch are transformed into dimensional form, where R1 represents the feature map extracted from the 1x1 convolution branch, R3 represents the feature map extracted from the 3x3 convolution branch, C represents the total number of channels, G represents the number of groups, H represents the height of the feature map, W represents the width of the feature map, HW represents the total number of spatial positions of the feature map, and the operation of 2D global average pooling is as follows:

[0038]

[0039] Among them, Z crepresents the output value after 2D global average pooling of the c-th channel. H represents the height of the feature map, W represents the width of the feature map, H×W represents the total number of spatial positions of the feature map, and X c (i, j) represents the feature value of the c-th channel at position (i, j) in the input feature map;

[0040] realizes the relationship between global information and modeling long-range dependencies.

[0041] In step S4, the Softmax natural non-linear function uses Gaussian mapping to achieve fitting linear change, obtaining the first attention map of EMA. At the same time, in the 3x3 convolution branch, 2D global average pooling is used to encode global spatial information, and the output of the 1x1 convolution branch line is transformed into the dimension form to generate the second spatial attention map; finally, the feature map of each group is calculated as the aggregation of two spatial attention weights.

[0042] In step S5, the labeled dataset in step S2 is divided into a training set, a test set, and a validation set according to the ratio of 7:2:1.

[0043] The entire inference process of the YOLO-V8-FSE model is divided into three independent modules: image reading, model inference, and post-processing of detection results. Then, the multi-thread parallel synchronization technology is used to make the threads of the three independent modules of image reading, model inference, and post-processing of detection results run in parallel. Finally, the YOLO-V8-FSE model is deployed on the Jetson Orin NX industrial control computer for broken wire detection.

[0044] The beneficial effects of the present invention are that the broken wire detection method for doubling machines based on the improved Yolov8 of the present invention successfully realizes real-time detection of broken wires by introducing a vision system in the inspection robot, and has the following advantages:

[0045] 1. The recognition accuracy is greatly improved: The recognition accuracy of the original Yolov8 for broken wires is 95.6%. The present invention uses the FasterBlock module in FasterNet to replace the BottleNeck module in Yolov8, optimizes the network structure, reduces the amount of computation and the number of parameters, improves the accuracy of object detection, and integrates the EMA module after the split layer in the c2f-faster module to form a unique C2f-FE module, enhances the semantic information of the features after the segmentation of the broken wire feature images of the doubling machine, improves the distinguishability of the features, optimizes the model's attention and refinement of the features, and further improves the performance of the detection framework. The accuracy of broken wire recognition is 98.6%, which can meet the requirements of production enterprises for broken yarn detection;

[0046] 2. Significantly reduced power consumption: After introducing FasterBlock, using PConv can reduce the redundancy of calculations while reducing the amount of memory access. During the convolution process, only a part of the channels use conventional Conv for convolution to extract spatial features, and the other channels remain unchanged, greatly reducing the amount of calculation. The parameter quantity of Yolov8 has been reduced from 8.9 GFLOPs to 7.1 GFLOPs, and the power consumption at the same frame rate has been reduced by 20.22%;

[0047] 3. Faster detection speed: The FasterBlock module is introduced, reducing the amount of calculation. At the same time, the entire inference process of the improved Yolov8 model is divided into three independent modules: image reading, model inference, and post-processing of detection results. Using multi-threaded parallel synchronization technology, the above three independent threads run in parallel, significantly improving the detection frame rate and the overall running speed;

[0048] 4. Improved system stability: After optimizing the network structure of the model, both the recognition accuracy and the running speed have been significantly increased. Using Jeston Orin NX as the main controller of the vision system to replace the traditional 1650 graphics card industrial control computer has significantly reduced the power consumption of the vision system, improved the overall performance of the detection system, and provided strong technical support for its application in the actual industrial environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The present invention will be further described below in conjunction with the drawings and embodiments.

[0050] Figure 1 It is the network structure diagram of the FasterBlock module in FasterNet.

[0051] Figure 2 It is the structure diagram of Pconv.

[0052] Figure 3 It is the network structure diagram of C2f-Faster.

[0053] Figure 4 It is the network structure diagram of the C2f-FSE optimized structure of the present invention.

[0054] Figure 5 It is the framework diagram of the EMA attention mechanism of the present invention.

[0055] Figure 6 It is the network structure diagram of the YOLO-V8-FSE model of the present invention.

[0056] Figure 7 It is the PR curve graph of the native Yolov8 for broken wire recognition.

[0057] Figure 8It is the PR curve graph for broken wire recognition after the improvement of Yolov8 by the present invention.

[0058] Figure 9 It is the actual detection result graph of the present invention. Detailed implementation manners

[0059] Now, the present invention will be further described in detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.

[0060] The broken wire detection method for a doubling machine based on the improved Yolov8 of the present invention, based on the images captured by the camera of an inspection robot, introduces a vision system in the inspection robot to detect the broken wire situation, including the following steps:

[0061] S1: Selection and optimization of the broken wire detection area of the doubling machine: By using the principal component analysis method and the control variable method, analyze the original variables that may affect the selection of the detection area;

[0062] S2: Screen samples to make a data set;

[0063] Aiming at the problem of low recognition accuracy of the original Yolov8, the present invention proposes two improvements. One is to improve the C2f module in the YOLO-V8 network, and the other is to introduce the EMA attention mechanism into the network structure after replacing the FasterBlock, that is, step S3 and step S4.

[0064] S3: Form a C2f-Faster optimization structure: Improve the C2f module in the YOLO-V8 network. Aiming at the problems of large computational amount of the BottleNeck module in the original Yolov8 backbone network and poor ability to extract fine features, use the FasterBlock module in FasterNet to replace the BottleNeck module in Yolov8, optimize the C2f module, and form a C2f-Faster structure; The introduction of FasterBlock makes the network more efficient and stable when processing visual tasks. By optimizing the model structure, the training process is made faster and more stable. The network structure of FaserNet Block is as Figure 1 shown. The network structure diagram of C2f-Faster is as Figure 3 shown.

[0065] Using partial convolution PConv in FasterBlock can reduce the computational redundancy and memory access volume. During the convolution process, it only uses the conventional Conv for convolution on a part of the channels to extract spatial features, while the other channels remain unchanged. For the sake of memory access and the continuity of channel data, here, a continuous segment of the first or last connected channels is used to represent the information of all feature maps for calculation. The structure of PConv is as Figure 2 shown.

[0066] By using PConv, the computational amount can be reduced while maintaining the high detection accuracy of the model. The improvement of the computational speed by PConv is related to the magnitude of the time delay, where the magnitude of the time delay is directly proportional to FLOPs and inversely proportional to FLOPS. As shown below.

[0067]

[0068] The input image parameter input size is (c, h, w), the convolution kernel size is k*k, the output parameter output size is (c, h, w), and the FLOPs of PConv is h×w×k 2 ×cp 2 , where cp in PConv takes 1 / 4 of c, that is, the feature maps of one-fourth of the channels are used to participate in the calculation. Then the FLOPs of PConv is 1 / 16 of that of the ordinary convolution Conv. The memory access volume of PConv: h×w×2cp + k 2 ×cp 2 ≈h×w×2cp. The memory access volume of PConv is reduced by 75%. Introducing FasterBlock significantly reduces the amount of data operations in Yolov8 and improves the computational speed.

[0069] S4: Introduce the EMA attention mechanism after the split layer: The second improvement to the original Yolov8 is to introduce the EMA attention mechanism in the network structure after replacing the FasterBlock. To solve the problems such as the thin silk thread, unclear color, difficult extraction of broken wire features, and feature divergence of the doubling frame machine, the present invention adds EMA after the Split layer, which can avoid the interference of EMA on the segmentation operation, ensure that the information of the feature map after segmentation is clearer, enhance the different semantic features of the feature map after segmentation, combines the idea of exponential moving average, and improves the performance of the model under long-term sequence dependence by smoothing and optimizing the weight update process. Formalize the attention calculation in the way of expectation maximization, which significantly reduces the computational burden. Introduce the EMA attention mechanism after the split layer of the FasterBlock module in the network structure to form the C2f-FSE network; as Figure 4As shown in the figure, the features of the silk thread image of the doubling twisting machine are passed into the EMA layer after passing through the convolutional layer and the segmentation layer. The EMA layer divides all the feature maps into g groups, and in each feature map, it is divided into two branches of 1x1 and 3x3, aggregating more spatial structure information and achieving faster response.

[0070] S5: Train a suitable model: In order to train a suitable model, first divide a suitable dataset. The dataset labeled in step S2 is divided into a training set, a test set, and a validation set according to a ratio, and the YOLO-V8-FSE model is used for training, testing, and validation. The Yolov8 that introduces the FasterBlock module and the EMA attention mechanism in FasterNet through step S3 and step S4 is the YOLO-V8-FSE model. After 150 rounds of training, the model with the best effect is obtained. The above method improves the performance and convergence speed of the network and prevents the problems of "gradient explosion" and "gradient disappearance" from occurring. Among them, the dataset labeled in step S2 is divided into a training set, a test set, and a validation set according to a ratio of 7:2:1. This ratio of the dataset provides a balance when the data volume is sufficient, ensuring that the model has enough data for training, and at the same time, there is enough data for model validation and testing.

[0071] The PR curve of the original Yolov8 for broken wire recognition is as Figure 7 As shown in the figure, the PR curve of the improved Yolov8 of the present invention for broken wire recognition is as Figure 8 As shown in the figure. Using the improved Yolov8 for broken wire detection of the doubling twisting machine, the recognition accuracy of broken wires has been significantly improved, with an average increase of about 3%; the detection frame rate of the original Yolov8 is about 4.7 frames, and the improved Yolov8 of the present invention has been increased to about 10.8 frames, and the detection speed has been increased by 130%. The actual detection effect is as Figure 9 As shown in the figure, the detection result marked as "duan" in the figure is the broken wire, and the detection result marked as "xian" is that the yarn is not broken.

[0072] In step S1, by the method of controlling variables, the original variable factors affecting the selection of the detection area are changed in batches, and the relevant parameters are recorded. Then, the noise and redundant information affecting the selected detection area are removed by the principal component analysis method, the main factors affecting the selection of the detection area are determined, and finally the best detection area is selected. The silk thread of the doubling machine is thin, the color is not obvious, the extraction of the broken wire characteristics is difficult and the characteristics diverge, it is difficult to extract the main characteristics affecting the recognition accuracy of the recognition model, and it is easy to carry noise and redundant information to affect the model performance. Among them, the selection of the broken wire detection area of the doubling machine will significantly affect the subsequent feature extraction, and finally affect the performance of the training model and the accuracy of the final recognition detection. Therefore, through the principal component analysis method and the method of controlling variables, the original variables that may affect the selection of the detection area are analyzed as the camera parameters, lens parameters, installation angle of the camera, distance between the camera and the detection area, intensity and installation angle of the supplementary light, moving speed of the inspection robot, and recognition speed of the vision system. By the method of controlling variables, the influencing factors are changed in batches, and the relevant parameters are recorded. Then, the noise and redundant information affecting the selected detection area are removed by the principal component analysis method, the main factors affecting the determination of the detection area are determined as the installation angle of the camera, the moving speed of the inspection robot, and the vision recognition speed, and finally the best detection area is selected, which helps to improve the stability and accuracy of the model.

[0073] In step S1, the following steps are included:

[0074] S11: Data standardization: The data of the original variables are sorted into the original data matrix X. Each row in the original data matrix X represents a sample, and each column represents a feature. First, calculate the mean u j and the standard deviation σ j , where X ij represents the j-th eigenvalue of the i-th sample, n represents the total number of samples, and X i ′ j represents the data after standardization of the j-th eigenvalue of the i-th sample:

[0075]

[0076] Then, each feature is standardized:

[0077]

[0078] S12: Calculate the covariance matrix: For the standardized data matrix X′, calculate the covariance matrix Z:

[0079]

[0080] where X′ T is the transpose of X′, and n represents the total number of samples;

[0081] S13: Solve eigenvalues and eigenvectors: Perform eigen-decomposition on the covariance matrix Z to obtain eigenvalues λ1, λ2, ..., λ P and the corresponding eigenvectors υ1, υ2, ..., υ p , where the eigenvalues and eigenvectors satisfy the following equation:

[0082] Cυ k =λ k υ k

[0083] where k = 1, 2, ..., p, and p represents the number of features;

[0084] S14: Select principal components: Select the first k eigenvectors corresponding to the largest k eigenvalues as the principal components. These principal components can explain most of the variance in the data, and the cumulative variance contribution rate K″″ is calculated as follows:

[0085]

[0086] Select the principal components with a cumulative variance contribution rate reaching 85% - 95%;

[0087] S15: Analyze the relationship between the principal components and the original variables:

[0088] Each principal component PC k is expressed as a linear combination of the original variables:

[0089]

[0090] where υ jk is the j-th element of the k-th eigenvector, X j ′ represents the j-th variable after standardization, p represents the number of features. By analyzing the magnitudes of υ jk , determine the original variables that contribute the most to the principal components;

[0091] S16: Based on the variance contribution rates of the principal components and the relationship between the principal components and the original variables, select the detection area according to multiple principal component factors that have the greatest impact on the selection of the detection area. Finally, select ten new sets of data again to verify the results, ensuring that the identified key factors do have a significant impact on the selection of the detection area, and successfully verifying the accuracy and efficiency of the model.

[0092] Under the inspection environment of the doubling twisting machine, in step S16, the three main component factors that have the greatest impact on the selection of the detection area are the installation angle of the camera, the moving speed of the inspection robot, and the visual recognition speed. The winding roller of the doubling twisting machine is selected as the detection area. At the same time, the installation angle of the camera is determined to be 60° obliquely downward, the speed of the inspection robot is 50 cm / s, and the recognition speed is 0.1 s. Four-way simultaneous detection is carried out. After optimization and acceleration (1024:10 fps, 864:13 fps), at a 50 cm / s inspection speed, recognition is performed every 5 cm. The same section of wire is recognized about 10 times at different angles, and the final wire break detection result is obtained through position constraint and confidence weighting. The above method can successfully reduce the occurrence of difficult example samples, improve the quality of pictures, and facilitate the extraction of subsequent features. Four-way simultaneous detection means that four cameras in different directions of the same inspection robot detect simultaneously.

[0093] In step S2, among the samples captured by the camera of the inspection robot of the doubling twisting machine, there are positive samples, negative samples, and difficult example samples. Appropriate samples are selected from the samples captured by the camera of the inspection robot of the doubling twisting machine, and difficult example samples with overexposure and unclear pictures are excluded, and a data set with a sample size of 6000 - 8000 is marked and made. Among them, positive samples refer to samples without wire breaks, negative samples refer to samples with wire breaks, and difficult example samples refer to samples with overexposure and unclear pictures.

[0094] As Figure 5 shown, in step S4, it includes the following steps:

[0095] S41: Feature grouping: EMA processes the input feature image by means of cross-channel grouping, divides it into G sub-feature maps, where G is much smaller than the number of channels c, learns different semantic information, and each sub-feature map will generate an attention weight descriptor to enhance the feature representation of the region of interest;

[0096] S42: Parallel sub-graphs: Then EMA adopts a parallel sub-graph structure, including two branches: a 1x1 convolution branch and a 3x3 convolution branch. Among them, the 1x1 convolution branch extracts the feature weights in the vertical and horizontal directions respectively through two lines, shares the convolution operation, does not require dimensionality reduction, and directly generates feature vectors in two directions; after these vectors are fitted by the Sigmoid function, they are multiplicatively aggregated with the original feature map to achieve the fusion of direction information and the original features; the 3x3 convolution branch captures multi-scale features through cross-channel interaction and expands the spatial range of the features;

[0097] S43: Cross - spatial learning: Finally, EMA references the information of two channels to achieve cross - spatial information aggregation. The information of the two channels refers to the channel information of the 1x1 convolution branch and the 3x3 convolution branch. Then, 2D global average pooling is used to encode the global spatial information. The 1x1 convolution branch and the 3x3 convolution branch are transformed into dimensional forms, where R1 represents the feature map extracted from the 1x1 convolution branch, R3 represents the feature map extracted from the 3x3 convolution branch, C represents the total number of channels, G represents the number of groups, H represents the height of the feature map, W represents the width of the feature map, HW represents the total number of spatial positions of the feature map, and the operation of 2D global average pooling is as follows:

[0098]

[0099] where, Z c represents the output value of the c - th channel after 2D global average pooling, H represents the height of the feature map, W represents the width of the feature map, H×W represents the total number of spatial positions of the feature map, X c (i, j) represents the feature value of the c - th channel at the position (i, j) in the input feature map;

[0100] The relationship between global information and modeling long - range dependencies is realized.

[0101] In step S4, the Softmax natural non - linear function uses Gaussian mapping to achieve fitting linear changes. The output result is fused through the above - mentioned matrix dot - product operation to obtain the first attention map of EMA. At the same time, in the 3x3 convolution branch, 2D global average pooling is used to encode the global spatial information, and the output of the 1x1 convolution branch line is transformed into dimensional forms to generate the second spatial attention map. This attention map retains the complete and accurate spatial information; Finally, the feature map of each group is calculated as the aggregation of two spatial attention weights, which not only captures the pairwise relationships at the pixel level but also highlights the global context relationships of all pixels.

[0102] So far, the improvement of the Yolov8 model is completed. The Yolov8 that introduces the FasterBlock module and the EMA attention mechanism in FasterNet is named YOLO - V8 - FSE, and the network structure of YOLO - V8 - FSE is as Figure 6 shown.

[0103] To further reduce power consumption, the entire inference process of the YOLO-V8-FSE model is divided into three independent modules: image reading, model inference, and post-processing of detection results. Then, the multi-thread parallel synchronization technology is used to make the threads of the three independent modules of image reading, model inference, and post-processing of detection results run in parallel. Finally, the YOLO-V8-FSE model is deployed on the Jetson Orin NX industrial computer for disconnection detection.

[0104] Inspired by the above ideal embodiments of the present invention, through the above description, relevant staff can completely make various changes and modifications without departing from the technical idea of the present invention. The technical scope of the present invention is not limited to the content in the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A method for detecting broken wire of a two-for-one twisting machine based on improved Yolov8, characterized in that: Based on the images captured by the inspection robot camera, a visual system is introduced into the inspection robot to detect wire breaks, including the following steps: S1: Selection and optimization of the detection area of ​​the two-for-one twister: The original variables that may affect the selection of the detection area are analyzed by principal component analysis and control variable method; S2: Screening image samples taken by the inspection robot’s camera to create a dataset; S3: Forming C2f-Faster optimization structure: Improve the C2f module in the YOLO-V8 network, use the FasterBlock module in FasterNet to replace the BottleNeck module in Yolov8, optimize the C2f module, and form a C2f-Faster structure; S4: Introduce EMA attention mechanism after the split layer: Introduce EMA attention mechanism after the split layer of the FasterBlock module in the network structure to form a C2f-FSE network; S5: Train a suitable model: Use the data set annotated in step S2 to divide it into training set, test set and validation set according to the proportion, use the YOLO-V8-FSE model for training, testing and validation, and the Yolov8 with the FasterBlock module and EMA attention mechanism introduced in steps S3 and S4 is the YOLO-V8-FSE model.

2. The method for dynamically planning the inspection path of a two-for-one twister considering the comfort of personnel as claimed in claim 1, characterized in that: In step S1, the original variable factors affecting the selection of the detection area are changed in batches through the control variable method, and the relevant parameters are recorded; then the noise and redundant information affecting the selected detection area are eliminated through the principal component analysis method, the main factors affecting the selection of the detection area are determined, and finally the best detection area is selected.

3. The method for dynamically planning the inspection path of a two-for-one twister considering the comfort of personnel as claimed in claim 2, characterized in that: Step S1 includes the following steps: S11: Data standardization: The data of the original variables are organized into the original data matrix X. Each row in the original data matrix X represents a sample and each column represents a feature. First, the mean u of each feature is calculated. j and standard deviation σ j , where X ij represents the jth eigenvalue of the i-th sample, n represents the total number of samples, X i ′ j Represents the data after the standardization of the j-th eigenvalue of the i-th sample: Then each feature is normalized: S12: Calculate the covariance matrix: For the standardized data matrix X ′ , calculate the covariance matrix Z: Where X ′T Yes X ′ The transpose of , n represents the total number of samples; S13: Solve eigenvalues ​​and eigenvectors: Perform eigendecomposition on the covariance matrix Z to obtain eigenvalues ​​λ1,λ2,...,λ P and the corresponding eigenvectors υ1,υ2,...,υ p , the eigenvalues ​​and eigenvectors satisfy the following equations: Cu k =λ k u k Where k = 1, 2, ..., p, p represents the number of features; S14: Select principal components: Select the first k eigenvectors with the largest eigenvalues ​​as principal components. These principal components can explain most of the variance in the data, and the cumulative variance contribution rate K ″″ The calculation is as follows: Select the principal components whose cumulative variance contribution rate reaches 85% to 95%; S15: Analyze the relationship between the principal components and the original variables: Each principal component PC k Expressed as a linear combination of the original variables: where υ jk is the jth element of the kth eigenvector, X j j represents the jth variable after standardization, p represents the number of features, and by analyzing υ jk The size of the original variable that contributes most to the principal component is determined; S16: According to the variance contribution rate of the principal component and the relationship between the principal component and the original variable, the detection area is selected according to multiple principal component factors that have the greatest impact on the selection of the detection area.

4. The method for dynamically planning the inspection path of a two-for-one twister considering the comfort of personnel as claimed in claim 3, characterized in that: In the inspection environment of the two-for-one twister, in step S16, the three main component factors that have the greatest impact on the selection of the detection area are the installation angle of the camera, the moving speed of the inspection robot and the visual recognition speed, and the winding roller of the two-for-one twister is selected as the detection area.

5. The method for dynamically planning the inspection path of a two-for-one twister considering the comfort of personnel as claimed in claim 4, characterized in that: At the same time, the camera installation angle is determined to be 60° downward, the speed of the inspection robot is 50 cm / s, and the recognition speed is 0.1 s.

6. The method for dynamically planning the inspection path of a two-for-one twister considering the comfort of personnel as claimed in claim 1, characterized in that: In step S2, suitable samples are selected from the samples taken by the camera of the twister inspection robot, difficult samples with overexposure and unclear images are eliminated, and a data set with a sample capacity of 6000-8000 is annotated and produced.

7. The method for dynamically planning the inspection path of a two-for-one twister considering the comfort of personnel as claimed in claim 1, characterized in that: Step S4 includes the following steps: S41: Feature grouping: EMA processes the input feature image by cross-channel grouping, dividing it into G sub-feature maps, where G is much smaller than the number of channels c, and learns different semantic information. Each sub-feature map generates an attention weight descriptor to enhance the feature representation of the region of interest. S42: Parallel subgraph: EMA then adopts a parallel subgraph structure, which includes two branches: 1x1 convolution branch and 3x3 convolution branch. The 1x1 convolution branch extracts the feature weights in the vertical and horizontal directions through two lines respectively, generating feature vectors in two directions; these vectors are multiplied and aggregated with the original feature map after being fitted by the Sigmoid function to achieve the fusion of directional information and original features; the 3x3 convolution branch captures multi-scale features through cross-channel interaction and expands the spatial range of features; S43: Cross-space learning: Finally, EMA references the information of two channels to achieve cross-space information aggregation. The information of the two channels refers to the channel information of the 1x1 convolution branch and the channel information of the 3x3 convolution branch. Then, 2D global average pooling is used to encode the global spatial information. The 1x1 convolution branch and the 3x3 convolution branch are transformed into dimensional form, where R1 represents the feature map extracted from the 1x1 convolution branch, R3 represents the feature map extracted from the 3x3 convolution branch, C represents the total number of channels, G represents the number of groups, H represents the height of the feature map, W represents the width of the feature map, HW represents the total number of spatial positions of the feature map, and the operation of 2D global average pooling is as follows: Among them, Z c represents the output value of the cth channel after 2D global average pooling, H represents the height of the feature map, W represents the width of the feature map, H×W represents the total number of spatial locations of the feature map, X c (i, j) represents the feature value of the cth channel at position (i, j) in the input feature map; It implements global information and models long-range dependency relationships.

8. The method for dynamically planning the inspection path of a two-for-one twister considering the comfort of personnel as claimed in claim 7, characterized in that: In step S4, the Softmax natural nonlinear function uses Gaussian mapping to fit the linear change and obtain the first attention map of EMA. At the same time, in the 3x3 convolution branch, 2D global average pooling is used to encode the global spatial information, and the output of the 1x1 convolution branch line is converted to dimensional form to generate the second spatial attention map; finally, the feature map of each group is calculated as the aggregation of the two spatial attention weights.

9. The method for dynamically planning inspection paths of a two-for-one twister considering personnel comfort as claimed in claim 1, characterized in that: In step S5, the data set annotated in step S2 is divided into a training set, a test set and a validation set in a ratio of 7:2:

1.

10. The method for dynamically planning inspection paths of a two-for-one twister considering personnel comfort as claimed in claim 1, characterized in that: The entire reasoning process of the YOLO-V8-FSE model is divided into three independent modules: image reading, model reasoning, and post-processing of detection results. Then, multi-threaded parallel synchronization technology is used to make the threads of the three independent modules run in parallel. Finally, the YOLO-V8-FSE model is deployed on the Jetson Orin NX industrial computer for disconnection detection.

Citation Information

Cited By

  • Double-moving-target defect detection method and system

    CN121883434A