Chemical fiber spinning cake defect detection device and method

By adopting the Detr series detection scheme and RT-Detr model in chemical fiber cake defect detection, combined with laser and track baffle device, the problems of low detection accuracy and dependence on picture quality in the existing detection methods are solved, and high accuracy is achieved and real-time defect detection effects.

CN119067916APending Publication Date: 2024-12-03ZHEJIANG UNIV OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411003310.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing chemical fiber cake defect detection methods have the problem of simple detection models, pursuing speed but ignoring accuracy, resulting in many missed and missed detection phenomena, and relying on picture quality, low-quality pictures lead to the problem of not identifying defect targets.

Method used

Design a chemical fiber filament cake defect detection device, adopt Detr series detection scheme combined with improved RT-Detr model, use laser and track baffle devices to realize the classification of good and defective products, and improve detection through self-attention mechanism and IOU loss optimization accuracy and real-time.

Benefits of technology

It achieves improvements in real-time and accuracy, surpasses the performance of YOLOS and DETRS models, is suitable for defect detection in complex industrial scenarios, and reduces missed and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067916A_ABST
    Figure CN119067916A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of textile defect detection, and discloses a chemical fiber spinning cake defect detection device and method.The chemical fiber spinning cake defect detection device is firstly built, then defect-containing image information is collected and used for deep network model training, then a chemical fiber spinning cake defect neural network detection model is built, training is carried out through collected data, and a chemical fiber spinning cake defect detection result is obtained. And importing the trained model into a chemical fiber spinning cake defect visual detection device, and carrying out defect detection on the chemical fiber spinning cake in the industrial field. According to the chemical fiber defect detection device, the detection scheme of a Detr series is adopted, the laser and the track baffle device which are simple in cost are adopted, and classification of good products and inferior-quality products is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of textile defect detection, and in particular to a device and method for detecting defects in chemical fiber cakes. Background Art

[0002] With the continuous upgrading of my country's textile production technology, the chemical fiber industry continues to develop rapidly. Due to its advantages such as high strength and low density, it is widely used in national defense, aerospace, biomedicine and other fields. At present, my country's chemical fiber output accounts for more than two-thirds of the world's total; however, due to the excessive processing speed, uneven tension, insufficient false twisting and other conditions in the processing technology, there will be certain defects on the surface of the produced packages. The appearance defects mainly include hairy silk, tripped silk, mesh silk, dirty silk, poor formation, no tail, multiple tails, stiff silk, damaged paper tube, broken ends, upper tail silk, etc. Dirty silk, tripped silk and poor formation are the three most common defects.

[0003] In addition, for the method of detecting defects in chemical fiber yarn cakes, the technical solutions that are closer to the present invention include: Invention Patent Application Number: CN202210867261.8, Name: Method for detecting appearance defects of chemical fiber yarn cakes based on improved YOLOV5, using the improved yolov5 model. This method uses a single-stage detection model, and has poor detection effect on small target objects such as looped wires and tripped wires, and cannot meet the complex detection requirements of industrial defect detection scenarios.

[0004] Invention patent application number: CN202310813505.9, name: A method and system for online defect detection of chemical fiber filaments, which uses traditional machine learning methods for detection, which relies on high-quality image data. For some areas where target defects are not obvious, due to the small differences, they will be filtered by the set threshold, resulting in missed detection.

[0005] In summary, current similar solutions all have certain problems: 1) The detection model is relatively simple, and the pursuit of detection speed ignores the accuracy of the model, resulting in multiple missed detections and false detections; 2) The use of simple detection strategies and artificial setting of thresholds lead to an increase in missed detections; 3) Reliance on image quality, low image quality leads to the inability to identify defective targets. Summary of the invention

[0006] In order to overcome the deficiencies in the prior art, the present invention provides a chemical fiber cake defect detection device and method.

[0007] The technical solution of the present invention is as follows:

[0008] A chemical fiber cake defect detection device, the device comprising a chemical fiber ingot, a first laser system, a conveyor belt, a detection chassis, a second laser system, an edge computing unit, a defective product conveying track, a third laser system, a first track baffle, a fourth laser system and a good product conveying channel;

