Steel defect detection method based on multi-scale edge enhancement

Through the multi-scale edge enhancement detection method, combined with the dual Backbone Composite-ConvNeXt backbone network and EEFF structure, the problem of insufficient capture capability of small and complex defects in steel defect detection is solved, and high-precision and high-efficiency defect detection is achieved, which is suitable for complex industrial scenarios.

CN120411025APending Publication Date: 2025-08-01FUDAN UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510501023.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art has problems in the detection of steel defects that insufficient capture capabilities for small or complex defects, high false detection and missed detection rates, and poor generalization capabilities, especially in different materials and lighting conditions.

Method used

Using a multi-scale edge enhancement detection method, the defect detection model is optimized through a dual Backbone Composite-ConvNeXt backbone network and edge-enhanced feature fusion structure (EEFF), combined with Focal-MPDIOU Loss loss function, the defect detection model is optimized, the capture ability of defect edge features is enhanced, and the sample distribution is balanced through mosaic data enhancement and oversampling strategies.

Benefits of technology

It significantly improves the accuracy and robustness of steel defect detection, reduces the false detection and missed detection rates, improves the ability to identify small targets and edge fuzzy defects, adapts to the detection stability under different materials and lighting conditions, and meets the high-precision and high-efficiency production line detection needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411025A_ABST
    Figure CN120411025A_ABST
Patent Text Reader

Abstract

The invention discloses a steel defect detection method based on multi-scale edge enhancement, and relates to the field of industrial detection. The method comprises the following steps: constructing a steel defect detection data set and carrying out preprocessing, and dynamically interacting high and low layer features by constructing a Compute-ConvNeXt and an edge enhanced feature fusion structure (EEFF) so as to enhance semantic expressions of edges and small target defects; according to the method, an improved loss function (Focal-MPDIOU) and a data equalization strategy are combined, the sensitivity of the model to fuzzy edges and tiny defects is improved, meanwhile, the overfitting problem caused by sample distribution unbalance is restrained, and automatic defect detection of production line steel is achieved. A defect detection task with high precision, high robustness and high generalization is realized in a complex industrial scene, and an effective solution is provided for intelligent detection of metal material surface defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial inspection, and particularly relates to a steel defect detection method based on multi-scale edge enhancement. Background Art

[0002] At present, steel defect detection based on computer vision can be mainly divided into methods based on traditional machine vision and deep learning. Methods based on traditional vision require manual design of feature extraction algorithms (such as edge detection, texture analysis, morphological operations), and the quality of features highly depends on the experience of engineers. At the same time, traditional vision methods have insufficient ability to capture tiny or complex defects, and need to redesign features for different materials, with poor generalization ability. Currently, defect detection methods based on deep learning mainly rely on classic deep learning object detection methods such as SSD, YOLO, RT-DETR, etc. However, the current related defect detection methods have weak ability to capture edge features of defect samples, and there are risks of false detection and missed detection. At the same time, the detection effects on samples of different scales such as small targets are not ideal.

[0003] During the steel production process, production defects will occur due to various factors, that is, problems will occur in aspects such as the continuity, smoothness, and uniformity of steel. These defects not only affect the appearance quality of steel, but may also damage key properties such as its mechanical properties and corrosion resistance, thereby reducing the service life and safety of related industrial products and bringing production losses to enterprises. Summary of the Invention

[0004] In view of the above-mentioned drawbacks of the prior art, the present invention provides a steel defect detection method based on multi-scale edge enhancement.

[0005] To achieve the above objectives, the present invention is realized through the following technical solutions:

[0006] A steel defect detection method based on multi-scale edge enhancement, comprising the following steps:

[0007] S1. Obtain image sample information, load a steel defect data set and perform preprocessing. The steel defect data set is based on the GC10-DET data set, and uses the mosaic data augmentation method to divide the training set, validation set, and test set proportionally; the steel defect data set oversamples rare defect categories to balance the sample distribution;

[0008] S2. After the preprocessing of the image sample information, input three-layer feature maps of different scales through a dual Backbone Composite-ConvNeXt backbone network. The feature maps introduce an Edge Enhancement Feature Fusion structure (EEFF) to align pictures and enhance edge feature edge information, and output a dynamic fusion feature map after extracting cross-scale defect features;

