CN-122023245-A - Metal surface defect detection method and device
Abstract
The invention provides a method and a device for detecting metal surface defects, which belong to the technical field of defect detection, wherein the method comprises the steps of importing a plurality of original metal surface defect data and original defect real data; the method comprises the steps of respectively carrying out format conversion on original metal surface defect data and original defect real data to obtain converted metal surface defect data and converted defect real data, and respectively carrying out pretreatment on the converted metal surface defect data to obtain pretreated metal surface defect data. The invention reduces the complexity of the model, can better process the multi-scale characteristic information and improves the detection performance of the metal surface defects.
Inventors
- FENG FUJIAN
- YANG WEILI
- SUN LILEI
- HE XING
- HUANG HAN
- WANG YUEJI
- TAN MIAN
- LI CHAO
- CHEN XI
- ZHOU TENGFEI
- HUO YUJIA
- XIA DAWEN
- LIANG YIHUI
Assignees
- 贵州民族大学
Dates
- Publication Date
- 20260512
- Application Date
- 20251222
Claims (10)
- 1. The metal surface defect detection method is characterized by comprising the following steps of: importing a plurality of original metal surface defect data and original defect real data corresponding to the original metal surface defect data; respectively carrying out format conversion on each original metal surface defect data and original defect real data corresponding to each original metal surface defect data to obtain converted metal surface defect data corresponding to each original metal surface defect data and converted defect real data corresponding to each original metal surface defect data; Preprocessing each converted metal surface defect data to obtain preprocessed metal surface defect data corresponding to each original metal surface defect data; Constructing a training model, and carrying out model analysis on the training model through all the converted defect real data and all the preprocessed metal surface defect data to obtain a defect detection model; And importing the metal surface defect data to be detected, and detecting the metal surface defect data to be detected through the defect detection model to obtain a metal surface defect detection result.
- 2. The method of claim 1, wherein the step of preprocessing each of the converted metal surface defect data to obtain preprocessed metal surface defect data corresponding to each of the original metal surface defect data comprises: Performing size normalization processing on the converted metal surface defect data respectively to obtain normalized metal surface defect data corresponding to the original metal surface defect data; Respectively carrying out channel standardization processing on each normalized metal surface defect data to obtain standardized metal surface defect data corresponding to each original metal surface defect data; And respectively carrying out data enhancement processing on the standardized metal surface defect data to obtain preprocessed metal surface defect data corresponding to the original metal surface defect data.
- 3. The method for detecting metal surface defects according to claim 1, wherein the training model comprises a feature analysis network, a feature optimization network, a fusion analysis network and a prediction analysis network; the process of obtaining the defect detection model by carrying out model analysis on the training model through all the converted defect real data and all the preprocessed metal surface defect data comprises the following steps: S41, performing feature analysis on the preprocessed metal surface defect data through the feature analysis network to obtain first metal surface defect features corresponding to the original metal surface defect data; S42, performing feature optimization processing on the first metal surface defect features through the feature optimization network to obtain second metal surface defect features corresponding to the original metal surface defect data; S43, respectively carrying out fusion analysis on the second metal surface defect characteristics through the fusion analysis network to obtain third metal surface defect characteristics corresponding to the original metal surface defect data; s44, respectively carrying out predictive analysis on the third metal surface defect characteristics through the predictive analysis network to obtain metal surface defect prediction results corresponding to the original metal surface defect data; s45, performing loss function calculation on all the metal surface defect prediction results and all the converted defect real data by using an NWD loss function to obtain a loss function; s46, evaluating and analyzing all the metal surface defect prediction results and all the converted defect real data to obtain evaluation accuracy; and S47, judging whether the evaluation precision is greater than or equal to a preset precision, if not, updating parameters of the training model according to the loss function, returning to S41, and if so, taking the training model as a defect detection model.
- 4. The method of claim 3, wherein the signature analysis network comprises a first convolution layer, a first batch of normalization layers, a first SiLU activation function, a maximum pooling layer, a first depth-separable convolution layer, a plurality of DynamicHGBlock modules, a standard convolution layer, a plurality of C3K2 modules, an aligned convolution layer, a Sigmoid activation function, a first 1 x1 convolution layer, and a spatial pyramid pooling layer, the DynamicHGBlock modules comprising a second depth-separable convolution layer, a second batch of normalization layers, a second SiLU activation function, a dynamic convolution layer, an extrusion excitation layer, a first residual connection layer, and a second 1 x1 convolution layer, the C3K2 modules comprising a third 1 x1 convolution layer, a first 3 x 3 convolution layer, a third batch of normalization layers, a third SiLU activation function, a plurality of second residual connection layers, and a fourth 1 x1 convolution layer; the process of S41 includes: Extracting characteristics of the preprocessed metal surface defect data through the first convolution layer to obtain fourth metal surface defect characteristics corresponding to the original metal surface defect data; respectively carrying out normalization processing on the fourth metal surface defect characteristics through the first normalization layer to obtain fifth metal surface defect characteristics corresponding to the original metal surface defect data; mapping the fifth metal surface defect characteristics through the first SiLU activation function to obtain sixth metal surface defect characteristics corresponding to the original metal surface defect data; Respectively carrying out pooling treatment on the sixth metal surface defect characteristics through the maximum pooling layer to obtain seventh metal surface defect characteristics corresponding to the original metal surface defect data; Carrying out convolution treatment on each seventh metal surface defect characteristic through the first depth separable convolution layer to obtain eighth metal surface defect characteristics corresponding to each original metal surface defect data; Performing convolution treatment on the eighth metal surface defect characteristics through the second depth separable convolution layers to obtain ninth metal surface defect characteristics corresponding to the original metal surface defect data; Extracting features of the ninth metal surface defect features through the second convolution layers respectively to obtain tenth metal surface defect features corresponding to the original metal surface defect data; Normalizing the tenth metal surface defect characteristics through the second normalization layer to obtain eleventh metal surface defect characteristics corresponding to the original metal surface defect data; Mapping the eleventh metal surface defect characteristics through the second SiLU activation function to obtain twelfth metal surface defect characteristics corresponding to the original metal surface defect data; Carrying out convolution treatment on the twelfth metal surface defect characteristics through the dynamic convolution layer respectively to obtain thirteenth metal surface defect characteristics corresponding to the original metal surface defect data; weighting the thirteenth metal surface defect characteristics through the extrusion excitation layer to obtain fourteenth metal surface defect characteristics corresponding to the original metal surface defect data; performing feature addition on each eighth metal surface defect feature and a fourteenth metal surface defect feature corresponding to each original metal surface defect data through the first residual error connecting layer to obtain a fifteenth metal surface defect feature corresponding to each original metal surface defect data; Performing dimension adjustment on the fifteenth metal surface defect characteristics through the second 1 multiplied by 1 convolution layer to obtain sixteenth metal surface defect characteristics corresponding to the original metal surface defect data; respectively extracting the characteristics of the sixteenth metal surface defects through the standard convolution layer to obtain seventeenth metal surface defect characteristics corresponding to the original metal surface defect data; Performing dimension adjustment on the seventeenth metal surface defect characteristics through the third 1×1 convolution layer to obtain eighteenth metal surface defect characteristics corresponding to the original metal surface defect data; Extracting features of the eighteenth metal surface defect features through the first 3×3 convolution layer respectively to obtain nineteenth metal surface defect features corresponding to the original metal surface defect data; respectively carrying out normalization processing on the nineteenth metal surface defect characteristics through the third normalization layer to obtain twentieth metal surface defect characteristics corresponding to the original metal surface defect data; mapping the twentieth metal surface defect characteristics through the third SiLU activation function to obtain twenty-first metal surface defect characteristics corresponding to the original metal surface defect data; Performing feature addition on the seventeenth metal surface defect features and the twenty-first metal surface defect features corresponding to the original metal surface defect data through a plurality of second residual error connecting layers to obtain twenty-second metal surface defect features corresponding to the original metal surface defect data; splicing the seventeenth metal surface defect characteristics and twenty-second metal surface defect characteristics corresponding to the original metal surface defect data respectively to obtain twenty-third metal surface defect characteristics corresponding to the original metal surface defect data; performing dimension adjustment on the surface defect characteristics of each twenty-third metal through the fourth 1 multiplied by 1 convolution layer to obtain surface defect characteristics of the twenty-fourth metal corresponding to the surface defect data of each original metal; Performing convolution processing on each sixteenth metal surface defect feature and a twenty-fourth metal surface defect feature corresponding to each original metal surface defect data through the pair Ji Juanji layers to obtain a twenty-fifth metal surface defect feature corresponding to each original metal surface defect data and a twenty-sixth metal surface defect feature corresponding to each original metal surface defect data; respectively splicing the sixteenth metal surface defect characteristics and the twenty-seventh metal surface defect characteristics corresponding to the original metal surface defect data to obtain twenty-seventh metal surface defect characteristics corresponding to the original metal surface defect data; Splicing the twenty-fourth metal surface defect characteristics and the twenty-sixth metal surface defect characteristics corresponding to the original metal surface defect data respectively to obtain twenty-eighth metal surface defect characteristics corresponding to the original metal surface defect data; Mapping the twenty-seventh metal surface defect characteristics and the twenty-eighth metal surface defect characteristics corresponding to the original metal surface defect data respectively through the Sigmoid activation function to obtain twenty-ninth metal surface defect characteristics corresponding to the original metal surface defect data and thirty-first metal surface defect characteristics corresponding to the original metal surface defect data; Respectively carrying out weighted fusion on the twenty-ninth metal surface defect characteristics and thirty-first metal surface defect characteristics corresponding to the original metal surface defect data to obtain thirty-first metal surface defect characteristics corresponding to the original metal surface defect data; Extracting features of the thirty-first metal surface defect features through the first 1×1 convolution layer to obtain thirty-second metal surface defect features corresponding to the original metal surface defect data; and respectively extracting the characteristics of the thirty-second metal surface defects through the space pyramid pooling layer to obtain first metal surface defect characteristics corresponding to the original metal surface defect data.
- 5. A method of metal surface defect detection according to claim 3 wherein the feature optimization network comprises a deformable attention mechanism layer, a first fully connected layer, a third convolution layer, a fourth batch normalization layer, and a fourth SiLU activation function; The process of S42 includes: Performing attention analysis on the first metal surface defect characteristics through the deformable attention mechanism layer to obtain thirty-third metal surface defect characteristics corresponding to the original metal surface defect data; mapping the thirty-third metal surface defect characteristics through the first full-connection layer to obtain thirty-fourth metal surface defect characteristics corresponding to the original metal surface defect data; Performing dimension adjustment on the thirty-fourth metal surface defect characteristics through the third convolution layer to obtain thirty-fifth metal surface defect characteristics corresponding to the original metal surface defect data; Respectively carrying out normalization processing on the thirty-sixth metal surface defect characteristics through the fourth normalization layer to obtain thirty-sixth metal surface defect characteristics corresponding to the original metal surface defect data; And mapping the thirty-fifth metal surface defect characteristics through the fourth SiLU activation function to obtain second metal surface defect characteristics corresponding to the original metal surface defect data.
- 6. The method of claim 5, wherein the deformable attention mechanism layer comprises a third depth separable convolution layer, a layer normalization layer, a GELU activation function layer, and a fifth 1x1 convolution layer; The process of analyzing the attention of each first metal surface defect feature through the deformable attention mechanism layer to obtain a thirty third metal surface defect feature corresponding to each original metal surface defect data includes: Calculating the first metal surface defect characteristics respectively through a first formula to obtain first query characteristics corresponding to the original metal surface defect data, wherein the first formula is as follows: , Wherein, the Is the first First query features corresponding to the original metal surface defect data, Is the first First metal surface defect features corresponding to the original metal surface defect data, A projection matrix is queried; Performing convolution processing on each first query feature through the third depth separable convolution layer to obtain second query features corresponding to each original metal surface defect data; Respectively carrying out normalization processing on each second query feature through the layer normalization layer to obtain a third query feature corresponding to each original metal surface defect data; Mapping the third query features through the GELU activation function layer to obtain fourth query features corresponding to the original metal surface defect data; performing dimension adjustment on each fourth query feature through the fifth 1×1 convolution layer to obtain a spatial offset corresponding to each original metal surface defect data; Obtaining reference points corresponding to the original metal surface defect data from the pre-constructed uniform grid; sampling each reference point and the space offset corresponding to each original metal surface defect data by using a bilinear interpolation algorithm to obtain thirty-seventh metal surface defect characteristics corresponding to each original metal surface defect data; Calculating the thirty-seventh metal surface defect characteristics respectively through a second formula to obtain key characteristics corresponding to the original metal surface defect data, wherein the second formula is as follows: , Wherein, the Is the first Key features corresponding to the original metal surface defect data, Is the first Thirty-seventh metal surface defect features corresponding to the original metal surface defect data, A key projection matrix; Calculating the thirty-seventh metal surface defect characteristics by a third formula to obtain value characteristics corresponding to the original metal surface defect data, wherein the third formula is as follows: , Wherein, the Is the first The value characteristics corresponding to the original metal surface defect data, Is the first Thirty-seventh metal surface defect features corresponding to the original metal surface defect data, A value projection matrix; Coding the thirty-seventh metal surface defect characteristics to obtain thirty-eighth metal surface defect characteristics corresponding to the original metal surface defect data; Splitting each first query feature, key features corresponding to each original metal surface defect data and value features corresponding to each original metal surface defect data according to a preset attention head number to obtain a plurality of query sub-features corresponding to each original metal surface defect data, a plurality of key sub-features corresponding to each original metal surface defect data and a plurality of value sub-features corresponding to each original metal surface defect data; Calculating the first metal surface defect feature, the query sub-features corresponding to the original metal surface defect data, the key sub-features corresponding to the original metal surface defect data, the thirty-eighth metal surface defect feature corresponding to the original metal surface defect data, and the value sub-features corresponding to the original metal surface defect data according to a fourth formula to obtain a thirty-third metal surface defect feature corresponding to the original metal surface defect data, wherein the fourth formula is as follows: , Wherein, the , Wherein, the Is the first Thirty-third metal surface defect features corresponding to the original metal surface defect data, For the processing of the convolutional layer, In order to perform characteristic splicing treatment, Is the first Original metal surface Defect data A first metal surface defect sub-feature corresponding to the attention head, Is the first First metal surface defect features corresponding to the original metal surface defect data, The function is activated for Softmax and, Is the first Original metal surface Defect data The query sub-features corresponding to the attention headers, Is the first Original metal surface Defect data Key sub-features corresponding to the individual attention headers, For the purpose of the transposition, For a single-head attention feature dimension, Is the first Thirty-eighth metal surface defect features corresponding to the original metal surface defect data, Is the first Original metal surface Defect data The value sub-features corresponding to the attention header.
- 7. The method of claim 3, wherein the fusion analysis network comprises a sixth 1 x 1 convolution layer, a fifth normalization layer, a Chunk slice layer, a sixth normalization layer, a seventh 1 x 1 convolution layer, a seventh normalization layer, a second 3 x 3 convolution layer, an eighth normalization layer, a plurality of third 3 x 3 convolution layers, an eighth 1 x 1 convolution layer, and a ninth 1 x 1 convolution layer; the process of S43 includes: performing dimension adjustment on the second metal surface defect characteristics through the sixth 1 multiplied by 1 convolution layer to obtain thirty-ninth metal surface defect characteristics corresponding to the original metal surface defect data; Respectively carrying out normalization processing on the thirty-ninth metal surface defect characteristics through the fifth normalization layer to obtain forty metal surface defect characteristics corresponding to the original metal surface defect data; Splitting each fortieth metal surface defect characteristic through the Chunk slice layer to obtain a second metal surface defect sub-characteristic corresponding to each original metal surface defect data and a third metal surface defect sub-characteristic corresponding to each original metal surface defect data; Respectively carrying out normalization processing on each third metal surface defect sub-feature through the sixth normalization layer to obtain fourth metal surface defect sub-features corresponding to each original metal surface defect data; Performing dimension adjustment on each third metal surface defect sub-feature through the seventh 1 multiplied by 1 convolution layer to obtain a fifth metal surface defect sub-feature corresponding to each original metal surface defect data; respectively carrying out normalization processing on the fifth metal surface defect sub-features through the seventh normalization layer to obtain sixth metal surface defect sub-features corresponding to the original metal surface defect data; extracting features of the third metal surface defect sub-features through the second 3×3 convolution layer respectively to obtain seventh metal surface defect sub-features corresponding to the original metal surface defect data; respectively carrying out normalization processing on each seventh metal surface defect sub-feature through the eighth normalization layer to obtain eighth metal surface defect sub-features corresponding to each original metal surface defect data; Respectively carrying out addition fusion treatment on each fourth metal surface defect sub-feature, a sixth metal surface defect sub-feature corresponding to each original metal surface defect data and an eighth metal surface defect sub-feature corresponding to each original metal surface defect data to obtain a ninth metal surface defect sub-feature corresponding to each original metal surface defect data; extracting features of the ninth metal surface defect sub-features through a first second 3 multiplied by 3 convolution layer to obtain tenth metal surface defect sub-features corresponding to the original metal surface defect data; Respectively extracting features of each tenth metal surface defect sub-feature through a second 3×3 convolution layer, and taking the result of the feature extraction as the input of the next second 3×3 convolution layer until the final second 3×3 convolution layer passes through, so as to obtain eleventh metal surface defect sub-features corresponding to each original metal surface defect data; performing dimension adjustment on each eleventh metal surface defect sub-feature through the eighth 1×1 convolution layer to obtain twelfth metal surface defect sub-features corresponding to each original metal surface defect data; Respectively carrying out splicing treatment on each second metal surface defect sub-feature, a ninth metal surface defect sub-feature corresponding to each original metal surface defect data, a tenth metal surface defect sub-feature corresponding to each original metal surface defect data, an eleventh metal surface defect sub-feature corresponding to each original metal surface defect data and a twelfth metal surface defect sub-feature corresponding to each original metal surface defect data to obtain forty-first metal surface defect features corresponding to each original metal surface defect data; And respectively carrying out dimension adjustment on the forty-first metal surface defect characteristics through the ninth 1 multiplied by 1 convolution layer to obtain third metal surface defect characteristics corresponding to the original metal surface defect data.
- 8. The method of claim 3, wherein the predictive analysis network comprises a fourth convolution layer, a ninth normalization layer, a fifth SiLU activation function layer, a second full-connection layer, a third full-connection layer, a Softmax activation function layer, a fourth full-connection layer, a bounding box regression header, and a non-maximum suppression layer; the process of S44 includes: Extracting the characteristics of the third metal surface defect characteristics through the fourth convolution layer respectively to obtain forty-second metal surface defect characteristics corresponding to the original metal surface defect data; Respectively carrying out normalization processing on the forty-second metal surface defect characteristics through the ninth normalization layer to obtain forty-third metal surface defect characteristics corresponding to the original metal surface defect data; Mapping the forty-third metal surface defect characteristics through the fifth SiLU activation function layer to obtain forty-fourth metal surface defect characteristics corresponding to the original metal surface defect data; mapping the forty-fourth metal surface defect characteristics through the second full-connection layer to obtain forty-fifth metal surface defect characteristics corresponding to the original metal surface defect data; mapping the forty-sixth metal surface defect characteristics through the third full-connection layer to obtain forty-sixth metal surface defect characteristics corresponding to the original metal surface defect data; Predicting the surface defect characteristics of each forty-sixth metal through the Softmax activation function layer to obtain first class probability distribution corresponding to the surface defect data of each original metal; Mapping the first class probability distribution through the fourth full connection layer to obtain a second class probability distribution corresponding to the original metal surface defect data; Predicting each second class probability distribution through the boundary box regression head to obtain a first defect prediction box corresponding to each original metal surface defect data; And screening the first defect prediction frames through the non-maximum value inhibition layer to obtain second defect prediction frames corresponding to the original metal surface defect data and category prediction labels corresponding to the original metal surface defect data, and taking the second defect prediction frames and the category prediction labels corresponding to the original metal surface defect data as metal surface defect prediction results corresponding to the original metal surface defect data.
- 9. The method of claim 8, wherein the converted defect real data includes a defect real bounding box and a category real label, and the process of S46 includes: calculating the cross-over ratio of each second defect prediction frame and the defect real boundary frame corresponding to each original metal surface defect data respectively to obtain the cross-over ratio corresponding to each original metal surface defect data; If the matching of the category prediction label and the category real label is successful, the intersection ratio is larger than or equal to a preset threshold value, and the matching of the category real label and the rest category prediction labels fails, the category prediction label is taken as true positive, so that a plurality of true positives are obtained; Counting the number of all the true positives to obtain the total number of the true positives; If the matching of the category real label and all the category prediction labels fails, taking the category real label as false negative, so as to obtain a plurality of false negatives; counting the number of all the false negatives to obtain the total number of the false negatives; if the matching of the category prediction label and the category real label fails and the intersection ratio is smaller than the preset threshold, the category prediction label is used as false positive, so that a plurality of false positives are obtained; counting the number of all the false positives to obtain the total number of the false positives; Counting the number of all the category real labels to obtain the total number of the category labels; Calculating the total number of true positives, the total number of false negatives, the total number of class labels and the total number of false positives through a fifth formula to obtain evaluation accuracy, wherein the fifth formula is as follows: , Wherein, the , Wherein, the , , Wherein, the In order to evaluate the accuracy of the measurement, As a total number of class labels, Is the first The average accuracy of the individual category labels is, In order to achieve a precision of the precision, In order to achieve the recall ratio, Is the total number of true positives, As a total number of false positives, Is the total number of false negatives.
- 10. A metal surface defect detection apparatus, comprising: the device comprises an importing module, a processing module and a processing module, wherein the importing module is used for importing a plurality of original metal surface defect data and original defect real data corresponding to the original metal surface defect data; the format conversion module is used for respectively carrying out format conversion on each original metal surface defect data and original defect real data corresponding to each original metal surface defect data to obtain converted metal surface defect data corresponding to each original metal surface defect data and converted defect real data corresponding to each original metal surface defect data; the pretreatment module is used for respectively carrying out pretreatment on the converted metal surface defect data to obtain pretreated metal surface defect data corresponding to the original metal surface defect data; The model analysis module is used for constructing a training model, and carrying out model analysis on the training model through all the converted defect real data and all the preprocessed metal surface defect data to obtain a defect detection model; the importing module is also used for importing the data of the metal surface defects to be detected; And the detection result obtaining module is used for detecting the metal surface defect data to be detected through the defect detection model to obtain a metal surface defect detection result.
Description
Metal surface defect detection method and device Technical Field The invention mainly relates to the technical field of defect detection, in particular to a method and a device for detecting defects on a metal surface. Background With the rapid development of the fields of chip manufacturing, composite materials, automobile and aviation manufacturing, etc., the demand for high-precision metal materials is rapidly increasing. However, in the field of metal material production, the need for intelligent flow manufacturing is particularly urgent. Therefore, the high-precision metal material detection method is important to an automatic quality inspection process. In recent years, in order to reduce quality inspection cost and improve production efficiency, researchers have proposed various automated high-precision metal material detection methods. For example, chu et al propose a method based on a combination of an improved gray level co-occurrence matrix and a Support Vector Machine (SVM), which successfully achieves an effective classification of scratches and pit defects on the steel surface. Yang et al combine Local Binary Pattern (LBP) feature extraction with Extremum Learning Machine (ELM) classification, through combining feature extraction methods such as Local Binary Pattern (LBP) and scale-invariant feature transformation, the detection performance of cold-rolled strip steel surface defects is remarkably improved. Shalma et al propose a new method for texture defect detection using statistical features and a bionic algorithm, which uses GLCM and GLRLM of texture to extract texture features of images and uses bat algorithm to perform feature selection, thereby improving the overall accuracy of the defect detection system. The automatic detection method based on the traditional machine vision combines the traditional image processing technology and the machine learning algorithm, improves the detection efficiency, reduces the labor cost, and makes great progress in texture feature description and rule defect detection. However, the method excessively depends on manual design characteristics, has the problems of subjective factor interference and insufficient scene adaptability, and is difficult to adapt to detection requirements of defect type diversification and scene complexity in industrial scenes. Therefore, the applicability of the conventional detection method in the actual industrial scene is greatly limited in the face of the defect situations of more complexity and more irregular morphology. With the rapid development of deep learning technology, the CNN-based surface defect detection method gradually overcomes the limitations of traditional machine vision. According to network architecture, the surface defect detection method based on CNN can be roughly divided into two types, namely a two-stage detection algorithm and a one-stage detection algorithm. The two-stage detection algorithm mainly comprises FastRCNN, FASTER RCNN, mask RCNN and other algorithms. The operation mechanism is that a series of candidate frames are generated firstly, then feature extraction operation is carried out on the contents covered by the candidate frames, and on the basis, target regression processing is further carried out on the contents of the corresponding areas. Currently, two-stage inspection methods have been widely used in surface defect inspection research. For example, zhang et al skillfully combine the domain adaptation principle to construct a CNN model DA-ACNN, which has the capability of automatically learning the surface defect characteristics of steel, and provides an effective new way for detecting the surface defect of the steel. Yin et al introduced a Feature Pyramid Network (FPN) based on FASTER RCNN to enable the model to effectively fuse deep and shallow feature information, and introduced a method called multilayer RoI alignment to solve the problem of the extreme aspect ratio in steel surface samples making detection more difficult. Song et al combine deformation convolution and region alignment, significantly improving FASTER RCNN detection performance of complex and irregular shape defects on the steel surface. However, although the detection accuracy of the two-stage detection algorithm is high, partial detection speed is lost due to the fact that candidate frames need to be screened first, and real-time detection requirements in the industrial production process are difficult to meet. In contrast, the one-stage detection algorithm discards the screening process of the candidate frame, treats the classification and identification process as a regression process, and combines the positioning and classification tasks based on the regression algorithm. The method mainly comprises SSD, YOLO, retinaNet algorithm and a target detection algorithm DETR based on a transducer. The one-stage detection method has a faster real-time detection speed than the two-stage detection method. With the continu