A strip surface defect detection method based on YOLO-DSC

By introducing dynamic serpentine convolution, depthwise separable convolution, and adaptive channel attention mechanism into the YOLO model, the YOLO model for surface defect detection of strip and sheet materials is improved, solving the problems of insufficient detection accuracy and speed, and realizing efficient real-time detection.

CN122434828APending Publication Date: 2026-07-21CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2026-03-30
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing YOLO models lack sufficient accuracy in detecting elongated defects on the surface of sheet and strip materials. Furthermore, the complex network structure and numerous parameters of the models make them difficult to deploy on resource-constrained mobile and edge devices, thus failing to meet the requirements for real-time online detection.

Method used

The YOLO model is improved by introducing the dynamic snake-shaped convolution DSConv module, the depthwise separable convolution DWconv module, and the adaptive channel attention mechanism AECA module to enhance detection accuracy and speed.

Benefits of technology

It significantly improves the detection accuracy and positioning accuracy of elongated defects, reduces the number of model parameters and computational load, makes the model more lightweight on embedded devices, enhances the anti-interference recognition capability in complex industrial backgrounds, and meets the needs of real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434828A_ABST
    Figure CN122434828A_ABST
Patent Text Reader

Abstract

The application provides a strip surface defect detection method based on YOLO-DSC, and the specific steps are as follows: collecting surface defect images in actual strip rolling production field, establishing a surface defect dataset after labeling; introducing a dynamic snake convolution DSConv module based on the YOLO model, remodeling the convolution kernel dynamically, adjusting the learning deformation, and strengthening the feature extraction of the long strip-shaped defects of the model; introducing a deep separable convolution DWconv module to reduce the model parameter quantity and improve the model detection speed; introducing an adaptive channel attention mechanism AECA module in the neck, further enhancing the image information features through a dynamic convolution weight generation mechanism, obtaining a YOLO-DSC model; determining the training rounds, training using the dataset, and inputting the defect image to be detected into the model for testing. The method provided by the application significantly improves the strip surface defect detection precision, especially the long strip-shaped defects, while maintaining a high detection speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence target detection, specifically to a method for detecting surface defects in strip and sheet materials based on YOLO-DSC. Background Technology

[0002] As core basic materials for pillar industries of the national economy such as metallurgy, automobiles, home appliances, and aerospace, the surface quality of sheet and strip materials directly determines the performance, structural safety, and market competitiveness of products. Traditional inspection methods, mainly based on manual visual inspection, contact inspection, and simple machine vision, are no longer suitable for the pace and quality standards of modern production.

[0003] Currently, visual inspection methods for surface defects in sheet and strip materials can be categorized into two types based on technology: those based on traditional image processing and those based on deep learning. Traditional image processing methods rely on manually designed feature extraction algorithms to preprocess and identify defects in sheet and strip surface images. These methods are suitable for scenarios with simple defect types and backgrounds, but they exhibit poor adaptability to complex defects, lighting variations, and noise, and their generalization ability is limited. In contrast, deep learning-based surface defect detection methods, using models such as deep convolutional neural networks (CNNs) and Transformers as their core, do not require manual feature design. They can autonomously learn deep defect features from large amounts of labeled data, effectively identifying complex, subtle, and diverse surface defects. They possess strong anti-interference capabilities and superior generalization performance, and have become the mainstream development direction.

[0004] Current mainstream deep learning detection algorithms can be divided into two categories according to their processing modes. One category is the two-stage detection algorithm based on candidate regions, represented by the R-CNN series, and the other category is the single-stage detection algorithm based on regression, represented by the SSD and YOLO series.

[0005] While two-stage object detection algorithms offer advantages in detection accuracy, their inference speed is insufficient to meet the real-time requirements of industrial scenarios, limiting their practicality in high-speed production line environments. Single-stage object detection algorithms, such as YOLO, predict object bounding boxes and class confidence through direct regression, achieving end-to-end inference while maintaining detection speed.

[0006] However, the YOLO model currently has the following shortcomings in the field of surface defect detection of sheet and strip materials:

[0007] (1) Although the YOLO model-based method for detecting surface defects in strips and sheets has achieved good detection results for overall defects, the detection accuracy for individual long strip defects still needs to be improved.

[0008] (2) Current models often have complex network structures and a large number of parameters. This leads to increased demand for storage and computing resources, making it more difficult to deploy on resource-constrained mobile and edge devices, and making it difficult to meet the requirements of real-time online detection of strips and boards. The detection speed of the models still needs to be improved.

[0009] Therefore, there is an urgent need for an improved technical solution to address the above shortcomings. Summary of the Invention

[0010] To address the shortcomings of existing methods, this invention provides a YOLO-DSC-based method for detecting surface defects in strip and sheet materials. This model introduces a dynamic serpentine convolution DSConv module, a depthwise separable convolution DWconv module, and an adaptive channel attention mechanism AECA module into the YOLO model to overcome deficiencies in detection accuracy and speed.

[0011] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting surface defects in sheet and strip materials based on YOLO-DSC, the specific steps of which are as follows:

[0012] Step S1: Collect surface defect images at the strip rolling production site, have professional inspection technicians annotate the defect images, establish a surface defect image dataset TA-strip for different types of defects, and divide the dataset into training set, test set and validation set.

[0013] Step S2: Based on the YOLO model, a dynamic serpentine convolution DSConv module is introduced into the backbone network. By dynamically reshaping the convolution kernel and adjusting the learning deformation through offset, the model's feature extraction for elongated defects is enhanced. The steps of the dynamic serpentine convolution DSConv module's convolution kernel deformation are as follows:

[0014] The standard 3×3 convolution kernel is constructed using the following formula:

[0015]

[0016] The formula for calculating the coordinates along the x-axis is:

[0017]

[0018] The formula for calculating the coordinates along the y-axis is:

[0019]

[0020] Among them, deformation offset , , These represent the deformation offsets on the x-axis and y-axis, respectively. Indicates the horizontal distance from the center grid. ;

[0021] Step S3: Introduce the depthwise separable convolutional (DWconv) module into the backbone network to lighten the backbone network, reduce the number of model parameters, and improve the model detection speed.

[0022] Step S4: Introduce the Adaptive Channel Attention (AECA) module in the neck area and introduce a dynamic convolution weight generation mechanism to further enhance the features of the image information and obtain the YOLO-DSC model.

[0023] Step S5: Determine the number of training rounds for the YOLO-DSC model in step S4, train it using the TA-strip dataset established in step S1, and input the defect image to be detected into the trained network model for testing.

[0024] Preferably, in step S1, the images collected from the actual production site are high-resolution images. After manual cropping, they are classified and labeled according to six types of defects: inclusions, wrinkles, perforations, black spots, small bright spots, and pits, and finally a TA-strip titanium strip surface defect dataset is constructed.

[0025] Preferably, in step S1, the TA-strip dataset is divided after image preprocessing and denoising. The denoised dataset is divided into a training set, a test set, and a validation set in a ratio of 8:1:1.

[0026] Preferably, in step S2, the YOLOv11 model is improved by introducing the dynamic snake convolution DSConv module into the backbone network. Specifically, the C3k2 module is introduced and replaces the bottleneck layer Bottleneck module to form the C3k2-DSC module, and then it replaces the C3k2 module before the SPPF module of the backbone network.

[0027] Preferably, in step S3, the depthwise separable convolution (DWconv) module is also introduced into the backbone network, replacing the first three ordinary convolutional (Conv) modules after the defect image input. The specific steps of the depthwise separable convolution are as follows:

[0028] Step S3.1: Input the feature map into the DWconv module with height H, width W, and initial number of channels C;

[0029] Step S3.2, Depth Convolution: Perform spatial convolution on each input channel independently using a 3×3×1 convolution kernel to extract local features without mixing channel information. At this time, the height is H, the width is W, and the initial number of channels is C.