[0009] S3. The dynamic fusion feature map is input into the decoder by weighted summation, and the detection results are output and processed to capture multi-scale defective target information;

[0010] S4. The defective target information is input into the defect detection model. The positive and negative sample weights are regulated by the Focal-MPDIOU Loss function, and the defect detection model is improved through round-by-round training on the training platform. Combining the sample weights and bounding box regression optimization, and testing the detection results to determine the defect position and category;

[0011] S5. The improved defect detection model is deployed to the visualization interface to realize production line detection.

[0012] Beneficial effects

[0013] Adopting the technical solution provided by the present invention, compared with the known public technology, it has the following beneficial effects:

[0014] 1. Through the collaborative design of the Composite-ConvNeXt dual backbone network and the Edge Enhancement Feature Fusion structure (EEFF), the problems of edge blurring and missed detection of small targets in steel defect detection are effectively solved. The SSFF module in EEFF uses 3D convolution to fuse multi-level features across scales, improving the detection recall rate of small target defects such as punching holes and water stains; the EEM module combines SimAM attention and gradient feature extraction, enhancing the localization ability of defects with unclear edges such as creases and indentations, and its average precision (AP) is improved. The overall mAP of the improved model on the GC10-DET dataset is more than that of the original RT-DETR, especially showing significant advantages in multi-scale defect scenarios.

[0015] 2. Aiming at challenges such as steel surface reflection and texture interference, the DHLC connection mechanism of Composite-ConvNeXt enhances the model's ability to capture global context information by dynamically fusing high and low level features, reducing the positioning error under the metal reflection background. At the same time, the Focal-MPDIoU loss function significantly improves the discrimination of overlapping defects by balancing the positive and negative sample weights (γ = 0.5) and optimizing the bounding box geometric constraint (MPDIoU). In addition, the mosaic data augmentation and oversampling strategy improve the detection AP of rare categories (such as welds and oil stains), ensuring the balanced recognition of ten types of defects.

[0016] 3. During the training phase, an Adam and SGD hybrid optimization strategy is adopted. In the first 200 rounds, it converges rapidly, and in the subsequent 200 rounds, the parameters are finely tuned. Combined with learning rate decay (reduced to 10% every 100 rounds), the model reaches a stable performance after 400 rounds of training. After being deployed to the visualization interface, it can output the defect category, location, and confidence in real time, support the visualization production line detection requirements, significantly reduce the cost of manual re-inspection, and has strong engineering implementation value. Brief Description of the Drawings

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] Figure 1 It is a schematic diagram of the step flow of the present invention;

[0019] Figure 2 It is a structural diagram of the improved defect detection algorithm of the present invention;

[0020] Figure 3 It is a structural diagram of the dual Backbone Composite-ConvNeXt (C-ConvNeXt) of the present invention;

[0021] Figure 4 It is a structural diagram of the SSFF module and EEM module of the present invention;

[0022] Figure 5 It is a comparison diagram of the detection results of the present invention. Detailed Embodiments

[0023] It is easy to understand that according to the technical solution of the present invention, without changing the essence of the present invention, those of ordinary skill in the art can propose various structural ways and implementation ways that can be mutually replaced. Therefore, the following detailed embodiments and drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as all of the present invention or as a limitation or restriction on the technical solution of the present invention.

[0024] Application Overview:

[0025] Traditional machine vision technology relies on manually designed feature extraction algorithms, such as edge detection, texture analysis, and morphological operations. The core drawback of such methods is that the feature quality highly depends on the engineer's accumulated experience and is difficult to adapt to complex and changing industrial scenarios. When faced with tiny defects (such as micron-level cracks) or complex defects with irregular shapes (such as oxide scale peeling), the manually designed features often fail to effectively capture key information, resulting in a significant drop in detection accuracy. In addition, the steel surfaces of different materials (such as cold-rolled plates and galvanized plates) have significant differences in reflective characteristics and texture structures. Traditional methods need to re-adjust the feature extraction rules for each material, with a long development cycle and insufficient generalization ability. In actual production lines, such methods often produce misjudgments due to factors such as environmental light changes and equipment vibrations, and it is difficult to meet the high-precision and high-stability industrial detection requirements. Deep learning models represented by SSD, YOLO, and RT-DETR are prone to losing high-frequency edge information during the convolutional downsampling process, resulting in large positioning deviations for edge-blurred defects such as creases and crescent-shaped gaps, and high false detection and missed detection rates. Secondly, small target defects (such as punching holes and wire spots) have low resolution and weak feature expression, and are easily covered by high-level semantic information during feature pyramid fusion, and the detection effect is much lower than that of conventional-scale targets. In addition, the performance of deep learning methods highly depends on large-scale balanced datasets, while the samples of some defect categories (such as welds and oil spots) are scarce in actual industrial scenarios, exacerbating the overfitting tendency of the model to high-frequency defects and further limiting its practical application value.

