Search

CN-122023231-A - Deep learning-based laser cleaning spinneret plate quality detection method and system

CN122023231ACN 122023231 ACN122023231 ACN 122023231ACN-122023231-A

Abstract

A method and a system for detecting the quality of a laser cleaning spinneret plate based on deep learning, which automatically detect the cleaning quality of the spinneret plate by adopting a YOLOv n deep learning model, introduce a CBAM attention mechanism and ASFF self-adaptive feature fusion into a YOLOv n model, improve the detection stability by adopting a method of weighted average, multi-angle fusion, template matching and local feature comparison, verify and optimize the model by a 5-fold cross verification method, call a verification data set, define a small target recall rate of key performance indexes, and guide the parameter adjustment of the model by quantifying the difference between a prediction result and a real label by an improved CloU loss function so as to improve the detection precision. The invention can not only carry out quality detection through the improved YOLOv n deep learning model and effectively improve the detection precision, but also quantify the difference between the predicted result and the true mark, and guide the parameter adjustment of the model so as to improve the detection precision.

Inventors

  • WANG JUN
  • ZOU YANG
  • ZHANG QINGLE
  • ZHANG CHI
  • CHEN YONGKANG
  • WANG CHENYU
  • GONG YUE
  • ZHANG YIYUAN
  • Ye yuanyang
  • Xiong Zilu

Assignees

  • 武汉纺织大学

Dates

Publication Date
20260512
Application Date
20251205