[0030] Step S3.3, pointwise convolution: Then, the spatial features of each channel output by the depthwise convolution are fused through a 1×1×C1 standard convolution to achieve dimensionality increase or decrease of the number of channels, making up for the channel fusion shortcomings of the depthwise convolution. C1 is the number of output channels. At this time, the height is H, the width is W, and the initial number of channels is C1.

[0031] Step S3.4: Output the feature map as the input of the next module, with a height of H, a width of W, and an initial number of channels of C1.

[0032] Preferably, in step S4, an adaptive channel attention mechanism (AECA) module is introduced into the neck region. This module is an improvement upon the efficient channel attention mechanism (ECA) module by introducing a dynamic convolution mechanism, resulting in the YOLO-DSC model. The specific steps of the AECA module are as follows:

[0033] Step S4.1, transfer the feature map Input the AECA module;

[0034]

[0035] Where R represents the set of real numbers, B is the batch size in model training, C is the number of channels, which is also the number of feature maps, and H and W are the height and width of the feature map, respectively.

[0036] Step S4.2, process the feature map Global average pooling is applied to the input feature map along the spatial dimension, as shown in the following equation, to obtain the global average value of the feature map for each channel. ;

[0037]

[0038] Step S4.3: Channel compression is performed on the pooling result through the first one-dimensional convolutional layer to generate an intermediate feature map. As shown in the following formula;

[0039]

[0040] The squeeze operation is used to remove dimensions of size 1, while the transpose operation is used to rearrange the dimensional order of the feature tensor.

[0041] Step S4.4: The intermediate feature map is transformed using a second one-dimensional convolutional layer, and the final output is adaptive weights. As shown in the following formula;

[0042]

[0043] Step S4.5: Calculate the channel attention weights using one-dimensional convolution with an efficient channel attention mechanism. As shown in the following formula;

[0044]

[0045] Step S4.6, adjust the channel attention weights. The dynamic adjustment is performed using the following formula, along with the generated adaptive weights. By combining these, adaptive channel attention weights can be obtained. ;

[0046]

[0047] Step S4.7, adjust the adaptive channel attention weights. The Sigmoid activation function is used to restrict the results to within [0, 1], which are then used as the final attention weights. ;

[0048]

[0049] Step S4.8: Multiply the input feature map element by the attention weights. Obtain feature map And use it as input for the next module.

[0050]

[0051] Where R represents the set of real numbers, B is the batch size in model training, C is the number of channels, which is also the number of feature maps, and H and W are the height and width of the feature maps, respectively.

[0052] Preferably, in step S5, the number of training rounds is set to 200, and the evaluation metrics include precision, recall, mean precision, FPS, number of parameters, etc.

[0053] The beneficial effects of this invention are as follows:

[0054] (1) The YOLO-DSC method provided by the present invention introduces the dynamic snake convolution DSCconv module, and with the help of dynamic reshaping of the convolution kernel shape, offset adjustment and adaptive learning deformation, it can better match the structural changes of the input feature map, and can more effectively capture the subtle local features of long strip defects on the surface of the plate and strip, and significantly improve the detection accuracy and localization accuracy of such complex defect categories.

[0055] (2) The YOLO-DSC method provided by this invention introduces the depthwise separable convolution (DWconv) module, which decomposes the standard convolution into two steps: depthwise convolution and pointwise convolution. While maintaining the original detection accuracy and feature extraction capability of the model as much as possible, it significantly compresses the number of model parameters and computational load, effectively improves the forward inference speed of the model, makes the model more lightweight on embedded and other edge devices, and significantly enhances the convenience and applicability of actual engineering deployment.

[0056] (3) The YOLO-DSC method provided by this invention improves upon the efficient channel attention ECA module by introducing the adaptive channel attention mechanism AECA module. With the help of the dynamic convolution weight adaptive generation mechanism, it enhances the model's ability to extract key features, strengthens the anti-interference recognition ability of sheet and strip surface defects in complex industrial background, and comprehensively improves the detection accuracy and robustness of various defects. Attached Figure Description