[0026] In the present invention, a dual ConvNeXtV2 backbone network (C-ConvNeXt) is constructed based on the RT-DETR framework, and a depth hierarchical connection (DHLC) strategy is adopted to fuse features at different levels to enhance the global defect feature extraction ability. A multi-scale feature fusion mechanism is specifically designed for small-scale defects. An edge enhancement feature fusion structure (EEFF) is innovatively introduced, and its core includes a sequence feature fusion module (SSFF) and an edge enhancement module (EEM): SSFF fuses multi-level features across scales through 3D convolution, and EEM combines the SimAM attention mechanism with a two-stream edge feature extraction path, and strengthens the defect edge response through average pooling differential operation, effectively improving the recognition accuracy of fuzzy boundaries. Further, a Focal-MPDIoU composite loss function is proposed, which fuses the geometric center distance penalty mechanism of MPDIoU and the sample balance strategy of Focal Loss. When the IoU value of the prediction box is very small, that is, the confidence of this sample is very low and it is very likely to be a negative sample, the value at this time will be close to 0. This enables the training of the model to reduce the training oscillation caused by low-quality samples, and can well balance the proportion of positive and negative samples, optimizing the positioning accuracy and convergence efficiency of low-quality samples. An equilibrium sample set is constructed on the GC10-DET dataset using mosaic augmentation and oversampling strategies.

[0027] Compared with traditional machine vision and existing deep learning methods, this application significantly improves the comprehensive performance of steel surface defect detection through a collaborative optimization mechanism that integrates multi-scale edge enhancement and dynamic feature fusion. Aiming at the problem of insufficient ability of traditional machine vision methods to capture tiny and complex defects, the improved model can accurately identify edge-blurred defects (such as creases and punching holes) and effectively enhance the semantic feature expression of small target defects (such as silk spots and water spots), greatly reducing the risk of false detection and missed detection in complex industrial scenarios. Compared with existing deep learning methods, this solution has achieved breakthrough improvements in the sensitivity of defect edge features, the adaptability of multi-scale samples, and the robustness to complex backgrounds on the metal surface. At the same time, through lightweight design and inference acceleration optimization, it realizes efficient real-time detection, meeting the dual requirements of high precision and high efficiency in the production line. This application significantly improves the detection rate of subtle defects such as welds and cracks while maintaining real-time detection performance, providing a highly robust surface defect detection solution for industrial production lines. In addition, the data equalization strategy significantly alleviates the negative impact of unbalanced sample distribution on the model generalization ability, making its detection stability significantly better than traditional solutions under different material steels and different lighting conditions.

[0028] After introducing the basic concept of the present invention, the embodiments of the present invention will be specifically introduced below with reference to the accompanying drawings.

[0029] Embodiment 1

[0030] A steel defect detection method based on multi-scale edge enhancement according to this embodiment, as Figure 1 shown, includes the following steps:

[0031] S1. Obtain image sample information, load the steel defect data set and perform preprocessing. The steel defect data set is based on the GC10-DET data set, and the mosaic data augmentation method is used to divide the training set, validation set and test set proportionally; the steel defect data set oversamples rare defect categories to balance the sample distribution.

[0032] The defect detection data set is processed based on the famous steel defect detection data set GC10-DET. The GC10-DET data set contains 2,294 images, which are the following ten defects: Crease, Cresent Gap, Inclusion, Oil Spot, punching hole, Rolled Pit, SilkSpot, Waist Folding, Water Spot and Welding Line. The data set is divided into a training set, a validation set and a test set in a ratio of 7:2:1, and the mosaic data augmentation method is used in the data set component.

