Metal surface defect detection and evaluation method of mixed domain adaptive DCNN architecture

Through the hybrid domain adaptive DCNN architecture, the problems of poor domain adaptability, low computational efficiency and insufficient robustness in metal surface defect detection are solved, and high-precision, real-time defect detection and evaluation are achieved, which is suitable for intelligent manufacturing in fields such as steel and automobile manufacturing.

CN120635053APending Publication Date: 2025-09-12MASTEEL HEFEI IRON & STEEL CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510943165.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing technologies in metal surface defect detection have problems such as poor domain adaptability, low computational efficiency, insufficient detection robustness and lack of interpretability, making it difficult to meet the real-time and high-precision detection requirements in industrial environments.

Method used

A hybrid domain adaptive DCNN architecture is adopted, and adversarial training is performed through a multi-stage feature extraction network, entropy-driven knowledge distillation, and gradient reversal layer, combined with regression activation map visualization to improve the cross-domain adaptability, robustness, and interpretability of the model.

Benefits of technology

It achieves high-precision, real-time and explainable defect detection under cross-domain data, which is suitable for real-time quality monitoring in fields such as steel and automobile manufacturing, and improves detection accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635053A_ABST
    Figure CN120635053A_ABST
Patent Text Reader

Abstract

The invention discloses a metal surface defect detection and evaluation method of a mixed domain adaptive DCNN architecture, and the method comprises the steps: building a multi-stage feature extraction network through the fusion of a state space model and an adversarial learning technology, and strengthening the feature consistency of the same field and the feature alignment of a source-target field through the space-channel adaptive dynamic modeling cross-field difference. An entropy-driven knowledge distillation strategy is further proposed, noise is suppressed by using a Margin ReLU function, feature expression of a target domain is enhanced, and efficient deployment is realized in combination with lightweight distillation; pixel-level and feature-level adversarial training is carried out through a gradient inversion layer, and domain invariance is improved; an entropy-guided random multilayer disturbance mechanism is designed, multi-field features are adaptively fused, the anti-noise capability of the model is enhanced, in addition, a regression activation graph is integrated to visualize a defect attention region, the decision interpretability is improved, and a high-precision, high-robustness and interpretable defect detection evaluation scheme is provided for intelligent manufacturing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial quality inspection technology, and in particular to a metal surface defect detection and evaluation method based on a hybrid domain adaptive DCNN architecture. Background Art

[0002] The detection and assessment of metal surface defects (such as cracks, pits, and inclusions) is a core process in industrial manufacturing, directly impacting product quality and safety. Traditional methods rely on manual visual inspection or rule-based image processing techniques, which suffer from low efficiency, strong subjectivity, and difficulty handling complex textures and lighting variations. While deep learning-based defect detection methods have improved accuracy in recent years, they still face the following challenges:

[0003] (1) Poor domain adaptability: After the model is trained in a laboratory environment (source domain), it is difficult to adapt to the domain shift caused by material differences, lighting changes, or different surface treatment processes in the actual production line (target domain);

[0004] (2) Low computational efficiency: The traditional Transformer architecture is difficult to meet industrial real-time requirements due to the high computational complexity of the self-attention mechanism;

[0005] (3) Insufficient robustness in small defect detection: Small or irregularly shaped defects are easily disturbed by background noise, resulting in missed detection or false detection. The detection accuracy of the YOLO algorithm decreases significantly under such interference.

[0006] (4) Lack of explainability: The model decision-making process lacks transparency and is difficult to meet the credibility requirements of industrial quality inspection.

[0007] Existing methods based on unsupervised domain adaptation (UDA) attempt to mitigate domain differences through adversarial training or feature alignment, but their effectiveness in metal surface defect detection is limited. Furthermore, conventional attention mechanisms are computationally expensive for modeling long sequences, limiting their deployment in industrial scenarios. Summary of the Invention

[0008] The purpose of the present invention is to provide a metal surface defect detection and evaluation method based on a hybrid domain adaptive DCNN architecture to solve industrial quality inspection problems such as cross-domain data adaptation, robustness and real-time performance of complex defect detection.

[0009] To achieve the above object, the present invention provides the following technical solutions:

[0010] The metal surface defect detection and evaluation method based on the hybrid domain adaptive DCNN architecture includes the following steps:

[0011] S1: Construct a multi-stage feature extraction network: The first two stages use convolution blocks to extract low-level spatial features, and the last four stages introduce DCNN blocks to dynamically model cross-domain differences through the state space model (SSM) of spatial-channel adaptation, thereby strengthening the consistency of features in the same domain and the alignment of source and target domain features;

[0012] S2: Based on the entropy-driven knowledge distillation (EKD) strategy, it uses the Margin ReLU function to suppress noise and enhance the target domain feature expression, combined with lightweight distillation to achieve efficient deployment;

[0013] S3: Perform pixel-level and feature-level adversarial training through the gradient reversal layer GRL to improve domain invariance;

[0014] S4: Design an entropy-guided random multi-layer perturbation mechanism to adaptively integrate multi-domain features and enhance the model's noise resistance;

[0015] S5: Integrated regression activation map Grad-RAM visualizes defect attention areas and improves decision interpretability;

[0016] S6: Experimental verification: including cross-material testing, efficiency comparison and robustness verification.

[0017] Furthermore, S1 includes the construction of cross-domain datasets. The specific methods are as follows:

[0018] Data collection: Use industrial cameras to collect images of metal surface defects of different metal materials, different lighting conditions, and different surface treatment processes. The resolution is 2080×1000, and each type of defect is marked with a severity level of 1-5.

[0019] Domain division: The source domain data is the annotated steel image in a standard laboratory environment, and the target domain data is the collected surface image of aluminum products, simulating the real domain offset scenario.

[0020] Furthermore, cross-domain data preprocessing is also included. The specific methods are as follows:

[0021] Image enhancement: Rotate, multi-scale crop, and adjust contrast of source and target domain images to simulate diverse environments;

[0022] Domain Adaptation Enhancement: Use CycleGAN to generate cross-domain synthetic data and constrain texture and lighting style transfer through cycle consistency loss;

[0023] Normalization and denoising: Gaussian filtering is applied to remove noise and pixel values ​​are normalized to [0,1].

[0024] Furthermore, it also includes hybrid domain adaptation feature extraction, the specific method is as follows:

[0025] a. Low-level feature extraction: The first two stages use ResNet-18 convolutional blocks to extract edge and texture features;

[0026] b.DCNN block design:

[0027] Spatial Adaptive SSM: Modeling cross-domain differences in spatial dimensions through one-dimensional convolutional kernels and gating mechanisms;

[0028] Channel Adaptation SSM: Dynamically adjust channel weights based on SE attention;

[0029] Cross-attention alignment: Calculate the cosine similarity matrix of source and target features, perform Softmax normalization, and then perform weighted fusion.

[0030] Furthermore, in the EKD strategy of S2, the entropy value of the target domain feature map is calculated as H = -∑p i log p i , set the threshold τ = 0.7, and apply the Margin ReLU function α = 0.2 to suppress low-confidence features, and the distillation loss constrains the consistency of teacher-student model features.

[0031] Furthermore, adversarial training is performed in S3: after the shallow GRL is inserted into the first convolutional layer, the domain classifier consists of a 3-layer fully connected network; after the deep GRL is inserted into the 4th DCNN block, the difference in high-level semantic features is minimized.

[0032] Furthermore, S4 includes robustness enhancement and model optimization. The specific methods are as follows:

[0033] Entropy-guided perturbation: Gaussian noise σ = 0.1 is applied to low entropy features H < 0.3, and random occlusion is applied to high entropy features H > 0.7, with a ratio of 10%;

[0034] Multi-task loss optimization: weight coefficients λ1 = 1.0, λ2 = 0.5, λ3 = 0.2, λ4 = 0.3, jointly trained with Adam optimizer lr = 1e-4;

[0035] Transfer learning: Load ImageNet pre-trained weights, fine-tune for 100 epochs, and use a batch size of 32.

[0036] Furthermore, the specific method in S5 is as follows:

[0037] S501: Defect assessment: Input the target area image, extract features through the DCNN block, and output the defect category and severity score;

