Molten pool stability monitoring method, device, electronic equipment and storage medium

Through the preset melt pool stability judgment paradigm and YOLOv8 model, combined with the melt pool image and labeled images, the melt pool image segmentation model is constructed and trained, and the subjectivity and limitations of the melt pool stability judgment in the existing technology are solved. Real-time and accurate stability monitoring of additive manufacturing melt pools is achieved, and judgment efficiency is improved.

CN118941557BActive Publication Date: 2025-01-03FOSHAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411408541.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-03
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The existing method of judging molten pool stability has subjectivity and limitations, lacks a unified basis for judgment, and it is difficult to accurately monitor the stability of molten pool in the additive manufacturing process in real time.

Method used

Through the preset melt pool stability judgment paradigm and YOLOv8 model, combined with the melt pool image and labeled images, the melt pool image segmentation model is constructed and trained, and the real-time melt pool image is obtained periodically, and the melt pool segmentation image is extracted and calculated, and the melting is monitored in real time is monitored in real time. Pool stability value.

Benefits of technology

Real-time and accurate stability monitoring of additive manufacturing melt pools is achieved, judgment efficiency is improved, subjectivity and limitations are reduced, and a unified judgment basis is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941557B_ABST
    Figure CN118941557B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of monitoring molten pool stability, and discloses a molten pool stability monitoring method, device, electronic device and storage medium. The method comprises: obtaining a molten pool image and a corresponding molten pool annotated image of an additively manufactured molten pool, constructing a molten pool image segmentation model according to the molten pool image and the corresponding molten pool annotated image, periodically obtaining a real-time molten pool image of the additively manufactured molten pool, and inputting the real-time molten pool image into the molten pool image segmentation model, extracting a molten pool segmentation image containing only the additively manufactured molten pool, calculating a molten pool stability value of the additively manufactured molten pool according to a molten pool stability judgment paradigm and the molten pool segmentation image, so as to monitor the molten pool stability of the additively manufactured molten pool in real time; calculating the molten pool stability value of the additively manufactured molten pool through the molten pool stability judgment paradigm and the molten pool segmentation image, so as to monitor the stability of the additively manufactured molten pool, thereby improving the judgment efficiency of the stability of the additively manufactured molten pool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of monitoring molten pool stability, and in particular, to a molten pool stability monitoring method, device, electronic device and storage medium. Background Art

[0002] With the continuous innovation and progress of science and technology, additive manufacturing technology, as an emerging manufacturing method, is being widely used in various fields. Researchers have conducted a number of experiments and method studies in the field of additive manufacturing to improve process quality and production efficiency. Since the additive manufacturing process is more complex than traditional manufacturing methods, coupled with its process complexity and material diversity, ensuring the quality and performance of the product requires more stringent control and testing methods, which makes the quality assessment of additive manufacturing a huge challenge.

[0003] In the additive manufacturing process, the geometric characteristics and morphology of the molten pool are important indicators for evaluating process stability and the quality of formed parts. At present, there is no unified basis and conclusion for judging the stability of the molten pool. The existing technology usually only observes and analyzes the geometric characteristics and morphology of the molten pool through experiments to judge the stability of the molten pool. However, this method has certain subjectivity and limitations.

[0004] Therefore, in order to solve the technical problems that the existing molten pool stability judgment method has certain subjectivity and limitations and there is no unified judgment basis, a molten pool stability monitoring method, device, electronic equipment and storage medium are urgently needed. Summary of the invention

[0005] The purpose of the present application is to provide a melt pool stability monitoring method, device, electronic device and storage medium. Through a preset melt pool stability judgment paradigm, combined with a melt pool segmentation image that only contains an additive manufacturing melt pool, the melt pool stability value of the additive manufacturing melt pool is calculated to monitor the stability of the additive manufacturing melt pool, solve the problems of certain subjectivity and limitations in existing melt pool stability judgment methods and the lack of a unified judgment basis, and can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability.

[0006] In a first aspect, the present application provides a method for monitoring molten pool stability, comprising:

[0007] Obtain a melt pool image of an additive manufacturing melt pool and a corresponding melt pool annotation image;

[0008] A melt pool image segmentation model is constructed according to the melt pool image and the corresponding melt pool annotated image;

[0009] Periodically acquiring a real-time molten pool image of the additive manufacturing molten pool, and inputting the real-time molten pool image into the molten pool image segmentation model to extract a molten pool segmentation image that only includes the additive manufacturing molten pool;

[0010] According to a preset melt pool stability judgment paradigm and the melt pool segmentation image, a melt pool stability value of the additive manufacturing melt pool is calculated to monitor the melt pool stability of the additive manufacturing melt pool in real time.

[0011] The melt pool stability monitoring method provided in the present application can realize the monitoring of the stability of the additive manufacturing melt pool. Through the preset melt pool stability judgment paradigm, combined with the melt pool segmentation image containing only the additive manufacturing melt pool, the melt pool stability value of the additive manufacturing melt pool is calculated to monitor the stability of the additive manufacturing melt pool, so as to solve the problems that the existing melt pool stability judgment methods have certain subjectivity and limitations and there is no unified judgment basis. It can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability.

[0012] Optionally, obtaining a melt pool image of an additive manufacturing melt pool and a corresponding melt pool annotated image includes:

[0013] photographing the additive manufacturing molten pool to obtain an image of the molten pool;

[0014] The contour position of the additive manufacturing molten pool is marked in the molten pool image to obtain the molten pool marked image.

[0015] Optionally, a melt pool image segmentation model is constructed according to the melt pool image and the corresponding melt pool annotated image, including:

[0016] Construct a YOLOv8 model corresponding to the molten pool image to obtain a preliminary molten pool image segmentation model;

[0017] According to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image, the preliminary melt pool image segmentation model is trained to obtain a trained preliminary melt pool image segmentation model;

[0018] Based on the melt pool images that are not used for training and the corresponding melt pool annotated images in the melt pool images, the trained preliminary melt pool image segmentation model is verified to obtain the melt pool image segmentation model.