[0033] Due to the imbalance of the sample distribution, pre - oversampling is performed on rare samples to ensure the overall sample balance. Statistics show that the number of samples of some categories (such as weld seams and oil spots) in the original dataset only accounts for 5% of the total. By adopting the oversampling strategy, through operations such as copying samples, random rotation (±15°), and mirror flipping, the number of samples of ten types of defects is increased to within the mean ±5%, avoiding missed detections caused by sample skewness in the model. The mosaic data augmentation method randomly selects four images to be stitched into a single training sample, and the coordinates of the annotation boxes are adjusted synchronously.

[0034] Based on the traditional mosaic augmentation, this application also designs a physical simulation enhancement strategy for defect deformation. Based on the analysis of the stress - deformation characteristics of metal materials, an affine transformation that conforms to the laws of material mechanics is applied to the defect area. For example, for defects of the punching - hole type, elliptical deformation - enhanced data is generated according to the principle of metal stamping forming; for linear defects of the crescent - gap type, the fractal Brownian motion model is used to simulate the random bifurcation morphology of the crack propagation path, and the light - angle is dynamically adjusted in combination with the reflection characteristics of the metal surface to generate defect images with a realistic reflective gradient effect. Secondly, a multi - physical - field coupling data generation framework is constructed, combining finite - element simulation with deep learning: by using tools such as COMSOL Multiphysics to simulate the defect generation process under different rolling process parameters (temperature, pressure, speed), synthetic samples containing multi - dimensional data such as thermal stress distribution fields and plastic deformation gradient fields are output. In addition, for the cross - material generalization requirement, a material - aware domain - adaptation enhancement technology is proposed. The base - frequency features of the steel surface texture are extracted by Fourier frequency - domain decomposition, and cross - material mixed samples are generated through the frequency - band shuffling strategy. At the same time, a material - classification adversarial network is designed to force the feature extractor to strip the material - specific information.

[0035] The steel defect detection method of this application significantly improves the detection accuracy and robustness through systematic data processing and model optimization. The defect sample library constructed based on the GC10 - DET dataset covers ten types of typical defects such as creases and crescent - shaped gaps. The sample distribution of various defects is balanced through the oversampling strategy, ensuring the model's recognition ability for rare defect categories. The mosaic data augmentation method is used to simulate the actual situation of co - existing multiple defects and background interference in the complex production - line scenario, enhancing the model's collaborative perception ability of local details and global context information.

[0036] S2. After preprocessing the image data information, it is input into three feature maps of different scales through a dual Backbone Composite-ConvNeXt backbone network. The feature maps introduce an Edge Enhancement Feature Fusion structure (EEFF) for image alignment and enhancing edge feature information. After extracting cross-scale defect features, a dynamic fusion feature map is output.

[0037] Based on the original model RT-DETR, a new steel defect surface defect detection algorithm is improved and obtained. The algorithm structure is as Figure 2 shown. The input image first passes through a series of convolutions and enters the Composite Block. Then, three feature maps from the lower layer are selected and enter the Edge Enhancement Feature Fusion structure EEFF. EEFF is added to the CCFF structure of RT-DETR itself. The fusion weight of EEFF and CCFF is dynamically adjusted through a learnable parameter α ∈ [0, 1] and is adaptively optimized during the training process.

[0038] S3. The dynamic fusion feature map is input into the decoder through weighted summation, and the detection result is output and processed to capture multi-scale defect target information.

[0039] The fused feature map is output, and finally, it enters the decoder together with the other two outputs of CCFF itself, and the detection result is output.

[0040] Among them, the backbone network uses a dual Backbone Composite-ConvNeXt (C-ConvNeXt), which is formed by combining two ConvNeXtV2 networks through the DHLC connection method. The structure is as Figure 3 shown. For the composite connection g l (x), it takes x = {x i |i = 1, 2,..., L} from the previous auxiliary backbone as the input and outputs a feature of the same size as x l . Composite-ConvNeXt combines the features of higher layers in the previous backbone and adds them to the lower layers in the subsequent backbone. This method uses Composite-ConvNeXt to replace the feature extraction backbone in the original RT-DETR to enhance the ability to obtain global defect features.

[0041] After the backbone network, the present invention adds an Edge Enhancement Feature Fusion structure (EEFF) to the Encoder block of the original RT-DETR. The EEFF structure consists of an SSFF module and an Edge Enhancement Module (EEM).

