Metal surface defect detection method, device, equipment and storage medium

Through multi-frequency eddy current scanning and adaptive processing technology, combined with lightweight convolutional neural network, the problem of insufficient recognition ability of complex shapes and micro defects in the existing technology is solved, and efficient and accurate detection of metal surface defects is achieved.

CN119125301BActive Publication Date: 2025-01-17SHENZHEN SHISHANG ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411604250.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-01-17
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The existing metal surface defect detection technology has shortcomings in dealing with complex shapes, identifying tiny defects and dealing with multiple types of defects. In particular, single frequency detection is difficult to fully capture defect information at different depths and types, and traditional methods lack adaptability. It is difficult to deal with changes in different materials and surface conditions.

Method used

Multi-frequency eddy current scanning technology is used to obtain the four-dimensional original data set, through adaptive filtering and compensation processing, combined with adaptive imaging and frequency fusion, multi-dimensional feature extraction is used using lightweight adaptive convolutional neural network, and texture analysis and abnormal detection are carried out , and finally obtain the metal surface defect detection results through multimodal data fusion and decision-making.

Benefits of technology

It improves the comprehensiveness and depth of detection, enhances the ability to identify complex surfaces and tiny defects, improves the accuracy and adaptability of detection, reduces the demand for computing resources, and enhances the reliability and credibility of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119125301B_ABST
    Figure CN119125301B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of surface defect detection, and discloses a method, device, equipment and storage medium for detecting metal surface defects. The method comprises: performing multi-frequency eddy current scanning on the surface of a metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response; performing adaptive filtering and compensation on the four-dimensional original data set to obtain target signal data; performing adaptive imaging and frequency fusion on the target signal data to obtain a two-dimensional image; inputting the two-dimensional image into a lightweight adaptive convolutional neural network to perform multi-dimensional feature extraction to obtain a multi-dimensional feature map; performing texture analysis and anomaly detection on the multi-dimensional feature map to obtain a comprehensive anomaly score map; performing multi-modal data fusion and decision-making on the comprehensive anomaly score map to obtain a metal surface defect detection result. The present invention improves the detection accuracy of metal 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 surface defect detection, and in particular to a metal surface defect detection method, device, equipment and storage medium. Background Art

[0002] Metal surface defect detection plays a vital role in industrial production and quality control. Traditional detection methods, such as visual inspection or simple machine vision systems, often appear to be incapable of detecting metal surfaces with complex shapes or tiny defects.

[0003] However, existing inspection technologies still face many challenges in dealing with complex surfaces, identifying tiny defects, and dealing with multiple types of defects. For example, single-frequency inspections have difficulty capturing defect information of different depths and types, and traditional image processing algorithms are often disturbed when dealing with highly reflective metal surfaces. In addition, most existing methods lack adaptive capabilities and have difficulty dealing with changes in different materials and surface conditions. Summary of the invention

[0004] The present invention provides a metal surface defect detection method, device, equipment and storage medium, which are used to improve the detection accuracy of metal surface defects.

[0005] In a first aspect, the present invention provides a method for detecting metal surface defects, the method comprising:

[0006] Perform multi-frequency eddy current scanning on the surface of the metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response;

[0007] Adaptively filtering and compensating the four-dimensional original data set to obtain target signal data;

[0008] Performing adaptive imaging and frequency fusion on the target signal data to obtain a two-dimensional image;

[0009] Inputting the two-dimensional image into a lightweight adaptive convolutional neural network to extract multi-dimensional features to obtain a multi-dimensional feature map;

[0010] Performing texture analysis and anomaly detection on the multidimensional feature map to obtain a comprehensive anomaly score map;

[0011] Multimodal data fusion and decision making are performed on the comprehensive abnormality score map to obtain metal surface defect detection results.

[0012] In a second aspect, the present invention provides a device for detecting metal surface defects, the device for detecting metal surface defects comprising:

[0013] A scanning module is used to perform multi-frequency eddy current scanning on the surface of a metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response;

[0014] A compensation module, used for adaptively filtering and compensating the four-dimensional original data set to obtain target signal data;

[0015] A fusion module, used for performing adaptive imaging and frequency fusion on the target signal data to obtain a two-dimensional image;

[0016] An extraction module, used for inputting the two-dimensional image into a lightweight adaptive convolutional neural network to extract multi-dimensional features and obtain a multi-dimensional feature map;

[0017] A detection module, used to perform texture analysis and anomaly detection on the multi-dimensional feature map to obtain a comprehensive anomaly score map;

[0018] The decision module is used to perform multimodal data fusion and decision-making on the comprehensive abnormal score map to obtain metal surface defect detection results.

[0019] The third aspect of the present invention provides a metal surface defect detection device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the metal surface defect detection device performs the above-mentioned metal surface defect detection method.

[0020] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned method for detecting metal surface defects.

[0021] In the technical solution provided by the present invention, the multi-frequency eddy current scanning technology improves the comprehensiveness and depth of detection, and can capture defect information of different depths and types. The adaptive filtering and compensation mechanism effectively eliminates the influence of complex surface shapes on the detection results and improves the adaptability of detection. The adaptive imaging and frequency fusion technology enhances the visualization effect of defects, which is conducive to subsequent analysis and identification. The lightweight adaptive convolutional neural network realizes efficient multi-dimensional feature extraction while reducing the demand for computing resources. The combination of texture analysis and anomaly detection improves the recognition ability of tiny defects and abnormal textures. The multimodal data fusion and decision-making mechanism enhances the reliability and comprehensiveness of the detection results. The hierarchical attention fusion algorithm improves the pertinence and effectiveness of feature extraction. The uncertainty quantification and credibility scoring mechanism increase the credibility assessment of the detection results. The dynamic threshold segmentation technology improves the accuracy of defect area division. Therefore, the present invention improves the detection accuracy of metal surface defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0023] Figure 1 A schematic diagram of a process for detecting metal surface defects provided in an embodiment of the present application;

[0024] Figure 2 A schematic block diagram of the structure of a metal surface defect detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change based on actual conditions.

[0027] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0028] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0029] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0030] See also Figure 1 , Figure 1 A schematic diagram of a process for detecting metal surface defects provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the metal surface defect detection method provided in the embodiment of the present application includes steps S100 to S600.

[0031] Step S100, performing multi-frequency eddy current scanning on the surface of the metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response;

[0032] It is understandable that the execution subject of the present invention may be a metal surface defect detection device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.