[0009] The conveyor belt is used to transport the chemical fiber spindles;

[0010] The chemical fiber ingot comprises a silk cake tray and a chemical fiber silk cake;

[0011] The detection chassis is set on the conveyor belt, which is used to collect pictures and input them into the edge computing unit for detection; the detection chassis includes a second laser system, a side camera group, a light source group, an upper and lower camera group and a mechanical clamp;

[0012] The defective product conveying track and the good product conveying channel are respectively located downstream of the conveyor belt (behind the conveying direction);

[0013] The first track baffle is arranged on the conveyor belt and is located at the rear of the detection cabinet, and the defective products can be guided into the defective product conveying track through the first track baffle;

[0014] A first laser system is arranged at the exit of the detection chassis to detect whether the chemical fiber spindle passes through the detection chassis;

[0015] A third laser system is provided on the defective product conveying track to count the number of defective products;

[0016] A fourth laser system is provided on the good product conveying track for counting the number of good products.

[0017] The steps of using the detection device to perform defect detection include the following:

[0018] Step 1.1: Place the chemical fiber spindle to be tested on the conveyor belt and enter the testing machine box along the conveyor belt;

[0019] Step 1.2: The chemical fiber spindles enter the detection box along the conveyor belt. When the second laser system detects that there is a spinning cake entering the detection box, the conveyor belt stops operating;

[0020] Step 1.3: The mechanical clamp above the detection chassis descends to clamp the upper straight tube of the chemical fiber spindle, driving the silk cake to rotate a certain angle to capture a full-view of the silk cake. While rotating, the light source group lights up, and the side camera group and the upper and lower camera groups capture the image of the silk cake to be detected, and the collected pictures are input into the edge computing unit for detection;

[0021] Step 1.4: After the shooting is completed, the mechanical clamp rises, the light source group turns off, the conveyor belt resumes operation, and the chemical fiber spindle continues to move forward along the track. The first laser system is located at the exit of the detection box and is used to detect whether the yarn cake device has left the detection box;

[0022] Step 1.5: Perform the next operation according to the test result, specifically: if the test result is defective, the first track baffle rotates a certain angle inward into the track with the left end as the fulcrum to guide the defective product into the defective product conveying track, and the third laser system located on the defective product conveying track detects the defective product entering the track and records the number of defective products. At the same time, the first track baffle is reset and rotated out of the track; on the contrary, if the test result is good, the chemical fiber spindle enters the good product conveying track, and the fourth laser system located on the good product conveying track will count the number of good products;

[0023] Based on the above content, repeat step 1.1 to detect the next silk cake until the detection task is completed.

[0024] A method for detecting defects in chemical fiber cakes comprises the following steps:

[0025] Step 1: Build a chemical fiber yarn cake defect detection device;

[0026] Step 2: Dataset collection and processing;

[0027] Step 3: Construct a neural network detection model for chemical fiber yarn cake defects;

[0028] Step 4: Apply the chemical fiber yarn cake defect neural network detection model to detect chemical fiber yarn cake defects.

[0029] Furthermore, the data set collection and processing method of step 2 is performed as follows: collect defect images, annotate the data, and pre-process the data using rotation, translation, noise addition and cropping methods. Finally, divide the data according to a certain ratio to obtain a training set, a validation set and a test set.

[0030] Furthermore, in step three, a neural network detection model for chemical fiber cake defects is constructed by using the following steps:

[0031] Step 3.1: Use Backbone to extract features from the sample images collected in step 2 and output feature vectors;

[0032] Step 3.2: Encode: The feature vector is mixed encoded by the encoder to obtain the encoding vector;

[0033] Step 3.3: Decode: Input the encoded vector into the decoder to predict and output the coordinates and category information of the target object;

[0034] Furthermore, in step 3.1, the input image of size (bs, size, size, 3) in feature extraction is passed through the backbone network of Resnet50 to obtain its feature map, where bs is the size of batchsize and size is the image size; specifically, after backbone, feature maps S5, S4, and S3 are obtained, where the feature map output by the third stage of backbone is denoted as S3, the feature map output by the fourth stage is denoted as S4, and the feature map output by the fifth stage is denoted as S5;

