A method for automatic alignment of corrosion evolution and non-destructive testing signals
A dual-loop conditional generative adversarial network model was used to achieve high-precision alignment between corrosion images and non-destructive testing signals of cable components, solving the difficulty of cross-modal data alignment in the corrosion assessment of cable components and improving the accuracy and reliability of the assessment.
Patent Information
- Application Number
- CN202511587523.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-11-03
AI Technical Summary
The strength degradation of cable components due to corrosion during service is difficult to accurately assess using limited cross-sectional images and non-destructive testing signals. Cross-modal data alignment is also challenging, affecting the safety of bridge structures.
A dual-loop conditional generative adversarial network model is adopted to achieve bidirectional conversion and automatic alignment between corrosion images and non-destructive testing signals through image generators and signal generators. Combined with a conditional predictor to constrain the semantic consistency of the environment, a cross-modal corrosion feature reconstruction model is constructed.
Achieving high-precision assessment of the corrosion state of cable components under limited sample conditions improves the accuracy and physical rationality of cross-modal mapping and solves the problems of semantic information loss and low alignment accuracy in traditional methods.
Smart Images

Figure CN121053125B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of cable component testing technology, and relates to an automatic alignment method for corrosion evolution and non-destructive testing signals. Background Technology
[0002] Cable-stayed bridges, suspension bridges, and arch bridges are critical load-bearing components in structural systems. Under long-term service conditions, the high-strength steel wires inside the cables will corrode due to environmental factors, leading to strength degradation. If corrosion continues and causes wire or strand breakage, it may induce local or overall failure of the bridge structure. In engineering practice, the inspection and evaluation of cable-stayed bridge components in service typically combines cross-sectional visual inspection and non-destructive testing (NDT) techniques. Cross-sectional visual inspection can obtain images of the corrosion morphology of the steel wires in the cable cross-section through disassembly or end exposure; NDT techniques can collect signals reflecting internal defects and the degree of corrosion without damaging the structure.
[0003] However, since cables are generally enclosed in the outer sheath or anchorage zone, the conditions for acquiring cross-sectional images are demanding, and it is often difficult to obtain a sufficient number and uniformly distributed sample of corrosion cross-section images of in-service structures. Furthermore, images and signal data are usually acquired at different locations and times, making it difficult to form one-to-one cross-modal pairing data. This presents technical obstacles to analyzing the corrosion evolution process of cable cross-sections and quantifying differences in corrosion distribution.
[0004] Dual-cyclic conditional generative adversarial networks (GANs) can learn the cross-modal feature mapping relationship between cable cross-section corrosion images and non-destructive testing signals, combining low-level local textures and signal patterns to form a more abstract high-level corrosion evolution feature representation, thus characterizing the true distribution pattern of the data. Therefore, based on dual-cyclic conditional GANs, a network model for automatic alignment of cable component corrosion evolution and signals can be developed to form cross-modal corrosion feature reconstruction, thereby ensuring the accuracy and reliability of corrosion status assessment during the service life of cable components under limited sample conditions. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention proposes an automatic alignment method for corrosion evolution and non-destructive testing signals. Considering the characteristics of corrosion evolution in cable cross-sections, this method achieves high-precision bidirectional conversion and automatic alignment between corrosion images and detection signals even without paired data. Simultaneously, it utilizes environmental conditions to achieve controllable simulation of the corrosion evolution process.
[0006] To achieve the above objectives, the solution of the present invention is:
[0007] An automatic alignment method for corrosion evolution and non-destructive testing signals, the specific steps of which are as follows:
[0008] Step 1: Establish a dataset consisting of several cable samples after preprocessing. Each cable sample includes a real cross-sectional corrosion image and its corresponding real corrosion environment parameters, a real detection signal and its corresponding real corrosion environment parameters. After preprocessing, the real cross-sectional corrosion image and its corresponding real corrosion environment parameters are used to obtain the real corrosion evolution image tensor and its corresponding image real environment condition vector. After preprocessing, the real detection signal and its corresponding real corrosion environment parameters are used to obtain the real non-destructive testing signal vector and its corresponding signal real environment condition vector.
[0009] Step 2: Build a dual-loop conditional generative adversarial network model suitable for automatic alignment of corrosion evolution and non-destructive testing signals;
[0010] Step 3: Train the double-loop conditional generative adversarial network model based on the dataset;
[0011] Step 4: Use the trained double-loop conditional generative adversarial network model to automatically align the corrosion evolution with the non-destructive testing signal.
[0012] As a further optimization of the present invention, the actual corrosion environment parameters in step 1 include temperature, humidity, salt spray concentration, air pollutants, service life, stress level, ambient pH value, and oxygen content.
[0013] As a further optimization of the present invention, the dual-loop conditional generative adversarial network model built in step 2 includes an image generator, a signal generator and a conditional predictor.
[0014] The image generator comprises a cascaded signal encoder, a conditional mapping network, and an image decoder: the signal encoder uses a convolutional neural network for feature encoding, taking real or fake non-destructive testing signal vectors as input and outputting signal feature vectors; the conditional mapping network employs a multilayer perceptron structure, taking real signal environmental condition vectors as input and outputting "style parameter sets" matching the number of upsampling blocks in the image decoder, with each "style parameter set" including a set of scales and biases; in the image decoder, the number of channels of the signal feature vector is first adjusted through convolutional blocks, then instance normalization is performed using a cascaded upsampling structure of multiple upsampling blocks, and finally, a fake erosion evolution image tensor or a reconstructed erosion evolution image tensor is generated through the Tanh activation function, with each upsampling block corresponding to a "style parameter set";
[0015] The signal generator consists of an image encoder and a signal decoder: the image encoder uses a lightweight ResNet-18 as the backbone network for feature extraction, taking the tensor of the real erosion evolution image or the tensor of the fake erosion evolution image as input, and outputs an image feature vector; the signal decoder takes the concatenation result of the image feature vector and the image real environment condition vector as input, and generates a fake non-destructive testing signal vector or reconstructs a non-destructive testing signal vector through cascaded fully connected layers and several upsampling blocks.
[0016] The conditional predictor includes an image conditional predictor and a signal conditional predictor: the image conditional predictor adopts a structure of multiple convolutional layers and multiple fully connected layers in cascade, takes a fake erosion evolution image tensor as input, and outputs an image prediction environment condition vector; the signal conditional predictor adopts a structure of multiple convolutional layers and multiple fully connected layers in cascade, takes a fake non-destructive testing signal vector as input, and outputs a signal prediction environment condition vector.
[0017] As a further optimization of the present invention, the dual-loop conditional generative adversarial network model built in step 2 also includes a discriminator;
[0018] The discriminator comprises an image discriminator and a signal discriminator. In the image discriminator, features are first extracted from the tensor of the forged erosion evolution image. Then, a fully connected layer maps the real environmental condition vector to an environmental feature vector matching the number of channels in the feature extraction result. The feature extraction result and the mapped environmental feature vector are concatenated by channel. Finally, several convolutional layers and a sigmoid activation function are sequentially passed to output a probability value representing the degree to which the forged erosion evolution image tensor is "real and conditionally matched." In the signal discriminator, features are first extracted from the forged non-destructive testing signal vector. Then, a fully connected layer maps the real environmental condition vector to a feature vector matching the number of channels in the feature extraction result. The feature extraction result and the mapped environmental condition vector are concatenated by channel. Finally, several convolutional layers and a sigmoid activation function are sequentially passed to output a probability value representing the degree to which the forged non-destructive testing signal vector is "real and conditionally matched."
[0019] As a further optimization of the present invention, the following loss function is used to train the double-loop conditional generative adversarial network model in step 3:
[0020] (1) The loss function of the generator is:
[0021] ;
[0022] in, For weighting coefficients, adversarial loss Image generator adversarial loss Signal generator adversarial loss Cyclic consistency loss Conditional consistency loss , , , , These represent the outputs of the image generator, signal generator, image discriminator, and signal discriminator, respectively. , , , These represent the tensor of the real corrosion evolution image, the vector of the real environmental conditions of the image, the vector of the real non-destructive testing signal, and the vector of the real environmental conditions of the signal, respectively. For S and Find the expectation of the joint distribution. express Follows the distribution of real nondestructive testing signals in the database , This indicates that the signal conforms to the true nondestructive testing signal distribution. Find the expectation of the real nondestructive testing signal vector S. It is for I and Find the expectation of the joint distribution. express Follows the distribution of real corrosion evolution images in the database , This indicates that the distribution follows the true erosion evolution image. The expectation of the tensor I of the real corrosion evolution image is calculated, where N is the number of samples and D is the dimension of the real environmental condition vector of the image or the real environmental condition vector of the signal. Let d be the element of the d-th dimension of the vector representing the real environment conditions of the image corresponding to the i-th sample. It is the d-th element of the predicted environment condition vector corresponding to the i-th sample image. It is the d-th element of the environmental condition vector corresponding to the signal of the i-th sample;
[0023] (2) The loss function of the discriminator is:
[0024] ;
[0025] Among them, the adversarial loss of the image discriminator Signal generator adversarial loss .
[0026] As a further optimization of the present invention, the training process of the dual-loop conditional generative adversarial network model in step 3 is as follows:
[0027] 1) Fix the generator and discriminator, and pre-train the conditional predictor;
[0028] 2) Fix the generator and condition predictor, and use Train the discriminator;
[0029] 3) Fix the discriminator and condition predictor, and use Train the generator.
[0030] The present invention also provides a computer-readable storage medium storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform the automatic alignment method of corrosion evolution and non-destructive testing signals as described above.
[0031] The present invention also provides an automatic alignment device for corrosion evolution and non-destructive testing signals, comprising one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing the automatic alignment method for corrosion evolution and non-destructive testing signals as described above.
[0032] The significant features of this invention compared to the prior art are as follows:
[0033] 1. Real corrosion samples are scarce and difficult to obtain, and it is difficult to completely reproduce the real corrosion environment under laboratory conditions. However, deep learning can accurately generate corrosion images of cable cross sections, and the calculation results are accurate.
[0034] 2. The dual-loop structure of "image-signal-image" and "signal-image-signal" forces the model to learn the reversible mapping relationship between the eroded image and the non-destructive testing signal through a bidirectional loop mechanism. This solves the problems of semantic information loss and low alignment accuracy caused by unidirectional conversion in traditional methods, and realizes bidirectional, automatic, high-fidelity conversion and alignment between the two.
[0035] 3. The discriminator can determine whether the generated sample data is "real," but it cannot determine whether the generated sample precisely corresponds to specific environmental conditions. The conditional predictor's job is to make this judgment by inferring the physical conditions contained in the generated image or signal. By constraining the environmental semantics of the generated sample to be consistent with the input conditions through conditional consistency loss, it further improves the accuracy and physical rationality of cross-modal mapping. Attached Figure Description
[0036] Figure 1 This is a flowchart of the present invention.
[0037] Figure 2 This is a training flowchart of the present invention.
[0038] Figure 3 This is a schematic diagram of the image generator structure.
[0039] Figure 4 This is a schematic diagram of a signal generator structure.
[0040] Figure 5 This is a schematic diagram of the image discriminator structure.
[0041] Figure 6 This is a schematic diagram of the signal discriminator structure.
[0042] Figure 7 This is a schematic diagram of the image conditional predictor structure.
[0043] Figure 8 This is a schematic diagram of a signal condition predictor. Detailed Implementation
[0044] This invention addresses the problem of inaccessible cable cross-sections and difficulty in obtaining sufficient corrosion samples by proposing an automatic alignment method between corrosion evolution and non-destructive testing (NDT) signals. This method constructs two coupled generation loops: "signal-image-signal" and "image-signal-image," and introduces a conditional predictor module as auxiliary supervision to ensure that the environmental semantics of the generated samples are consistent with the input conditions, further improving the accuracy and physical rationality of cross-modal mapping. This invention solves the problem of a semantic gap between traditional NDT signals and the internal physical corrosion state of components, making bidirectional, automatic, and high-fidelity alignment and conversion difficult.
[0045] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Furthermore, all content not described in detail in this specification belongs to the prior art known to those skilled in the art.
[0046] Example 1
[0047] like Figure 1 and Figure 2 As shown, the automatic alignment method for corrosion evolution and non-destructive testing signals of the present invention includes the following steps:
[0048] Step 1: Establish a dataset consisting of several cable samples after preprocessing. Each cable sample includes a real cross-sectional corrosion image and its corresponding real corrosion environment parameters, a real detection signal and its corresponding real corrosion environment parameters. After preprocessing the real cross-sectional corrosion image and its corresponding real corrosion environment parameters, a real corrosion evolution image tensor and its corresponding image real environment condition vector are obtained. After preprocessing the real detection signal and its corresponding real corrosion environment parameters, a real non-destructive testing signal vector and its corresponding signal real environment condition vector are obtained.
[0049] In this example, real-world environmental parameters include temperature, humidity, salt spray concentration, air pollutants, service life, stress level, ambient pH, and oxygen content. Data sources include historical data from weather stations and sensors on actual engineering cables, as well as records from controlled environmental laboratory tests.
[0050] In this example, the original image, signal, and conditional data are preprocessed and systematically converted into normalized tensors that can be processed by neural networks:
[0051] (1-1) The size of the acquired erosion images is uniformly adjusted to 256×256 pixels using an interpolation algorithm. The pixel value range is converted to the range of [-1,1] using the following formula, which facilitates matching with the output range of the Tanh activation function of the generator output layer and improves the model training stability:
[0052] Conversion formula: Normalized pixel value = (Original pixel value / 127.5) - 1,
[0053] The preprocessed image is input into the signal generator in the form of a three-dimensional tensor. In the image encoder, the tensor dimension is [image height, image width, number of channels].
[0054] (1-2) The collected detection signals of different lengths are processed into vectors of fixed length through interpolation or truncation. Then, the amplitude range of the signals is converted to the range [-1, 1], and the following min-max normalization method is used to eliminate the influence of amplitude differences between different signals:
[0055] Normalized amplitude = (Original amplitude - Minimum signal value) / (Maximum signal value - Minimum signal value)
[0056] The preprocessed non-destructive testing signal is input into the image generator in the form of a one-dimensional vector. In the signal encoder.
[0057] (1-3) For continuous environmental parameters, the z-score standardization method is used to convert the parameters into normally distributed data with a mean of 0 and a standard deviation of 1. For discrete environmental parameters, one-hot encoding is used to convert them into binary vector form. The preprocessed environmental parameters are input into the generator and discriminator as one-dimensional label vectors. The vector dimension is the total number of environmental condition parameters (including the number of continuous parameters and the dimension after encoding discrete parameters). The environmental condition vector serves as the physical constraint input of the model and participates in the feature extraction and generation process.
[0058] After establishing the dataset for the double-loop conditional generative adversarial network, 70% of the data in the dataset is used as the training set to train the deep learning network model, 20% of the data is used as the test set, and 10% of the data is used as the validation set to check the accuracy of the constructed deep learning network model.
[0059] Step 2: Build a dual-loop conditional generative adversarial network model suitable for automatic alignment of corrosion evolution and non-destructive testing signals.
[0060] (2-1) Image Generator
[0061] An image generator is an encoder-decoder structure, such as... Figure 3 As shown, it includes a signal encoder, a conditional mapping network, and an image decoder.
[0062] The signal encoder uses a convolutional neural network for feature encoding, comprising four convolutional layers: The first convolutional layer uses 32 3×1 convolutional kernels with a stride of 1, taking real or fake non-destructive testing signal vectors as input for preliminary feature extraction. The intermediate convolutional layers use 64, 128, and 256 convolutional kernels sequentially, progressively compressing the signal length and increasing the channel dimension through "convolution + ReLU activation + batch normalization".
[0063] The formula for calculating ReLU activation is:
[0064]
[0065] It is a left-saturated function, and in The time derivative is 1, which can alleviate the gradient vanishing problem in neural networks to some extent and accelerate the convergence speed of gradient descent.
[0066] The formula for batch normalization is:
[0067] ,
[0068] In the formula, x is the input of the feature map. , Let be the mean and standard deviation of the features, and α and β be the learnable scaling factors and offsets.
[0069] The conditional mapping network is a small multilayer perceptron (which maps real-world conditional vectors to a set of high-dimensional "style parameters"), consisting of three fully connected layers with ReLU activation. The final output is a set of "style parameters" matching the number of upsampled blocks in the decoder, with each upsampled block corresponding to a set of scale γ and bias δ.
[0070] The image decoder employs a progressive upsampling structure. First, the feature vector output from the signal encoder is converted into the initial input feature map of the decoder by adjusting the number of channels through a 1×1 convolution. Then, six progressive upsampling blocks are used, as detailed below:
[0071] Block 1: Contains a transposed convolution operation with a kernel size of 4×4 and a stride of 2. The enlarged feature map is then instance-normalized, and a set of ( ) is generated by a conditional mapping network. Perform affine transformation: normalize features × + This approach enables control over the global style based on environmental conditions. A cross-modal attention mechanism is introduced, using the current feature map as the "query," and the signal feature sequence as the "key" and "value." Attention weights (similarity between the query and key) are calculated using a matrix. The weighted fusion of the value features is then added to the current feature map, focusing local image regions (such as potential erosion pit locations) on peak segments of the signal. This ensures that a peak in the signal accurately corresponds to an erosion pit in the image, achieving precise local alignment. After ReLU activation and batch normalization, the feature map is output.
[0072] The formula for calculating instance normalization is:
[0073] ,
[0074] In the formula, x is the input of the feature map. , Let be the mean and standard deviation of the features, and α and β be the learnable scaling factors and offsets.
[0075] Blocks 2 to 5: Repeat the process of Block 1, doubling the size after each upsampling, and adjusting the number of channels to 64, 32, 16, and 8 respectively, using ( )to( AdaIN control is implemented, and local detail alignment is continuously optimized through cross-modal attention.
[0076] Block 6: Continue the convolution operation above, reducing the number of channels to 3. Using ( Final style adjustments are made to ensure the global erosion style is consistent with environmental conditions. Pixel values are mapped to the [-1,1] range using the Tanh activation function to generate a fake erosion evolution image tensor or a reconstructed erosion evolution image tensor.
[0077] (2-2) Signal Generator
[0078] The signal generator is a conditionally controlled encoder-decoder structure, such as... Figure 4 As shown, it includes an image encoder and a signal decoder.
[0079] The image encoder uses a lightweight ResNet-18 as the backbone network. The specific process is as follows: 64 7×7 convolutional kernels with a stride of 2 are used as input to perform preliminary feature extraction, using either the real erosion evolution image tensor or the fake erosion evolution image tensor as input. Then, the size is compressed to [64, 64, 64] by max pooling. Four sets of residual blocks are stacked, each consisting of two convolutional layers and skip connections: the first set uses 64 3×3 convolutional kernels, and the feature expression is enhanced by ReLU activation and batch normalization; the number of channels in the second to fourth sets is increased to 128, 256, and 512 respectively, with a stride of 2. Global average pooling is performed on the output of the last set of residual blocks to obtain the image feature vector
[512] , which serves as a high-dimensional abstract representation of the image.
[0080] A fully connected layer is used to transform the real-world environment condition vector into a dimension that fits the image features.
[0081] The signal decoder first concatenates the 512-dimensional image feature vector output by the image encoder with the environmental condition vector after feature dimension transformation, forming a fused feature vector. The fused feature vector is then projected and reshaped through a fully connected layer using ReLU activation. The output vector is reshaped into a one-dimensional feature sequence with dimensions [256, 4], serving as the starting point for one-dimensional upsampling. Then, the feature sequence length is progressively increased to the target signal length through four one-dimensional upsampling blocks, as follows: Blocks 1 to 2: One-dimensional transposed convolution is used with a kernel size of 4×1 and a stride of 2, adjusting the number of channels to 8 and 4 respectively. ReLU activation and batch normalization are then applied. Blocks 3 to 4: A 1×1 one-dimensional convolution is used, compressing the number of channels to 2 and 1 respectively. The output is activated using the ReLU function to generate a fake non-destructive testing signal vector or reconstruct the non-destructive testing signal vector.
[0082] (2-3) Conditional Predictor
[0083] The conditional predictor is an auxiliary supervised network that includes an image conditional predictor. and signal condition predictor The image condition predictor receives a forged erosion evolution image tensor and then predicts the environmental condition vector used during generation. The signal condition predictor receives a spoofed detection signal vector and then predicts the environmental condition vector used during generation. .
[0084] like Figure 7 As shown, image conditional predictor The system consists of 6 convolutional layers, global average pooling, and 3 fully connected layers. The first 5 convolutional layers use Conv+ReLU+batch normalization, employing 32, 64, 128, 256, and 512 3×3 convolutional kernels respectively, with a stride of 2. The sixth convolutional layer has 256 kernels, a size of 1×1, and a stride of 1. Global average pooling is applied to the output feature map to output a feature vector. This vector is then subjected to dimensionality reduction and non-linear transformation through 2 fully connected layers + ReLU, and finally output as a 5-dimensional environmental condition vector by a single fully connected layer.
[0085] like Figure 8 As shown, signal condition predictor The system consists of five 1D convolutional layers, global average pooling, and three fully connected layers. The first four convolutional layers use Conv+ReLU+batch normalization, employing 16, 32, 64, and 128 3×1 convolutional kernels respectively, with a stride of 2. The fifth convolutional layer uses 64 1×1 convolutional kernels with a stride of 1. Global average pooling is applied to the output feature map to produce a feature vector. This vector is then subjected to dimensionality reduction and non-linear transformation through two fully connected layers plus ReLU, finally outputting a 5-dimensional environmental condition vector by a single fully connected layer.
[0086] (2-4) Image discriminator
[0087] The image discriminator needs to perform two tasks simultaneously: first, distinguish whether the input is a real erosion evolution image tensor or a fake erosion evolution image tensor generated by the image generator; second, determine the degree of matching between the input image tensor and the real environment condition vector, and finally output a probability value of "real and conditionally matched". For example... Figure 5 As shown, the specific structure is as follows:
[0088] Two convolutional layers are used to perform initial feature extraction on the tensor of the fake erosion evolution image. The first convolutional layer uses 64 4×4 convolutional kernels with a stride of 2 to perform preliminary feature extraction on the input image, and the activation function is LeakyReLU. The second convolutional layer uses 128 4×4 convolutional kernels with a stride of 2, the activation function is LeakyReLU, and a batch normalization layer is added.
[0089] The LeakyReLU function is defined as follows:
[0090] Leaky
[0091] In the formula, 'a' is a small positive number, typically 0.01 or 0.2, controlling the slope in the negative region. (Leaky) The advantage of this is that it allows small negative values to pass through, thereby maintaining the gradient of neurons in the negative interval, reducing the risk of "dead neurons", and enabling the model to have better learning ability.
[0092] A fully connected layer maps the real-world condition vector to a feature vector matching the current number of feature channels, and then concatenates it with the image feature map channel by channel. Two convolutional layers are used to discriminate deep features: the third convolutional layer uses 256 4×4 kernels with a stride of 2, LeakyReLU, and batch normalization; the fourth convolutional layer uses 512 4×4 kernels with a stride of 1, LeakyReLU, and batch normalization.
[0093] The output layer uses a 4×4 convolution kernel with a stride of 1 and an output dimension of 32×32×1 (i.e., a 32×32 "discriminative patch"). Each patch corresponds to the realism score of a local region of the image.
[0094] After averaging the scores of all patches, the final probability value is output through the Sigmoid activation function. The closer the value is to 1, the higher the credibility of "true and conditionally matched".
[0095] (2-5) Signal discriminator
[0096] The signal discriminator needs to distinguish whether the input signal is a genuine non-destructive testing (NDT) signal vector or a fake NDT signal vector generated by the signal generator, and determine the matching degree between the input NDT signal vector and the real environmental condition vector, outputting the corresponding probability value. For example... Figure 6 As shown, the specific structure is as follows:
[0097] Two convolutional layers are used to perform initial feature extraction on the forgery nondestructive detection signal vector. The first convolutional layer uses 64 4×1 convolutional kernels with a stride of 2 to perform preliminary feature extraction, and employs the LeakyReLU activation function. The second convolutional layer uses 128 4×1 convolutional kernels with a stride of 2, and applies LeakyReLU activation plus batch normalization.
[0098] A fully connected layer maps the real-world condition vector to a feature vector matching the current number of feature channels, and then concatenates it with the signal feature map channel by channel. Two convolutional layers are used to discriminate deep features: the third 1D convolutional layer uses 256 4×1 kernels with a stride of 2, LeakyReLU, and batch normalization; the fourth 1D convolutional layer uses 512 4×1 kernels with a stride of 1, LeakyReLU, and batch normalization.
[0099] The output layer uses a 4×1 convolution kernel with a stride of 1 and an output dimension of 128×1 (128 temporal discrimination points). Each point corresponds to the authenticity score of a local segment of the signal.
[0100] After averaging all time-domain points, the final probability value is output through the Sigmoid activation function. The closer the value is to 1, the higher the credibility of "true and conditionally matched".
[0101] Step 3: Train the double-loop conditional generative adversarial network model.
[0102] (3-1) Define the loss function
[0103] Generator loss It consists of three parts: adversarial loss, cycle consistency loss, and conditional consistency loss, expressed as follows:
[0104] = + + ,
[0105] In the formula, (These are weighting coefficients used to balance the importance of different losses).
[0106] Adversarial loss + :
[0107] Image generator loss ,
[0108] Signal generator loss .
[0109] Cyclic consistency loss :
[0110] .
[0111] Conditional consistency loss :
[0112] .
[0113] The discriminator only focuses on adversarial loss. It is divided into image discriminator loss. and signal discriminator loss Two parts:
[0114] ,
[0115] .
[0116] (3-2) Training process
[0117] Phase 1: Before officially starting to train the double-loop CGAN, the conditional predictor is pre-trained.
[0118] Using real data, that is, extracting real erosion evolution image tensors and their corresponding real environmental condition vectors from the training set. And the real nondestructive testing signal vector and its corresponding real environmental condition vector. Training is then performed. By inputting real samples, the output is a prediction of the environmental condition vector C. The Adam optimizer is used with a learning rate of 0.0001, momentum parameters β1=0.5, β2=0.999, and weight decay of 0.0001 to suppress overfitting. The validation set conditional consistency loss is below 0.05 for 10 consecutive epochs, and the R² coefficient of determination for each conditional dimension is > 0.95 (continuous parameters), with classification accuracy > 98% (discrete parameters). Once these metrics are achieved, training ends, and the parameters are saved. In the subsequent main training process of the double-loop CGAN, all parameters of the conditional predictor are frozen and no longer updated.
[0119] Phase 2, the main training process of the dual-loop CGAN:
[0120] (1) To ensure the discriminator has basic discrimination capabilities in the early stages of training, the generator parameters are frozen first, and the discriminator is pre-trained. A batch of real corrosion evolution image tensor / non-destructive testing signal vectors are taken from the training set and labeled as "real". This batch of data is then input into the untrained generator to generate fake corrosion evolution image tensor / non-destructive testing signal vectors, which are labeled as "fake". These "real" and "fake" samples and their corresponding environmental condition vectors C are fed into the discriminator. The loss function of the discriminator is calculated, and backpropagation only updates the parameters of the discriminator. 5-10 iterations are performed.
[0121] (2) Randomly select a batch of data from the training set, and first construct a forward loop of "image-signal-image" to combine the real erosion evolution image tensor and the real environmental condition vector. The input signal generator produces a fake non-destructive testing signal vector, simulating the conversion from image to signal, and then combines the fake non-destructive testing signal vector with the real environmental condition vector. The input is fed into the image generator to generate a reconstructed erosion evolution image tensor; a backward loop of "signal-image-signal" is constructed to combine the real non-destructive testing signal vector and the real environmental condition vector. The input image generator produces a fake erosion evolution image tensor, simulating the signal-to-image conversion. This tensor is then compared with the real environmental condition vector. The signal is input into the signal generator to generate a reconstructed non-destructive testing signal vector.
[0122] (3) Based on all the real and generated data obtained in the above steps, calculate the total joint loss function. This loss function is a weighted sum of the following components:
[0123] Adversarial loss: The image discriminator receives both the real and fake erosion evolution image tensors and calculates their discrimination loss; simultaneously, the real and fake non-destructive testing signal vectors are received into the signal discriminator and their discrimination loss is calculated. This loss is used to update the discriminator and generator.
[0124] Cyclic consistency loss: This loss calculates the difference between the "reconstructed erosion evolution image tensor" and the "true erosion evolution image tensor," as well as the difference between the "reconstructed non-destructive testing signal vector" and the "true non-destructive testing signal vector." This loss constrains the generator to still recover the original features after cross-modal transformations; this portion of the loss is only used to update the generator.
[0125] Conditional consistency loss: The tensor / non-destructive testing signal vector of the fake erosion evolution image is fed into the conditional predictor, and the predicted environmental condition vector is output. This predicted environmental condition vector is compared with the real input environmental condition vector, and the loss is calculated. This loss is only used to update the generator.
[0126] (4) After calculating the total loss, an alternating optimization strategy is used for backpropagation and parameter updates:
[0127] First, fix the parameters of all generators and conditional predictors. Take a batch of real samples from the dataset, and use the generator to generate a batch of fake samples. Feed both real and fake samples into the discriminator simultaneously, outputting a probability value for each input sample. Calculate the discriminator's loss function based on this probability value, and use the calculated total loss of the discriminator as a feedback signal for backpropagation. Calculate the gradient and update the discriminator's parameters. This step aims to improve the discriminator's ability to distinguish between real and fake samples.
[0128] Next, fix the parameters of all discriminators and conditional predictors. Use a generator to receive the input and generate a batch of new fake samples, completing the full "image-signal-image" and "signal-image-signal" loops to obtain reconstructed samples. Calculate the difference between these reconstructed samples and the input samples to form the cycle consistency loss. Feed the newly generated fake samples into the discriminator and conditional predictor. Calculate the adversarial loss based on the probability values output by the discriminator, and calculate the conditional consistency loss based on the difference between the conditions predicted by the fake samples and the input conditions. Backpropagate the generator's total loss as a feedback signal, calculate the gradient, and simultaneously update the generator's parameters. This step aims to enable the generator to produce more realistic samples that better conform to the cycle and conditional constraints.
[0129] The Adam optimizer was used with a learning rate of 0.0002, momentum parameters β1=0.5, β2=0.999, and weight decay of 0.0001 to suppress overfitting.
[0130] (5) Set the maximum number of training epochs to 300 epochs as the upper limit. Every 10 epochs, calculate the cycle consistency error, conditional consistency error and FID score on the validation set. Stop training when the FID score no longer decreases within 20-30 consecutive epochs and the cycle consistency error and conditional consistency error of the validation set tend to stabilize.
[0131] Example 2
[0132] Based on Embodiment 1, the present invention also proposes a computer-readable storage medium for storing one or more programs, the one or more programs including instructions that, when executed by a computing device, cause the computing device to perform the automatic alignment method of corrosion evolution and non-destructive testing signals as described above.
[0133] Example 3
[0134] Based on Embodiment 1, the present invention also proposes an automatic alignment device for corrosion evolution and non-destructive testing signals, comprising one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for performing the automatic alignment method for corrosion evolution and non-destructive testing signals as described above.
[0135] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0136] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0137] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0138] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0139] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any transformations or substitutions that can be conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for automatically aligning corrosion evolution with nondestructive testing signals, characterized in that, The specific steps of the method are as follows: Step 1: Establish a dataset consisting of several cable samples after preprocessing. Each cable sample includes a real cross-sectional corrosion image and its corresponding real corrosion environment parameters, a real detection signal and its corresponding real corrosion environment parameters. After preprocessing, the real cross-sectional corrosion image and its corresponding real corrosion environment parameters are used to obtain the real corrosion evolution image tensor and its corresponding image real environment condition vector. After preprocessing, the real detection signal and its corresponding real corrosion environment parameters are used to obtain the real non-destructive testing signal vector and its corresponding signal real environment condition vector. Step 2: Build a dual-loop conditional generative adversarial network model suitable for automatic alignment of corrosion evolution and non-destructive testing signals. The dual-loop conditional generative adversarial network model includes an image generator, a signal generator and a conditional predictor. The image generator comprises a cascaded signal encoder, a conditional mapping network, and an image decoder: the signal encoder uses a convolutional neural network for feature encoding, taking real or fake non-destructive testing signal vectors as input and outputting signal feature vectors; the conditional mapping network uses a multilayer perceptron structure, taking the real environmental condition vector of the signal as input and outputting a "style parameter set" matching the number of upsampling blocks in the image decoder, with each "style parameter set" including a set of scales and biases; in the image decoder, the number of channels of the signal feature vector is first adjusted through convolutional blocks, then instance normalization is performed using a cascaded upsampling structure of multiple upsampling blocks, and finally, a fake erosion evolution image tensor or a reconstructed erosion evolution image tensor is generated through the Tanh activation function, with each upsampling block corresponding to a "style parameter set"; The signal generator consists of an image encoder and a signal decoder: the image encoder uses a lightweight ResNet-18 as the backbone network for feature extraction, taking the tensor of the real erosion evolution image or the tensor of the fake erosion evolution image as input, and outputs an image feature vector; the signal decoder takes the concatenation result of the image feature vector and the image real environment condition vector as input, and generates a fake non-destructive testing signal vector or reconstructs a non-destructive testing signal vector through cascaded fully connected layers and several upsampling blocks. The conditional predictor includes an image conditional predictor and a signal conditional predictor: the image conditional predictor uses a structure of multiple convolutional layers and multiple fully connected layers in a cascaded manner, takes a fake erosion evolution image tensor as input, and outputs an image prediction environment condition vector; the signal conditional predictor uses a structure of multiple convolutional layers and multiple fully connected layers in a cascaded manner, takes a fake non-destructive testing signal vector as input, and outputs a signal prediction environment condition vector. Step 3: Train the double-loop conditional generative adversarial network model based on the dataset; Step 4: Use the trained double-loop conditional generative adversarial network model to automatically align the corrosion evolution with the non-destructive testing signal.
2. The method according to claim 1, characterized in that, The actual corrosion environment parameters in step 1 include temperature, humidity, salt spray concentration, air pollutants, service life, stress level, ambient pH value, and oxygen content.
3. The method according to claim 2, characterized in that, The dual-loop conditional generative adversarial network model built in step 2 also includes a discriminator; The discriminator comprises an image discriminator and a signal discriminator. In the image discriminator, features are first extracted from the tensor of the forged erosion evolution image. Then, a fully connected layer maps the image's true environmental condition vector to an environmental feature vector matching the number of channels in the feature extraction result. The feature extraction result and the mapped environmental feature vector are concatenated by channel. Finally, several convolutional layers and a sigmoid activation function are passed sequentially to output a probability value representing the degree to which the forged erosion evolution image tensor is "true and conditionally matched." In the signal discriminator, features are first extracted from the forged non-destructive testing signal vector. Then, a fully connected layer maps the signal's true environmental condition vector to a feature vector matching the number of channels in the feature extraction result. The feature extraction result and the mapped environmental condition vector are concatenated by channel. Finally, several convolutional layers and a sigmoid activation function are passed sequentially to output a probability value representing the degree to which the forged non-destructive testing signal vector is "true and conditionally matched." 4. The method according to claim 3, characterized in that, In step 3, the following loss function is used to train the double-loop conditional generative adversarial network model: (1) The loss function of the generator is: ; in, For weighting coefficients, adversarial loss Image generator adversarial loss Signal generator adversarial loss Cyclic consistency loss Conditional consistency loss , , , , These represent the outputs of the image generator, signal generator, image discriminator, and signal discriminator, respectively. , , , These represent the tensor of the real corrosion evolution image, the vector of the real environmental conditions of the image, the vector of the real non-destructive testing signal, and the vector of the real environmental conditions of the signal, respectively. For S and Find the expectation of the joint distribution. express Follows the distribution of real nondestructive testing signals in the database , This indicates that the signal conforms to the true nondestructive testing signal distribution. Find the expectation of the real nondestructive testing signal vector S. It is for I and Find the expectation of the joint distribution. express Follows the distribution of real corrosion evolution images in the database , This indicates that the distribution follows the true erosion evolution image. The expectation of the tensor I of the real corrosion evolution image is calculated, where N is the number of samples and D is the dimension of the real environmental condition vector of the image or the real environmental condition vector of the signal. Let be the d-th dimension element of the real environment condition vector corresponding to the i-th sample image. It is the d-th element of the predicted environment condition vector corresponding to the i-th sample image. It is the d-th element of the environmental condition vector corresponding to the signal of the i-th sample; (2) The loss function of the discriminator is: ; Among them, the adversarial loss of the image discriminator Signal generator adversarial loss .
5. The method according to claim 4, characterized in that, The training process for the dual-loop conditional generative adversarial network model in step 3 is as follows: 1) Fix the generator and discriminator, and pre-train the conditional predictor; 2) Fix the generator and condition predictor, and use Train the discriminator; 3) Fix the discriminator and condition predictor, and use Train the generator.
6. An automatic alignment device for corrosion evolution and non-destructive testing signals, characterized in that: It includes one or more processors, one or more memories, and one or more programs, said programs being stored in the memory and configured to be executed by the processor, and said programs, when executed by the processor, implement the method as described in any one of claims 1 to 5.
7. A computer-readable storage medium storing one or more programs containing instructions, characterized in that: When the program is executed by a computing device, the computing device performs the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Structure fatigue damage identification method based on acoustic emission and deep learning
CN120314460A
Metal component flaw detection system and method
CN120354366A