[0038] S502: Visualization: Generate a Grad-RAM heat map, select the top-20 attention areas, and overlay them on the original image to display the defect location results.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] The present invention proposes a hybrid domain adaptive DCNN architecture for metal surface defect detection and assessment. By integrating state-space models and adversarial learning techniques, a multi-stage feature extraction network is constructed. Convolutional blocks are used in the first two stages to extract low-level spatial features, while DCNN blocks are introduced in the last four stages. A spatial-channel adaptive SSM dynamically models cross-domain differences, strengthening feature consistency within the same domain and alignment of source and target domain features. Furthermore, an entropy-driven knowledge distillation (EKD) strategy is proposed, which utilizes the MarginReLU function to suppress noise and enhance target domain feature expression. This strategy, combined with lightweight distillation, enables efficient deployment. A gradient reversal layer (GRL) is used for pixel-level and feature-level adversarial training to improve domain invariance. An entropy-guided random multi-layer perturbation mechanism is designed to adaptively integrate features from multiple domains and enhance the model's noise immunity. Furthermore, an integrated regression activation map (Grad-RAM) is used to visualize defect focus areas, improving decision interpretability. This makes the present invention widely applicable to real-time quality monitoring in fields such as steel and automotive manufacturing. It provides a high-precision, robust, and interpretable defect detection and assessment solution for intelligent manufacturing, addressing industrial quality inspection challenges such as cross-domain data adaptation, robustness, and real-time performance of complex defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of the network architecture of the defect detection and evaluation method of the present invention;

[0042] Figure 2 This is the internal structure diagram of the DCNN block of the present invention;

[0043] Figure 3 Generate sample graphs for the Grad-RAM of the present invention;

[0044] Figure 4 This is a comparison chart of the cross-domain detection performance of the present invention. DETAILED DESCRIPTION

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The embodiments of the present invention and all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0046] See also Figure 1 The metal surface defect detection and evaluation method based on the hybrid domain adaptive DCNN architecture provided by the embodiment of the present invention includes the following steps:

[0047] S1: Construct a multi-stage feature extraction network: The first two stages use convolutional blocks to extract low-level spatial features, and the last four stages introduce DCNN blocks. The state space model (SSM) with spatial-channel adaptation dynamically models cross-domain differences, strengthens the consistency of features in the same domain, and aligns source and target domain features. Specifically, it includes:

[0048] S101: Cross-domain dataset construction:

[0049] Data collection: An industrial camera was used to capture images of metal surface defects of different materials (steel, aluminum, etc.), lighting conditions (50-500 Lux), and surface treatment processes (polishing, sandblasting). The resolution was 2080×1000, and each type of defect (10 in total) was annotated with a severity level (1-5).

[0050] Domain division: The source domain data is 1,500 labeled steel images in a standard laboratory environment, and the target domain data is 500 collected surface images of aluminum products, simulating real domain offset scenarios.

[0051] S102: Cross-domain data preprocessing:

[0052] Image enhancement: Rotate source and target domain images (±30°), crop them at multiple scales (0.8-1.2 times), and adjust contrast (±20%) to simulate diverse environments.

[0053] Domain Adaptation Enhancement: CycleGAN is used to generate cross-domain synthetic data (accounting for 25%), and texture and lighting style transfer is constrained by cycle consistency loss;

[0054] Normalization and noise reduction: Gaussian filtering (σ = 1.5) is applied to remove noise and pixel values ​​are normalized to [0, 1].

[0055] S103: Hybrid Domain Adaptation Feature Extraction:

[0056] Low-level feature extraction: The first two stages use ResNet-18 convolutional blocks to extract edge and texture features;

[0057] DCNN block design, such as Figure 2 As shown:

[0058] Spatially adapted SSM: Modeling cross-domain differences in spatial dimensions through one-dimensional convolutional kernels (k=3) and gating mechanisms;

[0059] Channel Adaptation SSM: Dynamically adjust channel weights based on SE (Squeeze-and-Excitation) attention;

[0060] Cross-attention alignment: Calculate the cosine similarity matrix of source and target features, and perform weighted fusion after Softmax normalization.

