A strip steel surface defect detection method and system based on a feature extraction network

By combining Local-Global Feature Extraction Network (LGNet) and Multi-Scale Feature Fusion Network (MFFN) with Residual Adaptive Block (RAB) and Channel-Spatial Collaborative Attention Block (CSSAB), the problem of low contrast in strip steel surface defect detection is solved, thereby improving detection accuracy and efficiency.

CN120298305BActive Publication Date: 2026-03-03XINYANG NORMAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510263419.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2026-03-03
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

Existing methods for detecting surface defects in strip steel suffer from low contrast due to variations in defect shape and location, as well as lighting conditions, when extracting local and global features. This results in low detection efficiency and limited recognition accuracy.

Method used

We employ a Local-Global Feature Extraction Network (LGNet), a Multi-Scale Feature Fusion Network (MFFN), and a detection network. By using Residual-Based Bottleneck Block (RBB), Residual-Based Adaptive Block (RAB), and Channel-Space Cooperative Attention Block (CSSAB), we capture multi-scale defect features, thereby enhancing contrast and feature fusion.

Benefits of technology

It significantly improves the recognition accuracy of blurred edge defects, integrates local texture and global morphological features, solves the problem of low contrast of defects in areas such as strip head and edge, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298305B_ABST
    Figure CN120298305B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for detecting surface defects in strip steel based on a feature extraction network, belonging to the field of defect detection technology. The method includes the following steps: acquiring a strip steel surface image; inputting the strip steel surface image into a Local-Global Feature Extraction Network (LGNet); capturing local features of surface defects through a Residue-Based Bottleneck Block (RBB); dynamically adjusting sampling points through a Residue-Based Adaptive Block (RAB) to extract global features of the defects; obtaining defect features at different locations through a Channel-Spatial Collaborative Attention Block (CSSAB) to obtain multi-scale defect features; fusing the multi-scale defect features using a Multi-Scale Feature Fusion Network (MFFN) to obtain a multi-scale defect feature representation; and classifying and locating defects using a detection network. This invention effectively captures local features of defect edges and textures, while simultaneously utilizing RAB to extract global features of defects at random locations and of different shapes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of defect detection technology, and in particular to a method and system for detecting surface defects in strip steel based on feature extraction networks. Background Technology

[0002] Steel strip, as a fundamental material, plays a crucial role in production and manufacturing. However, during the production process, various surface defects, such as scratches, inclusions, and spots, affect product quality. Therefore, surface defect detection is essential for ensuring the quality of steel strip. Early detection methods included manual inspection and infrared detection. Later, with the rapid development of computer technology, automated inspection based on machine vision gradually became a more promising method. The main problems with these methods are low detection efficiency and limited recognition accuracy.

[0003] In recent years, deep learning methods, especially convolutional neural networks (CNNs), have been successfully and widely applied to the detection of surface defects in steel strips due to their excellent feature extraction capabilities. For example, Yang et al. proposed a novel steel surface defect detection network based on YOLO. By constructing an adaptive fusion spatial pyramid pooling fast module, they expanded the receptive field of the backbone features and enhanced the network's feature extraction capabilities. Li et al. proposed an improved YOLOv4 network for steel surface defect detection. They enhanced the learned features by introducing an ED residual module with an enhancement path into the feature extraction network. Zhong et al. proposed a deformable context-guided block, which utilizes deformable convolutions to dynamically adapt to spatial context perception, enhancing the network's ability to extract defect features.

[0004] Attention mechanisms such as channel-based attention, spatial attention, and self-attention are widely used to extract features that contain important information, enabling the network to focus on key channel or spatial features. For example, Xiao et al. proposed a fine coordinate attention (FCA) module to address issues such as unclear defect targets and significant differences between identical defects. This module effectively captures spatial dependencies and facilitates long-range interactions. Liu et al. proposed a global attention mechanism for identifying steel surface defects, effectively enhancing the model's ability to handle irregularly patterned defects. Zhao et al. developed a backbone architecture that integrates lightweight convolutional blocks and a self-attention mechanism, capable of extracting local and global features of steel surface defects, thereby enhancing the network's representational capabilities.

[0005] In summary, significant progress has been made in automatic detection technology for steel strip surface defects, and one of the keys to the success of these technologies is the extraction of highly expressive features of defects. However, when extracting local and global features of steel surface defects, these methods suffer from various challenges. The diverse shapes and locations of steel surface defects, coupled with the uncontrollable nature of defect formation leading to their dispersed distribution and varied morphologies, result in mismatches between the extracted features and their actual characteristics. Figure 1 As shown in (a) and 1(b), and due to factors such as lighting conditions, the contrast between defects and the background is often low, such as Figure 1 As shown in (c) and 1(d), this greatly increases the difficulty of detecting surface defects in strip steel and the accuracy of identification. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of the prior art by providing a method and system for detecting surface defects in strip steel based on feature extraction networks, thereby solving the problems in the prior art.

[0007] The present invention specifically provides the following technical solution:

[0008] A method for detecting surface defects in strip steel based on feature extraction networks includes the following steps:

[0009] Acquire images of the strip surface;

[0010] A strip steel surface defect detector is constructed, which includes a local-global feature extraction network LGNet, a multi-scale feature fusion network MFFN, and a detection network. The strip steel surface image is input into the strip steel surface defect detector to obtain the classification and localization results of the defects.

[0011] The step of inputting the strip surface image into the strip surface defect detector to obtain the defect classification and location results specifically includes:

[0012] The strip surface image is input into the Local-Global Feature Extraction Network (LGNet). Local features of strip surface defects are captured by the Residue-based Bottleneck Block (RBB), and global features of strip surface defects are extracted by dynamically adjusting the sampling points through the Residue-based Adaptive Block (RAB). Defect features at different locations on the strip surface are captured by the Channel-Spatial Collaborative Attention Block (CSSAB).

[0013] A multi-scale feature fusion network (MFFN) is used to fuse local features, global features, and defect features at different locations on the surface of strip steel to obtain a multi-scale defect feature representation. A detection network is then used to classify and locate the multi-scale defect feature representation.

[0014] Preferably, the method of capturing local features of strip surface defects through residual-based bottleneck blocks (RBBs) includes:

[0015] The number of channels in the feature map is processed using a 1×1 convolution, and local features are extracted using a 3×3 convolution. After extracting local features, the channel dimension is restored using a 1×1 convolution to obtain the output f of the bottleneck block (RBB). out The specific expression is:

[0016] f out =Conv 1×1 (ConvBR 3×3 (ConvBR 1×1 (f in )));

[0017] Among them, f in For RBB input, ConvBR k×k (·) represents a convolution with a kernel size of k×k, Conv 1×1 (·) represents a 1×1 convolution;

[0018] The output and input of the bottleneck block RBB are batch-normalized, activated using the ReLU activation function, and the input f is processed by merging residual connections. in Add to output f out The specific expression is:

[0019] f agg =ReLU(f out +f in );

[0020] Among them, f agg To input f in Add to output f out The result.

[0021] Preferably, the step of dynamically adjusting sampling points through residual-based adaptive block RAB to extract global features of strip surface defects includes:

[0022] Generate an initial sampling shape based on the initial number of sampling points N, and obtain the coordinates (p0+p) of each initial sampling point in the initial sampling shape. n The initial sampling point coordinates define the position of the convolution kernel on the feature map at N sampling points;