Claims (10)

  1. 1. A laser cleaning spinneret plate quality detection method based on deep learning is characterized in that, The quality detection method comprises the following steps: S1, acquiring a history spinneret plate image subjected to laser cleaning, preprocessing to obtain a preprocessed history image, constructing a deep learning model, and training the deep learning model based on the preprocessed and marked history image to obtain a trained deep learning model; s2, acquiring a spinneret plate image after actual laser cleaning, and performing quality detection based on a trained deep learning model to obtain a preliminary result; S3, performing multi-angle fusion, template matching and local feature comparison on the preliminary result to obtain a final detection result; s4, inputting the final detection result into a monitoring system to obtain a visual quality detection result.
  2. 2. The method for detecting the quality of the laser cleaning spinneret plate based on deep learning according to claim 1, wherein, In the step S1, the preprocessing step includes: denoising, illumination balancing and color normalization, facula and highlight area removal, surface texture enhancement, geometric transformation and image correction, and feature extraction and enhancement are carried out on historical image data under different illuminations and different angles; for spinneret plate images under different illumination, converting the images from RGB to Lab color space, performing histogram equalization or local self-adaptive histogram equalization treatment on a brightness channel, and then converting back to RGB; Correcting the images of the spinneret plates with different angles by adopting perspective transformation and affine transformation, correcting the images with different angles to a uniform viewing angle, and performing histogram equalization and CLAHE processing after correcting the angles; Classifying and labeling the processed historical image data according to the spinneret plate state, wherein the labeling categories are an image of an unplugged spinneret plate, an image of a partially plugged spinneret plate and an image of a large-area plugged spinneret plate; For the image of the non-blocking spinneret plate, removing random noise by adopting median filtering of a 3×3 window, performing self-adaptive histogram equalization on the image, performing image correction, and adjusting to a proper pixel; For the partial blockage spinneret plate image, performing denoising treatment by adopting self-adaptive median filtering, wherein a3×3 window is adopted when the local area texture variance is greater than or equal to a set threshold value, and a5×5 window is adopted when the local area texture variance is less than the set threshold value, so as to ensure that the detail information of the blockage area is not blurred; the method comprises the steps of carrying out denoising processing by adopting median filtering, ensuring that detailed information in a part of a blocking area is not blurred, adopting CLAHE to enhance local contrast, especially the periphery of the blocking area, utilizing edges to detect edge characteristics of the blocking area of a protruding part, and simultaneously adopting a local binary pattern to extract texture characteristics; And when the large-area blocking area is accompanied with local high light or shadow, performing brightness adjustment through local self-adaptive histogram equalization processing and gamma correction, enhancing blocking edges and texture details by using Gaussian filtering, and extracting LBP characteristics.
  3. 3. The method for detecting the quality of the laser cleaning spinneret plate based on deep learning according to claim 1, wherein, In the step S1, the step of constructing the deep learning model comprises the following steps: Dividing the preprocessed image data into a training set, a verification set and a test set; Constructing a deep learning model based on an improved YOLOv n model architecture, wherein the improved YOLOv n model architecture comprises a backbone network optimization and a feature fusion network improvement; The backbone network optimization comprises embedding CBAM attention mechanism in a C2F module of YOLOv n model architecture for strengthening key texture features and blocking area response, adopting depth separable convolution to replace an original Conv module so as to reduce the quantity of parameters and enhance the small target feature extraction capability, and outputting three layers of feature images including a P3 layer feature image, a P4 layer feature image and a P5 layer feature image by the optimized backbone network; the P3 layer feature map is a high-resolution feature layer, and the resolution is 80 multiplied by 80; the P4 layer feature map is a medium resolution feature layer, and the resolution is 40 multiplied by 40; the P5 layer feature map is a low-resolution feature layer, and the resolution is 20 multiplied by 20; The three-layer feature graphs are used as the input of a subsequent feature fusion network together and are used for multi-scale feature expression and judgment; The improvement of the feature fusion network comprises the steps of constructing a 4-layer Micro-Neck structure, wherein the resolution of an output feature map of each layer of Micro-Neck structure is 160×160, 80×80, 40×40 and 20×20 respectively, and ASFF self-adaptive feature fusion is introduced into PANet; The Micro-Neck structure realizes the layer-by-layer upsampling and downsampling fusion of the features through a modularized and parallelized miniature convolution block; The first layer of Micro-Neck structure is a high-resolution input fusion layer and is used for receiving a P3 layer characteristic image output by a backbone network, expanding the P3 layer characteristic image by 2 times to 160X 160 through bilinear upsampling to enhance space detail expression, introducing 1X1 convolution Micro-Block to conduct channel refining on the upsampled characteristic image, compressing the number of channels to 1/4, and then embedding depth separable convolution with the kernel size of 3X 3 and the step length of 1 into the Micro-Block to extract fine grain texture characteristics and reduce the calculated amount; The Micro-Neck structure of the first layer fuses the upsampling feature with an auxiliary high-resolution edge enhancement branch through residual connection, and the formula is: ; In the above formula, F1 is the output of the Micro-Neck structure of the first layer, P3 is the P3 layer feature map, the resolution of the P3 layer feature map is 80×80, I is the input image, Is a learnable weight; the second layer of the Micro-Neck structure is a medium-high resolution fusion layer, and the input resolution is 80x80; Using pixel re-arrangement PixelShuffle, downsampling by a scaling factor of 0.5 scales the output F1 of the Micro-Neck structure of the first layer to 80x80, adds to the P3 layer original features of the backbone network, inputs a 3x3 convolution Micro-Block, and applies a spatial attention sub-module, and the fusion formula includes: ; in the above formula, F2 is the output of the Micro-Neck structure of the second layer, P3 is a P3 layer feature map, the resolution of the P3 layer feature map is 80×80, Representing element-by-element multiplication; Concat () represents feature channel stitching, downsample () represents spatial downsampling operations for feature layer resolution reduction, SPATIALATTN () represents spatial attention mechanism module that achieves significant region enhancement by weighting the spatial dimensions of the feature map; The Micro-Neck structure of the third layer is a medium resolution fusion layer, and the input resolution is 40x40; downsampling the output of the Micro-Neck structure of the second layer to 40×40, adding the downsampled output with the P4 layer of the backbone network, and expanding the receptive field by 5×5 expansion convolution Micro-Block, and fusing the multiscale context, wherein the downscaled method comprises the following steps: ; In the above formula, F3 is the output of the Micro-Neck structure of the third layer, For expanding convolution function, expanding convolution receptive field and enhancing multi-scale characteristic expression under the condition of keeping resolution unchanged, P4 is a P4 layer characteristic diagram, the resolution of the P4 layer characteristic diagram is 40 multiplied by 40, For the cross-layer residual weights, Further downsampling of the layer 1 output; The fourth layer of the Micro-Neck structure is a low-resolution output layer, and the output resolution is 20x20; Downsampling the output F3 of the Micro-Neck structure of the third layer to reduce the spatial resolution to 20 multiplied by 20, fusing the output F3 with the P5 layer of the backbone network, and realizing final channel alignment and channel refining through 1 multiplied by 1 convolution Micro-Block to obtain the output F4 of the Micro-Neck structure of the fourth layer, wherein the fusion formula is as follows: ; In the above formula, P5 is a P5 layer feature map, the resolution of the P5 layer feature map is 20×20, and the layer integrates global semantics to ensure the robustness of the overall spinneret plate state classification; the output F4 of the four-layer Micro-Neck structure is output to a detection head to calculate classification and regression loss; training is carried out by selecting a pre-trained YOLOv n model, the model is verified and optimized through a 5-fold cross verification method after training is finished, 20% of verification data sets are called, and the small target recall rate of key performance indexes is defined, wherein the expression is as follows: ; In the above-mentioned method, the step of, Is the recall rate of the key performance index small target, The number of pixels of the target occlusion region that are correctly detected for the model; the number of pixels for the actual occlusion region that the model fails to detect; the loss function of the deep learning model is as follows: ; In the above-mentioned method, the step of, B is a prediction frame, wherein the prediction frame is obtained by regression of a detection head according to the output characteristic F4 of the fourth layer Micro-Neck; the method comprises the steps of obtaining a real frame, wherein the real frame is a manually marked blocking area boundary frame in a preprocessed and marked spinneret plate image; c is the diagonal length of the minimum bounding frame which simultaneously envelops the predicted frame and the real frame and is used for distance normalization, v is the length-width ratio consistency measurement of the predicted frame and the real frame; the small target punishment coefficient is used for enhancing the detection sensitivity of the micro blocking area; after training is completed, the final optimized YOLOv n model weight is saved, and a deep learning model after training is completed is obtained through the final optimized YOLOv n model weight, the improved YOLOv n model architecture and the loss function.
  4. 4. The method for detecting the quality of the laser cleaning spinneret plate based on deep learning according to claim 3, wherein, In the step S1, the training phase comprises a pre-training phase and a fine-tuning phase; the pre-training stage comprises the steps of loading yolov8n.pt official weights, freezing backbone network parameters, training by using a AdamW optimizer, setting the learning rate of the AdamW optimizer, and training a Micro-Neck structure and a detection head part; the fine tuning stage is specifically to defrost all network layers, start Swish an activation function, use a Cosine annealing learning rate scheduling training, and set an initial learning rate and a minimum learning rate of the Cosine annealing learning rate scheduling training.
  5. 5. The method for detecting the quality of the laser cleaning spinneret plate based on deep learning according to claim 1, wherein, In the step S2, uniformly adjusting the spinneret plate image subjected to actual laser cleaning to 640 x 640 pixels, carrying out illumination equalization, denoising and geometric correction treatment on the adjusted spinneret plate image, and reducing noise labeling difference to obtain a treated image; Inputting the processed image into a trained deep learning model, realizing multi-scale feature fusion through multi-layer convolution and a feature pyramid structure, and capturing fine defect features in the image; outputting boundary frame parameters of each candidate region and corresponding category confidence in the model reasoning process; Carrying out regression and classification on a defect area possibly existing in the image by adopting a preset anchor frame mechanism; Each candidate region is assigned a defect class label that includes normal, partial occlusion, large area occlusion, and a corresponding confidence score; removing the repeated detection and low confidence coefficient candidate areas by adopting a non-maximum suppression algorithm; And (3) after the optimization processing of a non-maximum suppression algorithm, obtaining a preliminary result, wherein the preliminary result is a detection result of the boundary frame coordinates, the defect types and the confidence scores of each defect area.
  6. 6. The method for detecting the quality of the laser cleaning spinneret plate based on deep learning according to claim 1, wherein, In the step S3, a weighted average strategy is adopted to fuse the detection results of all angles; The weighted average strategy is to use the confidence coefficient of each candidate area as a weight to perform fusion processing on the boundary boxes of the same or adjacent defect areas, and comprises the following steps: The candidate region matching includes, for detection results of images of respective angles, using The function is matched with the same or adjacent defect areas, wherein the defect areas are boundary boxes of the same pore canal blocked at different angles, if loU is larger than 0.6, the defect areas are regarded as the same area, a candidate group G k is formed, k=1 to M, M is the total defect group number, and if loU is smaller than or equal to 0.6, the defect areas are regarded as different areas; the confidence coefficient of each candidate region comprises that the trained deep learning model outputs the confidence coefficient c i of the candidate frame of each angle i as an initial weight ; The adjustment of the adaptation reliability, namely introducing an angle reliability factor r i , and calculating based on shooting metadata: ; In the above-mentioned method, the step of, In order to take a picture of the included angle, Normalized for illumination standard deviation when High reliability is achieved; The final weight normalization formula is: ; In the above-mentioned method, the step of, As the final weight of the angle i, The initial weight of the candidate box confidence c i for angle i, As a factor of the reliability of the angle i, The initial weight of the candidate box confidence c j for angle j, As a reliability factor for the angle j, Calculating for an expected value; The fusion processing of the bounding box comprises the following steps of The center coordinates (x, y) of the middle frame and the width and height (w, h) are weighted and averaged: ; ; ; ; In the above-mentioned method, the step of, To the center x coordinate of the fused object bounding box, To the center y coordinate of the fused object bounding box, To the width of the target bounding box after fusion, To the height of the fused object bounding box, Normalized weights for the i-th candidate detection result, The center x coordinate of the bounding box for the i-th candidate detection result, The y-coordinate of the center of the bounding box for the i-th candidate detection result, The height of the bounding box of the ith candidate detection result; Confidence fusion into Wherein Mean reliability within a group; template matching and local feature comparison are carried out on the suspected defect area, and a comprehensive score is obtained; The template matching comprises the steps that for each candidate defect area, after preliminary boundary frame positioning, a global template matching algorithm is adopted to compare the candidate area with a preset standard template, and the algorithm calculates the matching score between the candidate area and the template; If the matching score is higher than a preset threshold, the candidate region is considered to have higher similarity with the standard template in the overall appearance; The local feature comparison comprises the steps of extracting key points and local descriptors in a local feature extraction area from a candidate area by adopting a local binary pattern; The feature descriptors extracted from the candidate regions are matched with descriptors of corresponding regions in a preset standard template; calculating by adopting Euclidean distance, cosine similarity or Hamming distance measurement, and further confirming that the candidate region is a real defect if the proportion of the matched local feature pairs reaches a preset standard; The comprehensive score refers to weighted combination of the score matched by the global template and the matching proportion compared by the local feature to form a final matching score, when the comprehensive score exceeds a set final judging threshold, the candidate region is confirmed to have the defect feature and enters a subsequent result output flow, otherwise, the region is rejected; When the comprehensive score exceeds a set final judgment threshold value, the candidate region is confirmed as a true defect region, and the bounding boxes of all confirmed defect regions and corresponding class labels thereof are output as a final detection result.
  7. 7. The method for detecting the quality of the laser cleaning spinneret plate based on deep learning according to claim 1, wherein, In the S4, the multi-mode data comprises spinneret plate image data, mechanical arm posture information and illumination intensity signals acquired in the S2 stage, a multi-mode data synchronous acquisition and transmission mechanism is adopted, a visible light and near infrared two-channel video stream is synchronously acquired through a communication protocol, the frame rate is ensured to be not lower than 25fps, the time stamp alignment and transmission scheduling of the multi-source data are realized by adopting a communication frame, the synchronous error is ensured to be less than 1ms, and the time sequence consistency of the visual data and sensing signals in the detection process is ensured; based on the multi-angle detection result and the mechanical arm posture data, reconstructing a three-dimensional structure of the spinneret plate surface by adopting a motion restoration structure algorithm, and obtaining corresponding point cloud data; The point cloud data comprise the space coordinates of each sampling point on the surface of the spinneret plate and the corresponding blockage confidence coefficient; Constructing a real-time updated three-dimensional quality thermodynamic diagram based on the point cloud data, intuitively displaying the spatial distribution and the blocking degree of the defect area by using color or heat gradient, and establishing a hierarchical alarm mechanism according to the distribution density and the confidence level of the defect area in the thermodynamic diagram; classifying the final detection result according to the classified alarm mechanism to obtain alarm information corresponding to the final detection result, and packaging the alarm information to form a visual quality detection result.
  8. 8. The laser cleaning spinneret plate quality detection system based on deep learning is characterized by being used for executing the laser cleaning spinneret plate quality detection method based on deep learning according to any one of claims 1 to 7, and specifically comprises a model construction module, a preliminary detection module, a final detection module and a result output module; the model construction module is used for collecting a history spinneret plate image subjected to laser cleaning, preprocessing to obtain a preprocessed history image, constructing a deep learning model, and training the deep learning model based on the preprocessed and marked history image to obtain a trained deep learning model; The preliminary detection module is used for collecting spinneret plate images after actual laser cleaning, and carrying out quality detection based on a trained deep learning model to obtain a preliminary result; The final detection module is used for performing multi-angle fusion, template matching and local feature comparison on the preliminary result to obtain a final detection result; The result output module is used for converting the final detection result into a visual quality detection result.
  9. 9. The laser cleaning spinneret plate quality detection device based on deep learning is characterized by comprising a memory and a processor, wherein the memory is used for storing computer program codes and transmitting the computer program codes to the processor; The processor is configured to execute the laser cleaning spinneret quality detection method based on deep learning according to any one of claims 1 to 7 according to instructions in the computer program code.
  10. 10. A computer program product comprising a computer program, characterized in that the computer program is executed by a processor for performing the deep learning based laser cleaning spinneret quality detection method according to any one of claims 1 to 7.