[0042] The SSFF module is used to capture multi-scale feature information. 3D convolutional cross-scale fusion is introduced in industrial defect detection to retain spatial dimension information and enhance the feature continuity of small targets (such as punching holes). The input of the module is the feature maps of three layers of the Backbone. SSFF takes the middle layer of the feature map as the reference layer, and at the same time uses 1×1 convolution and the nearest neighbor interpolation method to adjust the number of channels and the size of the feature maps of the upper and lower layers to be the same as the middle layer, ensuring that each layer of the feature map is aligned. Then, the Unsqueeze operation is used to convert it into a 4D feature map (dimensions are depth, height, width, and channels), and then the feature maps are concatenated along the depth into a 3D feature map to retain multi-scale information. After that, it is processed using 3D convolution, 3D-BN, and the Leaky ReLU function to capture multi-scale defect target information.

[0043] The EEM module is used to extract and enhance the edge information of features. It combines SimAM parameter-free attention with edge gradient calculation to dynamically strengthen the defect edge response through a two-stream path. In EEM, the SimAM attention is first used to preprocess the first-level input features to identify the regions worthy of attention. Inspired by neuroscience, SimAM believes that important neurons usually show obvious differences from surrounding neurons. It measures the importance of each neuron by designing an energy function. The lower the energy, the more significant the neuron, that is, it should be enhanced more. For the model, neurons with rich information usually have different patterns from surrounding neurons. Therefore, more attention needs to be paid to neurons with inhibitory effects on space. The minimum energy function is defined as follows:

[0044]

[0045] where t is the feature value (input value) of the current neuron, λ is the smoothing coefficient (hyperparameter, usually set to 1e-4), and represent the variances of all neurons except t, is the energy value of the current neuron t. The lower the energy, the greater the difference between neuron t and its surroundings, that is, the greater its importance.

[0046] By the energy value quantify the importance of each neuron. Neurons with lower energy are more prominent in the feature map, and the model will assign higher weights to them. At the same time, background noise is suppressed, and regions with small differences (high energy values) from surrounding neurons are suppressed, highlighting key regions such as defect edges and textures.

[0047] After passing through SimAM, EEM extracts edge features using pooling, subtraction, and convolution. Edge features usually exhibit high gradient values. The features can be smoothed by using average pooling, and then the features of average pooling are subtracted through a subtraction operation to highlight the edge region. Subsequently, it enters a two-stream path and uses the sigmoid activation function to perform 1×1 convolution on the features to enhance the contrast and saliency of the edge features. Then, the edge features are enhanced again through multiplication and addition. The overall process of EEM can be expressed by the following formula:

[0048]

[0049] where X i is the original input feature map of the module, Conv 1×1 is 1×1 convolution, AP is the average pooling to generate a channel description vector, is the residual feature, Split(·) is feature splitting, is the intermediate feature map, and σ is the sigmoid activation function.

[0050] The improved model architecture fuses multi-level features through a dual backbone network and combines an edge enhancement module to strengthen the saliency of the defect contour, enabling the model to accurately locate tiny defects under disturbances such as light changes and surface reflections. In the design of the backbone network, a dual-structure combination strategy is adopted. Through cross-level feature interaction and fusion, the ability to perceive global defect features is effectively enhanced, enabling the model to more completely capture the spatial distribution characteristics of large-range defects. For edge feature processing, an attention-guided mechanism and multi-scale fusion technology are innovatively introduced. The spatial difference analysis of neurons is used to strengthen the edge response, combined with feature contrast enhancement operations, significantly improving the contour recognition accuracy of low-contrast defects such as fine cracks and blurred boundaries.

[0051] The multi-path feature fusion mechanism integrates cross-scale information through three-dimensional convolution operations, making the algorithm more adaptable to defects of different sizes and still maintaining stable feature discrimination ability under complex texture backgrounds. The introduction of the attention mechanism enables the model to autonomously focus on key defect regions, effectively suppressing common light interference and background noise in industrial scenarios. The introduction of a dynamic loss function optimization strategy balances the learning weights of different difficulty samples, effectively improving the detection stability of complex defects (such as adjacent defect overlap and blurred edges). The overall structure optimization enables the algorithm to achieve a balance between defect location accuracy and edge detection fineness while maintaining real-time performance, especially suitable for high-precision detection requirements under complex working conditions such as surface reflection and oxide layer interference.