[0023] The offset of each initial sampling point is obtained by convolution, and the offset is added to the coordinates of the initial sampling point to adjust the coordinates of the sampling point.

[0024] Features at the adjusted sampling point coordinates are extracted through interpolation and resampling, as shown in the following expression:

[0025]

[0026] ConvBSN×1 (·) represents a convolution with a kernel size of N×1, R represents the generated sampling grid, w represents the weights of the sampling grid points, p0 represents the center position of the sampling grid, and p n Represents the initial sampling point coordinates; x(p0+p n +Δp n ) represents the pixel at the sampling position; Δp n The offset corresponding to the initial sampling point is expressed as follows:

[0027] Δp n =Conv 3×3 (f in );

[0028] Among them, Conv 3×3 (·) represents a 3×3 convolution.

[0029] Preferably, the method of capturing defect features at different locations on the strip surface through channel-space collaborative attention block (CSSAB) includes:

[0030] Construct channel-space collaborative attention blocks (CSSAB) using Multi-Semantic Spatial Attention (MSSA) and Progressive Channel Self-Attention (PCSA);

[0031] Multi-semantic spatial attention (MSSA) is used to spatially decompose and capture multi-semantic features of defects on the strip surface, learning spatial distribution and contextual relationships. Based on progressive channel self-attention (PCSA), a progressive compression strategy is used to weight the output features of the multi-semantic spatial attention (MSSA) to obtain defect features at different locations on the strip surface.

[0032] Preferably, the step of using Multi-Semantic Spatial Attention (MSSA) to spatially decompose and capture multi-semantic features of surface defects in strip steel, and learning spatial distribution and contextual relationships, includes:

[0033] Given the input f in ∈R C×H×W The feature f is obtained by decomposing along the height and width dimensions and then performing global average pooling on the height and width dimensions. h ∈R C×W and width dimension features f w ∈R C×H , will f h and f w Divide into k sub-features, the specific expression is as follows:

[0034]

[0035] in, For k sub-features of high-dimensional features, The width dimension features k sub-features, where C is the dimension, H is the height, and W is the width;

[0036] Applying multi-receptive-field convolution to f h i and f w i Capture the semantic space information features in each sub-feature, specifically expressed as:

[0037]

[0038] in, The semantic space information features are among the k sub-features of high dimension. MRFConv() represents the semantic spatial information features among the k sub-features in the width dimension, where i = 1, 2, 3, 4;

[0039] Semantic spatial information features along the height and width dimensions respectively and The semantic information is aggregated, and spatial attention is obtained through normalization and sigmoid activation operations. The specific expression is:

[0040]

[0041] Where σ(·) and a represent the sigmoid activation operation and spatial attention weight, respectively;

[0042] Spatial attention using high-dimensional features a h Spatial attention a with width dimension features w For input f in We perform weighting to obtain the output feature f. mssa The specific expression is:

[0043] f mssa =MSSA(f in ) = a h ×a w ×f in .

[0044] Preferably, the progressive channel self-attention PCSA-based method employs a progressive compression strategy to weight the output features of the multi-semantic spatial attention MSSA to obtain defect features at different locations on the strip surface, including:

[0045] Let f in ∈R C×H×W Let f be the input feature. mssa ∈R C×H×W As the output feature of MSSA, f in and f mssaPerform residual join, residual join f cat The specific expression is:

[0046] f cat =f in +f mssa ;

[0047] f cat After average pooling, group normalization compression is performed. The group normalization compression result f c ′ at The specific expression is:

[0048] f c ′ at =GN(AvgPool(f cat ));

[0049] Where GN is group normalization and AvgPool is average pooling;

[0050] For f c ′ at Perform a 1×1 convolution to obtain the query Q, key K, and value V. The specific expression is as follows:

[0051]

[0052] Self-attention is calculated using Q, K, and V to obtain the feature representation f. sa The specific expression is:

[0053]

[0054] Where C is the number of channels and T is the transpose;

[0055] Based on average pooling compression along the width and height dimensions f sa And the channel attention weight matrix a is generated using the Sigmoid activation function. c The specific expression is:

[0056] a c =σ(AvgPool(f sa ));

[0057] Where σ(·) is the Sigmoid activation function;

[0058] Using a c Residual connection f to the input cat Weighted summation is performed to obtain defect characteristics f at different locations on the strip surface. pcsa The specific expression is:

[0059] f pcsa =a c ×f cat.

[0060] Preferably, the multi-scale feature fusion network (MFFN) is used to fuse local features, global features, and defect features at different locations on the strip surface to obtain a multi-scale defect feature representation, including:

[0061] Given an input feature map f i In the top-down path, the next level feature f is aligned by using a 1×1 convolutional layer and an upsampling function. i+1 and this level feature f i Aligned features f i The specific expression is:

[0062]

[0063] Among them, Conv k×k (·) and Up(·) represent the k×k convolution operation and the nearest neighbor upsampling operation, respectively;

[0064] In the bottom-up path, MFFN uses 3×3 convolutional layers to match the aligned features f of the current level. i ′ and the aligned next-level feature f i ′ +1 The specific expression is:

[0065]

[0066] Where Down(·) represents downsampling;

[0067] Multi-scale defect feature representations are obtained by aligning features in both top-down and bottom-up approaches.

[0068] This invention provides a strip steel surface defect detection system based on feature extraction networks, comprising:

[0069] The acquisition module is used to acquire images of the strip surface;

[0070] The detection module is used to construct a strip steel surface defect detector, which includes a local-global feature extraction network LGNet, a multi-scale feature fusion network MFFN, and a detection network. The strip steel surface image is input into the strip steel surface defect detector to obtain the classification and localization results of the defects.

[0071] When the detection module inputs the strip surface image into the strip surface defect detector to obtain the classification and localization results of the defects, it inputs the strip surface image into the Local-Global Feature Extraction Network (LGNet). The LGNet captures the local features of the strip surface defects through a residual-based bottleneck block (RBB), and dynamically adjusts the sampling points through a residual-based adaptive block (RAB) to extract the global features of the strip surface defects. It also captures defect features at different locations on the strip surface through a channel-spatial collaborative attention block (CSSAB). Finally, it employs a multi-scale feature fusion network (MFFN) to fuse the local, global, and different location defect features of the strip surface defects to obtain a multi-scale defect feature representation. The detection network then classifies and localizes this multi-scale defect feature representation.

[0072] The present invention provides a computer device, including a memory and a processor. The memory stores a program, and when the program is executed by the processor, the processor performs the steps of the above-described method for detecting surface defects in strip steel based on a feature extraction network.

[0073] The present invention provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method for detecting surface defects in strip steel based on a feature extraction network.

[0074] Compared with the prior art, the present invention has the following significant advantages:

[0075] This invention proposes an innovative strip steel surface defect detector. By integrating Restricted Blocks (RBBs), it effectively captures local features of defect edges and textures. Simultaneously, it utilizes RABs to dynamically adjust sampling points and extract global features of strip steel surface defects, thereby obtaining the shape of the defects. By using Channel-Spatial Collaborative Attention Blocks (CSSA Bs) to capture defect features with different weights at different locations on the strip steel surface, it can enhance the contrast between defects and the background at different locations. After fusing the above features, it performs classification and recognition, integrating local texture and global morphological features, effectively solving the problem of low contrast of defects in areas such as the head and edges of strip steel, and significantly improving the recognition accuracy of some blurred edge defects. Attached Figure Description

