Titanium alloy microstructure prediction method and system based on conditional generative adversarial network and storage medium
By using a conditional generative adversarial network-based approach, combining the SAM model and support vector machine, and embedding physical constraint features, the problems of image segmentation relying on manual intervention, insufficient prediction accuracy, and poor adaptability across working conditions in the prediction of titanium alloy microstructure are solved, thus achieving efficient and accurate microstructure prediction.
Patent Information
- Application Number
- CN202511903291.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2045-12-17
AI Technical Summary
Existing technologies for predicting the microstructure of titanium alloys suffer from several problems, including low efficiency due to reliance on manual image segmentation, large subjective bias, insufficient prediction accuracy under small sample conditions, poor interpretability of most models due to lack of physical mechanisms, and poor adaptability across different working conditions.
A conditional generative adversarial network (GAN)-based approach is adopted, which combines the SAM model for automatic microscopic tissue segmentation. The process-tissue mapping relationship is learned through support vector machine, and physical constraint features are embedded. The GAN is used to generate predicted images, and the accuracy and robustness of the prediction are improved by multi-model fusion.
It achieves efficient and automatic segmentation of microstructures, improves prediction accuracy and robustness under small sample conditions, enhances the intuitiveness of prediction results and engineering application value, and breaks through the limitations of traditional methods.
Smart Images