[0019] The melt pool stability monitoring method provided in the present application can monitor the stability of the additive manufacturing melt pool. Through the melt pool image and the corresponding melt pool annotated image, a YOLOv8 model is constructed and trained to obtain a melt pool image segmentation model. The melt pool position of the additive manufacturing melt pool can be quickly identified, and image features outside the melt pool position can be extracted to obtain an image containing only the melt pool, which is beneficial to improving the efficiency of judging the stability of the additive manufacturing melt pool.

[0020] Optionally, training the preliminary melt pool image segmentation model according to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image to obtain the trained preliminary melt pool image segmentation model includes:

[0021] Inputting the molten pool image used for training in the molten pool image into the preliminary molten pool image segmentation model to obtain a corresponding image output; the image output is an image containing only the additive manufacturing molten pool;

[0022] determining a training error according to a melt pool annotated image corresponding to a melt pool image used for training in the melt pool image and the corresponding image output;

[0023] Based on the training error, the parameters of the preliminary melt pool image segmentation model are adjusted to obtain the optimal parameters, and the preliminary melt pool image segmentation model is optimized using the optimal parameters to obtain the trained preliminary melt pool image segmentation model.

[0024] Optionally, before inputting the molten pool image used for training in the molten pool image into the preliminary molten pool image segmentation model to obtain the corresponding image output, the method further includes:

[0025] Initialize the parameters of the preliminary melt pool image segmentation model.

[0026] Optionally, according to a preset melt pool stability judgment paradigm and the melt pool segmentation image, a melt pool stability value of the additive manufacturing melt pool is calculated to monitor the melt pool stability of the additive manufacturing melt pool in real time, including the steps of cyclic execution:

[0027] After acquiring the first frame of the molten pool segmentation image, each time the molten pool segmentation image is acquired, the molten pool stability value of the additive manufacturing molten pool is calculated by combining the molten pool segmentation image acquired this time with the molten pool segmentation image acquired last time through the preset molten pool stability judgment paradigm;

[0028] Based on the magnitude relationship between the molten pool stability value and a preset molten pool stability threshold, the molten pool stability of the additive manufacturing molten pool is monitored in real time.

[0029] The melt pool stability monitoring method provided in the present application can monitor the stability of the additive manufacturing melt pool. Through a preset melt pool stability judgment paradigm, the melt pool segmentation image obtained this time and the melt pool segmentation image obtained last time are used to calculate the melt pool stability value of the additive manufacturing melt pool. The melt pool stability value is compared with the preset melt pool stability threshold, and the melt pool stability of the additive manufacturing melt pool is monitored in real time, which is beneficial to improving the judgment efficiency of the additive manufacturing melt pool stability.

[0030] Optionally, based on the magnitude relationship between the molten pool stability value and a preset molten pool stability threshold, real-time monitoring of the molten pool stability of the additive manufacturing molten pool includes:

[0031] Determining whether the molten pool stability value is greater than or equal to a preset molten pool stability threshold;

[0032] If so, it is determined that the additive manufacturing molten pool is in a stable state;

[0033] If not, it is determined that the additive manufacturing molten pool is in an unstable state.

[0034] In a second aspect, the present application provides a molten pool stability monitoring device, comprising:

[0035] An acquisition module, used to acquire a molten pool image of an additive manufacturing molten pool and a corresponding molten pool annotated image;

[0036] A construction module, used to construct a melt pool image segmentation model according to the melt pool image and the corresponding melt pool annotated image;

[0037] An extraction module, used for periodically acquiring a real-time molten pool image of the additive manufacturing molten pool, and inputting the real-time molten pool image into the molten pool image segmentation model to extract a molten pool segmentation image containing only the additive manufacturing molten pool;

[0038] A monitoring module is used to calculate the melt pool stability value of the additive manufacturing melt pool according to a preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time.

[0039] The melt pool stability monitoring device calculates the melt pool stability value of the additive manufacturing melt pool through a preset melt pool stability judgment paradigm combined with a melt pool segmentation image that only contains the additive manufacturing melt pool, so as to monitor the stability of the additive manufacturing melt pool, solve the problems that the existing melt pool stability judgment method has certain subjectivity and limitations and there is no unified judgment basis, and can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability.

[0040] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, it runs the steps in the molten pool stability monitoring method described above.

[0041] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the molten pool stability monitoring method described above are executed.

[0042] Beneficial effects: The melt pool stability monitoring method, device, electronic device and storage medium provided in the present application, through a preset melt pool stability judgment paradigm, combined with a melt pool segmentation image containing only an additive manufacturing melt pool, calculates the melt pool stability value of the additive manufacturing melt pool to monitor the stability of the additive manufacturing melt pool, and solves the problems that the existing melt pool stability judgment methods have certain subjectivity and limitations and there is no unified judgment basis. It can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flow chart of a method for monitoring molten pool stability provided in an embodiment of the present application.

[0044] Figure 2 A schematic diagram of the structure of a molten pool stability monitoring device provided in an embodiment of the present application.

[0045] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0046] Explanation of reference numerals: 1. Acquisition module; 2. Construction module; 3. Extraction module; 4. Monitoring module; 301. Processor; 302. Memory; 303. Communication bus. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0048] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0049] Please refer to Figure 1 , Figure 1 A molten pool stability monitoring method in some embodiments of the present application is used to monitor the stability of an additive manufacturing molten pool, comprising the steps of:

[0050] Step S101, obtaining a molten pool image of an additive manufacturing molten pool and a corresponding molten pool annotated image;

[0051] Step S102, constructing a melt pool image segmentation model according to the melt pool image and the corresponding melt pool annotated image;

[0052] Step S103, periodically acquiring a real-time molten pool image of the additive manufacturing molten pool, and inputting the real-time molten pool image into a molten pool image segmentation model to extract a molten pool segmentation image that only includes the additive manufacturing molten pool;

[0053] Step S104, calculating the melt pool stability value of the additive manufacturing melt pool according to the preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time.

[0054] The melt pool stability monitoring method calculates the melt pool stability value of the additive manufacturing melt pool through a preset melt pool stability judgment paradigm combined with a melt pool segmentation image that only contains the additive manufacturing melt pool, so as to monitor the stability of the additive manufacturing melt pool, solve the problems that the existing melt pool stability judgment method has certain subjectivity and limitations and there is no unified judgment basis, and can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability.

