Industrial defect detection automation system based on generative adversarial network

By generating an adversarial network model to generate real defect images and performing repair evaluation, the detection range and evaluation uniformity of welding defect detection are solved, and efficient and scientific welding defect detection and repair effect evaluation are achieved.

CN120198418BActive Publication Date: 2025-08-29ZHEJIANG WANLI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510657579.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-08-29
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

In the prior art, welding defect detection methods have limited detection range, strict detection conditions, difficult to meet the detection requirements under different welding conditions, and difficult to evaluate the uniformity of repair effects.

Method used

The generative adversarial network model is adopted, and through data acquisition and preprocessing, model training, welding defect detection and response modules, the generator and discriminator are optimized to generate real defect images and perform repair and evaluation.

Benefits of technology

It realizes efficient and scientific defect detection under different welding conditions, provides reliable evaluation of repair results, and improves the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198418B_ABST
    Figure CN120198418B_ABST
Patent Text Reader

Abstract

The present invention discloses an automated industrial defect detection system based on a generative adversarial network, specifically relating to the technical field of welding defect detection for industrial products. The system comprises: a data acquisition and preprocessing module, a model setting and training module, a welding defect detection module, a welding defect response module, and a database. The present invention generates a defect image of a target industrial product based on the welding parameters and defect types of the target industrial product, and then compares it with the actual welding image of the target industrial product to detect welding defects of the target industrial product under different welding conditions. The present invention considers the welding parameters of the target industrial product, generates a repaired defect image of the target industrial product according to a generator, and then compares it with the actual welding image of the repaired target industrial product, providing a reliable basis for evaluating the repair effect of the target industrial product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial product welding defect detection, and in particular to an automated industrial defect detection system based on a generative adversarial network. Background Art

[0002] Welding is a crucial process in industrial production, widely used in manufacturing, construction, energy, and other fields. However, due to the complexity and variability of the welding process, various defects such as porosity, cracks, incomplete penetration, and excessive welding are prone to occur. These defects are often difficult to detect with the naked eye. Traditional manual inspection methods are easily influenced by subjective factors, and detection efficiency is low and costly. With the development of computer vision and deep learning technologies, welding defect detection methods based on generative adversarial networks (GANs) have gradually gained attention. GANs have achieved remarkable results in image generation, data augmentation, and defect detection. Therefore, research on their application in welding defect detection is necessary.

[0003] The existing technology for welding defect detection of industrial products can meet certain needs, but there are also certain potential risks. Specifically: on the one hand, the existing technology mostly uses ultrasonic signals to the welding part and receives its reflected waves, and judges whether there are defects based on the changes in the reflected signals. However, this ultrasonic detection method has a limited detection range and is suitable for certain types of defects. It cannot be widely used for all welding defects. The detection conditions are strict and require the welding surface to be flat and without coatings and other factors that affect signal propagation. It is difficult to meet the actual detection needs of industrial products with different welding defects under different conditions in actual production, resulting in inaccuracy in the welding defects of industrial products, making it difficult to meet the actual needs of industrial product defects.

[0004] On the other hand, there are some existing technologies that use computer vision to detect welding defects of industrial products. However, they ignore the deconstruction of images of industrial products with defects after repair under different welding parameters, which makes it difficult to evaluate the repair effect of the repaired industrial products and provide repaired defect images of industrial products as a comparison reference. This causes inconsistency in the defect repair effect of the target industrial products, making it difficult to meet the detection and evaluation of product defects in actual industrial production. Summary of the Invention

[0005] The purpose of the present invention is to provide an industrial defect detection automation system based on a generative adversarial network, which solves the problems existing in the background technology.

[0006] To solve the above technical problems, the present invention provides an automated industrial defect detection system based on a generative adversarial network, the system comprising: a data acquisition and preprocessing module for extracting welding images and welding parameters of historical industrial products from a database, performing standardization processing on the welding images of the historical industrial products, and labeling the welding images of the historical industrial products with various defect types;

[0007] The model setting and training module uses the generative adversarial network model to set the generator and discriminator. Based on the pre-processed welding images and welding parameters of various historical industrial products, the generative adversarial network model is trained to optimize the parameters of the generator and discriminator.