[0035] Furthermore, the Encode encoding in step 3.2 performs mixed encoding on the S3, S4, and S5 feature maps, specifically:

[0036] Step 3.2.1: Upsample the top-level S5 feature map in sequence and fuse it with the feature maps of S4 and S3, then gradually downsample it and fuse it with the feature maps of S4 and S5 to generate the feature matrix f5;

[0037] Step 3.2.2: Expand the feature map of f5 into feature embedding vectors Q, K and V according to formulas (1) and (2), and input Q, K and V into the attention module to obtain the encoding vector F5;

[0038] Step 3.2.3: According to formula (3), the obtained F5 is mixed with S4 and S3 through the CCFM module, and the model finally outputs the encoding vector Output;

[0039] Q=K=V=Flatten(f5) (1)

[0040] F5=reshape(Attn(Q,K,V)) (2)

[0041] Output=CCFM({S3,S4,F5}) (3)

[0042] Among them, Flatten means flattening the feature map into a query vector, Attn means performing self-attention operation, reshape means adjusting the output dimension, and CCFM means hybrid coding module;

[0043] Furthermore, the Decode in step 3.3 is performed as follows:

[0044] Step 3.3.1: Select k features from the feature sequence output by the encoder as query vectors; use formula (4) as the loss function of the model to perform target optimization, and select and output top=k query vectors q1 and top=k prediction boxes b1 according to formula (5);

[0045]

[0046]

[0047] Among them, L box represents the coordinate loss, L cls represents the category loss, and y represent the prediction and true value respectively, y = {c, b}, c and b represent the category and bounding box respectively, IOU is the IOU loss added to the category loss, λ is the regularization parameter, selectQ means that k query vectors are selected after passing through multiple multi-layer perceptron modules, and selectR means that k prediction boxes are selected after passing through multiple multi-layer perceptron modules;

[0048] Step 3.3.2: To accelerate the convergence of training, add noise to the real box, add category and coordinate noise respectively, generate c2 and b2, and concatenate c2 and q1 vectors into class label embedding according to formula (6), denoted as q c According to formula (7), b1 and b2 are concatenated into an anchor box, denoted as q a According to formula (8), q a After the multi-layer perceptron, we get q d , according to formula (9), Q, K, V are input into the deformable multi-head self-attention module;

[0049] q c =concat(c2,q1) (6)

[0050] q a =concat(b1,b2) (7)

[0051] q d =MLP(q a ) (8)

[0052]

[0053] Among them, concat represents the concatenation operation of vectors, add represents the addition operation of vectors, and MLP is a multi-layer perceptron layer;

[0054] Step 3.3.3: According to formula (10), Q, K, V are input into the deformable multi-head self-attention module, and the result matrix result is output. According to formula (11), the predicted object category information predict_class and coordinate information predict_boxes are output;

[0055] result=DMSA(Q,K,V) (10)

[0056]

[0057] Among them, DMSA represents deformable multi-head self-attention operation, Linear represents linear layer, and MLP represents multi-layer perceptron layer.

[0058] The advantages of the present invention are: designing and building a chemical fiber defect detection device, adopting the Detr series detection scheme, and using a low-cost laser and track baffle device to achieve the classification of good and defective products; in this experimental method, an improved RT-Detr model is used for detection to achieve end-to-end detection of defects. This method reaches or even exceeds the YOLOS and DETRS models in terms of real-time and accuracy indicators; improving the self-attention mechanism part: utilizing the receptive fields of different feature maps, upsampling and downsampling the S5, S4, and S3 feature maps of different scales obtained through the backbone are fused, and then self-attention is performed, which can contain richer and deeper semantic information and is more suitable for target objects of different sizes and shapes; introducing the IOU score into the objective function of the classification branch, in order to solve the problem that the IOU loss is too large, which leads to a large influence of the IOU in the optimization target, the IOU loss part is improved, and a regularization parameter λ is set to achieve consistency constraints on sample classification and positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a top view of the structure of the chemical fiber cake defect detection device;

