Additive manufacturing part defect identification method and system based on double-branch cross-modal feature fusion
By employing a bi-branch cross-modal feature fusion method, and utilizing LSTM and cross-attention mechanisms to achieve bi-directional mapping between images and temporal features, the problem of low defect recognition accuracy in existing technologies is solved, thereby improving the accuracy and applicability of defect recognition for additive manufacturing parts. This method is suitable for various additive manufacturing processes and heterogeneous monitoring data.
Patent Information
- Application Number
- CN202611253155.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-20
AI Technical Summary
Existing defect identification methods in additive manufacturing rely on single-modal data detection, which is susceptible to environmental interference. Multimodal fusion methods have failed to effectively achieve bidirectional semantic alignment between images and temporal features, resulting in low recognition accuracy and insufficient utilization of information complementarity, making it difficult to meet industrial needs.
A two-branch cross-modal feature fusion method is adopted. By using LSTM temporal modeling and cross-attention mechanism, a two-branch fusion architecture is constructed to realize bidirectional spatial mapping and collaborative fusion of image and temporal features. Improved ResNet50 and ResNet18 networks are used to extract image and temporal features. Combined with LSTM gated fusion branch and cross-attention branch, bidirectional semantic alignment and information compensation of multimodal features are performed.
It significantly improves the accuracy and robustness of defect identification in additive manufacturing, achieves multi-dimensional comprehensive evaluation, outputs high-precision and reliable defect identification results, is applicable to various additive manufacturing processes and heterogeneous monitoring data, and is suitable for in-situ online defect monitoring in additive manufacturing industrial sites.
Smart Images