[0055] Specifically, in step S101, a molten pool image of an additive manufacturing molten pool and a corresponding molten pool annotated image are obtained, including:

[0056] Photographing the additive manufacturing molten pool to obtain a molten pool image;

[0057] The contour position of the additive manufacturing molten pool is marked from the molten pool image to obtain a molten pool marked image.

[0058] In step S101, an existing shooting technology (such as a camera or a video camera) is used to shoot the additive manufacturing melt pool from multiple angles with the additive manufacturing melt pool as the center to obtain a melt pool image of the additive manufacturing melt pool, and a contour position of the additive manufacturing melt pool is marked in the melt pool image through a manual marking method or a mechanical marking method (such as using labelme software) to obtain a melt pool marked image; thereby, a large number of melt pool images and melt pool marked images are obtained for training the model, so that the trained model can identify the melt pool position to extract the melt pool features.

[0059] Specifically, in step S102, a melt pool image segmentation model is constructed based on the melt pool image and the corresponding melt pool annotated image, including:

[0060] Build the YOLOv8 model corresponding to the melt pool image and obtain the preliminary melt pool image segmentation model;

[0061] According to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image, a preliminary melt pool image segmentation model is trained to obtain a trained preliminary melt pool image segmentation model;

[0062] Based on the melt pool images that are not used for training and the corresponding melt pool annotated images in the melt pool images, the trained preliminary melt pool image segmentation model is verified to obtain the melt pool image segmentation model.

[0063] In step S102, a YOLOv8 model is constructed using the melt pool image to obtain a preliminary melt pool image segmentation model. By inputting the melt pool image into the preliminary melt pool image segmentation model, irrelevant features such as the background or additive manufacturing equipment in the melt pool image can be eliminated (i.e., the location of the additive manufacturing melt pool is segmented from the melt pool image), and the additive manufacturing melt pool is used as the target feature for extraction to obtain an image containing only the additive manufacturing melt pool. The YOLOv8 model is a prior art and will not be described in detail herein.

[0064] Specifically, in step S102, a preliminary melt pool image segmentation model is trained according to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image to obtain a trained preliminary melt pool image segmentation model, including:

[0065] Inputting the molten pool image used for training in the molten pool image into the preliminary molten pool image segmentation model to obtain a corresponding image output; the image output is an image containing only the additive manufacturing molten pool;

[0066] determining a training error according to a melt pool annotation image corresponding to the melt pool image used for training in the melt pool image and a corresponding image output;

[0067] Based on the training error, the parameters of the preliminary melt pool image segmentation model are adjusted to obtain the optimal parameters, and the preliminary melt pool image segmentation model is optimized using the optimal parameters to obtain the trained preliminary melt pool image segmentation model.

[0068] In step S102, the melt pool annotated image corresponding to the melt pool image used for training is compared with the image output obtained by inputting the melt pool image into the preliminary melt pool image segmentation model to obtain a training error, such as the size of the melt pool contour position marked in the melt pool annotated image and the corresponding melt pool position in the image output (for example, the size of the corresponding melt pool position in the image output is inconsistent with the melt pool contour position marked in the melt pool annotated image), or the deviation degree between the melt pool contour position marked in the image output and the corresponding melt pool position in the melt pool annotated image (for example, the melt pool position in the image output is not the same as the melt pool contour position marked in the melt pool annotated image), etc. The training error is used to adjust the parameters of the preliminary melt pool image segmentation model. If the training error is the size of the melt pool contour position marked in the melt pool annotated image and the corresponding melt pool position in the image output, the corresponding model parameters are modified to make the melt pool position in the image output more accurate, so as to obtain the optimal parameters. The preliminary melt pool image segmentation model is optimized through the optimal parameters to obtain the trained preliminary melt pool image segmentation model.

[0069] In step S102, the melt pool image that is not used for training in the melt pool image is input into the trained preliminary melt pool image segmentation model to obtain a corresponding image output, and the image output is used as verification data. The verification data and the melt pool annotation image corresponding to the melt pool image that is not used for training are compared to determine whether the error is within an acceptable range (the acceptable error range is generally 0 to 3%, which can be modified according to actual needs), verify the accuracy of the trained preliminary melt pool image segmentation model, and obtain the melt pool image segmentation model.

[0070] Specifically, in step S102, before the molten pool image used for training in the molten pool image is input into the preliminary molten pool image segmentation model to obtain the corresponding image output, the method further includes:

[0071] Initialize the parameters of the preliminary melt pool image segmentation model.

[0072] In step S102, before inputting data to train the model, the parameters of the preliminary melt pool image segmentation model are initialized to ensure that the model is in normal use.

[0073] Specifically, in step S103, the additive manufacturing molten pool is photographed at a fixed position directly above the additive manufacturing molten pool with a preset shooting time as a cycle, and a real-time molten pool image of the additive manufacturing molten pool is periodically obtained, and the real-time molten pool image is input into the molten pool image segmentation model, and after calculation by the molten pool image segmentation model, a molten pool segmentation image containing only the additive manufacturing molten pool is extracted. Among them, the preset shooting time can be set according to actual needs.

[0074] Specifically, in step S104, according to a preset melt pool stability judgment paradigm and a melt pool segmentation image, a melt pool stability value of an additive manufacturing melt pool is calculated to monitor the melt pool stability of the additive manufacturing melt pool in real time, including the steps of cyclic execution:

[0075] After the first frame of the melt pool segmentation image is obtained, each time the melt pool segmentation image is obtained, the melt pool stability value of the additive manufacturing melt pool is calculated by combining the melt pool segmentation image obtained this time with the melt pool segmentation image obtained last time through a preset melt pool stability judgment paradigm;

[0076] Based on the relationship between the melt pool stability value and the preset melt pool stability threshold, the melt pool stability of the additive manufacturing melt pool is monitored in real time.

[0077] In step S104, each time a melt pool segmentation image is obtained (except for the first time the melt pool segmentation image is obtained), a preset melt pool stability judgment paradigm is used to analyze and calculate the melt pool segmentation image obtained this time and the melt pool segmentation image obtained last time, and the melt pool stability value of the additive manufacturing melt pool is calculated.

