A method and system for predicting defects of SLM printing materials based on vision algorithms
Through a method based on vision algorithm, a three-dimensional image block data set is constructed and adaptive threshold denoising is performed, and weighted fusion is combined with material and mechanical motion feature data sets, which solves the accuracy and inefficiency of defect detection of SLM printing materials in the prior art, and achieves efficient and accurate defect prediction.
Patent Information
- Application Number
- CN202510300361.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-03-14
AI Technical Summary
The existing SLM printing material defect prediction methods and systems ignore local changes or detailed features in the image, have high calculation complexity, great noise impact, and cannot dynamically adjust the denoising intensity, resulting in inaccuracy and inefficient defect detection.
Using a method based on vision algorithm, the material image data, material parameter data and mechanical motion data are synchronized to collect material image data, material parameter data and mechanical motion data, non-overlapping image block segmentation and gradient information extraction are carried out, and the three-dimensional image block data set is constructed based on local search strategies and similar matching functions, three-dimensional transformation and adaptive threshold denoising processing are performed, image feature data sets are obtained, and weighted fusion with the material feature data set and mechanical motion feature data sets to evaluate the probability of printing material defects.
It improves the accuracy and efficiency of material defect detection, reduces the impact of noise on feature extraction, ensures image quality and defect detection accuracy, and reduces the calculation complexity and response time.
Smart Images