[0008] The welding defect detection module uses the welding parameters and defect types of the target industrial product as the condition vector of the generative adversarial network model to generate a defect image of the target industrial product. The image is compared with the actual welding image of the target industrial product to obtain the defect detection result of the target industrial product.

[0009] The welding defect response module is based on the defect results of the target industrial product. If the target industrial product has defects, it will reconstruct the defect repair image of the target industrial product based on the welding parameters and defect type of the target industrial product through the generative adversarial network model. This image serves as a reference standard for evaluating the welding defect repair of the target industrial product and evaluates the defect repair effect of the target industrial product.

[0010] The database is used to store welding images and welding parameters of various historical industrial products, store characteristic image slices of various defect types, store the values ​​and learning rates of the initial parameters of the generator, and store the values ​​and learning rates of the initial parameters of the discriminator.

[0011] Compared with the existing technology, the benefits of the present invention are: First, the present invention adopts a generative adversarial network model, and the generator and the discriminator compete with each other through adversarial training. In this process, the generator and the discriminator are continuously optimized. Ultimately, the generator can generate more and more realistic welding defect images that meet the conditional vectors, while the discriminator can more accurately distinguish between actual welding images and generated defect images.

[0012] Second, the present invention generates a defect image of the target industrial product based on the welding parameters and defect types of the target industrial product, and then compares it with the actual welding image of the target industrial product. This can realize the detection of welding defects of the target industrial product under different welding conditions, avoiding the risk of certain defect types being unable to be detected that is difficult to achieve in the existing technology. It not only ensures the high efficiency of welding defect detection of the target industrial product, but also meets the scientific nature of welding defect detection of the target industrial product.

[0013] Third, the present invention takes into account various welding parameters of the target industrial product, generates a repair defect image of the target industrial product according to the generator, and then compares it with the actual welding image of the repaired target industrial product, providing a reliable basis for evaluating the repair effect of the target industrial product, thereby providing a complete automated system for welding defect detection of the target industrial product. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0015] Figure 1 This is a system structure connection diagram of the present invention. DETAILED DESCRIPTION

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

[0017] Reference Figure 1 As shown, the present invention provides an automated industrial defect detection system based on a generative adversarial network, the system comprising: a data acquisition and preprocessing module for extracting welding images and welding parameters of historical industrial products from a database, performing standardization processing on the welding images of historical industrial products, and labeling the welding images of historical industrial products with various defect types.

[0018] In a specific embodiment of the present invention, the welding parameters of the industrial products are: the temperature during the welding process collected by a temperature sensor, the voltage during the welding process collected by a voltage sensor, and the current during the welding process collected by a current sensor.

[0019] Based on the collected temperature, voltage and current during the welding process, the welding parameters of various industrial products are constructed.

[0020] It should be noted that, in a specific embodiment, the influence of the current during the welding process on welding defects of industrial products is as follows: too high or too low a current can lead to welding quality problems. Too high a current can lead to a wide weld, an excessively large molten pool, and even burn-through. Too low a current can result in incomplete welding and a weak weld.

[0021] The impact of welding voltage on welding defects in industrial products is as follows: Welding voltage determines arc length, which in turn affects weld pool morphology. Excessively high or low voltage can affect welding stability. High voltage can lead to excessive arc flash and poor weld pool control, resulting in irregular welds. Low voltage can cause arc instability and a small weld pool, resulting in poor weld quality.

[0022] The impact of welding temperature on welding defects in industrial products is as follows: Excessively high welding temperatures risk overheating the heat-affected zone (HAZ), causing adverse changes in the material's microstructure and resulting in a decrease in toughness. Overheating can cause grain coarsening, impacting the material's mechanical properties, particularly reducing the tensile and fatigue strength of the welded joint. Excessively low welding temperatures can lead to poor fusion between the weld metal and the base material, resulting in the risk of incompletely fused areas in the weld and defects such as porosity and inclusions. At low temperatures, the molten pool cannot flow effectively and expand fully, reducing the strength and reliability of the welded joint.

[0023] In a specific embodiment of the present invention, the welding images of various historical industrial products are standardized, and the specific analysis method is as follows: A1: scaling the welding images of various historical industrial products to Fixed size.

[0024] A2: Use a Gaussian kernel to smooth the welding images of various industrial products and remove high-frequency noise.