[0060] Figure 2 This is a schematic diagram of the structure of the chemical fiber spindle in the chemical fiber cake defect detection device;

[0061] Figure 3 This is the internal structure diagram of the detection box in the chemical fiber yarn cake defect detection device;

[0062] Figure 4 This is an overview of the structure of the neural network model for chemical fiber cake defects;

[0063] Figure 5 for Figure 4 The structure diagram of CCFM in the Encoder part;

[0064] Figure 6 for Figure 5 The structure diagram of the Fusion module in CCFM in the Encoder part;

[0065] In the figure: 1. Chemical fiber ingot; 2. First laser system; 3. Conveyor belt; 4. Detection chassis; 5. Second laser system; 6. Edge computing unit; 7. Defective product conveying track; 8. Third laser system; 9. First track baffle; 10. Fourth laser system; 11. Good product conveying track; 12. Chemical fiber cake tray; 13. Chemical fiber cake; 14. Side camera group; 15. Light source group; 16. Upper and lower camera group; 17. Mechanical clamp. DETAILED DESCRIPTION

[0066] The device and technical solution of the present invention are further described below by way of embodiments and in conjunction with the accompanying drawings:

[0067] A method for detecting defects in chemical fiber cakes, specifically comprising:

[0068] Step 1: Build a chemical fiber yarn cake defect detection device;

[0069] Step 2: Dataset collection and processing;

[0070] Step 3: Construct a neural network detection model for chemical fiber yarn cake defects;

[0071] Step 4: Apply the chemical fiber yarn cake defect neural network detection model to detect chemical fiber yarn cake defects.

[0072] like Figure 1 As shown, the defect detection device for chemical fiber cakes in step 1 is composed of a chemical fiber spindle 1, a first laser system 2, a conveyor belt 3, a detection chassis 4, a second laser system 5, an edge computing unit 6, a defective product conveying track 7, a third laser system 8, a first track baffle 9, a fourth laser system 10, and a good product conveying channel 11; the chemical fiber spindle 1 is composed of a spindle tray 12 and a chemical fiber spindle 13; the detection chassis 4 is composed of a second laser system 5, a side camera group 14, a light source group 15, an upper and lower camera group 16 and a mechanical clamp 17. The steps of using the detection device to perform defect detection include the following:

[0073] Step 1.1: Figure 2 As shown, the chemical fiber spindle 1 to be tested is placed on a conveyor belt 3 and enters a testing machine box 4 along the conveyor belt;

[0074] Step 1.2: Figure 3 As shown, the chemical fiber spindle 1 enters the detection box 4 along with the conveyor belt 3. When the second laser system 5 detects that a silk cake has entered the detection box 4, the conveyor belt 3 stops operating.

[0075] Step 1.3: The mechanical clamp 17 above the detection chassis descends, clamps the upper straight tube of the chemical fiber spindle 1, and drives the silk cake to rotate at an angle of 200 degrees. The camera group located in the chassis can capture the full range of the silk cake. While rotating, the light source group 15 lights up, and the side camera group 14 and the upper and lower camera group 16 capture the image of the silk cake to be detected, and input the collected image to the edge computing unit 6 for detection;

[0076] Step 1.4: After the shooting is completed, the mechanical clamp 17 rises, the light source group 15 turns off, the conveying device starts to run, and the chemical fiber spindle 1 moves forward along the track. The first laser system 2 is located at the exit of the detection box to detect whether the chemical fiber spindle passes through the detection box;

[0077] Step 1.5: Perform the next operation according to the detection result, specifically: if the detection result is defective, the first track baffle 9 will rotate 30 degrees into the track with the left end as the fulcrum to guide the defective product into the defective product conveying track 7. When the third laser system 8 detects that the defective product has entered the track and counts, the first track baffle 9 is reset and rotated out of the track; otherwise, if the detection result is good, the chemical fiber spindle 1 enters the good product conveying track 11, and the fourth laser system 10 counts the number of good products;

[0078] Based on the above content, repeat step 1.1 to detect the next silk cake until the detection task is completed.