[0076] Figure 1 This diagram illustrates the main challenges faced by the present invention in detecting surface defects in strip steel. Figure 1 (a) and Figure 1 (b) shows the random location and shape of the same type of defect. Figure 1 (c) and Figure 1 (d) indicates low contrast between the defect and the background;

[0077] Figure 2The overall architecture of the strip surface defect detection model based on feature extraction network (LGN-S3D) consists of four key parts: Figure 2 (a) is the Local-Global Feature Extraction Network (LGNet). Figure 2 (b) is a multi-scale feature fusion network (MFFN). Figure 2 (c) represents the Regional Recommendation Network (RPN). Figure 2 (d) represents the detection network; furthermore, Figure 2 (e) is a detail of the Residual Adaptive Block (RBB);

[0078] Figure 3 Here are the loss curves for the model on the NEU-DET and GC10-DET datasets: Figure 3 (a) shows the loss curve of the model on the NEU-DET dataset. Figure 3 (b) shows the loss curve of the model on the GC10-DET dataset;

[0079] Figure 4 A detailed structural diagram of Linear Deformable Convolution (LDC);

[0080] Figure 5 For the proposed Channel-Spatial Collaborative Attention Block (CSSAB) structure: Figure 5 (a) represents Multi-Semantic Space Attention (MSSA). Figure 5 (b) represents progressive channel self-attention (PCSA);

[0081] Figure 6 A visual comparison of LGN-S3D with three representative methods on the NEU-DET dataset: Figure 6 (a1)~ Figure 6 (a6) is a true value. Figure 6 (b1) Figure 6 (b6) is LGN-S3D. Figure 6 (c1)~ Figure 6 (c6) is FCOS. Figure 6 (d1)~ Figure 6 (d6) is DINO. Figure 6 (e1)~ Figure 6 (e6) is AGCA;

[0082] Figure 7 For a visual comparison of LGN-S3D with three representative methods on the GC10-DET dataset, Figure 7 (a1)~ Figure 7 (a6) is a true value. Figure 7 (b1) Figure 7 (b6) is LGN-S3D. Figure 7 (c1)~ Figure 7 (c6) is FCOS. Figure 7 (d1)~ Figure 7 (d6) is DINO. Figure 7 (e1)~ Figure 7 (e6) is AGCA;

[0083] Figure 8 This chart compares the proposed LGNet with mainstream backbone networks. The horizontal axis represents the defects of different types, and the vertical axis represents the AP value using different backbone networks. Figure 8 (a) shows the comparison results of different backbone network models on the NEU-DET dataset. Figure 8 (b) shows the comparison results of different backbone network models on the GC10-DET dataset;

[0084] Figure 9 A comparative visualization of heatmaps for three backbone networks (LGNet, ResNet, and SwinTransformer): Figure 9 (a1)~ Figure 9 Image (a6) is a defect image. Figure 9 (b1) Figure 9 (b6) is a true value. Figure 9 (c1)~ Figure 9 (c6) is LGNet. Figure 9 (d1)~ Figure 9 (d6) is ResNet. Figure 9 (e1)~ Figure 9 (e6) is SwingTransformer. Detailed Implementation

[0085] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0086] The methods for defect detection are described below. Existing detection methods include CNN-based defect detection methods, attention mechanisms, and feature fusion.

[0087] Convolutional Neural Networks (CNNs) learn feature representations by stacking a series of convolutional layers from low to high. Low-level features help refine target details, while high-level features provide rich semantic information for detecting defects in complex backgrounds. For example, He et al. proposed an end-to-end CNN-based method for detecting surface defects in strip steel, achieving accurate detection results by fusing multi-layer features. Gao et al. proposed a semi-supervised CNN-based method for identifying surface defects in steel. However, the limited receptive field resulting from the convolutional kernel size restricts these methods' ability to effectively capture global defect information. To address this limitation, extensive research has focused on expanding the receptive field. Dong et al. used large-kernel convolutions to capture contextual relationships in larger image regions, while Chen et al. used deformable convolutions for defect feature extraction, thereby enhancing the model's receptive field and improving detection accuracy. In summary, although CNN-based methods have achieved success in detecting surface defects in strip steel, the inherent locality of convolutional operations limits their ability to capture global information. This limitation hinders their ability to model complex spatial relationships and the broader background essential for accurate detection in challenging contexts.

[0088] Attention mechanisms are inspired by selective attention in human vision. They learn attention weights to adjust existing features, enhance informational features, and suppress noise or irrelevant information. Mainstream attention mechanisms can be broadly categorized into three types: spatial attention mechanisms, channel attention mechanisms, and self-attention mechanisms.

[0089] In spatial and channel attention, weights are calculated based on the relevance of features across the entire input feature map, allowing the network to emphasize key features in either the spatial or channel dimensions. On the other hand, self-attention calculates weights based on the internal relevance of the feature map itself, capturing complex dependencies between features. Recent advances have demonstrated the effectiveness of attention mechanisms in defect detection networks. Ma et al. designed a parallel dual-channel attention mechanism based on the YOLOv4 network, enabling the network to learn multi-scale channel and spatial features, improving the accuracy and speed of defect detection. Qian et al. proposed a Global Feature Aggregation and Redistribution (GFAR) module combining a Global Location Attention Module (GAM), enhancing the network's focus on defect regions and reducing background interference. Li et al. combined lightweight self-attention blocks with convolutional layers, effectively capturing both local and global features, thereby improving detection performance in noisy environments.

[0090] In summary, attention mechanisms have been shown to significantly improve the performance of defect detection networks by selectively focusing on essential features.

[0091] Feature fusion, which combines feature information at different scales, plays a crucial role in detecting surface defects in strip steel. Typically, shallow-extracted features contain rich spatial details, while deep-extracted features contain rich semantic information. Therefore, effectively integrating these deep and shallow features is essential for improving the performance of strip steel surface defect detection networks.

[0092] To achieve effective multi-scale feature fusion, researchers have proposed various fusion strategies. Lin et al. proposed the Feature Pyramid Network (FPN), which upsamples deep features and connects them with shallow features from the previous layer, enriching the shallow layers with deeper semantic information. Liu et al. designed the Path Aggregation Network (PANet), incorporating bottom-up paths into the FPN to more effectively aggregate information. Liu et al. proposed Adaptive Spatial Feature Fusion (ASFF), adding learnable parameters to the FPN to achieve adaptive fusion. Tan et al. proposed the Bidirectional Feature Pyramid Network (BiFPN), which better balances feature information at different scales by introducing weights.

[0093] Based on the above description and with reference to the accompanying drawings, this embodiment is described as follows: Figure 1 As shown, the method for detecting surface defects in strip steel based on feature extraction networks in this embodiment includes the following steps:

[0094] Step S1: Obtain an image of the strip surface;

[0095] Step S2: Construct a strip surface defect detector, which includes a local-global feature extraction network LGNet, a multi-scale feature fusion network MFFN, and a detection network. Input the strip surface image into the strip surface defect detector to obtain the classification and localization results of the defects.