[0025] It should be noted that, in a specific embodiment, a Gaussian kernel is two-dimensionally convolved with the welding images of various industrial products through the built-in method of Opencv, and smoothing is performed to obtain the welding images of various industrial products with high-frequency noise removed.

[0026] It should be noted that, in a specific embodiment, a bicubic interpolation calculation method is used, and a cubic polynomial is used for calculation in both horizontal and vertical directions. For a certain pixel position in the target image, a set of intermediate values ​​is first calculated by horizontal interpolation, and then interpolation is performed in the vertical direction to finally obtain the value of the target pixel. The welding images of various historical industrial products are scaled to Fixed size, the specific steps are as follows:

[0027] A1.1: Assume that we have pixels in a scaled welding image of various industrial products. ,in , Represents the horizontal coordinate of the pixel in the welding image of each industrial product after scaling, The vertical coordinates of the pixels in the welding images of various industrial products after scaling correspond to the pixels in the welding images of various industrial products before scaling. ,in , Represents the horizontal coordinate of the pixel in the welding image of each industrial product before scaling, Represents the vertical coordinate of the pixel in the welding image of each industrial product before scaling, It represents the maximum coordinate value of the pixel points in the welding image of each industrial product before scaling, that is, Indicates the size of welding images of various industrial products before scaling.

[0028] A1.2: When calculating the pixel values ​​of the welded images of various industrial products after scaling, we first interpolate the surrounding pixels in the horizontal direction. Assume that we are in There are 4 adjacent pixels in a row: , using the formula for a cubic polynomial: , calculate the first Rank Horizontal interpolation of column pixels ,in Express The partial derivative of Represents the first welding image of each industrial product before scaling Rank The horizontal distance between a column pixel and its four adjacent pixels, Represents the horizontal interpolation coefficient of each pixel in the welding image of each industrial product before scaling.

[0029] A1.3: By formula: , , , , calculate the horizontal interpolation coefficient of each pixel in the welding image of each industrial product before scaling .

[0030] A1.4: According to the welding images of each industrial product before scaling Rank Horizontal interpolation of column pixels The analysis method assumes that the first There are 4 adjacent pixels in the column, and the first pixel in the welding image of each industrial product before scaling is obtained by analysis. Rank Vertical interpolation of column pixels .

[0031] A1.5: Based on the welding images of various industrial products before scaling Rank Horizontal interpolation of column pixels , the first welding image of each industrial product before scaling Rank Vertical interpolation of column pixels , through the formula: , calculate the pixels in the welding image of each industrial product after scaling , according to the analysis method of the pixels in the welding images of each industrial product after scaling, each pixel in the welding images of each industrial product before scaling is analyzed to obtain the welding images of each industrial product scaled to Fixed size welding images.

[0032] In a specific embodiment of the present invention, the specific analysis method for labeling the welding images of each historical industrial product for each defect type is as follows: extracting characteristic image slices of each defect type from a database, sequentially comparing the standardized welding images of each historical industrial product with the characteristic image slices of each defect type using image recognition technology, obtaining defective areas in the standardized welding images of each historical industrial product, extracting defect types corresponding to the defective areas in the standardized welding images of each historical industrial product, and labeling the welding images of each historical industrial product for each defect type;

[0033] The defect types include: pores, cracks, incomplete welding, and excessive welding.

[0034] It should be noted that, in a specific embodiment, the standardized historical welding images of various industries and products are labeled with various defect types. For example, the porosity defect in the standardized historical welding images of various industries and products is labeled as JR1, the crack defect in the standardized historical welding images of various industries and products is labeled as JR2, the incomplete penetration defect in the standardized historical welding images of various industries and products is labeled as JR3, and the excessive welding defect in the standardized historical welding images of various industries and products is labeled as JR4. The standardized historical welding images of various industries and products are labeled with various defect types, and the labeled standardized welding images of various industries and products are recorded as training data sets.

[0035] The present invention preprocesses the historical welding images of various industrial products to obtain labeled welding images of various industrial products, which provides an initial data set for the subsequent training of the generative adversarial network model. The welding images of various historical industrial products after standardization are sliced ​​based on the characteristic images of various defect types according to image recognition technology, and the defect types are labeled. This improves the efficiency of labeling the welding images of various historical industrial products, thereby ensuring the stability and efficiency of the industrial defect automatic monitoring system based on the generative adversarial network.

