A castings defect detection method based on double-channel collaborative diagnosis and root cause analysis

CN122594697APending Publication Date: 2026-08-18CHONGQING YU KEE HAAMSING MASCH MFG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610608932.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-06
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0008]综上所述,现有技术存在以下不足:检测通道单一,缺乏过程参数诊断与外观视觉诊断的协同融合;缺陷诊断与根因定位脱节,难以形成从缺陷识别到工艺改进的智能闭环;对熔模铸造特定工艺条件下的复杂非线性关系建模能力不足

Benefits of technology

[0061] 1. Dual-channel collaborative diagnosis for comprehensive detection: The system integrates deep learning-based diagnosis based on process parameters (Channel 1) with visual diagnosis based on multi-angle photometric stereo fusion images (Channel 2). Channel 1 is sensitive to process-related defects such as internal shrinkage and porosity, while Channel 2 is sensitive to visible defects such as surface sand inclusions, cracks, and cold shuts. The two complement each other, overcoming the blind spot problem of a single detection channel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594697A_ABST
    Figure CN122594697A_ABST
Patent Text Reader

Abstract

This invention discloses a casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis, belonging to the field of investment casting quality inspection technology. The method includes: acquiring investment casting process parameters and screening quantifiable physical parameters strongly correlated with defects; constructing a Bayesian network causal relationship graph based on a directed acyclic graph; converting time-series data into statistical features and concatenating them with static parameters to form a structured feature matrix; processing the feature matrix using a TabNet model to complete the first defect diagnosis; capturing images of the casting appearance and performing multi-angle photometric stereo fusion processing using an EfficientNet-B4 model to complete the second defect diagnosis; calculating the consistency score of the two diagnoses using Dempster-Shafer evidence theory to complete dual-channel decision fusion; performing SHAP-based post-causation on the TabNet model output and combining it with Bayesian network backward probability inference to complete root cause localization. This invention, through the dual-channel collaboration of process parameter diagnosis and visual appearance diagnosis, achieves comprehensive detection and process root cause localization of typical investment casting defects such as shrinkage porosity, gas porosity, cracks, sand inclusions, and cold shuts, significantly improving the accuracy and interpretability of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of precision casting technology, and in particular to a method for detecting casting defects based on dual-channel collaborative diagnosis and root cause analysis. Background Technology

[0002] Investment casting (also known as precision casting) is a key process for manufacturing high-precision and complex parts such as aerospace engine blades, medical device implants, and automotive turbocharger impellers. The investment casting process is lengthy and complex, encompassing multiple stages including wax pattern making, shell preparation, dewaxing, firing, melting and pouring, and post-processing. Fluctuations in the process parameters of any of these stages can lead to defects in the casting, such as shrinkage porosity, cracks, sand inclusions, and cold shuts.

[0003] Currently, defect detection in the precision casting industry mainly relies on the following methods:

[0004] 1. Manual visual inspection: This method relies on the experience of the inspectors to check the appearance of the castings. It is highly subjective, inconsistent, and cannot identify internal defects.

[0005] 2. Single non-destructive testing techniques: such as X-ray inspection, ultrasonic testing, penetrant testing, etc., usually only target a certain type of defect (internal or surface), lack correlation analysis of process parameters throughout the casting process, and cannot achieve root cause localization of defects.

[0006] 3. Diagnostic methods based on traditional machine learning: Some studies have attempted to train classification models using process parameter data, but usually only shallow models (such as decision trees and support vector machines) are used, which are difficult to capture the complex nonlinear relationships between investment casting process parameters, and are not systematically integrated with visual inspection of casting appearance.

[0007] 4. Single-image detection method: Convolutional neural networks are used to classify defects in the appearance images of castings. However, due to the complex curved surfaces and reflective properties of precision castings, minute defects are easily missed or misjudged under a single light source. Furthermore, relying solely on appearance cannot diagnose internal defects or trace the root cause back to the manufacturing process.

[0008] In summary, the existing technologies have the following shortcomings: the detection channels are limited, lacking the synergistic integration of process parameter diagnosis and visual appearance diagnosis; defect diagnosis and root cause localization are disconnected, making it difficult to form an intelligent closed loop from defect identification to process improvement; and the ability to model complex nonlinear relationships under specific process conditions of investment casting is insufficient. Summary of the Invention