[0096] The strip surface image is input into the strip surface defect detector to obtain the defect classification and location results, specifically including:

[0097] The strip surface image is input into the Local-Global Feature Extraction Network (LGNet). Local features of strip surface defects are captured by the Residual-Based Bottleneck Block (RBB), and global features of strip surface defects are extracted by dynamically adjusting the sampling points through the Residual-Based Adaptive Block (RAB). Channel-Spatial Collaborative Attention Block (CSSAB) is used to capture defect features at different locations on the strip surface, thus obtaining multi-scale defect features. The Multi-Scale Feature Fusion Network (MFFN) is then used to fuse the local features, global features, and defect features at different locations on the strip surface to obtain a multi-scale defect feature representation. Finally, a detection network is used to classify and locate the multi-scale defect feature representation.

[0098] Inspired by two-stage structures, this invention proposes a novel strip surface defect detector, called LGN-S3D, as follows: Figure 2 As shown, LGN-S3D consists of four main parts: 1) Local-Global Feature Extraction Network (LGNet); 2) Multi-Scale Feature Fusion Network (MFFN); 3) Region Proposal Network (RPN); and 4) Detection Network.

[0099] LGNet consists of residual-based bottleneck blocks (RBBs), residual-based adaptive blocks (RABs), and channel-space collaborative attention blocks (CSSABs). These blocks collectively enhance the modeling of local and global information, effectively extracting multi-scale features. MFFN employs a top-down and bottom-up fusion strategy to capture comprehensive multi-scale defect features. RPN generates region proposals to guide the network in focusing on potential defect areas. Finally, a detection network is used to classify and locate defects. The main contributions of this invention are the proposed LGNet and MFFN, which are described in detail in sections 1 and 2, respectively.

[0100] 1. Local-Global Feature Extraction Network:

[0101] Convolutional neural networks (CNNs) have been widely used in strip steel surface defect detection due to their excellent feature extraction capabilities and relatively low computational cost. A major limitation of CNNs and CNN-based defect detection methods is their limited ability to capture global features, which reduces the effectiveness of tasks requiring long-range dependencies and global contextual understanding. Specifically, due to the random distribution, varied shapes, and low background contrast of defects, CNNs struggle to effectively extract defect features.

[0102] To address the aforementioned issues, inspired by the ResNet architecture, a novel Local-Global Feature Extraction Network (LGNet) was designed, such as... Figure 2 As shown in (a), LGNet consists of a series of Local-Global Feature Extraction Units (LGUs). Each LGU contains three main blocks: Residual-Based Bottleneck Block (RBB), Residual-Based Adaptive Block (RAB), and Channel-Space Cooperative Attention Block (CSSAB). Specifically, the RBB is a convolution-based information bottleneck that enhances important local feature representations by compressing input information and selectively preserving it, thereby improving the network's learning efficiency and generalization ability. The RAB uses linear deformable convolution to adaptively capture the global shape features of defects, accelerating model convergence. The CSSAB enhances the representation of low-contrast defects by perceiving local details and global context through the synergistic effect of Progressive Channel Self-Attention (PCSA) and Multi-Semantic Space Attention (MSSA).

[0103] 1.1 Bottleneck Block Based on Residue:

[0104] Inspired by information bottlenecks and residual connections, a novel residual-based bottleneck block (RBB) is designed to improve training efficiency and feature representation capabilities while mitigating the gradient vanishing problem, such as... Figure 2 As shown in (e). Furthermore, RBB is also a convolution-based bottleneck that captures local features of surface defects in strip steel. Specifically, RBB first uses a 1×1 convolution to reduce the number of channels in the feature map, then uses a 3×3 convolution to extract necessary local features, and finally uses a 1×1 convolution to restore the channel dimension after extracting the local features. Formally, the output f of the bottleneck block RBB is obtained. out The specific expression is:

[0105] f out =Conv 1×1 (ConvBR 3×3 (ConvBR 1×1 (f in ))) (1);

[0106] Among them, f in For RBB input, ConvBR k×k (·) represents a convolution with a kernel size of k×k, Conv 1×1 (·) represents a 1×1 convolution; then, the output and input of the bottleneck block RBB are batch normalized and activated using the ReLU activation function, and the input f is directly processed by merging residual connections. in Add to output f out In terms of form:

[0107] f agg =ReLU(f out +f in (2);

[0108] Among them, f agg To input f in Add to output f out The result.

[0109] This method effectively reduces computational costs, accelerates training, ensures smooth information flow in deep networks, prevents gradient vanishing, and improves performance and training stability.

[0110] Figure 4 In the LDC, learnable offsets are used to adjust the sampling shape, and the sampling shape at each position is changed by resampling, thereby adaptively adjusting the sampling position.

[0111] 1.2 Residual-based adaptive blocks:

[0112] Residual bottle blocks (RBBs) are effective in extracting local features of defects using convolutions, as described in Section 1.1. However, their fixed sampling points limit the network's ability to extract global information. To address this issue, this invention observes that linear deformable convolution (LDC) can effectively capture global information and establish long-range dependencies by adaptively adjusting sampling positions through learned offsets. This mechanism allows the network to dynamically determine the most relevant sampling points, making it more flexible and capable of extracting features from diverse spatial environments. Furthermore, LDC generates initial sampling coordinates for feature extraction with a variable number of sampling points, while ensuring that computational complexity increases only linearly with the number of points. This property makes LDC highly efficient for large-scale feature extraction tasks.

[0113] Based on this, the present invention proposes Residual-Based Adaptive Block (RAB), which aims to adaptively extract global features of defects by dynamically adjusting sampling points. Figure 3 The model loss with and without RAB is visually displayed on the NEU-DET and GC10-DET datasets. This invention demonstrates that by introducing RAB, the model becomes easier to optimize, effectively accelerating convergence. RAB maintains the same structure as RBB, except that it replaces the standard 3×3 convolution with LDC, which uses N adaptive sampling points. Figure 4 The LDC feature extraction process with 3 sampling points (i.e., N=3) is shown. The process first generates an initial sampling shape based on the initial number of sampling points (N=3), and then calculates / obtains the coordinates (p0+p...) of each initial sampling point in the initial sampling shape. n The coordinates define the positions of the convolution kernels on the feature map at N sampling points. Then, the offset of each kernel (initial sampling point) is calculated / obtained through convolution operations, generating a tensor of dimension (2N, H, W). These learned offsets are added to the initial sampling point coordinates to adjust the sampling point positions. Finally, features are extracted from the adjusted sampling point coordinates through interpolation and resampling, and convolution is performed on these positions to extract features. Formally, the specific expression is:

[0114]

[0115] ConvBS N×1 (·) represents a convolution with a kernel size of N×1, followed by batch normalization and SiLU activation. R represents the generated sampling grid, w represents the weights of the sampling grid points, p0 represents the center position of the sampling grid, and p n Represents the initial sampling point coordinates, x(p0+p n +Δp n ) represents the pixel at the sampling location. Δp n The offset corresponding to the initial sampling point is defined as:

[0116] Δp n =Conv 3×3 (f in (4);

[0117] Among them, Conv 3×3 (·) represents a 3×3 convolution.

[0118] 1.3 Channel-Spatial Cooperative Attention Block:

[0119] Attention mechanisms possess powerful modeling and feature representation capabilities. Even in low-contrast scenes, they can enable networks to focus on key features while ignoring irrelevant ones, thereby improving their ability to capture contextual information and enhance feature extraction. However, most attention mechanisms only focus on channel or spatial relationships, often failing to correlate dispersed defects. This invention observes that similar features with potential correlations, even when located in different positions, can interact to provide complementary information, thus improving the model's prediction accuracy. To address this, a novel Channel-Spatial Cooperative Attention Block (CSSAB) is designed to focus on defect features at different locations. This block consists of two parts: Multi-Semantic Spatial Attention (MSSA) and Progressive Channel Self-Attention (PCSA). MSSA is used to spatially decompose and capture multi-semantic features of strip surface defects, learning more detailed spatial distributions and contextual relationships, thus enhancing the network's spatial attention representation. PCSA employs a progressive compression strategy to enhance feature representation capabilities. It utilizes the spatial prior of MSSA and channel self-attention to further improve the network's perception and understanding of channel features. Specifically, based on progressive channel self-attention PCSA, a progressive compression strategy is used to weight the output features of the multi-semantic spatial attention MSSA to obtain defect features at different locations on the strip surface. Figure 5 The proposed CSSAB structure is shown. Let f in ∈R C×H×W If the input features are those of CSSAB, then the feature transformation process can be described as follows:

[0120] f mssa =MSSA(f in (5);

[0121] f pcsa =PCSA(f mssa +f in (6);

[0122] f out =CSSAB(f in )=f mssa +f pcsa (7);

[0123] Multi-semantic space attention: Figure 5 (a) shows the proposed Multi-Semantic Space Attention (MSSA). Inspired by the structure of coordinate attention mechanisms, this invention will consider the given input f in ∈R C×H×W The feature f is obtained by decomposing along the height and width dimensions and then performing global average pooling on the height and width dimensions. h ∈R C×W and width dimension f w ∈R C×H f h and f w Each feature is divided into k sub-features. Formally,

[0124]

[0125] in, For k sub-features of high-dimensional features, The width dimension features k sub-features, where C is the dimension, H is the height, and W is the width.

[0126] Then, multi-receptive-field convolutions (MRFC onv) with kernel sizes of 3×3, 5×5, 7×7, and 9×9 are applied to f. h i and f w i This effectively captures the semantic space information features in each sub-feature, enhancing semantic consistency. Formally, the specific expression is:

[0127]

[0128] in, The semantic space information features are among the k sub-features of high dimension. The semantic spatial information features are k sub-features in the width dimension, and MRFConv() is a multi-receptive field convolution, i = 1, 2, 3, 4.

[0129] Subsequently, this invention analyzes the semantic space information features f along both the height and width dimensions. h i and f w i The semantic information of (i = 1, 2, 3, 4) is aggregated. Next, group normalization and sigmoid activation operations are used to obtain spatial attention. Formally,

[0130]

[0131] Where σ(·) and a represent the sigmoid activation operation and spatial attention weights, respectively. Spatial attention utilizing high-dimensional features is then applied. hSpatial attention a with width dimension features w For input f in We perform weighting to obtain the output feature f. mssa :

[0132] f mssa =MSSA(f in ) = a h ×a w ×f in (14);

[0133] Progressive channel self-attention: Figure 5 (b) Shows the details of the proposed Progressive Channel Self-Attention (PCSA). Let f in ∈R C×H×W Let f be the input feature. mssa ∈R C×H×W For the output characteristics of MSSA (refer to Equation 14), PCSA first applies f in and f mssa Perform residual join, residual join f cat The specific expression is:

[0134] f cat =f in +f mssa (15);

[0135] f cat After average pooling, group normalization compression is performed to obtain f. c ′ at ∈R C×H×W The normalized compression result f c ′ at The specific expression is:

[0136] f c ′ at =GN(AvgPool(f cat )) (16);

[0137] Where GN stands for group normalization and AvgPool stands for average pooling.

[0138] For f c ′ at Performing a 1×1 convolution yields the query (Q), key (K), and value (V), expressed as follows:

[0139]

[0140] This invention uses Q, K, and V to calculate self-attention and obtain the feature representation f. sa :

[0141]

[0142] Where C is the number of channels and T is the transpose. Then, average pooling is used to compress f along the width and height dimensions. sa And use the Sigmoid activation function to generate the channel attention weight matrix a c :

[0143] a c =σ(AvgPool(f sa )) (19);

[0144] Where σ(·) is the Sigmoid activation function. Using a c Residual connection f to the input cat Weighting is performed to obtain the output feature (defect features at different locations on the strip surface) f. pcsa :

[0145] f pcsa =a c ×f cat (20);

[0146] 2. Multi-scale feature fusion network:

[0147] A top-down and bottom-up fusion strategy is adopted to repeatedly fuse multi-scale defect features, thereby enhancing the network's expressive power. For example... Figure 2 As shown in (a), given an input image f∈R 3×H×W LGNet generates four layers of features {f i |i=1,2,3,4}. like Figure 2 As shown in (b), the Multi-Scale Feature Fusion Network (MFFN) fuses features to obtain a multi-scale defect feature representation.

[0148] In the top-down path, MFFN first aligns the high-level (next-level) features f by reducing its dimensionality using 1×1 convolutional layers. i+1 and lower-level (local) features f i Then increase its spatial resolution to match f i In form, the aligned feature f at this level i The specific expression is:

[0149]

[0150] Where Conv k×k (·) and Up(·) represent the k×k convolution operation and the nearest neighbor upsampling operation, respectively.

[0151] In the bottom-up path, MFFN uses 3×3 convolutional layers to reduce its spatial size to match low-level (aligned local level) features f. i′ and higher-level (aligned next-level) features f i ′ +1 In terms of form, the specific expression is:

[0152]

[0153] Down(·) is a downsampling operation that obtains multi-scale defect feature representations by aligning features from top to bottom and bottom to top.

[0154] 3. Loss function:

[0155] The loss of LGN-S3D consists of classification loss and bounding box regression loss, and is defined as:

[0156] L = L cls +L box (twenty three);

[0157] Where L cls (Classification loss) measures the difference between the predicted target score and the true label, defined as:

[0158] L cls =-plog(g)-(1-p)log(1-g) (24);

[0159] Where p and g represent the predicted class and the true class label, respectively. The bounding box regression loss L in Equation 23... box The error between the predicted coordinates and the true coordinates is calculated and defined as:

[0160]

[0161] Where t = (tx, ty, tw, th) represents the actual bounding box coordinates, and t′ = (t′ x ,t′ y ,t′ w ,t′ h ) represents the predicted bounding box coordinates.

[0162] The above scheme will be demonstrated through experiments. The experimental setup includes the following:

[0163] This invention uses two strip surface defect datasets to evaluate the effectiveness of LGN-S3D, namely NEU-DET and GC10-DET.

[0164] The NEU-DET dataset, collected and created by Northeastern University, includes six distinct typical steel surface defects: cracks (Cr), inclusions (In), patches (Pa), pitting (PS), rolling marks (RS), and scratches (Sc). The dataset contains 1800 images, with 300 images for each typical surface defect.

[0165] GC10-DET: The GC10-DET dataset was collected and created by Tianjin University. This dataset contains ten different types of steel surface defects: punching (Pu), weld (Wl), crescent notch (Cg), water stain (Ws), oil stain (Os), wire spot (Ss), inclusion (In), rolling crater (Rp), crease (Cr), and waist crease (Wf). The dataset contains 2294 images with a different number of samples for each defect type.

[0166] The LGN-S3D implementation of this invention is performed on an NVIDIA A100 GPU (80GB) using the PyTorch framework. This invention uses SGD as the optimizer with a weight decay of 0.0001 and a momentum of 0.9. The initial learning rate is set to 0.008, the initial factor to 0.001, the batch size to 2, and the number of training epochs to 36. To ensure fair comparison, results for all methods are provided by the authors or obtained by running publicly available source code with default parameter settings.

[0167] To evaluate the LGN-S3D of this invention and compare it with other state-of-the-art (SOTA) methods, this invention uses average accuracy (mAP) to evaluate the network.

[0168]

[0169] In the formula, TP represents the number of actual defects detected; FP represents the number of incorrectly predicted defects; FN represents the number of actual missing defects. mAP is the average AP value for all defect categories.

[0170] This invention compares LGN-S3D with 31 state-of-the-art (SOTA) detection networks, which can be divided into three main categories. CNN-based methods include SSD, FCOS, Retinanet, AT SS, Faster-RCNN, Cascade-RCNN, Dynamic-RCNN, Grid-RCNN, YOLOv3, YOLOv5, YOLOv8, YOLOv9, YOLOv10, YOLOX, and RTMDET. Transformer-based methods include DETR, Deformable-DETR, Conditional-DETR, DAB-DETR, DINO, DDQ, RT-DETR, CO-DETR, and Align-DETR. Finally, defect-specific methods focused on industrial applications include AGCA, EFD-YOLOv4, LiFSO-Net, SCRL-EMD-FR, MSC-DNet, WSS-YOLO, and STFE-Net. Tables 1 and 2 present the quantitative comparison results of the LGN-S3D method and 31 other comparison methods of this invention on the NEU-DET and GC10-DET datasets, respectively. Results marked with "*" are from published papers, while other results were obtained by running publicly available source code and retraining with default parameter settings. "-" indicates that this invention does not provide relevant data.

[0171] Table 1. Comparison of quantization performance with 31 state-of-the-art methods on the NEU-DET dataset.

[0172]

[0173]

[0174] Table 1 presents the performance comparison results of LGN-S3D on the NEU-DET dataset with 31 state-of-the-art methods. As observed in Table 1, LGN-S3D outperforms all competing methods in mAP, achieving a top score of 83.6%. The detector LGN-S3D outperforms Cascade-RCNN (the best method based on CNN), Align-DETR (the best method based on transformer), and the best defect-based methods (WSS-YOLO, STFE-Net) in mAP by 4.2%, 5.7%, and 1.3%, respectively. Compared with other state-of-the-art methods, LGN-S3D demonstrates superior performance, achieving state-of-the-art APs of 63.0%, 88.0%, and 94.2% in the Cr, In, and Ps categories, respectively. In Pa, Rs, and Sc classification, LGN-S3D achieved APs of 92.7%, 67.0%, and 94.1%, respectively, slightly behind the best-performing methods: EFD-YOLOv4 (Pa 97.0%), WSS-YOLO (Rs 73.1%), and Cascade-RCNN (Sc 97.4%).

[0175] Table 2. Comparison of quantization performance with 31 state-of-the-art methods on the GC10-DET dataset.

[0176]

[0177]

[0178] As shown in Table 2, on the GC10-DET dataset, LGN-S3D consistently outperforms all competing methods in terms of mAP, achieving the highest score of 74.7%. The detector LGN-S3D outperforms Cascade-RCNN (the best CNN-based method), CO-DETR (the best transformer-based method), and WSS-YOLO (the best defect-based method) in mAP, improving by 4.7%, 3.9%, and 2.3%, respectively. The LGN-S3D of this invention achieves the highest AP in the Wl, Os, and Cr classes, at 98.6%, 71.8%, and 70.0%, respectively. Overall, LGN-S3D achieves satisfactory results in other classes.

[0179] Figure 6A visual comparison of LGN-S3D with other methods on the NEU-DET dataset is presented. LGN-S3D (column 2) achieved the best detection performance, with results very close to the corresponding ground truth. Specifically, for defects with low contrast (row 1) and complex shapes (row 3), the comparison methods sometimes misidentified background areas as defect objects, while LGN-S3D effectively suppressed background noise and reduced false positives. Even for images with clearly distinguishable defect objects (e.g., rows 2 and 6), most comparison methods failed to accurately delineate the defect locations, while LGN-S3D consistently highlighted them accurately.

[0180] Figure 7 This document presents a visual comparison of LGN-S3D with other methods on the GC10-DET dataset. It can be observed that the proposed detector (column 2) outperforms other methods in challenging defect detection scenarios, such as multiple defects (rows 2 and 3) and low contrast (rows 4, 5, and 6), with predictions closely resembling ground truth annotations.

[0181] To verify the effectiveness of the LGN-S3D backbone network (LGNet), this invention selected ResNet, Res2Net, ResNeSt, ResNeXt, RegNet, ConvNeXt, PVT, PVTv2, and SwinTransformer as the model backbone network to replace LGNet for feature extraction. The comparison results are shown in Table 3.

[0182] Table 3. Performance Comparison of Different Feature Extraction Networks

[0183]

[0184]

[0185] As shown in Table 3, the LGNet-based model achieved state-of-the-art results on both the NEU-DET and GC10-DET datasets. Specifically, compared to the ResNet50-based model, the LGNet-based model achieved an mAP of 83.6% on the NEU-DET dataset and 74.7% on the GC10-DET dataset, representing improvements of 3.8% and 5.5%, respectively. Furthermore, the LGNet-based model outperformed the SwinTransformer-based model by 2.1% and 2.9%, respectively. LGNet even significantly outperformed other feature extraction networks, indicating a substantial advantage in defect identification and localization capabilities compared to other feature extraction networks.

[0186] Figure 8The performance of models using LGNet was compared with that of mainstream backbone networks under different defect categories. LGNet-based models consistently outperformed other backbone networks, achieving best results in almost all categories.

[0187] also, Figure 9 Heatmap visualizations of models using LGNet, ResNet, and Swin Transformer are provided. LGN-S3D (with LGNet as its backbone) more accurately locates and focuses defect regions while effectively suppressing irrelevant regions.

[0188] Conversely, ResNet-based models occasionally miss small defects (e.g., row 1, column 4, and row 5, column 4), while models using Swin Transformer sometimes fail to accurately identify defective regions and incorrectly focus on background regions (e.g., row 5, column 5).

[0189] Ablation experiments were conducted on the NEU-DET and GC10-DET datasets to verify the effectiveness of key modules in LGN-S3D.

[0190] Table 4. Performance Comparison of Different Modules

[0191]

[0192] As shown in Table 4, the performance of LGN-S3D with both RBB and RAB added is significantly better than that of LGN-S3D with only one module added, indicating that RBB and RAB, as complementary components, greatly improve the performance of the detector.

[0193] Furthermore, the LGN-S3D using RAB outperforms the LGN-S3D with only RAB, further validating the effectiveness of RAB.

[0194] As observed in Table 4, the introduction of CSSAB significantly improved the performance of LGN-S3D. Specifically, on the NEU-DET dataset, LGN-S3D models using RBB, RAB, and CSSAB achieved performance improvements of 3.9%, 3.1%, and 1.0% compared to models using only RBB, RAB, and RBB+RAB, respectively. On the GC10-DET dataset, the performance improvements were 6.1%, 5.0%, and 3.8%, respectively.

[0195] As shown in Table 4, LG N-S3D, using all modules (RBB, RAB, CSSAB, and MFFN), achieved the best results, increasing mAP by 0.7% and 1.2% on the NEU-DET and GC10-DET datasets, respectively, compared to LG N-S3D using RBB, RAB, and CSSAB. Compared to the baseline network (LG N-S3D using only RBB), mAP increased by 4.6% and 6.1% on the NEU-DET and GC10-DET datasets, respectively.

[0196] Surface defect detection is a crucial step in strip steel production. To address the randomness of the location and shape of surface defects and the low contrast between defects and the background, a novel surface defect detection network (LGN-S3D) is proposed. Specifically, this invention proposes a novel Local-Global Feature Extraction Network (LGNet), which includes three innovative blocks: 1) a Residual-Based Bottleneck Block (RBB) to capture local features of defects; 2) a Residual-Based Adaptive Block (RAB) to extract global features of defects with random locations and various shapes; and 3) a Channel-Spatial Collaborative Attention Block (CSSAB) to focus on extracting features from low-contrast defects. Furthermore, this invention proposes a Multi-Scale Feature Fusion Network (MFFN), which repeatedly fuses semantic and spatial information using top-down and bottom-up fusion strategies to enhance the expressiveness of defect features. Extensive experiments were conducted on the NEU-DET and GC10-DET datasets. Experimental results show that LGN-S3D outperforms mainstream target detection models and dedicated steel strip defect detection models, achieving the highest mean accuracy (mAP) on the NE-DET and GC10-DET datasets, at 83.6% and 74.7%, respectively.

[0197] Based on the above method, the present invention provides a strip steel surface defect detection system based on feature extraction network, including: a data acquisition module and a detection module.

[0198] The acquisition module is used to acquire images of the strip surface; the detection module is used to construct a strip surface defect detector, which includes a Local-Global Feature Extraction Network (LGNet), a Multi-Scale Feature Fusion Network (MFFN), and a detection network. The strip surface image is input into the LGNet to obtain defect classification and localization results. When inputting the strip surface image into the LGNet to obtain defect classification and localization results, the detection module inputs the LGNet image into the Local-Global Feature Extraction Network. It captures local features of the strip surface defects using a Residue-Based Bottleneck Block (RBB), dynamically adjusts sampling points using a Residue-Based Adaptive Block (RAB) to extract global features of the strip surface defects, and captures defect features at different locations on the strip surface using a Channel-Spatial Collaborative Attention Block (CSSAB). The MFFN is then used to fuse local, global, and different location defect features to obtain a multi-scale defect feature representation. Finally, the detection network is used to classify and localize this multi-scale defect feature representation.

[0199] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a program, and when the program is executed by the processor, the processor performs the steps of a strip steel surface defect detection method based on a feature extraction network.

[0200] According to the disclosed embodiments, the computer device can communicate with one or more external devices (e.g., keyboard, pointing device, Bluetooth communication, etc.) or with any device that enables the computing device to communicate with one or more other computing devices (e.g., router, demodulator, etc.).

[0201] The present invention also provides a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of a strip steel surface defect detection method based on a feature extraction network.

[0202] According to the disclosed embodiments, the storage medium can be a non-volatile computer-readable storage medium, such as, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, the storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0203] The above description, in conjunction with specific preferred embodiments, provides a more detailed explanation of the present invention. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered to fall within the scope of protection of the present invention.