[0079] The data set collection and processing method of step 2 is performed as follows: collect defect images, then annotate the data, and pre-process the data using rotation, translation, noise addition and cropping methods. Finally, divide the image data in a ratio of 7:2:1 to obtain the training set, validation set and test set respectively.

[0080] The model structure of step 3 is as follows Figure 4 As shown in the figure, the following steps are used to build a neural network detection model for chemical fiber cake defects:

[0081] Step 3.1: Use Backbone to extract features from the sample images collected in step 2 and output feature vectors;

[0082] In step 3.1, in feature extraction, input an image of size (bs, size, size, 3), and obtain its feature map through the Resnet50 backbone network, where bs is the batch size and size is the image size; size is selected from a list of sizes specified by the user, such as [256, 512, 576, 614]. This method will select the size of 576 as an example, so the size of the image input is (bs, 576, 576, 3);

[0083] Specifically, after the backbone, feature maps S5, S4, and S3 are obtained. The feature map output by the third stage of the backbone is recorded as S3, with a size of (bs, 512, 72, 72), the feature map output by the fourth stage is recorded as S4, with a size of (bs, 1024, 36, 36), and the feature map output by the fifth stage is recorded as S5, with a size of (bs, 2048, 18, 18);

[0084] Step 3.2: Encode: The feature vector is mixed encoded by the encoder to obtain the encoding vector;

[0085] The Encode encoding in step 3.2 performs mixed encoding on the S3, S4, and S5 feature maps, specifically:

[0086] Step 3.2.1: Upsample the top-level S5 feature map in sequence and fuse it with the feature maps of S4 and S3, then gradually downsample it and fuse it with the feature maps of S4 and S5 to generate the feature matrix f5;

[0087] Step 3.2.2: Expand the feature map of f5 into feature embedding vectors Q, K and V according to formulas (1) and (2), and input Q, K and V into the attention module to obtain the encoding vector F5;

[0088] Step 3.2.3: According to formula (3), the obtained F5 is mixed with S4 and S3 through the CCFM module, as shown in Figure 5 ,6 shows the structure diagram of CCFM module and the structure diagram of Fusion module in CCFM module. The model finally outputs the encoding vector Output;

[0089] Q=K=V=Flatten(f5) (1)

[0090] F5=reshape(Attn(Q,K,V)) (2)

[0091] Output=CCFM({S3,S4,F5}) (3)

[0092] Among them, Flatten means flattening the feature map into a query vector, Attn means performing self-attention operation, reshape means adjusting the output dimension, and CCFM means hybrid coding module;

[0093] Step 3.3: Decode: Input the encoded vector into the decoder to predict and output the coordinates and category information of the target object;

[0094] Step 3.3.1: Select a specified number of k features from the feature sequence output by the encoder as the query vector;

[0095] According to formula (4) as the loss function of the model, target optimization is performed, and according to formula (5), top=k query vectors q1 and top=k prediction boxes b1 are selected and output, where k=300;

[0096]

[0097]

[0098] Among them, L box represents the coordinate loss, L cls represents the category loss, and y represent the prediction and true value respectively, y = {c, b}, c and b represent the category and bounding box respectively, IOU is the IOU loss added to the category loss, λ is the regularization parameter, λ = 0.8, selectQ means that k = 300 query vectors are selected after multiple multi-layer perceptron modules, selectR means that k = 300 prediction boxes are selected after multiple multi-layer perceptron modules;

[0099] Step 3.3.2: To accelerate the convergence of training, add noise to the real box, add category and coordinate noise respectively, generate c2 and b2, and concatenate c2 and q1 vectors into class label embedding according to formula (6), denoted as q c According to formula (7), b1 and b2 are concatenated into an anchor box, denoted as q a According to formula (8), q a After the multi-layer perceptron, we get q d , according to formula (9), Q, K, V are input into the deformable multi-head self-attention module;

[0100] q c =concat(c2,q1) (6)

[0101] q a =concat(b1,b2) (7)

[0102] q d =MLP(q a ) (8)

[0103]

[0104] Among them, concat represents the concatenation operation of vectors, add represents the addition operation of vectors, and MLP is a multi-layer perceptron layer;

