SLM printing material defect prediction method and system based on visual algorithm
By using a visual algorithm-based method in the SLM printing material defect prediction system, image block segmentation, gradient information extraction, similar matching and adaptive denoising processing are performed, and the problem of insufficient accuracy and efficiency of defect detection in the prior art is solved, achieving more efficient defect detection and image quality improvement.
Patent Information
- Application Number
- CN202510300361.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-03-14
AI Technical Summary
The existing SLM printing material defect prediction methods and systems have shortcomings in capturing local changes or detailed features in the image, optimizing image block matching process, denoising processing, adaptive threshold design and dynamic design of weight function, resulting in the impact of the accuracy and efficiency of defect detection.
Using a visual algorithm-based method, the material image data, material parameter data and mechanical motion data during the SLM printing process are synchronously collected, non-overlapping image block segmentation and gradient information extraction are performed, and the three-dimensional image block data set is constructed using similar matching functions, and three-dimensional transformation and adaptive denoising processing are performed, and the weight function is dynamically designed to optimize the denoising effect.
Improve the accuracy and efficiency of defect detection, and can more accurately capture the detailed characteristics of material defects, reduce noise impact, optimize the denoising process, and enhance image quality and reliability of defect detection.
Smart Images

Figure CN119819945A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more specifically, to a method and system for predicting SLM printing material defects based on a visual algorithm. Background Art
[0002] SLM technology is one of the important technologies in the field of metal additive manufacturing. By using a high-energy-density laser as a heat source, the laser spot is concentrated in a very small range, and spherical metal powder with a small particle diameter is selectively melted to obtain complex metal components with high degrees of freedom.
[0003] The patent with application publication number CN117313569A discloses a method and device for predicting and optimizing products based on SLM3D printing. It includes obtaining SLM3D printing data and constructing a SLM3D printing data set, using the SLM3D printing data set to train the algorithm to obtain a deep correlation model, updating the SLM3D printing data set and verifying and optimizing the deep correlation model, receiving task information and analyzing it to obtain analysis results, confirming task attributes through the analysis results, and performing prediction or / and optimization based on the task attributes using the deep correlation model to obtain prediction results or / and optimized solutions. The present invention can not only predict defects and product performance based on data such as materials and processes input by the user, but also recommend optimized processes based on data such as materials, defects and performance input by the user, and obtain optimized product performance, thereby avoiding unqualified printing quality, repeated debugging of the printing process and the huge waste caused by it, greatly improving efficiency and reducing costs.
[0004] The existing SLM printing material defect prediction methods and systems have the following main problems: Ignoring local changes or detail features in the image, material defects often appear as local discontinuities or subtle changes. If these details are not accurately captured, the accuracy of defect detection will be greatly reduced, which may lead to missed detection or false detection; the matching process between image blocks is not optimized, the algorithm has high computational complexity and long response time, which affects the efficiency of feature extraction; excessive noise will affect the local structure of the image, reducing the accuracy of defect detection, resulting in erroneous defect prediction; the design of adaptive thresholds is not considered, the denoising process may ignore the visual perception characteristics of the image, resulting in the inability to balance noise removal and detail retention during the denoising process, the structure and texture of the image may be over-smoothed, affecting the accurate detection of defects; the denoising strength cannot be dynamically adjusted according to the different regions and frequency characteristics of the image, which may result in the noise in some areas not being effectively removed, while the details in other areas are over-removed, affecting the image quality and defect detection accuracy; the weight function design is not fine enough, and the denoising strength may not be accurately adjusted during the denoising process, resulting in excessive or insufficient denoising; It is impossible to adjust according to the local characteristics of the image, resulting in insufficient denoising in areas with strong noise, while areas with more image details are over-smoothed, thus affecting image quality and the accuracy of defect detection; the denoising process cannot be optimized according to the noise characteristics of the image, resulting in more residual noise in the image, affecting subsequent defect detection; the influence of the total number of matching blocks and noise variance is not considered, which may cause the denoising effect to be too strong in some areas and insufficient in other areas. Unbalanced denoising may cause the loss of local features of the image, affecting the accurate identification of defects.
[0005] In view of this, the present invention proposes a SLM printing material defect prediction method and system based on a visual algorithm to solve the above problems. Summary of the invention
[0006] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for predicting defects of SLM printing materials based on a visual algorithm, comprising: S1, synchronously collect material image data, material parameter data and mechanical motion data during SLM printing; S2. Segment the material image data into non-overlapping image blocks, and extract the gradient information of each non-overlapping image block through the Sobel operator; based on the local search strategy, on the basis of the gradient information, a similarity matching function that minimizes the gradient difference is used to screen the candidate blocks with the most similar gradient changes between non-overlapping image blocks, and construct a three-dimensional image block data set; S3, performing three-dimensional transformation processing on the three-dimensional image block data set, and designing a weight function based on human visual perception characteristics, dynamically generating an adaptive threshold, performing differential denoising processing on the three-dimensional image block data set, and obtaining an image feature data set; S4, performing outlier elimination and standard deviation normalization processing on the material parameter data and mechanical motion data, obtaining a material feature data set and a mechanical motion feature data set, and performing weighted fusion with the image feature data set to form a comprehensive printing feature set; S5. Evaluate the probability of printing material defects based on the comprehensive printing feature set; if the probability of printing material defects exceeds a preset threshold, perform classification and identification based on the current image feature data set to obtain the type of printing material defects, and provide real-time feedback and early warning through the SLM printing material detection terminal.
[0007] Furthermore, the material image data includes material surface images, multi-view images and thermal imaging images; the material parameter data includes material type, material batch and material density; the mechanical motion data includes printing platform motion state data, laser scanning speed, laser power and printing time.
[0008] Furthermore, the method for obtaining the three-dimensional image block data set includes: dividing the material image data into The size is The non-overlapping image blocks are used to calculate the gradient of each non-overlapping image block through the Sobel operator; non-overlapping image blocks, randomly select a non-overlapping image block as the target block; define a A search window is formed; within the search window, a region with similar gradient changes to the target block is selected for matching through a similar matching function, thereby obtaining a candidate block most similar to the target block; the most similar candidate block in the search window is used as a matching block, and all matching blocks are combined into a 3D image block dataset.
[0009] Furthermore, the method for acquiring the image feature data set includes: The 3D image block dataset is transformed 3D, and all matching blocks after the 3D transformation are denoised by an adaptive threshold. The adaptive threshold is: ;in, is the position in the frequency domain Adaptive threshold of is the adjustment factor for controlling the adaptive threshold amplitude; is a weight function based on human visual perception characteristics; is the horizontal coordinate of the frequency domain position; is the ordinate of the frequency domain position; for the weight function Conduct dynamic design; The denoised matching blocks will be reconstructed back to the position of the original material image data to form the final denoised material image data and obtain the image feature data set.
[0010] Furthermore, the weight function Methods for dynamic design include: The weight function is designed by the weight function formula For dynamic design, the weight function design formula is: ;in, is the total number of matching blocks; It is a parameter factor that controls the effect of frequency attenuation speed on weight; A constant factor that controls the effect of the total number of matching blocks on the weight; The parameter factor that controls the effect of frequency attenuation speed on weight is limited by the parameter factor formula To restrict the constraints, the parameter factor restriction formula is: ;in, is the parameter factor that controls the influence of the frequency attenuation speed on the weight after limitation; is the variance of the noise in the material image data; is the total number of non-overlapping image blocks.
[0011] Furthermore, the method for obtaining the comprehensive printing feature set includes: The image feature data set, the material feature data set and the mechanical motion feature data set are fused through a weighted formula to obtain a comprehensive printing feature set; The image feature dataset is denoted as , the material characteristic data set is recorded as , the mechanical motion feature dataset is recorded as ; The weighted formula is: ;in, For comprehensive printing feature set; is the weight coefficient of the image feature dataset; is the weight coefficient of the material characteristic data set; is the weight coefficient of the mechanical motion feature data set.
[0012] Furthermore, the method for evaluating the probability of printing material defects based on the comprehensive printing feature set includes: By building a multimodal neural network model to predict the probability of printing material defects, the data features of different modes contained in the comprehensive printing feature set are jointly learned, and the related information is extracted for cross-modal fusion. Finally, the predicted probability of printing material defects is output through probability mapping. The material defect prediction model includes an input layer, a hidden layer and an output layer; the hidden layer uses the ReLU activation function; the input layer of the model is used to input the historical comprehensive printing feature set; the output layer of the model is used to output the corresponding printing material defect probability; the mean square error is used as the loss function to measure the error between the predicted value and the actual value of the model; the model parameters are updated through the back propagation algorithm and the gradient descent method to minimize the loss function; the Adam optimization algorithm is selected as the optimizer, and the hyperparameters of the model are adjusted until the performance no longer improves or the preset number of iterations is reached, and the trained multimodal neural network model is obtained; the current comprehensive printing feature set is input into the trained multimodal neural network model for prediction to obtain the printing material defect probability.
[0013] Furthermore, if the probability of printing material defects exceeds a preset threshold, the method includes: Preset a printing material defect probability threshold, and compare the predicted printing material defect probability with the preset printing material defect probability threshold; If the predicted probability of a printing material defect is less than a preset printing material defect probability threshold, it is determined that the printing material has no defect; If the predicted printing material defect probability is greater than or equal to a preset printing material defect probability threshold, it is determined that the printing material has defects.
[0014] Furthermore, the method for obtaining the defect type of printing material includes: If it is determined that the printed material has defects, the current image feature data set is collected, and a multi-layer perceptron is used to classify and identify the defect type; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer; the input layer is a historical image feature data set, and the output layer is the corresponding printed material defect type; the sigmoid function is used as the activation function; the binary cross entropy is used as the loss function to measure the error of the model prediction; the model parameters are updated through the back propagation algorithm to minimize the loss function; The SGD optimization algorithm is selected as the optimizer to tune the model; when the performance of the model in the prediction task reaches the preset performance threshold, the test is stopped to obtain a trained multi-layer perceptron; the trained multi-layer perceptron is used to classify and identify the current image feature data set to obtain the defect type of the printed material.
[0015] A SLM printing material defect prediction system based on visual algorithm, comprising: A data acquisition unit, used to synchronously collect material image data, material parameter data and mechanical motion data during the SLM printing process; The image enhancement unit is used to segment the material image data into non-overlapping image blocks and extract the gradient information of each non-overlapping image block through the Sobel operator; based on the local search strategy and the gradient information, a similar matching function that minimizes the gradient difference is used to screen the candidate blocks with the most similar gradient changes between non-overlapping image blocks and construct a three-dimensional image block data set; A three-dimensional transformation unit performs three-dimensional transformation processing on the three-dimensional image block data set, designs a weight function based on human visual perception characteristics, dynamically generates an adaptive threshold, performs differential denoising processing on the three-dimensional image block data set, and obtains an image feature data set; The multimodal fusion unit removes outliers and normalizes standard deviations of material parameter data and mechanical motion data, obtains material feature data sets and mechanical motion feature data sets, and performs weighted fusion with the image feature data sets to form a comprehensive printing feature set; The evaluation and feedback unit evaluates the probability of printing material defects based on the comprehensive printing feature set; if the probability of printing material defects exceeds the preset threshold, classification and identification are performed based on the current image feature data set to obtain the type of printing material defects, and real-time feedback and early warning are provided through the SLM printing material detection terminal.
[0016] Technical effects and advantages of the SLM printing material defect prediction method and system based on visual algorithm of the present invention: The present invention can effectively extract the edge information and local features of the image by dividing the material surface image into small blocks and using the Sobel operator to calculate the gradient of each image block, which is very helpful for the detection of material defects, because material defects often appear as local changes or discontinuities in the image. By calculating the gradient of each small block, these details can be accurately captured; by performing similarity matching within the search window and selecting areas with similar gradient changes to the target block, the features of similar areas in the image can be effectively captured, the influence of noise on feature extraction can be reduced, and the extracted features can be ensured to be more accurate and robust; the similarity matching function optimizes the matching process by minimizing the gradient difference, thereby improving the accuracy of defect detection; by performing three-dimensional transformation on the three-dimensional image block data set and combining it with adaptive threshold denoising, the noise can be effectively removed while retaining the useful information of the image. The design of the adaptive threshold is based on the human visual system (HVS) model, so that the denoising process not only considers the noise level of the signal, but also the characteristics of visual perception, thereby optimizing the denoising effect. In this way, the structure and texture characteristics of the image can be retained to the greatest extent, while removing noise and improving image quality; by dynamically designing the weight function, the denoising intensity can be adjusted according to the different regions and frequency characteristics of the image. This dynamically designed weight function makes the denoising process more flexible, and different denoising strategies can be applied in different image regions and different frequency domain positions, thereby improving the denoising effect and the ability to retain image details; By dynamically designing the weight function, the weight distribution in the denoising process can be adjusted according to different image characteristics (such as noise, frequency, total number of image blocks, etc.). This adaptability ensures that under different conditions, the denoising process can better adapt to the local characteristics of the image, especially in areas with strong noise, and can retain more effective information while removing unnecessary noise; by limiting the parameter factor that affects the frequency decay rate on the weight, the response to different frequencies in the denoising process can be precisely controlled. The lower frequency part usually contains more image structure information, while the higher frequency part is mostly noise. By adjusting the parameter factor, these frequency parts can be effectively weighted to ensure that the details of the image are preserved while reducing the impact of noise; by limiting and constraining the variance of the noise, it can be optimized according to the characteristics of the noise in the image; by controlling the total number of matching blocks, the matching effect of the image blocks can be optimized. In the case of strong noise or difficult matching, increasing the total number of matching blocks can provide more candidate blocks, thereby improving the accuracy of matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic flow chart of a method for predicting defects in SLM printing materials based on a visual algorithm according to the present invention; Figure 2This is a schematic diagram of the structure of a SLM printing material defect prediction system based on a visual algorithm of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Example 1 See also Figure 1 As shown, this embodiment provides a method for predicting SLM printing material defects based on a visual algorithm, including: S1, synchronously collect material image data, material parameter data and mechanical motion data during SLM printing; S2. Segment the material image data into non-overlapping image blocks, and extract the gradient information of each non-overlapping image block through the Sobel operator; based on the local search strategy, on the basis of the gradient information, a similarity matching function that minimizes the gradient difference is used to screen the candidate blocks with the most similar gradient changes between non-overlapping image blocks, and construct a three-dimensional image block data set; S3, performing three-dimensional transformation processing on the three-dimensional image block data set, and designing a weight function based on human visual perception characteristics, dynamically generating an adaptive threshold, performing differential denoising processing on the three-dimensional image block data set, and obtaining an image feature data set; S4, performing outlier elimination and standard deviation normalization processing on the material parameter data and mechanical motion data, obtaining a material feature data set and a mechanical motion feature data set, and performing weighted fusion with the image feature data set to form a comprehensive printing feature set; S5. Evaluate the probability of printing material defects based on the comprehensive printing feature set; if the probability of printing material defects exceeds a preset threshold, perform classification and identification based on the current image feature data set to obtain the type of printing material defects, and provide real-time feedback and early warning through the SLM printing material detection terminal.
[0020] Material image data includes material surface images, multi-view images and thermal imaging images; material parameter data includes material type, material batch and material density; mechanical motion data includes printing platform motion state data, laser scanning speed, laser power and printing time.
[0021] Material image data provides visual information related to the material surface and temperature distribution during the SLM printing process, which directly affects the accuracy of defect prediction and analysis; material parameter data provides basic information about the materials used in the SLM printing process, which directly affects the printing quality and the occurrence of defects; mechanical motion data describes the dynamic behavior of each component of the SLM printing equipment during the printing process, which directly affects the accuracy of the printing process and the occurrence of defects.
[0022] It should be noted that the data collection part of this solution covers material image data, material parameter data and mechanical motion data. The role of these data in the overall solution and the innovation they embody are as follows: Material image data Includes: material surface images, multi-view images and thermal imaging images.
[0023] effect: Provide visual information of the material surface status during the printing process as the main basis for defect detection; Multi-view images can reveal subtle structural differences between printed layers and different locations in the printed area from different observation angles, avoiding the omission of key defects in single-view images; Thermal imaging images reflect the thermal distribution of materials during the printing process in real time, helping to identify defects caused by abnormal temperature (such as ablation, abnormal molten pool, pores, etc.).
[0024] Unique Value: This scheme enhances the information utilization of image data in defect recognition through non-overlapping image block segmentation, gradient information extraction and local search and matching algorithm. In particular, it uses the three-dimensional image block structure and human visual perception (HVS) mechanism to perform dynamic weight adjustment and denoising optimization, thereby enhancing the defect feature extraction effect of image data.
[0025] Material parameter data Includes: material type, material batch and material density.
[0026] effect: Provide basic information about the properties of the printed material itself, such as differences in physical properties (density, melting point, thermal conductivity, etc.) between different material types and batches, which directly affect the melt pool state and material deposition behavior during the printing process; Changes in material batches may result in different powder particle sizes or purities, causing changes in defect probability. By collecting material parameter data, a parametric association between process status and defect prediction can be achieved; Material density data reflects the impact of material physical properties on printing results, which helps to correct or adjust the probability of defects.
[0027] Unique Value: In this scheme, the weight distribution of material parameter data in the comprehensive printing feature set is relatively reasonable. Different from the existing technology that simply uses it as a static input parameter, this scheme implements a dynamic feedback adjustment mechanism. The material parameter data affects the defect detection and judgment process, enhancing the flexibility and adaptability of the prediction model.
[0028] Mechanical motion data Includes: printing platform motion status data, laser scanning speed, laser power and printing time.
[0029] effect: Reflects the real-time process parameters and operating status of the printing equipment at different time points, which are the dynamic factors that lead to printing abnormalities; Laser power and laser scanning speed directly determine the energy input intensity of the molten pool. Too high or too low will cause defects such as porosity, unfused, and cracks in the printed layer. Printing time can dynamically analyze the distribution and evolution of defects in different printing cycles; The print platform motion status data can detect equipment vibration and displacement anomalies, and troubleshoot structural deviations or surface defects caused by mechanical instability.
[0030] Unique Value: This solution combines the image feature data set, material feature data set and mechanical motion feature data set through a weighted formula. Different from the existing technology where the mechanical motion data is only used as a separate control parameter, the mechanical motion data in this solution directly affects the printing material defect probability estimation process, forming a multi-factor comprehensive weight calculation model, which further improves the accuracy and credibility of the defect detection results.
[0031] The method for obtaining the three-dimensional image block data set includes: Split the material image data into The size is The gradient of each non-overlapping image block is calculated by the Sobel operator. , used to guide block matching search; where, For the The gradient of non-overlapping image patches; Non-overlapping image blocks The gradient component in the horizontal direction reflects the brightness change of non-overlapping image blocks in the horizontal direction; Non-overlapping image blocks The gradient component in the vertical direction reflects the brightness change of non-overlapping image blocks in the vertical direction; For the non-overlapping image patches; is the index of the non-overlapping image block; is the horizontal direction; is the vertical direction; for non-overlapping image blocks, and arbitrarily select a non-overlapping image block as the target block ; With the target block As the center point, define a Search window ; In the search window, the area with similar gradient change to the target block is selected for matching through the similar matching function, so as to obtain the candidate block most similar to the target block; The similarity matching function is: ;in, For the search window Inner and target blocks The most similar candidate block, that is, the target block Non-overlapping image patches with minimal gradient differences; For the search window Inner and target blocks Similar non-overlapping image patches; The target block The gradient of For the search window Inner and target blocks Gradients of similar non-overlapping image patches; is the parameter that minimizes the gradient difference; is the sum of the squares of the gradient differences, i.e. the gradient With gradient The square of the Euclidean distance between them; is the index of the target block; The search window The most similar candidate block As matching blocks, all matching blocks are combined into a 3D image block dataset: ; The method for obtaining the image feature dataset includes: The 3D image block dataset is transformed 3D, and all matching blocks after the 3D transformation are denoised by an adaptive threshold. The adaptive threshold is: ; in, is the position in the frequency domain Adaptive threshold of is the adjustment factor for controlling the adaptive threshold amplitude; is a weight function based on human visual perception characteristics; is the horizontal coordinate of the frequency domain position; is the ordinate of the frequency domain position; for the weight function Conduct dynamic design; The denoised matching blocks will be reconstructed back to the position of the raw material image data to form the final denoised material image data and obtain the image feature data set. It should be noted that the design idea of the adaptive threshold is based on the characteristics of the material image data in the frequency domain, especially the distribution difference of noise and signal in the frequency domain. In the frequency domain, noise usually appears as a high-frequency component, while the signal is more concentrated in the low-frequency area. The traditional fixed threshold method is difficult to adapt to different types of image noise. For this reason, this scheme introduces an adaptive threshold to dynamically adjust the threshold size according to the frequency domain information of the image to adapt it to the characteristics of different frequency components to ensure the optimization of the denoising effect.
[0032] Weight function Methods for dynamic design include: The weight function is designed by the weight function formula For dynamic design, the weight function design formula is: ;in, is the total number of matching blocks; It is a parameter factor that controls the effect of frequency attenuation speed on weight; A constant factor that controls the effect of the total number of matching blocks on the weight; The parameter factor that controls the effect of frequency attenuation speed on weight is limited by the parameter factor formula To restrict the constraints, the parameter factor restriction formula is: ;in, is the parameter factor that controls the influence of the frequency attenuation speed on the weight after limitation; is the variance of the noise in the material table image, the variance of the noise The larger the value, the faster the frequency decays. should be enlarged; is the total number of non-overlapping image blocks; It should be noted that the design principle of the weight function design formula is based on the sensitivity of the human visual system to image information. The human visual system has different sensitivities to different frequency components in the image. It is usually more sensitive to low-frequency components (such as edges and textures) and less sensitive to high-frequency components (such as noise). Therefore, the weight function design formula is based on the denominator The term simulates the frequency attenuation characteristic, making the weight of the high-frequency area lower and the weight of the low-frequency area higher; a larger value will cause the weight of the high-frequency area to decay quickly, thereby more effectively suppressing high-frequency noise; and The overall amplitude of the weight function is adjusted together to ensure that the weight function can adapt to the richness of local features of different images.
[0033] When the noise is large, the parameter factor limiting formula increases Strengthen the attenuation of high frequency parts, so as to effectively remove noise. When the noise is small, the parameter factor limiting formula is reduced by Reduce the attenuation of high frequencies to avoid excessive denoising leading to loss of details; The larger the value, the more matching blocks there are, indicating higher matching quality, stronger similarity of image blocks, and more details can be retained during the denoising process. reduce; The smaller the size, the fewer matching blocks, indicating lower matching quality and possibly more noise. Increase and strengthen high-frequency attenuation.
[0034] For example, the parameter factor that controls the effect of frequency decay speed on weight is 0.5, the variance of the noise in the material table image is 10, the total number of non-overlapping image patches is 1024, the total number of matching blocks is 20; then the parameter factor of the influence of the control frequency attenuation speed on the weight after limitation .
[0035] The method for obtaining the comprehensive printing feature set includes: The image feature data set, the material feature data set and the mechanical motion feature data set are fused through a weighted formula to obtain a comprehensive printing feature set; The image feature dataset is denoted as , the material characteristic data set is recorded as , the mechanical motion feature dataset is recorded as ; The weighted formula is: ;in, For comprehensive printing feature set; is the weight coefficient of the image feature dataset; is the weight coefficient of the material characteristic data set; is the weight coefficient of the mechanical motion feature data set.
[0036] Evaluate the contribution of the normalized image feature dataset, material feature dataset, and mechanical motion feature dataset to predict the probability of printed material defects, and preset weight factors The initial value is 0.4, and the preset weight factor The initial value is 0.3, and the preset weight factor The initial value of is 0.3; cross-validation is used to evaluate the effects of different weight combinations. If a feature data set significantly improves the prediction effect of the probability of printed material defects (for example, its contribution to the prediction effect exceeds 50%), its weight is appropriately increased, otherwise its weight is reduced. The weight values of the normalized image feature data set, material feature data set, and mechanical motion feature data set are gradually optimized according to the predicted probability of printed material defects to ensure that the model can effectively adapt to the fluctuation of parameters during the printing process.
[0037] Methods for evaluating the probability of printed material defects based on a comprehensive set of printing characteristics include: By building a multimodal neural network model to predict the probability of printing material defects, the data features of different modes contained in the comprehensive printing feature set are jointly learned, and the related information is extracted for cross-modal fusion. Finally, the predicted probability of printing material defects is output through probability mapping. The material defect prediction model includes an input layer, a hidden layer and an output layer; the hidden layer uses the ReLU activation function; the input layer of the model is used to input the historical comprehensive printing feature set; the output layer of the model is used to output the corresponding printing material defect probability; the mean square error is used as the loss function to measure the error between the predicted value and the actual value of the model; the model parameters are updated through the back propagation algorithm and the gradient descent method to minimize the loss function; the Adam optimization algorithm is selected as the optimizer, and the hyperparameters of the model are adjusted until the performance no longer improves or the preset number of iterations is reached, and the trained multimodal neural network model is obtained; the current comprehensive printing feature set is input into the trained multimodal neural network model for prediction to obtain the printing material defect probability.
[0038] If the probability of printing material defects exceeds a preset threshold, the method includes: Preset a printing material defect probability threshold, and compare the predicted printing material defect probability with the preset printing material defect probability threshold; If the predicted probability of a printing material defect is less than a preset printing material defect probability threshold, it is determined that the printing material has no defect; If the predicted printing material defect probability is greater than or equal to a preset printing material defect probability threshold, it is determined that the printing material has defects.
[0039] Methods for obtaining the type of printed material defects include: If it is determined that the printed material has defects, the current image feature data set is collected, and a multi-layer perceptron is used to classify and identify the defect type; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer; the input layer is a historical image feature data set, and the output layer is the corresponding printed material defect type; the sigmoid function is used as the activation function; the binary cross entropy is used as the loss function to measure the error of the model prediction; the model parameters are updated through the back propagation algorithm to minimize the loss function; The SGD optimization algorithm is selected as the optimizer to tune the model; when the performance of the model in the prediction task reaches the preset performance threshold, the test is stopped to obtain a trained multi-layer perceptron; the trained multi-layer perceptron is used to classify and identify the current image feature data set to obtain the defect type of the printed material.
[0040] The preset printing material defect probability threshold is set by the staff, and different printing material defect probabilities are collected through the SLM printing material detection terminal, and the average value of multiple printing material defect probabilities is taken as the preset printing material defect probability threshold.
[0041] In this embodiment, by dividing the material surface image into small blocks and using the Sobel operator to calculate the gradient of each image block, the edge information and local features of the image can be effectively extracted, which is very helpful for the detection of material defects, because material defects often appear as local changes or discontinuities in the image. By calculating the gradient of each small block, these details can be accurately captured; by performing similar matching within the search window and selecting areas with similar gradient changes to the target block, the features of similar areas in the image can be effectively captured, and the influence of noise on feature extraction can be reduced, ensuring that the extracted features are more accurate and robust; the similar matching function optimizes the matching process by minimizing the gradient difference, thereby improving the accuracy of defect detection; by performing a three-dimensional transformation on the three-dimensional image block data set and combining it with adaptive threshold denoising, the noise can be effectively removed while retaining the useful information of the image. The design of the adaptive threshold is based on the human visual perception characteristics, so that the denoising process not only considers the noise level of the signal, but also considers the characteristics of visual perception, thereby optimizing the denoising effect. In this way, the structure and texture features of the image can be retained to the greatest extent, while removing noise and improving the image quality; by dynamically designing the weight function, the denoising intensity can be adjusted according to the different regions and frequency characteristics of the image. This dynamically designed weight function makes the denoising process more flexible, and can apply different denoising strategies in different image regions and different frequency domain positions, thereby improving the denoising effect and the ability to retain image details; By dynamically designing the weight function, the weight distribution in the denoising process can be adjusted according to different image characteristics (such as noise, frequency, total number of image blocks, etc.). This adaptability ensures that under different conditions, the denoising process can better adapt to the local characteristics of the image, especially in areas with strong noise, and can retain more effective information while removing unnecessary noise; by limiting the parameter factor that affects the frequency decay rate on the weight, the response to different frequencies in the denoising process can be precisely controlled. The lower frequency part usually contains more image structure information, while the higher frequency part is mostly noise. By adjusting the parameter factor, these frequency parts can be effectively weighted to ensure that the details of the image are preserved while reducing the impact of noise; by limiting and constraining the variance of the noise, it can be optimized according to the characteristics of the noise in the image; by controlling the total number of matching blocks, the matching effect of the image blocks can be optimized. In the case of strong noise or difficult matching, increasing the total number of matching blocks can provide more candidate blocks, thereby improving the accuracy of matching.
[0042] Example 2 See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a SLM printing material defect prediction system based on a visual algorithm is provided, including: A data acquisition unit, used to synchronously collect material image data, material parameter data and mechanical motion data during the SLM printing process; The image enhancement unit is used to segment the material image data into non-overlapping image blocks and extract the gradient information of each non-overlapping image block through the Sobel operator; based on the local search strategy and the gradient information, a similar matching function that minimizes the gradient difference is used to screen the candidate blocks with the most similar gradient changes between non-overlapping image blocks and construct a three-dimensional image block data set; A three-dimensional transformation unit performs three-dimensional transformation processing on the three-dimensional image block data set, designs a weight function based on human visual perception characteristics, dynamically generates an adaptive threshold, performs differential denoising processing on the three-dimensional image block data set, and obtains an image feature data set; The multimodal fusion unit removes outliers and normalizes standard deviations of material parameter data and mechanical motion data, obtains material feature data sets and mechanical motion feature data sets, and performs weighted fusion with the image feature data sets to form a comprehensive printing feature set; The evaluation and feedback unit evaluates the probability of printing material defects based on the comprehensive printing feature set; if the probability of printing material defects exceeds the preset threshold, classification and identification are performed based on the current image feature data set to obtain the type of printing material defects, and real-time feedback and early warning are provided through the SLM printing material detection terminal.
[0043] Since the electronic device introduced in this embodiment is an electronic device used to implement a method and system for predicting SLM printing material defects based on a visual algorithm in the embodiment of this application, based on the method and system for predicting SLM printing material defects based on a visual algorithm introduced in the embodiment of this application, a person skilled in the art can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not described in detail here. As long as a person skilled in the art implements the electronic device used by a method and system for predicting SLM printing material defects based on a visual algorithm in the embodiment of this application, it belongs to the scope of protection of this application.
[0044] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0045] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A method for predicting SLM printing material defects based on visual algorithms, characterized in that: include: S1, synchronously collect material image data, material parameter data and mechanical motion data during SLM printing; S2. Segment the material image data into non-overlapping image blocks, and extract the gradient information of each non-overlapping image block through the Sobel operator; based on the local search strategy, on the basis of the gradient information, a similarity matching function that minimizes the gradient difference is used to screen the candidate blocks with the most similar gradient changes between non-overlapping image blocks, and construct a three-dimensional image block data set; S3, performing three-dimensional transformation processing on the three-dimensional image block data set, and designing a weight function based on human visual perception characteristics, dynamically generating an adaptive threshold, performing differential denoising processing on the three-dimensional image block data set, and obtaining an image feature data set; S4, performing outlier elimination and standard deviation normalization processing on the material parameter data and mechanical motion data, obtaining a material feature data set and a mechanical motion feature data set, and performing weighted fusion with the image feature data set to form a comprehensive printing feature set; S5. evaluating the probability of printing material defects based on the comprehensive printing feature set; If the probability of printing material defects exceeds the preset threshold, classification and identification are performed based on the current image feature data set to obtain the type of printing material defects, and real-time feedback and early warning are provided through the SLM printing material detection terminal.
2. The SLM printing material defect prediction method based on visual algorithm according to claim 1, characterized in that: The material image data includes material surface images, multi-view images and thermal imaging images; the material parameter data includes material type, material batch and material density; the mechanical motion data includes printing platform motion state data, laser scanning speed, laser power and printing time.
3. The SLM printing material defect prediction method based on visual algorithm according to claim 2, characterized in that: The method for obtaining the three-dimensional image block data set includes: dividing the material image data into The size is The non-overlapping image blocks are used to calculate the gradient of each non-overlapping image block through the Sobel operator; non-overlapping image blocks, randomly select a non-overlapping image block as the target block; define a A search window is formed; within the search window, a region with similar gradient changes to the target block is selected for matching through a similar matching function, thereby obtaining a candidate block most similar to the target block; the most similar candidate block in the search window is used as a matching block, and all matching blocks are combined into a 3D image block dataset.
4. The SLM printing material defect prediction method based on visual algorithm according to claim 3, characterized in that: The method for acquiring the image feature data set includes: The 3D image block dataset is transformed 3D, and all matching blocks after the 3D transformation are denoised by an adaptive threshold. The adaptive threshold is: ;in, is the position in the frequency domain Adaptive threshold of is the adjustment factor for controlling the adaptive threshold amplitude; is a weight function based on human visual perception characteristics; is the horizontal coordinate of the frequency domain position; is the ordinate of the frequency domain position; for the weight function Conduct dynamic design; The denoised matching blocks will be reconstructed back to the position of the original material image data to form the final denoised material image data and obtain the image feature data set.
5. The SLM printing material defect prediction method based on visual algorithm according to claim 4, characterized in that: The weight function Methods for dynamic design include: The weight function is designed by the weight function formula For dynamic design, the weight function design formula is: ;in, is the total number of matching blocks; It is a parameter factor that controls the effect of frequency attenuation speed on weight; A constant factor that controls the effect of the total number of matching blocks on the weight; The parameter factor that controls the effect of frequency attenuation speed on weight is limited by the parameter factor formula To restrict the constraints, the parameter factor restriction formula is: ;in, is the parameter factor that controls the influence of the frequency attenuation speed on the weight after limitation; is the variance of the noise in the material image data; is the total number of non-overlapping image blocks.
6. The SLM printing material defect prediction method based on visual algorithm according to claim 5, characterized in that: The method for obtaining the comprehensive printing feature set includes: The image feature data set, the material feature data set and the mechanical motion feature data set are fused through a weighted formula to obtain a comprehensive printing feature set; The image feature dataset is denoted as , the material characteristic data set is recorded as , the mechanical motion feature dataset is recorded as ; The weighted formula is: ;in, For comprehensive printing feature set; is the weight coefficient of the image feature dataset; is the weight coefficient of the material characteristic data set; is the weight coefficient of the mechanical motion feature data set.
7. The SLM printing material defect prediction method based on visual algorithm according to claim 6, characterized in that: The method for evaluating the probability of printing material defects based on a comprehensive printing feature set includes: By building a multimodal neural network model to predict the probability of printing material defects, the data features of different modes contained in the comprehensive printing feature set are jointly learned, and the related information is extracted for cross-modal fusion. Finally, the predicted probability of printing material defects is output through probability mapping. The material defect prediction model includes an input layer, a hidden layer and an output layer; the hidden layer uses the ReLU activation function; the input layer of the model is used to input the historical comprehensive printing feature set; the output layer of the model is used to output the corresponding printing material defect probability; the mean square error is used as the loss function to measure the error between the predicted value and the actual value of the model; the model parameters are updated through the back propagation algorithm and the gradient descent method to minimize the loss function; the Adam optimization algorithm is selected as the optimizer, and the hyperparameters of the model are adjusted until the performance no longer improves or the preset number of iterations is reached, and the trained multimodal neural network model is obtained; the current comprehensive printing feature set is input into the trained multimodal neural network model for prediction to obtain the printing material defect probability.
8. The SLM printing material defect prediction method based on visual algorithm according to claim 7, characterized in that: The method for determining if the probability of a printing material defect exceeds a preset threshold comprises: Preset a printing material defect probability threshold, and compare the predicted printing material defect probability with the preset printing material defect probability threshold; If the predicted probability of a printing material defect is less than a preset printing material defect probability threshold, it is determined that the printing material has no defect; If the predicted printing material defect probability is greater than or equal to a preset printing material defect probability threshold, it is determined that the printing material has defects.
9. The method for predicting SLM printing material defects based on a visual algorithm according to claim 8, characterized in that: The method for obtaining the defect type of printing material comprises: If it is determined that the printed material has defects, the current image feature data set is collected, and a multi-layer perceptron is used to classify and identify the defect type; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer; the input layer is a historical image feature data set, and the output layer is the corresponding printed material defect type; the sigmoid function is used as the activation function; the binary cross entropy is used as the loss function to measure the error of the model prediction; the model parameters are updated through the back propagation algorithm to minimize the loss function; The SGD optimization algorithm is selected as the optimizer to tune the model; when the performance of the model in the prediction task reaches the preset performance threshold, the test is stopped to obtain a trained multi-layer perceptron; the trained multi-layer perceptron is used to classify and identify the current image feature data set to obtain the defect type of the printed material.
10. A SLM printing material defect prediction system based on a visual algorithm, which is based on a SLM printing material defect prediction method based on a visual algorithm as claimed in any one of claims 1 to 9, characterized in that: include: A data acquisition unit, used to synchronously collect material image data, material parameter data and mechanical motion data during the SLM printing process; An image enhancement unit is used to segment the material image data into non-overlapping image blocks and extract the gradient information of each non-overlapping image block through the Sobel operator; Based on the local search strategy and gradient information, a similar matching function that minimizes gradient differences is used to screen candidate blocks with the most similar gradient changes between non-overlapping image blocks, and a 3D image block dataset is constructed. A three-dimensional transformation unit performs three-dimensional transformation processing on the three-dimensional image block data set, designs a weight function based on human visual perception characteristics, dynamically generates an adaptive threshold, performs differential denoising processing on the three-dimensional image block data set, and obtains an image feature data set; The multimodal fusion unit removes outliers and normalizes standard deviations of material parameter data and mechanical motion data, obtains material feature data sets and mechanical motion feature data sets, and performs weighted fusion with the image feature data sets to form a comprehensive printing feature set; An evaluation feedback unit, which evaluates the probability of defects in printed materials based on a comprehensive printing feature set; If the probability of printing material defects exceeds the preset threshold, classification and identification are performed based on the current image feature data set to obtain the type of printing material defects, and real-time feedback and early warning are provided through the SLM printing material detection terminal.
Citation Information
Patent Citations
3D printing product prediction and optimization method and device based on SLM
CN117313569A
Layered manufacturing defect detection method based on machine vision
CN113393441A
Rapid metal printing system and method based on machine vision feedback
CN119457154A
Cited By
Aluminum alloy casting defect prediction method and equipment
CN120069241A
Metal powder characteristic analysis method in additive manufacturing process
CN121042569A