[0052] S4. Input the defect target information into the defect detection model, regulate the weights of positive and negative samples through the Focal-MPDIOU Loss function, perform iterative training on the training platform to improve the defect detection model, optimize by combining the sample weights and bounding box regression, and test the detection results to determine the defect location and category.

[0053] The present invention designs the loss function Focal-MPDIOU Loss. The loss function combines MPDIIoU and FocalLoss, and the overall formula is shown as follows. When the IoU value of the prediction box is very small, that is, the confidence of this sample is very low and it is very likely to be a negative sample. At this time, the IoU γ value will approach 0. This enables the reduction of training oscillations caused by low-quality samples during model training and can well balance the proportion of positive and negative samples.

[0054] L FMPDIoU = IoU γ (1 - MPDIoU)

[0055] In the formula, the specific formula of MPDIoU is as follows:

[0056]

[0057] Among them, γ is the penalty term control factor (hyperparameter, usually γ≥0); is the square of the Euclidean distance between the upper left and lower right corners of the prediction box and the ground truth box; w and h are the width and height after image normalization; IoU is the intersection over union of the prediction box and the ground truth box, and are respectively the upper left coordinates and lower right coordinates of the ground truth box A, and are respectively the upper left coordinates and lower right coordinates of the prediction box B.

[0058] When calculating MPDIoU, (divide by the original image size) to ensure the consistency of distance metrics for images with different resolutions. The traditional IoU algorithm has many limitations when used as a Loss. For example, when the boxes cannot intersect, the loss is 0 and training cannot continue; in different overlapping situations, the IoU may be equal and it is impossible to distinguish the effects. By using MPDIoU, it can help reduce the situation of similar regression boxes.

[0059] Set the training parameters and train the improved algorithm. The training platform uses Xeon(R) Gold 5222 as the CPU and NVIDIA RTX 3090 as the GPU, performs experimental operations under the Ubuntu system, mainly uses python3.9 as the programming language, and selects PyTorch as the software framework. Use Adam as the optimizer, adopt the stochastic gradient descent (SGD) algorithm, and set the number of iterations during training.

[0060] The fusion loss function introduced in the present invention combines a spatial distance metric and a sample weight regulation mechanism, which not only effectively addresses the training stagnation problem when there is no intersection between the predicted bounding box and the ground truth bounding box, but also can more finely distinguish similar detection results through geometric feature differences. Its unique normalization process ensures the stable evaluation of the model at different image resolutions and avoids measurement bias. At the same time, the loss function Focal-MPDIOU Loss alleviates the interference of low-quality samples to the training process by dynamically adjusting the contribution degrees of easy and hard samples, enabling the model to focus more on learning key features, thereby improving the precise localization ability of defect positions and the classification discrimination accuracy.

[0061] S5. Deploy the improved defect detection model to a visualization interface to achieve production line detection.

[0062] Deploy the verified algorithm to a visualization interface to achieve efficient and high-precision defect detection on the production line. The deployment solution is compatible with industrial cameras (such as Basler ace 2) and edge devices (Jetson AGX Orin), supports real-time image input and defect annotation, marks the defect positions with red bounding boxes and overlays the Grad-CAM heatmap to intuitively display the model's attention areas. The visualization interface integrates data analysis functions, generates heatmaps of defect distribution, category proportion statistics and historical data traceability by shift, and at the same time triggers hierarchical alarms according to defect confidence levels (such as >0.9 triggers a stop signal), meeting the real-time detection and quality control requirements of high-speed production lines (strip steel speed ≤ 200m / min).

[0063] More specifically, for the efficient deployment of the algorithm in the steel production line, the present application designs a real-time detection system architecture with heterogeneous hardware collaboration and constructs a full-link optimization solution from data acquisition to decision feedback.

[0064] The hardware side adopts a three-level edge computing node layout:

[0065] 1. Front-end perception layer: Deploy high-temperature-resistant industrial cameras (Basler acA2000-165um, frame rate 165fps) at key workstations such as the mill outlet and cooling section, and equip them with active ring LED cold light sources (wavelength 450nm ± 5nm) to eliminate metal reflection interference. The camera is built with an FPGA preprocessing module to perform pixel-level non-uniformity correction (NUC) and dynamic range compression (DRC), accelerate the extraction of edge features through the Canny operator, compress the image resolution from 2048×2048 to 1024×1024, reducing the data transmission load by 60%.

