A method and system for predicting microstructure of titanium alloy based on conditional generative adversarial network and a storage medium
By combining conditional generative adversarial networks with SAM models and support vector machines, the problems of manual segmentation, insufficient accuracy, and poor adaptability across working conditions in the prediction of titanium alloy microstructure are solved. This approach achieves efficient and accurate microstructure prediction, improving the interpretability and engineering application value of the method.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI JIAOTONG UNIV
- Filing Date
- 2025-12-17
- Publication Date
- 2026-04-21
AI Technical Summary
Existing methods for predicting the microstructure of titanium alloys suffer from problems such as low efficiency, reliance on manual segmentation, insufficient prediction accuracy, lack of physical mechanism interpretation, and poor adaptability across working conditions.
A conditional generative adversarial network (GAN) is used in conjunction with a SAM model for image segmentation to extract multi-scale microscopic tissue features. These features are then combined with topological and physical constraint features, and patterns are learned through a support vector machine. Finally, patterns and physical constraints are embedded into the GAN to achieve end-to-end microscopic tissue prediction.
It improves the efficiency and objectivity of microstructure segmentation, enhances the prediction accuracy and robustness under small sample conditions, realizes intuitive prediction from process parameters to microstructure images, and enhances the engineering application value of the method.
Smart Images

Figure CN121330675B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of titanium alloy microstructure analysis, specifically relating to a method, system, and storage medium for predicting titanium alloy microstructure based on conditional generative adversarial networks. Background Technology
[0002] Titanium alloys are widely used in key fields such as aerospace, shipbuilding, and energy due to their high specific strength, excellent corrosion resistance, and good high-temperature mechanical properties. The microstructure of titanium alloys directly determines their mechanical properties and service reliability, and the evolution of the microstructure is typically significantly influenced by process conditions such as deformation temperature, strain rate, and cooling rate. Therefore, accurately obtaining and predicting the microstructure characteristics of titanium alloys is a core issue in materials design and process optimization. Existing methods for microstructure prediction mainly include the following:
[0003] 1. Traditional experimental and empirical methods: These methods infer grain evolution and recrystallization behavior by combining thermal processing experiments with empirical formulas (such as the classic Zener-Hollomon relation and the JMAK kinetic model). However, these methods have limited applicability to complex process conditions, and their prediction accuracy depends on a large amount of experimental data, resulting in high costs.
[0004] 2. Numerical simulation methods: These include the crystal plasticity finite element method (CPFEM), phase-field method, and VPSC model analysis method. These methods can explain the microstructure evolution process from the perspective of microscopic mechanisms, but the model building is complex and computationally intensive, making it difficult to meet the needs of high-throughput prediction.
[0005] 3. Machine Learning-Based Prediction Methods: In recent years, machine learning has been applied to tasks such as microscopic tissue segmentation and tissue parameter prediction. For example, convolutional neural networks (CNNs) have been used for phase segmentation of tissue images, and models such as support vector machines (SVMs) and random forests (RFs) have been used for mapping process parameters to tissue parameters. However, this method still has the following drawbacks:
[0006] (1) Image segmentation relies on manual annotation, which is inefficient and subject to subjective bias;
[0007] (2) Under small sample conditions, existing statistical learning models are unable to capture complex nonlinear process-organization relationships, resulting in insufficient prediction accuracy;
[0008] (3) Most machine learning models are “black box” algorithms, lacking integration with physical mechanisms, resulting in poor interpretability;
[0009] (4) The results of microscopic tissue prediction are mostly at the level of parameterization or symbolization, lacking intuitive image-level prediction, which limits its engineering application value. Summary of the Invention
[0010] The purpose of this invention is to provide a method, system, and storage medium for predicting the microstructure of titanium alloys based on conditional generative adversarial networks, in order to solve the above-mentioned problems.
[0011] This invention is mainly achieved through the following technical solutions:
[0012] A method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks includes the following steps:
[0013] Step S1: Construct a process-organization mapping model and use the model's output as a constraint condition;
[0014] Step S11: Obtain multi-source microstructure images of the titanium alloy under different process conditions and perform preprocessing;
[0015] Step S12: Input the preprocessed microstructure image into the SAM model, segment the α phase, β phase and grain boundary regions, and output the segmentation mask image after post-processing optimization;
[0016] Step S13: Spatial registration and multi-scale resampling are performed between the segmentation mask image and the corresponding multi-source microstructure image to extract the statistical features of the microstructure. These features are then combined with topological structure features and physical constraint features to form a high-dimensional microstructure feature vector. The statistical features include grain features, global features, and graph structure features.
[0017] Step S14: Using process parameters as input and the high-dimensional microstructure feature vector from step S13 as output, a process-structure mapping model is obtained by training based on the SVM model.
[0018] Step S2: Input the random noise vector and the regularity constraint conditions into a conditional generative adversarial network to generate a predicted image; the loss function of the conditional generative adversarial network... for:
[0019] ;
[0020] in: To combat the losses;
[0021] To predict the loss of statistical features in images with regularity constraints;
[0022] L phys To predict the loss of physical constraints in image and regularity constraints;
[0023] L rec To perceive loss;
[0024] λs , λ p , λ r These are the weights used to calculate the loss function;
[0025] Step S3: Quantitatively compare the predicted image with the real image and verify the consistency of statistical features. If the verification is successful, output the prediction result; otherwise, proceed to step S1.
[0026] To better realize the present invention, further, in step S11, the multi-source microscopic tissue image includes an optical microscope image, a scanning electron microscope image, and an electron backscatter diffraction orientation imaging map; the preprocessing includes noise removal, histogram equalization, normalization, and spatial registration.
[0027] To better implement the present invention, further, in step S12, the post-processing optimization includes morphological operations, edge smoothing, and connectivity enhancement processing.
[0028] To better realize the present invention, further, in step S13, the topological features include grain proximity and orientation difference distribution; the physical constraint features include Z-parameters, thermal epoch operator, dynamic recrystallization kinetic equation, critical strain equation, and grain size equation; the thermal epoch operator is [T peak , t beta , , ];
[0029] Wherein: T peak This is the peak temperature;
[0030] t beta This refers to the residence time in the β phase region;
[0031] This represents the average heating rate.
[0032] This represents the average cooling rate.
[0033] To better realize the present invention, step S14 further includes the following steps:
[0034] Step A1: Adjust process parameters P Standardize the high-dimensional microscopic tissue feature vectors;
[0035] Step A2: Reduce the dimension of the high-dimensional microstructure feature vectors to [value missing]. d dimension;
[0036] Step A3: Define kernels for different feature groups of input using composite kernels. kg The overall kernel is constructed in a weighted sum form to train the SVR, while embedding physical constraint features in the kernel.
[0037] Step A4: Optimize SVR hyperparameters using grid search and K-fold cross-validation; SVR hyperparameters include penalty factor C, kernel function parameter γ, and insensitive loss parameter ε;
[0038] Step A5: Use a residual regressor r ([ P , f ( P Predicting the output of the SVR model f ( P The residual Δ between the actual and target values is then used to calculate the corrected predicted value. And serve as a constraint condition for the rule;
[0039] .
[0040] To better implement the present invention, furthermore, in step S14, before inputting the SVR model, input anomaly detection is also included:
[0041] (1) First, use One-class SVM to learn the normal boundaries of process parameters and high-dimensional microstructure feature vectors, and identify preliminary abnormal data points;
[0042] (2) Then, an autoencoder is used to encode and decode the data, and the ability to detect nonlinear relationship data is enhanced by reconstructing the anomalies of the error analysis data;
[0043] (3) Model the intergranular relationship in the data based on graph neural network and detect abnormal nodes in the graph structure;
[0044] (4) Finally, through multi-model fusion, the final anomaly determination is made by weighted voting or confidence assessment.
[0045] To better achieve the present invention, further, in step S2, the... The calculation formula is:
[0046] ;
[0047] Wherein: F img This refers to a function or network module that extracts features from an image.
[0048] G(z,P) represents the statistical features extracted from the generated predicted image;
[0049] Predictor (P) is the statistical feature predicted by the process-organization mapping model in step S1 based on the process parameter P;
[0050] This is the mathematical expectation of the joint distribution of noise z and process parameter P;
[0051] The L phys The calculation formula is:
[0052] ;
[0053] in: PhysModel i ( P The physical characteristics are directly predicted by the process-structure mapping model based on the process parameter P.
[0054] PhysFeature i ( G (z, P () represents the physical features extracted from the generated predicted image;
[0055] α i is the weighting coefficient for the i-th physical constraint loss.
[0056] To better implement this invention, further, in step S2, after the generator of the conditional generative adversarial network outputs the predicted image, pixel-level or feature-level iterative correction is performed on the predicted image based on a differentiable physical approximation model or a difference optimizer to minimize L. phys And to achieve visual consistency, outputting predicted images with stronger physical consistency.
[0057] To better realize the present invention, in step S3, the structural similarity index, mean absolute error and root mean square error are used to quantitatively compare the predicted image and the real image.
[0058] A titanium alloy microstructure prediction system based on conditional generative adversarial networks, based on the aforementioned titanium alloy microstructure prediction method based on conditional generative adversarial networks, includes:
[0059] The data acquisition and preprocessing module is used to acquire and preprocess multi-source microscopic tissue images;
[0060] The image segmentation module is used to segment microscopic tissue images based on the SAM model and post-processing and output a segmentation mask image.
[0061] The feature extraction module is used for quantitative statistics based on segmentation mask images and fusion to form a high-dimensional microscopic tissue feature vector;
[0062] The pattern prediction module is used to construct a process-organization mapping model based on the SVM algorithm and use the model's output as a pattern constraint.
[0063] The image prediction module is used to generate predicted images based on a conditional generative adversarial network.
[0064] The verification output module is used to verify and output the predicted image.
[0065] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks.
[0066] The beneficial effects of this invention are as follows:
[0067] This invention utilizes a SAM model for automatic image segmentation, reducing reliance on manual intervention and improving the efficiency and objectivity of microscopic tissue segmentation. It integrates statistical features, topological features, and physical quantities, employing interpretable models such as Support Vector Machines to achieve regularized learning of process-tissue relationships, significantly enhancing accuracy and robustness under small sample conditions. Furthermore, by embedding regularity constraints and physical consistency constraints into a conditional generative adversarial network, the predicted microscopic tissue images not only match the actual results in statistical features but also conform to the physical laws of thermal processing. This invention achieves end-to-end prediction from process parameters to microscopic tissue images, overcoming the limitations of traditional methods that can only perform symbolic or parameterized predictions, significantly enhancing the method's intuitiveness, interpretability, and engineering application value. This invention solves the problems of existing technologies, such as reliance on manual intervention for microscopic tissue segmentation, insufficient accuracy in regularity modeling, lack of intuitiveness in prediction results, and poor adaptability across different working conditions. Attached Figure Description
[0068] Figure 1 This is a flowchart of the titanium alloy microstructure prediction method based on conditional generative adversarial networks according to the present invention.
[0069] Figure 2 This is a schematic diagram of the principle of the present invention;
[0070] Figure 3 This is a stress-strain curve of the alloy sample after the hot compression experiment in Example 2;
[0071] Figure 4 This is a schematic diagram illustrating the principle of constructing a multimodal microstructure database in Example 2;
[0072] Figure 5 This is a schematic diagram comparing the real image and the predicted image in Example 2. Detailed Implementation
[0073] Example 1:
[0074] A method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks, such as Figure 1 and Figure 2 As shown, it includes the following steps:
[0075] Step 1: Data Acquisition and Preprocessing;
[0076] (1) Experimentally process the titanium alloy under different process conditions (such as deformation temperature, strain rate, alloy composition, etc.) to obtain multi-source microstructure images of the titanium alloy - optical microscope image (OM image), scanning electron microscope (SEM) image and electron backscatter diffraction (EBSD) orientation imaging map (IPF map).
[0077] (2) Preprocessing of multi-source microscopic tissue images—noise removal, histogram equalization, normalization and spatial registration—to ensure the consistency and stability of image data.
[0078] (3) Based on the preprocessed multi-source microstructure images and corresponding process parameters (such as deformation temperature, strain rate, etc.), a multimodal microstructure database is constructed to provide data support for subsequent analysis.
[0079] Step 2: Automatic segmentation of microscopic tissues based on the SAM model;
[0080] The preprocessed microstructure image from step 1 is input into the SAM (Segment Anything Model). Based on a prompting mechanism, the α-phase, β-phase, and grain boundary regions are segmented, generating preliminary segmentation results. To improve segmentation accuracy, this invention also introduces post-processing optimization at the SAM output, performing morphological operations (such as erosion, dilation, and closure operations), edge smoothing, and connectivity enhancement. Finally, a microstructure mask is output and fused with the original image to form a labeled segmentation result. In this process, process parameters (such as deformation temperature and strain rate) serve as additional input information, working together with the microstructure image to optimize the segmentation results.
[0081] Step 3: Perform quantitative statistics and topological feature extraction on the microstructure;
[0082] (1) Spatial registration and multi-scale resampling of the segmentation mask output in step 2 with the corresponding multi-source microstructure images (OM, SEM, EBSD, etc.); extract statistical features, including grain features, global features and graph structure features, such as grain size, shape, phase ratio, grain boundary characteristics, orientation distribution and other statistical features.
[0083] Spatial registration: The segmentation mask output from step 2 is registered with high precision with EBSD orientation imaging maps (IPF maps, phase maps) and SEM composition contrast maps from the same field of view. This invention employs a registration algorithm based on feature points (such as SIFT and ORB), which calculates affine or perspective transformation matrices to unify multi-source microstructure images into the same coordinate system, ensuring a one-to-one correspondence between the morphology, composition, and crystallographic data of each grain region.
[0084] Multi-scale resampling: To capture tissue information at different scales, analysis is performed at different magnifications or resolutions based on image pyramids or using sliding window techniques. For example, at low magnification, the overall uniformity of phase distribution is statistically analyzed, while at high magnification, the detailed morphology and orientation gradient of individual grains are analyzed.
[0085] Process parameter characteristics P: Raw parameters directly obtained from processing equipment or process specifications. Includes strain (Strain, ε): the total strain (dimensionless) occurring in the material, strain rate (ε... ): Rate of material deformation (unit: s) -1 Deformation temperature (T): the absolute temperature at which the hot working process takes place (unit: K); Alloy composition: the weight percentage (wt.%) of each element in the material, such as [Al, V, O, Fe]. Process parameter characteristics P include statistical characteristics and physical constraint characteristics.
[0086] Grain Features: Calculated for each individual connected grain region. Morphological and dimensional features: area, perimeter, equivalent circle diameter, aspect ratio, roundness, compactness; Crystallographic features (after symmetry correction): Based on registered EBSD data, the average orientation (converted to the standard fundamental zone), grain orientation distribution (GOS), and nucleus average misorientation (KAM) of each grain are calculated.
[0087] Global Features: These features are statistically classified across all grain characteristics within an image to describe the macroscopic structure. Examples include: average equivalent diameter of all grains, standard deviation of grain size, α / β phase area fraction, high-angle grain boundary (HAGB, >15°) proportion, orientation distribution function (ODF) texture intensity index calculated based on all grain orientation data, and Region Adjacency Graph (RAG) construction: Each grain is considered a node. If two grains share a grain boundary, an edge is established between the corresponding nodes. The weight of the edge can be defined as the length of the shared grain boundary or the average orientation difference between the two grains.
[0088] Graph structure metrics: Degree Distribution: The distribution of the degree (number of connected edges) of each node in the graph, reflecting the distribution of the number of neighbors of a grain. Average Clustering Coefficient: Measures the degree of clustering of nodes in the graph, i.e., the tendency for neighboring grains to connect to each other and form triangular structures, reflecting the compactness of local regions. Edge Weight Distribution: The statistical distribution of all edge weights, reflecting statistical information about interface characteristics (such as grain boundary length and orientation difference).
[0089] (2) Finally, grain features, global features, graph structure indices, topological features, and physical constraint features are integrated and spliced together to form a comprehensive high-dimensional microstructure feature vector. This vector not only combines microscopic grain morphology and orientation information with macroscopic organizational state, but also embeds relevant features of physical processes.
[0090] (3) Next, the high-dimensional microscopic tissue feature vector V is reduced in dimensionality using PCA or an interpretable dimensionality reduction method (such as Sparse PCA / LASSO) to obtain a low-dimensional feature representation. The high-dimensional / low-dimensional microstructure feature vector will be used as input for the pattern learning module in step 4, further realizing the effective modeling and prediction of the relationship between process and microstructure.
[0091] Step 4: Learn patterns based on the SVM model to capture nonlinear relationships;
[0092] The process parameter features obtained in steps 1-3 are compared with the high-dimensional microstructure feature vector V output in step 3 (the low-dimensional feature representation obtained by reversible dimensionality reduction using PCA / Autoencoder). This is used to train a process-organization mapping model. The mapping model preferably employs Support Vector Regression (SVR) to construct a multi-output regressor. f : P → V Its training process includes:
[0093] (1) To P and Standardize the process;
[0094] (2) If If the dimension is high, first use PCA, Sparse PCA, or an autoencoder to reduce the dimension to d dimensions;
[0095] (3) Multiple Kernel Learning (MKL) is used to define kernels for different feature groups of input. k gand in weighted sum form k=∑ g w g k g Construct a global kernel to train SVR, while embedding physical constraint features into the kernel.
[0096] In feature computation, quantities related to the physical process are explicitly considered to construct a set of physical constraint features:
[0097] 1) The Zener-Hollomon parameters (Z parameters) are:
[0098] ;
[0099] in: Strain rate (s) -1 (This can be obtained directly from the process parameters.)
[0100] T: Deformation temperature (K), obtained directly from the process parameters;
[0101] R: Ideal gas constant (8.314 J / mol·K);
[0102] Q: Deformation activation energy (J / mol) of titanium alloys. This is a material constant, which can be obtained from literature values or from a series of hot compression experimental data (e.g., at different temperatures and temperatures). The rheological stress curve under the given conditions is obtained by fitting.
[0103] 2) The Thermal History Operator quantifies the impact of non-isothermal thermal cycling processes (such as heating, holding, and cooling) on microstructure as a set of feature vectors. The implementation method is as follows:
[0104] Extract key features from the temperature T-time t curve: peak temperature (T) peak ), residence time in the β phase region (t) beta ), average heating rate ( ), average cooling rate ( ). This set of scalars [T peak , t beta , , ] is used as the feature vector of the thermal calendar.
[0105] 3) Describing the recrystallization volume fraction based on the dynamic recrystallization kinetic equation X DRX The relationship between the variable ε and the change in the dependent variable. The specific formula is:
[0106] ;
[0107] Where: k d The kinetic rate constant;
[0108] n d For dynamic index;
[0109] ε is the dependent variable;
[0110] ε c The critical strain;
[0111] ε p This represents the peak strain.
[0112] 4) Describing dynamic recrystallization grain size based on grain size equation d DRX With Zener-Hollomon parameters Z The relationship between them is as follows:
[0113] d DRX =AZ m ;
[0114] in A For material constants, m This represents the grain size index.
[0115] 5) The critical strain ε required for recrystallization to begin is described based on the critical strain equation. c With peak strain ε p The relationship is as follows:
[0116] ε c = αε p ;
[0117] Where α is a constant.
[0118] (4) Optimize SVR hyperparameters through grid search and K-fold cross-validation; SVR hyperparameters include penalty factor C, kernel function parameter γ, and insensitive loss parameter ε.
[0119] The penalty factor C controls the model's complexity and balances training error with model complexity. It determines how many training samples are allowed to have error on the decision boundary. A larger C causes the model to fit the training data more tightly, potentially leading to overfitting; while a smaller C makes the model more tolerant of error, potentially leading to underfitting. In Support Vector Machines (SVMs), C controls the degree of error penalty; a high C value reduces training error, while a low C value tolerates more error to simplify the model.
[0120] The kernel parameter γ controls the nonlinear mapping capability of the support vector machine. It determines the range of influence between data points, affecting their distribution in the feature space. A large γ value limits the range of influence of training data points, leading to overfitting; while a small γ value allows for a wider fit, potentially resulting in underfitting. ε is the parameter of the insensitive loss function in support vector regression (SVR), defining the maximum allowable error range in the regression model, i.e., the error between the predicted and actual values of the training samples if it is less than a certain value. At this time, it will not penalize the model. Increase A higher value increases the regression model's tolerance for error and reduces model complexity; while a lower value... Setting a value will make the model more rigorously approximate each data point, which may increase the complexity of the model.
[0121] (5) To reduce system bias, a residual regressor is further employed. r ([ P , f ( P )]) Correction f ( P The deviation Δ is used to obtain the corrected value. .
[0122] Residual Regressor r ([ P , f ( P )]) is a newly introduced regression model used to predict the output of the SVR model. f ( P The residual Δ between the actual target value and the target value (i.e., the error).
[0123] Where: P is the process parameter.
[0124] f(P) is the prediction result of the SVR model.
[0125] By training a residual regressor, the bias of the SVR model is corrected, resulting in more accurate predictions. The residual Δ calculated by the residual regressor is added to the original prediction f(P) to obtain the corrected prediction value. Corrected predicted values The result is obtained by adding the SVR model prediction f(P) to the residual r([P, f(P)]) output by the residual regressor. The corrected prediction combines the prediction of the SVR model itself with the error corrected by the residual regressor, providing a more accurate microscopic tissue prediction result.
[0126] The output of the process-tissue mapping model or its inverse transformation V corrIt is used as a regular constraint condition for the conditional generative adversarial network in step 5 (i.e., L). stat The target value is used for quantitative consistency testing and confidence assessment of the generated results. This method also includes input anomaly detection (one-class SVM) to improve the model's robustness in small sample sizes and cross-condition predictions.
[0127] Preferably, before inputting the SVR model, the method further includes input anomaly detection (one-class SVM) to improve the model's robustness in small sample sizes and cross-condition predictions. While one-class SVM is effective on some simple problems, it may be less robust than other methods when dealing with complex nonlinear patterns. To address the limitations of one-class SVM, this invention proposes an improved multi-level anomaly detection method that combines one-class SVM, an autoencoder, and a graph neural network (GNN). This invention not only utilizes one-class SVM for boundary learning but also further enhances the accuracy and robustness of anomaly detection through nonlinear models (such as autoencoders) and graph structure learning.
[0128] Specifically, firstly, one-class SVM is used to learn the normal boundaries of process parameters and microstructure characteristics, and to identify preliminary abnormal data points;
[0129] Then, an autoencoder is used to encode and decode the data, and the anomalies of the data are further analyzed by reconstructing the error, thereby enhancing the ability to detect nonlinear relationship data.
[0130] Next, the relationships between grains in the data are modeled based on graph neural networks to detect abnormal nodes in the graph structure;
[0131] Finally, by fusing multiple models and using weighted voting or confidence assessment methods, the final anomaly determination is made to ensure that the anomaly detection results are more accurate and robust.
[0132] This method demonstrates high accuracy across various operating conditions and complex data distributions, effectively improving the precision of anomaly detection and the model's adaptability. A one-class SVM model is trained using all the training process parameter features and microstructure features from step S4. This model learns to define a closed decision boundary within a "normal" process space. If the model determines that P_new is within the decision boundary, it is considered a "normal" input and fed into the SVR model set for prediction; if the model determines that P_new is outside the decision boundary, it is marked as an "abnormal input," and the system directly returns the warning: "Warning: Input process parameters exceed the model validation range; prediction results have extremely low reliability," and may refuse to provide prediction results.
[0133] Step 5: Based on physical constraints, use conditional generative adversarial networks to predict microscopic tissues;
[0134] The random noise vector z and the regularity constraint v (organ statistical features output by SVM or other regressors) from step 4 are used as conditional inputs to the generator G to generate a predicted image G(z,v); the conditional generative adversarial network is a physics-aware conditional generative adversarial network (cGAN), which uses a weighted combination loss function during training:
[0135] ;
[0136] Where: L adv To combat loss (WGAN-GP or hinge loss can be used);
[0137] L stat This is a statistical feature loss, used to ensure that the generated predicted image is consistent with the regular prediction in terms of statistical features;
[0138] L phys Loss due to physical constraints;
[0139] L rec To perceive the loss, in order to preserve image details;
[0140] λs, λp, and λr are the weights for calculating the loss function, and they can be determined through cross-validation.
[0141] ;
[0142] Wherein: F img This refers to a function or network module that extracts features from an image.
[0143] G(z,P) represents the statistical features extracted from the generated predicted image, and the features considered are the same as in step 3.
[0144] Predictor(P) is the statistical feature directly predicted by the SVM model in step 4 based on the process parameter P.
[0145] : Take the mathematical expectation of the joint distribution of noise z and process parameter P (i.e. the average value when calculating in batches).
[0146] ;
[0147] in: α i is the weighting coefficient for the i-th physical constraint loss;
[0148] PhysModel i ( P The physical quantities (phase fraction, average grain size, recrystallization volume fraction, etc.) calculated based on process parameter P in step 4 are:
[0149] PhysFeature i ( G (z, P )) represents the corresponding physical quantities (actual phase fraction, average grain size, recrystallization volume fraction, etc.) extracted from the generated prediction image.
[0150] Preferably, it also includes a physical correction module: after the generator outputs the image Gout, it performs pixel-level or feature-level iterative correction on Gout based on a differentiable physical approximation model or a difference optimizer to minimize L. phys Combined with a visual consistency term (i.e., modifying the output in a variational optimization manner), this results in a predicted image with stronger physical consistency.
[0151] Step 6: Result verification and output;
[0152] The structural similarity index (SSIM), mean absolute error (MAE), and root mean square error (RMSE) are used to quantitatively compare the predicted image with the real image; the consistency of the predicted image with statistical characteristics such as grain size distribution and α / β phase ratio is verified; if the verification is successful, the predicted image is output; if it fails, the process is backtracked to the SVM learning stage for parameter optimization.
[0153] Example 2:
[0154] A method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks is applied to a specific scenario of optimizing the thermomechanical processing of titanium alloys. The scenario involves predicting the microstructure of a certain type of Ti-6Al-4V alloy after specific hot compression deformation to evaluate the rationality of its processing parameters. The object of application is Ti-6Al-4V alloy bars. The specific steps include:
[0155] Step 1: Data acquisition and establishment of a multimodal microscopic tissue database;
[0156] (1) Experimental design: Multiple sets of hot compression experiments were conducted on Ti-6Al-4V alloy samples on a thermal simulation testing machine (such as Gleeble 3800). Process parameter range: Deformation temperature T: 700°C, 800°C, 860°C; Strain rate 0.01 s - ¹, 0.1s - ¹, 1.0 s - ¹.
[0157] (2) Data collection;
[0158] like Figure 3 As shown, (a) is the stress-strain curve of the alloy sample after 30% compression at a deformation temperature of 700~1000℃ and a strain rate of 0.1; (b) is the stress-strain curve of the alloy sample after 60% compression at a deformation temperature of 700~1000℃ and a strain rate of 0.1; and (c) is the stress-strain curve of the alloy sample after 80% compression at a deformation temperature of 700~1000℃ and a strain rate of 0.1. Wherein: 700-0.1-30% is the stress-strain curve of the alloy sample after 30% compression at a deformation temperature of 700℃ and a strain rate of 0.1; the definitions of the other curves are similar.
[0159] The stress-strain curves from multiple sets of hot compression experiments were analyzed to extract valuable information. Metallographic preparation was performed on the samples after each experiment, and microstructure images and IPF orientation maps (IPF maps) of the same field of view were obtained using scanning electron microscopy (SEM) and electron backscatter diffraction (EBSD). Experimental data volume: A total of 50 sets of valid data were collected, covering microstructure images under different processing conditions.
[0160] (3) Data preprocessing; noise removal: Gaussian filtering is used to smooth the image. Histogram equalization: the contrast of the SEM image is enhanced, making the contrast between the α phase (bright color) and β phase (dark color) more obvious. Spatial registration: the SEM image is accurately registered with the IPF map of EBSD based on feature points to ensure that the subsequent analysis is of the same micro-region. Normalization: the image pixel values are normalized to the [0, 1] interval.
[0161] (4) Construct a database; combine the preprocessed images with the corresponding process parameters (such as deformation temperature T, strain rate) The results, including manually labeled "metallographic standard" segmentation, are stored together to construct a multimodal microstructure database. Specifically, such as... Figure 4 As shown, EBSD inverse pole figures, SEM images, phase diagrams, and binarized images are batch-processed to construct a multimodal microstructure database.
[0162] Step 2: Automatic segmentation of microscopic tissues based on the SAM model;
[0163] (1) Model loading: Load the pre-trained Segment Anything Model (SAM) weights.
[0164] (2) Automatic segmentation: For the input SEM image (e.g., T=950℃, =0.1 s -1 The image is segmented by clicking on a few cue points (such as clicking on a few α-grain interiors and β-phase regions). The SAM model quickly generates preliminary segmentation masks for the α-phase, β-phase, and grain boundary regions based on these sparse cue points.
[0165] (3) Post-processing optimization: Morphological closing operation (corrosion after expansion) is performed on the preliminary segmentation results to fill small pores and connect fractured grain boundaries. Gaussian filtering is used to smooth the segmentation edges and eliminate jagged burrs. The final output is a high-precision, smooth binary image of microstructure segmentation.
[0166] Step 3: Statistical analysis and extraction of microscopic tissue features;
[0167] (1) Feature extraction: Based on the mask image segmented by SAM, quantitative statistics are performed to extract the statistical features of the microstructure. For example: α phase ratio (Volume Fraction): 62.5%; average grain size: 14.8 μm; standard deviation of grain size: 2.1 μm; average aspect ratio: 1.9; average KAM value (characterizing local strain): 1.25.
[0168] (2) Eigenvector representation: The grain features, global features, graph structure indicators, topological features and physical constraint features are integrated and spliced to form a comprehensive high-dimensional microstructure feature vector F.
[0169] Step 4: Pattern learning based on SVM;
[0170] (1) Constructing a training set: Using 45 sets of data from the database, the process parameters (T=750℃) were set. =0.1 s -1 The corresponding high-dimensional microscopic tissue feature vector F is used as the input-output pair to train the support vector machine (SVM) model.
[0171] (2) Training process: PCA dimensionality reduction: The original 5-dimensional features are reduced to 3-dimensional, retaining more than 95% of the variance and eliminating redundancy. Grid search and cross-validation: Grid search and 5-fold cross-validation are used to optimize the SVM hyperparameters (such as C and γ of the RBF kernel function).
[0172] (3) Pattern model: After training, a reliable “process-organism” mapping model is obtained.
[0173] Step 5: Predict microscopic tissue structure based on conditional generative adversarial networks;
[0174] (1) Generator input: The generator input includes a random noise vector z and the regularity constraint v predicted by the SVM model in the previous step.
[0175] (2) The generated predicted image: The generator (based on the U-Net structure) generates a 256x256 pixel microscopic tissue image G(z,v) by gradually upsampling the noise vector and conditional information through the noise vector and conditional information.
[0176] (3) Adversarial training: The discriminator simultaneously receives the real image or the generated predicted image and its corresponding conditional information, and judges whether the "image-condition" pair is real. Through adversarial training, the generator learns to generate a predicted image that is consistent with the real image in both statistical and physical features.
[0177] Step 6: Result verification and output;
[0178] Five sets of unseen test data were retrieved from the database, and the process parameters of the test sets were input into the model to generate predicted images. For example... Figure 5 As shown, SSIM (structural similarity index, reaching 0.89), MAE (mean absolute error), and RMSE (root mean square error) were calculated between the predicted image and the ground image. The predicted image was segmented and its features were extracted to obtain its statistical feature Fpredicted, which was then compared with the Fpredicted directly predicted by the SVM model and the Ftrue of the ground image. Validation results show that the error is within an acceptable range (<5%).
[0179] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks, characterized in that, Includes the following steps: Step S1: Construct a process-organization mapping model and use the model's output as a constraint condition; Step S11: Obtain multi-source microstructure images of the titanium alloy under different process conditions and perform preprocessing; Step S12: Input the preprocessed microstructure image into the SAM model, segment the α phase, β phase and grain boundary regions, and output the segmentation mask image after post-processing optimization; Step S13: Spatial registration and multi-scale resampling are performed between the segmentation mask image and the corresponding multi-source microstructure image to extract the statistical features of the microstructure. These features are then combined with topological structure features and physical constraint features to form a high-dimensional microstructure feature vector. The statistical features include grain features, global features, and graph structure features. Step S14: Using process parameters as input and the high-dimensional microstructure feature vector from step S13 as output, a process-structure mapping model is obtained by training based on the SVM model. Step S2: Input the random noise vector and the regularity constraint conditions into a conditional generative adversarial network to generate a predicted image; the loss function of the conditional generative adversarial network... L total for: ; in: L adv To combat the losses; L stat To predict the loss of statistical features in images with regularity constraints; L phys To predict the loss of physical constraints in image and regularity constraints; L rec To perceive loss; λ s , λ p , λ r These are the weights used to calculate the loss function; Step S3: Quantitatively compare the predicted image with the real image and verify the consistency of statistical features. If the verification is successful, output the prediction result; otherwise, proceed to step S1.
2. The method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks according to claim 1, characterized in that, In step S11, the multi-source microscopic tissue images include optical microscope images, scanning electron microscope images, and electron backscatter diffraction orientation imaging maps; the preprocessing includes noise removal, histogram equalization, normalization, and spatial registration.
3. The method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks according to claim 1, characterized in that, In step S12, the post-processing optimization includes morphological operations, edge smoothing, and connectivity enhancement processing.
4. The method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks according to claim 1, characterized in that, In step S13, the topological features include grain proximity and orientation difference distribution; the physical constraint features include Z-parameters, thermal epoch operator, dynamic recrystallization kinetic equation, critical strain equation, and grain size equation; the thermal epoch operator is [T peak , t beta , , ]; Wherein: T peak This is the peak temperature; t beta This refers to the residence time in the β phase region; This represents the average heating rate. This represents the average cooling rate.
5. A method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks according to any one of claims 1-4, characterized in that, Step S14 includes the following steps: Step A1: Adjust process parameters P Standardize the high-dimensional microscopic tissue feature vectors; Step A2: Reduce the dimension of the high-dimensional microstructure feature vectors to [value missing]. d dimension; Step A3: Define kernels for different feature groups of input using composite kernels. k g The overall kernel is constructed in a weighted sum form to train the SVR, while embedding physical constraint features in the kernel. Step A4: Optimize SVR hyperparameters using grid search and K-fold cross-validation; SVR hyperparameters include penalty factor C, kernel function parameter γ, and insensitive loss parameter ε; Step A5: Use a residual regressor r ([ P , f ( P Predicting the output of the SVR model f ( P The residual Δ between the actual and target values is then used to calculate the corrected predicted value. And serve as a constraint condition for the rule; 。 6. The method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks according to claim 1, characterized in that, In step S14, before inputting the SVR model, input anomaly detection is also included: (1) First, use One-class SVM to learn the normal boundaries of process parameters and high-dimensional microstructure feature vectors, and identify preliminary abnormal data points; (2) Then, an autoencoder is used to encode and decode the data, and the ability to detect nonlinear relationship data is enhanced by reconstructing the anomalies of the error analysis data; (3) Model the intergranular relationship in the data based on graph neural network and detect abnormal nodes in the graph structure; (4) Finally, through multi-model fusion, the final anomaly determination is made by weighted voting or confidence assessment.
7. The method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks according to claim 1, characterized in that, In step S2, the L stat The calculation formula is: ; Wherein: F img (·) is a function for extracting features from an image; F img (G(z,v)) represents the statistical features extracted from the generated predicted image; Predictor (P) is the statistical feature predicted by the process-organization mapping model in step S1 based on the process parameter P; This is the mathematical expectation of the joint distribution of noise z and process parameter P; The L phys The calculation formula is: ; in: PhysModel i ( P The physical characteristics predicted by the process-structure mapping model based on the process parameter P are: PhysFeature i ( G (z, P () represents the physical features extracted from the generated predicted image; α i is the weighting coefficient for the i-th physical constraint loss.
8. The method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks according to claim 1, characterized in that, In step S3, the structural similarity index, mean absolute error, and root mean square error are used to quantitatively compare the predicted image and the real image.
9. A titanium alloy microstructure prediction system based on conditional generative adversarial networks, comprising a titanium alloy microstructure prediction method based on conditional generative adversarial networks as described in any one of claims 1-8, characterized in that, include: The data acquisition and preprocessing module is used to acquire and preprocess multi-source microscopic tissue images; The image segmentation module is used to segment microscopic tissue images based on the SAM model and post-processing and output a segmentation mask image. The feature extraction module is used for quantitative statistics based on segmentation mask images and fusion to form a high-dimensional microscopic tissue feature vector; The pattern prediction module is used to construct a process-organization mapping model based on the SVM algorithm and use the model's output as a pattern constraint. The image prediction module is used to generate predicted images based on a conditional generative adversarial network. The verification output module is used to verify and output the predicted image.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method for predicting the microstructure of titanium alloys based on conditional generative adversarial networks as described in any one of claims 1-8.
Citation Information
Patent Citations
Rapid and accurate prediction method for titanium alloy forging deformation microstructure and mechanical property
CN117594161A
Analysis method and system for dynamic recrystallization structure morphology of titanium alloy based on machine learning and medium
CN120544757A