Claims

1. A method for detecting surface defects in strip steel based on feature extraction networks, characterized in that, Includes the following steps: Acquire images of the strip surface; A strip steel surface defect detector is constructed, which includes a local-global feature extraction network LGNet, a multi-scale feature fusion network MFFN, and a detection network. The strip steel surface image is input into the strip steel surface defect detector to obtain the classification and localization results of the defects. The step of inputting the strip surface image into the strip surface defect detector to obtain the defect classification and location results specifically includes: The strip surface image is input into the Local-Global Feature Extraction Network (LGNet). Local features of strip surface defects are captured by the Residue-based Bottleneck Block (RBB), and global features of strip surface defects are extracted by dynamically adjusting the sampling points through the Residue-based Adaptive Block (RAB). Defect features with different weights at different locations on the strip surface are captured by the Channel-Spatial Collaborative Attention Block (CSSAB). A multi-scale feature fusion network (MFFN) is used to fuse local features, global features, and defect features at different locations on the surface of strip steel to obtain a multi-scale defect feature representation. A detection network is then used to classify and locate the multi-scale defect feature representation. The method of capturing local features of strip surface defects through residual-based bottleneck blocks (RBBs) includes: The number of channels in the feature map is processed using a 1×1 convolution, and local features are extracted using a 3×3 convolution. After extracting local features, the channel dimension is restored using a 1×1 convolution to obtain the output of the bottleneck block (RBB). f out The specific expression is: ; in, f in For RBB input, ConvBR k×k (·) represents the kernel size. k × k Convolution, Conv 1×1 (·) represents a 1×1 convolution; The output and input of the bottleneck block RBB are batch-normalized, activated using the ReLU activation function, and the input is processed by merging residual connections. f in Add to output f out The specific expression is: ; in, f agg To input f in Add to output f out The result; The method of dynamically adjusting sampling points based on residual adaptive block RAB to extract global features of strip surface defects includes: Based on the initial number of sampling points N Generate an initial sampling shape and obtain the coordinates of each initial sampling point in the initial sampling shape. p 0+ p n The initial sampling point coordinates define the convolution kernel on the feature map. N The location of each sampling point operation; The offset of each initial sampling point is obtained by convolution, and the offset is added to the coordinates of the initial sampling point to adjust the coordinates of the sampling point. Features at the adjusted sampling point coordinates are extracted through interpolation and resampling, as shown in the following expression: ; ConvBS N×1 (·) represents the kernel size equal to N A ×1 convolution, R This represents the generated sampling grid. w Indicates the weight of the sampling grid points. p 0 indicates the center position of the sampling grid. p n Indicates the coordinates of the initial sampling point; x ( p 0+ p n +△ p n ) represents the pixel at the sampling location; △ p n The offset corresponding to the initial sampling point is expressed as follows: ; Among them, Conv 3×3 (·) represents a 3×3 convolution; The method of capturing defect features at different locations on the strip surface using channel-space collaborative attention block (CSSAB) includes: Construct channel-space collaborative attention blocks (CSSAB) using Multi-Semantic Spatial Attention (MSSA) and Progressive Channel Self-Attention (PCSA); Multi-semantic spatial attention (MSSA) is used to spatially decompose and capture multi-semantic features of defects on the strip surface, learning spatial distribution and contextual relationships. Based on progressive channel self-attention (PCSA), a progressive compression strategy is used to weight the output features of the multi-semantic spatial attention (MSSA) to obtain defect features with different weights at different locations on the strip surface.