[0033] Specifically, the excitation frequency within the preset frequency range is discretely sampled, and several discrete excitation frequency points are selected within the frequency range to ensure that all frequencies that may affect the detection results are covered. The eddy current probe spacing is set according to the minimum size of the defect to be detected, and the probe layout scheme of the eddy current array sensor is optimized to ensure sufficient detection sensitivity for defects of different sizes and types. The excitation source is frequency-adjusted based on the discrete excitation frequency points to generate a multi-frequency excitation signal sequence, and the multi-frequency excitation signal sequence is used to excite the eddy current array sensor so as to stimulate eddy current response signals of different depths and properties at different frequencies. The multi-frequency eddy current response signal is impedance measured, and the impedance change data of each probe at each discrete frequency is measured, and the real-time position information of the eddy current array sensor is obtained at the same time to obtain the scanning trajectory data. The impedance change data is time-synchronized with the scanning trajectory data to ensure that the impedance change data and the scanning trajectory data are completely aligned in time, and the time-aligned multi-frequency eddy current response data is obtained. The time-aligned multi-frequency eddy current response data are combined according to spatial coordinates, excitation frequency and impedance response to form a complete four-dimensional raw data set, which contains the impedance response data of each probe at each excitation frequency, and each data point has a clear spatial coordinate.

[0034] Step S200, performing adaptive filtering and compensation on the four-dimensional original data set to obtain target signal data;

[0035] Specifically, the four-dimensional original data set is adaptively filtered to effectively reduce the noise in the original data and obtain the signal data with preliminary noise reduction. The surface shape model is constructed according to the geometric information of the metal workpiece to provide detailed geometric features of each point on the surface of the metal workpiece. Based on the surface shape model, the local curvature is calculated to obtain the curvature value of each point on the surface, reflecting the curvature change of the surface at each point. According to the calculated curvature value, the adaptive compensation factor is designed, and through the application of these factors, a dynamic compensation strategy is formulated for different surface areas. Using the dynamic compensation strategy, the signal data with preliminary noise reduction is compensated to obtain the shape-compensated signal. The shape-compensated signal is analyzed in the frequency domain to understand the attenuation characteristics of the signal at different frequencies. According to the signal attenuation characteristics, a frequency compensation model is constructed to describe the compensation requirements of the signal at each frequency to ensure that the compensated signal can accurately reflect the actual situation. Based on the frequency compensation model, the shape-compensated signal is compensated in the frequency domain to obtain a fully compensated signal. The fully compensated signal is subjected to principal component analysis to reduce the dimensionality of the original high-dimensional data and extract the most representative feature data. The feature data after dimensionality reduction is spatially registered to align these data with the original spatial coordinates to ensure the spatial accuracy of the data and obtain the final target signal data.

[0036] Step S300, performing adaptive imaging and frequency fusion on target signal data to obtain a two-dimensional image;

[0037] Specifically, the frequency response analysis of the target signal data is performed to obtain the signal response characteristics at each frequency, which reflects the response behavior of each point on the metal surface at different excitation frequencies. Based on the signal response characteristics, a multidimensional feature vector is constructed to provide a detailed feature description for each scanning position. The feature description can comprehensively reflect the response of the metal surface at different frequencies. According to the feature description of each scanning position, a dynamically adjusted image reconstruction parameter is generated. By applying the image reconstruction parameter, the target signal data is reconstructed to obtain the initial image at multiple frequencies. The initial image reflects the metal surface state at different frequencies. The initial images at multiple frequencies are weighted superimposed to fuse the information of each frequency to obtain a frequency fused enhanced image. The frequency fused enhanced image is surface unfolded to generate a two-dimensional plane mapping image, and the three-dimensional information is converted into two-dimensional plane information, which is convenient for subsequent processing and analysis. The two-dimensional plane mapping image is subjected to local threshold analysis to highlight the texture features in the image and obtain an enhanced texture image. The enhanced texture image is subjected to minimum enclosing rectangle analysis to extract the main texture skeleton in the image to form a bone texture image. The bone texture image is subjected to iterative deconvolution processing to remove the blurring effect in the image and obtain a high-resolution defect image. The high-resolution defect image is subjected to contrast adjustment and edge enhancement. By adjusting the contrast, the defects in the image are made more obvious, and edge enhancement can highlight the boundaries of the defects, ultimately obtaining a clear and accurate two-dimensional image.

[0038] Step S400: input the two-dimensional image into a lightweight adaptive convolutional neural network to extract multi-dimensional features, thereby obtaining a multi-dimensional feature map;

[0039] Specifically, the two-dimensional image is normalized, and the pixel value range is adjusted so that each pixel value of the image falls within the same standardized range to obtain a standardized input image. The standardized input image is input into the first depth-separable convolution layer of the lightweight adaptive convolutional neural network, and processed using a 3×3 convolution kernel and a 1×1 point convolution. This combination can effectively extract the local features of the image while maintaining computational efficiency to obtain a primary feature map. The primary feature map is subjected to a channel shuffle operation, and the fixed connection between channels is broken by rearranging the channel order, thereby enhancing the expressive ability of the features and obtaining a shuffled feature map. The shuffled feature map is input into the adaptive activation convolution module, and processed by a dynamically generated activation function. The activation function is dynamically adjusted according to the characteristics of the input data, so that the nonlinear expressive ability of the feature map is improved, and a nonlinear feature map is obtained. The nonlinear feature map is input into the spatial attention submodule to calculate the spatial weight of the self-attention mechanism, highlight the important spatial areas in the image, suppress irrelevant background information, and obtain a spatially enhanced feature map. The spatial enhancement feature map is input into the channel attention submodule. Through global average pooling and fully connected layer processing, the weights are redistributed in the channel dimension, so that the important feature channels are enhanced to obtain the channel enhancement feature map. The channel enhancement feature map is residually connected, and the channel enhancement feature map is added to the primary feature map to effectively fuse the multi-level features to obtain the multi-scale fusion feature map. The multi-scale fusion feature map is input into the lightweight convolution module. Through group convolution and point-by-point convolution, the dimension of the feature map is compressed while maintaining the important feature information to obtain the compressed feature map. The compressed feature map is input into the multi-task learning head. Through parallel fully connected layer processing, detection, classification and segmentation tasks are performed simultaneously to obtain multi-task features. The multi-task learning method can make full use of the information of the feature map and improve the accuracy and efficiency of each task. The multi-task features are fused, and the feature fusion is performed through 1×1 convolution. The feature maps of different tasks are integrated together to obtain the final multi-dimensional feature map.

[0040] Step S500, performing texture analysis and anomaly detection on the multi-dimensional feature map to obtain a comprehensive anomaly score map;