[0057] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0058] Figure 1 This is a flowchart of the YOLO-DSC-based surface defect detection method for strip and sheet materials according to the present invention.

[0059] Figure 2 This is a structural diagram of the YOLO-DSC model of the present invention.

[0060] Figure 3 This is a structural diagram of the C3k2-DSC module in the YOLO-DSC-based method for detecting surface defects in strips and plates according to the present invention.

[0061] Figure 4 This is a flowchart of the depth-separable convolution process in the YOLO-DSC-based method for detecting surface defects in strips and sheets according to the present invention.

[0062] Figure 5 This is a structural diagram of the adaptive channel attention mechanism in the YOLO-DSC-based method for detecting surface defects in strips and plates according to the present invention. Detailed Implementation

[0063] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.

[0064] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0065] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0066] This invention provides a method for detecting surface defects in sheet and strip materials based on YOLO-DSC. Figure 1 This is a flowchart of a YOLO-DSC-based method for detecting surface defects in strip and sheet materials, provided in an embodiment of the present invention. Figure 2 This is a structural diagram of the YOLO-DSC model provided in an embodiment of the present invention. See also... Figure 1 and Figure 2 The method of the present invention includes the following steps:

[0067] The standard 3×3 convolution kernel is constructed using the following formula:

[0068]

[0069] The formula for calculating the coordinates along the x-axis is:

[0070]

[0071] The formula for calculating the coordinates along the y-axis is:

[0072]

[0073] Among them, deformation offset , , These represent the deformation offsets on the x-axis and y-axis, respectively. Indicates the horizontal distance from the center grid. ;

[0074] Step S3: Introduce the depthwise separable convolutional (DWconv) module into the backbone network to lighten the backbone network, reduce the number of model parameters, and improve the model detection speed.

[0075] Step S4: Introduce the Adaptive Channel Attention (AECA) module in the neck area and introduce a dynamic convolution weight generation mechanism to further enhance the features of the image information and obtain the YOLO-DSC model.

[0076] Step S5: Determine the number of training rounds for the YOLO-DSC model in step S4, train it using the TA-strip dataset established in step S1, and input the defect image to be detected into the trained network model for testing.

[0077] In step S1, the images collected from the actual production site are high-resolution images. After manual cropping, they are classified and labeled by professional technicians according to six types of defects: inclusions, wrinkles, perforations, black spots, small bright spots, and pits. Finally, a TA-strip titanium strip surface defect dataset is constructed. The images with high noise in the TA-strip dataset are denoised using the BM3D algorithm. The denoised dataset is then divided into training, testing, and validation sets in an 8:1:1 ratio.

[0078] In step S2, improvements were made based on the YOLOv11 model. The backbone network adopted the C3k2 and C2PSA modules to enhance feature extraction capabilities. The neck retains the core logic of PAN-FPN (Path Aggregation Network-Feature Pyramid Network) but has been lightweighted. Its core function is to fuse multi-scale features "from top to bottom and from bottom to top". The head continues the anchor-free design, abandoning traditional anchor boxes and directly regressing the target's coordinates and size.

[0079] In step S2, the dynamic serpentine convolution DSConv module is introduced into the backbone network. Specifically, the C3k2 module is introduced and replaced in the bottleneck layer Bottleneck module to form the C3k2-DSC module. This C3k2-DSC module then replaces the C3k2 module preceding the SPPF module in the backbone network. This enhances the model's feature extraction for elongated defects and improves the detection accuracy for such defects. The C3k2-DSC module structure diagram is shown below. Figure 3 As shown. Specifically, the C3k2-DSC module consists of two ordinary convolutional modules, one Split operator, one Concat operator, and n Bottleneck-DSC modules, where n varies depending on the model version.

[0080] In the embodiment of step S2, the dynamic serpentine convolution module introduces a deformation offset. This offset aligns the convolutional kernel with the target structure, ensuring continuous focus of features while avoiding excessive dispersion of the receptive field due to large deformations. If the model is allowed to freely learn the deformation offset, the receptive field tends to deviate from the target, especially in the case of long, curved structures. Therefore, an iterative strategy is adopted to sequentially select the observed target positions, ensuring continuity of attention and preventing the receptive field from spreading too far due to large deformation offsets.