[0061] S2: Based on the entropy-driven knowledge distillation EKD strategy, the Margin ReLU function is used to suppress noise and enhance the target domain feature expression, combined with lightweight distillation to achieve efficient deployment; Among them, in the EKD strategy, the entropy value H of the target domain feature map is calculated as -∑p i log p i , set the threshold τ = 0.7, and apply the Margin ReLU function α = 0.2 to suppress low-confidence features, and the distillation loss constrains the consistency of teacher-student model features;

[0062] S3: Pixel-level and feature-level adversarial training is performed through the gradient reversal layer (GRL) to improve domain invariance. Specifically, after inserting the shallow GRL layer into the first convolutional layer, the domain classifier consists of a three-layer fully connected network. After inserting the deep GRL layer into the fourth DCNN block, the difference in high-level semantic features is minimized.

[0063] S4: Design an entropy-guided random multi-layer perturbation mechanism to adaptively integrate multi-domain features and enhance the model's noise resistance. This includes robustness enhancement and model optimization. The specific methods are as follows:

[0064] Entropy-guided perturbation: Gaussian noise σ = 0.1 is applied to low entropy features H < 0.3, and random occlusion is applied to high entropy features H > 0.7, with a ratio of 10%;

[0065] Multi-task loss optimization: weight coefficients λ1 = 1.0, λ2 = 0.5, λ3 = 0.2, λ4 = 0.3, jointly trained with Adam optimizer lr = 1e-4;

[0066] Transfer learning: load ImageNet pre-trained weights, fine-tune for 100 epochs, and use a batch size of 32;

[0067] S5: Integrate regression activation map Grad-RAM to visualize defect focus areas and improve decision interpretability; the specific method is as follows:

[0068] S501: Defect assessment: Input the target area image, extract features through the DCNN block, and output the defect category and severity score;

[0069] S502: Visualization: Generate a Grad-RAM heat map, select the top-20 attention areas, and overlay them on the original image to display the defect location results; Figure 3 Figure 1 shows the superposition of the input image, attention heatmap, and defect localization results, intuitively reflecting the model's decision-making basis. The first row shows the input image, the second row shows the attention heatmap, and the third row shows the defect detection block diagram.

[0070] S6: Experimental verification: including cross-material testing, efficiency comparison and robustness verification, specifically Figure 4 As shown in the figure, the mAP, recall rate and inference speed indicators of the present invention and the existing methods on the steel and aluminum data sets are compared, where:

[0071] Cross-material testing: Using a steel dataset as the source domain (with a large amount of training data), the proposed method achieved mAP = 93.5%, and using an aluminum dataset as the target domain, it achieved mAP = 89.4%. The recall rates for both datasets were 85.5% and 82.8%, respectively. Compared with other defect detection methods, the proposed method achieved minimal performance degradation under cross-material testing.

[0072] Efficiency comparison: The lightweight model achieves an inference speed of 38 frames per second on Jetson AGX Xavier and 15 frames per second on the CPU.

[0073] Robustness verification: The accuracy fluctuation is less than 5% under low light (30Lux), and the missed detection rate is less than 5% under high noise (SNR=15dB).

[0074] Experiments show that the proposed method achieves an average detection accuracy (mAP) exceeding 90% and a recall rate exceeding 84% across multiple materials and illumination scenarios. The lightweight model achieves an inference speed of 15 frames per second (CPU device), a 60% improvement in efficiency over the YOLO architecture, and excels in detecting small and irregular defects. This suggests that the proposed method can be widely applied to real-time quality monitoring in fields such as steel and automotive manufacturing, providing a high-precision, robust, and interpretable defect detection and assessment solution for intelligent manufacturing.

[0075] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A metal surface defect detection and evaluation method based on a hybrid domain adaptive DCNN architecture is characterized by: The following steps are involved: S1: Construct a multi-stage feature extraction network: The first two stages use convolution blocks to extract low-level spatial features, and the last four stages introduce DCNN blocks to dynamically model cross-domain differences through the state space model (SSM) of spatial-channel adaptation, thereby strengthening the consistency of features in the same domain and the alignment of source and target domain features; S2: Based on the entropy-driven knowledge distillation (EKD) strategy, it uses the Margin ReLU function to suppress noise and enhance the target domain feature expression, combined with lightweight distillation to achieve efficient deployment; S3: Perform pixel-level and feature-level adversarial training through the gradient reversal layer GRL to improve domain invariance; S4: Design an entropy-guided random multi-layer perturbation mechanism to adaptively integrate multi-domain features and enhance the model's noise resistance; S5: Integrated regression activation map Grad-RAM visualizes defect attention areas and improves decision interpretability; S6: Experimental verification: including cross-material testing, efficiency comparison and robustness verification.