Figure CN119819945B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a method and system for predicting defects in SLM printing materials based on vision algorithms. Background Art
[0002] The 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 powders with a smaller particle diameter of the selected melting are used to obtain complex metal components with high degrees of freedom.
[0003] The patent application with the application publication number CN117313569A discloses a method and device for predicting and optimizing SLM 3D printed products. It includes obtaining SLM 3D printing data and constructing an SLM 3D printing data set, training an algorithm using the SLM 3D printing data set to obtain a deep association model, updating the SLM 3D printing data set and validating and optimizing the deep association model, receiving task information and analyzing it to obtain an analysis result, confirming the task attribute through the analysis result, and using the deep association model to perform prediction or / and optimization according to the task attribute to obtain a prediction result or / and an optimized solution. The present invention can not only predict defect conditions and product performance based on data such as materials and processes input by users, but also recommend optimized processes and obtain optimized product performance based on data such as materials, defects, and performance input by users, avoiding unqualified printing quality, repeated debugging of printing processes, and the huge waste caused thereby, greatly improving efficiency and reducing costs.
[0004] The existing methods and systems for predicting defects in SLM printing materials have the following main problems:
[0005] Ignoring local variations or detailed features in the image, material defects often manifest as local discontinuities or subtle changes. If these details are not accurately captured, the accuracy of defect detection will be greatly reduced, potentially leading to missed detections or false detections; without optimizing the matching process between image blocks, the algorithm has a high computational complexity and a long response time, thus affecting the efficiency of feature extraction; excessive noise will affect the local structure of the image, reducing the accuracy of defect detection and resulting in incorrect defect predictions; not considering the design of an adaptive threshold, the denoising process may ignore the visual perception characteristics of the image, making it impossible to balance noise removal and detail preservation during the denoising process. The structure and texture of the image may be over-smoothed, affecting the accurate detection of defects; unable to dynamically adjust the denoising intensity according to the different regions and frequency characteristics of the image, it may lead to ineffective removal of noise in some regions while excessive removal of details in other regions, both the quality of the image and the accuracy of defect detection will be affected; the design of the weight function is not fine enough, and the denoising intensity may not be accurately adjusted during the denoising process, resulting in over-denoising or under-denoising;
[0006] Unable 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 the image quality and the accuracy of defect detection; unable to optimize according to the noise characteristics of the image during the denoising process, resulting in more noise residues in the image, affecting subsequent defect detection; the influence of the total number of matching blocks and the noise variance is not considered, which may lead to over-strong denoising effects in some regions while insufficient denoising effects in other regions. Uneven denoising may cause the loss of local features of the image, affecting the accurate identification of defects.
[0007] In view of this, the present invention proposes a method and system for predicting defects in SLM printing materials based on a vision algorithm to solve the above problems. Summary of the Invention
[0008] To overcome the above-mentioned defects of the prior art and to achieve the above object, the present invention provides the following technical solution: A method for predicting defects in SLM printing materials based on a vision algorithm, comprising:
[0009] S1. Synchronously collect material image data, material parameter data, and mechanical motion data during the SLM printing process;
[0010] S2. Perform non-overlapping image block segmentation on the material image data, and extract the gradient information of each non-overlapping image block through the Sobel operator; based on a local search strategy, on the basis of the gradient information, use a similarity matching function that minimizes the gradient difference to screen candidate blocks with the most similar gradient changes between non-overlapping image blocks, and construct a three-dimensional image block data set;
[0011] S3. Perform three-dimensional transformation processing on the three-dimensional image block dataset, design a weight function based on the characteristics of human visual perception, dynamically generate an adaptive threshold, perform differential denoising processing on the three-dimensional image block dataset, and obtain an image feature dataset;
[0012] S4. Perform outlier removal and standard deviation normalization processing on the material parameter data and mechanical motion data, obtain a material feature dataset and a mechanical motion feature dataset, and perform weighted fusion with the image feature dataset to form a comprehensive printing feature set;
[0013] S5. Evaluate the probability of printing material defects based on the comprehensive printing feature set; if the probability of printing material defects exceeds the preset threshold, perform classification and recognition based on the current image feature dataset, obtain the types of printing material defects, and perform real-time feedback and warning through the SLM printing material detection terminal.
[0014] Further, 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.
[0015] Further, the method for obtaining the three-dimensional image block dataset includes: dividing the material image data into non-overlapping image blocks of size , calculating the gradient of each non-overlapping image block through the Sobel operator; for non-overlapping image blocks, arbitrarily select one non-overlapping image block as the target block; taking the target block as the center point, define a search window of size ; within the search window, select the area with similar gradient change to the target block through a similarity matching function for matching, and then obtain the candidate block most similar to the target block; take the most similar candidate block within the search window as the matching block, and form a three-dimensional image block dataset with all the matching blocks.
[0016] Further, the method for obtaining the image feature dataset includes:
[0017] Perform three-dimensional transformation on the three-dimensional image block dataset, and denoise all the matching blocks after the three-dimensional transformation through an adaptive threshold. The adaptive threshold is: ; where is the adaptive threshold at the frequency domain position ; is the adjustment factor for controlling the amplitude of the adaptive threshold; is the weight function based on the characteristics of human visual perception; is the abscissa of the frequency domain position; is the ordinate of the frequency domain position; for the weight function Perform dynamic design;
[0018] The denoised matching blocks will be reconstructed back to the positions of the raw material image data to form the final denoised material image data, obtaining the image feature dataset.
[0019] Furthermore, the method for performing dynamic design on the weight function includes:
[0020] Perform dynamic design on the weight function through the weight function design formula, and the weight function design formula is: ; where is the total number of matching blocks; is the parameter factor that controls the influence of the frequency attenuation rate on the weight; is the constant factor that controls the influence of the total number of matching blocks on the weight;
[0021] Perform limit constraint on the parameter factor that controls the influence of the frequency attenuation rate on the weight through the parameter factor limit formula, and the parameter factor limit formula is: ; where is the parameter factor that controls the influence of the frequency attenuation rate 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.
[0022] Furthermore, the method for obtaining the comprehensive printing feature set includes:
[0023] Fuse the image feature dataset, the material feature dataset, and the mechanical motion feature dataset through the weighting formula to obtain the comprehensive printing feature set;
[0024] Denote the image feature dataset as and denote the material feature dataset as and denote the mechanical motion feature dataset as ; the weighting formula is: ; where is the comprehensive printing feature set; is the weight coefficient of the image feature dataset; is the weight coefficient of the material feature dataset; is the weight coefficient of the mechanical motion feature dataset.
[0025] Furthermore, the method for evaluating the probability of printing material defects based on the comprehensive printing feature set includes:
[0026] Predict the probability of printing material defects by constructing a multi-modal neural network model, jointly learn the data features of different modalities contained in the comprehensive printing feature set, extract correlation information for cross-modal fusion, and finally output the predicted probability of printing material defects through probability mapping;
[0027] The material defect prediction model includes an input layer, a hidden layer, and an output layer; the ReLU activation function is used in the hidden layer; 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 probability of printing material defects; 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 backpropagation 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 reaches the preset number of iterations, and then the trained multi-modal neural network model is obtained; the current comprehensive printing feature set is input into the trained multi-modal neural network model for prediction to obtain the probability of printing material defects.
[0028] Furthermore, the method for the probability of printing material defects exceeding the preset threshold includes:
[0029] Set the preset probability threshold for printing material defects, and compare the predicted probability of printing material defects with the preset probability threshold for printing material defects;
[0030] If the predicted probability of printing material defects is less than the preset probability threshold for printing material defects, it is determined that the printing material has no defects;
[0031] If the predicted probability of printing material defects is greater than or equal to the preset probability threshold for printing material defects, it is determined that the printing material has defects.
[0032] Furthermore, the method for obtaining the type of printing material defects includes:
[0033] If it is determined that the printing material has defects, collect the current image feature dataset and use a multi-layer perceptron for defect type classification and recognition; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer; the input layer is the historical image feature dataset, and the output layer is the corresponding type of printing material defects; 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 backpropagation algorithm to minimize the loss function;
[0034] Select the SGD optimization algorithm as the optimizer to optimize the model; stop testing when the performance of the model in the prediction task reaches the preset performance threshold to obtain the trained multi-layer perceptron; use the trained multi-layer perceptron to classify and recognize the current image feature dataset to obtain the type of printing material defects.
[0035] An SLM printing material defect prediction system based on a vision algorithm, comprising:
[0036] A data acquisition unit, configured to synchronously collect material image data, material parameter data, and mechanical motion data during the SLM printing process;
[0037] An image enhancement unit, configured to perform non-overlapping image block segmentation on the material image data, extract gradient information of each non-overlapping image block through a Sobel operator; based on a local search strategy, on the basis of the gradient information, adopt a similarity matching function with the smallest gradient difference to screen candidate blocks with the most similar gradient changes between non-overlapping image blocks, and construct a three-dimensional image block data set;
[0038] A three-dimensional transformation unit, configured to perform three-dimensional transformation processing on the three-dimensional image block data set, and design a weight function based on human visual perception characteristics to dynamically generate an adaptive threshold, perform differential denoising processing on the three-dimensional image block data set, and obtain an image feature data set;
[0039] A multi-modal fusion unit, configured to perform outlier removal and standard deviation normalization processing on the material parameter data and the mechanical motion data, obtain a material feature data set and a mechanical motion feature data set, and perform weighted fusion with the image feature data set to form a comprehensive printing feature set;
[0040] An evaluation and feedback unit, configured to evaluate the probability of printing material defects according to the comprehensive printing feature set; if the probability of printing material defects exceeds a preset threshold, perform classification and recognition based on the current image feature data set to obtain the type of printing material defects, and perform real-time feedback and warning through an SLM printing material detection terminal.
[0041] The technical effects and advantages of the SLM printing material defect prediction method and system based on the vision algorithm of the present invention:
[0042] The present invention can effectively extract the edge information and local features of an image by segmenting 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. Since material defects often manifest 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 regions with gradient changes similar to the target block, the features of similar regions in the image can be effectively captured, reducing the influence of noise on feature extraction and ensuring that the extracted features are 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 dataset and combining it with adaptive threshold denoising, noise can be effectively removed while retaining the useful information in the image. The design of the adaptive threshold is based on the human visual system (HVS) model, enabling the denoising process to consider not only the noise level of the signal but also the characteristics of visual perception, thus optimizing the denoising effect. Through this method, the structural and texture features of the image can be maximally retained while removing noise and enhancing 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, capable of applying different denoising strategies in different image regions and different frequency domain positions, thereby improving the denoising effect and the ability to retain image details;
[0043] 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 features of the image. Especially in regions with strong noise, more effective information can be retained while removing unnecessary noise; by restricting the parameter factor that affects the weight by the frequency decay rate, 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 retained while reducing the influence of noise; by restricting and constraining the variance of the noise, optimization can be carried out 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 cases where the noise is strong or the matching is difficult, increasing the total number of matching blocks can provide more candidate blocks, thereby improving the matching accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic flow diagram of a method for predicting SLM printing material defects based on a vision algorithm according to the present invention;
[0045] Figure 2 Schematic diagram of the structure of a defect prediction system for SLM printing materials based on vision algorithms according to the present invention. Specific implementation manners
[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0047] Embodiment 1
[0048] Please refer to Figure 1 As shown, a method for predicting defects in SLM printing materials based on vision algorithms in this embodiment includes:
[0049] S1. Synchronously collect material image data, material parameter data, and mechanical motion data during the SLM printing process;
[0050] S2. Perform non-overlapping image block segmentation on the material image data, 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, use a similarity matching function with the minimum gradient difference 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;
[0051] S3. Perform three-dimensional transformation processing on the three-dimensional image block data set, and design a weight function based on the characteristics of human visual perception to dynamically generate an adaptive threshold, perform differential denoising processing on the three-dimensional image block data set, and obtain an image feature data set;
[0052] S4. Perform outlier removal and standard deviation normalization processing on the material parameter data and mechanical motion data to obtain a material feature data set and a mechanical motion feature data set, and perform weighted fusion with the image feature data set to form a comprehensive printing feature set;
[0053] S5. Evaluate the defect probability of the printing material according to the comprehensive printing feature set; if the defect probability of the printing material exceeds the preset threshold, perform classification and recognition based on the current image feature data set to obtain the type of defect of the printing material, and perform real-time feedback and warning through the SLM printing material detection terminal.
[0054] The material image data includes the material surface image, multi-view images, and thermal imaging images; the material parameter data includes the material type, material batch, and material density; the mechanical motion data includes the motion state data of the printing platform, laser scanning speed, laser power, and printing time.
[0055] Material image data provides visual information related to the material surface and temperature distribution during the SLM printing process, directly affecting the accuracy of defect prediction and analysis; material parameter data provides basic information about the materials used during the SLM printing process, and these data directly affect the printing quality and the occurrence of defects; mechanical motion data describes the dynamic behavior of each component of the SLM printing device during the printing process, directly affecting the accuracy of the printing process and the occurrence of defects.
[0056] It should be noted that: the data acquisition part of this solution covers material image data, material parameter data, and mechanical motion data. The roles of these data in the overall solution and their innovation are as follows:
[0057] Material image data
[0058] Including: material surface images, multi-view images, and thermal imaging images.
[0059] Role:
[0060] · Provide visual information on the material surface state during the printing process, serving as the main basis for defect detection;
[0061] · Multi-view images can reveal the subtle structural differences between printing layers and different positions in the printing area from different observation angles, avoiding key defects missed by single-view images;
[0062] · Thermal imaging images reflect the thermal distribution of the material during the printing process in real time, helping to identify defects caused by temperature anomalies (such as ablation, abnormal molten pools, pores, etc.).
[0063] Unique value:
[0064] This solution strengthens the information utilization rate of image data in defect recognition through non-overlapping image block segmentation, gradient information extraction, and local search matching algorithms. In particular, it uses a three-dimensional image block structure and a human visual perception (HVS) mechanism for dynamic weight adjustment and denoising optimization, enhancing the defect feature extraction effect of image data.
[0065] Material parameter data
[0066] Including: material type, material batch, and material density.
[0067] Role:
[0068] · Provide basic attribute information of the printing material itself. For example, different material types and batches have differences in physical properties (such as density, melting point, thermal conductivity, etc.), and these factors directly affect the molten pool state and material deposition behavior during the printing process;
[0069] · Variations in material batches may lead to differences in powder particle size or purity, resulting in changes in the probability of defects. By collecting material parameter data, parametric correlation between process states and defect prediction can be achieved;
[0070] · Material density data reflects the influence of material physical properties on the printing effect, which helps to correct or adjust the probability of defect occurrence.
[0071] Unique value:
[0072] In this solution, the weight distribution of material parameter data in the comprehensive printing feature set is relatively reasonable. Different from simply being used as static input parameters in the prior art, this solution realizes a dynamic feedback adjustment mechanism. Material parameter data affects the defect detection and judgment process, enhancing the flexibility and adaptability of the prediction model.
[0073] Mechanical motion data
[0074] Including: printing platform motion state data, laser scanning speed, laser power, and printing time.
[0075] Function:
[0076] · Reflect the real-time process parameters and operating states of the printing equipment at different time nodes, which are dynamic factors leading to printing anomalies;
[0077] · Laser power and laser scanning speed directly determine the intensity of the energy input to the molten pool. Excessive or too low values will cause defects such as pores, lack of fusion, and cracks in the printed layer;
[0078] · Printing time can dynamically analyze the distribution and evolution law of defects in different printing cycles;
[0079] · Printing platform motion state data can detect equipment vibration and displacement anomalies, and identify structural deviations or surface defects caused by mechanical instability.
[0080] Unique value:
[0081] This solution fuses the image feature dataset, material feature dataset, and mechanical motion feature dataset through a weighting formula. Different from only being used as separate control parameters in the prior art, mechanical motion data directly affects the process of estimating the probability of printing material defects in this solution, forming a multi-factor comprehensive weight calculation model, further improving the accuracy and credibility of the defect detection results.
[0082] The method for obtaining the three-dimensional image block dataset includes:
[0083] Dividing the material image data into non-overlapping image blocks of size and calculating the gradient of each non-overlapping image block through the Sobel operator , used to guide block matching search; among them, is the gradient of the th non-overlapping image block; is the horizontal gradient component of the non-overlapping image block , reflecting the brightness change of the non-overlapping image block in the horizontal direction; is the vertical gradient component of the non-overlapping image block , reflecting the brightness change of the non-overlapping image block in the vertical direction; is the th non-overlapping image block; is the index of the non-overlapping image block; is the horizontal direction; is the vertical direction;
[0084] For non-overlapping image blocks, randomly select one non-overlapping image block as the target block ; taking the target block as the center point, define a search window with a size of ; within the search window, select the region with similar gradient change to the target block through the similarity matching function for matching, and then obtain the candidate block most similar to the target block;
[0085] The similarity matching function is: ; among them, is the candidate block most similar to the target block within the search window , that is, the non-overlapping image block with the smallest gradient difference from the target block ; is the non-overlapping image block similar to the target block within the search window ; is the gradient of the target block ; is the gradient of the non-overlapping image block similar to the target block within the search window ; is the parameter to minimize the gradient difference; is the sum of the squares of the gradient differences, that is, the square of the Euclidean distance between the gradient and the gradient ; is the index of the target block;
[0086] Take the candidate block most similar within the search window as the matching block, and form a three-dimensional image block dataset with all matching blocks: ; ;
[0087] The method for obtaining the image feature dataset includes:
[0088] Performing a three-dimensional transformation on the three-dimensional image block dataset, and denoising all the matching blocks after the three-dimensional transformation through an adaptive threshold. The adaptive threshold is: ;
[0089] Wherein, is the adaptive threshold at the frequency domain position ; is the adjustment factor for controlling the amplitude of the adaptive threshold; is the weight function based on the characteristics of human visual perception; is the abscissa of the frequency domain position; is the ordinate of the frequency domain position; Dynamically designing the weight function ;
[0090] The denoised matching blocks will be reconstructed back to the position of the raw material image data to form the finally denoised material image data, and the image feature dataset is obtained. 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 between noise and signal in the frequency domain. In the frequency domain, noise usually appears as high-frequency components, while signals are more concentrated in the low-frequency region. The traditional fixed threshold method is difficult to adapt to different types of image noise. Therefore, in this solution, by introducing an adaptive threshold, the threshold size is dynamically adjusted according to the frequency domain information of the image to make it adapt to the characteristics of different frequency components to ensure the optimization of the denoising effect.
[0091] The method for dynamically designing the weight function includes:
[0092] Dynamically designing the weight function through the weight function design formula. The weight function design formula is: ; Wherein, is the total number of matching blocks; is the parameter factor for controlling the influence of the frequency attenuation rate on the weight; is the constant factor for controlling the influence of the total number of matching blocks on the weight;
[0093] Restricting and constraining the parameter factor for controlling the influence of the frequency attenuation rate on the weight through the parameter factor restriction formula. The parameter factor restriction formula is: ; Wherein, is the parameter factor for controlling the influence of the frequency attenuation rate on the weight after restriction; is the variance of the noise in the material table image. The larger the variance of the noise, the faster the frequency attenuation rate should be, then should increase; is the total number of non - overlapping image blocks;
[0094] 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 an image. Generally, it is 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 simulates the frequency attenuation characteristic through the term in the denominator, making the weight in the high - frequency region lower and the weight in the low - frequency region higher; a larger value will cause the weight in the high - frequency region to decay rapidly, thus more effectively suppressing high - frequency noise; and jointly adjust the overall amplitude of the weight function to ensure that the weight function can adapt to the richness of different local features of the image.
[0095] When the noise is large, the parameter factor limit formula strengthens the attenuation of the high - frequency part by increasing , thus effectively removing the noise. When the noise is small, the parameter factor limit formula reduces the attenuation of the high - frequency part by decreasing to avoid detail loss caused by excessive denoising; The larger , the more matching blocks, indicating a higher matching quality and stronger similarity of the image blocks. More details can be retained in the denoising process. Therefore, is reduced; The smaller
[0096] , the fewer matching blocks, indicating a lower matching quality and possibly more noise. Therefore, is increased to strengthen the high - frequency attenuation. For example, the parameter factor that controls the influence of the frequency attenuation speed on the weight is 0.5, the variance of the noise in the material table image is 10, the total number of non - overlapping image blocks is 1024, and the total number of matching blocks
[0097] The method for obtaining the comprehensive printing feature set includes:
[0098] Fusing the image feature dataset, the material feature dataset, and the mechanical motion feature dataset through a weighted formula to obtain the comprehensive printing feature set;
[0099] Denote the image feature dataset as , denote the material feature dataset as , and denote the mechanical motion feature dataset as ; The weighted formula is: ; where, is the comprehensive printing feature set; is the weight coefficient of the image feature data set; is the weight coefficient of the material feature data set; is the weight coefficient of the mechanical motion feature data set.
[0100] Evaluate the contributions of the normalized image feature data set, material feature data set, and mechanical motion feature data set to the prediction of the probability of printing material defects. Preset the initial value of the weight factor to be 0.4, and the preset weight factor to be 0.3, and the preset weight factor to be 0.3; Use cross-validation to evaluate the effects of different weight combinations. If a certain feature data set significantly improves the prediction effect of the probability of printing material defects (such as the contribution to the prediction effect exceeds 50%), then appropriately increase its weight, otherwise decrease the weight. Gradually optimize the weight values of the normalized image feature data set, material feature data set, and mechanical motion feature data set according to the predicted probability of printing material defects to ensure that the model can effectively adapt to the fluctuations of parameters during the printing process.
[0101] The method for evaluating the probability of printing material defects based on the comprehensive printing feature set includes:
[0102] Predict the probability of printing material defects by constructing a multi-modal neural network model, jointly learn the data features of different modalities included in the comprehensive printing feature set, extract associated information for cross-modal fusion, and finally output the predicted probability of printing material defects through probability mapping;
[0103] The material defect prediction model includes an input layer, a hidden layer, and an output layer; The ReLU activation function is used in the hidden layer; 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 probability of printing material defects; Use the mean square error as the loss function to measure the error between the predicted value and the actual value of the model; Update the model parameters through the backpropagation algorithm and the gradient descent method to minimize the loss function; Select the Adam optimization algorithm as the optimizer, adjust the hyperparameters of the model until the performance no longer improves or reaches the preset number of iterations, and obtain the trained multi-modal neural network model; Input the current comprehensive printing feature set into the trained multi-modal neural network model for prediction to obtain the probability of printing material defects.
[0104] The method for the probability of printing material defects exceeding the preset threshold includes:
[0105] Preset the threshold of the probability of printing material defects, and compare the predicted probability of printing material defects with the preset threshold of the probability of printing material defects;
[0106] If the predicted defect probability of the printing material is less than the preset defect probability threshold of the printing material, it is determined that the printing material has no defect;
[0107] If the predicted defect probability of the printing material is greater than or equal to the preset defect probability threshold of the printing material, it is determined that the printing material has a defect.
[0108] The method for obtaining the defect type of the printing material includes:
[0109] If it is determined that the printing material has a defect, collect the current image feature dataset and use a multi-layer perceptron for defect type classification and recognition; the multi-layer perceptron includes an input layer, a hidden layer, and an output layer; the input layer is the historical image feature dataset, and the output layer is the corresponding defect type of the printing material; use the sigmoid function as the activation function; use binary cross-entropy as the loss function to measure the error of the model prediction; update the model parameters through the backpropagation algorithm to minimize the loss function;
[0110] Select the SGD optimization algorithm as the optimizer to optimize the model; stop the test when the performance of the model in the prediction task reaches the preset performance threshold to obtain a trained multi-layer perceptron; use the trained multi-layer perceptron to classify and recognize the current image feature dataset to obtain the defect type of the printing material.
[0111] The preset defect probability threshold of the printing material is set by the staff. Different defect probabilities of the printing material are collected through the SLM printing material detection terminal, and the average value of multiple defect probabilities of the printing material is taken as the preset defect probability threshold of the printing material.
[0112] 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. Since material defects often manifest 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 the regions with similar gradient changes to the target block, the features of similar regions 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 dataset and combining adaptive threshold denoising, noise can be effectively removed while retaining the useful information of the image. The design of the adaptive threshold is based on the characteristics of human visual perception, 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. By this method, the structural 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 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;
[0113] 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 features of the image. Especially in regions with strong noise, more effective information can be retained while removing unnecessary noise; by restricting the parameter factor that affects the weight by the frequency decay rate, 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 retained while reducing the influence of noise; by restricting and constraining the variance of the noise, optimization can be performed 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 matching accuracy.
[0114] Embodiment 2
[0115] Please refer to Figure 2 As shown, for the parts not described in detail in this embodiment, refer to the description content of Embodiment 1. A SLM printing material defect prediction system based on a vision algorithm is provided, including:
[0116] A data acquisition unit, configured to synchronously collect material image data, material parameter data, and mechanical motion data during the SLM printing process;
[0117] An image enhancement unit, configured to perform non-overlapping image block segmentation on the material image data, extract the gradient information of each non-overlapping image block through a Sobel operator; based on a local search strategy, on the basis of the gradient information, adopt a similarity matching function with the minimum gradient difference to screen candidate blocks with the most similar gradient changes between non-overlapping image blocks, and construct a three-dimensional image block data set;
[0118] A three-dimensional transformation unit, which performs three-dimensional transformation processing on the three-dimensional image block data set, designs a weight function based on the characteristics of human visual perception, dynamically generates an adaptive threshold, performs differential denoising processing on the three-dimensional image block data set, and obtains an image feature data set;
[0119] A multi-modal fusion unit, which performs outlier rejection and standard deviation normalization processing on the material parameter data and the mechanical motion data, obtains a material feature data set and a mechanical motion feature data set, and performs weighted fusion with the image feature data set to form a comprehensive printing feature set;
[0120] An evaluation and feedback unit, which evaluates the probability of printing material defects based on the comprehensive printing feature set; if the probability of printing material defects exceeds a preset threshold, it performs classification and recognition based on the current image feature data set to obtain the type of printing material defects, and performs real-time feedback and warning through the SLM printing material detection terminal.
[0121] Since the electronic device introduced in this embodiment is the electronic device used to implement the method and system for predicting SLM printing material defects based on a vision algorithm in the embodiments of the present application, based on the method and system for predicting SLM printing material defects based on a vision algorithm introduced in the embodiments of the present application, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, the specific implementation of how this electronic device implements the method in the embodiments of the present application will not be described in detail here. As long as those skilled in the art implement the electronic device used in the method and system for predicting SLM printing material defects based on a vision algorithm in the embodiments of the present application, it falls within the scope protected by the present application.
[0122] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to obtain a formula that is closest to the actual situation. The preset parameters and threshold selection in the formulas are set by those skilled in the art according to the actual situation.
[0123] The above are only the preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. Any technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements should also be regarded as within 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; The method for acquiring the three-dimensional image block data set includes: The material image data is divided into N non-overlapping image blocks of size n×n, and the gradient of each non-overlapping image block is calculated by the Sobel operator; for the N non-overlapping image blocks, one non-overlapping image block is randomly selected as the target block; with the target block as the center point, a search window of size w×w is defined; within the search window, the region with similar gradient changes to the target block is selected for matching through a similar matching function, and then the candidate block most similar to the target block is obtained; the most similar candidate block in the search window is used as the matching block, and all matching blocks are combined into 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; The method for acquiring the image feature data set includes: The three-dimensional image block data set is transformed three-dimensionally, and all matching blocks after the three-dimensional transformation are denoised by an adaptive threshold. The adaptive threshold is: τ(u,v) = β·HVS(u,v); where τ(u,v) is the adaptive threshold at the frequency domain position (u,v); β is the adjustment factor for controlling the amplitude of the adaptive threshold; HVS(u,v) is a weight function based on human visual perception characteristics; u is the horizontal coordinate of the frequency domain position; v is the vertical coordinate of the frequency domain position; the weight function HVS(u,v) is dynamically designed; 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; 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.
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 dynamically designing the weight function HVS(u,v) comprises: The weight function HVS(u,v) is dynamically designed through the weight function design formula, and the weight function design formula is: Wherein, M is the total number of matching blocks; α is the parameter factor that controls the influence of the frequency attenuation speed on the weight; ω is the constant factor that controls the influence of the total number of matching blocks on the weight; The parameter factor α that controls the influence of the frequency attenuation speed on the weight is constrained by the parameter factor restriction formula. The parameter factor restriction formula is: Among them, α' is the parameter factor of the influence of the control frequency attenuation speed on the weight after limitation; σ 2 is the variance of the noise in the material image data; N is the total number of non-overlapping image blocks.
4. The SLM printing material defect prediction method based on visual algorithm according to claim 3, characterized in that: The method for obtaining the comprehensive printing feature set includes: fusing the image feature data set, the material feature data set and the mechanical motion feature data set through a weighted formula to obtain the comprehensive printing feature set; The image feature data set is denoted as F1, the material feature data set is denoted as F2, and the mechanical motion feature data set is denoted as F3; the weighted formula is: TH=F1·δ1+F2·δ2+F3·δ3; wherein TH is the comprehensive printing feature set; δ1 is the weight coefficient of the image feature data set; δ2 is the weight coefficient of the material feature data set; δ3 is the weight coefficient of the mechanical motion feature data set.
5. The SLM printing material defect prediction method based on visual algorithm according to claim 4, characterized in that: The method for evaluating the probability of a printed material defect based on a comprehensive printing feature set comprises: 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.
6. The SLM printing material defect prediction method based on visual algorithm according to claim 5, 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.
7. The SLM printing material defect prediction method based on visual algorithm according to claim 6, 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.
8. 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 7, 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