[0081] It is worth noting that the introduction of the dynamic snake-shaped convolution DSConv module enables the YOLO-DSC model to dynamically reshape the convolution kernel and adjust the learning deformation by offset, thereby enhancing the model's feature extraction of elongated defects, better capturing curved and slender patterns, and improving the detection accuracy of elongated defect categories.

[0082] In step S3, the depthwise separable convolution (DWconv) module decouples the channel blending and spatial convolution operations of traditional standard convolution into two independent steps: depthwise convolution (DWconv) and pointwise convolution (DWconv). Furthermore, it is introduced into the YOLOv11 model backbone network, replacing the first three ordinary convolutional (DWconv) modules after the feature map input, to reduce the number of model parameters and computational cost, and improve the model's detection speed. The reason for replacing the shallow layers is that shallow layers only extract basic features such as edges and textures; using lightweight convolution results in minimal accuracy loss, minimizing the impact on accuracy. Its flowchart is shown below. Figure 4 As shown, the specific steps are as follows:

[0083] Step S3.1: Input the feature map into the DWconv module with height H, width W, and initial number of channels C;

[0084] Step S3.2, Depth Convolution: Perform spatial convolution on each input channel independently using a 3×3×1 convolution kernel to extract local features without mixing channel information. At this time, the height is H, the width is W, and the initial number of channels is C.

[0085] Step S3.3, pointwise convolution: Then, the spatial features of each channel output by the depthwise convolution are fused through a 1×1×C1 standard convolution to achieve dimensionality increase or decrease of the number of channels, making up for the channel fusion shortcomings of the depthwise convolution. C1 is the number of output channels. At this time, the height is H, the width is W, and the initial number of channels is C1.

[0086] Step S3.4: Output the feature map as the input of the next module, with a height of H, a width of W, and an initial number of channels of C1.

[0087] In step S4, an adaptive channel attention mechanism (AECA) module is introduced into the neck area. This is an improvement upon the efficient channel attention mechanism (ECA) module, which incorporates a dynamic convolution mechanism. The ECA attention mechanism involves the following steps: First, global average pooling is used to average pool the spatial features of each channel, compressing the feature map into a 1×1×C channel feature vector to capture the global spatial information of each channel. Second, a one-dimensional convolution with a kernel size of k is used to convolve the channel feature vectors, enabling local information interaction between adjacent channels. Finally, sigmoid activation is used to map the convolution result to 0-1 channel weights. The weights are multiplied channel by channel with the original feature map to complete feature enhancement.

[0088] In the embodiment of step S4, the YOLOv11 model is transformed into the YOLO-DSC model through steps 2, 3 and 4.

[0089] In the embodiment of step S4, the structural diagram of the Adaptive Channel Attention (AECA) mechanism module is as follows: Figure 5 As shown, the specific steps are as follows:

[0090] Step S4.1, transfer the feature map Input the AECA module;

[0091]

[0092] Where R represents the set of real numbers, B is the batch size in model training, C is the number of channels, which is also the number of feature maps, and H and W are the height and width of the feature map, respectively.

[0093] Step S4.2, process the feature map Global average pooling is applied to the input feature map along the spatial dimension, as shown in the following equation, to obtain the global average value of the feature map for each channel. ;

[0094]

[0095] Step S4.3: Channel compression is performed on the pooling result through the first one-dimensional convolutional layer to generate an intermediate feature map. As shown in the following formula;

[0096]

[0097] The squeeze operation is used to remove dimensions of size 1, while the transpose operation is used to rearrange the dimensional order of the feature tensor.

[0098] Step S4.4: The intermediate feature map is transformed using a second one-dimensional convolutional layer, and the final output is adaptive weights. As shown in the following formula;

[0099]

[0100] Step S4.5: Calculate the channel attention weights using one-dimensional convolution with an efficient channel attention mechanism. As shown in the following formula;