[0009] This invention discloses a method for detecting casting defects based on dual-channel collaborative diagnosis and root cause analysis. The specific method is as follows:

[0010] Obtain process parameters for investment casting and screen quantifiable physical parameters that are strongly correlated with defects;

[0011] A Bayesian network structure causal relationship graph is constructed based on a directed acyclic graph; the nodes of the causal relationship graph are process parameters and defect types, and the directed edges represent causal influences.

[0012] The time-series data composed of quantifiable physical parameters is transformed into statistical features and concatenated with static parameters to form a structured feature matrix.

[0013] The TabNet model was used to process the feature matrix to complete the first defect diagnosis of the investment casting.

[0014] Images of the casting's appearance were captured and processed using the EfficientNet-B4 model through multi-angle elimination and fusion to complete the second defect diagnosis of the investment casting.

[0015] Calculate the consistency score between the first and second defect diagnoses of investment castings, and complete the dual-channel decision fusion.

[0016] After completing the final defect diagnosis, post-hoc attribution is performed on the TabNet model output to complete the root cause localization.

[0017] Furthermore, quantifiable physical parameters strongly correlated with defects are screened, using the following specific methods:

[0018] Based on the standard process flow of investment casting, acquire the sensor data that can be collected and the physical quantities that can be recorded manually at each process node to form a list of candidate parameters;

[0019] Obtain historical data of the candidate parameter list, and perform missing value processing, outlier removal processing, and defect label binarization annotation respectively;

[0020] Calculate the Pearson correlation coefficient between candidate parameters and labels. ;

[0021] when When the value is greater than the threshold, it is retained as a quantifiable physical parameter.

[0022] Furthermore, a Bayesian network structure causal relationship graph is constructed based on a directed acyclic graph, as follows:

[0023] Based on the quantifiable physical parameters and defect types obtained through screening, the set of nodes in the Bayesian network is determined. ;

[0024] Constructing a Directed Acyclic Graph of Bayesian Network Structure ,in It is a set of directed edges, representing the causal direction, based on the expert rules of physical mechanisms;

[0025] In determining the acyclic graph Then, maximum likelihood estimation is used to calculate the conditional probability distribution for each node;

[0026] Perform conditional independence checks on the constructed Bayesian network, remove redundant edges or correct erroneous directions, and ensure the physical interpretability of causal relationships.

[0027] Furthermore, the features are concatenated into a structured feature matrix, as follows:

[0028] Quantifiable physical parameters are classified according to data acquisition type, including: static single-point values ​​and time-series data;

[0029] For length of Timing signals Using a window size of The moving average;

[0030] Resample the timing signal to a fixed length;

[0031] Transform the time series curve into a set of scalar features that can characterize the shape of the curve;

[0032] Numerical transformation is performed on static single-point values, and combined features are constructed based on the causal relationship graph.

[0033] All extracted scalar and combined features are organized into a two-dimensional matrix by rows and columns, and missing values ​​are processed. The structured feature matrix is ​​represented as follows: .

[0034] Furthermore, the feature matrix is ​​processed using the TabNet model to complete the first defect diagnosis of the investment casting. The specific method is as follows:

[0035] Structured feature matrix and the corresponding defect label vector Load into the model framework;

[0036] The TabNet model performs a non-linear mapping of input features to generate representations for decision-making and next-step attention.

[0037] Based on the feature representation from the previous step, calculate the attention mask for the current step to achieve sparse selection of parameters;

[0038] The outputs of each decision step are aggregated and output through a fully connected layer, showing the probability of belonging to a specific type of defect.

[0039] Construct a loss function that includes classification cross-entropy and sparse regularization, and optimize the TabNet model parameters through gradient descent training;

[0040] After training is complete, forward propagation is used to output the defect category and confidence level.

[0041] Furthermore, the EfficientNet-B4 model is used for multi-angle elimination and fusion processing to complete the second defect diagnosis of the investment casting. The specific method is as follows:

[0042] At the industrial inspection station, an industrial camera is fixed around the casting, and multiple sets of parallel LED light sources are arranged. The illumination direction of each set of light sources is known and they are not coplanar. Light sources at different angles are turned on in sequence. Each time a set of light sources is turned on, the camera is triggered to capture a grayscale image, thus obtaining a sequence of images under different lighting conditions from the same viewpoint.