[0078] Among them, the preset molten pool stability judgment paradigm is specifically:

[0079] ;

[0080] in, is the melt pool stability value; is a piecewise function; For similarity.

[0081] Piecewise Function Specifically:

[0082] ;

[0083] in, is the area ratio function; Indicates other situations;

[0084] The area ratio function is specifically:

[0085] ;

[0086] in, is the absolute value function; S 1 is the number of pixels in the melt pool feature area (i.e., the area containing only the additive manufacturing melt pool) corresponding to the melt pool segmentation image acquired last time; S 2 is the number of pixels in the melt pool feature area corresponding to the melt pool segmentation image obtained this time; , , They are the first adjustment parameter, the second adjustment parameter and the third adjustment parameter respectively. , , Set it according to actual needs.

[0087] Among them, the first adjustment parameter For balancing S 1 and S 2 weights to prevent the calculation process from 2 The influence on the denominator in the area ratio function is too large. In the area ratio function, the value of the denominator is related to the first adjustment parameter The value of is proportional to When the number of pixels in the two melt pool feature areas (the melt pool feature area corresponding to the last melt pool segmentation image and the melt pool feature area corresponding to the current melt pool segmentation image) differs greatly, the first adjustment parameter It can reduce the variation of area ratio and make the area ratio function more stable; the second adjustment parameter To introduce logarithmic terms The weight of , in order to enhance the sensitivity to the change of the number of pixels in the larger melt pool feature area, when the second adjustment parameter When increasing, several items The weight of will increase, so that the change of the number of pixels in the larger molten pool feature area will have a more obvious effect on the area ratio, thereby increasing the sensitivity of the area ratio function to the change of the number of pixels, so that the calculation of the area ratio function can better reflect the actual situation; the third adjustment parameter is a very small positive number used to prevent division by zero errors, to ensure that the denominator of the area ratio function is always greater than zero, and to set a very small third adjustment parameter It can prevent the denominator from being zero, thus avoiding calculation errors. Generally, the third adjustment parameter The value of is very small and will not have a significant impact on the calculation results.

[0088] The perceptual hash algorithm is used to obtain the hash values ​​of two frames of melt pool segmentation images (the melt pool segmentation image obtained this time and the melt pool segmentation image obtained last time), and then the similarity S is obtained by calculating the Hamming distance d between the hash values. The calculation formula of the similarity S is as follows:

[0089]

[0090] Among them, S is the similarity, and the value range of similarity S is 0 to 1.0; d is the Hamming distance; , are the fourth adjustment parameter and the fifth adjustment parameter respectively; , Set it according to actual needs.

[0091] Among them, the fourth adjustment parameter Controls the smoothness of the similarity S calculation by adjusting This part affects the change curve of similarity S. When the Hamming distance d is greater than or equal to the preset distance threshold, the curve corresponding to the similarity S changes faster. When the Hamming distance d is less than the preset distance threshold, the curve corresponding to the similarity S changes slower. On the contrary, when When , the similarity S of the two melt pool segmentation images will appear smaller when they are more similar, that is, when the value of the Hamming distance d is greater than or equal to the preset distance threshold, the curve corresponding to the similarity S changes slowly, and when the value of the Hamming distance d is less than the preset distance threshold, the curve corresponding to the similarity S changes quickly; when When , the curve corresponding to the similarity S is linear. The fifth adjustment parameter Added a penalty for when the Hamming distance d is greater than or equal to the preset distance threshold, which is adjusted by This part affects the calculation of similarity. When the value of the Hamming distance d is greater than or equal to the preset distance threshold, the value of the Hamming distance d will be much less than 1, thus imposing a penalty on the similarity value, making the similarity value lower. The larger the value, the heavier the penalty for the Hamming distance d, which can more finely distinguish the two frames of melt pool segmentation images with low similarity; when hour, The value of this part is 1, and the similarity calculation is not affected by the penalty.

[0092] In summary, the molten pool stability value of the additive manufacturing molten pool is calculated through the preset molten pool stability judgment paradigm.

[0093] Specifically, in step 104, based on the relationship between the melt pool stability value and the preset melt pool stability threshold, the melt pool stability of the additive manufacturing melt pool is monitored in real time, including:

[0094] Determine whether the molten pool stability value is greater than or equal to a preset molten pool stability threshold;

[0095] If so, it is determined that the AM melt pool is in a stable state;

[0096] If not, it is determined that the AM melt pool is in an unstable state.

[0097] In step 104, the melt pool stability of the additive manufacturing melt pool is determined by judging whether the melt pool stability value is greater than or equal to the preset melt pool stability threshold. When the melt pool stability value is greater than or equal to the preset melt pool stability threshold, the additive manufacturing melt pool is determined to be in a stable state. When the melt pool stability value is less than the preset melt pool stability threshold, the additive manufacturing melt pool is determined to be in an unstable state, and an alarm is issued. The preset melt pool stability threshold can be set according to actual needs, and is generally set to 0.8.

[0098] In some embodiments, the preset melt pool stability judgment paradigm can be set in the melt pool image segmentation model through existing technology to obtain a melt pool stability numerical calculation model (when constructing the melt pool stability numerical calculation model, the melt pool stability value calculated by the melt pool stability judgment paradigm needs to be obtained as training data and verification data). The melt pool stability numerical calculation model has the ability to calculate the melt pool stability value, and can calculate the melt pool stability value of the additive manufacturing melt pool based on two frames of real-time melt pool images obtained periodically. Then, by comparing the melt pool stability value with the preset melt pool stability threshold, the stability of the additive manufacturing melt pool is determined.

[0099] Alternatively, the preset melt pool stability judgment paradigm and the preset melt pool stability threshold can be set in the melt pool image segmentation model to obtain a melt pool stability judgment model (when constructing the melt pool stability judgment model, it is necessary to obtain the melt pool stability value calculated by the melt pool stability judgment paradigm and the corresponding melt pool stability judgment result as training data and verification data). The melt pool stability judgment model has the ability to judge the stability of the melt pool, and can judge whether the additive manufacturing melt pool is in a stable state based on two frames of real-time melt pool images obtained periodically.