[0101]

[0102] Step S4.6, adjust the channel attention weights. The dynamic adjustment is performed using the following formula, along with the generated adaptive weights. By combining these, adaptive channel attention weights can be obtained. ;

[0103]

[0104] Step S4.7, adjust the adaptive channel attention weights. The Sigmoid activation function is used to restrict the results to within [0, 1], which are then used as the final attention weights. ;

[0105]

[0106] Step S4.8: Finally, the input feature map is element-wise multiplied by the attention weights. Obtain feature map And use it as input for the next module.

[0107]

[0108] Where R represents the set of real numbers, B is the batch size in model training, C is the number of channels, which is also the number of feature maps, and H and W are the height and width of the feature maps, respectively.

[0109] It is worth noting that the Adaptive Channel Attention (AECA) module enhances the model's adaptability. By introducing a dynamic convolution weight generation mechanism, it can adjust in real time according to different input features and enhance its ability to identify surface defects of strips and sheets in complex backgrounds, thus comprehensively improving the detection performance of various defect categories.

[0110] In the embodiment of step S5, the TA-strip dataset established in step S1 is used. Under the same device and environment configuration, the number of training rounds is set to 200, the number of batch processing times is set to 8, the SGD optimizer is used to accelerate training, and the default values ​​are used for all other hyperparameters.

[0111] This invention selects precision (P), recall (R), average precision (AP), and mean average precision (MAP) as evaluation metrics for the model's detection performance. Furthermore, this paper selects an intersection over union (IOU) ratio of 0.5 (mAP 0.5) as the standard for determining true samples, calculated using the following formula:

[0112]

[0113]

[0114]

[0115]

[0116]

[0117] in, For the true frame, To predict bounding boxes, TP represents true positives, FP represents false positives, FN represents false negatives, and N represents the number of detection types.

[0118] Furthermore, this invention selects the number of model parameters and frames per second (FPS) as key evaluation indicators for model application capabilities.

[0119] In this embodiment, an ablation experiment was designed based on the YOLOv11 model. Dynamic serpentine convolution modules, depthwise separable convolution modules, and the AECA attention mechanism module were gradually introduced to verify the effectiveness of the various improvement methods of the YOLO-DSC model in step S4. The ablation experiment setup is shown in Table 1, and the ablation experiment results are shown in Table 2.

[0120]

[0121]

[0122] Model 0 is the basic model, and Model 3 is the YOLO-DSC model proposed in this invention. As shown in Table 2, the detection performance of the improved models 1, 2, and 3 has been enhanced. Compared with the basic model 0, the mAP@0.5 of models 1, 2, and 3 has improved by 2.9%, 0.9%, and 3.8%, respectively. This significant improvement in detection accuracy is inseparable from the introduction of the dynamic snake-shaped convolution DSCconv module, which greatly improves the model's detection accuracy. After adding the DWconv module, the mAP@0.5 of Model 2 decreased. This is because the feature representation ability of the DWconv module is weaker than that of ordinary convolution, with insufficient channel interaction, making it prone to losing details and semantic information, resulting in a decrease in model representation ability and ultimately a decrease in detection accuracy. Despite the introduction of the DWconv module and the AECA attention mechanism module, the performance of Model 3 still achieved a significant improvement, with mAP@0.5 increasing by 3.8%.

[0123] In terms of application capabilities, Model 1 has a significantly increased number of parameters, up 13% compared to the base model, while the detection frame rate is significantly reduced by 59 frames. The Dynamic Snake Convolution (DSC) module, while enhancing feature adaptive modeling capabilities by introducing learnable offset prediction branches, multi-scale sampling paths, and dynamic weight aggregation, introduces additional convolutional parameters through offset generation, multi-path convolution, and dynamic weighting, resulting in a significant increase in the overall model's parameter count and a decrease in the detection frame rate. After introducing the DWconv module, Model 2 shows a 7.6% decrease in parameters and a 27-frame increase in frame rate, indicating that the DWconv module is effective in significantly reducing the model's parameter count. Furthermore, after adding the AECA attention mechanism module, Model 3 has a similar number of parameters to Model 2, but the detection frame rate increases by 5 frames, meaning that the AECA attention mechanism module improves the model's detection frame rate without introducing a significant number of additional parameters.

