A cold-rolled steel sheet surface defect detection method based on multi-dimensional feature perception
By employing a multi-dimensional feature perception detection method, the problems of illumination variation and background interference in the surface defect detection of cold-rolled steel sheets have been solved, achieving high-precision and high-efficiency defect detection and improving the robustness and industrial applicability of the detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING KEYE INTELLIGENT TESTING TECHNOLOGY CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-05
AI Technical Summary
Existing methods for detecting surface defects in cold-rolled steel sheets suffer from high false detection rates, missed detection of minor defects, and false alarms in ineffective areas under complex background interference, making it difficult to meet the speed, accuracy, and consistency requirements of modern production lines.
A multi-dimensional feature-aware detection method is constructed by employing a nonlinear illumination decoupling and adaptive correction module based on generative adversarial networks, a spatiotemporal fusion dynamic defect reconstruction module with optical flow constraints, an adaptive fractional-order differential noise gating module with chaotic mapping, a multi-scale holographic gradient aggregation and feature correction module, an adaptive irregular block segmentation module with variational autoencoder, a frequency-space dual-domain collaborative background decoupling module, and a material-aware multimodal topological distance field module, thereby improving the accuracy and robustness of defect detection.
It effectively eliminates light interference and background noise, ensuring the stability and integrity of defect features, improving the accuracy and efficiency of surface defect detection in cold-rolled steel sheets, and optimizing detection speed and industrial applicability.
Smart Images