[0036] The model setting and training module uses the generative adversarial network model to set the generator and discriminator. Based on the pre-processed welding images and welding parameters of various historical industrial products, the generative adversarial network model is trained to optimize the parameters of the generator and discriminator.

[0037] In a specific embodiment of the present invention, the generator and the discriminator are specifically: the generator is used to generate defect images similar to the actual defect types of industrial products and generate defect repair images similar to defect-free industrial products based on various welding parameters and defect types as conditional vectors.

[0038] Set the initial parameters of the generator to , the learning rate of the generator is set to ,in represents the values ​​of the generator's initial parameters extracted from the database, A value representing the learning rate of the generator extracted from the database.

[0039] The discriminator is used to determine whether the defect image and defect repair image of the industrial product generated by the generator are realistic, and to determine whether the industrial product has defects and extract the defect type of the defective industrial product.

[0040] Set the initial parameters of the discriminator to , the learning rate of the discriminator is set to , where represents the value of the initial parameters of the discriminator extracted from the database, The value representing the learning rate of the discriminator extracted from the database.

[0041] It should be noted that in this embodiment, the generative adversarial network model specifically refers to a generative adversarial network (GAN), a deep learning model consisting of two parts: a generator and a discriminator. These two parts are trained together through an adversarial approach, with the generator attempting to generate realistic data and the discriminator attempting to distinguish generated data from real data. This adversarial training process enables the generator to produce samples that increasingly resemble real data.

[0042] The core idea of ​​generative adversarial networks (GANs) is to train the model through a zero-sum game: the generator and the discriminator compete against each other until the generator can produce sufficiently realistic samples that the discriminator cannot accurately distinguish between real and fake data. Specifically, the generator aims to produce fake data that is similar to real data by continuously adjusting its parameters, while the discriminator aims to distinguish between real and generated data.

[0043] In a specific embodiment of the present invention, the training of the generative adversarial network model and the optimization of the parameters of the generator and the discriminator are performed, and the specific analysis method is: each parameter type and each welding parameter of each historical industrial product are combined to form a set of conditional vectors, which are input into the generator to obtain each group of generated images.

[0044] Each group of generated images and the annotated historical industrial welding images of various products are input into the discriminator respectively to obtain the results of judging whether each group of generated images is a real image.

[0045] Based on the results of judging whether each group of generated images is a real image, optimization measures for the parameters of the generator and discriminator are implemented.

[0046] The optimization steps of the generator include: B1: Recording a set of welding parameters and defect types as condition vectors , a set of generated images is obtained through the generator, denoted as .

[0047] B2: The output of the discriminator is used to obtain the probability that a set of generated images are predicted to be real data. .

[0048] B3: Calculate the loss of the generator by minimizing the loss function of the generator , update the parameters of the generator through the optimization algorithm .

[0049] It should be noted that, in a specific embodiment, the loss function of the generator is: ,in Represents the total number of condition vectors composed of various welding parameters and defect types, Represents the mathematical expectation of each set of input conditional vectors.

[0050] It should be noted that, in a specific embodiment, the generator minimizes To train the discriminator, tends to 1, is a generator such that A loss close to 1.

[0051] It should be noted that, in a specific embodiment, the specific method of updating the parameters of the generator through the optimization algorithm is: B3.1: through the back propagation algorithm formula: , calculate the loss of the generator relative to the generator parameters Gradient ,in Identifiers representing partial derivatives, represents the loss of the generator For generator parameters The identifier for finding the partial derivative of .

[0052] B3.2: Optimize by stochastic gradient descent algorithm: , get the updated generator parameters .

[0053] It should be noted that, in a specific embodiment, the learning rate of the generator is manually set by technicians based on the stochastic gradient descent optimization algorithm and the actual working effect of the generator, and stored in the database.

[0054] The optimization steps of the discriminator are: C1: a set of historical industrial product welding images are recorded as , input the discriminator, and get the probability that a set of historical industrial welding images of various products are predicted to be real data .

[0055] C2: The probability of predicting a set of generated images as real data ,calculate and The total cross entropy loss , update the discriminator parameters through the optimization algorithm .