[0105] Step 3.3.3 Input Q, K, V into the deformable multi-head self-attention module according to formula (10), output the result matrix result, and output the predicted object category information predict_class and coordinate information predict_boxes according to formula (11);

[0106] result=DMSA(Q,K,V) (10)

[0107]

[0108] Among them, DMSA represents deformable multi-head self-attention operation, Linear represents linear layer, and MLP represents multi-layer perceptron layer.

[0109] The contents described in the embodiments of this specification are merely an enumeration of implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.

Claims

1. A chemical fiber cake defect detection device, characterized in that: It includes a chemical fiber spindle, a conveyor belt, a defective product conveying track, a good product conveying channel, a detection chassis, an edge computing unit and a first track baffle; The chemical fiber spindle comprises a spindle cake tray and a chemical fiber spindle cake arranged on the spindle cake tray; The defective product conveying track and the good product conveying channel are respectively located at the downstream position of the conveyor belt; The detection chassis is arranged on the conveyor belt, and is used to collect pictures and input them into the edge computing unit for detection. The detection chassis is provided with a second laser system, a side camera group, a light source group, an upper and lower camera group, and a mechanical clamp; The first track baffle is arranged on the conveyor belt and is located at the rear of the detection cabinet, and the defective products can be guided into the defective product conveying track through the first track baffle; A first laser system is arranged at the exit of the detection chassis to detect whether the chemical fiber spindle passes through the detection chassis; A third laser system is provided on the defective product conveying track for counting the number of defective products; A fourth laser system is provided on the good product conveying track for counting the number of good products.

2. A method for detecting defects in chemical fiber cakes, characterized in that: The steps include: Step 1: constructing the chemical fiber cake defect detection device as claimed in claim 1; Step 2: Dataset collection and processing; Step 3: Construct a neural network detection model for chemical fiber yarn cake defects; Step 4: Apply the chemical fiber yarn cake defect neural network detection model to perform chemical fiber yarn cake defect detection.

3. The method for detecting defects in chemical fiber cakes according to claim 2, characterized in that: The chemical fiber cake defect detection device in step 1 works as follows: Step 1.1: Place the chemical fiber spindle to be tested on the conveyor belt and enter the testing machine box along the conveyor belt; Step 1.2: The chemical fiber yarn ingots enter the detection box along the conveyor belt. When the second laser system detects that a yarn cake has entered the detection box, the conveyor belt stops operating; Step 1.3: The mechanical clamp above the detection chassis descends, clamps the upper straight tube of the chemical fiber spindle, and drives the silk cake to rotate at a set angle to capture a full-view of the silk cake. While rotating, the light source group lights up, and the side camera group and the upper and lower camera groups capture the image of the silk cake to be detected, and the collected images are input into the edge computing unit for detection; Step 1.4: After the shooting is completed, the mechanical clamp rises, the light source group turns off, the conveyor belt resumes operation, and the chemical fiber spindle continues to move forward along the track. The first laser system is located at the exit of the detection box and is used to detect whether the yarn cake device has left the detection box; Step 1.5: Perform the next operation according to the detection result. If the detection result is defective, the first track baffle rotates a predetermined angle inward into the track with the left end as the fulcrum to guide the defective product into the defective product conveying track. The third laser system located on the defective product conveying track detects the defective product entering the track, records the number of defective products, and resets the first track baffle at the same time; On the contrary, if the test result is good, the chemical fiber ingot enters the good product conveying track, and the fourth laser system located on the good product conveying track will count the number of good products; Repeat step 1.1 to detect the next chemical fiber cake until the detection task is completed.

4. The method for detecting defects in chemical fiber cakes according to claim 2, characterized in that: The data set collection and processing process of step 2 is as follows: The images of defects are collected, the data are annotated, and the data are preprocessed by using rotation, translation, noise addition and cropping methods. Finally, the data is divided according to the set ratio to obtain the training set, verification set and test set.

