Method for detecting defects of al-zn-si clad sheet by x-ray image
By separating speckle background and micro-defect features through a physical constraint feature decoupling network and combining it with an attention mechanism based on ripple morphology prior, the problem of speckle artifact confusion in the detection of explosive weld defects in aluminum-zinc-silicon coated steel coils is solved, achieving efficient defect identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TANGSHAN HONGSHENG METAL MATERIALS CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-28
AI Technical Summary
In the detection of explosive weld defects in aluminum-zinc-silicon coated steel coils, speckle artifacts are easily confused with micro-defect features, leading to missed detections. Furthermore, conventional methods destroy the edge texture features of micro-defects or lack physical constraints, resulting in misjudgments.
A physical constraint feature decoupling network is adopted. The speckle background features are separated by the feature extraction backbone and the physical attenuation constraint branch. The defect recognition branch uses the prior of the ripple morphology of the explosive weld interface for attention weighting, and outputs the pixel-level recognition results of non-fusion and microcrack defects.
It effectively separates speckle background features from micro-defect features, avoiding interference from speckle artifacts in micro-defect identification and improving the accuracy and stability of defect identification.
Smart Images

Figure CN122473084A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology and discloses a method for detecting explosive welding defects in aluminum-zinc-silicon coated steel coils based on X-ray images. Background Technology
[0002] Currently, defect detection in explosive welds of aluminum-zinc-silicon coated steel coils based on X-ray images typically employs general image denoising algorithms combined with morphological edge detection, or directly uses standard convolutional neural networks for feature extraction and classification. Existing techniques treat X-ray transmission images as a single grayscale matrix, filtering out high-frequency noise separately through mean or median filtering, and then relying on network self-learning to extract grayscale abrupt change regions to mark defects. This method relies on the statistical distribution patterns of image pixels for anomaly detection, treating speckle noise and defect features as abnormal high-frequency signals deviating from the normal background.
[0003] Under X-ray transmission, aluminum-zinc-silicon alloys exhibit dense speckle artifacts in images due to the non-uniform scattering of X-rays by their internal crystal structure. The grayscale distribution of these speckle artifacts is highly similar to the minute unfusion defects at the interface of an explosive weld. Conventional filtering methods for smoothing the speckle can destroy the texture features of the micro-defect edges. Furthermore, standard convolutional neural networks, lacking constraints on the physical causes of the speckle, can confuse speckle artifact features with micro-defect features during feature extraction, leading to the micro-defects being masked by the speckle background and thus missed detection. Summary of the Invention
[0004] The purpose of this invention is to provide a method for detecting defects in explosive welding of aluminum-zinc-silicon coated steel coils based on X-ray images, which can effectively solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for detecting defects in explosive welding of aluminum-zinc-silicon coated steel coils based on X-ray images includes: acquiring an X-ray image sequence of the explosive welding interface of the aluminum-zinc-silicon coated steel coils, and inputting the X-ray image sequence into a pre-constructed physical constraint feature decoupling network; The physical constraint feature decoupling network includes a feature extraction backbone, a physical attenuation constraint branch, and a defect identification branch; Multi-scale spatial feature maps are extracted from the X-ray image sequence using the feature extraction backbone. The physical attenuation constraint branch calculates the physical reconstruction loss of the current multi-scale spatial feature map based on the X-ray quality attenuation coefficient matrix of aluminum zinc silicon alloy. The physical reconstruction loss is then backpropagated to the feature extraction backbone as a regularization term, forcing the feature extraction backbone to separate speckle background features that conform to the physical attenuation law when extracting features. The defect identification branch receives the residual feature map after removing the speckle background features, and uses an attention mechanism that combines the prior knowledge of the ripple morphology of the explosive weld interface to perform weighted processing on the residual feature map, outputting pixel-level identification results of incomplete fusion and microcrack defects.
[0006] Preferably, before acquiring the X-ray image sequence of the explosive weld interface of the aluminum-zinc-silicon coated steel coil, the acquired raw X-ray image is preprocessed, including: performing logarithmic transformation on the raw X-ray image to eliminate the exponential decay characteristic of the radiation intensity and obtain a logarithmic domain image. Perform a Fourier transform on the logarithmic domain image to obtain a spectrogram; A bandpass filter is constructed based on the preset scanning frequency of the aluminum zinc silicon coated steel plate in the spectrum. The bandpass filter is used to filter out low-frequency background fluctuations and high-frequency detector noise in the spectrum, while retaining the texture information of the intermediate frequency. The filtered spectrogram is subjected to inverse Fourier transform and exponential transform to restore it to the spatial domain, generating the X-ray image sequence. This preprocessing process provides clean input data to eliminate hardware interference for subsequent physical attenuation constraints.
[0007] Preferably, the step of extracting multi-scale spatial feature maps from the X-ray image sequence through the feature extraction backbone includes: the feature extraction backbone includes multiple cascaded residual convolutional groups, each of the residual convolutional groups containing a dilated convolutional layer with a stepwise increasing dilation rate; When the X-ray image sequence passes through the first residual convolution group, fine-grained edge features of the explosive weld interface are extracted using the void convolution layer with the minimum void ratio. When passing through subsequent residual convolutional groups, the receptive field is expanded by using dilated convolutional layers with increasing void ratios to capture speckle distribution patterns of different sizes. The local feature maps output by each residual convolution group are concatenated to generate the multi-scale spatial feature map that integrates local details and global speckle distribution information.
[0008] Preferably, the step of calculating the physical reconstruction loss of the current multi-scale spatial feature map based on the X-ray quality attenuation coefficient matrix of the aluminum-zinc-silicon alloy through the physical attenuation constraint branch includes: obtaining the alloy composition ratio of the aluminum-zinc-silicon coated sheet, querying the mass attenuation coefficient of each element corresponding to the preset X-ray photon energy, and constructing the X-ray quality attenuation coefficient matrix. The theoretical attenuation process of X-rays penetrating the aluminum-zinc-silicon coated steel plate is simulated by convolving the X-ray quality attenuation coefficient matrix with the multi-scale spatial feature map to generate a theoretical projection feature map. The mean square error between the theoretical projection feature map and the actual feature map corresponding to the X-ray image sequence is calculated, and the mean square error is determined as the physical reconstruction loss.
[0009] Preferably, the physical reconstruction loss is backpropagated to the feature extraction backbone as a regularization term, forcing the feature extraction backbone to separate speckle background features that conform to the physical attenuation law when extracting features, including: calculating the main loss function corresponding to the defect recognition task; The physical reconstruction loss is multiplied by a preset balance coefficient and then added to the main loss function to generate a comprehensive loss function; During the backpropagation phase, the gradient is calculated based on the comprehensive loss function. The gradient generated by the physical reconstruction loss forces the weights of neurons in the feature extraction backbone that respond to speckle background features to be updated in a direction that approximates the X-ray quality attenuation coefficient matrix, so that the speckle background features are aggregated into specific feature channels in the multi-scale spatial feature map.
[0010] Preferably, the residual feature map is weighted using an attention mechanism that incorporates prior knowledge of the ripple morphology of the explosive weld interface, including: extracting the waveform curve of the standard ripple of the explosive weld interface and converting the waveform curve into a sinusoidal encoded vector. In the defect identification branch, the sinusoidal encoding vector is used as the query vector to perform cross-attention calculation on the residual feature map to generate a ripple matching weight matrix; The ripple matching weight matrix is used to assign high weights to pixel regions in the residual feature map that deviate from the standard ripple pattern, and low weights to pixel regions that conform to the standard ripple pattern, and the weighted defect enhancement feature map is output.
[0011] Preferably, constructing the X-ray quality attenuation coefficient matrix includes: obtaining the equivalent thickness and density of each layer under the current tube voltage for the aluminum layer, zinc layer, silicon layer and steel substrate of the aluminum-zinc-silicon coated sheet. The linear attenuation coefficient of each layer is calculated based on the equivalent thickness and density of each layer. The linear attenuation coefficients are then arranged according to the stacking order of the roll plate to generate a one-dimensional stacking attenuation vector. The stacked attenuation vector is extended in two dimensions to generate the X-ray quality attenuation coefficient matrix that matches the size of the multi-scale spatial feature map. The X-ray quality attenuation coefficient matrix reflects the non-uniform physical distribution characteristics of the material in each layer of the explosive welding interface in the spatial dimension.
[0012] Preferably, the cross-attention calculation of the residual feature map is performed using the sinusoidal encoding vector as a query vector, including: performing key mapping and value mapping on the residual feature map to generate a key feature matrix and a value feature matrix; The sinusoidal encoding vector is multiplied by the key feature matrix to obtain the similarity score between each pixel position in the residual feature map and the standard wavy pattern. The similarity scores are subjected to softmax normalization to generate the ripple matching weight matrix; The value feature matrix is weighted and summed using the ripple matching weight matrix, and the prior information of the ripple morphology is injected into the defect enhancement feature map to suppress the masking of microcrack features by the periodic ripple background.
[0013] Preferably, the speckle background features are aggregated into a specific feature channel in the multi-scale spatial feature map, including: introducing a channel orthogonal constraint term at the end of the feature extraction backbone; In each backpropagation iteration, the cosine similarity between the specific feature channel with high weight and other feature channels is calculated. When the cosine similarity is greater than a preset similarity threshold, a penalty gradient is generated and superimposed on the gradient generated by the comprehensive loss function; The penalty gradient forces features of different categories to be orthogonal to each other in the channel dimension, ensuring that the speckle background features and micro-defect features are completely decoupled in the channel dimension of the multi-scale spatial feature map, thus avoiding feature aliasing.
[0014] Preferably, the residual convolutional group includes dilated convolutional layers with a stepwise increasing dilation rate, comprising: the residual convolutional group is composed of three parallel branches, the three parallel branches are respectively configured with dilated convolutional layers with a first dilation rate, a second dilation rate and a third dilation rate, the first dilation rate, the second dilation rate and the third dilation rate increasing sequentially; The output feature maps of the three parallel branches are concatenated along the channel dimension, and after dimensionality reduction by one-dimensional convolution, they are added element-wise to the input features. The first void ratio is used to focus on the micropores of the bonding line at the explosion weld interface, and the third void ratio is used to capture the macroscopic speckle clusters caused by the crystallization of aluminum zinc silicon alloy. The parallel combination of multi-scale receptive fields enhances the adaptive extraction of features of different physical sizes.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention calculates the physical reconstruction loss based on the X-ray quality attenuation coefficient matrix of the aluminum-zinc-silicon alloy using a physical attenuation constraint branch. This physical reconstruction loss is then backpropagated as a regularization term to the feature extraction backbone, forcing the backbone to separate speckle background features that conform to the physical attenuation law during feature extraction. This mechanism ensures that the feature decoupling process follows the physical attenuation law of X-ray penetration through the roll plate, separating speckle background features from micro-defect features at the feature space level. The defect identification branch performs identification based on the residual feature map after removing speckle background features, eliminating the interference of speckle artifacts on micro-defect determination.
[0016] 2. This invention extracts multi-scale spatial feature maps in the feature extraction backbone through dilated convolutional layers with progressively increasing porosity. In the defect recognition branch, the standard ripple curve is transformed into a sinusoidal encoding vector for cross-attention calculation, suppressing the masking of micro-crack features by the periodic ripple background. Combined with the penalty gradient generated by the channel orthogonality constraint term during backpropagation iteration, different categories of features are forced to be orthogonal to each other in the channel dimension, avoiding the aliasing of speckle background features and micro-defect features in the channel dimension. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the overall method of the present invention; Figure 2 This is a flowchart of the X-ray image sequence preprocessing process of the present invention; Figure 3 This is a flowchart of the feature extraction backbone of the present invention for extracting multi-scale spatial feature maps; Figure 4 This is a flowchart of the physical reconstruction loss and weight update calculation for the physical attenuation constraint branch in this invention; Figure 5 This is a flowchart of the defect identification branch of the present invention using wavy morphology priors for attention weighting; Figure 6 This is a flowchart illustrating the physical constraint feature decoupling network training and channel orthogonal constraint of the present invention. Detailed Implementation
[0018] Please refer to the attached document. Figure 1 This embodiment provides a method for detecting incomplete fusion and microcrack defects at the explosive weld interface of aluminum-zinc-silicon coated steel coils. First, an X-ray image sequence of the explosive weld interface is acquired. This sequence consists of multiple transmission images continuously acquired along the rolling direction of the coil, corresponding to the same longitudinal position of the explosive weld interface. The pixel coordinates of each image are mapped to the spatial position of the coil interface, and the grayscale value of each pixel corresponds to the residual radiation intensity after the X-ray penetrates that spatial position. The X-ray image sequence is then input into a pre-constructed physical constraint feature decoupling network. This network includes a feature extraction backbone, a physical attenuation constraint branch, and a defect recognition branch. The output of the feature extraction backbone is connected to the inputs of the physical attenuation constraint branch and the defect recognition branch, respectively. The output of the physical attenuation constraint branch is connected to the backpropagation gradient input of the feature extraction backbone, forming an end-to-end trainable architecture.
[0019] After the X-ray image sequence is input into the feature extraction backbone, the feature extraction backbone extracts multi-scale spatial feature maps from the X-ray image sequence. The feature extraction backbone consists of multiple cascaded residual convolutional groups. Each residual convolutional group contains a convolutional layer, a batch normalization layer, a linear rectified activation layer, and a residual connection branch. After the input features are processed by the convolutional layer, batch normalization layer, and linear rectified activation layer, they are added element-wise to the input features, and then output through the linear rectified activation layer, thus avoiding the gradient vanishing problem during deep network training.
[0020] After the X-ray image sequence is input into the first residual convolutional group, an initial local feature map is extracted. This initial local feature map is then input into subsequent cascaded residual convolutional groups. For each residual convolutional group, the spatial resolution of the feature map is downsampled by a preset ratio, while the number of channels increases by a preset ratio, capturing feature information at different spatial scales. The feature map output from each residual convolutional group is upsampled to a uniform spatial resolution and then stitched together along the channel dimension to generate a multi-scale spatial feature map that integrates local details and global distribution information. The channel dimension of this multi-scale spatial feature map contains feature subsets corresponding to different physical meanings, namely, edge features, speckle distribution features, and gray-scale abrupt change features of the explosive weld interface.
[0021] Table 1. Channel allocation and corresponding feature attributes of multi-scale spatial feature maps.
[0022] Table 1 shows the channel allocation and corresponding feature attributes of the multi-scale spatial feature map. This table clarifies the channel dimension division rules of the multi-scale spatial feature map output by the feature extraction backbone. Each channel interval corresponds to a specific type of feature and physical meaning, so that features with different physical attributes form a preliminary separation in the channel dimension, providing a basis for feature decoupling under subsequent physical constraints.
[0023] Further, after the multi-scale spatial feature map is input into the physical attenuation constraint branch, the physical attenuation constraint branch calculates the physical reconstruction loss of the current multi-scale spatial feature map based on the X-ray quality attenuation coefficient matrix of the aluminum-zinc-silicon alloy. The X-ray quality attenuation coefficient matrix is a pre-constructed two-dimensional matrix that matches the spatial size of the multi-scale spatial feature map. Each element value in the matrix corresponds to the theoretical attenuation coefficient at the corresponding spatial position of the X-ray penetrating the roll plate, reflecting the attenuation characteristics of each layer of the aluminum-zinc-silicon alloy to X-rays. The physical attenuation constraint branch performs a two-dimensional convolution operation between the X-ray quality attenuation coefficient matrix and the multi-scale spatial feature map to simulate the theoretical attenuation process of X-rays penetrating the aluminum-zinc-silicon roll plate, generating a theoretical projection feature map. Each element value of the theoretical projection feature map corresponds to the theoretical residual intensity feature after the X-rays penetrate the roll plate at the corresponding position, and the corresponding calculation formula is: in, For theoretical projection feature maps, This is the X-ray quality attenuation coefficient matrix. This is a two-dimensional convolution operator. This is a multi-scale spatial feature map output by the feature extraction backbone.
[0024] The mean square error between the theoretical projection feature map and the actual feature map corresponding to the X-ray image sequence is calculated, and this mean square error is determined as the physical reconstruction loss. The actual feature map is the feature map extracted from the first convolutional layer of the feature extraction backbone of the X-ray image sequence, which has the same spatial size and number of channels as the theoretical projection feature map, reflecting the actual attenuation characteristics of X-rays after penetrating the plate. The magnitude of the physical reconstruction loss characterizes the degree to which the features contained in the multi-scale spatial feature map conform to the physical attenuation law of X-ray transmission. The smaller the value of the physical reconstruction loss, the higher the proportion of features in the multi-scale spatial feature map that conform to the physical attenuation law. The formula for calculating the physical reconstruction loss is: in, For physical reconstruction losses, These are the height, width, and number of channels of the feature map, respectively. The actual feature map corresponding to the X-ray image sequence in coordinates The eigenvalue at that location.
[0025] The physical reconstruction loss is backpropagated as a regularization term to the feature extraction backbone, forcing the backbone to separate speckle background features that conform to the physical attenuation law during feature extraction. During the backpropagation phase of the network, the physical reconstruction loss generates a corresponding gradient, which is propagated backward along the network's forward propagation path to each convolutional layer of the feature extraction backbone, updating the convolutional kernel weights of the convolutional layers.
[0026] During the weight update process, the weights of neurons in the feature extraction backbone that respond to speckle features that conform to the physical attenuation law will be iteratively updated in the direction of approximating the X-ray quality attenuation coefficient matrix. This causes speckle background features to be aggregated into a specific feature channel subset in the multi-scale spatial feature map, while defect features that do not conform to the physical attenuation law are distributed in other feature channel subsets.
[0027] Furthermore, the defect identification branch receives the residual feature map after removing speckle background features. This residual feature map is generated by stitching together the feature maps of the remaining channels after removing a specific subset of channels that aggregate speckle background features from the multi-scale spatial feature map. The residual feature map retains abnormal feature information that does not conform to the physical attenuation law, while removing speckle background features that conform to the physical attenuation law. The defect identification branch uses an attention mechanism that incorporates prior knowledge of the ripple morphology of the explosive weld interface to weight the residual feature map, outputting pixel-level identification results for incomplete fusion and microcrack defects. The corresponding cross-attention calculation formula is: in, The query vector corresponds to the encoding vector of the prior ripple morphology of the explosive weld interface. The key feature matrix, The eigenvalue matrix, The dimension of the key feature matrix is used to scale the dot product result to avoid numerical overflow.
[0028] The ripple morphology of the explosive weld interface is an inherent periodic structure formed during the explosive welding process. A qualified explosive weld interface exhibits a continuous and regular sinusoidal ripple morphology, while incomplete fusion and microcrack defects disrupt the continuity and regularity of this periodic ripple morphology. By incorporating a prior attention mechanism based on the ripple morphology of the explosive weld interface, the prior information of the standard ripple morphology is transformed into a computable encoding vector. Using this encoding vector as a benchmark, the matching degree of each pixel region in the residual feature map is calculated. Pixel regions deviating from the standard ripple morphology are assigned higher weights, while pixel regions conforming to the standard ripple morphology are assigned lower weights. This enhances the defect features in the residual feature map and suppresses the interference of the periodic ripple background.
[0029] The feature map, after being weighted by the attention mechanism, is input to the pixel-by-pixel classification head of the defect recognition branch. After operations by convolutional layers, upsampling layers, and activation layers, the output is a pixel-level prediction map with the same spatial size as the input X-ray image sequence. The value of each pixel in the prediction map corresponds to the probability that the pixel position belongs to an unfused or microcrack defect, thus completing the pixel-level recognition of the defect.
[0030] This embodiment uses a three-level architecture of physical constraint feature decoupling network. Based on the physical attenuation law of X-ray transmission, regularization constraints are constructed to force the feature extraction backbone to complete the decoupling of speckle background features and defect features, avoiding recognition errors caused by the confusion between speckle artifacts and defect features. Combined with the process prior of the explosive weld interface, an attention mechanism is constructed to suppress the periodic ripple background from masking the small defect features.
[0031] In a preferred embodiment, please refer to the appendix. Figure 2 Before obtaining the X-ray image sequence of the explosive weld interface of aluminum-zinc-silicon coated steel coil, the acquired raw X-ray images are preprocessed to generate an X-ray image sequence that meets the requirements of subsequent processing.
[0032] The pixel grayscale values of the original X-ray image have a linear relationship with the residual radiation intensity after the X-ray passes through the plate. However, during the penetration of the medium, the radiation intensity decreases exponentially with the thickness of the medium and the attenuation coefficient. This exponential attenuation characteristic leads to excessive differences in the dynamic range of grayscale values in different thickness regions of the image, while also amplifying low-frequency background fluctuations and high-frequency noise interference. Performing a logarithmic transformation on the original X-ray image converts the exponential attenuation relationship of the radiation intensity into a linear one, eliminating the grayscale dynamic range distortion caused by the exponential attenuation characteristic, and obtaining a logarithmic domain image. The corresponding calculation formula is: in, The original X-ray image in pixel coordinates grayscale value at that location The initial intensity of the incident X-ray is given. For logarithmic field images in pixel coordinates The pixel value at that location.
[0033] A two-dimensional Fourier transform is performed on the logarithmic domain image to convert it from the spatial domain to the frequency domain, obtaining the corresponding spectrum. The low-frequency components in the spectrum correspond to large-scale background grayscale fluctuations in the image, the high-frequency components correspond to the random noise and salt-and-pepper noise of the detector, and the mid-frequency components correspond to the texture information, speckle distribution, and defect edge information of the exploded weld interface. The formula for the two-dimensional Fourier transform is: Where H is the height of the image, and W is the width of the image. For frequency domain coordinates, Let j be the spectrogram corresponding to the logarithmic domain image, where j is the imaginary unit.
[0034] A bandpass filter is constructed based on a preset scanning frequency of the aluminum-zinc-silicon coated steel plate in the spectrogram. The passband range of the bandpass filter is determined according to the scanning speed of the steel plate, the sampling frequency, and the spatial frequency of the ripples at the explosive weld interface. The lower cutoff frequency of the passband corresponds to the lowest frequency for filtering out low-frequency background fluctuations, and the upper cutoff frequency corresponds to the highest frequency for filtering out high-frequency detector noise. The spectrogram is filtered in the frequency domain using the bandpass filter to remove low-frequency background fluctuations and high-frequency detector noise while retaining the texture information of the intermediate frequency. A two-dimensional inverse Fourier transform is performed on the filtered spectrogram to convert the image from the frequency domain back to the logarithmic domain. Then, an exponential transform is performed on the logarithmic domain image to restore it to the spatial domain, generating the X-ray image sequence. The preprocessing process eliminates hardware interference and attenuation characteristic distortion in the original X-ray image, providing clean input data free of hardware interference for the subsequent calculation of physical attenuation constraint branches, and avoiding the impact of low-frequency fluctuations and high-frequency noise on the calculation accuracy of physical reconstruction loss.
[0035] For further details, please refer to the appendix. Figure 3Each residual convolutional group in the feature extraction backbone contains dilated convolutional layers with progressively increasing dilation rates. Each residual convolutional group consists of three parallel branches, each configured with dilated convolutional layers at first, second, and third dilation rates, respectively, with the first, second, and third dilation rates increasing sequentially. Each parallel branch contains a batch normalization layer and a linear rectified activation layer. Input features are fed into the three parallel branches, and after processing by the dilated convolutional layers, batch normalization layers, and linear rectified activation layers corresponding to their respective dilation rates, the output feature maps of the three branches are obtained. The formula for calculating the receptive field size of the dilated convolution is: in, Let be the receptive field size of the hole convolution layer I. This is the size of the receptive field of the next layer. The size of the convolution kernel. The void ratio of the current layer. Let be the stride of the i-th convolutional layer.
[0036] The output feature maps of the three parallel branches are concatenated along the channel dimension, and then passed through a one-dimensional convolutional layer for channel dimensionality reduction, so that the number of channels in the dimensionality-reduced feature map is consistent with the number of channels in the input feature map of the residual convolutional group. The dimensionality-reduced feature map is then added element-wise to the input feature map of the residual convolutional group, and the output feature map of the residual convolutional group is output after passing through a linear rectified activation layer.
[0037] The convolutional layer with the highest porosity corresponds to the smallest receptive field, used to focus on the fine-grained edge features of micropores and microcracks at the weld interface. The convolutional layer with the highest porosity corresponds to a medium receptive field, used to capture the periodic ripple structure and medium-sized speckle distribution features of the weld interface. The convolutional layer with the highest porosity corresponds to the largest receptive field, used to capture the macroscopic speckle clusters and global grayscale distribution features caused by the crystallization of the aluminum-zinc-silicon alloy. By combining multiple scale receptive fields in parallel, the residual convolutional group can simultaneously extract feature information of different spatial dimensions, enhancing the adaptive extraction capability for features of different physical dimensions and avoiding the loss of fine-grained edge features or the missed detection of macroscopic speckle features by single-scale convolutional layers.
[0038] Table 2. Correspondence between the hole rate configuration of the parallel branches of the residual convolution group and the feature extraction target.
[0039] Table 2 shows the correspondence between the hole rate configuration of the parallel branches of the residual convolution group and the feature extraction target. This table clarifies the hole rate configuration of the three parallel branches in the residual convolution group and the corresponding feature extraction target. By setting the hole rate in a step-like manner, full coverage from fine-grained micro features to macro-global features is achieved, ensuring that the feature extraction backbone can completely capture various feature information of the explosive weld interface, and providing comprehensive feature input for subsequent feature decoupling.
[0040] When the X-ray image sequence passes through the first residual convolutional group, a dilated convolutional layer with the minimum void ratio is used to extract fine-grained edge features of the exploded weld interface, preserving edge details of microcracks and incomplete fusion defects. When passing through subsequent cascaded residual convolutional groups, dilated convolutional layers with increasing void ratios are used to gradually expand the receptive field, capturing speckle distribution patterns of different sizes and global structural information. The local feature maps output by each residual convolutional group are upsampled to a uniform spatial resolution, and then feature stitching is performed along the channel dimension to generate a multi-scale spatial feature map that integrates local details and global speckle distribution information.
[0041] This embodiment eliminates hardware interference and attenuation distortion in the original X-ray image through a preprocessing process, providing clean input data for subsequent physical constraint calculations. Through a multi-branch parallel stepped void rate residual convolution group, it achieves simultaneous extraction of fine-grained edge features and macroscopic speckle distribution features, fully preserving the edge details of defects and the global distribution information of speckles, thus improving the comprehensiveness and accuracy of feature extraction.
[0042] In a preferred embodiment, please refer to the appendix. Figure 4 When constructing the X-ray quality attenuation coefficient matrix using the physical attenuation constraint branch, the alloy composition ratio of the aluminum-zinc-silicon coated steel sheet is first obtained, and the mass attenuation coefficients of each element corresponding to the preset X-ray photon energy are queried to construct the X-ray quality attenuation coefficient matrix.
[0043] The aluminized zinc-silicon coated steel coil has a layered structure, consisting of an aluminum layer, a zinc layer, a silicon layer, and a steel substrate. The explosive weld interface is located at the junction of the coating and the steel substrate. During X-ray penetration of the coil, it passes through each layer sequentially, and the X-ray intensity gradually decreases with the attenuation coefficient and thickness of each layer. For the aluminum, zinc, silicon, and steel substrate layers of the aluminized zinc-silicon coated steel coil, the elemental composition and mass percentage of each layer, as well as the equivalent thickness and density of each layer at the current X-ray photon energy, are obtained. Based on the elemental composition and mass percentage of each layer, the mass attenuation coefficient of each element corresponding to the preset X-ray photon energy is looked up, and the linear attenuation coefficient of each layer is calculated. The corresponding calculation formula is as follows: in, Let be the linear attenuation coefficient of the i-th layer material. Let be the density of the i-th layer of material. Let k be the mass percentage of the k-th element in the i-th material layer. Let be the mass decay coefficient of the k-th element at the corresponding X-ray photon energy, and n be the number of element types contained in the i-th material layer.
[0044] The calculated linear attenuation coefficients of each layer are arranged according to the stacking order of the coil, generating a one-dimensional stacked attenuation vector. Each element of the stacked attenuation vector corresponds to the linear attenuation coefficient of a layer of material in the coil, reflecting the attenuation characteristics of X-rays penetrating that layer. The stacked attenuation vector is then expanded two-dimensionally to generate an X-ray quality attenuation coefficient matrix that matches the size of the multi-scale spatial feature map. During the two-dimensional expansion, the stacked attenuation vector is copied along the width and height directions of the feature map, so that the element value of each spatial position in the X-ray quality attenuation coefficient matrix corresponds to the comprehensive attenuation coefficient of the coil's stacked structure at that position. The X-ray quality attenuation coefficient matrix reflects the non-uniform physical distribution characteristics of the materials in each layer of the explosive weld interface in the spatial dimension, and completely corresponds to the actual stacked structure and alloy composition of the coil.
[0045] Table 3. Calculation Parameters for Linear Attenuation Coefficient of Each Layer of Aluminum-Zinc-Silicon Coated Steel Sheet
[0046] Table 3 shows the corresponding parameters for calculating the linear attenuation coefficient of each layer of the aluminum-zinc-silicon coated steel coil. This table clarifies the basic parameters for constructing the X-ray quality attenuation coefficient matrix, which correspond to the physical properties and attenuation characteristics of each layer of the steel coil in the laminated structure. This ensures that the constructed X-ray quality attenuation coefficient matrix fully conforms to the actual physical process of X-ray penetration through the steel coil, providing an accurate physical benchmark for calculating physical reconstruction loss.
[0047] Furthermore, during network training, the main loss function corresponding to the defect identification task is calculated. The main loss function uses pixel-level cross-entropy loss to constrain the degree of fit between the predicted results of defect identification and the true labels. The corresponding calculation formula is as follows: in, Main loss function, pixel coordinates The actual label is: the defect area is 1, and the background area is 0. The predicted probability of a defect is given at this pixel in the defect identification branch output.
[0048] The physical reconstruction loss is multiplied by a preset balancing coefficient and then added to the main loss function to generate a comprehensive loss function. The preset balancing coefficient is used to adjust the weight ratio of the physical reconstruction loss in the total loss, balancing the optimization priority of the defect identification task and the physical constraint regularization term. The corresponding calculation formula is as follows: in, For the comprehensive loss function, This is a preset balance coefficient used to adjust the weight of physical reconstruction loss in the total loss.
[0049] During the backpropagation phase, the gradients of the parameters of each layer of the network are calculated based on the comprehensive loss function, and then propagated backward along the forward propagation path to update the network parameters. Specifically, the gradient generated by the physical reconstruction loss forces the weights of neurons in the feature extraction backbone that respond to speckle background features to be updated in a direction that approximates the X-ray quality attenuation coefficient matrix. This allows the speckle background features to be clustered into specific feature channels in the multi-scale spatial feature map, achieving feature decoupling under physical constraints.
[0050] Furthermore, a channel orthogonality constraint term is introduced at the end of the feature extraction backbone. In each backpropagation iteration, the cosine similarity between a specific feature channel with a high weight and other feature channels is calculated. The specific feature channel is a subset of channels that aggregate speckle background features, and the other feature channels are subsets of channels that contain defect features. The formula for calculating the cosine similarity is: in, Let p be the feature vector of the p-th feature channel. Let be the feature vector of the q-th feature channel. This is the L2 norm operator.
[0051] When the calculated cosine similarity is greater than a preset similarity threshold, a corresponding penalty value is generated. The sum of all penalty values constitutes the channel orthogonality constraint term. The penalty gradient generated by the channel orthogonality constraint term is superimposed on the gradient generated by the comprehensive loss function and participates in the backpropagation update of network parameters. The calculation formula for the channel orthogonality constraint term is: in, Here, C represents the channel orthogonality constraint term, and C is the total number of channels in the multi-scale spatial feature map. The preset similarity threshold is used to generate a corresponding penalty value when the cosine similarity between two channels exceeds the threshold.
[0052] The penalty gradient forces features of different categories to be orthogonal to each other in the channel dimension. That is, the cosine similarity of the feature vectors between the channel subset containing speckle background features and the channel subset containing defect features approaches 0, ensuring that speckle background features and micro-defect features are completely decoupled in the channel dimension of the multi-scale spatial feature map, avoiding the overlap of the two types of features in the channel dimension, and preventing speckle background features from being misidentified as defect features.
[0053] This embodiment ensures the calculation accuracy of the physical constraint regularization term by accurately constructing an X-ray quality attenuation coefficient matrix that matches the physical properties of the roll plate. It achieves synchronous optimization of the defect identification task and physical constraints through a comprehensive loss function. Combined with the channel orthogonal constraint term, it further enhances the decoupling effect between speckle background features and defect features, avoids identification errors caused by feature aliasing, and improves the stability and accuracy of feature decoupling.
[0054] In a preferred embodiment, when the defect identification branch uses an attention mechanism that incorporates prior knowledge of the ripple morphology of the exploded weld interface to weight the residual feature map, it first extracts the waveform curve of the standard ripple of the exploded weld interface and converts the waveform curve into a sinusoidal encoded vector.
[0055] The standard corrugation morphology of the explosive weld interface is a periodic sinusoidal waveform generated during the explosive welding process, where the shock wave from the explosive detonation causes the coating and the steel substrate to form a plastic flow bond. The waveform curve of the standard corrugation can be extracted from an X-ray image of a qualified explosive weld interface or theoretically calculated using explosive welding process parameters. After extracting the waveform curve of the standard corrugation, equal-step sampling is performed along the extension direction of the corrugation to obtain the waveform amplitude at each sampling position. The sampled waveform amplitude sequence is then converted into a sinusoidal encoded vector. This sinusoidal encoded vector contains all morphological features of the standard corrugation, including period, amplitude, and phase, serving as prior information for the corrugation morphology of the explosive weld interface. The corresponding sinusoidal encoding formula is: in, Let f be the sinusoidal encoded value at the t-th sampling position, and f be the spatial frequency of the standard ripple, corresponding to the period of the ripple at the explosive weld interface. t represents the phase offset, and t is the sampling step index along the ripple extension direction.
[0056] Please refer to the attached document. Figure 5 In the defect identification branch, the sinusoidal encoding vector is used as the query vector to perform cross-attention calculation on the residual feature map, generating a ripple matching weight matrix. Key mapping and value mapping are performed on the residual feature map. Two independent one-dimensional convolutional layers are used to perform convolution operations on the residual feature map, generating a key feature matrix and a value feature matrix. The spatial dimensions of the key feature matrix and the value feature matrix are related to the residual feature map. Figure 1 The channel dimension matches the dimension of the query vector and the dimension of the output feature, respectively.
[0057] Table 4. Parameter Configuration Table for Standard Ripple Sine Encoding Vector
[0058] Table 4 shows the parameter configuration table for the standard ripple sinusoidal encoding vector. This table clarifies the construction parameters of the sinusoidal encoding vector, which correspond to the standard ripple morphology characteristics of the explosive weld interface along the rolling direction and perpendicular to the rolling direction, respectively. This ensures that the prior information contained in the sinusoidal encoding vector is completely matched with the interface ripple characteristics generated by the actual process, providing an accurate matching benchmark for cross-attention calculation.
[0059] For further details, please refer to the appendix. Figure 6The query vector, composed of sinusoidal encoded vectors, is multiplied by the key feature matrix to obtain the similarity score between each pixel position in the residual feature map and the standard wavy pattern. A larger dot product value indicates a higher degree of matching between the pixel's features and the standard wavy pattern. The similarity score obtained from the dot product is scaled by the square root of the key feature matrix dimension to prevent excessively large similarity scores from causing gradient vanishing after softmax normalization. The scaled similarity score is then softmax normalized to generate a wavy matching weight matrix. Each element in this matrix corresponds to the degree of matching between the pixel position in the residual feature map and the standard wavy pattern; a value closer to 1 indicates a higher degree of matching, and a value closer to 0 indicates a lower degree of matching.
[0060] The ripple matching weight matrix is used to perform a weighted summation of the value feature matrix. Pixel regions conforming to the standard ripple pattern are assigned low weights, while pixel regions deviating from the standard ripple pattern are assigned high weights. This injects prior information about the ripple pattern into the output defect enhancement feature map. During the weighting process, qualified interface ripple regions, due to their high matching degree with the standard ripple pattern, are assigned low weights, and their corresponding features are suppressed. Conversely, unfused and microcrack defect regions, because they disrupt the periodic pattern of the ripples and have a low matching degree with the standard ripple pattern, are assigned high weights, and their corresponding features are enhanced. This suppresses the masking of microcrack features by the periodic ripple background and strengthens the feature response of minor defects.
[0061] The weighted defect enhancement feature map is input into the segmentation and decoding structure of the defect recognition branch. The segmentation and decoding structure consists of multiple cascaded upsampling convolutional groups. Each upsampling convolutional group contains an upsampling layer, a convolutional layer, a batch normalization layer, and a linear rectified activation layer. Through the operation of multiple upsampling convolutional groups, the spatial resolution of the defect enhancement feature map is gradually restored to the same size as the input X-ray image. Finally, the sigmoid activation layer outputs pixel-level prediction results. The value of each pixel in the prediction result corresponds to the probability that the pixel position belongs to an unfused or micro-crack defect, thus completing the pixel-level identification of the defect.
[0062] This embodiment introduces the inherent ripple morphology prior of the explosive welding process and constructs a cross-attention mechanism based on sinusoidal coding. This enables adaptive weighted processing of the residual feature map, suppresses the masking of micro-defect features by the periodic ripple background, enhances the feature response of incomplete fusion and micro-crack defects, and improves the ability to identify micro-defects.
Claims
1. A method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images, characterized in that, include: Obtain an X-ray image sequence of the explosive weld interface of aluminum-zinc-silicon coated steel coil, and input the X-ray image sequence into a pre-constructed physical constraint feature decoupling network; The physical constraint feature decoupling network includes a feature extraction backbone, a physical attenuation constraint branch, and a defect identification branch; Multi-scale spatial feature maps are extracted from the X-ray image sequence using the feature extraction backbone. The physical attenuation constraint branch calculates the physical reconstruction loss of the current multi-scale spatial feature map based on the X-ray quality attenuation coefficient matrix of aluminum zinc silicon alloy. The physical reconstruction loss is then backpropagated to the feature extraction backbone as a regularization term, forcing the feature extraction backbone to separate speckle background features that conform to the physical attenuation law when extracting features. The defect identification branch receives the residual feature map after removing the speckle background features, and uses an attention mechanism that combines the prior knowledge of the ripple morphology of the explosive weld interface to perform weighted processing on the residual feature map, outputting pixel-level identification results of incomplete fusion and microcrack defects.
2. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 1, characterized in that, Before obtaining the X-ray image sequence of the explosive weld interface of aluminum-zinc-silicon coated steel coil, the acquired raw X-ray images are preprocessed, including: performing logarithmic transformation on the raw X-ray images to eliminate the exponential decay characteristics of the radiation intensity and obtain logarithmic domain images. Perform a Fourier transform on the logarithmic domain image to obtain a spectrogram; A bandpass filter is constructed based on the preset scanning frequency of the aluminum zinc silicon coated steel plate in the spectrum. The bandpass filter is used to filter out low-frequency background fluctuations and high-frequency detector noise in the spectrum, while retaining the texture information of the intermediate frequency. The filtered spectrogram is subjected to inverse Fourier transform and exponential transform to restore it to the spatial domain, thereby generating the X-ray image sequence.
3. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 1, characterized in that, The step of extracting multi-scale spatial feature maps from the X-ray image sequence through the feature extraction backbone includes: the feature extraction backbone includes multiple cascaded residual convolutional groups, each of the residual convolutional groups containing a dilated convolutional layer with a stepwise increasing dilation rate; When the X-ray image sequence passes through the first residual convolution group, fine-grained edge features of the explosive weld interface are extracted using the void convolution layer with the minimum void ratio. When passing through subsequent residual convolutional groups, the receptive field is expanded by using dilated convolutional layers with increasing void ratios to capture speckle distribution patterns of different sizes. The local feature maps output by each residual convolution group are concatenated to generate the multi-scale spatial feature map that integrates local details and global speckle distribution information.
4. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 1, characterized in that, The step of calculating the physical reconstruction loss of the current multi-scale spatial feature map based on the X-ray quality attenuation coefficient matrix of the aluminum-zinc-silicon alloy through the physical attenuation constraint branch includes: obtaining the alloy composition ratio of the aluminum-zinc-silicon coated sheet, querying the mass attenuation coefficient of each element corresponding to the preset X-ray photon energy, and constructing the X-ray quality attenuation coefficient matrix. The theoretical attenuation process of X-rays penetrating the aluminum-zinc-silicon coated steel plate is simulated by convolving the X-ray quality attenuation coefficient matrix with the multi-scale spatial feature map to generate a theoretical projection feature map. The mean square error between the theoretical projection feature map and the actual feature map corresponding to the X-ray image sequence is calculated, and the mean square error is determined as the physical reconstruction loss.
5. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 1, characterized in that, The physical reconstruction loss is backpropagated as a regularization term to the feature extraction backbone, forcing the feature extraction backbone to separate speckle background features that conform to the physical attenuation law when extracting features, including: calculating the main loss function corresponding to the defect recognition task; The physical reconstruction loss is multiplied by a preset balance coefficient and then added to the main loss function to generate a comprehensive loss function; During the backpropagation phase, the gradient is calculated based on the comprehensive loss function. The gradient generated by the physical reconstruction loss forces the weights of neurons in the feature extraction backbone that respond to speckle background features to be updated in a direction that approximates the X-ray quality attenuation coefficient matrix.
6. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 1, characterized in that, The residual feature map is weighted using an attention mechanism that incorporates prior knowledge of the ripple morphology of the explosive weld interface, including: extracting the waveform curve of the standard ripple of the explosive weld interface and converting the waveform curve into a sinusoidal encoded vector. In the defect identification branch, the sinusoidal encoding vector is used as the query vector to perform cross-attention calculation on the residual feature map to generate a ripple matching weight matrix; The ripple matching weight matrix is used to assign high weights to pixel regions in the residual feature map that deviate from the standard ripple pattern, and low weights to pixel regions that conform to the standard ripple pattern, and the weighted defect enhancement feature map is output.
7. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 4, characterized in that, Constructing the X-ray quality attenuation coefficient matrix includes: obtaining the equivalent thickness and density of each layer under the current tube voltage for the aluminum layer, zinc layer, silicon layer and steel substrate of the aluminum-zinc-silicon coated steel sheet. The linear attenuation coefficient of each layer is calculated based on the equivalent thickness and density of each layer. The linear attenuation coefficients are then arranged according to the stacking order of the roll plate to generate a one-dimensional stacking attenuation vector. The stacked attenuation vector is extended in two dimensions to generate the X-ray quality attenuation coefficient matrix that matches the size of the multi-scale spatial feature map. The X-ray quality attenuation coefficient matrix reflects the non-uniform physical distribution characteristics of the material in each layer of the explosive welding interface in the spatial dimension.
8. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 6, characterized in that, Using the sinusoidal encoding vector as a query vector to perform cross-attention calculation on the residual feature map includes: performing key mapping and value mapping on the residual feature map to generate a key feature matrix and a value feature matrix; The sinusoidal encoding vector is multiplied by the key feature matrix to obtain the similarity score between each pixel position in the residual feature map and the standard wavy pattern. The similarity scores are subjected to softmax normalization to generate the ripple matching weight matrix; The value feature matrix is weighted and summed using the ripple matching weight matrix, and the prior information of the ripple shape is injected into the defect enhancement feature map.
9. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 5, characterized in that, To enable the speckle background features to be aggregated into the feature channels in the multi-scale spatial feature map, the method includes: introducing a channel orthogonal constraint term at the end of the feature extraction backbone; In each backpropagation iteration, the cosine similarity between the feature channels with high weights and other feature channels is calculated. When the cosine similarity is greater than a preset similarity threshold, a penalty gradient is generated and superimposed on the gradient generated by the comprehensive loss function; The penalty gradient forces features of different categories to be orthogonal to each other in the channel dimension.
10. The method for detecting explosive weld defects in aluminum-zinc-silicon coated steel coils based on X-ray images according to claim 3, characterized in that, The residual convolutional group includes dilated convolutional layers with a stepwise increasing dilation rate, comprising: the residual convolutional group consists of three parallel branches, the three parallel branches are respectively configured with dilated convolutional layers with a first dilation rate, a second dilation rate and a third dilation rate, the first dilation rate, the second dilation rate and the third dilation rate increasing sequentially; The output feature maps of the three parallel branches are concatenated along the channel dimension, and after dimensionality reduction by one-dimensional convolution, they are added element-wise to the input features. The first void ratio is used to focus on the micropores of the bonding line at the explosion weld interface, and the third void ratio is used to capture the macroscopic speckle clusters caused by the crystallization of aluminum zinc silicon alloy. The parallel combination of multi-scale receptive fields enhances the adaptive extraction of features of different physical sizes.