[0056] It should be noted that, in the specific embodiment, the calculation shown and The total cross entropy loss , which are specifically: ,in represents the welding images of each set of historical industrial products input to the discriminator, Represents the mathematical expectation of each set of historical industrial product welding images input to the discriminator.

[0057] It should be noted that, in a specific embodiment, Represents the discriminator's prediction of the real data, for each real sample input , the goal of the discriminator is to make Close to 1, it means that the probability of judging this sample as a true sample is the highest, and the loss is ,when The closer it is to 1, the smaller the loss.

[0058] Represents the discriminator's prediction of the generated data. For each generated sample , the goal of the discriminator is to make Close to 0, it means that the probability of judging this sample as a false sample is the highest, and the loss is ,when The closer it is to 0, the smaller the loss.

[0059] It should be noted that, in a specific embodiment, the parameters of the discriminator are updated by the optimization algorithm. The specific method is: C3.1: Through the back propagation algorithm formula: , the discriminator loss is calculated relative to the discriminator parameters Gradient ,in represents the loss of the discriminator For the discriminator parameters The identifier for finding the partial derivative of .

[0060] C3.2: Optimize via stochastic gradient descent algorithm: , get the updated discriminator parameters .

[0061] It should be noted that, in a specific embodiment, the learning rate of the discriminator is manually set by a technician based on the stochastic gradient descent optimization algorithm and the actual working effect of the discriminator, and is stored in a database.

[0062] The present invention adopts a generative adversarial network model, in which the generator and the discriminator compete with each other through adversarial training. In this process, the generator and the discriminator are continuously optimized. Ultimately, the generator can generate increasingly realistic welding defect images that meet the conditional vectors, while the discriminator can more accurately distinguish between actual welding images and generated defect images.

[0063] The welding defect detection module uses the welding parameters and defect types of the target industrial product as the condition vector of the generative adversarial network model to generate a defect image of the target industrial product, which is compared with the actual welding image of the target industrial product to obtain the defect detection result of the target industrial product.

[0064] In a specific embodiment of the present invention, the defect image of the target industrial product is generated, and the specific analysis method is as follows: pores, cracks, incomplete penetration, and excessive welding are sequentially taken as defect types, and the welding parameters of the target industrial product are combined to form four sets of condition vectors. ,in , Indicates the number of each group of conditional vectors.

[0065] It should be noted that, in a specific embodiment, the specific method of forming the four sets of condition vectors is: for example, pores, cracks, incomplete penetration, and excessive welding are respectively recorded as , the temperature during the welding process of the target industrial product is recorded as The voltage during welding is recorded as and the current during welding is recorded as .

[0066] The welding parameters and defect types of the target industrial products are combined into four sets of condition vectors, which are:

[0067] , ,

[0068] , .

[0069] The four sets of conditional vectors Input into the generator in sequence to obtain four sets of defect images of target industrial products .

[0070] In a specific embodiment of the present invention, the defect detection result of the target industrial product is obtained, and the specific analysis method is as follows: F1: the actual welding image of the target industrial product is obtained by an industrial camera, which is recorded as .

[0071] F2: Four groups of defect images of target industrial products are sequentially and actual welding images of target industrial products Input to the discriminator.

[0072] F3: Determine the actual welding image of the target industrial product Are there four sets of defective images of target industrial products? If the defect features exist, it is determined that the target industrial product has defects, and the defect type of the target industrial product is extracted. If not, it is determined that the target industrial product does not have defects.

[0073] F4: Output the defect detection results of the target industrial product.

[0074] It should be noted that, in a specific embodiment, the defect detection result of the target industrial product includes: whether the target industrial product has welding defects, and if so, extracting the defect type of the target industrial product, that is, one of pores, cracks, incomplete penetration, and excessive welding, recorded as ,in , A number indicating each defect type.

[0075] The present invention generates a defect image of the target industrial product according to the welding parameters and defect types of the target industrial product, and then compares it with the actual welding image of the target industrial product. This can realize the detection of welding defects of the target industrial product under different welding conditions, avoiding the risk of certain defect types being unable to be detected which is difficult to achieve in the existing technology. It not only ensures the high efficiency of welding defect detection of the target industrial product, but also meets the scientific nature of welding defect detection of the target industrial product.