Figure CN122156137A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of surface defect detection technology, and specifically to a method for detecting surface defects in cold-rolled steel sheets based on multidimensional feature perception. Background Technology
[0002] Cold-rolled steel sheets are fundamental materials in key sectors such as automobile manufacturing, aerospace, home appliances, and defense equipment. Their surface quality directly affects the performance, safety, and service life of the final products. During high-speed, continuous production, various defects inevitably arise on the surface of cold-rolled steel due to factors such as rolling processes, equipment conditions, and raw materials. These defects include surface inclusions, iron oxide scale, scratches, patches, and scale. These defects vary in shape and size, ranging from tiny point-like flaws to large-area sheet-like anomalies, and often exhibit significant "intra-class diversity" (e.g., scratches vary in width, length, and direction) and "inter-class similarity" (e.g., fine scratches and linear inclusions are visually difficult to distinguish), posing a significant challenge to inspection.
[0003] To ensure the quality of cold-rolled steel sheets and guide the optimization of production processes, rapid and accurate defect detection of the steel sheet surface is typically required. Currently, surface inspection of cold-rolled steel sheets includes manual inspection and traditional visual inspection. Manual inspection, as the most primitive method, relies on the visual observation and experience of inspectors. This method is not only labor-intensive and inefficient, but also highly subjective, easily affected by factors such as fatigue and experience level, and cannot meet the speed, accuracy, and consistency requirements of modern production lines. Traditional visual inspection uses industrial cameras to acquire images and employs manually designed feature extraction algorithms (such as those based on Fourier transform, wavelet transform, Gabor filters, or Local Binary Pattern (LBP)) combined with traditional classifiers (such as Support Vector Machines, SVM) for defect identification. Compared to manual inspection, this method achieves automation and objectivity, but its core drawback lies in its reliance on manual feature engineering. These features are usually designed for specific types of defects, lack generalization ability, and are highly sensitive to changes in lighting, background texture noise, and the diversity of defect morphology, resulting in poor system robustness and difficulty in adapting to complex industrial environments.
[0004] In summary, existing methods for detecting surface defects in cold-rolled steel sheets suffer from several problems, including high false detection rates due to complex background interference, missed detections caused by minute defects in the steel sheet edge areas (such as microcracks and edge notches), and identification errors due to the irregular shape of the steel sheet itself (e.g., due to the irregular shape of the steel sheet and the presence of holes, conventional rectangular detection frames are prone to generating false alarms in non-metallic areas). These issues lead to false detections and missed detections, affecting the detection efficiency and accuracy of cold-rolled steel sheets. Summary of the Invention
[0005] To address the problems existing in the prior art, the present invention aims to provide a method for detecting surface defects of cold-rolled steel sheets based on multi-dimensional feature perception. This method achieves the monitoring of surface defects of cold-rolled steel sheets through input layer preprocessing, backbone network feature enhancement, neck network background decoupling, and detection head topology detection, thereby solving problems such as complex background interference, missed detection of minor defects, false alarms in ineffective areas, dynamic blurring, illumination changes, and noise amplification, effectively improving the defect detection accuracy, robustness, and industrial applicability.
[0006] The objective of this invention is achieved through the following technical solution:
[0007] A method for detecting surface defects in cold-rolled steel sheets based on multidimensional feature perception, comprising: Step S1, Input Layer: The input layer receives the original image of cold-rolled steel plate captured by the industrial camera. After processing by the nonlinear illumination decoupling and adaptive correction module based on generative adversarial network and the spatiotemporal fusion dynamic defect restoration module based on optical flow constraint, the corrected and restored fused feature map is output. Step S2, Backbone Network: The backbone network takes the fused feature map as input, first suppresses industrial random instantaneous noise (such as oil stain reflection, salt and pepper noise, pixel jitter, etc.) through an adaptive fractional differential noise gating module based on chaotic mapping, and then realizes the aggregation and correction of multi-scale high-order gradient features (strengthening the feature representation of weak edge defects such as microcracks and edge gaps) through a multi-scale holographic gradient aggregation and feature correction module to obtain a corrected feature map; Step S3, Neck Network: The neck network takes the corrected feature map as input. First, it achieves adaptive block division based on frequency domain feature similarity through the adaptive irregular block division module based on variational autoencoder (ensuring that the defect features fall completely into the same block). Then, it achieves dual background decoupling of frequency domain and spatial domain through the frequency-space dual-domain collaborative background decoupling module (removing the interference of periodic background texture) to obtain a clean feature map. Step S4, Detection Head: The detection head takes the clean feature map as input, first constructs a multimodal topological distance field through the material-aware multimodal topological distance field module (incorporating the heterogeneous features of steel plate material and avoiding the problem of topological field modeling that only depends on spatial position), and then outputs the detection results through the topological awareness and uncertainty dynamic rectification detection head (that is, realizing defect classification, uncertainty regression and confidence rectification of topological constraints), thus completing the detection of surface defects of cold-rolled steel plate.
[0008] Based on further optimization of the above scheme, step S1, which involves processing the original image through a nonlinear illumination decoupling and adaptive correction module based on a generative adversarial network, specifically includes: Feature decoupling: The generator G decouples the input raw image (H and W represent the height and width of the image, and 3 represents the RGB channels) Mapped to illumination-invariant features X inv and characteristics of light change X var ,satisfy: ; Adversarial training: Discriminator D distinguishes features invariant to real illumination. X inv-real (Extracted from offline labeled samples with no illumination changes) and the generated illumination-invariant features X inv By optimizing the generator against loss, X inv Maximize the preservation of defect features; Generator decoupling loss (to ensure the accuracy of feature decomposition): ; Adversarial loss (a zero-sum game between generator G and discriminator D): ; In the formula: E[] represents the expectation operator; Total generator loss: ; In the formula: This represents the loss balance coefficient against the attack; Discriminator loss: ; According to light intensity factor Invariant characteristics under illumination X inv Perform correction and output illumination correction feature map. X lc : ; In the formula: ( x, y () represents the pixel coordinates of the image; k c This represents the light intensity adjustment coefficient; k py This represents the offset coefficient.
[0009] Based on further optimization of the above scheme, in step S1, the image processing performed by the spatiotemporal fusion dynamic defect reconstruction module based on optical flow constraints is specifically as follows: For illumination correction feature map X lc Retrieve images of the current frame, previous frame, and next frame. The pyramid LK optical flow method is used to calculate pixel-level motion vectors. ux , u y ): ; In the formula: This represents the gradient of the feature map in the current frame; Then, calculate the average speed of the steel plate. v t (Reflecting the degree of motion blur): ; Subsequently, the blurred region features are completed by temporal frame interpolation to obtain the restored feature map. : ; In the formula: M f (x, y) Indicates a mask for a blurred region; Finally, the restored feature map and the current frame feature map are fused together to output the fused feature map. X st : ; ; In the formula: Represents the weights of time-series features; v 0 represents the critical velocity.
[0010] Based on further optimization of the above scheme, in step S2, suppressing industrial random instantaneous noise through an adaptive fractional-order differential noise gating module based on chaotic mapping specifically involves: First, calculate the fused feature map. X st Local 5×5 neighborhood noise factor : ; In the formula: Represents pixels ( x, y The 5×5 neighborhood features of ) Var () Mean () represent the neighborhood variance and mean, respectively; Then, a Logistic chaotic mapping is used to generate the feature map size (i.e. H × W Consistent chaotic sequences C ( x, y The chaotic noise mask is obtained by fusing it with the neighborhood noise factor. M cn ( x, y ), Logistic chaotic mapping: ; Chaotic noise mask: ; In the formula: Indicates the chaos control parameters; This represents the Sigmoid activation function; Then define the order of the differential. V ( x, y () is the negative correlation function of the noise factor, enabling pixel-level dynamic adjustment of the order, thus achieving adaptive fractional-derivative order adjustment: ; In the formula: V max Indicates the maximum fractional order; k V Indicates the adjustment coefficient; Finally, the chaotic noise mask is combined with the fused feature map to suppress the feature representation of noisy pixels and output a denoised feature map. X den : ; In the formula: It represents the Hadamardi (or Hadama) stack.
[0011] Based on further optimization of the above scheme, step S2, which involves the aggregation and correction of multi-scale high-order gradient features through a multi-scale holographic gradient aggregation and feature correction module, specifically includes: Multi-directional higher-order difference extraction: Introducing learnable multi-scale fractional-order difference convolution kernels For denoised feature maps X den Multi-directional gradient extraction is performed, and the resulting high-order gradient tensor is obtained by concatenation. F grad : ; In the formula: CAT represents channel splicing operation. i Indicates the direction of difference (including horizontal, vertical, and diagonal lines). N Indicates the number of difference directions; Conv represents the convolution operation (its convolution kernel order is determined by...). V ( x, y (Dynamically adjusted) Spatial-channel joint correction matrix generation: generation of higher-order gradient tensors F grad Perform global pooling operation, and combine global average pooling and max pooling to generate the correction matrix. M rect This allows us to capture long-range edge dependencies. ; ; In the formula: This represents 1×1 convolution dimensionality reduction. ReLU Indicates the activation function; Concat() Indicates feature fusion; F gap This represents the output characteristics of global average pooling. F gmp This represents the output feature of global max pooling; Holographic Feature Correction and Output: The correction matrix is applied to the original semantic features, while geometric information from higher-order gradient tensors is fused. Feature correction is achieved through residual fusion, and the corrected feature map is output. X out : ; In the formula: Indicates the balance coefficient; This represents the feature mapping function.
[0012] Based on further optimization of the above scheme, step S3, which implements adaptive block segmentation based on frequency domain feature similarity through an adaptive irregular block segmentation module based on variational autoencoder, specifically includes: Frequency Domain Feature Pre-learning (VAE): The encoder using VAE (Variational Autoencoder) corrects the feature map. X out Mapped to a Gaussian distribution in the latent space The decoder restores the latent space features to the frequency domain features. F freq By optimizing the reconstruction loss and KL divergence, the frequency domain features of the background / defect are characterized. Encoder: ; In the formula: The encoder convolutional layers (composed of multiple convolutional, pooling, and activation layers, representing the mean and variance, respectively) map the input features to the latent space. Let represent the mean vector and variance vector of the Gaussian distribution in the latent space, respectively. This represents standard normally distributed noise; z Represent latent space sampling features; Decoder: ; In the formula: Conv dec The decoder convolutional layer (composed of multiple deconvolutional and activation layers, which restores latent space features to frequency domain features) represents the decoder convolutional layer. VAE loss: ; In the formula: C Indicates the number of channels; DCT Represents the two-dimensional discrete cosine transform; D KL Indicates KL divergence; Adaptive irregular block segmentation: Calculate the latent space sampling features for each pixel. z ( x, y Frequency domain feature similarity S ( i, j ) and density ,distance Select and Large, uniform pixels are used as cluster centers to achieve irregular block division: ; In the formula: This represents the similarity adjustment coefficient; d c Indicates the cutoff distance. Indicates an indicator function; Cross-block frequency domain attention fusion: This involves combining the frequency domain features after block partitioning. F 1, F 2,…, F n Calculate cross-block attention weights By integrating block boundary features, the block effect can be eliminated. ; ; In the formula: This represents the frequency domain characteristics after fusion; Finally, the fused irregular block features are denoted as { X 1 , X 2 ,…, X n} serves as the input to the frequency domain path of the frequency-space dual-domain collaborative background decoupling module.
[0013] Based on further optimization of the above scheme, in step S3, the frequency-space dual-domain collaborative background decoupling module specifically achieves dual background decoupling in the frequency domain and spatial domain as follows: First, for each irregular block feature X k Perform a two-dimensional discrete cosine transform to obtain the frequency domain spectrum. F k : ; Then, spectral filtering and inverse transform are performed sequentially on the frequency domain spectrum to obtain denoising features. P clean : Spectrum filtering: ; Inverse transform: ; In the formula: G Y This represents the learnable spectrum-gated weights (obtained through model training). IDCT Represents the two-dimensional inverse discrete cosine transform; Next, the input features of the backbone network X out Perform 1×1 convolution channel compression to obtain spatial features. P space : ; Finally, the denoising features are calculated using the SEBlock channel attention mechanism. P clean The weights, and spatial features P space After stitching and fusion, the output is a clean feature map Z: ; ; In the formula: Conv fusion Indicates fused convolutional layers; SEBlock This indicates the channel attention module.
[0014] Meanwhile, define background suppression loss. L corr Minimize the covariance between foreground and background features to enhance background decoupling effect: ; Cov() Indicates the calculation of covariance; F fore , F back These represent foreground features (such as steel plates) and background features (such as conveyor belts, support platforms, etc.).
[0015] Based on further optimization of the above scheme, step S4, which involves constructing a multimodal topological distance field using a material-aware multimodal topological distance field module, specifically includes: Multimodal material feature extraction: Extracting texture, grayscale, and gradient features from the pure feature map Z. T m , G hm ,G tm Texture mode T m Features such as contrast, energy, and entropy are extracted using the gray-level co-occurrence matrix, and gray-level modes are also analyzed. G hm Extract the gray-level mean, variance, and gradient mode of a local 3×3 neighborhood. G tm The higher-order gradient tensor output by the backbone network F grad ; After concatenating the three modal features, feature fusion is performed using a 1×1 convolution to obtain the material feature map. M cz : ; Constructing a material topology GCN model: Feature images are used as nodes in a graph convolutional network (GCN), where node features are... M cz The pixel values, and the adjacency matrix A between nodes are constructed by material similarity and spatial distance similarity (reflecting the topological relationship of materials): ; In the formula: S m (i, j) , S s (i, j) These represent material similarity and spatial distance similarity, respectively. d ij Represents the Euclidean distance of a pixel; These represent the corresponding adjustment coefficients; GCN's layer update formula: ; In the formula: No. l The node feature matrix of the layer; Indicates the first l Layer weight matrix; I d Represents the identity matrix; Describing the degree matrix with self-loops: ; Multimodal topological distance field construction: Symbolic distance in the original space T sdf (x, y) Based on this, a multimodal topological distance field is constructed using the topological features of GCN material: ; In the formula: Indicates the balance coefficient; This represents the material topology features output by GCN.
[0016] Based on further optimization of the above scheme, in step S4, the output of the detection result through the topology-aware and uncertainty-based dynamic rectification detection head is specifically as follows: First, a shared convolutional layer is used to extract basic features from the pure feature map Z. F base It is further divided into three independent branches to implement classification, uncertainty regression, and topological field prediction: Classification branch: Convolution and Softmax activation functions are used to predict the probability of defect categories. P cls (Including categories such as microcracks, edge notches, pinholes, and scratches); Uncertainty Regression Branch: Predicting Detection Box Coordinates O =( x , y , w , h (i.e., center coordinates, width, and height), and simultaneously predict the regression variance: ; The regression is modeled as a Gaussian distribution to measure the reliability of the detection boxes; Topological field branch: Predicting multimodal topological range fields Wing Loss is used to approximate the true symbolic distance function, improving the accuracy of boundary modeling. ; In the formula: Y = T mm (x, y) - T gt (x, y) This represents the error between the predicted value and the true distance field (during the training phase). T sdf (x, y) That is, the real label T gt (x, y) ); These are the corresponding coefficients; Then, combined with the center coordinates of the detection box ( x c ,y c Topological field value T mm ( x c ,y c ) and the trace of the covariance matrix Construct the rectification coefficient (to achieve dual rectification by combining topological constraints and uncertainty suppression): ; ; In the formula: For hyperparameters; tanh() Represents the hyperbolic tangent function; Finally, the rectification coefficient is applied to the classification probability, and only the confidence scores of non-negative rectification coefficients are retained to output the final defect confidence score: ; in, This allows for setting the confidence level of ineffective regions or high-uncertainty prediction boxes to 0, thereby completely eliminating false alarms.
[0017] The following are the technical effects of the present invention: This invention preprocesses the original images of cold-rolled steel plates by using a nonlinear illumination decoupling and adaptive correction module based on generative adversarial networks and a spatiotemporal fusion dynamic defect restoration module based on optical flow constraints. Addressing nonlinear illumination variations such as strong light and shadow in industrial environments, the steel plate image features are decomposed into illumination-invariant features (preserving core defect features) and illumination-variant features (reflecting only the effects of illumination). The generative adversarial network learns the accurate representation of the illumination-invariant features, and then dynamically corrects the grayscale and gradient distribution of the features based on the real-time illumination intensity, achieving adaptive processing of nonlinear illumination variations, eliminating illumination interference, and ensuring the stability of defect features. For the dynamic blurring of the image caused by the high-speed movement of the steel plate during inspection (i.e., the movement between the steel plate and the industrial camera), the optical flow field of continuous video frames is used to calculate the steel plate's trajectory, and temporal frame feature interpolation is used to complete the blurred defect features of the current frame. By fusing static spatial features and dynamic temporal features, the feature restoration of blurred defects is achieved, solving the problem of temporal information loss in single-frame detection; thus obtaining clear and stable image input.
[0018] Subsequently, the backbone network constructs a pixel-level noise gating mechanism through an adaptive fractional-order differential noise gating module based on chaotic mapping: dynamically adjusting the differential order according to the local noise intensity (i.e., the stronger the noise, the lower the order, suppressing noise amplification; the weaker the noise, the higher the order, capturing weak edges), while simultaneously filtering noisy pixels through chaotic sequences, achieving nonlinear suppression of random instantaneous noise while preserving weak edges; then, through a multi-scale holographic gradient aggregation and feature correction module, it achieves aggregation and correction of multi-scale high-order gradient features, solving problems such as coarse edge feature extraction and deep feature loss. The neck network achieves adaptive block division based on frequency domain feature similarity through an adaptive irregular block division module based on variational autoencoder, ensuring that defect features fall completely within the same block, avoiding problems such as cross-block segmentation of defect features and aliasing of background and defect frequency domain features; then, through a frequency-space dual-domain collaborative background decoupling module, it achieves dual background decoupling in the frequency domain and spatial domain, realizing texture-level background suppression and complete decoupling of background and defect features. The detection head constructs a multimodal topological distance field through a material-aware multimodal topological distance field module. This multimodal topological distance field reflects not only the spatial distance from the pixel to the effective boundary of the steel plate, but also the material difference distance, solving the problem of detection frame confidence correction deviation caused by the mismatch between defect features and materials. Then, the detection head outputs detection results through topological perception and uncertainty dynamic rectification, completely eliminating false alarms in ineffective areas caused by holes and irregular shapes in the steel plate, ensuring the accuracy of defect extraction, and achieving an optimized balance of detection speed, accuracy, and efficiency. While eliminating the influence of background interference and geometric shape, it significantly improves the ability to capture and detect surface defects of cold-rolled steel plates. Attached Figure Description
[0019] Figure 1 This is a flowchart of the defect detection method in an embodiment of the present invention.
[0020] Figure 2 The output image shows the results of identifying surface defects in cold-rolled steel sheets using the detection method in this embodiment of the invention. Detailed Implementation
[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0022] Example 1: A method for detecting surface defects in cold-rolled steel sheets based on multidimensional feature perception, comprising: Step S1, Input Layer: The input layer receives the original image of cold-rolled steel plate captured by the industrial camera. After processing by the nonlinear illumination decoupling and adaptive correction module based on generative adversarial network and the spatiotemporal fusion dynamic defect restoration module based on optical flow constraint, the corrected and restored fused feature map is output. The processing of the original image through a generative adversarial network-based nonlinear illumination decoupling and adaptive correction module specifically includes: Feature decoupling: The generator G decouples the input raw image (H and W represent the height and width of the image, and 3 represents the RGB channels) Mapped to illumination-invariant features X inv and characteristics of light change X var ,satisfy: ; Adversarial training: Discriminator D distinguishes features invariant to real illumination. X inv-real (Extracted from offline labeled samples with no illumination changes) and the generated illumination-invariant features X inv By optimizing the generator against loss, X inv Maximize the preservation of defect features; Generator decoupling loss (to ensure the accuracy of feature decomposition): ; Adversarial loss (a zero-sum game between generator G and discriminator D): ; In the formula: E[] represents the expectation operator (i.e., the average value of the expression within the parentheses on the sample distribution specified by the subscript); Total generator loss: ; In the formula: This represents the loss balance coefficient against the attack (typically [0.01, 0.1]). Discriminator loss: ; According to light intensity factor Invariant characteristics under illumination X inv Perform correction and output illumination correction feature map. X lc : ; In the formula: ( x, y () represents the pixel coordinates of the image; k c This represents the light intensity adjustment coefficient (usually 2). k py This represents the offset coefficient (usually 0.1). Among them, light intensity factor The mean gray level of the feature map obtained by illumination invariance and variance (The feature grayscale mean and variance are obtained based on the illumination-invariant feature map and through a normalization process using tensor operations. This involves mapping the channel dimension of the feature map to grayscale and then calculating statistical values for all pixels in the spatial dimension.) ; In the formula: This represents the prevention coefficient (the denominator for prevention is 0, and it is usually 1e-8).
[0023] The image processing based on the optical flow-constrained spatiotemporal fusion dynamic defect reconstruction module is as follows: For illumination correction feature map X lc Retrieve images of the current frame, previous frame, and next frame. The pyramid LK optical flow method is used to calculate pixel-level motion vectors. u x , u y ): ; In the formula: This represents the gradient of the feature map in the current frame; Then, calculate the average speed of the steel plate. v t (Reflecting the degree of motion blur): ; Subsequently, the blurred region features are completed by temporal frame interpolation to obtain the restored feature map. : ; In the formula: M f (x, y) This represents the mask for the blurred region (determined by the gradient variance of the optical flow field, with a value range of [0,1]). Finally, the restored feature map and the current frame feature map are fused together to output the fused feature map. X st : ; ; In the formula: Represents the weights of time-series features; v 0 represents the critical speed (determined based on actual conditions; generally, it is 2 m / s for industrial cutting lines).
[0024] Step S2, Backbone Network: The backbone network uses fused feature maps Xst As input, an adaptive fractional-order differential noise gating module based on chaotic mapping is first used to suppress industrial random instantaneous noise (such as oil stain reflection, salt-and-pepper noise, pixel jitter, etc.), specifically: First, calculate the fused feature map. X st Local 5×5 neighborhood noise factor : ; In the formula: Represents pixels ( x, y The 5×5 neighborhood features of ) Var () Mean () represent the neighborhood variance and mean, respectively; Then, the Logistic chaotic mapping (using the initial chaotic seed) is employed. C 0) Generation and feature map size (i.e. H × W Consistent chaotic sequences C ( x, y (Initial Chaos Seed) C 0 is a random number (belonging to (0,1) and not equal to any value among 0.25, 0.5, and 0.75), which is then fused with the neighborhood noise factor to obtain a chaotic noise mask. M cn ( x, y ), Logistic chaotic mapping: ; Chaotic noise mask: ; In the formula: This represents the chaos control parameters (typically (3.57,4], preferably 3.8); This represents the Sigmoid activation function; Then define the order of the differential. V ( x, y () is the negative correlation function of the noise factor, enabling pixel-level dynamic adjustment of the order, thus achieving adaptive fractional-derivative order adjustment: ; In the formula: V max This represents the maximum fractional order (its range is (1,2], typically 1.8). k V This indicates the adjustment coefficient (usually 5). Finally, the chaotic noise mask is combined with the fused feature map to suppress the feature representation of noisy pixels and output a denoised feature map. Xden : ; In the formula: It represents the Hadamardi (or Hadama) stack.
[0025] Then, the aggregation and correction of multi-scale high-order gradient features are achieved through a multi-scale holographic gradient aggregation and feature correction module (enhancing the feature representation of weak edge defects such as microcracks and edge notches), specifically including: Multi-directional higher-order difference extraction: Introducing learnable multi-scale fractional-order difference convolution kernels For denoised feature maps X den Multi-directional gradient extraction is performed, and the resulting high-order gradient tensor is obtained by concatenation. F grad : ; In the formula: CAT represents channel splicing operation. i Indicates the direction of difference (including horizontal, vertical, and diagonal lines). N Indicates the number of difference directions (usually 8); Conv represents the convolution operation (its convolution kernel order is determined by...). V ( x, y (Dynamically adjusted) Spatial-channel joint correction matrix generation: generation of higher-order gradient tensors F grad Perform global pooling operation, and combine global average pooling and max pooling to generate the correction matrix. M rect This allows us to capture long-range edge dependencies. ; ; In the formula: This represents 1×1 convolution dimensionality reduction. ReLU Indicates the activation function; Concat() Indicates feature fusion; F gap This represents the output characteristics of global average pooling. F gmp This represents the output feature of global max pooling; Holographic Feature Correction and Output: The correction matrix is applied to the original semantic features, while geometric information from higher-order gradient tensors is fused. Feature correction is achieved through residual fusion, and the corrected feature map is output. X out : ; In the formula: This represents the balance coefficient (with a value range of [0,1]). This represents the feature mapping function (1×1 convolution).
[0026] Step S3, Neck Network: The neck network is used to correct feature maps. X out As input, an adaptive irregular segmentation module based on variational autoencoder is first used to implement adaptive segmentation based on frequency domain feature similarity (ensuring that defect features completely fall within the same segment), specifically including: Frequency Domain Feature Pre-learning (VAE): The encoder using VAE (Variational Autoencoder) corrects the feature map. X out Mapped to a Gaussian distribution in the latent space The decoder restores the latent space features to the frequency domain features. F freq By optimizing the reconstruction loss and KL divergence, the frequency domain features of the background / defect are characterized. Encoder: ; In the formula: The encoder convolutional layers (composed of multiple convolutional, pooling, and activation layers, representing the mean and variance, respectively) map the input features to the latent space. Let represent the mean vector and variance vector of the Gaussian distribution in the latent space, respectively. This represents standard normally distributed noise; z Represent latent space sampling features; Decoder: ; In the formula: Conv dec The decoder convolutional layer (composed of multiple deconvolutional and activation layers, which restores latent space features to frequency domain features) represents the decoder convolutional layer. VAE loss: ; In the formula: C Indicates the number of channels; DCT Represents the two-dimensional discrete cosine transform; D KL Indicates KL divergence; Adaptive irregular block segmentation: Calculate the latent space sampling features for each pixel. z ( x, y Frequency domain feature similarity S ( i, j ) and density ,distance Select and Large, uniform pixels are used as cluster centers to achieve irregular block division: ; In the formula: This represents the similarity adjustment coefficient (usually 0.5). d c This indicates the cutoff distance (usually 0.2). This indicates an indicator function (1 if the operation inside the parentheses is greater than 0, otherwise 0); Cross-block frequency domain attention fusion: This involves combining the frequency domain features after block partitioning. F 1, F 2,…, F n Calculate cross-block attention weights By integrating block boundary features, the block effect can be eliminated. ; ; In the formula: This represents the frequency domain characteristics after fusion; Finally, the fused irregular block features are denoted as { X 1 , X 2 ,…, X n} serves as the input to the frequency domain path of the frequency-space dual-domain collaborative background decoupling module.
[0027] Then, the frequency-space dual-domain collaborative background decoupling module is used to achieve dual background decoupling in the frequency domain and spatial domain (eliminating interference from periodic background textures), specifically: First, for each irregular block feature X k Perform a two-dimensional discrete cosine transform to obtain the frequency domain spectrum. F k : ; Then, spectral filtering and inverse transform are performed sequentially on the frequency domain spectrum to obtain denoising features. P clean : Spectrum filtering: ; Inverse transform: ; In the formula: G Y This represents the learnable spectrum-gated weights (obtained through model training). IDCT Represents the two-dimensional inverse discrete cosine transform; Next, the input features of the backbone network X out Perform 1×1 convolution channel compression to obtain spatial features.P space : ; Finally, the denoising features are calculated using the SEBlock channel attention mechanism. P clean The weights, and spatial features P space After stitching and fusion, the output is a clean feature map Z: ; ; In the formula: Conv fusion Indicates fused convolutional layers; SEBlock This indicates the channel attention module; Meanwhile, define background suppression loss. L corr Minimize the covariance between foreground and background features to enhance background decoupling effect: ; Cov() Indicates the calculation of covariance; F fore , F back These represent foreground features (such as steel plates) and background features (such as conveyor belts, support platforms, etc.).
[0028] Step S4, Detection Head: The detection head uses a clean feature map Z As input, a multimodal topological distance field is first constructed using a material-aware multimodal topological distance field module (incorporating the heterogeneous characteristics of the steel plate material and avoiding the problem of topological field modeling that relies solely on spatial location), specifically including: Multimodal material feature extraction: Extracting texture, grayscale, and gradient features from the pure feature map Z. T m , G hm , G tm After concatenating the three modal features, feature fusion is performed using 1×1 convolution to obtain the material feature map. M cz : ; Constructing a material topology GCN model: Feature images are used as nodes in a graph convolutional network (GCN), where node features are... M cz The pixel values, and the adjacency matrix A between nodes are constructed by material similarity and spatial distance similarity (reflecting the topological relationship of materials): ; In the formula: S m (i, j) , S s (i, j) These represent material similarity and spatial distance similarity, respectively. d ij Represents the Euclidean distance of a pixel; These represent the corresponding adjustment coefficients (generally) ); GCN's layer update formula: ; In the formula: No. l The node feature matrix of the layer; Indicates the first l Layer weight matrix; I d Represents the identity matrix; Describing the degree matrix with self-loops: ; Multimodal topological distance field construction: Symbolic distance in the original space T sdf (x, y) Based on this (the original spatial symbolic distance is obtained by performing a distance transformation on the binary mask of the real labeled steel plate, for each pixel in the image ( x, y ), T sdf (x, y) The value represents the distance from the pixel to the nearest effective boundary of the steel plate. Based on the topological features of the GCN material, a multimodal topological distance field is constructed: ; In the formula: This represents the balance coefficient (usually 0.3). This represents the material topology features output by GCN.
[0029] Then, the detection results are output through the topology-aware and uncertainty-dynamic rectification detection head (i.e., to achieve defect classification, uncertainty regression, and confidence rectification of topology constraints), specifically: First, a shared convolutional layer is used to extract basic features from the pure feature map Z. F base It is further divided into three independent branches to implement classification, uncertainty regression, and topological field prediction: Classification branch: Convolution and Softmax activation functions are used to predict the probability of defect categories. P cls (Including categories such as microcracks, edge notches, pinholes, and scratches); For example: Input basic features F base The convolutional layer uses 1×1 convolutions to map the number of channels to the number of classes. R (e.g., microcracks, edge notches, pinholes, scratches, etc.), the activation function is Softmax, and the output is the probability of the defect category. P cls : ; The loss function uses cross-entropy loss for pixel-by-pixel supervision. ; In the formula: Indicates the true label (i.e., if ( x, y ) belongs to the k If the value is 1, it is 0; otherwise, it is 1 (for background areas, it is 1). Uncertainty Regression Branch: Predicting Detection Box Coordinates O =( x , y , w , h (i.e., center coordinates, width, and height), and simultaneously predict the regression variance: ; The regression is modeled as a Gaussian distribution to measure the reliability of the detection boxes; For example: Input basic features F base It employs two parallel 1×1 convolution heads, including a mean head that outputs four channels (corresponding to the detection coordinates). x , y , w , h The variance headers of the four output channels correspond to the regression variance: ; ; The loss function uses negative log-likelihood loss: ; In the formula: y i Represents the coordinates of the true bounding box; Topological field branch: Predicting multimodal topological range fields Wing Loss is used to approximate the true symbolic distance function, improving the accuracy of boundary modeling. ; In the formula: Y = T mm (x, y) -T gt (x, y) This represents the error between the predicted value and the true distance field (during the training phase). T sdf (x, y) That is, the real label T gt (x, y) ); These are the corresponding coefficients (generally) ); Then, combined with the center coordinates of the detection box ( x c ,y c Topological field value T mm ( x c ,y c ) and the trace of the covariance matrix Construct the rectification coefficient (to achieve dual rectification by combining topological constraints and uncertainty suppression): ; ; In the formula: Hyperparameters (generally) ); tanh() This represents the hyperbolic tangent function (mapping the topological field values to [-1, 1]). Finally, the rectification coefficient is applied to the classification probability, and only the confidence scores of non-negative rectification coefficients are retained to output the final defect confidence score: ; in, This allows for setting the confidence level of ineffective regions or high-uncertainty prediction boxes to 0, thereby completely eliminating false alarms.
[0030] Example 2: As another preferred embodiment of the present invention, based on the scheme of Embodiment 1, in step S4, the texture mode T m The gray-level co-occurrence matrix is used to extract features such as contrast, energy, and entropy, specifically: For feature maps Z single channel Z c In direction (e.g., at any angle among 0°, 45°, 90°, and 135°) and distance d Z When =1, count the gray level pairs ( i, j ) number of co-occurrences: ; in, From direction Decisions, for example: at 0°, At 90° ; Then, the co-occurrence matrix is normalized to obtain the probability distribution: ; Contrast: It is used to measure the severity of local grayscale changes; Energy: It is used to measure the uniformity of texture distribution; Entropy: It is used to measure the complexity and randomness of textures; grayscale mode G hm Extract the grayscale mean and variance of the local 3×3 neighborhood, specifically as follows: Pure feature map Z Each pixel ( x, y The mean and variance of gray levels are calculated within its 3×3 local neighborhood to form gray-level modal features: Local mean: ; Local variance: ; Calculate the mean and variance for each channel c to obtain the grayscale modal feature map: ; gradient mode G tm The higher-order gradient tensor output by the backbone network F grad .
[0031] Example 3: As another preferred embodiment of the present invention, based on the scheme of Example 1 or Example 2, after obtaining the final defect confidence level... S final The complete defect detection process includes: confidence threshold screening, candidate box generation, non-maximum suppression (NMS), and result output. Confidence threshold filtering: Preset confidence threshold (Based on historical experience data, such as 0.5), traverse all spatial locations. (x, y) ,like If so, mark the location as a defect candidate point.
[0032] Candidate box generation: For each defect candidate point, the corresponding detection box parameters, including center coordinates, are extracted from the uncertainty regression branch. xh ,y h ),width w h ,high h h Uncertainty Generate candidate boxes: And record the corresponding category arg ma xP cls ( x, y ), confidence level S final ( x, y Uncertainty .
[0033] Non-maximum suppression: Since the same defect may produce high confidence at multiple adjacent locations, deduplication is required using NMS. Step S41: First, sort all candidate boxes according to their confidence level from high to low; Step S42: Extract the candidate box with the highest confidence level. B h-i Add to the final result; Step S43, Calculation B h-i With all other boxes B h-j If the IoU (Intersection over Union) is greater than the threshold (obtained based on historical data, such as 0.5), then the item is removed. B h-j ; Step S44: Repeat steps S42 to S43 until all boxes have been processed. Meanwhile, uncertainty is preferentially preserved during NMS processing. Smaller frames improve detection reliability.
[0034] Results output: The final output includes the defect category (such as "microcrack", "edge notch", "pinhole", "scratch", etc.), detection box coordinates, confidence level and uncertainty.
Claims
1. A method for detecting surface defects in cold-rolled steel sheets based on multidimensional feature perception, characterized in that: include: Step S1, Input Layer: The input layer receives the original image of cold-rolled steel plate captured by the industrial camera. After processing by the nonlinear illumination decoupling and adaptive correction module based on generative adversarial network and the spatiotemporal fusion dynamic defect restoration module based on optical flow constraint, the corrected and restored fused feature map is output. Step S2, Backbone Network: The backbone network takes the fused feature map as input, first suppresses industrial random instantaneous noise through the adaptive fractional differential noise gating module based on chaotic mapping, and then realizes the aggregation and correction of multi-scale high-order gradient features through the multi-scale holographic gradient aggregation and feature correction module to obtain the corrected feature map. Step S3, Neck Network: The neck network takes the corrected feature map as input, firstly implements adaptive block division based on frequency domain feature similarity through the adaptive irregular block division module based on variational autoencoder, and then implements dual background decoupling of frequency domain and spatial domain through the frequency-space dual-domain collaborative background decoupling module to obtain a clean feature map. Step S4, Detection Head: The detection head takes the clean feature map as input, first constructs a multimodal topological distance field through the material-aware multimodal topological distance field module, and then outputs the detection results through the topological aware and uncertainty dynamic rectification detection head to complete the detection of surface defects of cold-rolled steel plate.
2. The method for detecting surface defects of cold-rolled steel sheets based on multi-dimensional feature perception according to claim 1, characterized in that: In step S1, processing the original image through the nonlinear illumination decoupling and adaptive correction module based on generative adversarial networks specifically includes: Feature decoupling: The generator G decouples the input raw image Mapped to illumination-invariant features X inv and characteristics of light change X var ,satisfy: ; Adversarial training: Discriminator D distinguishes features invariant to real illumination. X inv-real With the generated illumination-invariant features X inv By optimizing the generator against loss, X inv Maximize the preservation of defect features; Generator decoupling loss: ; Combat losses: ; In the formula: E[] represents the expectation operator; Total generator loss: ; In the formula: This represents the loss balance coefficient against the attack; Discriminator loss: ; According to light intensity factor Invariant characteristics under illumination X inv Perform correction and output illumination correction feature map. X lc : ; In the formula: ( x,y () represents the pixel coordinates of the image; k c This represents the light intensity adjustment coefficient; k py This represents the offset coefficient.
3. A method for detecting surface defects in cold-rolled steel sheets based on multi-dimensional feature perception according to claim 1 or 2, characterized in that: In step S1, the image processing performed by the spatiotemporal fusion dynamic defect reconstruction module based on optical flow constraints is specifically as follows: For illumination correction feature map X lc Retrieve images of the current frame, previous frame, and next frame. The pyramid LK optical flow method is used to calculate pixel-level motion vectors. u x , u y ): ; In the formula: This represents the gradient of the feature map in the current frame; Then, calculate the average speed of the steel plate. v t : ; Subsequently, the blurred region features are completed by temporal frame interpolation to obtain the restored feature map. : ; In the formula: M f (x,y) Indicates a mask for a blurred region; Finally, the restored feature map and the current frame feature map are fused together to output the fused feature map. X st : ; ; In the formula: Represents the weights of time-series features; v 0 represents the critical velocity.
4. A method for detecting surface defects in cold-rolled steel sheets based on multi-dimensional feature perception according to claim 2 or 3, characterized in that: In step S2, the suppression of industrial random instantaneous noise through the adaptive fractional-order differential noise gating module based on chaotic mapping specifically involves: First, calculate the fused feature map. X st Local 5×5 neighborhood noise factor : ; In the formula: Represents pixels ( x,y The 5×5 neighborhood features of ) Var () Mean () represent the neighborhood variance and mean, respectively; Then, a chaotic sequence with the same size as the feature map is generated using a Logistic chaotic mapping. C ( x,y The chaotic noise mask is obtained by fusing it with the neighborhood noise factor. M cn ( x,y ), Logistic chaotic mapping: ; Chaotic noise mask: ; In the formula: Indicates the chaos control parameters; This represents the Sigmoid activation function; Then define the order of the differential. V ( x,y () is the negative correlation function of the noise factor, enabling pixel-level dynamic adjustment of the order, thus achieving adaptive fractional-derivative order adjustment: ; In the formula: V max Indicates the maximum fractional order; k V Indicates the adjustment coefficient; Finally, the chaotic noise mask is combined with the fused feature map to suppress the feature representation of noisy pixels and output a denoised feature map. X den : ; In the formula: It represents the Hadamardi (or Hadama) stack.
5. The method for detecting surface defects of cold-rolled steel sheets based on multi-dimensional feature perception according to claim 4, characterized in that: In step S2, the aggregation and correction of multi-scale high-order gradient features through the multi-scale holographic gradient aggregation and feature correction module specifically includes: Multi-directional higher-order difference extraction: Introducing learnable multi-scale fractional-order difference convolution kernels For denoised feature maps X den Multi-directional gradient extraction is performed, and the resulting high-order gradient tensor is obtained by concatenation. F grad : ; In the formula: CAT represents channel splicing operation. i Indicates the direction of difference. N Indicates the number of difference directions; Conv represents the convolution operation; Spatial-channel joint correction matrix generation: generation of higher-order gradient tensors F grad Perform global pooling operation, and combine global average pooling and max pooling to generate the correction matrix. M rect This allows us to capture long-range edge dependencies. ; ; In the formula: This represents 1×1 convolution dimensionality reduction. ReLU Indicates the activation function; Concat() Indicates feature fusion; F gap This represents the output characteristics of global average pooling. F gmp This represents the output feature of global max pooling; Holographic Feature Correction and Output: The correction matrix is applied to the original semantic features, while geometric information from higher-order gradient tensors is fused. Feature correction is achieved through residual fusion, and the corrected feature map is output. X out : ; In the formula: Indicates the balance coefficient; This represents the feature mapping function.
6. The method for detecting surface defects of cold-rolled steel sheets based on multi-dimensional feature perception according to claim 5, characterized in that: In step S3, the adaptive block division based on frequency domain feature similarity implemented by the adaptive irregular block division module based on variational autoencoder specifically includes: Frequency domain feature pre-learning: The encoder of the VAE is used to correct the feature map. X out Mapped to a Gaussian distribution in the latent space The decoder restores the latent space features to the frequency domain features. F freq By optimizing the reconstruction loss and KL divergence, the frequency domain features of the background / defect are characterized. Encoder: ; In the formula: These represent the encoder convolutional layers for the mean and variance, respectively. Let represent the mean vector and variance vector of the Gaussian distribution in the latent space, respectively. This represents standard normally distributed noise; z Represent latent space sampling features; Decoder: ; In the formula: Conv dec This represents the decoder convolutional layer; VAE loss: ; In the formula: C Indicates the number of channels; DCT Represents the two-dimensional discrete cosine transform; D KL Indicates KL divergence; Adaptive irregular block segmentation: Calculate the latent space sampling features for each pixel. z ( x,y Frequency domain feature similarity S ( i,j ) and density ,distance Select and Large, uniform pixels are used as cluster centers to achieve irregular block division: ; In the formula: This represents the similarity adjustment coefficient; d c Indicates the cutoff distance. Indicates an indicator function; Cross-block frequency domain attention fusion: This involves combining the frequency domain features after block partitioning. F 1, F 2,…, F n Calculate cross-block attention weights By integrating block boundary features, the block effect can be eliminated. ; ; In the formula: This represents the frequency domain characteristics after fusion; Finally, the fused irregular block features are denoted as { X 1 , X 2 ,…, X n } serves as the input to the frequency domain path of the frequency-space dual-domain collaborative background decoupling module.
7. The method for detecting surface defects of cold-rolled steel sheets based on multi-dimensional feature perception according to claim 6, characterized in that: In step S3, the frequency-space dual-domain collaborative background decoupling module achieves dual background decoupling in the frequency domain and spatial domain as follows: First, for each irregular block feature X k Perform a two-dimensional discrete cosine transform to obtain the frequency domain spectrum. F k : ; Then, spectral filtering and inverse transform are performed sequentially on the frequency domain spectrum to obtain denoising features. P clean : Spectrum filtering: ; Inverse transform: ; In the formula: G Y This represents learnable spectrum-gated weights; IDCT Represents the two-dimensional inverse discrete cosine transform; Next, the input features of the backbone network X out Perform 1×1 convolution channel compression to obtain spatial features. P space : ; Finally, the denoising features are calculated using the SEBlock channel attention mechanism. P clean The weights, and spatial features P space After stitching and fusion, the output is a clean feature map Z: ; ; In the formula: Conv fusion Indicates fused convolutional layers; SEBlock This indicates the channel attention module. Meanwhile, define background suppression loss. L corr Minimize the covariance between foreground and background features to enhance background decoupling effect: ; Cov() Indicates the calculation of covariance; F fore , F back These represent foreground features and background features, respectively.
8. The method for detecting surface defects of cold-rolled steel sheets based on multi-dimensional feature perception according to claim 7, characterized in that: In step S4, constructing the multimodal topological distance field through the material-aware multimodal topological distance field module specifically includes: Multimodal material feature extraction: Extracting texture, grayscale, and gradient features from the pure feature map Z. T m , G hm , G tm Texture mode T m Features such as contrast, energy, and entropy are extracted using the gray-level co-occurrence matrix, and gray-level modes are also analyzed. G hm Extract the gray-level mean, variance, and gradient mode of a local 3×3 neighborhood. G tm The higher-order gradient tensor output by the backbone network F grad ; After concatenating the three modal features, feature fusion is performed using a 1×1 convolution to obtain the material feature map. M cz : ; Constructing a material topology GCN model: using feature images as nodes in a graph convolutional network, where node features are... M cz The pixel values, and the adjacency matrix A between nodes are constructed by combining material similarity and spatial distance similarity: ; In the formula: S m (i,j) , S s (i,j) These represent material similarity and spatial distance similarity, respectively. d ij Represents the Euclidean distance of a pixel; These represent the corresponding adjustment coefficients; GCN's layer update formula: ; In the formula: No. l The node feature matrix of the layer; Indicates the first l Layer weight matrix; I d Represents the identity matrix; Describing the degree matrix with self-loops: ; Multimodal topological distance field construction: Symbolic distance in the original space T sdf (x,y) Based on this, a multimodal topological distance field is constructed using the topological features of GCN material: ; In the formula: Indicates the balance coefficient; This represents the material topology features output by GCN.