[0124] To comprehensively evaluate the detection performance of this invention, a comparative experiment was conducted with the YOLO-DSC model and other advanced object detection methods. All comparative experiments used the TA-Strip dataset established in step S1 for model training, and the relevant hyperparameter settings and device parameters remained consistent with those described above. The results of the comparative experiments are shown in Table 3.

[0125]

[0126] As shown in Table 3, the proposed YOLO-DSC model exhibits significant advantages in three core dimensions: detection accuracy, model lightweighting, and inference speed, achieving an optimal balance between performance and efficiency. In terms of detection accuracy, YOLO-DSC achieves an mAP@0.5 of 84.5%, a 10.4% improvement over the two-stage object detection model Faster R-CNN, and outperforms advanced mainstream single-stage detectors such as YOLOv11s and YOLO-26s, indicating its stronger feature extraction and object recognition capabilities. Regarding lightweighting, YOLO-DSC has only 2.70M parameters, the smallest among all compared models; compared to Faster R-CNN, its parameter count is only 10.6%; and compared to the lightweight YOLOv11s, the parameter count is reduced by 71.4%, demonstrating the advantages of its extremely lightweight design. In terms of inference speed, YOLO-DSC achieves a high frame rate of 165 FPS, significantly higher than Faster R-CNN's 12 FPS. While slightly lower than YOLOv11s' 219 FPS and YOLO-26s' 198 FPS, it outperforms YOLOv11s in balancing speed and accuracy due to its higher detection accuracy. Overall, the YOLO-DSC model demonstrates superior performance in detecting surface defects, particularly elongated defects, in sheet and strip materials. Furthermore, with its highest accuracy, smallest model size, lowest computational cost, and high real-time performance, YOLO-DSC possesses outstanding engineering application value in resource-constrained scenarios and real-time detection tasks.