[0076] The welding defect response module is based on the defect results of the target industrial product. If the target industrial product has defects, it will reconstruct the defect repair image of the target industrial product based on the welding parameters and defect types of the target industrial product through the generative adversarial network model. This image will serve as a reference standard for the evaluation of the welding defect repair of the target industrial product and evaluate the defect repair effect of the target industrial product.

[0077] In a specific embodiment of the present invention, the defect repair image of the target industrial product is reconstructed by the inverse method. The specific analysis method is as follows: based on the welding parameters of the target industrial product, the defect type is set to a null value to form an inverse condition vector , input into the generator to obtain the defect repair image of the target industrial product .

[0078] In a specific embodiment of the present invention, the specific analysis method for evaluating the defect repair effect of the target industrial product is as follows: S1: using an industrial camera to capture the actual welding image of the repaired target industrial product .

[0079] S2: Repair the defect image of the target industrial product and actual welding images of the target industrial product after repair Input to the discriminator.

[0080] S3: Obtain the output eigenvalue of the discriminator. If the output eigenvalue is 1, the repair effect of the target industrial product is determined to be qualified. If the output eigenvalue is 0, the repair effect of the target industrial product is determined to be unqualified.

[0081] The present invention takes into account various welding parameters of the target industrial product, generates a repair defect image of the target industrial product according to a generator, and then compares it with the actual welding image of the repaired target industrial product, providing a reliable basis for evaluating the repair effect of the target industrial product, thereby providing a complete automated system for welding defect detection of the target industrial product.

[0082] The database is used to store welding images and welding parameters of various historical industrial products, store characteristic image slices of various defect types, store the values ​​and learning rates of the initial parameters of the generator, and store the values ​​and learning rates of the initial parameters of the discriminator.

[0083] The above contents are merely examples and explanations of the concept of the present invention. Those skilled in the art may make various modifications or additions to the described specific embodiments or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, they should all fall within the scope of protection of the present invention.

Claims

1. An automated industrial defect detection system based on generative adversarial networks, characterized by: The system comprises: The data acquisition and preprocessing module is used to extract the welding images and welding parameters of various historical industrial products from the database, perform standardization processing on the welding images of various historical industrial products, and mark the welding images of various historical industrial products with various defect types; The model setting and training module uses the generative adversarial network model to set the generator and discriminator. Based on the pre-processed welding images and welding parameters of various historical industrial products, the generative adversarial network model is trained to optimize the parameters of the generator and discriminator. The welding defect detection module uses the welding parameters and defect types of the target industrial product as the condition vector of the generative adversarial network model to generate a defect image of the target industrial product. The image is compared with the actual welding image of the target industrial product to obtain the defect detection result of the target industrial product. The welding defect response module is based on the defect results of the target industrial product. If the target industrial product has defects, it will reconstruct the defect repair image of the target industrial product based on the welding parameters and defect type of the target industrial product through the generative adversarial network model. This image serves as a reference standard for evaluating the welding defect repair of the target industrial product and evaluates the defect repair effect of the target industrial product. The defect repair image of the target industrial product is reconstructed by the reverse process, and the specific analysis method is as follows: Based on the welding parameters of the target industrial product, the defect type is set to a null value to form an inverse condition vector , input into the generator to obtain the defect repair image of the target industrial product ; The specific analysis method for evaluating the defect repair effect of the target industrial product is as follows: S1: Use an industrial camera to capture the actual welding image of the target industrial product after repair ; S2: Repair the defect image of the target industrial product and actual welding images of the target industrial product after repair Input into the discriminator; S3: Obtain the output feature value of the discriminator. If the output feature value is 1, it is determined that the repair effect of the target industrial product is qualified. If the output feature value is 0, it is determined that the repair effect of the target industrial product is unqualified. The generator and discriminator are specifically: The generator is used to generate a defect image similar to the actual defect type of the industrial product and a defect repair image similar to the defect-free industrial product based on various welding parameters and defect types as condition vectors; Set the initial parameters of the generator to , the learning rate of the generator is set to ,in represents the values ​​of the generator's initial parameters extracted from the database, The value representing the learning rate of the generator extracted from the database; The discriminator is used to determine whether the defect image and defect repair image of the industrial product generated by the generator are realistic, and to determine whether the industrial product has defects and extract the defect type of the defective industrial product; Set the initial parameters of the discriminator to , the learning rate of the discriminator is set to ,in represents the value of the initial parameters of the discriminator extracted from the database, The value representing the learning rate of the discriminator extracted from the database.