[0041] Specifically, the gray-level co-occurrence matrix analysis is performed on the multidimensional feature map to extract the texture statistical features of the image, including contrast, dissimilarity, uniformity, entropy, etc., so as to describe the texture information of the image. Based on the texture statistical features, the texture orientation histogram is constructed. By statistically analyzing the pixel gradient direction, the directional distribution of the metal surface texture is obtained, reflecting the overall directionality and distribution law of the surface texture. The angular region growth is performed on the directional distribution. By finding the peak point in the histogram and expanding it to both sides, the main texture cluster and the abnormal texture cluster are identified. The main texture cluster represents the normal surface texture distribution, while the abnormal texture cluster may contain defect information. The abnormal texture cluster is input into the morphological operation module, and the corrosion and expansion operations are performed to eliminate the noise points and connect the broken texture lines to obtain the accurate abnormal area contour. The multidimensional feature map is input into the One-Class SVM algorithm. By learning the feature distribution of the normal sample, the abnormal area can be preliminarily identified, and the preliminary abnormal detection result is obtained. At the same time, the multidimensional feature map is input into the Isolation Forest algorithm. By randomly dividing the feature space, the abnormality of the sample is evaluated, and the isolation degree of the abnormal sample is obtained. The preliminary anomaly detection results and the isolation degree of abnormal samples are weightedly fused, and the comprehensive anomaly score is obtained by comprehensive calculation based on their respective weights. The texture statistical features and the comprehensive anomaly score are input into the feature fusion attention network, and the features are analyzed, fused and optimized through the multi-head self-attention mechanism to obtain the target fusion feature map. Dynamic threshold segmentation is performed on the target fusion feature map. By combining local contrast and global statistical information, normal areas and defect areas can be accurately distinguished to obtain a preliminary defect area map. The preliminary defect area map is logically ANDed with the contour of the abnormal area. Through pixel-level comparison, misjudgment can be eliminated and the defect area can be accurately located to obtain a comprehensive anomaly score map.

[0042] Step S600: Perform multi-modal data fusion and decision-making on the comprehensive abnormal score map to obtain metal surface defect detection results.

[0043] Specifically, the comprehensive abnormality score map is hierarchically fused to effectively focus on the most significant abnormal area in the image and obtain the attention fusion feature map. The attention mechanism gradually increases the weight of important areas in the image in a hierarchical manner, so that the final feature map can more accurately reflect the location and characteristics of the defect. According to the attention fusion feature map, preliminary defect type and severity assessment results are generated, and these assessment results can provide preliminary judgment information about the defect. Cluster analysis is performed based on the preliminary defect type and severity assessment results to identify the spatial distribution characteristics of the defect area, which include information such as the location, size, and shape of the defect. Through cluster analysis, similar defect areas are classified to better understand the overall distribution of defects. The spatial distribution characteristics are input into the defect morphology analysis module, and the geometric feature description of the defect is obtained by calculating the shape descriptor. These descriptors include geometric features such as roundness, aspect ratio, and boundary complexity. Multi-criteria decision-making is performed on the geometric feature description, and a comprehensive evaluation index of the defect is obtained by comprehensively considering multiple criteria. These criteria may include the area, shape complexity, and location of the defect. The comprehensive evaluation index is compared with the preset defect severity standard to determine whether the severity of the defect exceeds the preset standard, and finally the metal surface defect detection result is obtained.

[0044] In the embodiment of the present invention, the multi-frequency eddy current scanning technology improves the comprehensiveness and depth of detection, and can capture defect information of different depths and types. The adaptive filtering and compensation mechanism effectively eliminates the influence of complex surface shapes on the detection results and improves the adaptability of detection. The adaptive imaging and frequency fusion technology enhances the visualization effect of defects, which is conducive to subsequent analysis and identification. The lightweight adaptive convolutional neural network realizes efficient multi-dimensional feature extraction while reducing the demand for computing resources. The combination of texture analysis and anomaly detection improves the recognition ability of tiny defects and abnormal textures. The multimodal data fusion and decision-making mechanism enhances the reliability and comprehensiveness of the detection results. The hierarchical attention fusion algorithm improves the pertinence and effectiveness of feature extraction. The uncertainty quantification and credibility scoring mechanism increase the credibility assessment of the detection results. The dynamic threshold segmentation technology improves the accuracy of defect area division, and therefore, the present invention improves the detection accuracy of metal surface defects.

[0045] In a specific embodiment, the process of executing step S100 may specifically include the following steps:

[0046] Discretely sample the excitation frequency within a preset frequency range to obtain multiple discrete excitation frequency points, and set the eddy current probe spacing according to the minimum size of the defect to be detected to obtain the probe layout scheme of the eddy current array sensor;

[0047] The excitation source is frequency-adjusted according to discrete excitation frequency points to obtain a multi-frequency excitation signal sequence, and the eddy current array sensor is excited based on the multi-frequency excitation signal sequence to obtain a multi-frequency eddy current response signal;

[0048] The impedance of the multi-frequency eddy current response signal is measured to obtain the impedance change data of each probe at each frequency, and the real-time position information of the eddy current array sensor is obtained to obtain the scanning trajectory data;

[0049] The impedance change data and the scanning trajectory data are time synchronized to obtain time-aligned multi-frequency eddy current response data, and the time-aligned multi-frequency eddy current response data are combined according to spatial coordinates, excitation frequency and impedance response to obtain a four-dimensional original data set.

[0050] Specifically, determine the discrete sampling strategy within the frequency range. Assume the frequency range is , by sampling at uniform intervals or other suitable methods, we can obtain discrete excitation frequency points, which can be expressed as ,in , is the sampling interval. Choose the appropriate To ensure that all frequency ranges that may affect the test results are covered. , calculate the optimal spacing of eddy current probes The probe spacing should be set to meet the Nyquist sampling theorem to ensure that the size of Defects. Assume the working frequency of the probe is , the penetration depth of electromagnetic waves in metals With frequency and the electrical conductivity of metals , magnetic permeability The relationship is:

[0051] ;

[0052] To ensure that the eddy current probe can detect the smallest defects, the probe spacing Should meet According to the above formula, the spacing of the eddy current probes is set, and the probe layout of the eddy current array sensor is designed. When the discrete excitation frequency points and the eddy current probe layout are determined, the excitation source is frequency-adjusted according to the discrete excitation frequency points to obtain a multi-frequency excitation signal sequence. The multi-frequency excitation signal sequence can be expressed as:

[0053] ;

[0054] in is the signal amplitude corresponding to each frequency point, is a time variable. By generating a multi-frequency excitation signal sequence, the eddy current array sensor is excited to obtain a multi-frequency eddy current response signal. The impedance of the multi-frequency eddy current response signal is measured. The impedance change data of each probe at each frequency can be calculated by the following formula:

[0055] ;