[0043] By utilizing the principle of photometric stereo vision, the surface normal vector and albedo are recovered based on the intensity changes at each pixel position of a multi-angle light source image sequence, and different types of fused images are generated.

[0044] The fused image is input into a pre-trained EfficientNet-B4 convolutional neural network, which outputs the probability of various defects.

[0045] Furthermore, the dual-channel decision fusion is completed, and the specific methods are as follows:

[0046] The first and second defect diagnoses of investment castings are transformed into the basic probability assignment functions required by evidence theory.

[0047] The mass functions of two independent evidence sources are fused using the Dempster combination rule to obtain a joint mass function;

[0048] Based on the mass function and conflict coefficient before and after fusion, the decision quantification index is calculated;

[0049] Based on the aforementioned quantitative indicators, the lower-level decision logic tree is executed to determine the output fusion conclusion.

[0050] Furthermore, post-hoc attribution is performed on the TabNet model output to complete root cause localization. The specific method is as follows:

[0051] For samples that trigger defect diagnosis, the marginal contribution (SHAP) value of each input feature in the TabNet model to the defect prediction result is calculated to form a feature importance ranking.

[0052] By combining the SHAP attribution results and Bayesian backward probability inference, a root cause localization report is output, and a comprehensive credibility score is calculated for each candidate root cause path.

[0053] Furthermore, the process parameters for investment casting include, but are not limited to:

[0054] Wax molding process parameters: wax pressing temperature and holding time;

[0055] Shell-making process parameters: surface drying time and number of back layers;

[0056] Calcination process parameters: calcination temperature and holding time;

[0057] Casting process parameters: casting temperature, mold temperature, and vacuum degree.

[0058] Furthermore, the detectable defect types include, but are not limited to:

[0059] Shrinkage, porosity, cracks, sand inclusions, cold shuts, deformation, and rough surface.

[0060] Due to the adoption of the above technical solutions, this application has the following beneficial effects:

[0061] 1. Dual-channel collaborative diagnosis for comprehensive detection: The system integrates deep learning-based diagnosis based on process parameters (Channel 1) with visual diagnosis based on multi-angle photometric stereo fusion images (Channel 2). Channel 1 is sensitive to process-related defects such as internal shrinkage and porosity, while Channel 2 is sensitive to visible defects such as surface sand inclusions, cracks, and cold shuts. The two complement each other, overcoming the blind spot problem of a single detection channel.

[0062] 2. Rigorous decision fusion mechanism with quantifiable confidence: The Dempster-Shafer evidence theory is used for probabilistic fusion of dual-channel outputs. The consistency between the two channels is quantified through indicators such as conflict coefficient and ambiguity, avoiding the crudeness of traditional fusion methods such as simple voting or weighted averaging. When the two channels are highly consistent, the fusion confidence is significantly higher than that of either single channel.

[0063] 3. Diagnosis and root cause closure, directly guiding process improvement: Combining the ex post-attribution (SHAP) of deep learning models with backward probabilistic inference of Bayesian causal graphs, it not only outputs the defect category, but also locates the specific process parameters and physical root cause chain that caused the defect, and automatically provides rectification suggestions, realizing an intelligent closed loop from defect detection to process optimization.

[0064] 4. Adapted to the characteristics of investment casting process: By using Pearson correlation coefficient and mutual information to screen process parameters that are strongly related to defects, by using Bayesian network to encode physical causal relationships, and by using TabNet's sparse attention mechanism to simulate the focusing behavior of process experts, it fully incorporates process knowledge in the field of investment casting and has strong interpretability.

[0065] 5. Overcoming the difficulties of imaging complex surfaces: By using multi-angle light source illumination and photometric stereo vision technology, the normal vector field and albedo map of the casting surface are restored, and multi-modal fusion feature maps such as gradient map and curvature map are generated, which effectively solves the problem of visual recognition difficulties of small defects caused by complex curved surfaces and metal reflections in precision castings.

[0066] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0067] The accompanying drawings of this invention are described below.

[0068] Figure 1 This is a schematic diagram of the structure of the present invention.

[0069] Figure 2 This is a schematic diagram of a partial structure of the Bayesian network in the embodiment. Detailed Implementation

[0070] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0071] This embodiment uses the investment casting process of a 304 stainless steel closed impeller as an example to illustrate the implementation steps of the method of the present invention, such as... Figure 1 As shown.