2. The method for detecting surface defects in strip steel based on a feature extraction network as described in claim 1, characterized in that, The method of using Multi-Semantic Spatial Attention (MSSA) to spatially decompose and capture multi-semantic features of surface defects in strip steel, and to learn spatial distribution and contextual relationships, includes: Given input f in R CHW The model is decomposed along the height and width dimensions, and then global average pooling is performed on the height and width dimensions to obtain the height dimension features. f h R CW and width dimension features f w R CH ,Will f h and f w Divided into k Each feature, specifically expressed as: ; ; in, For high-dimensional features k Individual characteristics, Width dimension features k Individual characteristics, C Let be the dimension. H For height, W Width; Applying multi-receptive field convolution to f h i and f w i Capture the semantic space information features in each sub-feature, specifically expressed as: ; ; in, For high-dimensional k Semantic spatial information features in individual features For the width dimension k Semantic spatial information features in individual features MRFConv () indicates multi-receptor field convolution. i =1,2,3,4; Semantic spatial information features along the height and width dimensions respectively and The semantic information is aggregated, and spatial attention is obtained through normalization and sigmoid activation operations. The specific expression is: ; ; Among them, (·) and a These represent the sigmoid activation operation and the spatial attention weights, respectively. Spatial attention using high-dimensional features a h Spatial attention with width dimension features a w For input f in Perform weighting to obtain output features f mssa The specific expression is: 。 3. The method for detecting surface defects in strip steel based on a feature extraction network as described in claim 2, characterized in that, The progressive channel self-attention PCSA-based method employs a progressive compression strategy to weight the output features of the multi-semantic spatial attention MSSA, obtaining defect features with different weights at different locations on the strip surface, including: make f in R CHW Let be the input features. f mssa R CHW For the output characteristics of MSSA, f in and f mssa Perform residual join, residual join f cat The specific expression is: ; Will f cat After average pooling, group normalization compression is performed. The group normalization compression result is as follows. The specific expression is: ; Where GN is group normalization and AvgPool is average pooling; right Perform a 1×1 convolution to obtain the query. Q ,key K Sum V The specific expression is: ; use Q , K , V Calculate self-attention to obtain feature representations. f sa The specific expression is: ; in, C Where T is the number of channels; Based on average pooling compression along the width and height dimensions f sa The channel attention weight matrix is ​​generated using the Sigmoid activation function. a c The specific expression is: ; Where (·) is the Sigmoid activation function; use a c Residual connection to input f cat By weighting, defect features with different weights at different locations on the strip surface are obtained. f pcsa The specific expression is: 。 4. The method for detecting surface defects in strip steel based on a feature extraction network as described in claim 3, characterized in that, The method employs a multi-scale feature fusion network (MFFN) to fuse local features, global features, and defect features at different locations on the strip surface, obtaining a multi-scale defect feature representation, including: For a given input feature map f i In the top-down path, the next level of features is aligned using 1×1 convolutional layers and upsampling functions. f i+1 and features of this level f i Aligned features at this level The specific expression is: ; Among them, Conv k×k (·) and Up(·) respectively represent k × k Convolution operation and nearest neighbor upsampling operation; In the bottom-up path, MFFN uses 3×3 convolutional layers to match and align the current-level features. Aligned with the next level feature The specific expression is: ; Where Down(·) represents the downsampling operation; Multi-scale defect feature representations are obtained by aligning features in both top-down and bottom-up approaches.