[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention shall be within the scope of protection of the pending claims of the present invention.

Claims

1. A method for detecting surface defects in sheet and strip materials based on YOLO-DSC, characterized in that, Includes the following steps: Step S1: Collect surface defect images at the strip rolling production site, have professional inspection technicians annotate the defect images, establish a surface defect image dataset TA-strip for different types of defects, and divide the dataset into training set, test set and validation set. Step S2: Based on the YOLO model, a dynamic serpentine convolution DSConv module is introduced into the backbone network. By dynamically reshaping the convolution kernel and adjusting the learning deformation through offset, the model's feature extraction for elongated defects is enhanced. The steps of the dynamic serpentine convolution DSConv module's convolution kernel deformation are as follows: The standard 3×3 convolution kernel is constructed using the following formula: The formula for calculating the coordinates along the x-axis is: The formula for calculating the coordinates along the y-axis is: Among them, deformation offset , , These represent the deformation offsets on the x-axis and y-axis, respectively. Indicates the horizontal distance from the center grid. ; Step S3: Introduce the depthwise separable convolutional (DWconv) module into the backbone network to lighten the backbone network, reduce the number of model parameters, and improve the model detection speed. Step S4: Introduce the Adaptive Channel Attention (AECA) module in the neck area and introduce a dynamic convolution weight generation mechanism to further enhance the features of the image information and obtain the YOLO-DSC model. Step S5: Determine the number of training rounds for the YOLO-DSC model in step S4, train it using the TA-strip dataset established in step S1, and input the defect image to be detected into the trained network model for testing.

2. The method for detecting surface defects in sheet and strip materials based on YOLO-DSC according to claim 1, characterized in that, In step S1, the images collected from the actual production site are high-resolution images. They need to be manually cropped and then classified and labeled according to six types of defects: inclusions, wrinkles, perforations, black spots, small bright spots, and pits. Finally, a TA-strip titanium strip surface defect dataset is constructed.

3. The method for detecting surface defects in sheet and strip materials based on YOLO-DSC according to claim 1, characterized in that, In step S1, the TA-strip dataset is divided after image preprocessing and denoising. The denoised dataset is divided into training set, test set and validation set in a ratio of 8:1:

1.

4. The method for detecting surface defects in strip and sheet materials based on YOLO-DSC according to claim 1, characterized in that, In step S2, an improvement is made based on the YOLOv11 model by introducing the dynamic snake convolution DSConv module into the backbone network. Specifically, the C3k2 module is introduced and replaced in the bottleneck layer Bottleneck module to form the C3k2-DSC module, which then replaces the C3k2 module before the SPPF module in the backbone network.

5. The method for detecting surface defects in sheet and strip materials based on YOLO-DSC according to claim 1, characterized in that, In step S3, the depthwise separable convolution (DWconv) module is also introduced into the backbone network, replacing the first three ordinary convolutional (Conv) modules after the defect image input. The specific steps of the depthwise separable convolution (DWconv) module are as follows: Step S3.1: Input the feature map into the DWconv module with height H, width W, and initial number of channels C; Step S3.2, Depth Convolution: Perform spatial convolution on each input channel independently using a 3×3×1 convolution kernel to extract local features without mixing channel information. At this time, the height is H, the width is W, and the initial number of channels is C. Step S3.3, pointwise convolution: Then, the spatial features of each channel output by the depthwise convolution are fused through a 1×1×C1 standard convolution to achieve dimensionality increase or decrease of the number of channels, making up for the channel fusion shortcomings of the depthwise convolution. C1 is the number of output channels. At this time, the height is H, the width is W, and the initial number of channels is C1. Step S3.4: Output the feature map as the input of the next module, with a height of H, a width of W, and an initial number of channels of C1.

6. The method for detecting surface defects in sheet and strip materials based on YOLO-DSC according to claim 1, characterized in that, In step S4, an adaptive channel attention mechanism (AECA) module is introduced into the neck region. This module is an improvement on the efficient channel attention mechanism (ECA) module by introducing a dynamic convolution mechanism, resulting in the YOLO-DSC model. The specific steps of the AECA module are as follows: Step S4.1, transfer the feature map Input the AECA module; Where R represents the set of real numbers, B is the batch size in model training, C is the number of channels, which is also the number of feature maps, and H and W are the height and width of the feature map, respectively. Step S4.2, process the feature map Global average pooling is applied to the input feature map in the spatial dimension to obtain the global average value of the feature map for each channel. The calculation formula is: Step S4.3: Channel compression is performed on the pooling result through the first one-dimensional convolutional layer to generate an intermediate feature map. The calculation formula is: The squeeze operation is used to remove dimensions of size 1, while the transpose operation is used to rearrange the dimensional order of the feature tensor. Step S4.4: The intermediate feature map is transformed using a second one-dimensional convolutional layer, and the final output is adaptive weights. The calculation formula is: Step S4.5: Calculate the channel attention weights using one-dimensional convolution with an efficient channel attention mechanism. The calculation formula is: Step S4.6, adjust the channel attention weights. The dynamic adjustment is performed using the following formula, along with the generated adaptive weights. By combining these, adaptive channel attention weights can be obtained. The calculation formula is: Step S4.7, adjust the adaptive channel attention weights. The results are restricted to the range [0,1] by using the Sigmoid activation function and used as the final attention weights. ; in, This represents the Sigmoid activation function; Step S4.8: Multiply the input feature map element by the attention weights. Obtain the output feature map And use it as input for the next module. Where R represents the set of real numbers, B is the batch size in model training, C is the number of channels, which is also the number of feature maps, and H and W are the height and width of the feature maps, respectively.

7. The method for detecting surface defects in sheet and strip materials based on YOLO-DSC according to claim 1, characterized in that, In step S5, the number of training rounds is set to 200, and the evaluation metrics include precision, recall, mean precision, FPS, and number of parameters.