[0056] in Is the probe at frequency The voltage under Is the probe at frequency The current under. By measuring the voltage and current at each frequency point, the impedance change data of each probe at each frequency is obtained. In order to accurately locate the working state of the eddy current array sensor, its real-time position information is obtained to obtain the scanning trajectory data. The real-time position information can be obtained through the displacement measurement system inside the sensor or the external positioning system to ensure the accuracy of the position of the probe during the scanning process. The impedance change data and the scanning trajectory data are time synchronized to ensure that the impedance change data and the scanning trajectory data are completely aligned in time. The time synchronization processing usually relies on high-precision timestamps to correspond each set of data to a specific time point to obtain time-aligned multi-frequency eddy current response data. The time-aligned multi-frequency eddy current response data are combined according to the spatial coordinates, excitation frequency and impedance response to form a complete four-dimensional original data set, which contains the impedance response data of each probe at each excitation frequency, and each data point has a clear spatial coordinate. Each element of the four-dimensional original data set can be expressed as Data ,in and are spatial coordinates, is the excitation frequency, is the impedance response.

[0057] In a specific embodiment, the process of executing step S200 may specifically include the following steps:

[0058] Adaptively filter the four-dimensional original data set to obtain preliminary noise-reduced signal data, and build a surface shape model based on the geometric information of the metal workpiece;

[0059] The local curvature is calculated based on the surface shape model to obtain the curvature value of each point on the surface, and an adaptive compensation factor is designed according to the curvature value to obtain a dynamic compensation strategy for different surface areas;

[0060] Performing signal compensation on the signal data of the preliminary noise reduction based on a dynamic compensation strategy to obtain a shape-compensated signal;

[0061] Perform frequency domain analysis on the shape-compensated signal to obtain the signal attenuation characteristics at different frequencies, and build a frequency compensation model based on the signal attenuation characteristics;

[0062] Perform frequency domain compensation on the shape compensated signal based on the frequency compensation model to obtain a fully compensated signal;

[0063] The principal component analysis is performed on the fully compensated signal to obtain the feature data after dimension reduction, and the feature data after dimension reduction is spatially aligned to obtain the target signal data.

[0064] Specifically, the data is processed to eliminate noise and retain valid signals to obtain preliminary noise-reduced signal data. Adaptive filtering can be implemented by a variety of methods, such as Kalman filtering, wavelet transform, etc. For example, wavelet transform is used to process a four-dimensional original data set. Assume that the four-dimensional original data set Contains spatial coordinates and , Excitation frequency and time Four dimensions. Through wavelet transform, the signal is decomposed into sub-signals of different frequency bands, thereby achieving noise reduction. The surface shape model is constructed according to the geometric information of the metal workpiece. The surface shape data of the metal workpiece is obtained through geometric measurement methods such as laser scanning or 3D modeling tools. The surface shape model can be expressed as ,in and is the coordinate on the surface. Based on the surface shape model, the local curvature of each point is calculated The curvature is calculated as:

[0065] ;

[0066] in, It is the second-order derivative of the surface, indicating the curvature of the surface. According to the calculated curvature value, the adaptive compensation factor is designed. The compensation factor is usually inversely proportional to the curvature value, that is, in high curvature areas, the compensation factor is smaller; in low curvature areas, the compensation factor is larger. The compensation factor can be expressed as:

[0067] ;

[0068] in, is a tuning parameter used to control the size of the compensation factor. Based on the compensation factor, a dynamic compensation strategy is formulated for different surface areas. Based on the dynamic compensation strategy, signal compensation is performed on the signal data after preliminary noise reduction. Assume that the signal data after preliminary noise reduction is , by multiplying the compensation factor , and get the shape-compensated signal:

[0069] ;

[0070] Perform frequency domain analysis on the shape compensated signal. Frequency domain analysis can use Fourier transform to convert the time domain signal into frequency domain signal in order to analyze the attenuation characteristics of the signal at different frequencies. Through Fourier transform, the spectrum of the signal is obtained. ,in is the frequency variable. According to the signal attenuation characteristics, a frequency compensation model is constructed. Assume that the attenuation characteristics of the signal can be expressed as , then the frequency compensation model can be designed as:

[0071] ;

[0072] in, is the frequency compensation function. Based on the frequency compensation model, the shape compensated signal is compensated in the frequency domain. , for the signal spectrum Perform compensation and get the fully compensated signal spectrum:

[0073] ;

[0074] By inverse Fourier transform, the frequency domain signal is converted back to the time domain signal to obtain a fully compensated signal The principal component analysis is performed on the fully compensated signal to reduce the dimension and extract the main features. Assume that the fully compensated signal is a high-dimensional data matrix , through principal component analysis, high-dimensional data is projected into low-dimensional space to obtain the feature data matrix after dimensionality reduction The basic process of principal component analysis involves calculating the covariance matrix of the data:

[0075] ;

[0076] Then perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and eigenvectors. The eigenvector corresponding to the largest eigenvalue constitutes the projection matrix , the feature data after dimension reduction is:

[0077] ;

[0078] Perform spatial registration on the reduced feature data to obtain the target signal data. Align the reduced feature data with the original spatial coordinates to ensure that each feature point has the correct spatial position. Spatial registration of feature data is achieved by using spatial transformation methods such as rigid transformation or non-rigid transformation. Assume that the reduced feature data is , the original space coordinates are , then the target signal data after spatial registration is:

[0079] ;

[0080] In a specific embodiment, the process of executing step S300 may specifically include the following steps:

[0081] Perform frequency response analysis on the target signal data to obtain the signal response characteristics at each frequency, and construct a multi-dimensional feature vector based on the signal response characteristics to obtain a feature description of each scanning position;

[0082] Generating dynamically adjusted image reconstruction parameters according to the feature description of each scanning position, and reconstructing the target signal data according to the image reconstruction parameters to obtain initial images at multiple frequencies;

[0083] Performing weighted superposition on the initial images at multiple frequencies to obtain a frequency-fused enhanced image, and performing surface expansion on the frequency-fused enhanced image to obtain a two-dimensional plane mapping image;

[0084] Performing local threshold analysis on the two-dimensional plane mapping image to obtain an enhanced texture image, and performing minimum bounding rectangle analysis on the enhanced texture image to obtain a bone texture image;

[0085] The bone texture image is iteratively deconvolved to obtain a high-resolution defect image, and the high-resolution defect image is contrast adjusted and edge enhanced to obtain a two-dimensional image.

[0086] Specifically, the data of each scanning position is analyzed in the frequency domain to extract the signal response characteristics at each frequency. The time domain signal is converted to the frequency domain using Fourier transform to analyze the response of the signal at different frequencies. Assume that the target signal data is ,in and are spatial coordinates, is time, and through Fourier transform, we get the frequency domain signal ,in is the frequency variable. The Fourier transform formula is:

[0087] ;

