Part flatness prediction model training method and part flatness prediction method
By training a part flatness prediction model and utilizing generative adversarial networks, the problem of automatic prediction of warpage or dents in laser sintering additive manufacturing was solved. This enabled accurate prediction of warpage or dents before manufacturing, thereby improving the success rate of part manufacturing.
Patent Information
- Application Number
- CN202311559335.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-11-21
Smart Images

Figure CN117601433B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of additive manufacturing technology, specifically to a method for training a part flatness prediction model and a method for predicting part flatness. Background Technology
[0002] In selective laser melting (SLM) additive manufacturing, powder is laid layer by layer and melted by a laser, with the molten metal forming the final part layer by layer. During this process, due to factors such as the thermal properties of the material, the power and speed of the laser scanning, and the topological characteristics of the part itself, the part in the powder bed may experience some degree of warping or depression after each melting. Excessive warping can damage the scraper in the next powder laying, while excessive depression can prevent the laser from burning through the powder. Therefore, predicting the flatness of the part, such as warping or depression, is crucial for part manufacturing.
[0003] In related technologies, there is a lack of automatic prediction methods for the flatness of laser sintering additive manufacturing. It is impossible to predict the warping or depression of the current layer before manufacturing begins. Without flatness prediction, parts will have flatness problems such as warping or depression during the printing and manufacturing process, resulting in part manufacturing failure and causing a lot of material waste and time loss. Summary of the Invention
[0004] In view of this, the present invention provides a method for training a part flatness prediction model and a method for predicting part flatness, so as to solve the problem that it is impossible to predict the warping or depression of the current layer before manufacturing begins.
[0005] In a first aspect, the present invention provides a method for training a part flatness prediction model, the method comprising:
[0006] Acquire training set data, which includes trend grayscale data and sheet height data of part slices. The trend grayscale data is calculated from the slice data of the part slices, and the sheet height data is used to represent the height fluctuation information of the part slices.
[0007] Based on trend grayscale data and sheet height data, the initial part flatness prediction model is trained to obtain the target part flatness prediction model, which is then used to predict the flatness of parts.
[0008] In this invention, by using trend grayscale data and sheet height data obtained from slicing parts, a flatness prediction model for parts is trained. This model can predict warping or depressions in a certain layer before the start of the additive manufacturing process, predicting the specific location, shape, and degree of warping or depressions. This provides data support for part manufacturing, facilitating subsequent measures such as scanning strategy optimization, support addition, and thermal management. It also provides a basis for optimizing printing strategies and potentially improves the success rate of part manufacturing.
[0009] In one alternative implementation, trend grayscale data is obtained through the following steps:
[0010] Collect slice data of part samples;
[0011] Based on the slice data, the sum of the differences between each of the two adjacent slices below the current slice of the part sample is calculated;
[0012] The trend grayscale data of the current layer slice of the part sample is calculated by summing the differences between the current layer slice data of the part sample and the two adjacent layers slices below the current layer slice.
[0013] In this method, trend grayscale data is calculated by using slice data of part samples, which facilitates subsequent model training using trend grayscale data, thereby enabling the prediction of possible warping of the part.
[0014] In one optional implementation, the trend grayscale data is calculated using the following formula:
[0015]
[0016] Where n is the current layer number of the part sample, k is the number of layers stacked down from the current layer of the part sample, and S (n) S is the slice data of the part sample. (n-i+1) -S (n-i) The difference between two adjacent slices of the part sample, STG (n) This is the trend grayscale data for the current layer slice of the part sample.
[0017] In this method, the trend grayscale data of each slice of the part sample is calculated by using slice data from different layers, which facilitates subsequent training of the model.
[0018] In one optional implementation, an initial part flatness prediction model is trained based on trend grayscale data and sheet height data to obtain a target part flatness prediction model, including:
[0019] Input the trend grayscale data into the initial part flatness prediction model to obtain the predicted width height data;
[0020] Based on the predicted width and height data, the initial part flatness prediction model is converged and verified to obtain the target part flatness prediction model.
[0021] In this method, the predicted width height data is obtained by inputting the trend grayscale data into the initial part flatness prediction model. The predicted width height data is then compared with the actual width height data to verify the convergence of the initial part flatness prediction model. This process continues until the width height data predicted by the part flatness prediction model is as close as possible to the actual width height data, which greatly improves the accuracy of the model prediction.
[0022] In one alternative implementation, the initial part flatness prediction model includes a generator network and a discriminator network;
[0023] Based on the predicted sheet height data and sheet height data, the initial part flatness prediction model is converged and verified to obtain the target part flatness prediction model, including:
[0024] The predicted width height data and the width height data are input into the discriminator network to obtain the loss function between the predicted width height data and the width height data;
[0025] Based on the loss between the predicted width height data and the width height data, the generator network is trained so that the loss function between the predicted width height data and the width height data obtained by the generator network is reduced to a preset loss threshold, thus obtaining the target part flatness prediction model.
[0026] In this approach, a generative adversarial network is formed by using a discriminator network and a generator network to continuously optimize the part flatness prediction model. This makes the part flatness prediction model predict the width height data more closely resemble the actual width height data, thereby improving the accuracy of the model's prediction.
[0027] Secondly, this invention provides a method for predicting the flatness of parts, the method comprising:
[0028] Obtain the slice data of the part to be tested;
[0029] Based on the slice data, the trend grayscale data of the part under test is calculated;
[0030] The trend grayscale data of the part to be tested is input into the part flatness prediction model to predict the slice height data of the part to be tested. The part flatness prediction model is trained using the part flatness prediction model training method of any one of the first aspects.
[0031] In this invention, by calculating the trend grayscale data of the part to be tested and inputting it into the trained part flatness prediction model, the warping or depression of a certain layer of the part can be predicted before the start of the additive manufacturing process. The specific location, shape and degree of warping and depression can be predicted, which facilitates the subsequent adjustment of the part manufacturing process, reduces the risk of part manufacturing failure, and thus reduces time and material waste.
[0032] Thirdly, the present invention provides a training device for a part flatness prediction model, the device comprising:
[0033] The data acquisition module is used to acquire training set data, which includes trend grayscale data and sheet height data of part slices. The trend grayscale data is calculated from the slice data of part slices, and the sheet height data is used to represent the height fluctuation information of part slices.
[0034] The model training module is used to train the initial part flatness prediction model based on trend grayscale data and sheet height data to obtain the target part flatness prediction model, which is used to predict the flatness of parts.
[0035] Fourthly, the present invention provides a part flatness prediction device, the device comprising:
[0036] The slice data acquisition module is used to acquire slice data of the part to be tested;
[0037] The trend grayscale data calculation module is used to calculate the trend grayscale data of the part under test based on the slice data.
[0038] The sheet height prediction module is used to input the trend grayscale data of the part to be tested into the part flatness prediction model to predict the sheet height data of the slice of the part to be tested. The part flatness prediction model is trained using the part flatness prediction model training device of the third aspect.
[0039] Fifthly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the part flatness prediction model training method of the first aspect or any corresponding embodiment thereof, or to perform the part flatness prediction method of the second aspect.
[0040] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the part flatness prediction model training method of the first aspect or any corresponding embodiment thereof, or to execute the part flatness prediction method of the second aspect. Attached Figure Description
[0041] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating the training method for a part flatness prediction model according to an embodiment of the present invention.
[0043] Figure 2 This is a schematic diagram of a digital model of a regular cone, a cuboid, and an inverted cone according to an embodiment of the present invention.
[0044] Figure 3 This is a schematic diagram of the slice trend grayscale of the nth layer of a digital model according to an embodiment of the present invention.
[0045] Figure 4 This is a schematic diagram of the trend grayscale data STG of the nth layer of a part and the actual printed height data Z of the nth layer according to an embodiment of the present invention.
[0046] Figure 5 This is a flowchart illustrating another part flatness prediction model training method according to an embodiment of the present invention.
[0047] Figure 6 This is a flowchart illustrating another part flatness prediction model training method according to an embodiment of the present invention.
[0048] Figure 7 This is a flowchart illustrating the part flatness prediction method according to an embodiment of the present invention.
[0049] Figure 8 This is a structural block diagram of a part flatness prediction model training device according to an embodiment of the present invention.
[0050] Figure 9 This is a structural block diagram of a part flatness prediction device according to an embodiment of the present invention.
[0051] Figure 10 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] In selective laser melting (SLM) additive manufacturing, powder is laid layer by layer and melted by a laser, with the molten metal forming the final part layer by layer. During this process, due to factors such as the thermal properties of the material, the power and speed of the laser scan, and the topological characteristics of the part itself, the part in the powder bed plane may experience some degree of warping or depression after each melting. Excessive warping can damage the scraper in the next powder laying, while excessive depression can prevent the laser from fully burning through the powder. Structured light profilometry can quantify the degree of warping and depression in the powder bed plane after printing. After each sintering, data is collected, processed, and saved to obtain the flatness information of the part after each laser melting, specifically a grayscale image or pseudo-color image. This information is vast and can help operators assess warping defects during the printing process, allowing for further preprocessing of the model before the next printing, such as adding supports, optimizing the scanning path, and optimizing the laser power. In the model processing steps before layer-by-layer additive manufacturing, there is a "slicing" process. The "slicing" program decomposes the model according to the layer thickness. Each slice represents the shape of the model in the current layer and is specifically saved as a binary image.
[0054] In related technologies, there is a lack of automatic prediction methods for the flatness of laser sintering additive manufacturing. It is impossible to predict the warping or depression of the current layer before manufacturing begins. Without flatness prediction, parts will have flatness problems such as warping or depression during the printing and manufacturing process, resulting in part manufacturing failure and causing a lot of material waste and time loss.
[0055] To address the aforementioned problems, this invention provides a method for training a part flatness prediction model, used in a computer device. It should be noted that the executing entity can be a part flatness prediction model training device, which can be implemented as part or all of the computer device through software, hardware, or a combination of both. The computer device can be a terminal, client, or server. The server can be a single server or a server cluster composed of multiple servers. In this embodiment, the terminal can be a smartphone, personal computer, tablet computer, or other smart hardware device. The following method embodiments all use a computer device as the executing entity for illustration.
[0056] The computer equipment in this embodiment is suitable for applications where potential warpage and dents in parts can be predicted before selective laser melting additive manufacturing. The part flatness prediction model training method provided by this invention utilizes trend grayscale data and aspect ratio data obtained from slicing the part to train a part flatness prediction model. This allows for the prediction of warpage or dents in a specific layer before the additive manufacturing process begins, accurately predicting the location, shape, and degree of warpage and dents. This provides data support for part manufacturing, facilitating subsequent scanning strategy optimization, support addition, thermal management, and other measures. It also provides a basis for optimizing printing strategies, potentially improving the success rate of part manufacturing.
[0057] According to an embodiment of the present invention, a training method for a part flatness prediction model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0058] This embodiment provides a method for training a part flatness prediction model, which can be used with the aforementioned computer equipment. Figure 1 This is a flowchart of a part flatness prediction model training method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0059] Step S101: Obtain training set data.
[0060] In this embodiment of the invention, the training set data includes trend grayscale data and sheet height data of the part slices. The trend grayscale data is calculated from the slice data of the part slices, and the sheet height data is used to represent the height fluctuation information of the part slices.
[0061] In one example, the training set data may include: trend grayscale data calculated using binary slice data and the width and height data of the current layer of the part after laser sintering. The width and height data is a two-dimensional array containing information on the height undulations of the width and can be obtained using devices such as structured light cameras, laser line scanning cameras, and time-of-flight ranging devices. The method of obtaining the width and height data is not limited in this invention.
[0062] Step S102: Based on trend grayscale data and sheet height data, train the initial part flatness prediction model to obtain the target part flatness prediction model.
[0063] In this embodiment of the invention, the target part flatness prediction model is used to predict the flatness of the part.
[0064] In one example, a generative adversarial network model can be used as the initial part flatness prediction model, and the target part flatness prediction model can be obtained through training.
[0065] In one implementation scenario, 1. A slicer is used to slice 150 batches of parts to obtain binary slice data S for each model, and the trend grayscale data STG for each layer of each part is calculated, resulting in a total of 300,000 trend grayscale data STGs.
[0066] 2. Use a selective laser sintering printer to print 150 batches of different parts. The machine has a structured light camera and acquires 300,000 pieces of sheet height data Z after the layer sintering is completed.
[0067] 3. Establish a connection between the trend grayscale data STG(n) and the image height data Z(n) using a generative adversarial network (GAN). The training set consists of the trend grayscale data STG(n) and the image height data Z(n), with the expected output being the predicted image height data Zp(n). Construct a generator network G, whose core is a deep convolutional generative network. This network takes the input trend grayscale data STG(n) and attempts to generate the output predicted image height data Zp(n). Construct a discriminator network D, which takes the real image height data Z(n) and the predicted image height data Zp(n) generated by the generator network G and attempts to distinguish between them. Optimize the network parameters by training the generator network G and the discriminator network D alternately. The goal of the generator network G is to generate data similar to the real image height data Z(n), while the goal of the discriminator network D is to accurately distinguish between the real data and the generated data. The generator network G is trained and converges to a stable state.
[0068] 4. Figure 2 This is a schematic diagram of a digital model of a regular cone, a cuboid, and an inverted cone according to an embodiment of the present invention, as shown below. Figure 2 As shown, a brand new model is sliced to obtain trend grayscale data STG. Figure 3 This is a schematic diagram of the slice trend grayscale of the nth layer of a digital model according to an embodiment of the present invention, as shown below. Figure 3 As shown, the upper binary image represents binary slice data, and the lower grayscale image represents trend grayscale data (STG). The trend grayscale data (STG) is input into the generator network G, which outputs the predicted area height data (Zp). (50) The predicted height data can help determine the degree of warping and denting of parts when they are printed up to the 50th layer. Figure 4 This is a schematic diagram of the trend grayscale data STG of the nth layer of a part and the actual printed height data Z of the nth layer according to an embodiment of the present invention.
[0069] In another implementation scenario, 1. Use a slicer to slice 500 batches of parts to obtain binary slice data S for each model, and calculate the trend grayscale data STG for each layer of each part, resulting in a total of 5,000,000 trend grayscale data STGs.
[0070] 2. Use a selective laser sintering printer to print 500 batches of different parts. The machine is equipped with a line scan camera to obtain 5,000,000 pieces of width and height data Z after the layer sintering is completed.
[0071] 3. Establish a connection between the trend grayscale data STG(n) and the width height data Z(n) using a generative adversarial network (GAN). The training set consists of the trend grayscale data STG(n) and the width height data Z(n), and the expected output data is the predicted width height data Zp(n). Construct a generator network G, whose core is a convolutional neural network. This network takes the input trend grayscale data STG(n) and attempts to generate the output predicted width height data Zp(n). Construct a discriminator network D, whose core is a fully connected neural network. This network takes the real width height data Z(n) and the predicted width height data Zp(n) generated by the generator network G and attempts to distinguish between them. Optimize the network parameters by training the generator network G and the discriminator network D alternately. The goal of the generator network G is to generate data similar to the real width height data Z(n), while the goal of the discriminator network D is to accurately distinguish between the real data and the generated data. The generator network G is trained and converges to a stable state.
[0072] 4. After slicing a brand new model, the trend grayscale data STG is obtained and input into the generator network G. The predicted area height data Zp is output. For the inverted cone model, Zp(20) to Zp(150) can show a lot of warping. For the cone model, Zp(20) to Zp(150) is predicted to be flat.
[0073] In another implementation scenario, 1. Use a slicer to slice 500 batches of parts to obtain binary slice data S for each model, and calculate the trend grayscale data STG for each layer of each part, resulting in a total of 5,000,000 trend grayscale data STGs.
[0074] 2. Use a selective laser sintering printer to print 500 batches of different parts. The machine is equipped with a line scan camera to obtain 5,000,000 pieces of width and height data Z after the layer sintering is completed.
[0075] 3. Establish a connection between the trend grayscale data STG(n) and the image height data Z(n) using a generative adversarial network (GAN). The training set consists of the trend grayscale data STG(n) and the image height data Z(n), with the expected output being the predicted image height data Zp(n). Construct a generator network G, whose core is an attention mechanism. This network takes the input trend grayscale data STG(n) and attempts to generate the output predicted image height data Zp(n). Construct a discriminator network D, whose core is a deep contrastive network. This network takes the real output image height data Z(n) and the predicted image height data Zp(n) generated by the generator network G and attempts to distinguish between them. Optimize the network parameters by training the generator network G and the discriminator network D alternately. The goal of the generator network G is to generate data similar to the real image height data Z(n), while the goal of the discriminator network D is to accurately distinguish between the real data and the generated data. The generator network G is trained and converges to a stable state.
[0076] 4. Take a brand new model, and after slicing, the trend grayscale data STG is input into the generator network G, and the predicted area height data Zp is output. For the inverted cone model, Zp(20) to Zp(150) can show a lot of warping. For the cone model, Zp(20) to Zp(150) is predicted to be flat.
[0077] The part flatness prediction model training method provided in this embodiment uses trend grayscale data and sheet height data obtained by slicing the part to train a part flatness prediction model. It can complete the prediction of warpage or depression of a certain layer before the start of the additive manufacturing process, and predict the specific location, shape and degree of warpage and depression. It provides data support for part manufacturing, facilitates subsequent scanning strategy optimization, support addition, thermal management and other measures, and provides a basis for optimizing printing strategy, potentially improving the success rate of part manufacturing.
[0078] This embodiment provides a method for training a part flatness prediction model, which can be used with the aforementioned computer equipment. Figure 5 This is a flowchart of a part flatness prediction model training method according to an embodiment of the present invention, such as... Figure 5 As shown, the process includes the following steps:
[0079] Step S501: Obtain training set data.
[0080] Specifically, step S501 includes:
[0081] Step S5011: Collect slice data of part sample.
[0082] Step S5012: Based on the slice data, calculate the sum of the differences between each of the two adjacent slices below the current slice of the part sample.
[0083] Step S5013: Calculate the trend grayscale data of the current layer slice of the part sample based on the sum of the differences between the current layer slice data of the part sample and the two adjacent layers slices below the current layer slice of the part sample.
[0084] In some optional implementations, step S5013 above includes:
[0085] Step a1: Calculate the trend grayscale data using the following formula:
[0086]
[0087] Where n is the current layer number of the part sample, k is the number of layers stacked down from the current layer of the part sample, and S (n) S is the slice data of the part sample. (n-i+1) -S (n-i) The difference between two adjacent slices of the part sample, STG (n) This is the trend grayscale data for the current layer slice of the part sample.
[0088] In this method, trend grayscale data is calculated by using slice data of part samples, which facilitates subsequent model training using trend grayscale data, thereby enabling the prediction of possible warping of the part.
[0089] Step S502: Based on trend grayscale data and sheet height data, train the initial part flatness prediction model to obtain the target part flatness prediction model. For details, please refer to [link to details]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0090] The part flatness prediction model training method provided in this embodiment calculates trend grayscale data using slice data of part samples. This trend grayscale data facilitates subsequent model training and enables the prediction of potential warping of the part. Trend grayscale data for each slice of the part sample is calculated using slice data from different layers, which is beneficial for subsequent model training.
[0091] This embodiment provides a method for training a part flatness prediction model, which can be used with the aforementioned computer equipment. Figure 6 This is a flowchart of a part flatness prediction model training method according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps:
[0092] Step S601: Obtain the training set data. For details, please refer to [link to relevant documentation]. Figure 5 Step S502 of the illustrated embodiment will not be described again here.
[0093] Step S602: Based on trend grayscale data and sheet height data, train the initial part flatness prediction model to obtain the target part flatness prediction model.
[0094] Specifically, step S602 includes:
[0095] Step S6021: Input the trend grayscale data into the initial part flatness prediction model to obtain the predicted width height data.
[0096] Step S6022: Based on the predicted width and height data, the initial part flatness prediction model is converged and verified to obtain the target part flatness prediction model.
[0097] In some optional implementations, the initial part flatness prediction model includes a generator network and a discriminator network. Step S6022 above includes:
[0098] Step a1: Input the predicted width height data and the width height data into the discriminator network to obtain the loss function between the predicted width height data and the width height data.
[0099] Step a2: Based on the loss between the predicted width height data and the width height data, train the generator network so that the loss function between the predicted width height data and the width height data obtained by the generator network is reduced to a preset loss threshold, thereby obtaining the target part flatness prediction model.
[0100] In one example, after obtaining a large amount of data, a connection is established between the trend grayscale data STG(n) and the aspect ratio height data Z(n) using a generative adversarial network (GAN). The training set consists of the trend grayscale data STG(n) and the aspect ratio height data Z(n), with the expected output being the predicted aspect ratio height data Zp(n). A generator network G is constructed, which takes the input trend grayscale data STG(n) and attempts to generate the output predicted aspect ratio height data Zp(n). A discriminator network D is constructed, which takes the real aspect ratio height data Z(n) and the predicted aspect ratio height data Zp(n) generated by the generator network G and attempts to distinguish between them. The network parameters are optimized by training the generator network G and the discriminator network D alternately. The goal of the generator network G is to generate data similar to the real aspect ratio height data Z(n), while the goal of the discriminator network D is to accurately distinguish between the real data and the generated data. Appropriate loss functions are used to define the optimization objectives of the generator network G and the discriminator network D. Loss functions include adversarial loss, reconstruction loss, and regularization terms. The generator network G is trained and converges.
[0101] The part flatness prediction model training method provided in this embodiment obtains predicted width and height data by inputting trend grayscale data into the initial part flatness prediction model. The predicted width and height data is then compared with the actual width and height data to verify the convergence of the initial model. This process continues until the predicted width and height data obtained by the model approximates the actual width and height data as closely as possible, significantly improving the model's prediction accuracy. Furthermore, by utilizing a discriminator network and a generator network to form a generative adversarial network, the part flatness prediction model is continuously optimized, making the predicted width and height data even closer to the actual width and height data, thus further improving the model's prediction accuracy.
[0102] This embodiment provides a method for predicting the flatness of parts, which can be used in the aforementioned computer equipment. Figure 7 This is a flowchart of a part flatness prediction method according to an embodiment of the present invention, such as... Figure 7 As shown, the process includes the following steps:
[0103] Step S701: Obtain the slice data of the part to be tested.
[0104] Step S702: Based on the slice data, calculate the trend grayscale data of the part to be tested.
[0105] Step S703: Input the trend grayscale data of the part to be tested into the part flatness prediction model to predict the slice height data of the part to be tested.
[0106] In this embodiment of the invention, the part flatness prediction model is trained using the above-described part flatness prediction model training method.
[0107] In one example, trend grayscale data STG(n) is input into the generator network G to obtain the corresponding output predicted width height data Zp(n). With a large amount of data, the trained generative adversarial network can predict the warping of a certain layer without even starting to print.
[0108] In this invention, by calculating the trend grayscale data of the part to be tested and inputting it into the trained part flatness prediction model, the warping or depression of a certain layer of the part can be predicted before the start of the additive manufacturing process. The specific location, shape and degree of warping and depression can be predicted, which facilitates the subsequent adjustment of the part manufacturing process, reduces the risk of part manufacturing failure, and thus reduces time and material waste.
[0109] This embodiment also provides a part flatness prediction model training device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0110] This embodiment provides a training device for a part flatness prediction model, such as... Figure 8 As shown, it includes:
[0111] The data acquisition module 801 is used to acquire training set data, which includes trend grayscale data and sheet height data of the part slices. The trend grayscale data is calculated from the slice data of the part slices, and the sheet height data is used to represent the height undulation information of the part slices. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0112] Model training module 802 is used to train the initial part flatness prediction model based on trend grayscale data and sheet height data to obtain the target part flatness prediction model. The target part flatness prediction model is used to predict the flatness of parts. For details, please refer to [link to details]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0113] In some alternative implementations, the data acquisition module 801 includes:
[0114] The slice data acquisition unit is used to acquire slice data of part samples.
[0115] The slice difference calculation unit is used to calculate the sum of the differences between each two adjacent slices below the current slice of the part sample, based on the slice data.
[0116] The trend grayscale data calculation unit is used to calculate the trend grayscale data of the current layer slice of the part sample based on the sum of the differences between the current layer slice data of the part sample and the two adjacent layers slices below the current layer slice of the part sample.
[0117] In some optional implementations, the trend grayscale data calculation unit includes:
[0118] The trend grayscale data calculation subunit is used to calculate the trend grayscale data using the following formula:
[0119]
[0120] Where n is the current layer number of the part sample, k is the number of layers stacked down from the current layer of the part sample, and S(n) S is the slice data of the part sample. (n-i+1) -S (n-i) The difference between two adjacent slices of the part sample, STG (n) This is the trend grayscale data for the current layer slice of the part sample.
[0121] In some alternative implementations, the model training module 802 includes:
[0122] The width height prediction unit is used to input trend grayscale data into the initial part flatness prediction model to obtain predicted width height data.
[0123] The model training unit is used to perform convergence verification of the initial part flatness prediction model based on the predicted width height data and width height data, so as to obtain the target part flatness prediction model.
[0124] In some alternative implementations, the initial part flatness prediction model includes a generator network and a discriminator network.
[0125] The model training unit includes:
[0126] The model prediction subunit is used to input the predicted width height data and the width height data into the discriminator network to obtain the loss function between the predicted width height data and the width height data.
[0127] The model training subunit is used to train the generator network based on the loss between the predicted width height data and the width height data, so that the loss function between the predicted width height data and the width height data obtained by the generator network is reduced to a preset loss threshold, thereby obtaining the target part flatness prediction model.
[0128] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0129] In this embodiment, the part flatness prediction model training device is presented in the form of functional units. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0130] This embodiment provides a part flatness prediction device, such as... Figure 9 As shown, it includes:
[0131] The slice data acquisition module 901 is used to acquire slice data of the part under test. For details, please refer to [link to relevant documentation]. Figure 1 Step S701 of the illustrated embodiment will not be described again here.
[0132] The trend grayscale data calculation module 902 is used to calculate the trend grayscale data of the part under test based on the sliced data. For details, please refer to [link to details]. Figure 1 Step S702 of the illustrated embodiment will not be described again here.
[0133] The sheet height prediction module 903 is used to input the trend grayscale data of the part to be tested into the part flatness prediction model to predict the sheet height data of the slice of the part to be tested. For details, please refer to [link to details]. Figure 1 Step S703 of the illustrated embodiment will not be described again here.
[0134] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0135] In this embodiment, the part flatness prediction device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0136] This invention also provides a computer device having the above-described features. Figure 8 The part flatness prediction model training device shown or Figure 9 The part flatness prediction device shown.
[0137] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 10 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 10 Take a processor 10 as an example.
[0138] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0139] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0140] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0141] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0142] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0143] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0144] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for training a part flatness prediction model, characterized in that, The method includes: Acquire training set data, which includes trend grayscale data and sheet height data of part slices. The trend grayscale data is calculated from the slice data of the part slices, and the sheet height data is used to represent the height fluctuation information of the part slices. Based on the trend grayscale data and the sheet height data, the initial part flatness prediction model is trained to obtain the target part flatness prediction model, which is used to predict the flatness of parts. The trend grayscale data is obtained through the following steps: Collect slice data of part samples; Based on the slice data, the sum of the differences between each two adjacent slices below the current slice of the part sample is calculated; Based on the sum of the differences between the current layer slice data of the part sample and the two adjacent layers below the current layer slice of the part sample, the trend grayscale data of the current layer slice of the part sample is calculated. The trend grayscale data is calculated using the following formula: in, The current layer number of the part sample. This represents the number of layers stacked downwards from the current layer of the part sample. This refers to the slice data of the part sample. The difference between two adjacent slices of the part sample. The trend grayscale data for the current layer slice of the part sample.
2. The method according to claim 1, characterized in that, The process of training the initial part flatness prediction model based on the trend grayscale data and the sheet height data to obtain the target part flatness prediction model includes: The trend grayscale data is input into the initial part flatness prediction model to obtain the predicted width height data; Based on the predicted width height data and the width height data, the initial part flatness prediction model is converged and verified to obtain the target part flatness prediction model.
3. The method according to claim 2, characterized in that, The initial part flatness prediction model includes a generator network and a discriminator network; The step of performing convergence verification on the initial part flatness prediction model based on the predicted width height data and the width height data to obtain the target part flatness prediction model includes: The predicted width height data and the width height data are input into the discriminator network to obtain the loss function between the predicted width height data and the width height data; Based on the loss between the predicted width height data and the width height data, the generator network is trained so that the loss function between the predicted width height data and the width height data predicted by the generator network is reduced to a preset loss threshold, thereby obtaining the flatness prediction model of the target part.
4. A method for predicting the flatness of parts, characterized in that, The method includes: Obtain the slice data of the part to be tested; Based on the slice data, the trend grayscale data of the part under test is calculated; The trend grayscale data of the part to be tested is input into the part flatness prediction model to predict the slice height data of the part to be tested. The part flatness prediction model is trained using the part flatness prediction model training method according to any one of claims 1-3.
5. A training device for a part flatness prediction model, characterized in that, The device includes: A data acquisition module is used to acquire training set data, which includes trend grayscale data and aspect ratio height data of part slices. The trend grayscale data is calculated from the slice data of the part slices, and the aspect ratio height data is used to represent the height fluctuation information of the part slices. The trend grayscale data is obtained through the following steps: collecting slice data of part samples; calculating the sum of the differences between each pair of adjacent slices below the current slice of the part sample based on the slice data; and calculating the trend grayscale data of the current slice of the part sample based on the sum of the differences between each pair of adjacent slices below the current slice of the part sample. The trend grayscale data is calculated using the following formula: in, The current layer number of the part sample. This represents the number of layers stacked downwards from the current layer of the part sample. This refers to the slice data of the part sample. The difference between two adjacent slices of the part sample. The trend grayscale data for the current layer slice of the part sample; The model training module is used to train the initial part flatness prediction model based on the trend grayscale data and the area height data to obtain the target part flatness prediction model, which is used to predict the flatness of the part.
6. A part flatness prediction device, characterized in that, The device includes: The slice data acquisition module is used to acquire slice data of the part to be tested; The trend grayscale data calculation module is used to calculate the trend grayscale data of the part under test based on the slice data; the sheet height prediction module is used to input the trend grayscale data of the part under test into the part flatness prediction model to predict the sheet height data of the slice of the part under test, wherein the part flatness prediction model is trained using the part flatness prediction model training device of claim 5.
7. A computer device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the part flatness prediction model training method according to any one of claims 1 to 3 or the part flatness prediction method according to claim 4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the part flatness prediction model training method according to any one of claims 1 to 3 or the part flatness prediction method according to claim 4.
Citation Information
Patent Citations
Method and device for controlling surface flatness and height of electric arc additive
CN114101853A
Additive manufacturing condition search apparatus, additive manufacturing condition search method, and reference sample
EP4019170A1