[0100] As can be seen from the above, the melt pool stability monitoring method obtains the melt pool image and the corresponding melt pool annotated image of the additive manufacturing melt pool, constructs a melt pool image segmentation model according to the melt pool image and the corresponding melt pool annotated image, periodically obtains the real-time melt pool image of the additive manufacturing melt pool, and inputs the real-time melt pool image into the melt pool image segmentation model, extracts the melt pool segmentation image containing only the additive manufacturing melt pool, and calculates the melt pool stability value of the additive manufacturing melt pool according to the preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time; thus, through the preset melt pool stability judgment paradigm, combined with the melt pool segmentation image containing only the additive manufacturing melt pool, the melt pool stability value of the additive manufacturing melt pool is calculated to monitor the stability of the additive manufacturing melt pool, so as to solve the problem that the existing melt pool stability judgment method has certain subjectivity and limitations and there is no unified judgment basis, and can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability.

[0101] refer to Figure 2 The present application provides a molten pool stability monitoring device for monitoring the stability of an additive manufacturing molten pool, comprising:

[0102] An acquisition module 1 is used to acquire a molten pool image of an additive manufacturing molten pool and a corresponding molten pool annotation image;

[0103] Construction module 2, used to construct a melt pool image segmentation model according to the melt pool image and the corresponding melt pool annotated image;

[0104] An extraction module 3 is used to periodically obtain a real-time molten pool image of the additive manufacturing molten pool, and input the real-time molten pool image into a molten pool image segmentation model to extract a molten pool segmentation image that only contains the additive manufacturing molten pool;

[0105] The monitoring module 4 is used to calculate the melt pool stability value of the additive manufacturing melt pool according to the preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time.

[0106] The melt pool stability monitoring device calculates the melt pool stability value of the additive manufacturing melt pool through a preset melt pool stability judgment paradigm combined with a melt pool segmentation image that only contains the additive manufacturing melt pool, so as to monitor the stability of the additive manufacturing melt pool, solve the problems that the existing melt pool stability judgment method has certain subjectivity and limitations and there is no unified judgment basis, and can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability.

[0107] Specifically, when acquiring the molten pool image of the additive manufacturing molten pool and the corresponding molten pool annotated image, the acquisition module 1 executes:

[0108] Photographing the additive manufacturing molten pool to obtain a molten pool image;

[0109] The contour position of the additive manufacturing molten pool is marked from the molten pool image to obtain a molten pool marked image.

[0110] When the acquisition module 1 is executed, the existing shooting technology (such as a camera or a video camera) is used to shoot the additive manufacturing melt pool from multiple angles with the additive manufacturing melt pool as the center to obtain a melt pool image of the additive manufacturing melt pool, and the contour position of the additive manufacturing melt pool is marked in the melt pool image through a manual marking method or a mechanical marking method (such as using labelme software) to obtain a melt pool marked image; thereby, a large number of melt pool images and melt pool marked images are obtained for training the model, so that the trained model can identify the melt pool position to extract the melt pool features.

[0111] Specifically, when constructing the melt pool image segmentation model according to the melt pool image and the corresponding melt pool annotated image, the construction module 2 executes:

[0112] Build the YOLOv8 model corresponding to the melt pool image and obtain the preliminary melt pool image segmentation model;

[0113] According to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image, a preliminary melt pool image segmentation model is trained to obtain a trained preliminary melt pool image segmentation model;

[0114] Based on the melt pool images that are not used for training and the corresponding melt pool annotated images in the melt pool images, the trained preliminary melt pool image segmentation model is verified to obtain the melt pool image segmentation model.

[0115] When construction module 2 is executed, the melt pool image is used to construct a YOLOv8 model to obtain a preliminary melt pool image segmentation model. By inputting the melt pool image into the preliminary melt pool image segmentation model, irrelevant features such as the background or additive manufacturing equipment in the melt pool image can be eliminated (i.e., the location of the additive manufacturing melt pool is segmented from the melt pool image), and the additive manufacturing melt pool is used as the target feature for extraction to obtain an image containing only the additive manufacturing melt pool. Among them, the YOLOv8 model is a prior art and will not be described in detail here.

[0116] Specifically, when the construction module 2 trains the preliminary melt pool image segmentation model according to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image to obtain the trained preliminary melt pool image segmentation model, the following is executed:

[0117] Inputting the molten pool image used for training in the molten pool image into the preliminary molten pool image segmentation model to obtain a corresponding image output; the image output is an image containing only the additive manufacturing molten pool;

[0118] determining a training error according to a melt pool annotation image corresponding to the melt pool image used for training in the melt pool image and a corresponding image output;

[0119] Based on the training error, the parameters of the preliminary melt pool image segmentation model are adjusted to obtain the optimal parameters, and the preliminary melt pool image segmentation model is optimized using the optimal parameters to obtain the trained preliminary melt pool image segmentation model.

[0120] When construction module 2 is executed, the melt pool annotation image corresponding to the melt pool image used for training is compared with the image output obtained by inputting the melt pool image into the preliminary melt pool image segmentation model to obtain training errors, such as the size of the melt pool contour position marked in the melt pool annotation image and the corresponding melt pool position in the image output (for example, the size of the corresponding melt pool position in the image output is inconsistent with the melt pool contour position marked in the melt pool annotation image), or the deviation degree between the melt pool contour position marked in the image output and the corresponding melt pool position in the melt pool annotation image (for example, the melt pool position in the image output and the melt pool contour position marked in the melt pool annotation image are not the same position), etc. The training errors are used to adjust the parameters of the preliminary melt pool image segmentation model. If the training error is the size of the melt pool contour position marked in the melt pool annotation image and the corresponding melt pool position in the image output, the corresponding model parameters are modified to make the melt pool position in the image output more accurate, so as to obtain the optimal parameters. The preliminary melt pool image segmentation model is optimized through the optimal parameters to obtain the trained preliminary melt pool image segmentation model.