[0088] By performing frequency response analysis on the data of each scanning position, the characteristics of the signal amplitude and phase at different frequencies are obtained. According to the signal response characteristics, a multi-dimensional feature vector is constructed. , the eigenvector can contain information such as amplitude, phase, and spectrum density at different frequencies, recorded as ,in and Respectively represent The amplitude and phase at each frequency. Based on the feature description of each scanning position, dynamically adjusted image reconstruction parameters are generated. These parameters determine how to convert frequency domain information into spatial domain images. Assume that the reconstruction parameters are , according to the feature vector The reconstruction parameters are adjusted dynamically to adapt to the signal characteristics at different locations. According to the image reconstruction parameters, the target signal data is reconstructed to obtain the initial images at multiple frequencies. The initial image at each frequency can be expressed as ,in Represents the frequency index. The initial images at multiple frequencies are weighted superimposed to fuse the information of different frequencies. Assume that the weight is , the enhanced image after superposition It can be expressed as:

[0089] ;

[0090] By weighted superposition, the characteristics of defects in the image are enhanced and the influence of noise is reduced. The enhanced image of frequency fusion is surface expanded to convert the three-dimensional information into a two-dimensional plane mapping image. The surface expansion method can be selected according to specific application requirements, such as projection method or flattening method. Local threshold analysis is performed on the two-dimensional plane mapping image to extract the texture features in the image. Through local threshold analysis, an enhanced texture image is obtained The enhanced texture image is analyzed by the minimum bounding rectangle. By calculating the minimum bounding rectangle of each texture area in the image, the main texture skeleton is extracted to obtain the skeleton texture image. This step can simplify the image structure and highlight the main features. The bone texture image is iteratively deconvolved to improve the image resolution. Deconvolution restores the image details by inversely processing the blur kernel to obtain a high-resolution defect image. The deconvolution process can be expressed as:

[0091] ;

[0092] in, represents the convolution operation, It is the inverse of the blur kernel. Contrast adjustment and edge enhancement are performed on high-resolution defect images. By adjusting the contrast of the image, the defect area is made more obvious. Edge enhancement can highlight the boundary of the defect, and finally a two-dimensional image is obtained.

[0093] In a specific embodiment, the process of executing step S400 may specifically include the following steps:

[0094] Normalize the two-dimensional image to obtain a standardized input image;

[0095] The standardized input image is input into the first depth-separable convolutional layer of the lightweight adaptive convolutional neural network, and processed by 3×3 convolution kernel and 1×1 point convolution to obtain the primary feature map;

[0096] Perform channel shuffling operation on the primary feature map, obtain a shuffled feature map by rearranging the channel order, and input the shuffled feature map into the adaptive activation convolution module, and process it through the dynamically generated activation function to obtain a nonlinear feature map;

[0097] The nonlinear feature map is input into the spatial attention submodule to calculate the spatial weight of the self-attention mechanism to obtain the spatial enhanced feature map;

[0098] The spatial enhancement feature map is input into the channel attention submodule for global average pooling and full connection layer processing to obtain the channel enhancement feature map;

[0099] Perform residual connection on the channel enhancement feature map, add the channel enhancement feature map to the primary feature map to obtain a multi-scale fusion feature map;

[0100] The multi-scale fusion feature map is input into the lightweight convolution module for group convolution and point-by-point convolution to obtain a compressed feature map.

[0101] The compressed feature map is input into the multi-task learning head for parallel fully connected layer processing to obtain multi-task features for detection, classification and segmentation;

[0102] The multi-task features are fused through 1×1 convolution to obtain a multi-dimensional feature map.

[0103] Specifically, the pixel values ​​of the image are standardized so that they fall within a uniform range, usually between 0 and 1 or -1 and 1, and the resulting standardized input image will have a uniform pixel value range. The standardized input image is input into the first depthwise separable convolution layer of the lightweight adaptive convolutional neural network. The depthwise separable convolution consists of a 3×3 depthwise convolution kernel and a 1×1 pointwise convolution kernel, which can effectively extract image features while reducing the amount of computation. Through the depthwise separable convolution processing, a primary feature map is obtained. The primary feature map is subjected to channel shuffling. Channel shuffling enhances the expressiveness of the feature map by rearranging the channel order of the feature map, so that the features of different channels can be better integrated. The shuffled feature map is input into the adaptive activation convolution module, which processes the feature map through a dynamically generated activation function to obtain a nonlinear feature map. The adaptive activation function can be dynamically adjusted according to the characteristics of the input data to improve the expressiveness and generalization ability of the network. The nonlinear feature map is input into the spatial attention submodule. The spatial attention submodule calculates the weight of each spatial position through the self-attention mechanism, highlights the important areas, suppresses irrelevant background information, and obtains a spatially enhanced feature map. The spatial enhanced feature map is input into the channel attention submodule. The channel attention submodule is processed by global average pooling and fully connected layers, and the global information of each channel is further enhanced to generate a channel enhanced feature map. The channel enhanced feature map is residually connected, and the channel enhanced feature map is added to the primary feature map to obtain a multi-scale fused feature map. The residual connection can retain the original features and fuse information at different levels to improve the diversity and expression ability of the features. The multi-scale fused feature map is input into the lightweight convolution module, and group convolution and point-by-point convolution are performed to obtain a compressed feature map. Group convolution reduces the amount of calculation by dividing the feature map into multiple groups and performing convolutions separately, while point-by-point convolution is used for linear combination and dimensional compression of feature maps. The compressed feature map is input into the multi-task learning head, which includes parallel fully connected layers for detection, classification and segmentation tasks respectively, to obtain multi-task features. Through multi-task learning, the information of the feature map is fully utilized to improve the accuracy and efficiency of each task. The multi-task features are fused and the features are fused through 1×1 convolution to obtain the final multi-dimensional feature map. 1×1 convolution can effectively integrate feature maps of different tasks and generate multi-dimensional feature maps with high expressive power.

[0104] In a specific embodiment, the process of executing step S500 may specifically include the following steps:

[0105] Gray-level co-occurrence matrix analysis is performed on the multi-dimensional feature map to obtain texture statistical features, and a texture orientation histogram is constructed based on the texture statistical features. The direction distribution of the surface texture is obtained by counting the pixel gradient directions.

[0106] Perform angular region growth on the directional distribution, find the peak point and expand it to both sides to obtain the main texture cluster and abnormal texture cluster;

[0107] The abnormal texture cluster is input into the morphological operation module for corrosion and expansion operations to obtain the precise contour of the abnormal area;

[0108] The multi-dimensional feature graph is input into the One-Class SVM algorithm to learn the feature distribution of normal samples and obtain preliminary anomaly detection results;

[0109] The multi-dimensional feature map is input into the Isolation Forest algorithm to randomly divide the feature space and obtain the isolation degree of abnormal samples;

[0110] Perform weighted fusion on the preliminary anomaly detection results and the isolation degree of abnormal samples to obtain a comprehensive anomaly score;