[0072] Step 1: Obtain the process parameters of investment casting and screen quantifiable physical parameters that are strongly correlated with defects.

[0073] Based on the standard process flow of investment casting (wax pattern → shell making → dewaxing → baking → melting and pouring → post-processing), a list of candidate parameters was compiled by analyzing the sensor data that can be collected and the physical quantities that can be recorded manually at each process node. The candidate parameters include, but are not limited to: wax pressing temperature, wax pressing pressure, holding time, surface layer slurry viscosity, surface layer drying time, number of back layers, dewaxing steam pressure, maximum baking temperature, baking holding time, baking heating rate, pouring temperature, shell exit temperature, pouring speed, vacuum degree, etc., totaling approximately 60 parameters.

[0074] Data from 500 impeller batches produced in the past 6 months were extracted from the MES system and PLC database. The data was preprocessed as follows: missing values ​​were filled with the mean; outliers caused by sensor failures were removed using the 3σ principle; and quality labels were converted to a binary format (1 for the presence of shrinkage defects and 0 for the absence of shrinkage defects).

[0075] Calculate the Pearson correlation coefficient between each candidate parameter and the slack label. The calculation formula is:

[0076] ;

[0077] In the formula, For the first A parameter value for a sample, For the first Defect labels for each sample; The sample mean. This represents the average value of the defect labels.

[0078] Pick It is strongly correlated.

[0079] Step 2: Construct a Bayesian network structure causal relationship graph based on a directed acyclic graph.

[0080] Based on the quantifiable physical parameters and defect types obtained through screening, the node set of the Bayesian network is defined. ,in Let be a set of directed edges, representing the causal direction, such as the side of expert rules based on physical mechanisms, like... Figure 2 As shown. Includes: pouring temperature , Shell exit temperature Calcination heating rate Flowability of molten metal (Hidden variables / intermediate nodes), porosity defects (Target node). Each node is discretized according to its value, such as the casting temperature being discretized as {low (<1550℃), medium (1550-1580℃), high (>1580℃)}.

[0081] Initial directed edge set is established based on expert rules based on physical mechanisms. :

[0082] Pouring temperature Directly affects the fluidity of molten metal ;

[0083] Shell temperature Directly affects the fluidity of molten metal ;

[0084] Flowability of molten metal Directly affects shrinkage defects ;

[0085] Calcination heating rate Influences the probability of shell cracking, indirectly affecting shrinkage porosity. .

[0086] Based on this, we obtain the initial set of directed edges:

[0087] ;

[0088] After determining the network topology, maximum likelihood estimation (MLE) is used to calculate a conditional probability table (CPT) for each node. For example, for discrete nodes Its parent node takes the value of the first node. a combination, The value is the first The probability estimation formula for a given state is:

[0089] ;

[0090] in, To satisfy the data in the middle and The sample size was determined; finally, the G² conditional independence test was used to prune redundant edges to ensure the physical interpretability of causal relationships.

[0091] Step 3: Transform the time-series data into statistical features and concatenate them with static parameters to form a structured feature matrix.

[0092] The key parameters selected in step 1 are categorized by data acquisition type: wax pressing temperature, holding time, pouring temperature, etc., are static single-point values; calcination temperature curves are also included. and casting speed curve Time series data

[0093] For time-series signals, a moving average filter is first applied for noise reduction. The calculation formula is as follows:

[0094] ;

[0095] Then, linear interpolation is used to resample the time-series signal to a fixed length (e.g., 120 time points for the roasting curve). Scalar statistical features are extracted from the preprocessed time-series curve, including:

[0096] The characteristics of the heating section, and the formula for the maximum heating rate are:

[0097]

[0098] The characteristics of the insulation section, and the formula for the average temperature are as follows:

[0099]

[0100] The characteristics of the insulation section, and the formula for the standard deviation of temperature are:

[0101]

[0102]

[0103] In addition, statistical features of the curve shape (skewness, kurtosis) and frequency domain features (fast Fourier transform of the casting speed curve to extract the energy proportion of the low frequency band) were also extracted.

[0104] The static parameters are standardized using the Z-Score formula:

[0105]

[0106] Based on the causal relationship diagram in step 2, construct combined features with stronger physical meaning, such as the casting superheat formula:

[0107]

[0108] All extracted scalar features are organized into a two-dimensional matrix by rows (samples) and columns (feature names) to obtain the structured feature matrix:

[0109] ;

[0110] in, The total number of samples in the batch (500). The feature dimension is 45.

[0111] Step 4: Process the feature matrix using the TabNet model to complete the first defect diagnosis of the investment casting.

[0112] feature matrix and the corresponding defect label vector The dataset is divided into training and validation sets in an 8:2 ratio. A TabNet model is constructed, whose main structure consists of alternating stacks of feature transformers and attention transformers.

[0113] In the In each decision step, the feature transformer performs a nonlinear mapping on the masked input:

[0114]

[0115] in For the first Attention mask for each step; This is element-wise multiplication; It is a transform network consisting of fully connected layers, batch normalization, and GLU activation functions.

[0116] It consists of a fully connected layer, batch normalization, and a GLU activation function. The GLU function formula is:

[0117]

[0118] GLU gating allows the model to selectively forget irrelevant information.

[0119] The Attention Transformer calculates the sparse attention mask for the current step using the following formula:

[0120]

[0121] The formula is As a learnable linear layer, it outputs the original classification of the importance of each feature; It is the Sparsemax function, which projects the original scores onto a probability simplex while setting most of the outputs to 0, thus achieving feature sparsity.

[0122] The sparsemax function sets the attention weights of most features to zero, achieving sparse parameter selection. The output of the decision step is then pooled and passed through a fully connected layer and the Softmax function to output the probabilities of various defects, as shown in the formula:

[0123]

[0124] in,

[0125]

[0126] In the formula, For the weights and biases of the output layer, Number of categories (in this example) Shrinkage is normal; it can be expanded into multiple types of defects.

[0127] The loss function is constructed as the sum of the classification cross-entropy and the sparse regularization term, as shown in the formula:

[0128]

[0129] in,

[0130]

[0131] In the formula, For the sample Category The true label; The probability predicted by the model; For sparse regularized loss, For classification loss.

[0132] The AdamW optimizer is used for gradient descent training. After training, forward propagation is performed on each new casting batch sample, outputting the defect category and confidence level. In this embodiment, the process channel outputs a shrinkage probability of 0.91 and a confidence level of 91%.

[0133] Step 5: Perform multi-angle elimination and fusion processing using the EfficientNet-B4 model to complete the second defect diagnosis of the investment casting.

[0134] At the industrial inspection station, a 5-megapixel industrial camera and four sets of parallel LED light sources are fixed around the casting. The illumination directions of the four sets of light sources are: 45° directly in front, 45° to the right, 45° directly behind, and 45° to the left, and the illumination directions of each set of light sources are not coplanar. Each set of light sources is turned on sequentially, triggering the camera to capture a grayscale image each time a set is turned on, resulting in a sequence of four images from the same viewpoint under different lighting conditions. The light source direction vectors are pre-calibrated using the specular method.

[0135] Based on the principle of photometric stereo vision, assuming the surface of the casting satisfies the Lambertian reflection model, the formula is:

[0136]

[0137] in, For the light source Illuminated pixels grayscale value;

