Machine learning based probabilistic assessment of internal defects in metal additive
By using multi-source data fusion and multi-modal feature extraction networks, the problems of high CT inspection cost and insufficient model reliability in metal additive manufacturing are solved. Part-level defect probability assessment and sampling optimization are realized, which reduces inspection cost and improves inspection reliability and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGSHU INSTITUTE OF TECHNOLOGY
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, internal defect detection in metal additive manufacturing relies on CT sampling, which is costly and time-consuming. Furthermore, the process monitoring results are difficult to reliably quantify defect risks, and machine learning models are not reliable enough when materials, equipment, or processes drift.
Multi-source data, including molten pool image signals, photoelectric signals, and acoustic signals, are time-aligned and preprocessed to construct a multimodal feature extraction network, generate a set of defect probability prediction models, and output part-level defect probabilities and uncertainties by fusing weights. The sampling priority score is generated by combining the dispersion of the multi-model outputs, which triggers CT sampling or release judgment.
Achieving quantitative assessment of defect risks under conditions with little or no CT reduces inspection costs, improves the reliability of release decisions and sampling efficiency, adapts to fluctuations in operating conditions and noise, and enhances the robustness and reliability of the model.
Smart Images

Figure CN122153595A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of process monitoring and quality inspection in metal additive manufacturing (3D printing), and particularly to a machine learning-based method for assessing the probability of internal defects in metal additive manufacturing. Background Technology
[0002] Metal additive manufacturing (such as selective laser melting (SLM), electron beam melting (EBM), and directed energy deposition (DED) enables the integrated manufacturing of complex structural parts and has been applied in aerospace, energy and power, and medical implantation fields. With the development of processes and equipment, the industry's demand for consistent and traceable quality control of parts is constantly increasing. Internal defects (such as porosity, lack of fusion, and inclusions) are key factors affecting fatigue life and strength, and typically require verification through non-destructive testing methods. Currently, in engineering practice, computed tomography (CT) is widely used for quality inspection of additive parts because it can acquire information on internal three-dimensional defects. Simultaneously, process monitoring technologies aimed at cost reduction and efficiency improvement are also developing. These technologies collect printing process data through methods such as molten pool imaging, photoelectric sensing, and acoustic sensing, and combine them with feature extraction, statistical discrimination, or machine learning methods to achieve anomaly identification and quality prediction.
[0003] However, existing technologies still have the following shortcomings:
[0004] 1. CT inspection is costly, has a long inspection cycle, and limited equipment resources. It often adopts a sampling inspection method, which makes it difficult to cover all parts and meet the efficiency requirements of mass production.
[0005] 2. Process monitoring methods based on single sensor signals or rule thresholds are sensitive to fluctuations in operating conditions, noise, and parameter changes. Furthermore, the mapping relationship between process signals and internal defects is complex, making it difficult to achieve stable and reliable defect risk quantification.
[0006] 3. Existing machine learning-based defect prediction solutions often rely on a large amount of CT annotation data for supervised training. The cost of obtaining annotations is high, and the reliability of the model is insufficient when materials, equipment or processes drift. There is a lack of effective support for prediction uncertainty and sampling strategies.
[0007] Therefore, there is a need for a method to assess the probability of internal defects in metal additive manufacturing that can address the shortcomings of the existing technologies. Summary of the Invention
[0008] One objective of this invention is to propose a machine learning-based method for assessing the probability of internal defects in metal additive manufacturing. Addressing the problems of high costs, long cycles, and difficulty in achieving full coverage due to reliance on CT sampling for internal defect detection in existing technologies, as well as the difficulty in consistently quantifying defect risk using process monitoring results, this invention proposes a technical solution that uses at least two types of process data, such as molten pool image signals, photoelectric signals, and acoustic signals, as input. The multi-source process data undergoes time alignment, segmentation, and preprocessing. A set of defect probability prediction models is constructed using a trained multimodal feature extraction network. The defect probability of sample segments is output, and the probability of part-level defects is obtained by fusing weights. Simultaneously, uncertainty is calculated based on the dispersion of the multi-model outputs, thereby forming a sampling priority score to trigger CT sampling or release decision. The model can be trained through multimodal contrastive learning and semi-supervised consistency learning, combined with active sampling closed-loop updates. This invention achieves the technical effects of quantitative assessment of defect risk under conditions of little or no CT, reducing detection costs, and improving the reliability of release decisions.
[0009] This invention provides a machine learning-based method for evaluating the probability of internal defects in metal additive manufacturing, comprising:
[0010] S1. During the metal additive manufacturing process, process data corresponding to the target part is collected, including at least two of the following: molten pool image signals, photoelectric signals, and acoustic signals. Alignment processing is performed to obtain alignment process data. S2. The alignment process data is segmented and preprocessed to obtain a set of target sample segments. S3. For the set of target sample segments, a set of trained defect probability prediction models is used to process each target sample segment to obtain the defect probability output corresponding to each defect probability prediction model. Each defect probability prediction model includes a trained multimodal feature extraction network used to convert the modal signals in the process data into multimodal feature vectors. The defect probability prediction model is based on multimodal... S4. Based on the defect probability output, the defect probability output is fused using the trained fusion weights to obtain the defect occurrence probability of the target part; S5. Based on the dispersion between the defect probability outputs, the uncertainty of the target part is generated; S6. Based on the defect occurrence probability and uncertainty, the sampling priority score of the target part is generated, and the sampling priority score is compared with the preset sampling threshold: when the sampling priority score is not less than the preset sampling threshold, a computed tomography (CT) sampling instruction is output; when the sampling priority score is less than the preset sampling threshold, the defect occurrence probability is compared with the preset release threshold and the release judgment result of the target part is output.
[0011] Optionally, S1 includes:
[0012] In the metal additive manufacturing process, process data corresponding to the target part are collected by an imaging sensor for acquiring molten pool image signals, a photoelectric sensor for acquiring photoelectric signals, and an acoustic sensor for acquiring acoustic signals.
[0013] A unified time base time stamp is added to the molten pool image signal, the photoelectric signal, and the acoustic signal, and the time is synchronized to the molten pool image signal, the photoelectric signal, and the acoustic signal according to the time stamp;
[0014] The outlier processing is performed on the melt pool image signal, the photoelectric signal and the acoustic signal after time synchronization is completed. The outlier processing includes identifying data points that exceed the preset physical range as outliers and removing or replacing them.
[0015] Output the alignment process data after time synchronization and outlier handling.
[0016] Optionally, S2 includes:
[0017] Based on a preset time window or a preset scan length, multiple consecutive segmentation intervals are determined in the alignment process data;
[0018] Within each segmentation interval, the corresponding molten pool image signal, photoelectric signal, and acoustic signal are extracted to form a target sample segment corresponding to that segmentation interval.
[0019] Normalization is performed on each target sample segment, the normalization process including amplitude scaling of photoelectric signals and acoustic signals and pixel value scaling of molten pool image signals;
[0020] Denoising processing is performed on each target sample segment after normalization, the denoising processing including filtering of photoelectric signals and acoustic signals and image filtering of molten pool image signals;
[0021] All target sample segments that have undergone normalization and denoising are compiled into a target sample segment set.
[0022] Optionally, S3 includes:
[0023] For each target sample segment, each defect probability prediction model in the trained defect probability prediction model set performs the following processing: Using the trained multimodal feature extraction network in the defect probability prediction model, corresponding modal feature vectors are extracted from at least two modal signals in the target sample segment. Specifically, when the target sample segment contains a melt pool image signal, an image feature vector is extracted; when the target sample segment contains a photoelectric signal, a photoelectric feature vector is extracted; and when the target sample segment contains an acoustic signal, an acoustic feature vector is extracted. The extracted at least two types of modal feature vectors are combined into a multimodal feature vector according to a preset fusion method. Based on the multimodal feature vector, the defect probability prediction model outputs the defect probability of the target sample segment. The defect probabilities output by each defect probability prediction model in the trained defect probability prediction model set for each target sample segment are aggregated into the defect probability output corresponding to each defect probability prediction model.
[0024] Optionally, S4 includes:
[0025] Based on the defect probability output corresponding to each defect probability prediction model, for each defect probability prediction model in the defect probability prediction model set, the defect probability output by the defect probability prediction model for each target sample segment in the target sample segment set is converted into the part-level defect probability corresponding to the defect probability prediction model. The conversion includes calculating the product of the complementary values of each defect probability and taking the complement of the product to obtain the part-level defect probability. The trained fusion weights are normalized to obtain normalized fusion weights. The normalization process includes scaling each fusion weight proportionally by the sum of each fusion weight. The part-level defect probabilities corresponding to each defect probability prediction model are weighted and fused according to the normalized fusion weights to obtain the defect occurrence probability of the target part.
[0026] Optionally, S5 includes:
[0027] The defect probability outputs corresponding to each defect probability prediction model are statistically analyzed to obtain a defect probability set for the same target sample segment. The dispersion of the defect probability is calculated for the defect probability set, and the dispersion includes the variance or standard deviation of the defect probability. The dispersion corresponding to each target sample segment in the target sample segment set is aggregated to obtain the uncertainty of the target part. The aggregation includes taking the maximum value or the mean value of each dispersion.
[0028] Optionally, S6 includes:
[0029] Based on the defect occurrence probability and the uncertainty, a sampling priority score is calculated according to a preset scoring function, where the scoring function is a weighted sum of the defect occurrence probability and the uncertainty, and each weight is a preset constant. The sampling priority score is compared with a preset sampling threshold. When the sampling priority score is not less than the preset sampling threshold, a computed tomography (CT) scan sampling instruction is output and the target part is marked as a CT scan sampling object. When the sampling priority score is less than the preset sampling threshold, the defect occurrence probability is compared with a preset release threshold. When the defect occurrence probability is less than the preset release threshold, a release decision result is output; when the defect occurrence probability is not less than the preset release threshold, a non-release decision result is output.
[0030] Furthermore, an out-of-distribution discrimination score is calculated based on the multimodal feature vector. The out-of-distribution discrimination score includes Mahalanobis distance. When the out-of-distribution discrimination score is greater than a preset out-of-distribution threshold, the sampling priority score is set to be no less than the preset sampling threshold.
[0031] On the other hand, the present invention also provides a model training method, comprising:
[0032] T1. Collect process data of the training part set during the metal additive manufacturing process, and obtain computed tomography (CT) scan results corresponding to at least some of the training parts in the training part set. The process data includes at least two of the following: molten pool image signals, photoelectric signals, and acoustic signals. Generate a sample fragment set based on the process data. T2. Generate internal defect labels corresponding to at least some of the sample fragments in the sample fragment set based on the CT scan results, and divide the sample fragment set into labeled sample sets and unlabeled sample sets. T3. Based on the labeled and unlabeled sample sets, train a multimodal feature extraction network using multimodal contrastive learning to make the different modal feature representations of the same sample fragment similar to each other and the feature representations of different sample fragments dissipate from each other, thus obtaining the trained multimodal feature extraction network. T4. Construct a defect probability prediction model set based on the trained multimodal feature extraction network, and perform semi-supervised consistency learning training on the defect probability prediction model set. The semi-supervised consistency learning training includes: training the labeled sample set... The process involves: 1) Calculating the supervised loss based on internal defect labels; 2) Applying different perturbations or data augmentations to the unlabeled sample set to obtain corresponding defect probability outputs; 3) Calculating the consistency loss between defect probability outputs; 4) Updating the model parameters of the defect probability prediction model set based on the weighted sum of the supervised loss and the consistency loss; 5) Processing the labeled sample set through each defect probability prediction model in the trained defect probability prediction model set to obtain defect probability outputs; 6) Determining the fusion weights based on the fitting error between the defect probability outputs and the internal defect labels; 7) Calculating the probability and uncertainty of defect occurrence for candidate training parts, and determining the CT scan sampling objects accordingly; 8) Obtaining CT scan detection results for the determined CT scan sampling objects and generating new internal defect labels; 9) Adding the sample fragments corresponding to the new internal defect labels to the labeled sample set; and 10) Updating the defect probability prediction model set and fusion weights based on the updated labeled sample set.
[0033] Furthermore, in T6, determining the sampled parts for computed tomography scans includes: calculating the acquisition function of candidate training parts, wherein the acquisition function is a weighted sum of the probability of defect occurrence, uncertainty and diversity score, wherein the diversity score is determined based on the clustering results of the multimodal feature vectors of the candidate training parts, and selecting the candidate training parts with the largest acquisition function as the sampled parts under a preset sampling budget constraint.
[0034] The beneficial effects of this invention are:
[0035] 1. Without performing CT or only performing a small number of CT verifications on high-risk samples, the probability of internal defects at the part level is output based on multi-source process data such as molten pool images, photoelectric and acoustic data, and a release / non-release decision is given, realizing a release strategy with no or few CTs, thereby significantly reducing inspection costs and shortening the inspection cycle.
[0036] 2. By integrating the output of the defect probability prediction model set and weighting the fusion, and generating uncertainty based on the dispersion of the multi-model output, the evaluation results can simultaneously have the characteristics of "risk probability + confidence level", thereby improving the robustness and reliability of the judgment under operating condition fluctuations, noise and model bias.
[0037] 3. Based on the probability and uncertainty of defect occurrence, a sampling priority score is generated to trigger CT sampling instructions and perform closed-loop updates in combination with newly added CT labels, so as to realize active sampling and model self-iterative optimization, and improve sampling efficiency and model generalization ability under limited CT budget. Attached Figure Description
[0038] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0039] Figure 1 This is a schematic flowchart of a machine learning-based method for evaluating the probability of internal defects in metal additive manufacturing, as proposed in this invention.
[0040] Figure 2 This is a schematic flowchart of the model training method proposed in this invention. Detailed Implementation
[0041] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0042] refer to Figure 1 A machine learning-based method for assessing the probability of internal defects in metal additive manufacturing includes:
[0043] S1. During the metal additive manufacturing process, process data corresponding to the target part is collected, including at least two of the following: molten pool image signals, photoelectric signals, and acoustic signals. Alignment processing is performed to obtain alignment process data. S2. The alignment process data is segmented and preprocessed to obtain a set of target sample segments. S3. For the set of target sample segments, a set of trained defect probability prediction models is used to process each target sample segment to obtain the defect probability output corresponding to each defect probability prediction model. Each defect probability prediction model includes a trained multimodal feature extraction network used to convert the modal signals in the process data into multimodal feature vectors. The defect probability prediction model is based on multimodal... S4. Based on the defect probability output, the defect probability output is fused using the trained fusion weights to obtain the defect occurrence probability of the target part; S5. Based on the dispersion between the defect probability outputs, the uncertainty of the target part is generated; S6. Based on the defect occurrence probability and uncertainty, the sampling priority score of the target part is generated, and the sampling priority score is compared with the preset sampling threshold: when the sampling priority score is not less than the preset sampling threshold, a computed tomography (CT) sampling instruction is output; when the sampling priority score is less than the preset sampling threshold, the defect occurrence probability is compared with the preset release threshold and the release judgment result of the target part is output.
[0044] In this specific embodiment, S1 includes:
[0045] Acquire and align molten pool image signals, photoelectric signals, and acoustic signals using the same time base;
[0046] The controller of the metal additive manufacturing equipment provides a unified time base, and its hardware counting clock frequency is set to 100 MHz. The controller outputs a hardware trigger pulse at the beginning of each laser scan and simultaneously resets the counter as the acquisition start point.
[0047] The imaging sensor uses a coaxial fused pool camera configured for grayscale output, with a frame rate set to 5 kHz and an exposure time set to... Each frame of the molten pool image latches a counter reading as a time marker for that frame at the moment the trigger arrives;
[0048] The photoelectric sensor uses a photodiode directly connected to the acquisition card and samples at 200 kHz to obtain photoelectric signals. The acoustic sensor uses a piezoelectric sensor directly connected to the acquisition card and samples at 200 kHz to obtain acoustic signals. Each sampling point of the photoelectric signal and the acoustic signal latches the same counter reading as a time marker when the acquisition card sampling is interrupted, thereby ensuring that the three types of signals share the same time marker source.
[0049] To achieve time synchronization, this embodiment uses the frame period of the imaging sensor as the alignment reference and constructs a unified alignment time sequence, which satisfies... ,in Indicates the first One alignment moment, This indicates the data acquisition start time corresponding to the hardware trigger pulse. This indicates an alignment index that increments starting from 0. This represents the alignment time step and is the time interval between two adjacent frames of the imaging sensor.
[0050] Then, each frame of the molten pool image is directly mapped to its nearest alignment moment. Within each alignment time step, the photoelectric and acoustic signals are windowed and converged to generate a signal that matches the alignment time step. One-to-one aligned sampled values, where the window boundary is taken as the midpoint of adjacent alignment times to avoid overlap and omission. If a sample point is missing in a certain time window, the nearest valid sample point in the adjacent time window is used for forward filling to keep the time series length consistent.
[0051] After time synchronization is completed, outlier handling is performed. Pixels with values less than 0 or greater than 255 in the molten pool image signal are identified as outliers and truncated to 0 or 255 according to the boundary value. Sampling points with voltage values less than 0 V or greater than 10 V in the photoelectric signal are identified as outliers and replaced with the arithmetic mean of the remaining valid sampling points in the same time window. Sampling points with voltage values less than -5 V or greater than 5 V in the acoustic signal are identified as outliers and replaced with the arithmetic mean of the remaining valid sampling points in the same time window. If all sampling points in a certain time window are outliers, the aligned sampling value of the previous time window is used to replace them to ensure data continuity during the alignment process.
[0052] Output alignment process data, which consists of a sequence of triples sorted by alignment time sequence, with each triple containing data related to the same alignment time. The corresponding molten pool image signal, photoelectric signal aligned sampling value and acoustic signal aligned sampling value.
[0053] In this specific embodiment, S2 includes:
[0054] Based on the alignment process data, segmentation and preprocessing are performed to generate a set of target sample fragments;
[0055] Alignment process data according to a unified alignment time sequence Sorted storage, where each alignment time This corresponds to a frame of molten pool image signal and the photoelectric signal alignment sample value and acoustic signal alignment sample value aligned with that alignment time.
[0056] The segmentation uses fixed-length, continuous, non-overlapping segmentation intervals, assuming each segmentation interval covers... The nth consecutive alignment time is generated by incrementing the index. Each segmentation interval ,in Indicates the first Each segmentation interval Indicates the first One alignment moment, Indicates the alignment time index. Indicates the index of the partitioned interval. This indicates the number of alignment moments contained in each segmentation interval;
[0057] In each segmentation interval Within the segment, the corresponding melt pool image signal sequence, photoelectric signal aligned sample value sequence, and acoustic signal aligned sample value sequence are extracted according to the alignment time index order, and the three are combined to form a target sample segment that corresponds one-to-one with the segmentation interval. The melt pool image signal is a grayscale image with a resolution set to [value missing]. Pixel, photoelectric signal alignment sampling value is in V, acoustic signal alignment sampling value is in V;
[0058] Subsequently, normalization was performed on each target sample segment, and the pixel values of the melt pool image signal were scaled by a factor of 255 to obtain a value range of [value range missing]. The normalized image, with photoelectric signal aligned sample values scaled by 10 V to obtain a value range of... The normalized photoelectric sequence, and the acoustic signal aligned sample values are scaled by 5 V to obtain a value range of [value range missing]. The normalized acoustic sequence is obtained, and the normalization results that exceed the above range are truncated after scaling to ensure that the numerical range is consistent.
[0059] After normalization, denoising was performed on each target sample segment. Both photoelectric and acoustic signals were filtered using a fourth-order Butterworth low-pass filter with a cutoff frequency set to 20 kHz. Bidirectional filtering was employed to eliminate phase distortion and maintain the temporal correspondence with the aligned time sequence. The molten pool image signal was sequentially processed using… Median filtering and kernel size are Image filtering with a standard deviation of 1.0 is used to suppress impulse noise and high-frequency noise and maintain the stability of the molten pool boundary morphology.
[0060] The target sample fragments generated from all segmented intervals and after normalization and denoising are collected in the order of segmented interval index to obtain the target sample fragment set.
[0061] In this specific embodiment, S3 includes:
[0062] Perform defect probability inference on a segment-by-segment basis on the target sample segment set and output the defect probability output;
[0063] The defect probability prediction model set includes Three defect probability prediction models with identical structures but different parameters are denoted as follows: Each defect probability prediction model consists of a multimodal feature extraction network and a probability output head, and all of them have been trained offline and their network parameters have been solidified.
[0064] Regarding the first Each target sample fragment contains a length of [number]. The sequence includes molten pool image signals, photoelectric signals, and acoustic signals, with the molten pool image signal sequence consisting of 100 frames. The photoelectric signal sequence and the acoustic signal sequence are composed of normalized denoised grayscale images, and the photoelectric signal sequence and the acoustic signal sequence are composed of normalized denoised scalar sampled values that correspond one-to-one with the 100 aligned times.
[0065] For any defect probability prediction model Its multimodal feature extraction network includes three parallel modal coding branches and a feature fusion module. The melt pool image signal branch uses a two-dimensional convolutional neural network and shares the same set of convolutional parameters for each frame. The convolutional layers are configured as four layers in series, and each layer is the size of the convolutional kernel. Perform convolution operations with stride of 1 and padding of 1, and output the results respectively. Each channel is connected to a batch normalization and ReLU activation function sequentially after each convolutional layer, and the batch normalization and ReLU activation function are executed once after the first and second convolutional layers. Max pooling is used to downsample the spatial resolution, followed by global average pooling on the last layer feature map of each frame to obtain a 128-dimensional frame feature vector for each frame, and the time dimension arithmetic mean is performed on the 100 frame feature vectors to obtain the image feature vector.
[0066] The photoelectric signal branch employs a one-dimensional convolutional neural network, performing three layers of one-dimensional convolution on a 100-bit photoelectric signal sequence along the time dimension, with kernel lengths of [missing information]. The number of output channels for each layer is 32, The stride is 1 and zero padding is used to keep the time length constant. After each convolutional layer, batch normalization and ReLU activation function are connected in sequence, and global average pooling is performed after the third layer to obtain a 128-dimensional photoelectric feature vector.
[0067] The acoustic signal branch has the same structure as the photoelectric signal branch and acts on the acoustic signal sequence to obtain a 128-dimensional acoustic feature vector;
[0068] The feature fusion module concatenates the three types of 128-dimensional feature vectors in a fixed order to form a 384-dimensional multimodal feature vector and inputs it into the probability output head. The probability output head is a two-layer fully connected network. The first layer has an output dimension of 128 and is connected to the ReLU activation function and Dropout with a dropout rate of 0.2. The second layer has an output dimension of 1 and is connected to the Sigmoid function to output the defect probability of the target sample fragment. Specifically, it is expressed as follows:
[0069] ;
[0070] in Defect probability prediction model For the The defect probability output for each target sample segment. This represents the Sigmoid function. Defect probability prediction model The second fully connected layer weight vector, This indicates the transpose operation. This represents a vector concatenation operation performed in a fixed order. Defect probability prediction model From the Image feature vectors extracted from the melt pool image signal sequence of each target sample fragment. Defect probability prediction model From the Photoelectric feature vectors extracted from the photoelectric signal sequence of a target sample segment Defect probability prediction model From the Acoustic feature vectors extracted from the acoustic signal sequence of a target sample segment. Defect probability prediction model The second layer fully connected bias scalar;
[0071] For each target sample fragment, by to Output the corresponding to The defect probability outputs corresponding to each defect probability prediction model are then compiled according to the model index and fragment index.
[0072] In this specific embodiment, S4 includes:
[0073] The probability of defect occurrence of the target part is generated based on the defect probability output;
[0074] The target part is obtained by cutting in step S2. There are target sample fragments, among which The total number of alignment moments in the alignment process data and the number of alignment moments contained in each segmented interval. Determined and rounded to the nearest integer;
[0075] The defect probability prediction model set includes Defect probability prediction model to Each defect probability prediction model Output the defect probability for each target sample segment. ,in The range of values is and ;
[0076] To avoid numerical underflow caused by multiplication and to avoid... To make computation impossible, first for each Execute truncation to obtain The truncation rule is when season ,when season In other cases ,in It is a fixed lower cutoff limit constant;
[0077] Then, each defect probability prediction model was analyzed. The defect probability output for all target sample fragments is converted into the part-level defect probability corresponding to the defect probability prediction model. The probability of defect occurrence in the target part is obtained by weighted fusion based on the fusion weights obtained through training. The specific calculation is as follows:
[0078] ;
[0079] in Defect probability prediction model The corresponding part-level defect probability, Indicates the first Defect probability of a target sample segment according to Defect probability after truncation Indicates the number of target sample fragments. Represents the natural logarithm operation. This indicates the operation of the natural exponent. This represents the result of summing the fusion weights. Indicates the first result obtained after training Each fusion weight is associated with the defect probability prediction model. They are stored in a one-to-one correspondence and are fixed in non-negative floating-point form. Indicates by The normalized fusion weights obtained by normalization ensure that This represents the number of defect probability prediction models and takes the value of . This represents the probability of defects at each part level. According to normalized fusion weight The probability of defect occurrence in the target part obtained by weighted fusion.
[0080] In this specific embodiment, S5 includes:
[0081] The uncertainty of the target part is calculated based on the defect probability output and output in scalar form;
[0082] Target part correspondence The target sample fragments and the defect probability prediction model set contain Defect probability prediction model to , for the Each target sample segment is generated by the defect probability prediction model, which outputs the defect probability. The truncation result used in step S4 for numerical stability is adopted. As input for uncertainty calculation to avoid distortion of dispersion caused by extreme probability values, where ;
[0083] First, for the same target sample segment, their cross-model defect probability set is compiled. And calculate the degree of discreteness of the set as the fragment-level uncertainty. The degree of dispersion is expressed as standard deviation and uses As a denominator to improve the sensitivity of characterizing fluctuations with a finite number of models;
[0084] Subsequently, the fragment-level uncertainties of all target sample fragments were aggregated to obtain the uncertainty of the target part. The convergence method takes the average value to ensure that the uncertainty covers the process fluctuations of the entire component and avoids being dominated by the occasional noise of a single segment;
[0085] Fragment-level uncertainty and component-level uncertainty are calculated using the following formula:
[0086] ;
[0087] in Indicates the first Mean cross-model defect probability of each target sample segment This represents the number of defect probability prediction models and takes the value of . Indicates the first The defect probability prediction model for the first defect... The truncated defect probability of each target sample segment output. Indicates the first Fragment-level uncertainty of a target sample segment To represent the square root operation, Indicates the uncertainty of the target part. Indicates the number of target sample fragments;
[0088] During computation implementation and Both use double-precision floating-point numbers for storage and arithmetic, and obtain... This was then used as an input for the sampling priority scoring.
[0089] In this specific embodiment, S6 includes:
[0090] Based on the probability of defect occurrence of the target part and the uncertainty of the target part Generate sampling priority scores and output computed tomography sampling instructions or release judgment results. At the same time, combine the out-of-distribution discrimination scores to achieve a fallback sampling inspection for process drift.
[0091] The priority scoring for random inspections uses a fixed scoring function with preset weights. The weight values are set as follows: and The preset sampling threshold is set to The preset release threshold is set to ;
[0092] Out-of-distribution discrimination scores are calculated based on multimodal feature vectors using Mahalanobis distance, with the feature vectors taken from the defect probability prediction model in step S3. The multimodal feature vectors extracted from each target sample segment, i.e., for the th segment... Take a target sample fragment The fragment values are then aggregated into a part-level multimodal feature vector for the target part. ,in , These are the image feature vector, photoelectric feature vector, and acoustic feature vector defined in step S3, each with a dimension of 128. and All dimensions are 384;
[0093] To calculate the Mahalanobis distance, during the offline training phase, all training sample segments in the training part set are processed by the same... The extracted multimodal feature vectors are statistically analyzed to obtain the mean vector. With covariance matrix The covariance matrix is invertible by using a diagonal loading method, specifically by adding elements to the diagonal elements of the empirical covariance matrix. And it is implemented using Cholesky decomposition. Numerical stability solution, with the preset out-of-distribution threshold set to . ;
[0094] The sampling priority score and out-of-distribution discrimination score are calculated using the following formula:
[0095] ;
[0096] in Indicates the number of target sample fragments. Defect probability prediction model For the first The multimodal feature vector output by the target sample fragment, z represents the part-level multimodal feature vector of the target part. This represents the out-of-distribution discrimination score, which is the Mahalanobis distance. This represents the mean vector of multimodal features obtained during the training phase. This represents the multimodal feature covariance matrix obtained during the training phase and subjected to diagonal loading. This indicates the transpose operation. express The inverse matrix, To represent the square root operation, This indicates the priority score for random inspections. The weights represent the probability of defects occurring. Indicates the uncertainty weight. This indicates the probability of a defect occurring in the target part. Indicates the uncertainty of the target part;
[0097] After completion and After calculation, a catch-all decision is first made regarding the distribution outside the catch-all condition. The sampling priority score will be directly set to 0. The target parts are marked as objects to be sampled for computed tomography scan to ensure that the sampling priority score is not less than the preset sampling threshold.
[0098] The priority scoring of random inspections will then be carried out. Compared with the preset sampling threshold In comparison, when The system outputs a computed tomography (CT) scan sampling inspection command through the manufacturing execution system interface, and writes the unique identifier of the target part and the probability of defect occurrence into the command. Uncertainty Sampling priority scoring Compared with out-of-distribution discriminant score For use in CT resource scheduling and tracking;
[0099] when The probability of defect occurrence at that time Compared with the preset release threshold In comparison, Output the release decision result and record the release timestamp. ,exist The system outputs the non-release judgment result and transfers the target part to the rework or process review queue.
[0100] In this specific embodiment, a model training method is provided for training the trained multimodal feature extraction network, the trained defect probability prediction model set, and the trained fusion weights, and a closed-loop sampling inspection based on a acquisition function is performed during the training process to continuously update the model.
[0101] The training parts set contains For each training part, during its metal additive manufacturing process, molten pool image signals, photoelectric signals, and acoustic signals are acquired and time-aligned to obtain alignment process data. Subsequently, ... Each consecutive alignment time generates a target sample fragment for a segmentation interval and performs normalization and denoising to obtain a sample fragment set. At the same time, the training part identifier and segmentation interval index of each target sample fragment are recorded to form a traceable data table.
[0102] In the Select from training parts Each training part undergoes computed tomography (CT) scanning to detect and output a set of three-dimensional defect voxels. Based on the additive manufacturing equipment's scan path log, each segmented interval is mapped to its corresponding layer number and scan trajectory coordinates. Accordingly, the set of three-dimensional defect voxels is projected onto the spatial neighborhood corresponding to the segmented interval. The spatial neighborhood is enclosed by a cylinder with a radius of 0.2 mm centered on the scan trajectory, and the range of layer numbers covered by the segmented interval is taken along the layer thickness direction. If a defect voxel exists within this spatial neighborhood, the target sample fragment corresponding to that segment is labeled as an internal defect tag. If no defective voxel is found, it is labeled as an internal defect. ,in Indicates the first Each target sample fragment has an internal defect label with a value of 0 or 1, thereby dividing all sample fragments into a labeled sample set and an unlabeled sample set;
[0103] During the training phase of the multimodal feature extraction network, a three-branch coding structure is adopted as the main structure of the multimodal feature extraction network. Specifically, the melt pool image signal branch is a four-layer two-dimensional convolutional network with shared convolutional parameters and outputs a 128-dimensional image feature vector; the photoelectric signal branch is a three-layer one-dimensional convolutional network and outputs a 128-dimensional photoelectric feature vector; and the acoustic signal branch is a three-layer one-dimensional convolutional network and outputs a 128-dimensional acoustic feature vector. The three types of feature vectors are concatenated in a fixed order to form a 384-dimensional multimodal feature vector.
[0104] To perform multimodal contrastive learning, a projection head is connected in series after the main structure. The projection head is a two-layer fully connected network with a dimension of [missing information]. The intermediate layer activation function is ReLU, and L2 normalization is performed after the output layer to obtain the unity norm embedding vector. During training, embedding vectors of different modalities of the same sample segment are constructed as positive sample pairs, and embedding vectors of different sample segments are constructed as negative sample pairs. A contrastive learning loss with a temperature coefficient of 0.07 is used to update the main structure and projection head parameters. The optimizer is Adam, and the learning rate is set to [value missing]. Weight decay is set to The batch size was set to 256 and the number of training rounds was set to 200 to obtain the main structure parameters of the trained multimodal feature extraction network.
[0105] During the training phase of the defect probability prediction model ensemble, constructing Defect probability prediction model to Each defect probability prediction model reuses the main structure of a trained multimodal feature extraction network and removes the projection head, while simultaneously connecting a probability output head, i.e., a two-layer fully connected network. The first layer is followed by ReLU and Dropout with a dropout rate of 0.2, and the second layer is followed by Sigmoid to output the defect probability. Each defect probability prediction model initializes its probability output head parameters with different random seeds and applies two deterministic data augmentations to the unlabeled sample set during training to form consistency constraints. The melt pool image signal augmentation involves applying additive Gaussian noise with a fixed standard deviation of 0.01 to each frame, performing a fixed-scale crop of 0.9 in the spatial dimension, and then scaling it back. The photoelectric and acoustic signals are enhanced by applying additive Gaussian noise with a fixed standard deviation of 0.01 to the sequence and performing a time-dimensional moving average with a fixed length of 5 to simulate bandwidth variation;
[0106] In semi-supervised consistency learning training, binary cross-entropy supervision loss is used to update model parameters for the labeled sample set. For the unlabeled sample set, the defect probability output under two augmented inputs is calculated, and mean squared error consistency loss is used to constrain output consistency. The weighting coefficients of supervision loss and consistency loss are set to 1.0 and 1.0, respectively. The optimizer uses SGD with a momentum set of 0.9 and an initial learning rate set to... Weight decay is set to The batch size is set to 128 and the number of training rounds is set to 100, thus obtaining a set of defect probability prediction models after training;
[0107] During the weight fusion training phase, the labeled sample set is divided into... The dataset is divided into a training subset and a validation subset. The average log loss of each defect probability prediction model is calculated for the validation subset, and the fusion weights are determined accordingly. to The fusion weight calculation rule is to add the average log loss of each model to... The reciprocal is then taken and stored as a double-precision floating-point number, thus allowing the model with smaller logarithmic loss to obtain larger fusion weights;
[0108] During the computed tomography (CT) closed-loop update phase, training parts that have not undergone CT detection are used as candidate training parts, and a sampling budget is set for each round of closed-loop update. For each candidate training part, calculate its defect occurrence probability. With uncertainty Simultaneously, extract its part-level multimodal feature vector. And for all candidate training parts Perform K-means clustering, with the number of clusters set to [value]. The maximum number of iterations is set to 300, and the number of samples in the cluster to which the candidate training parts belong is denoted as... And based on this, diversity scores are defined. To achieve higher diversity scores for candidate training parts from sparse clusters, where This represents the number of samples in the cluster to which the candidate training part belongs, and is a positive integer. This represents the diversity score and is a positive real number.
[0109] Subsequently, the acquisition function is calculated for each candidate training part, and the part with the largest acquisition function is selected under the sampling budget constraint. One candidate training part is used as the sampling object for computed tomography (CT) scan, and the acquisition function is:
[0110] ;
[0111] in This represents the acquisition function value of the candidate training part. The weight represents the probability of defect occurrence and takes the value of . This represents the probability of defects occurring in candidate training parts. Represents the uncertainty weight and takes the value of This represents the uncertainty of the candidate training parts. This represents the diversity score weight and takes the value of . The diversity score represents the number of samples in each cluster. Sure;
[0112] Perform computed tomography (CT) scans on the selected objects for inspection and generate new internal defect labels according to the aforementioned projection annotation rules. The corresponding sample fragments were added to the labeled sample set, while those removed from the unlabeled sample set were then used to refine the defect probability prediction model set. to Incremental update training is performed, using the same loss and data augmentation structure as the initial semi-supervised consistency learning training, with the learning rate set to [value missing]. The number of training rounds is set to 20, and the fusion weights are recalculated after the update. to The above closed-loop update is repeated. The goal is to continuously improve the generalization ability and fusion stability of the defect probability prediction model set under a limited computed tomography budget.
[0113] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
[0114] This invention addresses the technical problems of relying on computed tomography (CT) sampling for internal defect detection in metal additive manufacturing parts, which is difficult to cover the entire sample and has high detection costs. It aligns at least two process signals—molten pool image signals, photoelectric signals, and acoustic signals—in time and segments them into sample fragments. A trained multimodal feature extraction network is used to acquire cross-modal process features. A defect probability prediction model set outputs the defect probability for each sample fragment, and multi-model fusion based on fusion weights yields the part-level defect occurrence probability. Simultaneously, the uncertainty is calculated using the dispersion of the outputs from multiple models for the same sample fragment. The defect occurrence probability and uncertainty are used together for sampling priority scoring. This allows for CT sampling instructions to be issued for high-risk or high-uncertainty parts, and release decisions to be issued for low-risk parts. This enables a release decision strategy that only requires a small number of CT scans for necessary parts or no CT scans at all, reducing detection costs and improving the reliability of release decisions.
[0115] In terms of algorithm structure, this invention makes targeted improvements for real-world scenarios where computed tomography (CT) scan labels are scarce and process signal noise and operating condition drift are significant: First, multimodal contrastive learning is used to make the feature representations of different modes of the same sample segment closer to each other and the feature representations of different sample segments farther apart, improving cross-modal representation consistency and feature separability; Second, semi-supervised consistency learning is used in defect prediction training, utilizing the output consistency constraints of unlabeled samples under perturbation or data augmentation to reduce the dependence on a large number of CT scan labels; Third, through uncertainty integration and active sampling closed loop, the probability of defect occurrence, uncertainty, and out-of-distribution discrimination are combined to influence the selection of sampling targets, and the model and fusion weights are continuously updated with newly added CT scan results, thereby more effectively improving the model's generalization ability and evaluation stability under limited sampling budget, and better achieving the technical effect of internal defect risk quantification assessment.
Claims
1. A machine learning-based method for assessing the probability of internal defects in metal additive manufacturing, characterized in that, include: S1. During the metal additive manufacturing process, process data corresponding to the target part is collected, including at least two of the following: molten pool image signal, photoelectric signal and acoustic signal, and alignment processing is performed to obtain alignment process data. S2. Segment and preprocess the alignment process data to obtain a set of target sample segments; S3. For the set of target sample segments, process each target sample segment using a set of trained defect probability prediction models to obtain the defect probability output corresponding to each defect probability prediction model. Each defect probability prediction model includes a trained multimodal feature extraction network, which is used to convert each modal signal in the process data into a multimodal feature vector. The defect probability prediction model outputs the defect probability of internal defects based on the multimodal feature vector; S4. Based on the defect probability output, fuse the defect probability output using trained fusion weights to obtain the defect occurrence probability of the target part; S5. Generate the uncertainty of the target part based on the dispersion between the defect probability outputs; S6. Generate the sampling priority score of the target part based on the defect occurrence probability and uncertainty, and compare the sampling priority score with the preset sampling threshold: when the sampling priority score is not less than the preset sampling threshold, output the computed tomography (CT) sampling instruction; when the sampling priority score is less than the preset sampling threshold, compare the defect occurrence probability with the preset release threshold and output the release judgment result of the target part.
2. The method for evaluating the probability of internal defects in metal additive manufacturing based on machine learning according to claim 1, characterized in that, S1 includes: In the metal additive manufacturing process, process data corresponding to the target part are collected by an imaging sensor for acquiring molten pool image signals, a photoelectric sensor for acquiring photoelectric signals, and an acoustic sensor for acquiring acoustic signals. A unified time base time stamp is added to the molten pool image signal, the photoelectric signal, and the acoustic signal, and the time is synchronized to the molten pool image signal, the photoelectric signal, and the acoustic signal according to the time stamp; The outlier processing is performed on the melt pool image signal, the photoelectric signal and the acoustic signal after time synchronization is completed. The outlier processing includes identifying data points that exceed the preset physical range as outliers and removing or replacing them. Output the alignment process data after time synchronization and outlier handling.
3. The method for evaluating the probability of internal defects in metal additive manufacturing based on machine learning according to claim 1, characterized in that, S2 include: Based on a preset time window or a preset scan length, multiple consecutive segmentation intervals are determined in the alignment process data; Within each segmentation interval, the corresponding melt pool image signal, photoelectric signal and acoustic signal are extracted to form the target sample segment corresponding to that segmentation interval; Normalization is performed on each target sample segment, the normalization process including amplitude scaling of photoelectric signals and acoustic signals and pixel value scaling of molten pool image signals; Denoising processing is performed on each target sample segment after normalization, the denoising processing including filtering of photoelectric signals and acoustic signals and image filtering of molten pool image signals; All target sample segments that have undergone normalization and denoising are aggregated into a target sample segment set.
4. The method for evaluating the probability of internal defects in metal additive manufacturing based on machine learning according to claim 1, characterized in that, S3 include: For each target sample segment, each defect probability prediction model in the trained defect probability prediction model set performs the following processing: Using the trained multimodal feature extraction network in the defect probability prediction model, corresponding modal feature vectors are extracted from at least two modal signals in the target sample segment. Specifically, when the target sample segment contains a melt pool image signal, an image feature vector is extracted; when the target sample segment contains a photoelectric signal, a photoelectric feature vector is extracted; and when the target sample segment contains an acoustic signal, an acoustic feature vector is extracted. The extracted at least two types of modal feature vectors are combined into a multimodal feature vector according to a preset fusion method. Based on the multimodal feature vector, the defect probability prediction model outputs the defect probability of the target sample segment. The defect probabilities output by each defect probability prediction model in the trained defect probability prediction model set for each target sample segment are aggregated into the defect probability output corresponding to each defect probability prediction model.
5. The method for evaluating the probability of internal defects in metal additive manufacturing based on machine learning according to claim 1, characterized in that, S4 include: Based on the defect probability output corresponding to each defect probability prediction model, for each defect probability prediction model in the defect probability prediction model set, the defect probability output by the defect probability prediction model for each target sample segment in the target sample segment set is converted into the part-level defect probability corresponding to the defect probability prediction model. The conversion includes calculating the product of the complementary values of each defect probability and taking the complement of the product to obtain the part-level defect probability. The trained fusion weights are normalized to obtain normalized fusion weights. The normalization process includes scaling each fusion weight proportionally by the sum of each fusion weight. The part-level defect probabilities corresponding to each defect probability prediction model are weighted and fused according to the normalized fusion weights to obtain the defect occurrence probability of the target part.
6. The method for evaluating the probability of internal defects in metal additive manufacturing based on machine learning according to claim 1, characterized in that, S5 include: The defect probability outputs corresponding to each defect probability prediction model are statistically analyzed to obtain a defect probability set for the same target sample segment. The dispersion of the defect probability is calculated for the defect probability set, and the dispersion includes the variance or standard deviation of the defect probability. The dispersion corresponding to each target sample segment in the target sample segment set is aggregated to obtain the uncertainty of the target part. The aggregation includes taking the maximum value or the mean value of each dispersion.
7. The method for evaluating the probability of internal defects in metal additive manufacturing based on machine learning according to claim 1, characterized in that, S6 include: Based on the defect occurrence probability and the uncertainty, a sampling priority score is calculated according to a preset scoring function, where the scoring function is a weighted sum of the defect occurrence probability and the uncertainty, and each weight is a preset constant. The sampling priority score is compared with a preset sampling threshold. When the sampling priority score is not less than the preset sampling threshold, a computed tomography (CT) sampling instruction is output and the target part is marked as a CT sampling object. When the sampling priority score is less than the preset sampling threshold, the defect occurrence probability is compared with a preset release threshold. When the defect occurrence probability is less than the preset release threshold, a release decision result is output; when the defect occurrence probability is not less than the preset release threshold, a non-release decision result is output.
8. A model training method for training the trained multimodal feature extraction network, the trained defect probability prediction model set, and the trained fusion weights as described in claim 1, comprising: T1. Collect process data of the training part set in the metal additive manufacturing process, and obtain computed tomography detection results corresponding to at least some of the training parts in the training part set. The process data includes at least two of the following: molten pool image signal, photoelectric signal and acoustic signal. Generate a sample fragment set based on the process data. T2. Generate internal defect labels corresponding to at least a portion of the sample fragments in the sample fragment set based on the computed tomography (CT) scan results, and divide the sample fragment set into a labeled sample set and an unlabeled sample set; T3. Based on the labeled and unlabeled sample sets, train a multimodal feature extraction network using multimodal contrastive learning, so that the feature representations of different modalities within the same sample fragment are close to each other, and the feature representations of different sample fragments are far apart, thus obtaining the trained multimodal feature extraction network; T4. Construct a defect probability prediction model set based on the trained multimodal feature extraction network, and perform semi-supervised consistency learning training on the defect probability prediction model set. The consistency learning training includes: calculating the supervised loss based on the internal defect labels for the labeled sample set; applying different perturbations or data augmentations to the unlabeled sample set and obtaining the corresponding defect probability outputs; calculating the consistency loss between the defect probability outputs; updating the model parameters of the defect probability prediction model set based on the weighted sum of the supervised loss and the consistency loss, and obtaining the trained defect probability prediction model set; T5, processing the labeled sample set through each defect probability prediction model in the trained defect probability prediction model set to obtain defect probability outputs; determining the fusion weights based on the fitting error between the defect probability outputs and the internal defect labels, and obtaining the trained fusion weights; T6. Calculate the probability and uncertainty of defect occurrence for candidate training parts, and determine the CT scan sampling objects accordingly. Obtain CT scan detection results for the determined CT scan sampling objects and generate new internal defect labels. Add the sample fragments corresponding to the new internal defect labels to the labeled sample set, and update the defect probability prediction model set and fusion weights based on the updated labeled sample set.
9. The method for evaluating the probability of internal defects in metal additive manufacturing based on machine learning according to claim 1, characterized in that, Also includes: The out-of-distribution discrimination score is calculated based on the multimodal feature vector. The out-of-distribution discrimination score includes Mahalanobis distance. When the out-of-distribution discrimination score is greater than a preset out-of-distribution threshold, the sampling priority score is set to be no less than the preset sampling threshold.
10. A model training method according to claim 8, characterized in that, In T6, determining the sampled parts for computed tomography scans includes: calculating the acquisition function of candidate training parts, wherein the acquisition function is a weighted sum of the probability of defect occurrence, uncertainty and diversity score, wherein the diversity score is determined based on the clustering results of the multimodal feature vectors of the candidate training parts, and selecting the candidate training parts with the largest acquisition function as the sampled parts under a preset sampling budget constraint.