Figure CN123138970A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent quality inspection and deep learning feature fusion technology in additive manufacturing, specifically involving a method and system for defect identification of additive parts based on bi-branch cross-modal feature fusion. Background Technology
[0002] Additive manufacturing, with its advantage of rapid prototyping of complex structures, is widely used in aerospace, medical, and precision mold industries. However, the processing is prone to defects such as porosity, cracks, uneven powder distribution, and material collapse, which severely restrict the yield rate of finished products and the large-scale application of the process. At present, defect identification of additive parts mostly adopts single-modal data detection methods, relying solely on two-dimensional visual images to complete defect judgment. This is easily affected by dust and light interference in the processing environment, leading to misjudgments. Existing multimodal fusion methods mainly rely on direct feature-level stitching and fusion, without considering the problem that two-dimensional image features and one-dimensional temporal sensing features are in different metric spaces. Strong image features can easily mask weak temporal features, and cross-modal feature mapping is prone to distortion, resulting in a large loss of temporal defect information. This fails to fully utilize the complementary information of multi-source sensing data such as images, acoustics, photoelectric, and torque, and the defect identification accuracy and generalization ability are insufficient to meet the needs of industrial in-situ monitoring.
[0003] Meanwhile, existing fusion strategies are unable to achieve bidirectional semantic alignment of multimodal features and cannot establish an effective correlation between image spatial features and temporal dynamic features. A single fusion network can only complete unidirectional feature mapping, which further exacerbates the imbalance of cross-modal information. Therefore, it is urgent to design a cross-modal feature fusion recognition scheme that can achieve bidirectional feature spatial alignment, avoid feature distortion, and fully mine multimodal complementary information. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing additive manufacturing multimodal defect detection methods, such as feature fusion imbalance, cross-modal attitude quantity space mismatch, easy masking of weak temporal features, and low fusion recognition accuracy. This invention provides an additive manufacturing defect recognition method and system based on bi-branch cross-modal feature fusion. It relies on LSTM temporal modeling and cross-attention mechanism to construct a bi-branch fusion architecture, completes bi-directional spatial mapping between image and temporal features, realizes multimodal feature collaborative fusion, and improves the accuracy of additive manufacturing defect recognition.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion, comprising the following steps: Two-dimensional image monitoring data and one-dimensional time-series sensing data are collected simultaneously during the additive manufacturing process. The two types of heterogeneous data are preprocessed according to the timestamp, and a multimodal defect dataset of additive parts is constructed based on the preprocessed data. Image feature extraction network and temporal feature extraction network were built respectively to extract features from the multimodal defect dataset, thereby obtaining image features and temporal features; Based on a pre-built dual-branch feature fusion network, bidirectional metric space mapping is performed on image features and temporal features to obtain fused multimodal features; The fused multimodal features are input into the defect classifier to complete the classification and identification of defects in additive manufacturing parts, and the classification and identification results are obtained.
[0006] In the step of simultaneously acquiring two-dimensional image monitoring data and one-dimensional time-series sensing data during the additive manufacturing process, preprocessing the two types of heterogeneous data according to timestamps, and constructing a multimodal defect dataset for additive parts based on the preprocessed data, the data during the additive manufacturing process is acquired through in-situ monitoring systems for three additive manufacturing processes: SLM (Selective Laser Melting), FDM (Fused Deposition Modeling), and BJ (Binder Jetting).
[0007] The preprocessing method is as follows: Data augmentation operations, including random rotation, cropping, and brightness adjustment, are performed on the two-dimensional image monitoring data. A binary mask is generated through target detection to remove irrelevant background areas, resulting in preprocessed two-dimensional image monitoring data. One-dimensional time-series sensing data is divided into blocks according to the processing cycle, and the time-series sensing data in each processing cycle is converted into a two-dimensional matrix form to obtain preprocessed time-series sensing data. The input dimensions of the preprocessed two-dimensional image monitoring data and the time-series sensing data are unified to achieve dimension alignment.
[0008] The method for constructing image feature extraction networks and temporal feature extraction networks respectively to extract features from the multimodal defect dataset and obtain image features and temporal features is as follows: A ResNet50 network with an improved scaling dot product channel attention mechanism was used as the image feature extraction network to extract image features from the preprocessed two-dimensional image monitoring data. Using ResNet18 network as the temporal feature extraction network, the temporal data converted into a two-dimensional matrix form is input into the network to extract the temporal features of the preprocessed temporal sensing data; The extracted image features and temporal features are normalized to unify the feature distribution space.
[0009] The method for extracting image features by using a ResNet50 network with an improved scaling dot product channel attention mechanism as the image feature extraction network to extract the two-dimensional spatial features of the preprocessed two-dimensional image monitoring data is as follows: The two-dimensional image monitoring data are subjected to global max pooling and global average pooling respectively to obtain local salient features and global features. The local salient features and global features are linearly mapped to obtain the query matrix Q, the key matrix K, and the value matrix V. The correlation strength matrix between local salient features and global features is calculated using a scaled dot product attention mechanism. Multiply the correlation strength matrix by the value vector to obtain the feature map after channel attention enhancement; After channel attention enhancement, the feature maps are processed by average pooling and max pooling respectively, and the image features are obtained through convolutional layers and activation functions.
[0010] The method of using ResNet18 network as the temporal feature extraction network to input the temporal data, which is converted into a two-dimensional matrix form, into the network to extract one-dimensional dynamic features from the preprocessed temporal sensing data, is as follows: The temporal feature extraction network adopts a ResNet18 architecture consisting of four residual blocks. After reconstructing the one-dimensional dynamic features of the preprocessed temporal sensing data into a two-dimensional matrix, the temporal features are extracted through a two-dimensional convolutional layer.
[0011] In the step of obtaining fused multimodal features by performing bidirectional metric space mapping on image features and temporal features based on a pre-constructed dual-branch feature fusion network, the dual-branch feature fusion network includes a parallel LSTM gated fusion branch and a cross-attention fusion branch.
[0012] The method for obtaining fused multimodal features by performing bidirectional metric space mapping on image features and temporal features based on a pre-constructed dual-branch feature fusion network is as follows: In the LSTM gated fusion branch, temporal features are used as the input of the previous stage and image features are used as the input of the next stage. The semantic space of the image features is dynamically adjusted through the gating mechanism of the cascaded LSTM network, and residual connections are introduced to compensate for the loss of feature information, so as to obtain the image fusion features. In the cross-attention fusion branch, image features are used as query vectors and temporal features are used as key-value vectors. The association strength between the two types of features is calculated, the semantic space correction of temporal features is completed, and residual connections are introduced to ensure the integrity of temporal features, thus obtaining temporal fusion features. The image fusion features output by the LSTM gated fusion branch are concatenated with the temporal fusion features output by the cross-attention fusion branch to obtain the final multimodal fusion features.
[0013] After classifying and identifying defects in additive manufacturing parts and obtaining the classification results, the process also includes a quantitative evaluation of the classification results, with specific indicators as follows: Recognition accuracy:
[0014] Accuracy:
[0015] Recall rate:
[0016] F1 score:
[0017] Average accuracy:
[0018] In the formula: TP represents a true positive instance; TN represents a true negative instance; FP represents a false positive instance; FN represents a false negative instance; Let be the accuracy at the i-th threshold; Let be the recall rate at the i-th threshold; n is the number of thresholds.
[0019] Secondly, the present invention provides an additive manufacturing part defect identification system based on dual-branch cross-modal feature fusion, comprising: The data synchronous acquisition and preprocessing module is used to synchronously acquire two-dimensional image monitoring data and one-dimensional time-series sensing data during the additive manufacturing process, complete the preprocessing of the two types of heterogeneous data according to the timestamp, and construct a multimodal defect dataset of additive parts based on the preprocessed data. A dual-modal feature extraction module is used to build an image feature extraction network and a temporal feature extraction network respectively, and to extract features from the multimodal defect dataset to obtain image features and temporal features; The dual-branch cross-modal feature fusion module is used to perform bidirectional metric space mapping on image features and temporal features based on a pre-built dual-branch feature fusion network to obtain fused multimodal features. The defect classification and recognition module is used to input the fused multimodal features into the defect classifier to complete the classification and recognition of defects in additive manufacturing parts and obtain the classification and recognition results.
[0020] Compared with the prior art, the present invention has the following beneficial effects: This invention provides a method and system for defect identification in additive manufacturing parts based on bi-branch cross-modal feature fusion, comprising the following steps: synchronously acquiring two-dimensional image monitoring data and one-dimensional time-series sensing data during the additive manufacturing process; preprocessing the two types of heterogeneous data according to timestamps; constructing a multimodal defect dataset for additive manufacturing parts based on the preprocessed data; building an image feature extraction network and a time-series feature extraction network respectively to extract features from the multimodal defect dataset to obtain image features and time-series features; performing bidirectional metric space mapping on the image features and time-series features based on the pre-constructed bi-branch feature fusion network to obtain fused multimodal features; inputting the fused multimodal features into a defect classifier to complete the classification and identification of defects in the additive manufacturing parts, and obtaining the classification and identification results. By employing a dual-branch parallel model-level fusion architecture, this invention addresses the problem of traditional feature-level fusion methods' inability to effectively handle the differences in cross-modal data metric spaces. It alleviates the phenomenon of strong image features masking weak temporal features after mapping distortion during feature stitching, enabling the feature stitching operation to effectively fuse multimodal features by equally utilizing information complementarity in the collaborative space. This significantly improves the accuracy and robustness of additive manufacturing defect identification. This invention fully leverages the collaborative semantic information and complementary specific information between images and temporal data to achieve a multi-dimensional comprehensive evaluation of additive manufacturing defects, outputting highly accurate and reliable defect identification results, and providing core technical support for closed-loop quality control in additive manufacturing.
[0021] Furthermore, this invention employs a ResNet50 network with an embedded improved scaling dot product channel attention mechanism as the image feature extraction network. By explicitly calculating the similarity matrix between different channels of the feature map, it highlights the preference weights of minute defect features, solving the problem that the shared fully connected layer in the traditional CBAM module easily averages minute defect features. Significant improvements in image feature extraction performance are achieved on three additive manufacturing datasets: FDM, SLM, and BJ. Simultaneously, a ResNet18 network is used as the temporal feature extraction network, converting one-dimensional temporal data into a two-dimensional matrix form for input into the network. This effectively extracts abnormal dynamic features from temporal data without obvious frequency domain features. Compared with traditional LSTM and one-dimensional convolutional networks, the temporal feature extraction accuracy is improved by 13% to 26%.
[0022] Furthermore, the dual-branch feature fusion network of this invention achieves temporal feature-guided image feature space mapping and image feature-guided temporal feature space mapping respectively by setting LSTM-gated fusion branches and cross-attention fusion branches in parallel, thus completing bidirectional semantic alignment of cross-modal features. Simultaneously, residual connections are introduced in both branches to effectively compensate for information loss during feature mapping and ensure the integrity of the fused features. Experimental results show that this method achieves a defect recognition accuracy of 98.10% on the SLM dataset, which is 4.18% higher than single-modal image recognition methods and 6% higher than traditional feature-level direct concatenation fusion methods, fully validating the effectiveness of the dual-branch fusion architecture.
[0023] Furthermore, this invention is compatible with various mainstream additive manufacturing processes such as SLM (Selective Laser Melting), FDM (Fused Deposition Modeling), and BJ (Binder Jetting). It is also compatible with heterogeneous monitoring data from industrial cameras, torque sensors, acoustic sensors, and photoelectric sensors. It can complete multimodal information fusion detection without relying on a large number of manually labeled defect samples. It is suitable for in-situ online defect monitoring scenarios in additive manufacturing industrial sites, which can effectively reduce the loss of defective components and improve the printing pass rate and production efficiency. Attached Figure Description
[0024] Figure 1 This is a flowchart of the additive manufacturing defect identification method based on dual-branch cross-modal feature fusion proposed in this invention; Figure 2 This is a diagram of the image feature extraction network framework based on the improved scaling dot product attention mechanism used in this invention; Figure 3 This is a structural diagram of the improved scaled dot product channel attention module of the present invention; Figure 4 This is a diagram of the one-dimensional time-series signal feature extraction network framework based on ResNet18 used in this invention. Figure 5 This is a comparison diagram of normal and abnormal torque signals of the powder spreading scraper in the SLM process of this invention; Figure 6 This is a training-validation loss curve of the one-dimensional temporal feature extraction model of the present invention; Figure 7 This is the PR curve of the one-dimensional temporal feature extraction model of the present invention; Figure 8 This is a diagram of the overall framework of the dual-branch cross-modal feature fusion network proposed in this invention. Figure 9 This is a diagram of the multi-cascaded LSTM feature mapping structure used in this invention; Figure 10 This is a pairing diagram of images and timing data of the same processing steps in the SLM process of this invention; Figure 11 This is a PR curve diagram of the dual-branch feature fusion network and the comparison method of the present invention. Detailed Implementation
[0025] To further understand the content of this invention, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments are merely illustrative and not limiting of the invention.
[0026] Example 1 like Figure 1 As shown, a defect identification method for additive manufacturing parts based on dual-branch cross-modal feature fusion includes the following steps: S1: Simultaneously collect two-dimensional image monitoring data and one-dimensional time-series sensing data during the additive manufacturing process, preprocess the two types of heterogeneous data according to the timestamp, and construct a multimodal defect dataset for additive parts based on the preprocessed data; S2: Construct image feature extraction network and temporal feature extraction network respectively, and extract features from the multimodal defect dataset to obtain image features and temporal features; S3: Based on a pre-built dual-branch feature fusion network, a bidirectional metric space mapping is performed on image features and temporal features to obtain fused multimodal features; S4: Input the fused multimodal features into the defect classifier to complete the classification and recognition of defects in the additive manufacturing part, and obtain the classification and recognition results.
[0027] Specifically, in S1, two-dimensional image monitoring data and one-dimensional time-series sensing data are simultaneously collected during the additive manufacturing process. Preprocessing of these two types of heterogeneous data is performed according to timestamps, and a multimodal defect dataset for additive parts is constructed based on the preprocessed data. The construction process of the multimodal defect dataset is as follows: For three mainstream additive manufacturing processes—SLM (Selective Laser Melting), FDM (Fused Deposition Modeling), and BJ (Binder Jetting)—in-situ monitoring systems were built for each: FDM Dataset: By installing a camera device on the rack of a desktop fused deposition modeling printer, the processing of three sample models was monitored, artificially simulating printhead clogging failures and capturing images of defects such as missing surface material and hollow collapse in the parts. Frames were extracted from the video at 10-second sampling intervals, resulting in 4226 images with an initial size of 1024×576. Normal and abnormal samples each accounted for 50%, and were divided into training, validation, and test sets in a 7:2:1 ratio.
[0028] SLM Dataset: Using a BLT S310 printer, images of the powder spreading bed surface were captured by a 5-megapixel industrial camera. Simultaneously, a torque sensor installed below the intelligent scraper collected torque data during the processing. A total of 1332 complete powder spreading process images and 1700 corresponding torque data blocks were acquired, and divided into training and testing sets at an 8:2 ratio.
[0029] The BJ dataset uses publicly available data from the ExOne M-Flex adhesive jet printer at Oak Ridge National Laboratory, USA. H13 tool steel was used as the raw material, and images of the powder bed surface were acquired using a 20-megapixel visible light camera. Based on the insufficient powder supply defect type, 403 valid images were obtained, including 162 normal images and 241 abnormal images.
[0030] All datasets were preprocessed before being input into the model: Data augmentation operations, including random rotation, cropping, and brightness adjustment, were performed on the 2D image monitoring data; a binary mask for the part region was generated using the YOLOv5 object detection model, and pixel-level weighted with the original image to remove irrelevant background interference such as the printing equipment frame; all images were uniformly cropped to 224×224 pixels to obtain the preprocessed 2D image monitoring data. The 1D time-series sensing data was divided into blocks according to the processing cycle, and the time-series data within each processing cycle was converted into a 2D matrix form to obtain the preprocessed time-series sensing data; the input dimension of the preprocessed 2D image monitoring data and the time-series sensing data was unified. In the SLM process, a single powder spreading operation lasts approximately 30 seconds, and the torque sensor sampling period is 0.5 seconds; therefore, each data block contains 60 data points, completing the time alignment.
[0031] Specifically, in S2, an image feature extraction network and a temporal feature extraction network are built respectively to extract features from the multimodal defect dataset, thereby obtaining image features and temporal features, and completing the independent extraction of two-dimensional image defect features and one-dimensional temporal defect features.
[0032] Building an image feature extraction network: Using ResNet50 as the baseline network, an improved convolutional attention module is inserted between its residual layers. The overall network framework is as follows: Figure 2 As shown in the figure, this module consists of two concatenated parts: channel attention and spatial attention. The channel attention part adopts the improved method based on the scaling dot product mechanism proposed in this invention, replacing the shared fully connected layer structure in the original CBAM. The improved channel attention module structure is as follows: Figure 3 As shown.
[0033] The method for extracting two-dimensional image features of surface defects in additive manufacturing parts is as follows: 1): Monitoring data from two-dimensional images Perform global max pooling and global average pooling on 'a' respectively to obtain local salient features. and global features ; 2): Obtain the query matrix Q, key matrix K, and value matrix V by linearly mapping the local salient features and global features:
[0034] In the formula: , , c is the linear mapping weight matrix; c is the input feature dimension; d k d v This is the output feature dimension.
[0035] 3): Calculate the correlation strength matrix between local salient features and global features using a scaled dot product attention mechanism:
[0036] 4): Multiply the correlation strength matrix by the value vector to obtain the enhanced channel attention feature map:
[0037] In the formula: This is the Sigmoid function.
[0038] 5): Using the original CBAM spatial attention structure, average pooling and max pooling are applied to the enhanced channel attention feature maps, and spatial attention feature maps (image features) are obtained through a 7×7 convolutional layer and a Sigmoid activation function.
[0039] The model was trained using the AdamW optimizer, a binary cross-entropy loss function, a classifier network drop rate of 0.4, an L2 regularization parameter of 0.0001, a learning rate of 0.0001, and a 5-fold cross-validation method.
[0040] The temporal feature extraction network is constructed as follows: To address the lack of significant frequency domain features in SLM torque data, a ResNet18 network is employed as the temporal feature extraction architecture. One-dimensional temporal data is reconstructed into a two-dimensional matrix form and input into the network to extract temporal features of processing anomalies. The spatial awareness capability of two-dimensional convolution is utilized to extract temporal features. The network framework is as follows: Figure 4 As shown, the network retains only four residual blocks, each containing two convolutional layers, two normalization layers, and multiple pooling layers, and finally outputs temporal features with uniform dimensions through a fully connected layer.
[0041] The extracted image features and temporal features are normalized to unify the feature dimensions.
[0042] To verify the effectiveness of the proposed method, two control models were set up: a 1D_ResNet18 model with 2D convolutional layers replaced by 1D convolutional layers, and an LSTM model commonly used in traditional time series modeling. Model training employed the AdamW optimizer, binary cross-entropy loss function, a classifier network drop rate of 0.6, an L2 regularization parameter of 0.02, and a learning rate of 0.0001. The ResNet18 and 1D_ResNet18 models were trained for 50 epochs, while the LSTM model was trained for 80 epochs.
[0043] Comparison of normal and abnormal torque signals of SLM process powder spreading scraper, for example Figure 5 As shown, the abnormal torque exhibits a significant abrupt peak during the scraper's return stroke. The training-validation loss curves for each model are shown below. Figure 6 As shown, the PR curve is as follows Figure 7 As shown in the figure. Experimental results show that the ResNet18 two-dimensional convolutional temporal feature extraction method used in this invention achieves an accuracy of 76.30%, which is 26% and 13% higher than that of 1D_ResNet18 and LSTM models, respectively.
[0044] Specifically, in S3, a bi-branch feature fusion network based on a pre-built LSTM and cross-attention mechanism performs bi-directional metric space mapping on image features and temporal features, thereby completing cross-modal feature collaborative alignment and fusion.
[0045] Overall network framework such as Figure 8 As shown, the image and temporal feature extraction network uses the pre-trained model from S2, freezing its internal parameters during the feature fusion stage to accelerate convergence. The network adopts a parallel layout, setting up LSTM-gated fusion branches and cross-attention fusion branches respectively to achieve bidirectional metric space mapping between images and temporal features.
[0046] The specific method is as follows: S31: LSTM Single-Branch Feature Mapping Based on Gated Mechanism This paper utilizes an LSTM gating mechanism to dynamically control the flow of information through forget gates, input gates, and output gates. One-dimensional temporal features are used as the initial input, and image features as the subsequent input. A cascaded LSTM network captures the collaborative semantic information between the input features, dynamically adjusting the semantic space of the image features. A multi-cascaded LSTM structure is shown below. Figure 9 As shown.
[0047] To compensate for the information loss of previous stage features in the early stages of training, the output of the previous stage is weighted and superimposed with the input of the next stage:
[0048] In the formula: This is the output value of the preceding gating network; Image features; Assign a learnable weight matrix; W For the mapping matrix Mapped to Same spatial dimensions.
[0049] Simultaneously, residual connections are introduced to ensure the integrity of the fused features:
[0050] In the formula: These are the final image fusion features after spatial mapping is completed.
[0051] S32: Single-branch feature mapping based on cross-attention mechanism Using two-dimensional image features as query vectors and one-dimensional temporal features as key-value vectors, the association strength between the two types of features is calculated to complete the semantic space correction of the temporal features:
[0052]
[0053] Similarly, temporal feature residual connections are introduced:
[0054] In the formula: For image feature mapping query vector; , These are the key vector and value vector of the time-series feature mapping, respectively; The linear mapping weight matrix, For bias terms; d The dimension of the feature vector; This is a temporal fusion feature.
[0055] S33: Dual-branch collaborative feature fusion The image fusion features output by the LSTM gated fusion branch are concatenated with the temporal fusion features output by the cross-attention fusion branch to obtain the final multimodal fusion features.
[0056] Furthermore, the constructed dual-branch feature fusion network was trained using the AdamW optimizer, the binary cross-entropy loss function, and a batch size of 8. The training parameters were kept consistent with those in the feature extraction stage.
[0057] The formula for the binary cross-entropy loss function is:
[0058] In the formula: N The number of samples; This represents the original output of the model for the i-th sample. The true label of the i-th sample The parameter update formula for the AdamW optimizer is:
[0059] In the formula: For the loss function with respect to parameters The gradient; This is a first-order moment estimate; This is the decay of the first moment; It is a second-order moment estimate; The attenuation is estimated by the second moment; , This is the deviation correction value; The learning rate; This is the weight decay coefficient; To prevent division by zero of constants.
[0060] Specifically, in S4, the fused multimodal features are input into the defect classifier to complete the classification and recognition of defects in additive manufacturing parts, and the classification and recognition results are obtained.
[0061] The fused multimodal features are input into a fully connected classifier, and the defect category probability is output through a Softmax activation function. Furthermore, the following five evaluation metrics are used to quantitatively evaluate the defect classification and identification results: Recognition accuracy:
[0062] Accuracy:
[0063] Recall rate:
[0064] F1 score:
[0065] Average accuracy:
[0066] In the formula: TP represents a true positive instance; TN represents a true negative instance; FP represents a false positive instance; FN represents a false negative instance; Let be the accuracy at the i-th threshold; Let be the recall rate at the i-th threshold; n is the number of thresholds.
[0067] Example 2 Based on Example 1, this example focuses on the powder spreading defect detection task in the SLM laser selective melting process. The specific implementation steps are as follows: Data acquisition and alignment involved capturing images of the powder-spreading bed surface using an industrial camera and collecting scraper torque data using a torque sensor. Images and torque data from the same processing moment were paired based on timestamps, resulting in 1700 multimodal data samples. These samples were then divided into training and testing sets at an 8:2 ratio. The pairing of images and time-series data for the same processing stage in the SLM process is shown below. Figure 10 As shown.
[0068] Image feature extraction involves embedding a preprocessed 224×224 image into a ResNet50 network with an improved scaling dot product attention mechanism to extract defect features such as uneven powdering and warping in the image.
[0069] Temporal feature extraction involves reconstructing each torque data block containing 60 data points into a two-dimensional matrix, inputting it into a ResNet18 network, and extracting temporal features such as abnormal torque mutations.
[0070] The dual-branch feature fusion method inputs image features and temporal features into a dual-branch fusion network. The image space mapping guided by temporal features is completed through the LSTM branch, and the temporal space mapping guided by image features is completed through the cross-attention branch. Finally, the fused features are obtained by splicing them together.
[0071] Defect classification and evaluation involves inputting fused features into a fully connected classifier, which outputs the defect identification result. The PR curves of this invention are compared with those of single-modal image recognition, single-modal temporal recognition, traditional feature-level direct concatenation fusion, single-branch LSTM fusion, and single-branch cross-attention fusion methods. Figure 11 As shown.
[0072] Experimental results show that the proposed dual-branch fusion network achieves 98.10% accuracy, 95.79% F1 score, 100% recall and 99.92% mean precision on the SLM dataset. Compared with the single-modal image recognition method, the accuracy is improved by 4.18%, and compared with the traditional feature-level fusion method, the accuracy is improved by 6%.
[0073] Example 3 Multi-process adaptability verification experiment: To verify the adaptability of the method of the present invention to different additive manufacturing processes, image feature extraction performance tests were conducted on the FDM and BJ datasets, respectively. The experimental results are shown in Tables 1, 2 and 3.
[0074] Table 1 Comparison of evaluation metrics for various image feature extraction models on the FDM dataset
[0075] Table 2 Comparison of evaluation metrics for various image feature extraction models on the SLM dataset
[0076] Table 3 Comparison of evaluation metrics for various image feature extraction models on the BJ dataset
[0077] Experimental results show that the improved scaling dot product channel attention mechanism proposed in this invention achieves the best image feature extraction performance on three process datasets. Compared with the original CBAM module, the accuracy on FDM, SLM and BJ datasets is improved by 6.17%, 2.11% and 11.3% respectively, which proves that the method has good multi-process adaptability and robustness.
[0078] Example 4 This invention provides an additive manufacturing part defect identification system based on dual-branch cross-modal feature fusion, comprising: The data synchronous acquisition and preprocessing module is used to synchronously acquire two-dimensional image monitoring data and one-dimensional time-series sensing data during the additive manufacturing process, complete the preprocessing of the two types of heterogeneous data according to the timestamp, and construct a multimodal defect dataset of additive parts based on the preprocessed data. A dual-modal feature extraction module is used to build an image feature extraction network and a temporal feature extraction network respectively, and to extract features from the multimodal defect dataset to obtain image features and temporal features; The dual-branch cross-modal feature fusion module is used to perform bidirectional metric space mapping on image features and temporal features based on a pre-built dual-branch feature fusion network to obtain fused multimodal features. The defect classification and recognition module is used to input the fused multimodal features into the defect classifier to complete the classification and recognition of defects in additive manufacturing parts and obtain the classification and recognition results. Furthermore, it also includes a result evaluation and verification module, which uses five evaluation indicators—accuracy, precision, recall, F1 score, and average precision—to complete the quantitative verification of the defect identification model's performance.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for defect identification in additive manufacturing parts based on dual-branch cross-modal feature fusion, characterized in that, Includes the following steps: Two-dimensional image monitoring data and one-dimensional time-series sensing data are collected simultaneously during the additive manufacturing process. The two types of heterogeneous data are preprocessed according to the timestamp, and a multimodal defect dataset of additive parts is constructed based on the preprocessed data. Image feature extraction network and temporal feature extraction network were built respectively to extract features from the multimodal defect dataset, thereby obtaining image features and temporal features; Based on a pre-built dual-branch feature fusion network, bidirectional metric space mapping is performed on image features and temporal features to obtain fused multimodal features; The fused multimodal features are input into the defect classifier to complete the classification and recognition of defects in additive manufacturing parts, and the classification and recognition results are obtained.
2. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 1, characterized in that, The synchronous acquisition of two-dimensional image monitoring data and one-dimensional temporal sensing data during the additive manufacturing process is performed. The temporal alignment preprocessing of the two types of heterogeneous data is completed according to the timestamp, which is used as the original input of the multimodal feature fusion network. The data during the additive manufacturing process is acquired by the in-situ monitoring system of three additive manufacturing processes: SLM laser selective melting, FDM fused deposition modeling, and BJ binder spraying.
3. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 2, characterized in that, The preprocessing method is as follows: Data augmentation operations, including random rotation, cropping, and brightness adjustment, are performed on the two-dimensional image monitoring data. A binary mask is generated through target detection to remove irrelevant background areas, resulting in preprocessed two-dimensional image monitoring data. One-dimensional temporal sensing data is divided into blocks according to the processing cycle. The temporal sensing data in each processing cycle is converted into a two-dimensional matrix form, which facilitates the extraction of temporal features with the same dimension as the image through a two-dimensional convolutional network, reduces dimensionality differences, and promotes the effectiveness of subsequent feature fusion.
4. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 3, characterized in that, The method for constructing image feature extraction networks and temporal feature extraction networks respectively to extract features from the multimodal defect dataset and obtain image features and temporal features is as follows: A ResNet50 network with an improved scaling dot product channel attention mechanism was used as the image feature extraction network to extract features from preprocessed two-dimensional image monitoring data. Using ResNet18 network as the temporal feature extraction network, the temporal data converted into a two-dimensional matrix form is input into the network to extract the preprocessed temporal sensing features; Meanwhile, the extracted image features and temporal features are normalized to unify the feature distribution measurement interval.
5. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 4, characterized in that, The method for extracting image features from preprocessed two-dimensional image monitoring data by using a ResNet50 network with an embedded improved scaling dot product channel attention mechanism as the image feature extraction network is as follows: The two-dimensional image monitoring data are subjected to global max pooling and global average pooling respectively to obtain local salient features and global features. The query matrix Q, the key matrix K, and the value matrix V are obtained by linear mapping the local salient features and the global features. The correlation strength matrix between local salient features and global features is calculated using a scaled dot product attention mechanism. The correlation strength matrix is inner productted with the original feature map to obtain the feature map after channel attention enhancement; The enhanced channel attention feature maps are processed by average pooling and max pooling respectively, and the final extracted image features are obtained through convolutional layers and activation functions.
6. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 4, characterized in that, The method for extracting dynamic features from preprocessed temporal sensing data by using a ResNet18 network as the temporal feature extraction network, converting the temporal data into a two-dimensional matrix form, is as follows: The temporal feature extraction network adopts a ResNet18 architecture consisting of four residual blocks. It extracts temporal features from temporal data that has undergone two-dimensional matrix preprocessing through two-dimensional convolutional layers, resulting in temporal features with the same dimension as image features.
7. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 1, characterized in that, In the step of obtaining fused multimodal features by performing bidirectional metric space mapping on image features and temporal features based on a pre-constructed dual-branch feature fusion network, the dual-branch feature fusion network includes a parallel LSTM gated fusion branch and a cross-attention fusion branch.
8. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 7, characterized in that, The method for obtaining fused multimodal features by performing bidirectional metric space mapping on image features and temporal features based on a pre-constructed dual-branch feature fusion network is as follows: In the LSTM gated fusion branch, temporal features are used as the input of the previous stage and image features are used as the input of the next stage. The semantic space of the image features is dynamically adjusted through the gating mechanism of the cascaded LSTM network, and residual connections are introduced to compensate for the loss of feature information, so as to obtain the image fusion features. In the cross-attention fusion branch, image features are used as query vectors and temporal features are used as key-value vectors. The association strength between the two types of features is calculated, the semantic space correction of temporal features is completed, and residual connections are introduced to ensure the integrity of temporal features, thus obtaining temporal fusion features. The image fusion features output by the LSTM gated fusion branch are concatenated with the temporal fusion features output by the cross-attention fusion branch to obtain the final multimodal fusion features.
9. The method for defect identification of additive manufacturing parts based on dual-branch cross-modal feature fusion according to claim 1, characterized in that, After classifying and identifying defects in additive manufacturing parts and obtaining the classification results, the process also includes a quantitative evaluation of the classification results, with specific indicators as follows: Recognition accuracy: Accuracy: Recall rate: F1 score: Average accuracy: In the formula: TP represents a true positive instance; TN represents a true negative instance; FP represents a false positive instance; FN represents a false negative instance; Let be the accuracy at the i-th threshold; Let be the recall rate at the i-th threshold; n is the number of thresholds.
10. A defect identification system for additive manufacturing parts based on dual-branch cross-modal feature fusion, characterized in that, include: The data synchronous acquisition and preprocessing module is used to synchronously acquire two-dimensional image monitoring data and one-dimensional time-series sensing data during the additive manufacturing process, complete the preprocessing of the two types of heterogeneous data according to the timestamp, and construct a multimodal defect dataset of additive parts based on the preprocessed data. A dual-modal feature extraction module is used to build an image feature extraction network and a temporal feature extraction network respectively, and to extract features from the multimodal defect dataset to obtain image features and temporal features; The dual-branch cross-modal feature fusion module is used to perform bidirectional metric space mapping on image features and temporal features based on a pre-built dual-branch feature fusion network to obtain fused multimodal features. The defect classification and recognition module is used to input the fused multimodal features into the defect classifier to complete the classification and recognition of defects in additive manufacturing parts and obtain the classification and recognition results.