[0111] The texture statistical features and comprehensive anomaly scores are input into the feature fusion attention network for multi-head self-attention mechanism analysis to obtain the target fusion feature map;

[0112] Perform dynamic threshold segmentation on the target fusion feature map, and obtain a preliminary defect area map by combining local contrast and global statistical information;

[0113] The preliminary defect area map and the abnormal area contour are logically ANDed, and a comprehensive abnormality score map is obtained through pixel-level comparison.

[0114] Specifically, texture statistical features are extracted from the multidimensional feature map. Assume that the multidimensional feature map is ,in and are spatial coordinates, is the feature dimension. Gray-level co-occurrence matrix analysis describes the texture features of the image by counting the joint distribution of pixel pairs in the image. For each feature dimension , calculate its gray-level co-occurrence matrix ,in and is a grayscale value, which indicates the frequency of occurrence of pixel pairs at a specific distance and direction. By analyzing the grayscale co-occurrence matrix of each feature dimension, texture statistical features such as contrast, dissimilarity, homogeneity, entropy, etc. can be obtained. These statistical features can be expressed by formulas, such as contrast It is expressed as:

[0115] ;

[0116] in, is an element in the gray-level co-occurrence matrix, indicating that the gray value is and The pixel pairs in the feature dimension The probability of occurrence on the surface. The texture orientation histogram is constructed based on the texture statistical features. The direction distribution of the surface texture is obtained by counting the pixel gradient directions. Gradient direction By calculating the image and The gradient of the direction is obtained, the formula is:

[0117] ;

[0118] By counting the gradient direction of each pixel, a texture orientation histogram is generated to reflect the directional distribution of the surface texture. The directional distribution is subjected to angular region growth, and the main texture cluster and the abnormal texture cluster are obtained by finding the peak point and expanding it to both sides. The main peak in the directional histogram is identified, representing the main texture direction, and the adjacent secondary peak is found through the expansion method to identify the abnormal texture cluster. The abnormal texture cluster is input into the morphological operation module for erosion and dilation operations to accurately define the contour of the abnormal area. The erosion operation is used to remove small noise points, while the dilation operation is used to fill the gaps inside the contour to obtain an accurate contour of the abnormal area. The multidimensional feature map is input into the One-Class SVM algorithm to learn the feature distribution of normal samples and obtain preliminary anomaly detection results. One-Class SVM is an unsupervised learning method that identifies abnormal samples by learning the feature distribution of normal samples. Assume that the multidimensional feature map is , by training the One-Class SVM model, we get the preliminary anomaly detection results. At the same time, we input the multi-dimensional feature map into the Isolation Forest algorithm to randomly divide the feature space and get the isolation degree of abnormal samples. Isolation Forest divides the data points by building multiple random trees and calculates the difficulty of isolating each data point. By training the Isolation Forest model, we get the isolation degree of abnormal samples for each data point. The initial anomaly detection results and the isolation degree of abnormal samples are weighted and fused to obtain a comprehensive anomaly score. Comprehensive anomaly score It can be expressed as:

[0119] ;

[0120] in, and is a weight parameter, reflecting the importance of the two results in the comprehensive score. The texture statistical features and the comprehensive anomaly score are input into the feature fusion attention network, and the multi-head self-attention mechanism is analyzed to obtain the target fusion feature map. The multi-head self-attention mechanism captures more global information and detailed features by calculating the correlation between each feature and other features. Suppose the comprehensive anomaly score is , after being processed by the multi-head self-attention mechanism, the target fusion feature map is obtained. The target fusion feature map is segmented by dynamic threshold, and a preliminary defect area map is obtained by combining local contrast and global statistical information. The dynamic threshold segmentation method adaptively selects the segmentation threshold according to the local and global characteristics of the image to obtain a preliminary defect area map. Perform a logical AND operation on the preliminary defect area map and the abnormal area contour, and obtain a comprehensive abnormal score map through pixel-level comparison. Comprehensive abnormal score map It can be expressed as:

[0121] Contour ;

[0122] in, Represents logical and operation, Contour is the contour map of the abnormal area.

[0123] In a specific embodiment, the process of executing step S600 may specifically include the following steps:

[0124] Perform hierarchical attention fusion on the comprehensive abnormality score map to obtain an attention fusion feature map, and generate preliminary defect type and severity assessment results based on the attention fusion feature map;

[0125] Cluster analysis was performed based on the preliminary defect type and severity assessment results to obtain the spatial distribution characteristics of the defect area;

[0126] The spatial distribution characteristics are input into the defect morphology analysis module to calculate the shape descriptor, obtain the geometric feature description of the defect, and make a multi-standard decision on the geometric feature description to obtain the comprehensive evaluation index of the defect;

[0127] The comprehensive evaluation index is compared with the preset defect severity standard to obtain the metal surface defect detection results.

[0128] Specifically, the comprehensive anomaly score graph is analyzed to capture features at different levels. Assume that the comprehensive anomaly score graph is ,in and is the spatial coordinate. Through the hierarchical attention mechanism, important features are extracted from multiple levels of global and local. Using the multi-head self-attention mechanism, the comprehensive abnormal score map is processed at multiple scales to obtain the attention fusion feature map The calculation formula of the multi-head self-attention mechanism is:

[0129] ;

[0130] in, Represents query, key and value respectively, It is Attention head, is the output weight matrix. Through hierarchical attention fusion, the preliminary defect type and severity assessment results are generated. Assume that the defect type is , the severity is , these results can be obtained by classification and regression analysis of the attention fusion feature map. The preliminary evaluation results provide a preliminary estimate of the type of each defect area and its severity. Based on the preliminary defect type and severity evaluation results, cluster analysis is performed to obtain the spatial distribution characteristics of the defect area. Using clustering algorithms such as K-means or DBSCAN, similar defect areas are grouped together to identify the spatial distribution characteristics of each defect. Assuming the K-means clustering algorithm is used, the cluster center can be expressed as:

[0131] ;

[0132] in, It is Cluster centers, It belongs to The spatial distribution features are input into the defect morphology analysis module to calculate the shape descriptor and obtain the geometric feature description of the defect. The shape descriptor can include geometric features such as perimeter, area, aspect ratio, roundness, etc. These geometric features can be calculated by image processing technology. For example, the perimeter can be calculated by calculating the number of pixels at the edge of the defect, and the area can be calculated by calculating the number of pixels in the defect area. Assume that the geometric feature description of a defect area is ,in is the circumference, is the area, is the aspect ratio, Is the roundness. Multi-criteria decision making is performed on the geometric feature description to obtain a comprehensive evaluation index of the defect. Multi-criteria decision making can obtain a comprehensive evaluation index by weighted synthesis of various geometric features. , the formula is:

[0133] ;

