A method for predicting connector profiles based on conditional generative adversarial networks
By predicting the geometric parameters of the link profile image by generating an adversarial network based on conditions, the problem of missing parameter correlation in the prior art is solved, and a more efficient connection process evaluation is achieved.
Patent Information
- Application Number
- CN202210533743.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-05-17
AI Technical Summary
When predicting the geometric parameters of the cross-section of the connection part, the prior art lacks the correlation between the parameters, and the numerical data cannot intuitively reflect the results of the connection process, making it difficult to meet the efficient evaluation needs of the lightweight connection process of automobiles.
Using the method of conditionally generating adversarial network (CGAN), by building a CGAN composed of the generator network G and the discriminant network D, using the parameters of the connection process as conditions, the network is trained to predict the geometric parameters of the connection profile image to ensure the correlation between each parameter.
It realizes that when predicting the geometric parameters of the connection profile image, maintains the correlation between the parameters, and directly predicts the profile image from the connection process. It has rich information, improves the model prediction effect, and provides a more intuitive and reliable method for predicting the geometric parameters of the connection section.
Smart Images

Figure CN115019120B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image generation, and in particular to a connector profile prediction method based on a conditional generative adversarial network. Background Art
[0002] Lightweighting is one of the important ways to save energy and reduce emissions in automobiles. Taking into account the cost, performance and lightweighting effect, the use of multi-material hybrid body design will become the most important means of lightweighting the body in the future. However, how to perfectly connect so many materials together is the key to achieving a safe and lightweight body. The current mainstream lightweight connection processes include aluminum alloy spot welding (RSW), self-piercing riveting (SPR), rivetless self-piercing riveting (Clinching), hot melt tapping screws (FDS), structural adhesives (Adhesive), etc. The structural connection requirements for lightweight automobiles are high, and there are strict requirements on strength, stiffness, durability, reliability, corrosion resistance, processability, and economy. Therefore, only by continuous innovation can the lightweight connection process of automobiles meet the requirements of the new era.
[0003] The cross-sectional image produced after the connection is formed is an important data for evaluating the connection quality. Researchers usually measure key cross-sectional geometric parameters to judge the quality of the connection, and then establish the relationship between the connection process and the connection quality. This type of method can no longer meet the needs of the current development of lightweight connection technology due to its long R&D cycle, low efficiency and high cost. Therefore, big data-based methods, such as machine learning, have gradually become an emerging tool for studying lightweight connection technology due to their low computing cost, short development cycle, powerful data processing capabilities and strong predictive performance. The current mainstream approach is to establish a machine learning model for each key geometric parameter in the cross-sectional image to achieve the purpose of predicting the connection quality from the connection process.
[0004] Due to the constraints of internal conditions such as physical and chemical properties and mechanical structure, the geometric parameters of the connecting parts are not independent of each other and have certain correlations. However, the results predicted by the current mainstream machine learning models are independent of each other and lack correlation, and numerical data cannot intuitively reflect the results of the connection process. Summary of the invention
[0005] In order to solve the problems existing in the background technology, the purpose of the present invention is to provide a connector profile prediction method based on a conditional generative adversarial network, which can ensure the correlation between various geometric parameters when predicting the geometric parameters of the connection profile image.
[0006] The technical solution adopted by the present invention is as follows:
[0007] A method for predicting a connector profile based on a conditional generative adversarial network comprises the following steps:
[0008] Step 1: Build a conditional generative adversarial network (CGAN); the conditional generative adversarial network consists of a generative network G and a discriminative network D. The generative network G consists of two sub-networks G2 and G1 with the same structure. Both sub-networks G1 and G2 are U-shaped fully convolutional network structures designed based on the Encode-Decode idea.
[0009] The discriminant network D is a multi-scale discriminator composed of discriminant networks of multiple scales, and the network structure of the discriminant network of each scale is the same;
[0010] Step 2: For the connection process to be predicted, select the connection parameters of the connection process as the control condition y of the conditional generative adversarial network;
[0011] Step 3: Prepare a data set for the connection process to be predicted and divide it into a training set and a test set;
[0012] Step 4: Perform image enhancement on the images in the dataset;
[0013] Step 5: Set CGAN network training parameters;
[0014] Step 6: Add the training set to the CGAN network for training;
[0015] Step 7: Use the test set to test the CGAN network and optimize the CGAN network based on the training results;
[0016] Step 8: Use the CGAN network trained in step 7 to predict the same type of connection process.
[0017] Furthermore, the connection process includes spot welding, self-piercing riveting, rivet-free self-piercing riveting, hot-melt self-tapping screws or structural adhesive.
[0018] Furthermore, the connection parameters of the connection process include process parameters and material properties.
[0019] Further, the method of making the data set in step 3 is as follows:
[0020] 1) If the input control condition y is numerical data, the selected process parameters and the cross-sectional images generated under the corresponding parameters need to form a one-to-one corresponding data set;
[0021] 2) When the input control condition y is an image, the selected process parameters need to be mapped to the image to form an input image, and the cross-sectional image generated under the corresponding parameters is used as the output image. The input image and the output image correspond one-to-one to form a data set.
[0022] Furthermore, the discriminant network D maps the input into a real number, that is, the probability that the input sample is a true sample, through an ordinary fully connected network; the discriminant network D maps the input into an N*N matrix, each value in the matrix represents the probability that different regions are true samples, and then the matrix is averaged as the output of the scale discriminator.
[0023] Furthermore, the multi-scale discriminator has three scales, namely, the original image, 1 / 2 down-sampling of the original image, and 1 / 4 down-sampling of the original image.
[0024] Furthermore, the method for image enhancement in step 4 is: using one or more combinations of translation, flipping, rotation, noise addition, blurring, sharpening, cropping, and scaling to expand the data set.
[0025] Furthermore, network training parameters refer to one or more combinations of learning rate, optimizer, batch size, activation function, and number of iterations.
[0026] Furthermore, data set partitioning means randomly selecting 60%-90% of the samples from the data set as the training set, and the remaining samples as the test set.
[0027] Beneficial effects of the present invention:
[0028] The present invention provides a method for predicting the profile of a connector based on a conditional generative adversarial network (CGAN). When predicting the geometric parameters of a connection profile image, the correlation between the geometric parameters is ensured. The method can effectively solve the defects and shortcomings of traditional machine learning models and directly predict the effect of a connection profile image from the connection process.
[0029] The present invention applies CGAN to the prediction of connector cross-section images. Compared with traditional machine learning models, the present invention can directly predict cross-section images, has richer information, and maintains the correlation between the predicted values to the maximum extent. Therefore, applying the present invention to the prediction of connector cross-section geometric parameters can effectively improve the model prediction effect and provide a more intuitive and reliable method for realizing the prediction of connector cross-section geometric parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flowchart of the prediction method of the present invention;
[0031] Figure 2 Schematic diagram of CGAN network structure;
[0032] Figure 3 CGAN network structure diagram used in the embodiment;
[0033] Figure 4An input image produced according to the connection parameters in the embodiment;
[0034] Figure 5 is an output image (Real) corresponding to the above input image in the embodiment;
[0035] Figure 6 This is the generated image (Fake) predicted by CGAN in the embodiment. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0037] like Figure 1 , 2 The present invention proposes a connector profile prediction method based on a conditional generative adversarial network, comprising the following steps:
[0038] Step 1: Build a conditional generative adversarial network (CGAN);
[0039] The conditional generative adversarial network (CGAN) constructed in this embodiment consists of two parts: a generation network G and a discriminant network D.
[0040] The generated network G is composed of two identical sub-networks G2 and G1. Both sub-networks G1 and G2 are U-shaped fully convolutional network structures designed based on the Encode-Decode concept. More specifically, sub-networks G1 and G2 are composed of an Encode network and a Decode network; the Encode network is a compression path composed of convolution and downsampling, and the Decode network is an expansion path composed of deconvolution and upsampling. Figure 3 The specific network structure of the generated network G is described as follows:
[0041] The input of subnetwork G1 is an image. First, the input image is subjected to feature extraction and dimensionality reduction processing by G1's Encode network to obtain a feature map. The input of G1's Decode network is composed of the upsampled features output by the previous layer (i.e., the last layer of G1's Encode network) and the features of the compression path part. In this embodiment, feature splicing is achieved by splicing the number of channels. After splicing, the information of each feature map remains unchanged, but the number of feature maps increases.
[0042] The connection between network G1 and sub-network G2 is: the feature map extracted by the Encode network in sub-network G2 is fused with the previous layer features of the output layer of sub-network G1, and the fused information is sent to the Decode network of G2, and the output image is obtained by upsampling through deconvolution.
[0043] The discriminant network D is a multi-scale discriminator composed of discriminant networks of multiple scales. Among them, the network structure of the discriminant network of each scale is the same, and they are all designed based on the full convolution network. The discriminant network D maps the input into a real number (that is, the probability that the input sample is a true sample) through an ordinary fully connected network. The discriminant network D maps the input into an N*N matrix. Each value in the matrix represents the probability that different regions are true samples. The matrix is then averaged as the output of the scale discriminator. In this embodiment, three scales of discriminators are used, and the three scales of discrimination are: original image, 1 / 2 downsampling of the original image, and 1 / 4 downsampling of the original image. Finally, the output results of the discriminators on the three scales are averaged as the output result of the final discriminator.
[0044] Step 2. In this embodiment, the connection process selected is self-piercing riveting (SPR). Therefore, the connection parameters of self-piercing riveting are used as control conditions. The connection parameters of self-piercing riveting include: geometric dimensions of rivets and plates, properties of rivets and plates, and other parameters. Specifically, the geometric dimensions of rivets include rivet length, rivet diameter, etc.; the geometric dimensions of plates refer to the thickness of plates; the properties of rivets and plates refer to elastic model, yield strength, tensile strength, Poisson's ratio, elongation, hardness, composition information, etc.
[0045] In addition to the above-mentioned prediction of self-piercing riveting, the prediction method designed in this application can also predict the aluminum alloy spot welding (RSW) connection process; when the prediction object is the aluminum alloy spot welding connection process, the connection parameters of the spot welding are used as control conditions, and the connection parameters of the spot welding include current, voltage, time, etc.
[0046] Step 3: Create a data set for the connection process to be predicted and divide it into a training set and a test set.
[0047] For the connection process to be predicted, 500 cross-sectional images generated under the connection parameters selected in the above step 2 are collected. The cross-sectional images mentioned in this embodiment refer to simulation images or experimental images.
[0048] The dataset is prepared as follows: the properties of rivets and plates are mapped to the RGB channels of the image, and the geometric dimensions of rivets and plates are converted into pixel values according to their relative sizes to generate the input image. Figure 3As shown. The name of the input image is consistent with the cross-section simulation image in the above steps, forming a one-to-one correspondence. After the data set is completed, 90% is randomly selected as the training set and 10% as the test set.
[0049] If the connection process to be predicted is aluminum alloy spot welding, the data set for making the connection process is to obtain the connection parameters of the connection process and obtain numerical data; when the input control condition y is numerical data, the selected process parameters and the cross-sectional images generated under the corresponding parameters need to form a one-to-one corresponding data set.
[0050] Similarly, the connection process can also be rivetless self-piercing riveting, hot-melt self-tapping screws or structural adhesives.
[0051] Step 4: Perform image enhancement on the input images in the above dataset by using translation, flipping, rotation, noise addition, blurring, sharpening, cropping, scaling, etc.
[0052] Step 5. Set the CGAN network training parameters, the optimizer is Adam, the activation function is a combination of Relu and Leaky Relu, the epoch is 400, the batch size is 1, etc.
[0053] Step 6: Add the training set prepared above to the CGAN network for training. After the training is completed, the generating network G and the discriminating network D are obtained, wherein the generating network G needs to be retained for subsequent image generation, while the discriminating network D does not need to be retained.
[0054] Step 7: Input the test set in step 3 into the generated network G obtained in step 6 for testing. The specific process is as follows:
[0055] Combination Figure 4 , 5 6. The input image in the test set is used as the input of the generative network G, and the output of the generative network G is the generated image (Fake); according to the test results (i.e., the difference between the generated image (Fake) and the real image (Real)), the model is optimized to improve the generation effect and prediction accuracy of the model. The model optimization refers to adjusting the CGAN network training parameters in step 5.
[0056] The difference between the real image and the generated image is compared by image similarity and geometric parameters. The difference between the generated image (Fake) and the real image (Real) includes the difference between the images themselves and the difference between the geometric parameters of the cross-sections in the images. By calculating the histogram of the two images, it can be obtained that the similarity of the two images is 0.99, and the error of each geometric parameter in the two images is small. The detailed values are shown in Table 1.
[0057] Table 1
[0058] Geometric parameters Parameter Explanation Real image (mm) Generated image (mm) HH Head Height 0.339 0.337 Int Interlock Value 0.339 0.310 BLT Bottom Layer Thinning 0.188 0.188
[0059] Note: The nail head height HH is the height difference between the top surface of the rivet and the end surface of the upper plate; the self-locking amount Int is the horizontal distance from the outer edge of the leg of the rivet to the lower edge of the upper plate cut by the rivet; the bottom cut amount BLT is the normal thickness of the thinnest part of the lower plate.
[0060] In the present application, the image similarity can also be calculated by using methods such as cosine similarity, structural similarity, and fingerprint information. Step 8: Use the CGAN network trained in step 7 to predict the same type of connection processes.
[0061] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.
Claims
1. A connector profile prediction method based on conditional generative adversarial network, characterized in that: The steps include: Step 1: Build a conditional generative adversarial network CGAN; the conditional generative adversarial network consists of a generative network G and a discriminative network D. The generative network G consists of two sub-networks G2 and G1 with the same structure. Both sub-networks G1 and G2 are U-shaped fully convolutional network structures designed based on the Encode-Decode idea, wherein the Encode network is a compression path composed of convolution and downsampling, and the Decode network is an expansion path composed of deconvolution and upsampling; the input of sub-network G1 is an image, and the input image is firstly subjected to feature extraction and dimensionality reduction processing by the Encode network of G1 to obtain a feature map; the input of the Decode network of G1 is composed of the upsampled features of the previous layer output and the features of the compression path part; the connection between network G1 and sub-network G2 is: the feature map extracted by the Encode network in sub-network G2 and the previous layer features of the output layer of sub-network G1 are feature fused, and the fused information is sent to the Decode network of G2, and the output image is obtained by upsampling through deconvolution; The discriminant network D is a multi-scale discriminator composed of discriminant networks of multiple scales. The network structure of the discriminant network of each scale is the same and is designed based on a fully convolutional network. The discriminant network D maps the input into a real number through an ordinary fully connected network. The discriminant network D maps the input into an N*N matrix. Each value in the matrix represents the probability that different regions are true samples. Then the matrix is averaged as the output of the scale discriminator. Step 2: For the connection process to be predicted, select the connection parameters of the connection process as the control conditions y of the conditional generative adversarial network; the connection parameters of the connection process include process parameters and material properties; Step 3: Prepare a data set for the connection process to be predicted and divide it into a training set and a test set. The method for preparing the data set in step 3 is as follows: 1) If the input control condition y is numerical data, the selected process parameters and the cross-sectional images generated under the corresponding parameters need to form a one-to-one corresponding data set; 2) When the input control condition y is an image, the selected process parameters need to be mapped to the image to form an input image, and the cross-sectional image generated under the corresponding parameters is used as the output image. The input image and the output image correspond one-to-one to form a data set; Step 4: Perform image enhancement on the images in the dataset; Step 5: Set CGAN network training parameters; Step 6: Add the training set to the CGAN network for training; Step 7: Use the test set to test the CGAN network and optimize the CGAN network based on the training results; Step 8: Use the CGAN network trained in step 7 to predict the same type of connection process.
2. The method for predicting connector profile based on conditional generative adversarial network according to claim 1, characterized in that: The connection process includes spot welding, self-piercing riveting, rivet-free self-piercing riveting, hot-melt self-tapping screws or structural adhesive.
3. The method for predicting connector profile based on conditional generative adversarial network according to claim 1, characterized in that: The multi-scale discriminator has three scales, namely, the original image, 1 / 2 down-sampling of the original image, and 1 / 4 down-sampling of the original image.
4. The method for predicting connector profile based on conditional generative adversarial network according to claim 1, characterized in that: The method for image enhancement in step 4 is: using one or more combinations of translation, flipping, rotation, noise addition, blurring, sharpening, cropping, and scaling to expand the data set.
5. The method for predicting connector profile based on conditional generative adversarial network according to claim 1, characterized in that: Network training parameters refer to one or more combinations of learning rate, optimizer, batch size, activation function, and number of iterations.
6. The method for predicting connector profile based on conditional generative adversarial network according to claim 1, characterized in that: Data set partitioning means randomly selecting 60%-90% of the samples from the data set as the training set, and the remaining samples as the test set.
Citation Information
Patent Citations
Welding seam positioning method based on adversarial learning under laser vision system
CN112801984A