Figure CN121330675A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of titanium alloy microstructure analysis, and particularly relates to a titanium alloy microstructure prediction method and system based on a conditional generative adversarial network and a storage medium. BACKGROUND
[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 process of the microstructure is usually significantly affected by process conditions such as deformation temperature, strain rate and cooling rate. Therefore, how to accurately obtain and predict the microstructure characteristics of titanium alloys is a core problem in material design and process optimization. Existing microstructure prediction mainly includes the following methods: 1. Traditional experiment and experience combined method: grain evolution and recrystallization behavior are inferred by combining thermal processing experiments with empirical formulas (such as the classic Zener-Hollomon relationship and JMAK kinetics model). This method has limited applicability for complex process conditions, and the prediction accuracy depends on a large amount of experimental data, which is costly.
[0003] 2. Numerical simulation method: including crystal plasticity finite element (CPFEM) method, phase field method and VPSC model analysis method. These methods can explain the organization evolution process from the perspective of micro-mechanism, but the model is complex and the calculation is large, which is difficult to meet the demand of high-throughput prediction.
[0004] 3. Prediction method based on machine learning: In recent years, machine learning has been applied to microstructure segmentation, organization parameter prediction and other tasks. For example, convolutional neural networks (CNN) have been used for phase segmentation of organization images, and support vector machines (SVM), random forests (RF) and other models have been used for mapping between process parameters and organization parameters. However, this method still has the following defects: (1) Image segmentation relies on manual annotation, which is inefficient and subjective; (2) Under small sample conditions, existing statistical learning models are difficult to capture complex nonlinear process-structure relationships, and the prediction accuracy is insufficient; (3) Most machine learning models are "black box" algorithms, which lack the combination of physical mechanisms, resulting in poor interpretability; (4) Microstructure prediction results are mostly limited to parameterization or symbolization, lacking intuitive image-level prediction, which limits its engineering application value. SUMMARY
[0005] The purpose of the present application is to provide a titanium alloy microstructure prediction method and system based on a conditional generative adversarial network and a storage medium, which solves the above problems.
[0006] The present application is mainly realized by the following technical solutions: A titanium alloy microstructure prediction method based on a conditional generative adversarial network, comprising the following steps: Step S1: Construct a process-structure mapping model, and take the output of the model as a regular constraint condition; Step S11: Obtain multiple-source microstructure images of the titanium alloy to be tested under different process conditions, and perform preprocessing; Step S12: input the preprocessed microstructure images into the SAM model, and segment the alpha phase, beta phase and grain boundary region, and output the segmentation mask image after optimization processing; Step S13: Space registration and multi-scale resampling are performed on the segmentation mask image and the corresponding multiple-source microstructure image, statistical features of the microstructure are extracted, topological structure features are combined, and physical constraint features are introduced, and high-dimensional microstructure feature vectors are formed by fusion; the statistical features include grain features, global features and graph structure features; Step S14: Take the process parameters as input, and the high-dimensional microstructure feature vector in step S13 as output, and train a process-structure mapping model based on the SVM model; Step S2: input the random noise vector and the regular constraint condition into the conditional generative adversarial network to generate a predicted image; the loss function of the conditional generative adversarial network is Wherein: is the adversarial loss; is the loss of the predicted image and the statistical features in the regular constraint condition; L phys is the loss of the predicted image and the physical constraint in the regular constraint condition; L rec is the perception loss; λ s , λ p , λ r are the calculation weights of the loss function respectively; Step S3: Quantitatively compare the predicted image with the real image, and verify the consistency of the statistical features, if the verification is passed, output the prediction result, otherwise, enter step S1.
[0007] For better implementation of the present application, further, in the step S11, the multi-source microstructure images include optical microscope images, scanning electron microscope images and electron backscatter diffraction orientation imaging images; the preprocessing includes noise removal, histogram equalization, normalization and spatial registration.
[0008] For better implementation of the present application, further, in the step S12, the post-processing optimization includes morphological operation, edge smoothing and connectivity enhancement processing.
[0009] For better implementation of the present application, further, in the step S13, the topological structure features include grain neighborhood relationship and orientation difference distribution; the physical constraint features include Z parameter, thermal history operator, dynamic recrystallization kinetics equation, critical strain equation and grain size equation; the thermal history operator is [T peak , t beta , , ]; wherein: T peak is peak temperature; t beta is residence time in beta phase region; is average heating rate; is average cooling rate.
[0010] For better implementation of the present application, further, the step S14 includes the following steps: Step A1: normalizing the process parameters P and high-dimensional microstructure feature vectors; Step A2: reducing dimensionality of the high-dimensional microstructure feature vectors to d dimensions; Step A3: defining kernel k g for input of different feature groups respectively by using composite kernel, and constructing overall kernel in weighted sum form to train SVR, while embedding physical constraint features in the kernel; Step A4: optimizing SVR hyperparameters by grid search and K-fold cross validation; the SVR hyperparameters include penalty factor C, kernel function parameter γ, and insensitive loss parameter ε; Step A5: predicting residual Δ between output r ( P , f ( P )) of the SVR model and actual target value by using residual regressor f ( P ); then, calculating corrected predicted value and as a regular constraint condition; .
[0011] To better realize the present application, further, in the step S14, before inputting the SVR model, it further includes inputting the anomaly detection: (1) First, learn the normal boundary of the process parameters and high-dimensional microstructure feature vectors by using One-class SVM, and identify the preliminary abnormal data points; (2) Then, encode and decode the data by using the automatic encoder, analyze the abnormality of the data through the reconstruction error, and enhance the detection ability of the non-linear relationship data; (3) Model the intergranular relationship in the data based on the graph neural network, and detect the abnormal nodes in the graph structure; (4) Finally, through multi-model fusion, the weighted voting or confidence evaluation method is used for the final abnormality judgment.
[0012] To better realize the present application, further, in the step S2, the The calculation formula is: ; Wherein: F img is a function or network module for extracting features from images; G(z, P) is a statistical feature extracted from the generated predicted image; Predictor (P) is the statistical feature predicted by the process-microstructure mapping model according to the process parameters P in step S1; is the mathematical expectation of the joint distribution of noise z and process parameters P; The calculation formula of the L phys is: ; Wherein: PhysModel i ( P ) is the physical feature directly predicted by the process-microstructure mapping model according to the process parameters P; PhysFeature i ( G (z, P ) is the physical feature extracted from the generated predicted image; α i is the weight coefficient of the i-th physical constraint loss.
[0013] In order to better realize the present application, further, in the step S2, after the generator of the conditional generative adversarial network outputs the predicted image, the predicted image is iteratively corrected at a pixel level or a feature level based on a differentiable physical approximation model or a differential optimizer to minimize L phys And realize visual consistency, output a predicted image with stronger physical consistency.
[0014] In order to better realize the present application, further, in the step S3, the predicted image and the real image are quantitatively compared by using a structural similarity index, a mean absolute error and a root mean square error.
[0015] A titanium alloy microstructure prediction system based on a conditional generative adversarial network, based on the above-mentioned titanium alloy microstructure prediction method based on a conditional generative adversarial network, comprising: A data acquisition and preprocessing module for acquiring and preprocessing multi-source microstructure images; An image segmentation module for segmenting the microstructure images based on a SAM model and post-processing and outputting a segmentation mask image; A feature extraction module for quantitative statistics based on the segmentation mask image and fusion to form a high-dimensional microstructure feature vector; A rule prediction module for constructing a process-structure mapping model based on an SVM algorithm and taking the output of the model as a rule constraint; An image prediction module for generating a predicted image based on a conditional generative adversarial network; A verification output module for verifying and outputting the predicted image.
[0016] A computer readable storage medium having a computer program stored thereon, the program being executed by a processor to realize the above-mentioned titanium alloy microstructure prediction method based on a conditional generative adversarial network.
[0017] The beneficial effects of the present application are as follows: The application reduces the artificial dependence and improves the efficiency and objectivity of microstructure segmentation by automatically segmenting the image through the SAM model; the application fuses statistical features, topological structure features and physical quantities, realizes regularized learning of the process-microstructure relationship through an interpretable model such as a support vector machine, and significantly improves the accuracy and robustness under the condition of a small sample; the application embeds regular constraints and physical consistency constraints in the conditional generative adversarial network, so that the predicted microstructure image is not only consistent with the true result in statistical features, but also meets the physical laws of hot working. The application realizes end-to-end prediction from process parameters to microstructure images, breaks through the limitation of traditional methods that can only perform symbolic or parameterized prediction, and significantly enhances the intuitiveness, interpretability and engineering application value of the method. The application solves the problems of manual microstructure segmentation, insufficient regular modeling accuracy, lack of intuitiveness of prediction results and poor cross-condition adaptability in the prior art. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 A flowchart of the titanium alloy microstructure prediction method based on the conditional generative adversarial network of the application; Figure 2 A principle diagram of the application; Figure 3 A stress-strain curve diagram of the alloy sample after hot compression experiment in Example 2; Figure 4 A principle diagram of constructing a multi-modal microstructure database in Example 2; Figure 5 A comparison diagram of real images and predicted images in Example 2. DETAILED DESCRIPTION
[0019] Example 1: A titanium alloy microstructure prediction method based on a conditional generative adversarial network, as shown in Figure 1 and Figure 2 , comprising the following steps: Step 1: data acquisition and preprocessing; (1) under different process conditions (such as deformation temperature, strain rate, alloy composition, etc.), experimentally process the titanium alloy to be measured to obtain multi-source microstructure images of the titanium alloy, i.e. optical microscope images (OM images), scanning electron microscope (SEM) images and electron backscatter diffraction (EBSD) orientation imaging maps (IPF maps).
[0020] (2) pre-process the multi-source microstructure images, i.e. noise removal, histogram equalization, normalization and spatial registration, to ensure the consistency and stability of the image data.
[0021] (3) Based on the pre-processed multi-source microstructure images and corresponding process parameters (such as deformation temperature, strain rate, etc.), a multi-modal microstructure database is constructed to provide data support for subsequent analysis.
[0022] Step 2: Automatic segmentation of microstructure based on SAM model; The pre-processed microstructure images in step 1 are input into the SAM model (Segment Anything Model), and the alpha phase, beta phase and grain boundary regions are segmented based on the prompt mechanism to generate the preliminary segmentation results. To improve the segmentation accuracy, post-processing optimization is introduced at the output end of SAM, including morphological operations (such as erosion, dilation, closing operation), edge smoothing and connectivity enhancement. Finally, the microstructure mask image is output and fused with the original image to form the labeled segmentation results. In this process, the process parameters (such as deformation temperature, strain rate) are used as additional input information to optimize the segmentation results.
[0023] Step 3: Quantitative statistics and topological feature extraction of microstructure; (1) The segmentation mask output in step 2 is spatially registered and multi-scale resampled with the corresponding multi-source microstructure images (OM, SEM, EBSD, etc.); statistical features are extracted, including grain features, global features and graph structure features, such as grain size, shape, phase ratio, grain boundary characteristics, orientation distribution, etc.
[0024] Spatial registration: The segmentation mask (Mask) output in step 2 is high-precision registered with the EBSD orientation imaging map (IPF map, phase map) and SEM component contrast map from the same field of view. This invention uses a feature point (such as SIFT, ORB) based registration algorithm to calculate an affine or perspective transformation matrix, which unifies the multi-source microstructure images in the same coordinate system, ensuring that the morphology, composition and crystallographic data of each grain region are one-to-one corresponding.
[0025] Multi-scale resampling: To capture the organization information at different scales, based on image pyramid or using sliding window technology, analysis is carried out at different magnifications or resolutions. For example, at low magnification, the overall uniformity of phase distribution is statistically analyzed, and at high magnification, the detailed morphology and orientation gradient of a single grain are analyzed.
[0026] Process parameter feature P: original parameters directly obtained from the processing equipment or process procedure. Including strain (Strain, ε): the total strain of the material (dimensionless), strain rate (Strain rate, ): the rate of material deformation (unit: s -1), deformation temperature (T): absolute temperature (in K) at which the hot working process is performed, composition: weight percentage (wt.%) of each element in the material, such as [Al, V, O, Fe]. Process parameter features P include statistical features and physical constraint features.
[0027] Grain Features: computed for each individual connected grain region. Morphology and size features: area, perimeter, equivalent circle diameter, aspect ratio, circularity, solidity; crystallographic features (symmetry corrected): based on registered EBSD data, compute average orientation (transformed to standard fundamental zone), grain orientation spread (GOS), kernel average misorientation (KAM) for each grain.
[0028] Global Features: overall statistical classification of all grain features within an image, forming a description of the macrostructure state. Examples: average equivalent diameter of all grains, grain size standard deviation, area fraction of alpha / beta phase, proportion of high angle grain boundaries (HAGB, > 15°), orientation distribution function (ODF) texture strength indicators computed based on all grain orientation data, based on region adjacency graph (RAG): RAG construction: each grain is considered as a node, and an edge is established between two nodes if the two grains share a grain boundary. The weight of the edge can be defined as the length of the shared grain boundary or the average misorientation between the two grains.
[0029] Graph structure indicators: degree distribution: 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 of grain neighbors to also be connected to form a triangular structure, reflecting the tightness of the local region. Edge weight distribution: statistical distribution of all edge weights, reflecting statistical information of interface characteristics (such as grain boundary length, misorientation).
[0030] (2) Finally, the grain features, global features, graph structure indicators, and topological features and physical constraint features are fused, and a comprehensive high-dimensional microstructure feature vector is formed by splicing. This vector not only combines the microstructure of grain morphology, orientation information and macrostructure state, but also embeds the relevant features of the physical process.
[0031] (3) Then, PCA or interpretable dimensionality reduction methods (such as Sparse PCA / LASSO) are used to reduce the high-dimensional microstructure feature vector V 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.
[0032] Step 4: Learn patterns based on the SVM model to capture nonlinear relationships; 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: (1) To P and Standardize the process; (2) If If the dimension is high, first use PCA, Sparse PCA, or an autoencoder to reduce the dimension to d dimensions; (3) Multiple Kernel Learning (MKL) is used to define kernels for different feature groups of input. k g and 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.
[0033] In feature computation, quantities related to the physical process are explicitly considered to construct a set of physical constraint features: 1) The Zener-Hollomon parameters (Z parameters) are: ; in: Strain rate (s) -1 (This can be obtained directly from the process parameters.) T: Deformation temperature (K), obtained directly from the process parameters; R: Ideal gas constant (8.314 J / mol·K); 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.
[0034] 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: 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.
[0035] 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: ; Where: k d The kinetic rate constant; n d For dynamic index; ε is the dependent variable; ε c The critical strain; ε p This represents the peak strain.
[0036] 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: d DRX = AZ m ; in A For material constants, m This represents the grain size index.
[0037] 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: ε c = αε p ; Where α is a constant.
[0038] (4) Optimize the SVR hyperparameters by grid search and K-fold cross-validation; the SVR hyperparameters include penalty factor C, kernel function parameter γ, and insensitive loss parameter ε.
[0039] Penalty factor C: controls the complexity of the model and balances the training error and model complexity. It determines how many training samples are allowed to have errors on the decision boundary. A larger C will make the model fit the training data more strictly, which may lead to overfitting; while a smaller C will make the model more tolerant to errors, which may lead to underfitting. In support vector machine (SVM), C controls the degree of error penalty, i.e., a high value of C will reduce the training error, while a low value of C will tolerate more errors to simplify the model.
[0040] Kernel function parameter γ: controls the nonlinear mapping ability of the support vector machine. It determines the range of influence between data points, which affects the distribution of data points in the feature space. A larger γ value will limit the influence range of training data points, leading to a high fitting of the model to the training data (overfitting); while a smaller γ value will make the fitting range of the model wider, which may lead to underfitting. ε is the parameter of the insensitive loss function in ε-support vector regression (SVR), which defines the maximum error range allowed in the regression model, i.e., if the error between the predicted value and the actual value of the training sample is less than , the model will not be penalized. Increasing the value of ε will increase the tolerance of the regression model to errors, reducing the complexity of the model; while a smaller value of ε will make the model more strictly approach each data point, which may increase the complexity of the model.
[0041] (5) To reduce the system bias, further use the residual regressor r ( P , f ) to correct the bias Δ of P ( f ), to obtain the corrected P .
[0042] The residual regressor r ( P , f ) is a newly introduced regression model, which is used to predict the residual Δ (i.e., error) between the SVR model output P ( f ) and the actual target value. P
[0043] where: P is the process parameter, f(P) is the prediction result of the SVR model.
[0044] 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.
[0045] The output of the process-tissue mapping model or its inverse transformation V corr It 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.
[0046] 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.
[0047] 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; 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. Next, the relationships between grains in the data are modeled based on graph neural networks to detect abnormal nodes in the graph structure; 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.
[0048] 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.
[0049] Step 5: Based on physical constraints, use conditional generative adversarial networks to predict microscopic tissues; The random noise vector z and the regularity constraint v (the tissue 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: ; Where: L adv To combat loss (WGAN-GP or hinge loss can be used); 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; L phys Loss due to physical constraints; L rec To perceive the loss, in order to preserve image details; λs, λp, and λr are the weights for calculating the loss function, and they can be determined through cross-validation.
[0050] ; Wherein: F img This refers to a function or network module that extracts features from an image. G(z,P) represents the statistical features extracted from the generated predicted image, and the features considered are the same as in step 3. Predictor(P) is the statistical feature directly predicted by the SVM model in step 4 based on the process parameter P.
[0051] : Take the mathematical expectation of the joint distribution of noise z and process parameter P (i.e. the average value when calculating in batches).
[0052] ; in: α i is the weighting coefficient for the i-th physical constraint loss; 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: 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.
[0053] 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.
[0054] Step 6: Result verification and output; 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.
[0055] Example 2: 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: Step 1: Data acquisition and establishment of a multimodal microscopic tissue database; (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 - ¹.
[0056] (2) Data collection; 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.
[0057] 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.
[0058] (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.
[0059] (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.
[0060] Step 2: Automatic segmentation of microscopic tissues based on the SAM model; (1) Model loading: Load the pre-trained Segment Anything Model (SAM) weights.
[0061] (2) Automatic segmentation: For the input SEM image (e.g., T=950℃, =0.1 s -1The 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.
[0062] (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.
[0063] Step 3: Statistical analysis and extraction of microscopic tissue features; (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.
[0064] (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.
[0065] Step 4: Pattern learning based on SVM; (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.
[0066] (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).
[0067] (3) Pattern model: After training, a reliable “process-organism” mapping model is obtained.
[0068] Step 5: Predict microscopic tissue based on conditional generative adversarial networks; (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.
[0069] (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.
[0070] (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.
[0071] Step 6: Result verification and output; 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 statistical features Fpredicted were extracted and compared with Fpredict directly predicted by the SVM model and Ftrue of the ground image. Validation results show that the error is within an acceptable range (<5%).
[0072] 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 microstructure of titanium alloy based on conditional generative adversarial network, characterized in that, Comprising the following steps: Step S1: constructing a process-structure mapping model, and taking the output of the model as a regular constraint condition; Step S11: acquiring multi-source microstructure images of the titanium alloy to be tested under different process conditions, and preprocessing the images; Step S12: inputting the preprocessed microstructure images into a SAM model, segmenting alpha phase, beta phase and grain boundary regions, and outputting a segmentation mask image after post-processing optimization; Step S13: performing spatial registration and multi-scale resampling on the segmentation mask image and the corresponding multi-source microstructure image, extracting statistical features of the microstructure, combining topological structure features, and introducing 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: taking process parameters as input and the high-dimensional microstructure feature vector in step S13 as output, and training a process-structure mapping model based on an SVM model; Step S2: input the random noise vector and the regular constraint condition into a conditional generative adversarial network to generate a predicted image; the loss function of the conditional generative adversarial network is f: ; wherein: to counteract losses; to predict the loss of statistical features in the image and regular constraints; L phys to predict the loss of physical constraints in the regular constraints conditions; L rec To perceive loss; λ s , λ p , λ r are respectively the calculation weights of the loss function; Step S3: quantitatively comparing the predicted image with the real image, verifying the consistency of the statistical features, and outputting the prediction result if the verification is passed, otherwise entering step S1. 2.The method of claim 1, wherein, In the step S11, the multi-source microstructure images include optical microscope images, scanning electron microscope images and electron backscatter diffraction orientation imaging images; the preprocessing includes noise removal, histogram equalization, normalization and spatial registration. 3.The method of claim 1, wherein, In the step S12, the post-processing optimization includes morphological operation, edge smoothing and connectivity enhancement processing. 4.The method of claim 1, wherein, The topological structure features include grain neighborhood relationship and orientation difference distribution; the physical constraint features include Z parameter, thermal history operator, dynamic recrystallization kinetics equation, critical strain equation and grain size equation; the thermal history operator is [T peak , t beta , , ]; wherein: T peak is the peak temperature; t beta t is the residence time in the beta phase field; Average heating rate; The average cooling rate is 0.5 °C / min.
5. The method of claim 1-4, wherein, The step S14 includes the following steps: Step A1 : To process parameters P Standardization is performed on the high-dimensional microstructure feature vector; Step A2: Dimensionality reduction of the high-dimensional microstructure feature vector to d dimensionality; Step A3: Define kernels for different feature sets using composite kernels k g and construct the overall kernel in the form of weighted sum to train the SVR while embedding the physical constraint features in the kernel. Step A4: optimizing SVR hyperparameters through grid search and K-fold cross-validation; the 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 of predicting microstructure of titanium alloy based on conditional generative adversarial network according to claim 1, characterized in that, In the step S14, before inputting the SVR model, it further includes inputting anomaly detection: (1) first, learning the normal boundary of the process parameters and the high-dimensional microstructure feature vector by using One-class SVM, and identifying the preliminary abnormal data points; (2) then, encoding and decoding the data by using an automatic encoder, analyzing the abnormality of the data through reconstruction error, and enhancing the detection ability of non-linear relationship data; (3) modeling the relationship between grains in the data based on a graph neural network, and detecting abnormal nodes in the graph structure; (4) finally, performing final anomaly judgment by using weighted voting or confidence evaluation method through multi-model fusion. 7.The method of claim 1, wherein, In the step S2, the The calculation formula is: ; where: F img is a function that extracts features from the image; G(z, P) is the statistical feature extracted from the generated predicted image; Predictor(P) is the statistical feature predicted by the process-structure mapping model in step S1 according to the process parameter P; is the mathematical expectation taken over the joint distribution of the noise z and the process parameter P; The L phys The calculation formula is: ; wherein: PhysModel i P ) is a physical feature directly predicted by the process-structure mapping model from the process parameters P; PhysFeature i ( G (z, P )for the physical feature extracted from the generated predicted image; α i is the weight coefficient of the ith physical constraint loss. 8.The method of claim 1, wherein, In the step S3, the structural similarity index, mean absolute error and root mean square error are used to quantitatively compare the predicted image with the real image.
9. A titanium alloy microstructure prediction system based on conditional generative adversarial network, based on the titanium alloy microstructure prediction method based on the conditional generative adversarial network of any one of claims 1-8, characterized in that, Comprise: A data acquisition and preprocessing module for acquiring and preprocessing multi-source microstructure images; An image segmentation module for segmenting microstructure images based on a SAM model and post-processing and outputting a segmentation mask image; The feature extraction module is configured for quantitative statistics based on the segmentation mask map and fusion to form a high-dimensional microstructure feature vector. The rule prediction module is configured for constructing a process-microstructure mapping model based on an SVM algorithm, and taking the output of the model as a rule constraint condition. The image prediction module is configured for generating a predicted image based on a conditional generative adversarial network. The verification output module is configured for verifying the predicted image and outputting.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the titanium alloy microstructure prediction method based on the conditional generative adversarial network according to any one of claims 1-8.
Citation Information
Patent Citations
Method for generating titanium alloy microstructure image by inputting multiple mechanical properties
CN113870373A
Rapid and accurate prediction method for titanium alloy forging deformation microstructure and mechanical property
CN117594161A
Titanium alloy microscopic structure detection method and device
CN120543523A
Analysis method and system for dynamic recrystallization structure morphology of titanium alloy based on machine learning and medium
CN120544757A
Method of image reconstruction for cross-modal communication system and device thereof
US20230196633A1
Cited By
Intelligent industrial aided design system and method based on virtual-real fusion
CN121683542A
An intelligent industrial auxiliary design system and method based on virtual-real fusion
CN121683542B
Physical mechanism embedded industrial data generation method and device and storage medium
CN121685536A
Oriented electrical steel normalized structure prediction and regulation method and system based on multi-layer perception deep learning network and cellular automaton, and medium
CN122091047A