[0121] When construction module 2 is executed, the melt pool image that is not used for training in the melt pool image is input into the trained preliminary melt pool image segmentation model to obtain the corresponding image output, and the image output is used as verification data. The verification data and the melt pool annotated image corresponding to the melt pool image that is not used for training are compared to determine whether the error is within an acceptable range (the acceptable error range is generally 0 to 3%, which can be modified according to actual needs), verify the accuracy of the trained preliminary melt pool image segmentation model, and obtain the melt pool image segmentation model.

[0122] Specifically, before inputting the melt pool image used for training in the melt pool image into the preliminary melt pool image segmentation model to obtain the corresponding image output, the construction module 2 executes:

[0123] Initialize the parameters of the preliminary melt pool image segmentation model.

[0124] When constructing module 2, before inputting data to train the model, the parameters of the preliminary melt pool image segmentation model should be initialized to ensure that the model is in normal use.

[0125] Specifically, when the extraction module 3 is executed, the additive manufacturing molten pool is photographed at a fixed position directly above the additive manufacturing molten pool with a preset shooting time as a period, and the real-time molten pool image of the additive manufacturing molten pool is periodically obtained, and the real-time molten pool image is input into the molten pool image segmentation model. After calculation by the molten pool image segmentation model, a molten pool segmentation image containing only the additive manufacturing molten pool is extracted. Among them, the preset shooting time can be set according to actual needs.

[0126] Specifically, the monitoring module 4 calculates the melt pool stability value of the additive manufacturing melt pool according to the preset melt pool stability judgment paradigm and the melt pool segmentation image to monitor the melt pool stability of the additive manufacturing melt pool in real time, and executes cyclically:

[0127] After the first frame of the melt pool segmentation image is obtained, each time the melt pool segmentation image is obtained, the melt pool stability value of the additive manufacturing melt pool is calculated by combining the melt pool segmentation image obtained this time with the melt pool segmentation image obtained last time through a preset melt pool stability judgment paradigm;

[0128] Based on the relationship between the melt pool stability value and the preset melt pool stability threshold, the melt pool stability of the additive manufacturing melt pool is monitored in real time.

[0129] When the monitoring module 4 is executed, each time a melt pool segmentation image is obtained (except for the first time the melt pool segmentation image is obtained), a preset melt pool stability judgment paradigm is used to analyze and calculate the melt pool segmentation image obtained this time and the melt pool segmentation image obtained last time, and the melt pool stability value of the additive manufacturing melt pool is calculated.

[0130] Among them, the preset molten pool stability judgment paradigm is specifically:

[0131] ;

[0132] in, is the melt pool stability value; is a piecewise function; For similarity.

[0133] Piecewise Function Specifically:

[0134] ;

[0135] in, is the area ratio function; Indicates other situations;

[0136] The area ratio function is specifically:

[0137] ;

[0138] in, is the absolute value function; S 1 is the number of pixels in the melt pool feature area (i.e., the area containing only the additive manufacturing melt pool) corresponding to the melt pool segmentation image acquired last time; S 2 is the number of pixels in the melt pool feature area corresponding to the melt pool segmentation image obtained this time; , , They are the first adjustment parameter, the second adjustment parameter and the third adjustment parameter respectively. , , Set it according to actual needs.

[0139] Among them, the first adjustment parameter For balancing S 1 and S 2 weights to prevent the calculation process from 2 The influence on the denominator in the area ratio function is too large. In the area ratio function, the value of the denominator is related to the first adjustment parameter The value of is proportional to When the number of pixels in the two melt pool feature areas (the melt pool feature area corresponding to the last melt pool segmentation image and the melt pool feature area corresponding to the current melt pool segmentation image) differs greatly, the first adjustment parameter It can reduce the variation of area ratio and make the area ratio function more stable; the second adjustment parameter To introduce logarithmic terms The weight of , in order to enhance the sensitivity to the change of the number of pixels in the larger melt pool feature area, when the second adjustment parameter When increasing, several items The weight of will increase, so that the change of the number of pixels in the larger molten pool feature area will have a more obvious effect on the area ratio, thereby increasing the sensitivity of the area ratio function to the change of the number of pixels, so that the calculation of the area ratio function can better reflect the actual situation; the third adjustment parameter is a very small positive number used to prevent division by zero errors, to ensure that the denominator of the area ratio function is always greater than zero, and to set a very small third adjustment parameter It can prevent the denominator from being zero, thus avoiding calculation errors. Generally, the third adjustment parameter The value of is very small and will not have a significant impact on the calculation results.

[0140] The perceptual hash algorithm is used to obtain the hash values ​​of two frames of melt pool segmentation images (the melt pool segmentation image obtained this time and the melt pool segmentation image obtained last time), and then the similarity S is obtained by calculating the Hamming distance d between the hash values. The calculation formula of the similarity S is as follows:

[0141]

[0142] Among them, S is the similarity, and the value range of similarity S is 0 to 1.0; d is the Hamming distance; , are the fourth adjustment parameter and the fifth adjustment parameter respectively; , Set it according to actual needs.

[0143] Among them, the fourth adjustment parameter Controls the smoothness of the similarity S calculation by adjusting This part affects the change curve of similarity S. When the Hamming distance d is greater than or equal to the preset distance threshold, the curve corresponding to the similarity S changes faster. When the Hamming distance d is less than the preset distance threshold, the curve corresponding to the similarity S changes slower. On the contrary, when When , the similarity S of the two melt pool segmentation images will appear smaller when they are more similar, that is, when the value of the Hamming distance d is greater than or equal to the preset distance threshold, the curve corresponding to the similarity S changes slowly, and when the value of the Hamming distance d is less than the preset distance threshold, the curve corresponding to the similarity S changes quickly; when When , the curve corresponding to the similarity S is linear. The fifth adjustment parameter Added a penalty for when the Hamming distance d is greater than or equal to the preset distance threshold, which is adjusted by This part affects the calculation of similarity. When the value of the Hamming distance d is greater than or equal to the preset distance threshold, the value of the Hamming distance d will be much less than 1, thus imposing a penalty on the similarity value, making the similarity value lower. The larger the value, the heavier the penalty for the Hamming distance d, which can more finely distinguish the two frames of melt pool segmentation images with low similarity; when hour, The value of this part is 1, and the similarity calculation is not affected by the penalty.