2. The industrial defect detection automation system based on generative adversarial network according to claim 1 is characterized in that: The welding parameters of the industrial products are as follows: The temperature during the welding process is collected by the temperature sensor, the voltage during the welding process is collected by the voltage sensor, and the current during the welding process is collected by the current sensor; Based on the collected temperature, voltage and current during the welding process, the welding parameters of various industrial products are constructed.

3. The industrial defect detection automation system based on generative adversarial network according to claim 1 is characterized in that: The specific analysis method for the standardized processing of welding images of various historical industrial products is as follows: A1: Scale the welding images of historical industrial products to Fixed size; A2: Use a Gaussian kernel to smooth the welding images of various industrial products and remove high-frequency noise.

4. The industrial defect detection automation system based on generative adversarial network according to claim 3 is characterized in that: The specific analysis method for marking each defect type on the welding images of various historical industrial products is as follows: By extracting characteristic image slices of each defect type from the database, and using image recognition technology, sequentially comparing the standardized welding images of each historical industrial product with the characteristic image slices of each defect type, the defect areas in the standardized welding images of each historical industrial product are obtained, and the defect types corresponding to the defect areas in the standardized welding images of each historical industrial product are extracted, and the welding images of each historical industrial product are labeled with each defect type; The defect types include: pores, cracks, incomplete welding, and excessive welding.

5. The industrial defect detection automation system based on generative adversarial network according to claim 4 is characterized in that: The training of the generative adversarial network model and the optimization of the parameters of the generator and the discriminator are performed. The specific analysis method is as follows: Combine the welding parameters of each parameter type and each product of the historical industry to form a set of condition vectors , input into the generator to obtain each group of generated images; Each group of generated images and the annotated historical industrial welding images of various products are input into the discriminator respectively to obtain the results of judging whether each group of generated images is a real image; Based on the results of judging whether each group of generated images is a real image, optimization measures are implemented for the parameters of the generator and discriminator; The optimization steps of the generator include: B1: Recording a set of welding parameters and defect types as condition vectors , a set of generated images is obtained through the generator, denoted as ; B2: The output of the discriminator is used to obtain the probability that a set of generated images are predicted to be real data. ; B3: Calculate the loss of the generator by minimizing the loss function of the generator , through the optimization algorithm, update the parameters of the generator ; The optimization steps of the discriminator are: C1: a set of historical industrial product welding images are recorded as , input the discriminator, and get the probability that a set of historical industrial welding images of various products are predicted to be real data ; C2: The probability of predicting a set of generated images as real data ,calculate and The total cross entropy loss , update the discriminator parameters through the optimization algorithm .

6. The industrial defect detection automation system based on generative adversarial network according to claim 5 is characterized in that: The specific analysis method for generating the defect image of the target industrial product is as follows: Porosity, cracks, incomplete penetration, and excessive welding are taken as defect types in turn, and combined with the welding parameters of the target industrial products to form four sets of condition vectors ,in , Indicates the number of each group of conditional vectors; The four sets of conditional vectors Input into the generator in sequence to obtain four sets of defect images of target industrial products .

7. The industrial defect detection automation system based on generative adversarial network according to claim 6 is characterized in that: The specific analysis method for obtaining the defect detection results of the target industrial product is as follows: F1: The actual welding image of the target industrial product is obtained through the industrial camera, which is recorded as ; F2: Four groups of defect images of target industrial products are sequentially and actual welding images of target industrial products Input into the discriminator; F3: Determine the actual welding image of the target industrial product Are there four sets of defective images of target industrial products? If the defect features exist, it is determined that the target industrial product has defects, and the defect type of the target industrial product is extracted. If not, it is determined that the target industrial product does not have defects; F4: Output the defect detection results of the target industrial product.

Citation Information

Patent Citations

  • Image restoration method and system based on conditional generative adversarial network

    CN110599411A

  • Defect detection data generation and detection method and system based on generative adversarial network

    CN115937627A