[0066] 2. Edge Inference Layer: Deploy the NVIDIA Jetson AGX Orin edge computing unit in the production line control cabinet to run the detection model quantized by TensorRT. Adopt the dynamic model slicing technology to split the complete network into a mandatory core layer (ConvNeXt backbone) and an optional enhancement layer (EEFF module), and automatically switch the computing mode according to the production line speed:

[0067] High-speed mode (production line speed > 2 m / s): Only run the core layer, and the inference time is reduced to 8 ms / frame, meeting the real-time requirement;

[0068] High-precision mode (production line speed ≤ 2 m / s): Load the complete model, and call the external M.2 acceleration card (with a 4 TOPS computing power NPU) through the PCIe bus to perform parallel computing on the EEFF module, maintaining the detection accuracy AP50 > 70%.

[0069] 3. Cloud Coordination Layer: Connect the edge nodes to the factory MES system through a 5G private network, and deploy a distributed model hot update mechanism. When a new type of defect is detected by a certain edge node, trigger the federated learning protocol, aggregate the new sample features of each node to generate a global model incremental package (Delta Weights), and broadcast it to all nodes on the line after encryption using differential privacy (DP), realizing that the model iteration update time < 30 minutes.

[0070] This application constructs a highly collaborative intelligent detection system by deeply integrating the advantageous capabilities of multiple computing units. The front-end perception layer relies on dedicated hardware to achieve millisecond-level real-time preprocessing, accurately eliminating metal reflection and motion blur interference; the edge inference layer dynamically schedules heterogeneous computing power resources, intelligently balancing detection accuracy and response speed under high-speed production beats, ensuring stable analysis capabilities covering all working conditions; the cloud coordination layer breaks through the information silos of distributed nodes, realizing the autonomous evolution and global synchronization of model capabilities. The system significantly improves the analysis sensitivity of complex defects through the deep coupling of hardware-level acceleration and algorithm-level optimization, and at the same time has a multi-level redundancy guarantee mechanism, and still maintains uninterrupted and reliable operation in harsh industrial scenarios such as strong electromagnetic interference and wide temperature range fluctuations, realizing the seamless connection and self-optimization of the "acquisition - processing - decision-making" link.

[0071] Example 1:

[0072] Conduct five groups of control experiments on the GC10-DET dataset to verify the effectiveness of each improved module:

[0073]

[0074] Experiments show that the dual backbone network brings a 2.4% increase in AP50, proving the effectiveness of cross-level feature fusion; the EEFF module contributes a 3.7% AP50 gain, verifying the significance of multi-scale edge enhancement; the dynamic loss function increases AP75 by 1.6%, reflecting the optimization effect of boundary regression. The present invention improves the precise positioning ability of the steel defect detection method for defect positions and the accuracy of category discrimination.

[0075] Example 2:

[0076] In the loss function Focal-MPDIOU Loss, the penalty term control factor γ is set to 0.5 in the experiment, and the number of training epochs is set to 400. The comparison results with other mainstream object detection algorithms are shown in the following table. The detection results are Figure 5 shown, where Figure 5 the left figure is the improved algorithm, Figure 5 and the right figure is the original RT-DETR.

[0077]

[0078]

[0079] After training is completed, the verification model's AP50 is improved from the original 64.7 to 71.9, and at the same time, the AP metric is improved from the original 33.5 to 36.4, with a significant improvement.

[0080] Through the collaborative optimization of the Composite-ConvNeXt, EEFF structure, and Focal-MPDIoU loss function, this application significantly improves the defect detection accuracy in complex industrial scenarios while maintaining real-time performance. It is especially good at handling blurred edges, small targets, and multi-scale defects, meeting the high-precision and high-efficiency detection requirements of the steel production line. The detection performance is good, the model is relatively simple, and it is suitable for deployment on the production line.