[0144] In summary, the molten pool stability value of the additive manufacturing molten pool is calculated through the preset molten pool stability judgment paradigm.

[0145] Specifically, when monitoring the melt pool stability of the additive manufacturing melt pool in real time based on the magnitude relationship between the melt pool stability value and the preset melt pool stability threshold, the monitoring module 4 executes:

[0146] Determine whether the molten pool stability value is greater than or equal to a preset molten pool stability threshold;

[0147] If so, it is determined that the AM melt pool is in a stable state;

[0148] If not, it is determined that the AM melt pool is in an unstable state.

[0149] When the monitoring module 4 is executed, the melt pool stability of the additive manufacturing melt pool is determined by judging whether the melt pool stability value is greater than or equal to the preset melt pool stability threshold. When the melt pool stability value is greater than or equal to the preset melt pool stability threshold, it is determined that the additive manufacturing melt pool is in a stable state. When the melt pool stability value is less than the preset melt pool stability threshold, it is determined that the additive manufacturing melt pool is in an unstable state and an alarm is issued. Among them, the preset melt pool stability threshold can be set according to actual needs, and is generally set to 0.8.

[0150] In some embodiments, the preset melt pool stability judgment paradigm can be set in the melt pool image segmentation model through existing technology to obtain a melt pool stability numerical calculation model (when constructing the melt pool stability numerical calculation model, the melt pool stability value calculated by the melt pool stability judgment paradigm needs to be obtained as training data and verification data). The melt pool stability numerical calculation model has the ability to calculate the melt pool stability value, and can calculate the melt pool stability value of the additive manufacturing melt pool based on two frames of real-time melt pool images obtained periodically. Then, by comparing the melt pool stability value with the preset melt pool stability threshold, the stability of the additive manufacturing melt pool is determined.

[0151] Alternatively, the preset melt pool stability judgment paradigm and the preset melt pool stability threshold can be set in the melt pool image segmentation model to obtain a melt pool stability judgment model (when constructing the melt pool stability judgment model, it is necessary to obtain the melt pool stability value calculated by the melt pool stability judgment paradigm and the corresponding melt pool stability judgment result as training data and verification data). The melt pool stability judgment model has the ability to judge the stability of the melt pool, and can judge whether the additive manufacturing melt pool is in a stable state based on two frames of real-time melt pool images obtained periodically.

[0152] As can be seen from the above, the melt pool stability monitoring device obtains the melt pool image and the corresponding melt pool annotated image of the additive manufacturing melt pool, constructs a melt pool image segmentation model according to the melt pool image and the corresponding melt pool annotated image, periodically obtains the real-time melt pool image of the additive manufacturing melt pool, and inputs the real-time melt pool image into the melt pool image segmentation model, extracts the melt pool segmentation image containing only the additive manufacturing melt pool, and calculates the melt pool stability value of the additive manufacturing melt pool according to the preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time; thus, through the preset melt pool stability judgment paradigm, combined with the melt pool segmentation image containing only the additive manufacturing melt pool, the melt pool stability value of the additive manufacturing melt pool is calculated to monitor the stability of the additive manufacturing melt pool, so as to solve the problems that the existing melt pool stability judgment method has certain subjectivity and limitations and there is no unified judgment basis, and can monitor the additive manufacturing melt pool in real time and accurately and judge the stability of the additive manufacturing melt pool, thereby improving the judgment efficiency of the additive manufacturing melt pool stability.

[0153] Please refer to Figure 3 , Figure 3 The present application provides a structural schematic diagram of an electronic device provided in an embodiment of the present application. The present application provides an electronic device, including: a processor 301 and a memory 302. The processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not shown). The memory 302 stores a computer program executable by the processor 301. When the electronic device is running, the processor 301 executes the computer program to execute the melt pool stability monitoring method in any optional implementation of the above embodiment to achieve the following functions: obtaining a melt pool image and a corresponding melt pool annotation image of an additive manufacturing melt pool, constructing a melt pool image segmentation model based on the melt pool image and the corresponding melt pool annotation image, periodically obtaining a real-time melt pool image of the additive manufacturing melt pool, and inputting the real-time melt pool image into the melt pool image segmentation model, extracting a melt pool segmentation image containing only the additive manufacturing melt pool, and calculating the melt pool stability value of the additive manufacturing melt pool according to a preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time.

[0154] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the melt pool stability monitoring method in any optional implementation of the above-mentioned embodiment is executed to achieve the following functions: a melt pool image and a corresponding melt pool annotation image of an additive manufacturing melt pool are obtained, and a melt pool image segmentation model is constructed based on the melt pool image and the corresponding melt pool annotation image; a real-time melt pool image of the additive manufacturing melt pool is periodically obtained, and the real-time melt pool image is input into the melt pool image segmentation model to extract a melt pool segmentation image containing only the additive manufacturing melt pool; and a melt pool stability value of the additive manufacturing melt pool is calculated based on a preset melt pool stability judgment paradigm and the melt pool segmentation image to monitor the melt pool stability of the additive manufacturing melt pool in real time. Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0155] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0156] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0158] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0159] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for monitoring the stability of a molten pool, for monitoring the stability of an additive manufacturing molten pool, characterized in that: Includes steps: Obtain a melt pool image of an additive manufacturing melt pool and a corresponding melt pool annotation image; A melt pool image segmentation model is constructed according to the melt pool image and the corresponding melt pool annotated image; Periodically acquiring a real-time molten pool image of the additive manufacturing molten pool, and inputting the real-time molten pool image into the molten pool image segmentation model to extract a molten pool segmentation image that only includes the additive manufacturing molten pool; Calculating a melt pool stability value of the additive manufacturing melt pool according to a preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time; According to a preset melt pool stability judgment paradigm and the melt pool segmentation image, a melt pool stability value of the additive manufacturing melt pool is calculated to monitor the melt pool stability of the additive manufacturing melt pool in real time, including the steps of cyclic execution: After acquiring the first frame of the molten pool segmentation image, each time the molten pool segmentation image is acquired, the molten pool stability value of the additive manufacturing molten pool is calculated by combining the molten pool segmentation image acquired this time with the molten pool segmentation image acquired last time through the preset molten pool stability judgment paradigm; Based on the relationship between the molten pool stability value and a preset molten pool stability threshold, real-time monitoring of the molten pool stability of the additive manufacturing molten pool; The preset molten pool stability judgment paradigm is specifically: ; in, is the melt pool stability value; is a piecewise function; for similarity; Piecewise Function Specifically: ; in, is the area ratio function; Indicates other situations; The area ratio function is specifically: ; in, is an absolute value function; S1 is the number of pixels in the molten pool feature area corresponding to the molten pool segmentation image obtained last time; S2 is the number of pixels in the molten pool feature area corresponding to the molten pool segmentation image obtained this time; , , are respectively the first adjustment parameter, the second adjustment parameter and the third adjustment parameter; The perceptual hash algorithm is used to obtain the hash values ​​of the melt pool segmentation image obtained this time and the melt pool segmentation image obtained last time. The similarity S is obtained by calculating the Hamming distance d between the hash values. The calculation formula of the similarity S is as follows: ; Among them, the value range of similarity S is 0 to 1.0; d is the Hamming distance; , They are the fourth adjustment parameter and the fifth adjustment parameter respectively.