[0134] in, It is the weight of each geometric feature, reflecting its importance in the comprehensive evaluation. The comprehensive evaluation index is compared with the preset defect severity standard to obtain the metal surface defect detection result. The preset defect severity standard can be determined by expert experience or experimental data as a reference standard. By comparing the comprehensive evaluation index and severity criteria , determine whether the defect exceeds the preset severity threshold, and make the final detection decision. , it means that a serious defect is detected; otherwise, it means that the defect is not serious or no defect is detected.

[0135] See also Figure 2 , Figure 2 The schematic block diagram of the structure of the metal surface defect detection device 200 provided in the embodiment of the present application is as follows: Figure 2 As shown, the metal surface defect detection device 200 includes:

[0136] The scanning module 210 is used to perform multi-frequency eddy current scanning on the surface of the metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response;

[0137] The compensation module 220 is used to perform adaptive filtering and compensation on the four-dimensional original data set to obtain target signal data;

[0138] A fusion module 230 is used to perform adaptive imaging and frequency fusion on the target signal data to obtain a two-dimensional image;

[0139] An extraction module 240 is used to input the two-dimensional image into a lightweight adaptive convolutional neural network to extract multi-dimensional features and obtain a multi-dimensional feature map;

[0140] A detection module 250 is used to perform texture analysis and anomaly detection on the multi-dimensional feature map to obtain a comprehensive anomaly score map;

[0141] The decision module 260 is used to perform multi-modal data fusion and decision-making on the comprehensive abnormal score map to obtain the metal surface defect detection result.

[0142] Through the synergy of the above components, the multi-frequency eddy current scanning technology improves the comprehensiveness and depth of detection, and can capture defect information of different depths and types. The adaptive filtering and compensation mechanism effectively eliminates the influence of complex surface shapes on the detection results and improves the adaptability of detection. The adaptive imaging and frequency fusion technology enhances the visualization effect of defects, which is conducive to subsequent analysis and identification. The lightweight adaptive convolutional neural network realizes efficient multi-dimensional feature extraction while reducing the demand for computing resources. The combination of texture analysis and anomaly detection improves the recognition ability of tiny defects and abnormal textures. The multimodal data fusion and decision-making mechanism enhances the reliability and comprehensiveness of the detection results. The hierarchical attention fusion algorithm improves the pertinence and effectiveness of feature extraction. The uncertainty quantification and credibility scoring mechanism increase the credibility assessment of the detection results. The dynamic threshold segmentation technology improves the accuracy of defect area division. Therefore, the present invention improves the detection accuracy of metal surface defects.

[0143] The present application also provides a metal surface defect detection device, which includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the metal surface defect detection method in the above-mentioned embodiments.

[0144] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for detecting metal surface defects.

[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0147] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting metal surface defects, characterized in that: The method comprises: Perform multi-frequency eddy current scanning on the surface of the metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response; Adaptively filtering and compensating the four-dimensional original data set to obtain target signal data; specifically comprising: adaptively filtering the four-dimensional original data set to obtain signal data with preliminary noise reduction, and constructing a surface shape model according to the geometric information of the metal workpiece; calculating the local curvature based on the surface shape model to obtain the curvature value of each point on the surface, and designing an adaptive compensation factor according to the curvature value to obtain a dynamic compensation strategy for different surface areas; performing signal compensation on the signal data with preliminary noise reduction based on the dynamic compensation strategy to obtain a shape-compensated signal; performing frequency domain analysis on the shape-compensated signal to obtain signal attenuation characteristics at different frequencies, and constructing a frequency compensation model according to the signal attenuation characteristics; performing frequency domain compensation on the shape-compensated signal based on the frequency compensation model to obtain a fully compensated signal; performing principal component analysis on the fully compensated signal to obtain feature data after dimensionality reduction, and performing spatial registration on the feature data after dimensionality reduction to obtain target signal data; Performing adaptive imaging and frequency fusion on the target signal data to obtain a two-dimensional image; Inputting the two-dimensional image into a lightweight adaptive convolutional neural network to extract multi-dimensional features to obtain a multi-dimensional feature map; The multidimensional feature map is subjected to texture analysis and anomaly detection to obtain a comprehensive anomaly score map; specifically, the following steps are performed: gray-level co-occurrence matrix analysis is performed on the multidimensional feature map to obtain texture statistical features, and a texture orientation histogram is constructed based on the texture statistical features, and the directional distribution of the surface texture is obtained by statistically analyzing the pixel gradient directions; the directional distribution is subjected to angular region growth, and the main texture cluster and the abnormal texture cluster are obtained by finding the peak point and expanding to both sides; the abnormal texture cluster is input into the morphological operation module for corrosion and expansion operations to obtain an accurate abnormal area contour; the multidimensional feature map is input into the One-Class SVM algorithm to perform feature distribution learning of normal samples to obtain preliminary anomaly detection results; the multidimensional feature map is input into the Isolation The Forest algorithm randomly divides the feature space to obtain the isolation degree of abnormal samples; the preliminary abnormal detection results and the isolation degree of abnormal samples are weightedly fused to obtain a comprehensive abnormal score; the texture statistical features and the comprehensive abnormal score are input into the feature fusion attention network for multi-head self-attention mechanism analysis to obtain a target fusion feature map; the target fusion feature map is dynamically threshold segmented to obtain a preliminary defect area map by combining local contrast and global statistical information; the preliminary defect area map is logically ANDed with the abnormal area contour to obtain a comprehensive abnormal score map by pixel-level comparison; Multimodal data fusion and decision making are performed on the comprehensive abnormality score map to obtain metal surface defect detection results.

2. The method for detecting metal surface defects according to claim 1, characterized in that: The multi-frequency eddy current scanning is performed on the surface of the metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response, including: Discretely sample the excitation frequency within a preset frequency range to obtain multiple discrete excitation frequency points, and set the eddy current probe spacing according to the minimum size of the defect to be detected to obtain the probe layout scheme of the eddy current array sensor; The excitation source is frequency-adjusted according to the discrete excitation frequency points to obtain a multi-frequency excitation signal sequence, and the eddy current array sensor is excited based on the multi-frequency excitation signal sequence to obtain a multi-frequency eddy current response signal; Performing impedance measurement on the multi-frequency eddy current response signal to obtain impedance change data of each probe at each frequency, and acquiring real-time position information of the eddy current array sensor to obtain scanning trajectory data; The impedance change data and the scanning trajectory data are time synchronized to obtain time-aligned multi-frequency eddy current response data, and the time-aligned multi-frequency eddy current response data are combined according to spatial coordinates, excitation frequency and impedance response to obtain a four-dimensional original data set.