5. A strip steel surface defect detection system based on feature extraction network, characterized in that, include: The acquisition module is used to acquire images of the strip surface; The detection module is used to construct a strip steel surface defect detector, which includes a local-global feature extraction network LGNet, a multi-scale feature fusion network MFFN, and a detection network. The strip steel surface image is input into the strip steel surface defect detector to obtain the classification and localization results of the defects. When the detection module inputs the strip surface image into the strip surface defect detector to obtain the classification and localization results of the defects, it inputs the strip surface image into the Local-Global Feature Extraction Network (LGNet). The LGNet captures the local features of the strip surface defects through a Residue-based Bottleneck Block (RBB), and dynamically adjusts the sampling points through a Residue-based Adaptive Block (RAB) to extract the global features of the strip surface defects. It also captures defect features at different locations on the strip surface through a Channel-Spatial Collaborative Attention Block (CSSAB). Finally, it employs a Multi-Scale Feature Fusion Network (MFFN) to fuse the local, global, and different location defect features of the strip surface defects to obtain a multi-scale defect feature representation. The detection network then classifies and localizes this multi-scale defect feature representation. The method of capturing local features of strip surface defects through residual-based bottleneck blocks (RBBs) includes: The number of channels in the feature map is processed using a 1×1 convolution, and local features are extracted using a 3×3 convolution. After extracting local features, the channel dimension is restored using a 1×1 convolution to obtain the output of the bottleneck block (RBB). f out The specific expression is: ; in, f in For RBB input, ConvBR k×k (·) represents the kernel size. k × k Convolution, Conv 1×1 (·) represents a 1×1 convolution; The output and input of the bottleneck block RBB are batch-normalized, activated using the ReLU activation function, and the input is processed by merging residual connections. f in Add to output f out The specific expression is: ; in, f agg To input f in Add to output f out The result; The method of dynamically adjusting sampling points based on residual adaptive block RAB to extract global features of strip surface defects includes: Based on the initial number of sampling points N Generate an initial sampling shape and obtain the coordinates of each initial sampling point in the initial sampling shape. p 0+ p n The initial sampling point coordinates define the convolution kernel on the feature map. N The location of each sampling point operation; The offset of each initial sampling point is obtained by convolution, and the offset is added to the coordinates of the initial sampling point to adjust the coordinates of the sampling point. Features at the adjusted sampling point coordinates are extracted through interpolation and resampling, as shown in the following expression: ; ConvBS N×1 (·) represents the kernel size equal to N A ×1 convolution, R This represents the generated sampling grid. w Indicates the weight of the sampling grid points. p 0 indicates the center position of the sampling grid. p n Indicates the coordinates of the initial sampling point; x ( p 0+ p n +△ p n ) represents the pixel at the sampling location; △ p n The offset corresponding to the initial sampling point is expressed as follows: ; Among them, Conv 3×3 (·) represents a 3×3 convolution; The method of capturing defect features at different locations on the strip surface using channel-space collaborative attention block (CSSAB) includes: Construct channel-space collaborative attention blocks (CSSAB) using Multi-Semantic Spatial Attention (MSSA) and Progressive Channel Self-Attention (PCSA); Multi-semantic spatial attention (MSSA) is used to spatially decompose and capture multi-semantic features of defects on the strip surface, learning spatial distribution and contextual relationships. Based on progressive channel self-attention (PCSA), a progressive compression strategy is used to weight the output features of the multi-semantic spatial attention (MSSA) to obtain defect features with different weights at different locations on the strip surface.

6. A computer device, characterized in that, The device includes a memory and a processor, wherein the memory stores a program that, when executed by the processor, causes the processor to perform the steps of a strip steel surface defect detection method based on a feature extraction network as described in any one of claims 1 to 4.

7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the strip surface defect detection method based on feature extraction network according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Yolov5 target detection method based on cross-stage routing attention module and residual information fusion module

    CN116721398A

  • Fan blade defect detection system and method based on multi-mode perception

    CN119180793A