[0138] This represents the albedo of the surface at that point (characterizing the material's inherent reflectivity, independent of the direction of light).

[0139] Let be the unit normal vector of the surface at that point.

[0140] Light source The direction of the unit vector.

[0141] When the light source shines vertically from directly above (l=(0,0,1)), the intensity of the horizontal surface (n=(0,0,1)) is the greatest; the intensity of areas with tilted or concave defects is reduced due to the deviation of the normal vector, resulting in pixel values ​​with differences in brightness.

[0142] Intensity values ​​of the same pixel under four light sources ,definition:

[0143]

[0144] The reflection model can then be rewritten in linear form:

[0145]

[0146] A system of equations is established for the four light sources:

[0147]

[0148] Right now:

[0149]

[0150] Since the system of equations is overdetermined (4 equations, 3 unknowns), the least squares method is used to solve it:

[0151]

[0152] Thus, the surface normal vector and albedo are recovered, as shown in the formula:

[0153]

[0154] Further, multimodal fusion feature maps are generated: texture map (albedo normalized), gradient map, and average curvature map, using the following formula:

[0155]

[0156]

[0157] The above feature maps are synthesized into a single 380×380×3 HDR fused image using a multi-scale Laplacian pyramid fusion method.

[0158] The fused image is input into a pre-trained and fine-tuned EfficientNet-B4 convolutional neural network. The network extracts features through depthwise separable convolutions using the MBConv module, performs attention recalibration on the channels using the SE module, and outputs the probabilities of six classes (normal, shrunken, porous, sand-filled, cold shut, and crack) via a Softmax layer after global average pooling. FocalLoss is used during training to handle class imbalance, with the formula:

[0159]

[0160] In this embodiment, the image channel output scaling probability is 0.88, with a confidence level of 88%.

[0161] Step 6: Calculate the consistency score for dual-channel defect diagnosis and complete the dual-channel decision fusion.

[0162] Define the identification framework:

[0163]

[0164] First, temperature scaling is used to calibrate the confidence level of the probabilities output by the two channels, using the following formula:

[0165]

[0166] Set confidence threshold

[0167]

[0168] Construct a basic probability assignment (mass) function based on the calibrated confidence level.

[0169] Process Channel

[0170] Image Channel

[0171] The Dempster combinatorial rule is used for fusion, and the formula is as follows:

[0172]

[0173] Among them, the conflict coefficient The formula is:

[0174]

[0175] The formula for calculating the ambiguity index of decision-making is as follows:

[0176]

[0177] Before fusion, AM was 0.327 bits and 0.436 bits respectively, and after fusion it decreased to 0.034 bits; the pignistic probability was calculated as follows. .

[0178] According to the decision logic tree: ,and Furthermore, the TOP-1 results from both channels are consistent, and Rule 1 is executed—high confidence diagnosis of shrinkage defect. The system outputs the final diagnostic conclusion: shrinkage defect (overall confidence level 99.55%), and triggers the root cause analysis in step 7.

[0179] Step 7: Perform post-hoc attribution on the TabNet model output to complete root cause localization.

[0180] For a sample currently diagnosed as hyposthenia, calculate the SHAP value for each input feature in the TabNet model. This value is based on the game-theoretic definition of Shapley value, and the calculation formula is as follows:

[0181]

[0182] SHAP analysis results show that the top three contributing factors are: casting superheat (SHAP=+0.38), standard deviation of the firing insulation section (SHAP=+0.25), and shell exit temperature (SHAP=+0.16).

[0183] High-contribution features are mapped onto the Bayesian causal relationship graph constructed in step 2 for backward probability inference. Taking the standard deviation of the calcination insulation section as an example, the posterior probability calculation formula is as follows:

[0184]

[0185] Link A (abnormal temperature control in the calcining furnace → uneven heat storage in the mold shell → shrinkage porosity) scored 48.9%, and Link B (low pouring temperature → insufficient fluidity → shrinkage porosity) scored 45.0%. The system outputs a joint root cause analysis report, recommending that the heating element in zone B of the calcining furnace be checked and replaced, and that the pouring temperature be temporarily increased by 15-20℃.

[0186] Through the above steps, this embodiment completes a closed-loop intelligent detection process from process parameter screening, dual-channel defect diagnosis, decision fusion to process root cause localization.

[0187] 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 detecting casting defects based on dual-channel collaborative diagnosis and root cause analysis, characterized in that, The specific method is as follows: Obtain process parameters for investment casting and screen quantifiable physical parameters that are strongly correlated with defects; A Bayesian network structure causal relationship graph is constructed based on a directed acyclic graph; the nodes of the causal relationship graph are process parameters and defect types, and the directed edges represent causal influences. The time-series data composed of quantifiable physical parameters is transformed into statistical features and concatenated with static parameters to form a structured feature matrix. The TabNet model was used to process the feature matrix to complete the first defect diagnosis of the investment casting. Images of the casting's appearance were captured and processed using the EfficientNet-B4 model through multi-angle elimination and fusion to complete the second defect diagnosis of the investment casting. Calculate the consistency score between the first and second defect diagnoses of investment castings, and complete the dual-channel decision fusion. After completing the final defect diagnosis, post-hoc attribution is performed on the TabNet model output to complete the root cause localization.

2. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 1, characterized in that, The specific method for screening quantifiable physical parameters that are strongly correlated with defects is as follows: Based on the standard process flow of investment casting, acquire the sensor data that can be collected and the physical quantities that can be recorded manually at each process node to form a list of candidate parameters; Obtain historical data of the candidate parameter list, and perform missing value processing, outlier removal processing, and defect label binarization annotation respectively; Calculate the Pearson correlation coefficient between candidate parameters and labels. ; when When the value is greater than the threshold, it is retained as a quantifiable physical parameter.

3. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 2, characterized in that, The method for constructing a Bayesian network structure causal relationship graph based on a directed acyclic graph is as follows: Based on the quantifiable physical parameters and defect types obtained through screening, the set of nodes in the Bayesian network is determined. ; Constructing a Directed Acyclic Graph of Bayesian Network Structure ,in It is a set of directed edges, representing the causal direction, based on the expert rules of physical mechanisms; In determining the acyclic graph Then, maximum likelihood estimation is used to calculate the conditional probability distribution for each node; Perform conditional independence checks on the constructed Bayesian network, remove redundant edges or correct erroneous directions, and ensure the physical interpretability of causal relationships.

4. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 3, characterized in that, The structured feature matrix is ​​then concatenated using the following method: Quantifiable physical parameters are classified according to data acquisition type, including: static single-point values ​​and time-series data; For length of Timing signals Using a window size of The moving average; Resample the timing signal to a fixed length; Transform the time series curve into a set of scalar features that can characterize the shape of the curve; Numerical transformation is performed on static single-point values, and combined features are constructed based on the causal relationship graph. All extracted scalar and combined features are organized into a two-dimensional matrix by rows and columns, and missing values ​​are processed. The structured feature matrix is ​​represented as follows: .

5. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 1, characterized in that, The TabNet model is used to process the feature matrix to complete the first defect diagnosis of the investment casting. The specific method is as follows: Structured feature matrix and the corresponding defect label vector Load into the model framework; The TabNet model performs a non-linear mapping of input features to generate representations for decision-making and next-step attention. Based on the feature representation from the previous step, calculate the attention mask for the current step to achieve sparse selection of parameters; The outputs of each decision step are aggregated and output through a fully connected layer, showing the probability of belonging to a specific type of defect. Construct a loss function that includes classification cross-entropy and sparse regularization, and optimize the TabNet model parameters through gradient descent training; After training is complete, forward propagation is used to output the defect category and confidence level.

6. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 2, characterized in that, The EfficientNet-B4 model was used for multi-angle elimination and fusion processing to complete the second defect diagnosis of the investment casting. The specific method is as follows: At the industrial inspection station, an industrial camera is fixed around the casting, and multiple sets of parallel LED light sources are arranged. The illumination direction of each set of light sources is known and they are not coplanar. Light sources at different angles are turned on in sequence. Each time a set of light sources is turned on, the camera is triggered to capture a grayscale image, thus obtaining a sequence of images under different lighting conditions from the same viewpoint. By utilizing the principle of photometric stereo vision, the surface normal vector and albedo are recovered based on the intensity changes at each pixel position of a multi-angle light source image sequence, and different types of fused images are generated. The fused image is input into a pre-trained EfficientNet-B4 convolutional neural network, which outputs the probability of various defects.

7. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 6, characterized in that, The specific method for achieving dual-channel decision fusion is as follows: The first and second defect diagnoses of investment castings are transformed into the basic probability assignment functions required by evidence theory. The mass functions of two independent evidence sources are fused using the Dempster combination rule to obtain a joint mass function; Based on the mass function and conflict coefficient before and after fusion, the decision quantification index is calculated; Based on the aforementioned quantitative indicators, the lower-level decision logic tree is executed to determine the output fusion conclusion.

8. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 7, characterized in that, Post-hoc attribution is performed on the TabNet model output to complete root cause localization. The specific method is as follows: For samples that trigger defect diagnosis, the marginal contribution (SHAP) value of each input feature in the TabNet model to the defect prediction result is calculated to form a feature importance ranking. By combining the SHAP attribution results and Bayesian backward probability inference, a root cause localization report is output, and a comprehensive credibility score is calculated for each candidate root cause path.

9. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 1, characterized in that, The process parameters for investment casting include, but are not limited to: Wax molding process parameters: wax pressing temperature and holding time; Shell-making process parameters: surface drying time and number of back layers; Calcination process parameters: calcination temperature and holding time; Casting process parameters: casting temperature, mold temperature, and vacuum degree.

10. The casting defect detection method based on dual-channel collaborative diagnosis and root cause analysis as described in claim 1, characterized in that, Detectable defect types include, but are not limited to: Shrinkage, porosity, cracks, sand inclusions, cold shuts, deformation, and rough surface.