Wavelet strip priori enhanced hot-rolled strip steel surface defect detection method
Patent Information
- Application Number
- CN202610886119.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-10-13
AI Technical Summary
[0005]然而,当检测目标进一步聚焦到在复杂纹理背景中稳定检出微弱、细长缺陷时,上述通用方案仍存在不足
[0010]综上所述,本发明针对热轧带钢表面缺陷普遍存在的尺度小、纹理对比度低、条带细长等特征,以及传统下采样与特征融合易导致高频细节丢失、细长结构响应不连贯的问题;在一阶段检测框架基础上,通过在网络前端引入小波–空间重排混合下采样(Wavelet–Space-to-DepthHybridStem,WSH-Stem)、在颈部融合阶段引入方向条带残差特征增强,提升对裂纹、划伤、压印等细长缺陷的检测与定位稳定性。
Smart Images

Figure CN122905937A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of industrial machine vision and computer vision technology, specifically to a method for detecting surface defects in hot-rolled strip steel using wavelet strip prior enhancement. Background Technology
[0002] Hot-rolled strip steel is an important raw material for industries such as engineering, automotive, and shipbuilding. During the rolling and subsequent processing, its surface is prone to defects such as cracks, scratches, indentations, and pitting. Timely detection and accurate location of defects not only affect product grading and outgoing quality control, but are also closely related to online process control and quality traceability.
[0003] In early engineering practices, the detection of surface defects in strip steel relied heavily on manual visual inspection or rule-based image processing. Subsequently, it evolved into traditional machine vision and statistical learning methods, such as grayscale thresholding, edge detection combined with morphological operations, and schemes based on texture features like Gabor filters / Gabor wavelets (Gabor), co-occurrence matrices, and local binary patterns (LBP) combined with classifiers like Support Vector Machines (SVM) and random forests. These methods can identify some typical defects in scenes with stable lighting and clear defect outlines. However, for low-contrast defects, complex background textures, and slender targets commonly found on hot-rolled strip steel, they often rely heavily on thresholds and empirical parameters, are sensitive to changes in imaging conditions, and have limited overall robustness.
[0004] With the development of deep learning, convolutional neural networks have gradually become the mainstream technology in this field. Related research has gradually transitioned from early image patch-based convolutional neural network (CNN) classification to end-to-end object detection frameworks. Among them, two-stage detectors, represented by faster region-based convolutional neural networks (FasterR-CNN), and one-stage detectors, represented by various versions of YOLO, have been widely used in steel strip defect datasets such as the Northeastern University Detection Dataset (NEU-DET) and the Galaxy Challenge 10 Defect Detection Dataset (GC10-DET), showing significant improvements in detection accuracy and inference efficiency compared to traditional methods. In engineering deployments, existing implementation schemes typically employ a general structure of "one-stage detector backbone network + neck multi-scale feature fusion + detection head." The neck area commonly uses a Feature Pyramid Network (FPN) and a Path Aggregation Network (PAN) for top-down and bottom-up feature aggregation to enhance the characterization and localization capabilities of multi-scale defects. This type of structure performs stably in detecting medium-sized defects with relatively clear contrast and is widely used and continuously improved by numerous online detection systems.
[0005] However, when the detection target is further focused on the stable detection of weak, slender defects in complex texture backgrounds, the above-mentioned general solutions still have shortcomings. On the one hand, mainstream convolutional neural networks in the early stages mostly used convolution or pooling with a stride of 2 for continuous downsampling, which easily produces irreversible smoothing of fine-grained textures and weak-contrast defects, causing high-frequency details to decay and the signal-to-noise ratio of small target defects in high-level features to decrease, resulting in missed detections or confidence fluctuations. On the other hand, a large number of defects in hot-rolled strip steel extend along the rolling direction, exhibiting a distinctly anisotropic strip shape. Conventional feature pyramids and path aggregation networks mostly use isotropic convolution kernels, which make it difficult to form a continuous and consistent response along the strip direction. Slender defects are prone to response breaks on the feature map, which in turn leads to unstable localization, boundary jitter, and false alarms under lateral texture interference.
[0006] In view of the above, this application is hereby submitted. Summary of the Invention
[0007] This invention provides a method for detecting surface defects in hot-rolled strip steel with wavelet strip prior enhancement, which can at least partially improve the above-mentioned problems.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] A wavelet-strip-Oriented YOLO11 (WSO-YOLO11) surface defect detection method is proposed, which uses a pre-trained WSO-YOLO11 model for processing. The specific processing steps are as follows: Acquire the surface image of the hot-rolled strip steel to be detected, and perform image preprocessing on the surface image of the hot-rolled strip steel to obtain the input feature map X; The WSH-Stem module is used to extract features from the input feature map X to obtain the extracted features Y. The WSH-Stem module consists of a spatial rearrangement submodule and a Haar wavelet downsampling submodule. The backbone network of the WSO-YOLO11 model is invoked to perform layer-by-layer representation learning on the extracted feature Y, resulting in multi-scale feature maps P3, P4, and P5. The OSR-Neck module is used to perform feature fusion and enhancement processing on multi-scale feature maps P3, P4 and P5 to generate fused feature Z; The fused feature Z is input into the detection head component of the WSO-YOLO11 model to obtain the candidate box set and its class prediction probability and bounding box regression value; The candidate box set is filtered based on the category prediction probability and bounding box regression value to obtain the final defect detection result set.
[0010] In summary, this invention addresses the common characteristics of surface defects in hot-rolled strip steel, such as small size, low texture contrast, and slender strips, as well as the problems that traditional downsampling and feature fusion methods easily lead to the loss of high-frequency details and inconsistent responses of slender structures. Based on a one-stage detection framework, this invention improves the stability of detection and localization of slender defects such as cracks, scratches, and indentations by introducing wavelet-space-to-DepthHybridStem (WSH-Stem) at the network front end and by introducing directional strip residual feature enhancement at the neck fusion stage.
[0011] This method can be used for online surface quality inspection in the hot-rolled strip steel production process. Combined with automated vision inspection equipment, it enables real-time detection, location, and statistical analysis of surface defects, providing technical support for quality monitoring, defect re-inspection, and quality traceability in the production process. At the same time, this lightweight inspection framework can also serve as a general industrial vision model for relevant defect detection tasks that use hot-rolled strip steel / plate surface images as input. Attached Figure Description
[0012] Figure 1 This is a schematic flowchart of the wavelet strip prior enhancement method for detecting surface defects in hot-rolled strip steel provided in an embodiment of the present invention.
[0013] Figure 2 This is a schematic diagram of the structure of the WSO-YOLO11 model provided in an embodiment of the present invention.
[0014] Figure 3 This is a schematic diagram of the structure of the WSH-Stem module provided in an embodiment of the present invention.
[0015] Figure 4 This is a schematic diagram of the OSR-Block structure in the OSR-Neck module provided in this embodiment of the invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0017] In current engineering applications, surface defect detection of hot-rolled strip steel generally adopts a general framework represented by one-stage detectors such as YOLO. However, when faced with the combined scenario of strip steel defects being "small in scale, long and thin in strip, and with low texture contrast", two typical problems still easily arise: First, during the conventional step-size downsampling process in the early stage of the main structure, high-frequency details and weak texture information are smoothed and weakened, resulting in insufficient features of small defects and an increased false negative rate. Second, in the general FPN / PAN fusion structure, there is a lack of continuous characterization of the long and thin strip structure with consistent direction, which often manifests as response breakage, positioning frame jitter, or unstable boundaries.
[0018] To address the aforementioned issues, the present invention aims to simultaneously enhance "fine-grained texture preservation" and "strip direction continuity perception" at the structural level, while maintaining lightweight design and deployability. This is achieved by proposing an improved network framework (i.e., the WSO-YOLO11 model) for surface defect detection in hot-rolled strip steel. Specifically, wavelet-spatial rearrangement hybrid downsampling is introduced into the shallow layers of the network to reduce detail loss, and directional strip residual feature enhancement is introduced in the neck fusion stage to improve the coherent response and localization stability of narrow and long defects. This results in improved detection accuracy and cross-dataset generalization performance while keeping parameter quantity and computational overhead controllable.
[0019] refer to Figure 1As shown, the first embodiment of the present invention discloses a wavelet strip prior-enhanced method for detecting surface defects in hot-rolled strip steel. This method uses a pre-trained WSO-YOLO11 model for processing and can be executed by a wavelet strip prior-enhanced hot-rolled strip steel surface defect detection device (hereinafter referred to as the detection device). Specifically, it is executed by one or more processors within the detection device to achieve the following method: Please see Figure 2 The WSO-YOLO11 model is an improvement on the YOLO11 detection network, wherein a WSH-Stem module (e.g., ...) is introduced at the front end of the backbone network of the YOLO11 detection network. Figure 2 The WSH-Stem in the YOLO11 detection network replaces the original first two layers of convolutional downsampling with a stride of 2; the OSR-Neck module is introduced into the mid-to-high-level fusion branch of the neck network of the YOLO11 detection network. The OSR-Neck module (such as WSH-Stem) Figure 2 In OSR-Neck, the original convolutional module in the corresponding branch is partially replaced by OSR-Block (OSR-Block is the basic residual unit of OSR-Neck), while the rest of the structure remains unchanged.
[0020] S1. Acquire the surface image of the hot-rolled strip steel to be detected, and perform image preprocessing on the surface image of the hot-rolled strip steel to obtain the input feature map X. R is the set of real numbers, C1 is the number of channels in the input feature map X, H is the height of the input feature map X, and W is the width of the input feature map X. The image preprocessing includes scale adjustment preprocessing and normalization preprocessing.
[0021] Specifically, in this embodiment, an image of the hot-rolled strip surface is acquired using an industrial camera or other image acquisition equipment. The acquired image undergoes scale adjustment and normalization preprocessing to ensure its resolution and numerical distribution meet the subsequent input requirements. The preprocessed image is denoted as the input feature map X and fed into the shallow layer of the network for further processing. This preprocessing step helps eliminate data distribution fluctuations caused by differences in imaging conditions, providing stable and standardized input for subsequent network modules, thereby ensuring the robustness of the entire detection process.
[0022] Please see Figure 3 S2, The WSH-Stem module is used to extract features from the input feature map X to obtain the extracted features Y. The WSH-Stem module consists of a spatial rearrangement submodule (Space-to-DepthDownsampling, SPDConvDown) and a Haar wavelet downsampling submodule (HaarWaveletDownsampling, HaarDownsample). Specifically, step S2 further includes: applying a space-to-depth spatial rearrangement operator to the input feature map X using a spatial rearrangement submodule, thereby rearranging adjacent features... Space Block Folding down to the channel dimension yields rearranged features. , The formula for its mapping relationship is: c is the channel index, i is the local row offset within the spatial block, j is the local column offset within the spatial block, h is the spatial row index, w is the spatial column index, and a, b, c, and d are all pixel values of the spatial block. Based on rearrangement features ,use Convolutional layers, batch normalization, and the SiLU activation function compress and reweight the channels to obtain the first intermediate feature F. Its formula is: , The SiLU activation function is used. For batch normalization, for Convolutional layer for The convolution kernel parameters of the convolutional layer, where C2 is the number of channels in the first intermediate feature F. (From...) Figure 3 It can be seen that the spatial rearrangement submodule adopts The fusion process performs spatial-to-depth downsampling, where B is the batch size.
[0023] The Haar wavelet downsampling submodule uses a fixed Haar wavelet convolution kernel group to perform a second downsampling process on the first intermediate feature F, decomposing the first intermediate feature F into a low-frequency subband coefficient LL (Low-Low sub-band) and three high-frequency subband coefficients LH (Low-High sub-band), HL (High-Low sub-band), and HH (High-High sub-band), as shown in the formula: , ,like Figure 3 It can be seen that the Haar wavelet downsampling submodule has Haar subband downsampling with learnable fusion function, and HW is Haar wavelet transform; To enable the network to adaptively learn the importance of different subbands, the coefficients of the four subbands are concatenated in the channel dimension and then processed by... The convolutional layers perform learnable fusion to obtain the extracted feature Y, and the formula is as follows: , , C3 represents the number of channels for the extracted feature Y, which is the trainable fusion weight. The extracted feature Y serves as the input to the subsequent backbone network, providing a more structured and detailed texture representation for subsequent multi-scale feature construction.
[0024] In this embodiment, to preserve as much fine-grained texture and high-frequency edge information of the steel strip surface defects as possible at the front end of the network, the present invention introduces WSH-Stem at the front end of the backbone of the first-stage detector to replace the original first two layers of convolutional downsampling with a stride of 2. WSH-Stem consists of a cascaded structure of spatial rearrangement and Haar wavelet downsampling: the former completes one downsampling by "spatial rearrangement first, then linear fusion", while the latter introduces Haar wavelet subband decomposition and performs learnable fusion during the second downsampling, thereby achieving decoupling and enhancement of high / low frequency information while maintaining the overall downsampling ratio unchanged.
[0025] Specifically, the spatial rearrangement submodule first applies a spatial-to-depth rearrangement operator to the input feature map X. Its core idea is to abandon the traditional stride convolution approach of directly discarding spatial information, and instead fold pixels within adjacent spatial blocks intact to the channel dimension, thus compressing the spatial size while preserving all original pixel information. During the rearrangement process, for each channel of the input feature map, its four spatially adjacent pixels are reorganized into a feature map with four times the number of channels, and the spatial size is halved accordingly. After rearrangement, pointwise convolution combined with batch normalization and the SiLU activation function is used to linearly compress and adaptively reweight the folded channels to obtain the first intermediate feature F. Here, pointwise convolution is not a simple channel fusion, but rather establishes the most favorable combination relationship for subsequent recognition between pixel information at different spatial locations in a learnable way. This enhances important texture channels and suppresses redundant or noisy channels, laying a high-quality representation foundation for the next stage of frequency domain decomposition.
[0026] Subsequently, the Haar wavelet downsampling submodule performs a second downsampling process on the first intermediate feature F. Unlike conventional downsampling which directly takes the average or maximum value, this submodule uses a fixed set of Haar wavelet convolution kernels to perform subband decomposition on each single-channel spatial block of the processed feature. Each group of adjacent pixels is transformed into a low-frequency subband coefficient LL and three high-frequency subband coefficients LH, HL, and HH in different directions. The LL coefficient corresponds to the overall smooth approximation information of the spatial block, the LH coefficient mainly captures horizontal edge variations, the HL coefficient corresponds to vertical edge variations, and the HH coefficient reflects detailed changes in the diagonal direction. This decomposition method essentially performs frequency-domain layering of the feature information—the low-frequency subband preserves the overall shape and contour of the defect, while the three high-frequency subbands record fine structures such as texture abrupt changes and edge directions from different directions. This prevents the network from dealing with an undifferentiated mixed signal, instead providing a structured, multi-component representation organized by frequency and direction.
[0027] After subband decomposition, the coefficients of the four subbands are concatenated along the channel dimension and fed into a pointwise convolutional layer for learnable fusion, ultimately yielding the output feature Y of WSH-Stem. This fusion is not a simple fixed weighting, but rather uses trainable fusion weights to allow the network to automatically discover the differences in contribution of different subbands to the detection task during training—some defects may mainly manifest in low-frequency morphological changes, while other minor scratches rely on high-frequency directional subbands to highlight their existence. With this learnable fusion mechanism, WSH-Stem effectively avoids the irreversible smoothing effect of conventional stride convolution on fine-grained textures and weak-contrast defects while maintaining the overall downsampling rate. This ensures that small-sized defects and low-contrast defects are adequately preserved before entering the deeper layers of the backbone network. The resulting output feature Y serves as the input to the subsequent backbone network, providing a more structured and detailed texture representation foundation for multi-scale feature construction, reducing the risk of missed detections caused by information loss due to downsampling from the source.
[0028] In step S3, the backbone network of the WSO-YOLO11 model is invoked to perform layer-by-layer representation learning on the extracted feature Y, resulting in multi-scale feature maps P3, P4, and P5. P3 maintains relatively high spatial resolution to cover small-scale and weak-contrast defects, while P4 and P5 provide stronger semantic abstraction capabilities to support the discrimination and localization of multi-class defects. These multi-scale features will be further input into the neck feature fusion structure to enhance the robustness of defect detection at different scales.
[0029] The backbone network of the WSO-YOLO11 model includes convolutional layers, C3K2 modules, spatial pyramid pooling modules, and C2PSA modules.
[0030] Specifically, in this embodiment, the backbone network of the WSO-YOLO11 model consists of convolutional layers (such as... Figure 2 Conv), C3K2 module (such as Figure 2 C3K2 in the middle), spatial pyramid pooling module (such as C3K2 ...) Figure 2 SPPF) and C2PSA modules (such as Figure 2The network is composed of stacked components such as C2PSA, with each component having a clear division of labor and working collaboratively. The convolutional layer, as the basic unit of the network, undertakes the task of layer-by-layer feature extraction and channel dimension transformation, gradually abstracting the fine-grained texture and high-frequency edge information preserved by WSH-Stem into more discriminative feature representations. The C3K2 module is the core feature extraction module in the backbone network. Through the design concept of cross-stage partial connections, it improves the diversity and representational ability of features while efficiently utilizing computational resources, helping to further consolidate the representation of small-sized defects and weak-contrast defects in deep features. The spatial pyramid pooling module aggregates contextual information of the same feature map at different spatial scales through parallel pooling operations with multiple different receptive fields, effectively fusing local details with global semantic information. This significantly increases the receptive field coverage of the features at the end of the backbone network, ensuring that even the deepest features retain sensitivity to the target spatial range. This is particularly crucial for detecting various surface defects of strip steel with large size differences. The C2PSA module introduces a local self-attention mechanism into the backbone network. Through channel grouping and partial self-attention calculation, it enhances the network's ability to model global spatial dependencies, enabling effective information interaction between regions that are far apart in the feature map. This allows for more accurate differentiation between defective and non-defective regions when faced with complex background textures on the strip surface.
[0031] The backbone network outputs feature maps at three scales at different depth stages. P3, output from a relatively shallow layer, has a lower spatial downsampling rate, maintaining high spatial resolution and fully covering the fine-grained location information of small-scale and low-contrast defects, preventing the network's response to small targets from being attenuated by over-compression. P4 and P5, from the middle and deep layers of the network respectively, have undergone deeper semantic abstraction and larger receptive field accumulation, providing stronger semantic discriminative ability to support the classification and localization of multi-category defects. These three scale feature maps, from shallow to deep, constitute a progressive representation spectrum from spatial precision to semantic abstraction, providing a rich multi-scale information foundation for the subsequent neck feature fusion structure. This allows the network to simultaneously ensure the localization accuracy of small-scale defects and the classification reliability of larger-sized defects. The generated multi-scale features are further input into the neck feature fusion structure, and path aggregation further enhances the robustness of detecting defects of different scales.
[0032] Please see Figure 4 S4, the OSR-Neck module (Orientation-StripResidualNeck) is used to perform feature fusion enhancement processing on multi-scale feature maps P3, P4 and P5 to generate fused feature Z; Specifically, step S4 further includes: applying point convolution to the input features Channel rearrangement and feature transformation are performed to obtain the second intermediate feature. , ; use Depthwise separable convolution branches (e.g.) Figure 4 In DW Conv) and The directional strip convolution branch performs parallel filtering, resulting in three branch outputs: , and k is the strip convolution kernel size parameter. Output for the first branch. Output for the second branch. Output for the third branch; The third intermediate feature is obtained by fusing the outputs of the three branches through element-wise addition. , This is an element-wise addition; To write back the directional strip information to the original channel dimension, channel recovery is performed on the third intermediate feature V, and the responses of different directions are reweighted to obtain the fourth intermediate feature. , , All of these are convolution kernel parameters; When it is determined that the input and output channels are consistent (C) in =C out By introducing residual connections to stabilize the feature distribution, the fused feature Z is obtained. The size of the k-strip convolution kernel is an adjustable parameter: in the setting where only OSR-Neck is introduced, both fusion branches have k=7; in the setting where it is combined with WSH-Stem to form WSO-YOLO11, to avoid excessive coupling with high-frequency texture information in the front end and to balance fine texture and feature stability, the P4 branch has k=7, and the P3 branch has k=5. in For input channels, C out This is the output channel.
[0033] The OSR-Neck module includes a splicing layer (such as...) Figure 2 Concat in (e.g., upsampling layer) Figure 2 Upsample and convolutional layers.
[0034] In this embodiment, to improve the continuous response of slender strip defects on the feature map and reduce positioning jitter, the present invention introduces OSR-Neck into the mid-to-high-level fusion branch of the standard FPN / PAN, and replaces the original convolutional module in the corresponding branch with OSR-Block, while keeping the rest of the structure unchanged. OSR-Block enhances local edge details and directional continuity structure simultaneously at the same spatial location through a parallel modeling method of "local texture branch + vertical strip branch + horizontal strip branch", thereby enhancing the stable characterization of defects extending along the rolling direction.
[0035] Specifically, the overall structure of OSR-Neck is built upon a bidirectional fusion framework of a standard feature pyramid network and a path aggregation network. Its improvement lies in replacing the original ordinary convolutional modules in the mid-to-high-level fusion branches with directional strip residual modules, denoted as OSR-Block, while the macroscopic connection paths of the bidirectional feature aggregation remain unchanged. This design balances the general advantages of standard multi-scale fusion structures with its specific adaptability to the morphology of strip defects. Inside OSR-Block, the input features first undergo channel rearrangement and feature transformation through pointwise convolution, followed by batch normalization and the SiLU activation function to obtain the second intermediate feature. The role of pointwise convolution here is to reorganize the channel relationships of the input features, compressing or mapping the original channel information to an intermediate dimension more suitable for subsequent multi-branch parallel processing, providing a unified feature base for the local texture branch and the directional strip branch, while achieving adaptive information filtering through learnable channel transformations.
[0036] Subsequently, the second intermediate feature is fed in parallel into three convolutional branches for filtering. The first branch uses conventional depthwise separable convolution to capture local texture and spatial details, maintaining good perception of general edges and texture patterns in defect areas. The second branch uses lateral strip convolution, with its kernel extending horizontally into a one-dimensional strip shape, enabling coherent response accumulation along the rolling direction and generating a stronger activation signal for slender defects extending horizontally. The third branch uses longitudinal strip convolution, with its kernel extending vertically, complementing the lateral branch and ensuring directional adaptability to strip defects with different orientations. The strip convolution kernel size parameter k can be flexibly configured according to the actual scenario, taking a larger value in high-level fusion branches to provide a wider directional receptive field, and a moderate value in shallow branches to balance fine texture preservation and feature stability. The outputs of the three branches are fused element-wise, directly accumulating local texture information, lateral strip structure responses, and longitudinal strip structure responses at their corresponding spatial locations to generate the third intermediate feature. This feature simultaneously contains isotropic local details and anisotropic directional continuous structures, enabling parameter-free and efficient fusion of the two types of information.
[0037] To effectively write the directional stripe information back to the original channel dimension, pointwise convolution is applied again to the third intermediate feature for channel recovery. Combined with batch normalization and the SiLU activation function, the responses in different directions are reweighted to obtain the fourth intermediate feature. Here, the kernel parameters of the pointwise convolution adaptively weight the horizontal and vertical stripe information in a learnable manner, enabling the network to automatically adjust the contribution of different directional branches to the final output based on the actual shape of the defect. When the number of channels of the input and output features is detected to be consistent, a residual connection is introduced in OSR-Block, adding the fourth intermediate feature element-wise to the original input feature to obtain the final fused feature Z. This residual connection allows the directional stripe enhancement information to be incrementally superimposed on the original features, ensuring that the newly added directional modeling capability is reflected while maintaining the stability of the original feature distribution. This effectively reduces the difficulty of training deep networks and avoids introducing additional optimization burdens due to structural modifications. By processing P3, P4, and P5 using OSR-Neck, enhanced representations of directional continuous structures were obtained for feature maps at each scale. This resulted in a more coherent and consistent response along the strip direction for slender defects at the feature map level, significantly improving the localization stability of slender defects. It also effectively suppressed boundary jitter caused by response breakage and false alarms caused by lateral texture interference, laying a high-quality feature foundation for accurate prediction by the subsequent detection head.
[0038] S5, input the fused feature Z into the detection head component of the WSO-YOLO11 model to obtain the candidate box set and its category prediction probability and bounding box regression value; In this embodiment, the defect category probability and bounding box regression values are output at each scale. While maintaining the overall structural and inference efficiency advantages of the one-stage detector, the detection head, combined with the directional continuity representation provided by OSR-Neck, enables slender defects to obtain more stable classification confidence and more consistent boundary regression during the prediction stage.
[0039] Specifically, the detection head component operates on multi-scale features enhanced by OSR-Neck. Each spatial location on the feature map at each scale is coupled with a predefined anchor box mechanism or mesh partitioning method, simultaneously outputting two types of information: one is the predicted probability of each candidate box belonging to each defect category, and the other is the position offset regression of each candidate box's bounding box. Since the detection head directly predicts based on the enhanced features provided by OSR-Neck, its input features have already obtained enhanced representation of directional continuity in the preceding stage. The response of slender strip defects on the feature map no longer exhibits a fragmented and scattered form, but instead forms a coherent and consistent high-response region along the rolling direction. This directional continuity representation translates into two direct performance gains in the prediction stage: in classification, the coherent strip response makes the feature convergence of the defect region more sufficient, and the prediction confidence of each candidate box for the defect category is more stable, reducing low-confidence missed detections caused by response fragmentation; in localization, the directional continuity of the boundary information makes the regressed bounding boxes more accurate in terms of length and endpoint positions along the strip direction, effectively alleviating the problems of localization box jitter and boundary instability. The detection head outputs the prediction results of all candidate boxes in parallel on the multi-scale feature layer. These results will enter the post-processing stage for further screening and refinement.
[0040] S6. Based on the category prediction probability and bounding box regression, the candidate box set is filtered to obtain the final defect detection result set.
[0041] Specifically, step S6 further includes: Let the nth candidate box in the candidate box set be... Its target confidence level is The predicted probability for the m-th defect category is The candidate boxes in the candidate box set are sorted and initially screened, and the overall confidence score of the nth candidate box is calculated. Based on confidence threshold Threshold filtering is applied to all candidate boxes to obtain the initial candidate set. ; To suppress repeated predictions of the same defective target, non-maximum suppression is performed on the initial candidate set according to each category, and two candidate boxes are randomly selected. and Calculate its intersection-union ratio , To find the area function, This is the l-th candidate box; For candidate boxes within the same category, they are sorted from highest to lowest overall confidence score. The candidate boxes with the highest scores in each category are then added to the final detection set. Finally, boxes with an intersection-union (IoU) ratio greater than the IoU threshold are selected from the candidate boxes in the final detection set. The remaining candidate boxes are suppressed and eliminated until the final detection set is traversed, resulting in the final defect detection result set. Among these, the confidence threshold... and IoU threshold These are configurable inference hyperparameters used to balance the false alarm rate and the false alarm rate.
[0042] In this embodiment, firstly, a comprehensive confidence assessment is performed on each candidate box in the candidate box set. The comprehensive confidence score of a candidate box is determined by two parts of information: first, the target confidence score, reflecting the probability that a defective target exists within the candidate box; and second, the maximum predicted probability of the candidate box for all defect categories, reflecting the degree of certainty that it belongs to the most likely category. Multiplying the two results in the comprehensive confidence score of the candidate box. This scoring mechanism takes into account both the "whether it is a target" and "what the target is," ensuring that only candidate boxes that perform well in both aspects receive high scores, effectively preventing candidate boxes that excel in only one aspect but are unreliable overall from entering the subsequent process. Based on the comprehensive confidence score and a preset confidence threshold, all candidate boxes undergo preliminary threshold screening, filtering out low-quality candidate boxes with scores below the threshold to obtain a preliminary candidate set. The confidence threshold is a configurable inference hyperparameter, which can be flexibly adjusted in actual deployment according to the trade-off between false negative and false alarm rates.
[0043] Since the detection head outputs candidate boxes at various spatial locations across the multi-scale feature layers, the same defect target may be repeatedly detected by multiple candidate boxes of similar size and location. To eliminate such redundant predictions, non-maximum suppression is performed on the initial candidate set according to the defect category. For candidate boxes of the same category, they are first sorted from high to low based on their overall confidence score. Starting with the candidate box with the highest score, each box is added to the final detection set in turn, and the intersection-union ratio (IoU) between this candidate box and the remaining candidate boxes of the same category in the initial candidate set is calculated. When the IoU between a remaining candidate box and the candidate boxes already included in the final detection set exceeds a preset IoU threshold, it indicates that the candidate box highly overlaps with the higher-scoring candidate box and is considered a duplicate prediction of the same defect target, thus being suppressed and removed. The above process is repeated until the traversal is complete, resulting in the final defect detection result set. The IoU threshold is also a configurable inference hyperparameter used to control the degree of overlap at which two candidate boxes are considered to point to the same target; its value directly affects the strength of duplicate detection removal.
[0044] Through the combined post-processing workflow of threshold screening and non-maximum suppression, a large number of low-confidence false alarms and redundant predictions in the candidate box set are systematically removed, ultimately retaining a small number of high-confidence, spatially non-overlapping detection boxes as output. Each detection box in the final defect detection result set includes a defect category label, location bounding box, and confidence score, providing accurate and reliable detection basis for subsequent defect statistics, product grading, and quality traceability.
[0045] In summary, this method still adopts the "Backbone–Neck–Head" framework of a one-stage detection network (such as the YOLO11 detection network), and makes targeted structural modifications in the downsampling stage and neck feature fusion stage of the network front end to form a wavelet-strip prior enhancement detection process. It mainly includes six stages: strip surface image acquisition and preprocessing, wavelet-spatial rearrangement hybrid downsampling, multi-scale backbone feature generation, directional strip residual neck network, detection head prediction, and non-maximum suppression post-processing. For ease of description, the improved detection network that simultaneously introduces WSH-Stem and OSR-Neck into the YOLO11 baseline framework is named the Wavelet-Strip Prior Enhanced YOLO11 Detection Network; where WSH-Stem is for fine-grained texture preservation in shallow downsampling, and OSR-Neck is used for continuous characterization enhancement in strip direction. Through this combination, the detection reliability and localization stability of weak and slender defects in hot-rolled strip are improved while maintaining lightweight design and online deployment requirements. First, images of the steel strip surface are acquired and scaled and normalized. Then, in the shallow layers of the network, the original first two stride convolutions are replaced with WSH-Stem. The downsampling process is performed by "space-to-depth" + "Convolutional fusion" and "Haar wavelet subband decomposition downsampling + The "learnable fusion" cascade is completed to preserve fine-grained texture and high-frequency detail features while keeping the downsampling rate constant.
[0046] The backbone network further extracts multi-scale features at P3, P4, and P5 (corresponding to feature layers with different downsampling ratios); FPN / PAN is used in the neck region, and OSR-Neck is introduced in its P5→P4 and P4→P3 branches, replacing the original convolutional blocks with OSR-Blocks. Depth convolution branching The parallel modeling of local texture and orientation continuity is achieved through vertical and horizontal strip convolution branches. After channel recovery, residual connections are used to stabilize the feature distribution and adjust the coverage of orientation modeling. Finally, the detection head outputs the defect category probability and bounding box regression on multi-scale features, and the final defect detection result is obtained through confidence filtering and non-maximum suppression.
[0047] Compared with existing technologies, this method has the following advantages: 1. Addressing the characteristics of hot-rolled strip steel surface defects such as "small size, low texture contrast, and obvious slender strip morphology," this invention introduces WSH-Stem at the front end of the one-stage detection framework. Through a hybrid downsampling method combining spatial rearrangement and Haar wavelet subband decomposition, it enhances the retention of fine-grained texture and high-frequency edge information while maintaining the downsampling ratio, thereby improving the distinguishability of small defects and weak contrast defects in deep features and reducing the risk of missed detection. 2. Addressing the problem of response breakage and unstable positioning of slender strip defects in conventional FPN / PAN fusion structures, this invention introduces OSR-Neck in the neck fusion branch and uses parallel modeling of directional continuous structures with longitudinal / transverse strip convolution branches of OSR-Block. This enables the network to form a more coherent and consistent response along the rolling direction, thereby improving the positioning stability of slender defects and suppressing false alarms caused by transverse texture interference. 3. Under the premise of controllable parameter quantity and computational cost, the present invention can achieve better detection accuracy and cross-dataset generalization performance: the WSO-YOLO11 parameter quantity is about 9.0M, which is about 4.3% less than YOLO11s (about 9.4M); on the public dataset NEU-DET: mAP@0.5 increased from 73.5% to 75.8%, mAP@0.5:0.95 increased from 38.2% to 39.7%, and F1 value increased from 68.1% to 69.3%; and different levels of mAP improvement were achieved on other common public datasets GC10-DET, X-SDD and KSDD2, with the highest mAP@0.5 improving by 6.1 percentage points compared to the baseline, demonstrating more stable detection capability under different defect morphologies and complex background conditions.
[0048] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement, characterized in that, The pre-trained WSO-YOLO11 model is used for processing. The specific processing steps are as follows: Acquire the surface image of the hot-rolled strip steel to be detected, and perform image preprocessing on the surface image of the hot-rolled strip steel to obtain the input feature map X; The WSH-Stem module is used to extract features from the input feature map X to obtain the extracted features Y. The WSH-Stem module consists of a spatial rearrangement submodule and a Haar wavelet downsampling submodule. The backbone network of the WSO-YOLO11 model is invoked to perform layer-by-layer representation learning on the extracted feature Y, resulting in multi-scale feature maps P3, P4, and P5. The OSR-Neck module is used to perform feature fusion and enhancement processing on multi-scale feature maps P3, P4 and P5 to generate fused feature Z. The fused feature Z is input into the detection head component of the WSO-YOLO11 model to obtain the candidate box set and its class prediction probability and bounding box regression value; The candidate box set is filtered based on the category prediction probability and bounding box regression value to obtain the final defect detection result set.
2. The method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement according to claim 1, characterized in that, The WSO-YOLO11 model is an improvement on the YOLO11 detection network. Specifically, a WSH-Stem module is introduced at the front end of the backbone network of the YOLO11 detection network to replace the original first two layers of convolutional downsampling with a stride of 2. An OSR-Neck module is introduced in the mid-to-high-level fusion branch of the neck network of the YOLO11 detection network. The OSR-Neck module is formed by replacing the original convolutional module in the corresponding branch with OSR-Block, while the rest of the structure remains unchanged.
3. The method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement according to claim 1, characterized in that, The image preprocessing includes scale adjustment preprocessing and normalization preprocessing.
4. The method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement according to claim 1, characterized in that, The WSH-Stem module is used to extract features from the input feature map X, resulting in the extracted features Y, specifically: The spatial rearrangement submodule applies a space-to-depth spatial rearrangement operator to the input feature map X, rearranging adjacent elements... Space Block Folding down to the channel dimension yields rearranged features. The formula for its mapping relationship is: c is the channel index, i is the local row offset within the spatial block, j is the local column offset within the spatial block, h is the spatial row index, w is the spatial column index, and a, b, c, and d are all pixel values of the spatial block. Based on rearrangement features ,use Convolutional layers, batch normalization, and the SiLU activation function compress and reweight the channels to obtain the first intermediate feature F, whose formula is: , The SiLU activation function is used. For batch normalization, for Convolutional layer for Convolution kernel parameters of convolutional layers.
5. The method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement according to claim 4, characterized in that, Also includes: The Haar wavelet downsampling submodule uses a fixed Haar wavelet convolution kernel group to perform a second downsampling process on the first intermediate feature F, decomposing the first intermediate feature F into a low-frequency subband coefficient LL and three high-frequency subband coefficients LH, HL, and HH in three directions. The formula is as follows: ; After splicing the four sub-band coefficients in the channel dimension, through The convolutional layers perform learnable fusion to obtain the extracted feature Y, and the formula is as follows: , These are trainable fusion weights.
6. The method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement according to claim 1, characterized in that, The backbone network of the WSO-YOLO11 model includes convolutional layers, C3K2 modules, spatial pyramid pooling modules, and C2PSA modules.
7. The method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement according to claim 4, characterized in that, The OSR-Neck module is used to perform feature fusion enhancement on multi-scale feature maps P3, P4, and P5 to generate fused feature Z, specifically: Apply point convolution to the input features Channel rearrangement and feature transformation are performed to obtain the second intermediate feature. , ; use Depthwise separable convolution branches and The directional strip convolution branch performs parallel filtering, resulting in three branch outputs: , and k is the strip convolution kernel size parameter. Output for the first branch. Output for the second branch. Output for the third branch; The third intermediate feature is obtained by fusing the outputs of the three branches through element-wise addition. , This is an element-wise addition; Channel recovery is performed on the third intermediate feature V, and the responses in different directions are reweighted to obtain the fourth intermediate feature. , , All of these are convolution kernel parameters; When the input and output channels are determined to be consistent, a residual connection is introduced to stabilize the feature distribution, resulting in the fused feature Z. .
8. The method for detecting surface defects in hot-rolled strip steel with wavelet strip prior reinforcement according to claim 1, characterized in that, The candidate box set is filtered based on the category prediction probability and bounding box regression value to obtain the final defect detection result set, as follows: Let the nth candidate box in the candidate box set be... Its target confidence level is The predicted probability for the m-th defect category is The candidate boxes in the candidate box set are sorted and initially screened, and the overall confidence score of the nth candidate box is calculated. Based on confidence threshold Threshold filtering is applied to all candidate boxes to obtain the initial candidate set. ; Non-maximum suppression is applied to the initial candidate set according to each category, and two candidate boxes are randomly selected. and Calculate its intersection-union ratio , To find the area function, This is the l-th candidate box; For candidate boxes within the same category, they are sorted from highest to lowest overall confidence score. The candidate boxes with the highest scores in each category are then added to the final detection set. Finally, boxes with an intersection-union (IoU) ratio greater than the IoU threshold are selected from the candidate boxes in the final detection set. The remaining candidate boxes are suppressed and eliminated until the final detection set is traversed, resulting in the final defect detection result set.