2. The method for monitoring molten pool stability according to claim 1, characterized in that: Obtain the melt pool image of the additive manufacturing melt pool and the corresponding melt pool annotation image, including: photographing the additive manufacturing molten pool to obtain an image of the molten pool; The contour position of the additive manufacturing molten pool is marked in the molten pool image to obtain the molten pool marked image.

3. The method for monitoring molten pool stability according to claim 1, characterized in that: According to the melt pool image and the corresponding melt pool annotated image, a melt pool image segmentation model is constructed, including: Construct a YOLOv8 model corresponding to the molten pool image to obtain a preliminary molten pool image segmentation model; According to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image, the preliminary melt pool image segmentation model is trained to obtain a trained preliminary melt pool image segmentation model; Based on the melt pool images that are not used for training and the corresponding melt pool annotated images in the melt pool images, the trained preliminary melt pool image segmentation model is verified to obtain the melt pool image segmentation model.

4. The method for monitoring molten pool stability according to claim 3, characterized in that: According to the melt pool image used for training and the corresponding melt pool annotated image in the melt pool image, the preliminary melt pool image segmentation model is trained to obtain the trained preliminary melt pool image segmentation model, including: Inputting the molten pool image used for training in the molten pool image into the preliminary molten pool image segmentation model to obtain a corresponding image output; the image output is an image containing only the additive manufacturing molten pool; determining a training error according to a melt pool annotated image corresponding to a melt pool image used for training in the melt pool image and the corresponding image output; Based on the training error, the parameters of the preliminary melt pool image segmentation model are adjusted to obtain the optimal parameters, and the preliminary melt pool image segmentation model is optimized using the optimal parameters to obtain the trained preliminary melt pool image segmentation model.

5. The method for monitoring molten pool stability according to claim 4, characterized in that: Before inputting the molten pool image used for training in the molten pool image into the preliminary molten pool image segmentation model to obtain the corresponding image output, the method further includes: Initialize the parameters of the preliminary melt pool image segmentation model.

6. The method for monitoring molten pool stability according to claim 1, characterized in that: Based on the relationship between the molten pool stability value and a preset molten pool stability threshold, real-time monitoring of the molten pool stability of the additive manufacturing molten pool includes: Determining whether the molten pool stability value is greater than or equal to a preset molten pool stability threshold; If so, it is determined that the additive manufacturing molten pool is in a stable state; If not, it is determined that the additive manufacturing molten pool is in an unstable state.

7. A molten pool stability monitoring device for monitoring the stability of an additive manufacturing molten pool, characterized in that: include: An acquisition module, used to acquire a molten pool image of an additive manufacturing molten pool and a corresponding molten pool annotated image; A construction module, used to construct a melt pool image segmentation model according to the melt pool image and the corresponding melt pool annotated image; An extraction module, used for periodically acquiring a real-time molten pool image of the additive manufacturing molten pool, and inputting the real-time molten pool image into the molten pool image segmentation model to extract a molten pool segmentation image containing only the additive manufacturing molten pool; A monitoring module, for calculating a melt pool stability value of the additive manufacturing melt pool according to a preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time; The monitoring module is used to calculate the melt pool stability value of the additive manufacturing melt pool according to the preset melt pool stability judgment paradigm and the melt pool segmentation image, so as to monitor the melt pool stability of the additive manufacturing melt pool in real time, including the steps of cyclic execution: After acquiring the first frame of the molten pool segmentation image, each time the molten pool segmentation image is acquired, the molten pool stability value of the additive manufacturing molten pool is calculated by combining the molten pool segmentation image acquired this time with the molten pool segmentation image acquired last time through the preset molten pool stability judgment paradigm; Based on the relationship between the molten pool stability value and a preset molten pool stability threshold, real-time monitoring of the molten pool stability of the additive manufacturing molten pool; The preset molten pool stability judgment paradigm is specifically: ; in, is the melt pool stability value; is a piecewise function; for similarity; Piecewise Function Specifically: ; in, is the area ratio function; Indicates other situations; The area ratio function is specifically: ; in, is an absolute value function; S1 is the number of pixels in the molten pool feature area corresponding to the molten pool segmentation image obtained last time; S2 is the number of pixels in the molten pool feature area corresponding to the molten pool segmentation image obtained this time; , , are respectively the first adjustment parameter, the second adjustment parameter and the third adjustment parameter; The perceptual hash algorithm is used to obtain the hash values ​​of the melt pool segmentation image obtained this time and the melt pool segmentation image obtained last time. The similarity S is obtained by calculating the Hamming distance d between the hash values. The calculation formula of the similarity S is as follows: ; Among them, the value range of similarity S is 0 to 1.0; d is the Hamming distance; , They are the fourth adjustment parameter and the fifth adjustment parameter respectively.

8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, it runs the steps in the molten pool stability monitoring method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the molten pool stability monitoring method according to any one of claims 1 to 6 are executed.