[0081] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A steel defect detection method based on multi-scale edge enhancement, characterized in that, It includes the following steps: Obtain image sample information, load the steel defect dataset, and perform preprocessing. The steel defect dataset is based on the GC10-DET dataset, uses the mosaic data augmentation method, and divides the training set, validation set, and test set proportionally; the steel defect dataset oversamples rare defect categories to balance the sample distribution; After preprocessing the image sample information, input three-layer feature maps of different scales through a dual Backbone Composite-ConvNeXt backbone network. The feature maps introduce an Edge Enhancement Feature Fusion Structure (EEFF) for image alignment and enhancing edge feature information, extract cross-scale defect features, and then output a dynamic fusion feature map; The dynamic fusion feature map is input into the decoder through weighted summation, and the detection results are output and processed to capture multi-scale defect target information; The defect target information is input into the defect detection model. The positive and negative sample weights are regulated by the Focal-MPDIOU Loss function, and the defect detection model is improved through round-by-round training on the training platform. Combining the sample weights and bounding box regression optimization, and testing the detection results to determine the defect location and category; Deploy the improved defect detection model to the visualization interface to achieve production line detection.

2. The method for detecting steel defects based on multi-scale edge enhancement according to claim 1, wherein The dataset preprocessing includes: Oversample the defect categories with the number of samples lower than the mean to ensure the balanced distribution of ten types of defects; The mosaic data augmentation randomly stitches four images and adjusts the coordinates of the annotation boxes.

3. A steel defect detection method based on multi-scale edge enhancement according to claim 1, characterized in that, The Composite-ConvNeXt backbone network is composed of two ConvNeXtV2 networks connected by the DHLC method. Specifically: The high-level features of the previous auxiliary Backbone are combined with the low-level features of the next Backbone through the composite connection function g l (x), where x = {x i | i = 1, 2,..., L} is the input feature, and the output is the enhanced feature with the same size as x l ​ 4. A steel defect detection method based on multi-scale edge enhancement according to claim 1, characterized in that, The Edge Enhancement Feature Fusion Structure (EEFF) is composed of an SSFF module and an EEM module: The SSFF module captures multi-scale feature information, performs channel alignment and 3D convolutional fusion on the three-layer feature maps of the backbone; The EEM module enhances the edge features through SimAM attention, average pooling, subtraction operation, and dual-stream path.

5. A method for detecting steel defects based on multi-scale edge enhancement according to claim 4, characterized in that The operations of the SSFF module include: Use 1×1 convolution and nearest neighbor interpolation on the upper and lower layer feature maps to adjust them to be consistent with the middle layer; After being converted to a 4D feature (depth × height × width × channel) through Unsqueeze, stitch along the depth direction, and process through 3D convolution, 3D-BN, and Leaky ReLU.

6. The steel defect detection method based on multi-scale edge enhancement according to claim 4, characterized in that The processing flow of the EEM module is: Input feature X i Calculate the energy function by SimAM attention Screen significant regions; Pair Perform average pooling (AP) and subtraction operations to generate edge gradient features; Output enhanced features through 1×1 convolution, sigmoid activation, and multiplication-addition operations in a dual-stream path 7. A steel defect detection method based on multi-scale edge enhancement according to claim 4, characterized in that, The output of the EEFF structure is added to the feature map of the original CCFF structure of RT-DETR, and they are jointly input into the decoder to generate the detection results.

8. A steel defect detection method based on multi-scale edge enhancement according to claim 1, characterized in that The Focal-MPDIOU Loss function reduces the training oscillation caused by low-quality samples, and its expression is: L FMPDIoU = IoU γ (1 - MPDIoU) where γ is the penalty term control factor, and the MPDIoU calculation formula is: They are the Euclidean distances from the upper left corner and the lower right corner of the predicted bounding box to those of the ground truth bounding box respectively, where w and h are the width and height of the image.

9. A steel defect detection method based on multi-scale edge enhancement according to claim 1, characterized in that The defect detection model is trained using the Adam optimizer and the Stochastic Gradient Descent (SGD) algorithm; the Adam optimizer converges quickly in the early stage of training, and the SGD algorithm switches to smoothly adjust the learning rate in the later stage of training.

10. A steel defect detection method based on multi-scale edge enhancement according to claim 1, characterized in that The deployment includes defect detection model quantization, TensorRT acceleration, and visualization interface integration, and real-time outputs the defect category, location, and confidence level.

Citation Information

Cited By

  • Infrared photovoltaic module defect identification method, device and equipment and storage medium

    CN120689601A

  • Alloy heat treatment defect detection and repair method based on image recognition

    CN121147178A

  • Insulating material surface defect identification method and system based on visual inspection

    CN121305183A