Electric arc additive manufacturing defect identification method and system based on incremental learning
By adopting incremental learning method in arc additive manufacturing, combining the Resnet18 model and EWC regularization module, the problem that the defect recognition model cannot be applied due to changes in printing conditions is solved, and the defect recognition effect with high accuracy and adaptability is achieved.
Patent Information
- Application Number
- CN202510116893.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-30
AI Technical Summary
In arc additive manufacturing, due to changes in conditions such as printing materials and printing layers, the melt pool image corresponding to component defects is greatly different from the original data set, resulting in the defect recognition model being unable to be applied.
Using an incremental learning method, multiple sets of printing parameters are designed, melt pool defect images under different conditions are collected, and the Resnet18 model is used for preliminary training, the best model parameters are loaded, some layers are frozen and EWC regularization module is added, and the incremental training is used for small batch data sets to obtain the final defect identification parameters.
It significantly improves the accuracy and adaptability of arc additive manufacturing defect recognition, and can adapt to changes in manufacturing conditions without retraining the entire model, maintain high recognition accuracy, and avoid catastrophic forgetting problems.
Smart Images

Figure CN120070963A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the defect detection technology of arc additive manufacturing, and particularly relates to a method and system for identifying arc additive manufacturing defects based on incremental learning. Background Art
[0002] Arc additive manufacturing is a metal additive manufacturing technology that has developed rapidly in recent years. It uses an arc to heat metal wire and stacks layers on a specific working platform to create a three-dimensional physical model. It has the advantages of low manufacturing cost, high manufacturing freedom and forming efficiency, and is particularly suitable for the integrated forming of large-sized and medium-low structural complexity metal components. It is widely used in fields such as aerospace, automotive manufacturing, and medical devices. However, due to the complex process and material properties, various defects exist in arc additive manufacturing components. Common defects include pores, cracks, inclusions, and lack of fusion. The existence of these defects reduces the performance of the components and greatly affects the popularization and application of arc additive manufacturing in various fields. Therefore, in the process of arc additive manufacturing, the detection of component defects is an extremely important link.
[0003] Image classification technology is currently relatively mature in the application of arc additive manufacturing defect detection. By extracting the molten pool image during the arc manufacturing process and inputting it into a trained image classification model, the defect category can be judged. This method can achieve real-time detection of arc additive manufacturing defects, but it still has certain limitations. Due to differences in printing materials, printing layers, and other conditions, there will be deviations in the molten pool images corresponding to component defects. Therefore, changing the printing conditions of arc additive manufacturing during the printing process will directly affect the accuracy of the model. If a large amount of data is re-collected and the model is trained again, it will consume material costs and time costs. Moreover, re-training the model with new data will also affect the recognition accuracy of the model for old data. Summary of the Invention
[0004] Object of the Invention: The object of the present invention is to provide a method and system for identifying arc additive manufacturing defects based on incremental learning, so as to improve the problem that due to changes in conditions such as printing materials and printing layers, the molten pool images corresponding to component defects are quite different from the original data set, resulting in the inapplicability of the defect recognition model.
[0005] Technical Solution: A method for identifying arc additive manufacturing defects based on incremental learning according to the present invention includes:
[0006] Design multiple groups of printing parameters during the printing process of arc additive manufacturing components to artificially create defects in arc additive manufacturing components; collect molten pool defect images under each group of printing parameters during the printing process of arc additive manufacturing components and make them into a molten pool defect picture data set and divide it;
[0007] Call the basic Resnet18 model, and use the dataset of molten pool defect images to preliminarily train the basic Resnet18 model and save the best model parameters;
[0008] Change the arc additive manufacturing conditions, collect different molten pool images under the same defect category, make them into a small batch dataset and divide it;
[0009] Call the basic Resnet18 model and load the best model parameters, freeze some layers of the basic Resnet18 model and add the EWC regularization module to obtain the Resnet18 model, and use the small batch dataset to train the Resnet18 model, so as to build an incremental learning system and obtain the final defect recognition parameters of the Resnet18 model;
[0010] Call the basic Resnet18 model and load the final defect recognition parameters, and use the dataset of molten pool defect images and the small batch dataset to verify the performance of the basic Resnet18 model loaded with the final defect recognition parameters respectively.
[0011] Further, freeze all layers of the basic Resnet18 model except the layer4 layer, and add the EWC regularization module to obtain the Resnet18 model.
[0012] Further, the EWC regularization module imposes stronger constraints on important parameters by introducing an additional loss term.
[0013] Further, during the printing process of the arc additive manufacturing component, collect the molten pool defect images under each set of printing parameters and make them into a dataset of molten pool defect images, including:
[0014] During the printing process of the arc additive manufacturing component, record the video of the change in the molten pool morphology of the arc additive manufacturing component through an industrial camera;
[0015] Convert the recorded video of the change in the molten pool morphology of the arc additive manufacturing component into molten pool defect images frame by frame, and package and classify the molten pool defect images into three categories: discontinuous, porosity, and normal according to the defect type of the arc additive manufacturing component corresponding to the video;
[0016] Perform image enhancement operations on the classified molten pool defect images to expand the dataset and obtain the dataset of molten pool defect images;
[0017] Divide the dataset of molten pool defect images into a training set, a validation set, and a test set according to a certain proportion.
[0018] Further, the industrial camera is clamped on the robotic arm of the welding robot through a fixture.
[0019] Furthermore, randomly flip, rotate, crop, adjust the brightness, and perform Gaussian blur on the classified molten pool defect images for random image enhancement operations.
[0020] Furthermore, the defects of the arc additive manufacturing components include discontinuous defects and surface porosity defects.
[0021] Furthermore, changing the arc additive manufacturing conditions means changing the material type used for printing or the number of printing layers.
[0022] Furthermore, the small batch dataset includes three categories: discontinuous, porosity, and normal. The small batch dataset is divided into a training set and a validation set according to a ratio.
[0023] Based on the same inventive concept, an arc additive manufacturing defect recognition system based on incremental learning of the present invention includes:
[0024] A molten pool defect image dataset acquisition module, which is used to design multiple groups of printing parameters during the printing process of arc additive manufacturing components to artificially create defects in arc additive manufacturing components; collect molten pool defect images under each group of printing parameters during the printing process of arc additive manufacturing components and make them into a molten pool defect image dataset and divide it;
[0025] A model preliminary training module, which is used to call the basic Resnet18 model, and use the molten pool defect image dataset to preliminarily train the basic Resnet18 model and save the best model parameters;
[0026] A small batch dataset acquisition module, which is used to change the arc additive manufacturing conditions, collect differential molten pool images under the same defect category and make them into a small batch dataset and divide it;
[0027] A model training module, which is used to call the basic Resnet18 model and load the best model parameters, freeze some layers of the basic Resnet18 model and add an EWC regularization module to obtain a Resnet18 model, and use the small batch dataset to train the Resnet18 model, so as to build an incremental learning system and obtain the final defect recognition parameters of the Resnet18 model;
[0028] A model performance verification module, which is used to call the basic Resnet18 model and load the final defect recognition parameters, and verify the performance of the basic Resnet18 model loaded with the final defect recognition parameters by using the molten pool defect image dataset and the small batch dataset respectively.
[0029] Beneficial effects: Compared with the prior art, the remarkable technical effects of the present invention are as follows:
[0030] The present invention adds incremental learning to the model for arc additive manufacturing defect recognition. This approach combining incremental learning and deep learning technologies significantly improves the accuracy and adaptability of arc additive manufacturing defect recognition. First, this method utilizes the powerful feature extraction ability of the ResNet18 model and combines it with an incremental learning framework, enabling it to adapt to changes in manufacturing conditions, such as changes in material type and number of printing layers, without retraining the entire model. This adaptability allows the model to quickly adjust and maintain a high recognition accuracy when facing a new manufacturing environment. Meanwhile, the added EWC regularization module effectively avoids the problem of catastrophic forgetting, enabling the model to maintain a balance in the recognition of new and old data.
[0031] The present invention has significant economic benefits and quality improvement effects in practical applications. By accurately identifying and promptly repairing defects, the quality and reliability of products are improved, and rework and waste caused by defects are reduced, thereby lowering production costs.
[0032] The data collection and processing process of the present invention is efficient. After changing the manufacturing conditions, only a small batch of datasets need to be collected for incremental training, instead of re-collecting a large amount of data for full-scale training. This greatly reduces the workload of data collection and processing, lowers costs, and enables the training and verification of the model to be completed in a relatively short time, further improving production efficiency. Description of the Drawings
[0033] Figure 1 It is a schematic flow chart of a method for arc additive manufacturing defect recognition based on incremental learning disclosed in an embodiment of the present invention;
[0034] Figure 2 It is a schematic structural diagram of an incremental learning system disclosed in an embodiment of the present invention;
[0035] Figure 3 It is a schematic diagram for result verification of a method for arc additive manufacturing defect recognition based on incremental learning disclosed in an embodiment of the present invention;
[0036] Figure 4 It is a schematic structural diagram of a system for arc additive manufacturing defect recognition based on incremental learning disclosed in an embodiment of the present invention. Detailed Embodiments
[0037] The technical solutions of the present invention will be introduced in detail below in combination with the detailed embodiments and the accompanying drawings of the specification.
[0038] As Figure 1 shown, a method for arc additive manufacturing defect recognition based on incremental learning of the present invention includes the following steps:
[0039] S1. Design multiple sets of printing parameters during the printing process of arc additive manufacturing components to artificially create defects in arc additive manufacturing components; during the printing process of arc additive manufacturing components, collect the molten pool defect images under each set of printing parameters, create a molten pool defect picture dataset, and divide it.
[0040] In this embodiment, according to the experience in the previous arc additive manufacturing experiment process, three different sets of printing parameters are designed to artificially create defect types of arc additive manufacturing components; among them, the defects of arc additive manufacturing components include discontinuous defects and surface pore defects. Specifically as follows: Design normal printing parameters to manufacture normal printed components; keep other parameters unchanged, design a higher printing speed to manufacture discontinuous defects; keep other parameters unchanged, design a lower protective gas flow rate to manufacture surface pore defects. The specific printing parameters are as follows in the table:
[0041]
[0042] In step S1, during the printing process of arc additive manufacturing components, collect the molten pool defect images under each set of printing parameters and create a molten pool defect picture dataset, which specifically includes the following steps:
[0043] S1.1. During the printing process of arc additive manufacturing components, record the video of the molten pool morphology change of the arc additive manufacturing components through an industrial camera; among them, the industrial camera is clamped on the robotic arm of the welding robot through a special fixture, and the specific direction is the end of the moving direction of the welding torch.
[0044] S1.2. Convert the recorded video of the molten pool morphology change of the arc additive manufacturing components into molten pool defect pictures frame by frame, and package and classify the molten pool defect pictures into three categories of discontinuous, pore, and normal according to the defect type of the arc additive manufacturing components corresponding to the video.
[0045] S1.3. Perform random image enhancement operations such as flipping, rotating, cropping, adjusting brightness, and Gaussian blurring on the classified molten pool defect pictures up, down, left, and right to expand the dataset and obtain the molten pool defect picture dataset.
[0046] S1.4. Divide the molten pool defect picture dataset into a training set, a validation set, and a test set according to the ratio of 8:1:1.
[0047] In this embodiment, experimental data is obtained through single-pass and single-layer printing of arc additive manufacturing. Considering the influence of the dataset quantity on the final model accuracy, random image enhancement operations such as flipping, rotating, cropping, adjusting brightness, and Gaussian blurring are performed on the picture data. The total number of finally obtained pictures is 2312, which is divided into a training set, a validation set, and a test set according to the ratio of 8:1:1.
[0048] S2. Call the basic Resnet18 model, and use the dataset of molten pool defect images to preliminarily train the basic Resnet18 model and save the best model parameters.
[0049] In this embodiment, the pre-processed Resnet18 model is downloaded and called from the Internet using code. The cross-entropy loss function is adopted, and at the same time, the stochastic gradient descent optimizer is set, with a learning rate of 0.001 and a momentum of 0.9. The model is trained using the training set for 100 epochs, and after being verified by the validation set and tested by the test set, the parameters corresponding to the highest accuracy of the model are saved as a ".pth" file for subsequent calls.
[0050] S3. Change the arc additive manufacturing conditions, collect the differential molten pool images under the same defect category, make them into a small batch dataset and divide it.
[0051] Among them, changing the arc additive manufacturing conditions means changing the type of material used for printing or the number of printing layers.
[0052] The small batch dataset is composed of the molten pool images obtained after changing the arc additive manufacturing conditions, and is also divided into three categories: discontinuous, porosity, and normal. However, no image enhancement processing is performed, and it is divided into a training set and a validation set according to a ratio of 8:2.
[0053] In this embodiment, the arc additive manufacturing is adjusted from single-pass single-layer printing to single-pass multi-layer printing. Due to reasons such as heat accumulation, there are certain differences in the molten pool images during multi-layer printing and single-layer printing. Therefore, the molten pool images during multi-layer printing are collected to make a small batch dataset. A total of 579 images are collected, and they are also packaged separately according to the corresponding defect types, and divided into a training set and a validation set according to a ratio of 8:2.
[0054] S4. Call the basic Resnet18 model and load the best model parameters, freeze some layers of the basic Resnet18 model and add an EWC regularization module to obtain the Resnet18 model. Use the small batch dataset to train the Resnet18 model, thereby building an incremental learning system and obtaining the final defect recognition parameters of the Resnet18 model.
[0055] As Figure 2As shown, in this embodiment, the basic Resnet18 model is called by code and the best model parameters saved in step S2 are loaded. The basic Resnet18 model includes an initial layer, four residual blocks, a global average pooling layer, and a fully connected layer. After freezing all layers of the model, the fourth residual block layer4 is unfrozen. The first few layers of ResNet18 are usually used to extract basic features of images, and these features have a certain generality in different image classification tasks. By freezing these layers, the feature extraction ability learned by the pre-trained model on a large-scale dataset can be retained. At the same time, freezing most layers can reduce the computational complexity and memory requirements of the model, thus accelerating the training speed. Considering that a small batch dataset is used for training, unfreezing only one layer can avoid overfitting.
[0056] In this embodiment, the cross-entropy loss function and the stochastic gradient descent optimizer are still used. The learning rate is set to 0.001, the momentum is 0.9, the number of training epochs is adjusted to 10, and an EWC regularization module is added at the same time. EWC regularization, that is, "Elastic Weight Consolidation", is a regularization technique widely used in the field of deep learning. Its purpose is to effectively prevent the occurrence of catastrophic forgetting during the model training process. Catastrophic forgetting refers to the situation where the model cannot retain the knowledge of the previous task when learning a new task, resulting in a significant decline in its performance. EWC regularization aims to impose stronger constraints on important parameters by introducing an additional loss term to maintain their stability, so that the important knowledge already learned can be reasonably retained when learning a new task. This method first determines the important network weights by calculating the influence degree of the parameters on the loss of the previous task, and then imposes corresponding penalties on the parameter updates according to the significance of these weights during subsequent training, ensuring that when optimizing the performance of the new task, the interference and impact on the existing knowledge are minimized. By using this module, the accuracy of the model for the old and new datasets of the defects in the wire arc additive manufacturing components is effectively balanced.
[0057] S5. Call the basic Resnet18 model and load the final defect recognition parameters, and use the molten pool defect picture dataset (old dataset) and the small batch dataset (new dataset) to verify the performance of the basic Resnet18 model loaded with the final defect recognition parameters respectively.
[0058] When testing the performance of the basic Resnet18 model finally loaded with the defect recognition parameters, the old dataset is the data collected for the first time, and the new dataset is the data collected after changing the wire arc additive manufacturing conditions. The performance test is based on the precision Precision as an index.
[0059] In this embodiment, the old dataset used to verify the model performance is 2,312 image data collected for the first time, and the old dataset is 579 image data of a small batch dataset. The model test results of the present invention are compared with the results of other models, and the specific results are shown in the following table:
[0060]
[0061] It can be seen from the comparison that although the method provided by the present invention has an impact on the recognition accuracy of old data, the accuracy decrease is less than that of other models, and the accuracy is maintained above 95%. At the same time, for new data, the accuracy can be increased to 98.63%, second only to transfer learning. The specific results are as Figure 3 shown. Therefore, the method for arc additive manufacturing defect recognition based on incremental learning provided by the present invention can, on the premise of maintaining the accurate recognition of the defect categories of the original molten pool images, realize the judgment of the defect types of the molten pool images with differences, and well balance the accuracies of the two, so that both can be maintained above 95%.
[0062] The present invention can realize the recognition of the same kind of defects under different conditions of arc additive manufacturing, and improve the problem that due to the change of conditions such as printing materials and printing layers, the molten pool images corresponding to the component defects are quite different from the original dataset, resulting in the inapplicability of the defect recognition model.
[0063] Embodiment 2
[0064] As Figure 4 shown, an arc additive manufacturing defect recognition system based on incremental learning of the present invention includes:
[0065] A molten pool defect picture dataset acquisition module, which is used to design multiple groups of printing parameters during the printing process of arc additive manufacturing components to artificially create defects of arc additive manufacturing components; collect molten pool defect images under each group of printing parameters during the printing process of arc additive manufacturing components and make them into a molten pool defect picture dataset and divide it;
[0066] A model preliminary training module, which is used to call the basic Resnet18 model and use the molten pool defect picture dataset to preliminarily train the basic Resnet18 model and save the best model parameters;
[0067] A small batch dataset acquisition module, which is used to change the arc additive manufacturing conditions, collect different molten pool images under the same defect category and make them into a small batch dataset and divide it;
[0068] A model training module, which is used to call the basic Resnet18 model and load the best model parameters, freeze some layers of the basic Resnet18 model and add an EWC regularization module to obtain the Resnet18 model, and use a mini-batch dataset to train the Resnet18 model, so as to build an incremental learning system and obtain the final defect recognition parameters of the Resnet18 model;
[0069] A model performance verification module, which is used to call the basic Resnet18 model and load the final defect recognition parameters, and verify the performance of the basic Resnet18 model loaded with the final defect recognition parameters by using the molten pool defect image dataset and the mini-batch dataset respectively.
[0070] In an optional embodiment, the arc additive manufacturing defect recognition method based on incremental learning includes: a) designing multiple sets of printing parameters during the printing process of arc additive manufacturing components; collecting molten pool defect images under each set of printing parameters and making them into a molten pool defect image dataset and dividing it; b) calling the basic Resnet18 model, and using the molten pool defect image dataset to preliminarily train the basic Resnet18 model and save the best model parameters; c) changing the arc additive manufacturing conditions, collecting different molten pool images under the same defect category and making them into a mini-batch dataset and dividing it; d) building an incremental learning system, calling the basic Resnet18 model and loading the best model parameters; freezing some layers of the basic Resnet18 model and adding an EWC regularization module; using the mini-batch dataset to train the Resnet18 model to obtain the final defect recognition parameters of the Resnet18 model; e) calling the basic Resnet18 model and loading the final defect recognition parameters, and verifying the performance of the basic Resnet18 model loaded with the final defect recognition parameters by using the molten pool defect image dataset and the mini-batch dataset respectively.
Claims
1. A method for arc additive manufacturing defect recognition based on incremental learning, characterized in that: include: Design multiple sets of printing parameters in the arc additive manufacturing component printing process to artificially create arc additive manufacturing component defects; During the arc additive manufacturing component printing process, the molten pool defect images under each set of printing parameters are collected and made into a molten pool defect image data set and divided; Call the basic Resnet18 model, use the melt pool defect image dataset to perform preliminary training on the basic Resnet18 model and save the optimal model parameters; By changing the arc additive manufacturing conditions, the differential melt pool images under the same defect category are collected and made into small batch data sets and divided; Call the basic Resnet18 model and load the optimal model parameters, freeze some layers of the basic Resnet18 model and add the EWC regularization module to obtain the Resnet18 model, train the Resnet18 model using a small batch data set, and thus build an incremental learning system to obtain the final defect recognition parameters of the Resnet18 model; The basic Resnet18 model is called and the final defect recognition parameters are loaded. The performance of the basic Resnet18 model loaded with the final defect recognition parameters is verified using the melt pool defect image dataset and the small batch dataset.
2. The arc additive manufacturing defect recognition method based on incremental learning according to claim 1, characterized in that: Freeze all layers except layer4 in the basic Resnet18 model, and add the EWC regularization module to obtain the Resnet18 model.
3. The arc additive manufacturing defect identification method based on incremental learning according to claim 2 is characterized in that: The EWC regularization module imposes stronger constraints on important parameters by introducing an additional loss term.
4. The arc additive manufacturing defect identification method based on incremental learning according to claim 1, characterized in that: During the arc additive manufacturing component printing process, the molten pool defect images under each set of printing parameters are collected and made into a molten pool defect image dataset, including: During the arc additive manufacturing component printing process, an industrial camera is used to record the video of the molten pool morphology changes of the arc additive manufacturing component; The video of the molten pool morphology change of the arc additive manufacturing component is converted into molten pool defect images frame by frame, and the molten pool defect images are packaged and classified into three categories: discontinuity, pores, and normal according to the defect type of the arc additive manufacturing component corresponding to the video; Perform image enhancement operations on the classified molten pool defect images to expand the data set and obtain a molten pool defect image data set; The melt pool defect image dataset is divided into training set, validation set and test set in proportion.
5. The arc additive manufacturing defect recognition method based on incremental learning according to claim 4, characterized in that: The industrial camera is clamped on the mechanical arm of the welding robot through a clamp.
6. The arc additive manufacturing defect identification method based on incremental learning according to claim 4, characterized in that: The classified melt pool defect images are randomly flipped up and down, rotated, cropped, adjusted in brightness, and Gaussian blurred for random image enhancement.
7. The arc additive manufacturing defect identification method based on incremental learning according to claim 1, characterized in that: The arc additive manufacturing component defects include discontinuity defects and surface pore defects.
8. The arc additive manufacturing defect recognition method based on incremental learning according to claim 1, characterized in that: Changing the arc additive manufacturing conditions is changing the type of material used for printing or changing the number of printed layers.
9. The arc additive manufacturing defect identification method based on incremental learning according to claim 1, characterized in that: The mini-batch dataset includes three categories: discontinuous, pore, and normal. The mini-batch dataset is divided into a training set and a validation set in proportion.
10. An arc additive manufacturing defect recognition system based on incremental learning, characterized in that: include: A module for acquiring a molten pool defect image data set is used to design multiple sets of printing parameters during the arc additive manufacturing component printing process, so as to artificially create defects in the arc additive manufacturing components; During the arc additive manufacturing component printing process, the molten pool defect images under each set of printing parameters are collected and made into a molten pool defect image data set and divided; The model preliminary training module is used to call the basic Resnet18 model, use the melt pool defect image dataset to perform preliminary training on the basic Resnet18 model and save the optimal model parameters; Small batch data set acquisition module, used to change the arc additive manufacturing conditions, collect differential molten pool images under the same defect category and make them into small batch data sets and divide them; The model training module is used to call the basic Resnet18 model and load the optimal model parameters, freeze some layers of the basic Resnet18 model and add the EWC regularization module to obtain the Resnet18 model, and use a small batch data set to train the Resnet18 model, thereby building an incremental learning system and obtaining the final defect recognition parameters of the Resnet18 model; The model performance verification module is used to call the basic Resnet18 model and load the final defect recognition parameters. The performance of the basic Resnet18 model loaded with the final defect recognition parameters is verified using the melt pool defect image dataset and the small batch dataset.