Description

Deep learning-based laser cleaning spinneret plate quality detection method and system Technical Field The invention relates to a spinneret plate quality detection method, in particular to a laser cleaning spinneret plate quality detection method and system based on deep learning. Background The spinneret plate is taken as an important component in the production process of the textile industry, the cleanliness of the spinneret plate directly influences the quality and the production efficiency of products, and in the use process, problems such as blockage, dirt or damage often occur due to the small aperture of the nozzle, and the problems seriously influence the performance and the working efficiency of the spinneret plate, so that the periodical cleaning work is very important. At present, quality detection of a spinneret plate after cleaning mostly depends on manual visual inspection or a traditional image processing technology. The methods are not only inefficient, but also are susceptible to interference from human factors, and cannot realize real-time and automatic quality detection on a production line. In addition, the traditional image processing method has weak recognition capability on complex image background and fine defects on the surface of a spinneret plate, and is difficult to meet the diversified requirements in mass production. Along with the rapid development of artificial intelligence and deep learning technology, an image recognition method based on deep learning is gradually introduced into the field of quality detection, particularly in the aspects of object detection and defect recognition, YOLO is used as an efficient real-time object detection algorithm, and remarkable application effects are obtained in a plurality of fields. Although this spinneret quality detection method can efficiently detect the spinneret quality, it still has the following drawbacks: 1. In the prior art, the bounding box fusion is usually carried out by adopting simple average, so that the detection precision of a small-size target existing on a spinneret plate is lower. 2. The adaptability to different illumination, angles and blockage types is poor. The disclosure of this background section is only intended to increase the understanding of the general background of the application and should not be taken as an admission or any form of suggestion that this information forms the prior art that is already known to a person of ordinary skill in the art. Disclosure of Invention The invention aims to overcome the defects of lower detection precision and poorer adaptability of a small-size target in the prior art, and provides a laser cleaning spinneret plate quality detection method and system based on deep learning, which have higher detection precision and higher adaptability. In order to achieve the above object, the technical solution of the present invention is: A quality detection method of a laser cleaning spinneret plate based on deep learning comprises the following steps: S1, collecting a history spinneret plate image subjected to laser cleaning, performing marking and preprocessing to obtain a preprocessed history image, constructing a deep learning model, and training the deep learning model based on the preprocessed and marked history image to obtain a trained deep learning model; s2, acquiring a spinneret plate image after actual laser cleaning, and performing quality detection based on a trained deep learning model to obtain a preliminary result; S3, performing multi-angle fusion, template matching and local feature comparison on the preliminary result to obtain a final detection result; and S4, outputting a visual quality detection result through a monitoring system. In the step S1, the preprocessing step includes: denoising, illumination balancing and color normalization, facula and highlight area removal, surface texture enhancement, geometric transformation and image correction, and feature extraction and enhancement are carried out on historical image data under different illuminations and different angles; for spinneret plate images under different illumination, converting the images from RGB to Lab color space, performing histogram equalization or local self-adaptive histogram equalization treatment on a brightness channel, and then converting back to RGB; Correcting the images of the spinneret plates with different angles by adopting perspective transformation and affine transformation, correcting the images with different angles to a uniform viewing angle, and performing histogram equalization and CLAHE processing after correcting the angles; Classifying and labeling the processed historical image data according to the spinneret plate state, wherein the labeling categories are an image of an unplugged spinneret plate, an image of a partially plugged spinneret plate and an image of a large-area plugged spinneret plate; For the image of the non-blocking spinneret plate, removing random no