2. The metal surface defect detection and assessment method based on a hybrid domain adaptive DCNN architecture according to claim 1, characterized in that: S1 includes the construction of cross-domain datasets. The specific method is as follows: Data collection: Use industrial cameras to collect images of metal surface defects of different metal materials, different lighting conditions, and different surface treatment processes. The resolution is 2080×1000, and each type of defect is marked with a severity level of 1-5. Domain division: The source domain data is the annotated steel image in a standard laboratory environment, and the target domain data is the collected surface image of aluminum products, simulating the real domain offset scenario.

3. The metal surface defect detection and assessment method based on a hybrid domain adaptive DCNN architecture according to claim 2, characterized in that: It also includes cross-domain data preprocessing, the specific methods are as follows: Image enhancement: Rotate, multi-scale crop, and adjust contrast of source and target domain images to simulate diverse environments; Domain Adaptation Enhancement: Use CycleGAN to generate cross-domain synthetic data and constrain texture and lighting style transfer through cycle consistency loss; Normalization and denoising: Gaussian filtering is applied to remove noise and pixel values ​​are normalized to [0,1].

4. The metal surface defect detection and assessment method based on a hybrid domain adaptive DCNN architecture according to claim 3 is characterized by: It also includes hybrid domain adaptation feature extraction, the specific method is as follows: a. Low-level feature extraction: The first two stages use ResNet-18 convolutional blocks to extract edge and texture features; b.DCNN block design: Spatial Adaptive SSM: Modeling cross-domain differences in spatial dimensions through one-dimensional convolutional kernels and gating mechanisms; Channel Adaptation SSM: Dynamically adjust channel weights based on SE attention; Cross-attention alignment: Calculate the cosine similarity matrix of source and target features, perform Softmax normalization, and then perform weighted fusion.

5. The metal surface defect detection and assessment method based on a hybrid domain adaptive DCNN architecture according to claim 1, wherein: In the EKD strategy of S2, the entropy value of the target domain feature map is calculated as H = -∑pilogp i , set the threshold τ = 0.7, and apply the Margin ReLU function α = 0.2 to suppress low-confidence features, and the distillation loss constrains the consistency of teacher-student model features.

6. The metal surface defect detection and assessment method based on a hybrid domain adaptive DCNN architecture according to claim 1, wherein: Adversarial training in S3: After the shallow GRL is inserted into the first convolutional layer, the domain classifier consists of a 3-layer fully connected network; after the deep GRL is inserted into the 4th DCNN block, the difference in high-level semantic features is minimized.

7. The metal surface defect detection and assessment method based on a hybrid domain adaptive DCNN architecture according to claim 1, characterized in that: S4 includes robustness enhancement and model optimization. The specific methods are as follows: Entropy-guided perturbation: Gaussian noise σ = 0.1 is applied to low entropy features H < 0.3, and random occlusion is applied to high entropy features H > 0.7, with a ratio of 10%; Multi-task loss optimization: weight coefficients λ1 = 1.0, λ2 = 0.5, λ3 = 0.2, λ4 = 0.3, jointly trained with Adam optimizer lr = 1e-4; Transfer learning: Load ImageNet pre-trained weights, fine-tune for 100 epochs, and use a batch size of 32.

8. The metal surface defect detection and assessment method based on a hybrid domain adaptive DCNN architecture according to claim 1, wherein: The specific method in S5 is as follows: S501: Defect assessment: Input the target area image, extract features through the DCNN block, and output the defect category and severity score; S502: Visualization: Generate a Grad-RAM heat map, select the top-20 attention areas, and overlay them on the original image to display the defect location results.

Citation Information

Cited By

  • Lightweight method for detecting steel surface defects based on advertive distillation

    CN121304685A

  • A lightweight method for steel surface defect detection based on adversarial distillation

    CN121304685B