3. The method for detecting metal surface defects according to claim 1, characterized in that: The step of performing adaptive imaging and frequency fusion on the target signal data to obtain a two-dimensional image includes: Performing frequency response analysis on the target signal data to obtain signal response characteristics at each frequency, and constructing a multidimensional feature vector according to the signal response characteristics to obtain a feature description of each scanning position; Generating dynamically adjusted image reconstruction parameters according to the feature description of each scanning position, and reconstructing the target signal data according to the image reconstruction parameters to obtain initial images at multiple frequencies; Performing weighted superposition on the initial images at the multiple frequencies to obtain a frequency-fused enhanced image, and performing surface expansion on the frequency-fused enhanced image to obtain a two-dimensional plane mapping image; Performing local threshold analysis on the two-dimensional plane mapping image to obtain an enhanced texture image, and performing minimum bounding rectangle analysis on the enhanced texture image to obtain a bone texture image; The bone texture image is subjected to iterative deconvolution processing to obtain a high-resolution defect image, and the high-resolution defect image is subjected to contrast adjustment and edge enhancement to obtain a two-dimensional image.

4. The method for detecting metal surface defects according to claim 1, characterized in that: The step of inputting the two-dimensional image into a lightweight adaptive convolutional neural network to extract multi-dimensional features to obtain a multi-dimensional feature map comprises: Normalizing the two-dimensional image to obtain a standardized input image; Input the standardized input image into the first depth-separable convolutional layer of the lightweight adaptive convolutional neural network, and process it through a 3×3 convolution kernel and a 1×1 point convolution to obtain a primary feature map; Performing a channel shuffling operation on the primary feature map, obtaining a shuffled feature map by rearranging the channel order, and inputting the shuffled feature map into an adaptive activation convolution module, processing the shuffled feature map through a dynamically generated activation function, and obtaining a nonlinear feature map; The nonlinear feature map is input into the spatial attention submodule to calculate the spatial weight of the self-attention mechanism to obtain a spatial enhanced feature map; Inputting the spatial enhancement feature map into the channel attention submodule for global average pooling and full connection layer processing to obtain a channel enhancement feature map; Performing a residual connection on the channel enhancement feature map, adding the channel enhancement feature map to the primary feature map to obtain a multi-scale fusion feature map; Inputting the multi-scale fusion feature map into a lightweight convolution module for group convolution and point-by-point convolution processing to obtain a compressed feature map; Inputting the compressed feature map into a multi-task learning head for parallel fully connected layer processing to obtain multi-task features for detection, classification and segmentation; The multi-task features are fused by 1×1 convolution to obtain a multi-dimensional feature map.

5. The method for detecting metal surface defects according to claim 1, characterized in that: The multi-modal data fusion and decision making of the comprehensive abnormal score map to obtain the metal surface defect detection result includes: Performing hierarchical attention fusion on the comprehensive abnormality score map to obtain an attention fusion feature map, and generating preliminary defect type and severity assessment results based on the attention fusion feature map; Performing cluster analysis based on the preliminary defect type and the severity assessment results to obtain spatial distribution characteristics of the defect area; The spatial distribution characteristics are input into the defect morphology analysis module to calculate the shape descriptor to obtain a geometric feature description of the defect, and a multi-standard decision is made on the geometric feature description to obtain a comprehensive evaluation index of the defect; The comprehensive evaluation index is compared with a preset defect severity standard to obtain a metal surface defect detection result.

6. A device for detecting metal surface defects, characterized in that: Used to perform the method for detecting metal surface defects as described in any one of claims 1 to 5, the device comprising: A scanning module is used to perform multi-frequency eddy current scanning on the surface of a metal workpiece to obtain a four-dimensional original data set including spatial coordinates, excitation frequency and impedance response; A compensation module is used to adaptively filter and compensate the four-dimensional original data set to obtain target signal data; specifically comprising: adaptively filtering the four-dimensional original data set to obtain signal data with preliminary noise reduction, and constructing a surface shape model according to the geometric information of the metal workpiece; calculating the local curvature based on the surface shape model to obtain the curvature value of each point on the surface, and designing an adaptive compensation factor according to the curvature value to obtain a dynamic compensation strategy for different surface areas; performing signal compensation on the signal data with preliminary noise reduction based on the dynamic compensation strategy to obtain a shape-compensated signal; performing frequency domain analysis on the shape-compensated signal to obtain signal attenuation characteristics at different frequencies, and constructing a frequency compensation model according to the signal attenuation characteristics; performing frequency domain compensation on the shape-compensated signal based on the frequency compensation model to obtain a fully compensated signal; performing principal component analysis on the fully compensated signal to obtain feature data after dimensionality reduction, and performing spatial registration on the feature data after dimensionality reduction to obtain target signal data; A fusion module, used for performing adaptive imaging and frequency fusion on the target signal data to obtain a two-dimensional image; An extraction module, used for inputting the two-dimensional image into a lightweight adaptive convolutional neural network to extract multi-dimensional features and obtain a multi-dimensional feature map; The detection module is used to perform texture analysis and anomaly detection on the multidimensional feature map to obtain a comprehensive anomaly score map; specifically, the following steps are performed: gray-level co-occurrence matrix analysis is performed on the multidimensional feature map to obtain texture statistical features, and a texture orientation histogram is constructed based on the texture statistical features to obtain the directional distribution of the surface texture by counting the pixel gradient directions; the angular region growth is performed on the directional distribution to obtain the main texture cluster and the abnormal texture cluster by finding the peak point and expanding to both sides; the abnormal texture cluster is input into the morphological operation module for corrosion and expansion operations to obtain an accurate abnormal region contour; the multidimensional feature map is input into the One-Class SVM algorithm to perform feature distribution learning of normal samples to obtain preliminary anomaly detection results; the multidimensional feature map is input into the Isolation The Forest algorithm randomly divides the feature space to obtain the isolation degree of abnormal samples; the preliminary abnormal detection results and the isolation degree of abnormal samples are weightedly fused to obtain a comprehensive abnormal score; the texture statistical features and the comprehensive abnormal score are input into the feature fusion attention network for multi-head self-attention mechanism analysis to obtain a target fusion feature map; the target fusion feature map is dynamically threshold segmented to obtain a preliminary defect area map by combining local contrast and global statistical information; the preliminary defect area map is logically ANDed with the abnormal area contour to obtain a comprehensive abnormal score map by pixel-level comparison; The decision module is used to perform multimodal data fusion and decision-making on the comprehensive abnormal score map to obtain metal surface defect detection results.

7. A metal surface defect detection device, characterized in that: The metal surface defect detection device comprises: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory to enable the metal surface defect detection device to perform the metal surface defect detection method according to any one of claims 1 to 5.

8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the method for detecting metal surface defects according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method for improving metal defect eddy current detection accuracy based on deep learning

    CN113673359A

  • Multi-modal fusion metal workpiece surface defect detection method and system

    CN116935174A