5. The method for detecting defects in chemical fiber cakes according to claim 2, characterized in that: The process of constructing the neural network detection model for chemical fiber cake defects in step 3 is as follows: Step 3.1: Use Backbone to extract features from the sample images collected in step 2 and output feature vectors; Step 3.2: Encode: The feature vector is mixed encoded by the encoder to obtain the encoding vector; Step 3.3: Decode: Input the encoded vector into the decoder to predict and output the coordinates and category information of the target object.

6. A method for detecting defects in chemical fiber cakes according to claim 5, characterized in that: The image with an input size of {bs, size, size, 3} in the feature extraction of step 3.1 is passed through the backbone network of Resnet50 to obtain its feature map, where bs is the size of batchsize and size is the image size; after passing through the backbone, S5, S4, and S3 feature maps are obtained, where the feature map output through the third stage of backbone is denoted as S3, the feature map output through the fourth stage is denoted as S4, and the feature map output through the fifth stage is denoted as S5.

7. A method for detecting defects in chemical fiber cakes according to claim 6, characterized in that: The Encode encoding in step 3.2 performs mixed encoding on the S3, S4, and S5 feature maps, and the process is as follows: Step 3.2.1: Upsample the top-level S5 feature map in sequence and fuse it with the feature maps of S4 and S3, then gradually downsample it and fuse it with the feature maps of S4 and S5 to generate the feature matrix f5; Step 3.2.2: Expand the feature map of f5 into feature embedding vectors Q, K and V according to formulas (1) and (2), and input Q, K and V into the attention module to obtain the encoding vector F5; Step 3.2.3: According to formula (3), the obtained F5 is mixed with S4 and S3 through the CCFM module, and the model finally outputs the encoding vector Output; Q=K=V=Flatten(f5) (1) F5=reshape(Attn(Q,K,V)) (2) Output=CCFM({S3,S4,F5}) (3) Among them, Flatten means flattening the feature map into a query vector, Attn means performing self-attention operation, reshape means adjusting the output dimension, and CCFM means hybrid coding module.

8. The method for detecting defects in chemical fiber cakes according to claim 5, characterized in that: The Decode process of step 3.3 is as follows: Step 3.3.1: Select k features from the feature sequence output by the encoder as query vectors; use formula (4) as the loss function of the model to perform target optimization, and select and output top=k query vectors q1 and top=k prediction boxes b1 according to formula (5); Among them, L box represents the coordinate loss, L cls represents the category loss, and y represent the prediction and true value respectively, y = {c, b}, c and b represent the category and bounding box respectively, IOU is the IOU loss added to the category loss, λ is the regularization parameter, selectQ means that k query vectors are selected after passing through multiple multi-layer perceptron modules, and selectR means that k prediction boxes are selected after passing through multiple multi-layer perceptron modules; Step 3.3.2: To accelerate the convergence of training, add noise to the real box, add category and coordinate noise respectively, generate c2 and b2, and concatenate c2 and q1 vectors into class label embedding according to formula (6), denoted as q c According to formula (7), b1 and b2 are concatenated into an anchor box, denoted as q a According to formula (8), q a After the multi-layer perceptron, we get q d , according to formula (9), Q, K, V are input into the deformable multi-head self-attention module; q c =concat(c2,q1) (6) q a =concat(b1,b2) (7) q d =MLP(q a ) (8) Among them, concat represents the concatenation operation of vectors, add represents the addition operation of vectors, and MLP is a multi-layer perceptron layer; Step 3.3.3: According to formula (10), Q, K, V are input into the deformable multi-head self-attention module, and the result matrix result is output. According to formula (11), the predicted object category information predict_class and coordinate information predict_boxes are output; result=DMSA(Q,K,V) (10) Among them, DMSA represents deformable multi-head self-attention operation, Linear represents linear layer, and MLP represents multi-layer perceptron layer.

Citation Information

Patent Citations

  • Device for on-line detection and classification of fiber tripping defects of chemical fiber spindles and detection and classification method thereof

    CN109454006A

  • Chemical fiber spinning cake appearance defect detection method based on improved YOLOV5

    CN115222705A

  • Tool delivery quality detection method

    CN116721054A

  • Human-object interaction detection method based on multi-scale deformable Transform network

    CN116758298A

  • Spinning cake defect detection integrated equipment with rapid classification function

    CN116990312A