CN-122023278-A - Welding seam X-ray image detection method and system based on federal learning
Abstract
The invention provides a federal learning-based welding line X-ray image detection method and a federal learning-based welding line X-ray image detection system, which construct a cascade model consisting of three stages of image enhancement, defect screening and defect positioning. The method comprises the steps of carrying out defect characteristic reinforcement on an original welding line X-ray image by utilizing an image reinforcement network, improving a subsequent recognition effect, screening images containing defects by utilizing a classification network, and finally realizing defect recognition and positioning by utilizing a target detection network. The whole training process is carried out under the federal learning framework, so that the multi-source data is ensured to participate in modeling on the premise of not sharing original information, and the data privacy is effectively protected. The method can realize high-efficiency and automatic detection of the weld defects, remarkably improve the detection efficiency and accuracy, and has good engineering application value.
Inventors
- WAN SONGBO
- LIU XIAOJIA
- DAI ZHENG
- LIU HUAN
- CAO LIJUN
- Wei Chuo
- WANG FEI
Assignees
- 上海航天精密机械研究所
Dates
- Publication Date
- 20260512
- Application Date
- 20260105
Claims (10)
- 1. The welding seam X-ray image detection method based on federal learning is characterized by comprising the following steps of: step S1, constructing a three-stage welding seam X-ray image detection cascade model, wherein the three-stage welding seam X-ray image detection cascade model comprises an image enhancement network module, an image classification network module and an image detection network module; step S2, under the federal learning framework, training the three-stage welding line X-ray image detection cascade model by using the collected welding line X-ray images; And step S3, completing weld defect identification and positioning by using the trained three-stage weld X-ray image detection cascade model.
- 2. The federally learning based weld X-ray image inspection method according to claim 1, wherein the step S2 comprises the sub-steps of: training an image enhancement network module in the first stage by using the acquired welding line X-ray image to obtain an enhanced welding line X-ray image; Step 2.2, training an image classification network module of the second stage by using the enhanced welding seam X-ray image to obtain an enhanced welding seam X-ray defect-containing image; And 2.3, training the image detection network module of the third stage by using the enhanced weld X-ray defect-containing image to obtain a trained three-stage weld X-ray image detection cascade model.
- 3. The federally learned seam X-ray image inspection method according to claim 2, wherein the first stage image enhancement network module improves upon the generation of the countermeasure network GAN, including a generator and a arbiter; The generator is improved based on U-net, and comprises the steps of introducing residual connection in the last layer, activating a function by LeakyReLU, normalizing by InstanceNorm and upsampling by bilinear interpolation; The discriminator is improved based on PatchGAN and comprises a four-stage convolution module and a tail end discriminating layer, and finally outputs a 16 multiplied by 16 discriminating matrix for judging the difference of the local area of the enhanced image and the true labeling image output by the generator.
- 4. The federal learning-based weld X-ray image inspection method according to claim 2, wherein the image classification network module of the second stage is modified based on ResNet to perform a two-classification on the weld X-ray image and screen out the image of the weld with defects.
- 5. The federally-learned seam X-ray image inspection method according to claim 2, wherein the third stage image inspection network module is modified based on fast R-CNN, uses ResNet as a backbone network, and incorporates a feature pyramid network for identifying and localizing seam X-ray image defects to complete inspection of the seam X-ray image.
- 6. The federally learning based weld X-ray image inspection method according to claim 2, wherein the step S2.1 comprises the sub-steps of: Step S2.1.1, the server randomly initializes the image enhancement network module, and the global initialization parameters are as follows ; Step S2.1.2N clients collect N sets of local weld X-ray image data that are mutually exclusive (i=1,2,...,n); Step 2.1.3 client i receives the global parameters At the local data set Performing iterative training, and obtaining optimized local parameters through a random gradient descent algorithm Uploading the data to a server; wherein t represents the t-th federal polymerization process; Step 2.1.4, the server aggregates the local parameters of N clients and performs weighted average, and the global parameters are updated as follows: Wherein the method comprises the steps of For the number of samples of client i, The total number of samples for N clients; step 2.1.5 step 2.1.3 to step 2.1.4 are circularly executed until the client i receives the global parameters After that, the local model training of the client converges or reaches the preset performance; and 2.1.6, inputting the X-ray image of the welding seam to be detected into the trained image enhancement network module, and outputting the X-ray image of the welding seam with the enhancement defect characteristic.
- 7. The federally learning based weld X-ray image inspection method according to claim 2, wherein the step 2.1.3 comprises: Iterative optimization of the image enhancement network module through an alternate training strategy; when the alternate training strategy comprises a fixed generator, calculating an antagonism loss function of the discriminator network; When the discriminators are fixed, a total loss function of the generator network is calculated, wherein the total loss function comprises a pixel level L1 loss term, an anti-loss term and a structural similarity SSIM constraint term.
- 8. The federally learning based weld X-ray image inspection method according to claim 1, wherein the step S3 comprises: if the output result of the image classification network module in the second stage is 0, judging that the X-ray image of the weld joint to be detected is defect-free, and ending the detection; If the output result of the image classification network module in the second stage is 1, the enhanced weld X-ray defect-containing image is input into the image detection network module in the third stage, the defect identification and positioning result of the weld X-ray image to be detected is output, and the detection is finished.
- 9. A federal learning-based weld X-ray image inspection system, comprising: The module M1 is used for constructing a three-stage welding seam X-ray image detection cascade model, wherein the three-stage welding seam X-ray image detection cascade model comprises an image enhancement network module, an image classification network module and an image detection network module; the module M2 is used for training the three-stage welding line X-ray image detection cascade model by using the collected welding line X-ray images under the federal learning framework; And a module M3, namely completing weld defect identification and positioning by using the trained three-stage weld X-ray image detection cascade model.
- 10. The federally-learning-based weld X-ray image inspection system according to claim 9, wherein the module M2 comprises the following sub-modules: Training the image enhancement network module in the first stage by using the acquired welding line X-ray image to obtain an enhanced welding line X-ray image; training the image classification network module of the second stage by using the enhanced welding seam X-ray image to obtain an enhanced welding seam X-ray defect-containing image; And 2.3, training the image detection network module of the third stage by using the enhanced weld X-ray defect-containing image to obtain a trained three-stage weld X-ray image detection cascade model.
Description
Welding seam X-ray image detection method and system based on federal learning Technical Field The invention relates to the field of computer-aided industrial image processing, in particular to a federal learning-based welding line X-ray image detection method and system. Background The quality of the welding seam is a key factor for guaranteeing the structural safety and the performance stability of industrial products, and the detection of the welding seam defect has important significance in the production process of manufacturing industry. Currently, industrial weld quality detection still mainly depends on manual visual inspection and empirical judgment. The method has the problems of low detection efficiency, strong subjectivity and the like, the detection result is easily influenced by the technical level and the working state of the inspector, and the stability and the consistency are insufficient. Particularly in a high-speed continuous production scene, defects are difficult to find in time by manual detection, and often defective products are not identified until entering a downstream process, so that resource waste and rework cost are increased. Along with the development of industrial manufacture to high precision and high reliability, the traditional manual detection means have difficulty in meeting the production requirements of high efficiency and intelligence. In recent years, image recognition technology based on deep learning gradually introduces the field of weld defect detection, and certain progress is made in terms of automation and intelligence. However, this type of approach still faces many challenges in practical applications. The lack of data resources is a main factor restricting the improvement of the performance of the model. On one hand, qualified welding seams in industrial sites account for the vast majority, the number of real defect samples is limited, the distribution is sparse, the positive and negative samples of training data are unbalanced, the model is easy to be subjected to overfitting on few defect types and difficult to comprehensively identify diversified defect types, and on the other hand, due to factors such as data safety, equipment isomerism and process confidentiality among manufacturing enterprises, data among different factories, production lines or workshops are difficult to share, a data island phenomenon is formed, and the generalization capability of the model in cross-scene deployment is limited. In addition, the existing deep learning method mostly adopts a universal data enhancement means, such as image rotation, cutting or noise addition, and cannot effectively simulate complex interference factors such as metal splashing, strong reflection, mechanical vibration and the like existing in the welding process, so that the robustness of the model in a complex industrial environment is insufficient. In summary, the prior art still has obvious defects in terms of accuracy, universality and practicability of weld defect detection, and a more adaptive technical system is needed to be constructed so as to improve the stability and popularization capability of the model under complex working conditions and promote the intelligent development of weld quality detection. Patent document CN116051954a discloses an image detection model training method, an image detection device, an electronic device and a storage medium, the method firstly obtains an energy image of a target object and a pseudo-color image of the target object, the energy image is input into a trained energy image detection model to obtain an energy image detection result, the pseudo-color image is input into a pseudo-color image detection model to be trained to obtain a pseudo-color image detection result, and the pseudo-color image detection model to be trained is trained based on the energy image detection result and the pseudo-color image detection result. The technical means adopted by the method are different from those of the invention. Disclosure of Invention Aiming at the defects in the prior art, the invention aims to provide a welding line X-ray image detection method and system based on federal learning. The invention provides a welding seam X-ray image detection method based on federal learning, which comprises the following steps: step S1, constructing a three-stage welding seam X-ray image detection cascade model, wherein the three-stage welding seam X-ray image detection cascade model comprises an image enhancement network module, an image classification network module and an image detection network module; step S2, under the federal learning framework, training the three-stage welding line X-ray image detection cascade model by using the collected welding line X-ray images; And step S3, completing weld defect identification and positioning by using the trained three-stage weld X-ray image detection cascade model. Preferably, the step S2 includes the following substeps: trainin