Titanium alloy tissue image generation method based on deep learning model
Through the titanium alloy structure image generation method based on deep learning model, the forward noise addition and reverse noise denoising process are used to solve the problems of inefficiency and high cost of traditional methods, and efficiently generate titanium alloy structure images, which is for material science research Provides feasible tools.
Patent Information
- Application Number
- CN202410959618.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-17
AI Technical Summary
Traditional titanium alloy structure image acquisition methods are inefficient, difficult to identify, difficult to extract feature and high cost, making it difficult to meet the needs of materials science research.
Using the titanium alloy tissue image generation method based on deep learning model, pure noise images are obtained through forward noise addition processing, and the deep learning model is used to reverse denoise to generate titanium alloy tissue images, combining the UNet architecture and the denoising diffusion probability model. Training the model to improve image generation efficiency and quality.
It improves the efficiency of image generation and reduces cost, and can generate different types of titanium alloy tissue images, providing an efficient tool for materials science research.
Smart Images

Figure CN118918029A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image generation, and in particular relates to a titanium alloy tissue image generation method based on a deep learning model. Background Art
[0002] Titanium alloys are widely used in aviation, medical and high-performance engineering fields due to their excellent mechanical properties and corrosion resistance. The tissue image of titanium alloy is of great significance for material science research and application development. However, the traditional titanium alloy tissue image acquisition method has the disadvantages of low efficiency, high recognition difficulty, difficult feature extraction and high cost. In recent years, the application of deep learning models in the field of image generation has provided a new technical path to solve this problem. Therefore, the present invention discloses a titanium alloy tissue image generation method based on a deep learning model. Summary of the invention
[0003] In order to solve the above technical problems, the present invention proposes a titanium alloy tissue image generation method based on a deep learning model to solve the problems existing in the above-mentioned prior art.
[0004] To achieve the above object, the present invention provides a method for generating titanium alloy tissue images based on a deep learning model, comprising:
[0005] Acquire an original titanium alloy tissue image, and perform forward noise processing on the original titanium alloy tissue image to obtain a pure noise image;
[0006] A deep learning model is constructed, and the pure noise image is input into the deep learning model for reverse denoising to generate a predicted titanium alloy tissue image.
[0007] Optionally, the expression for forward noise addition is:
[0008]
[0009] In the formula, p(x t |x t-1 ) indicates positive noise addition, β t is the preset noise weight, I is the identity matrix, x t represents a pure noise image.
[0010] Optionally, the pure noise image is expressed as:
[0011]
[0012] In the formula, is the cumulative product of the denoising coefficients, ∈ is the Gaussian noise in the forward noise addition process, x t represents a pure noise image.
[0013] Optionally, the process of the deep learning model includes predicting the noise at each step; wherein the expression for predicting the noise is:
[0014]
[0015] In the formula, μ θ (x t ,t) and represents the mean and variance predicted by the network, p θ (x t-1 |x t ) represents the predicted noise.
[0016] Optionally, the expression for inverse denoising is:
[0017]
[0018] In the formula, ∈′ is the Gaussian noise in the reverse denoising process, x t-1 Represents the denoised image at step t-1.
[0019] Optionally, the deep learning model also includes several embedding layers, which are used to embed performance parameters into each upsampling layer and downsampling layer; the performance parameters include: temperature, cooling time, forging temperature, heat treatment, and image magnification.
[0020] Optionally, before generating the predicted titanium alloy tissue image based on the deep learning model, a model training stage is also included, and the model training stage performs model optimization based on minimizing the loss value;
[0021] Among them, the expression of the loss function is:
[0022]
[0023] In the formula, Represents the loss value.
[0024] Compared with the prior art, the present invention has the following advantages and technical effects:
[0025] The titanium alloy tissue image generation method of the present invention not only improves the efficiency of image generation and reduces the cost, but also can generate different types of titanium alloy tissue images by adjusting model parameters, thus providing a feasible tool for material science research. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0027] Figure 1is a flow chart of a method according to an embodiment of the present invention;
[0028] Figure 2 Schematic diagram of the forward diffusion process and the reverse denoising process of an embodiment of the present invention;
[0029] Figure 3 A schematic diagram for intuitively comparing the model-generated alloy microstructure diagram of an embodiment of the present invention with the real alloy microstructure diagram;
[0030] Figure 4 It is a schematic diagram of quantitative fitting between the alloy microstructure reconstructed by the model according to an embodiment of the present invention and the real alloy microstructure. DETAILED DESCRIPTION
[0031] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0032] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] Embodiment 1
[0034] The present invention provides a titanium alloy tissue image generation method based on Denoising Diffusion Probabilistic Models (DDPM). The method gradually adds noise to the original titanium alloy tissue image to a pure noise image through a forward diffusion process, and then gradually removes the noise through a reverse denoising process until the initial image is restored. A deep learning model with a UNet architecture is used for training to accurately predict image generation during the denoising process. The method can efficiently generate high-quality titanium alloy microstructure images, which not only improves the efficiency of image generation and reduces costs, but also can generate different types of titanium alloy tissue images by adjusting model parameters, providing an efficient tool for materials science research.
[0035] like Figure 1 As shown, this embodiment provides a method for generating titanium alloy tissue images based on a deep learning model, including: obtaining an original titanium alloy tissue image, performing forward noise processing on the original titanium alloy tissue image to obtain a pure noise image; constructing a deep learning model, and inputting the pure noise image into the deep learning model for reverse denoising to generate a predicted titanium alloy tissue image.
[0036] Before training the model, the data is preprocessed first. In this study, 1157 SEM images of high-strength and tough titanium alloy microstructures with different STA processes and different magnifications were obtained through experiments, and the original 1536×1103 images were cropped to 512×512 images.
[0037] The magnifications of the collected titanium alloy microstructure SEM images ranged from 5000 times to 100,000 times, with a total of 23 types of magnifications. Combined with the STA heat treatment process data, the final pre-processing data were classified into different categories.
[0038] This embodiment uses 87% of the data for model training and retains 13% of the data. Data that the model has not seen is extracted from here for detailed quantitative comparative analysis to test the generalization ability of the model on unseen data.
[0039] The DDPM model was implemented based on the Pytorch deep learning platform and trained for 300 epochs. The step size or learning rate used to update the weights was 0.0003. The size of the input model was 512×512, the embedding layer dimension was 100, and the number of categories (num_classes) was set to 28 according to the division of the training set and the test set.
[0040] In the image evaluation stage, the MIPAR-based deep learning module trained a model for titanium alloy microstructure image segmentation. First, the different phases in the tissue image can be segmented by setting appropriate recipes through operations such as improving contrast and binarization.
[0041] Then the effect of the segmented image is manually fine-tuned, and the labeled image obtained in this step will be used as training data for the deep learning module to improve the image segmentation effect.
[0042] This study conducted image segmentation training for different phases separately, and finally achieved good overall image segmentation results through superposition.
[0043] This model is trained on a device equipped with an Intel Xeon 8352Y processor and an NVIDIA RTX 4090 graphics card.
[0044] The MSE loss function is used to minimize the gap between the target data and the predicted data.
[0045] A method for generating titanium alloy tissue images based on a denoising diffusion probability model is specifically implemented as follows:
[0046] Step 1, such as Figure 2As shown, forward diffusion is performed: by gradually adding noise, the original titanium alloy tissue image is denoised to a pure noise image. The specific operation is as follows: in the forward diffusion process: by gradually adding noise, the original titanium alloy tissue image is denoised to a pure noise image, and x0 represents the original titanium alloy tissue image, and X t It represents the image after t steps of noise addition. The noise addition process is shown in the following formula:
[0047]
[0048] Among them, β t is the noise coefficient at time step t, and I is the identity matrix.
[0049] Step 2: Starting from the original image x0, gradually add noise to generate a noisy image x t :
[0050]
[0051] in is the cumulative product of the denoising coefficients, is Gaussian noise.
[0052] Step 3: reverse denoising: starting from the pure noise image, gradually remove the noise until the initial titanium alloy tissue image is restored. t To begin with, the image is usually generated from a pure noise sample.
[0053] Step 4, define the denoising neural network (U-Net)∈ θ (x t ,t), where θ is the model parameter, the goal is to predict the noise at each step:
[0054] Among them, μ θ (x t ,t) and are the mean and variance of the predictions made by the network, p θ (x t-1 |x t ) represents the predicted noise, that is, when x is known t In the case of x t-1 Probability of occurrence.
[0055] The denoising process of step t is expressed as follows:
[0056]
[0057] Among them, μ θ and Σ θ Predicted by the deep learning model, θ is the model parameter. θ (x t,t) represents a complete covariance matrix, which can capture and model the dependencies between different features.
[0058] The noise prediction module consists of a Unet network with conditional input, which aims to predict the noise term ∈(x t ,t,c), where x t represents a noisy image, t is the time step, and c is the given condition.
[0059] Step 5, such as Figure 3-Figure 4 As shown, we gradually start from the noise image x t Start to remove noise in reverse until the original image x0 is restored.
[0060]
[0061] in, is the Gaussian noise in the reverse noise removal process, x t-1 represents the denoised image at step t-1.
[0062] Step 6: Model training is controlled by minimizing the loss function.
[0063]
[0064] The loss function calculates the difference between the predicted noise of the denoising network and the true noise.
[0065] Step 7 In the U-Net (step 4) part of the model, the embedding of the heat treatment conditions of the titanium alloy is implemented, and the embedding vectors related to the performance parameters are integrated into each upsampling and downsampling layer. These embedded vectors are first linearly mapped to tensors that match the layer space dimensions, and then fused with the feature map to impose specific process parameter restrictions on the model. For example, in the classes Down and Up, there is a dedicated embedding layer (nn.Embedding) for each condition parameter such as temperature, cooling time, etc., which is used to convert these conditions into features that can be used by the model. The embedding results of each condition are integrated into the downsampling (Down) and upsampling (Up) paths of the model.
[0066] To achieve a unified representation of the conditions, an embedding layer is used to map each condition to the same dimension so that the model can more easily process and learn different input conditions.
[0067] The Unet network introduces a self-attention mechanism, which consists of six groups of symmetrical downsampling and upsampling modules, each of which is connected to four convolutional layers, a group normalization layer, and a Gaussian error linear unit (GELU) activation function.
[0068] A self-attention mechanism with four heads is attached after each downsampling layer to help the model handle the long distances between image regions and the extensive hierarchical dependencies.
[0069] The self-attention mechanism helps the model dynamically adjust feature weights according to task requirements, strengthen important features and ignore non-critical information, and improve the interpretability of the model because the attention map it outputs can show which areas of the image the model pays more attention to when making decisions.
[0070] In order to alleviate the gradient vanishing problem caused by the increase of network depth, this model applies skip connection between each group of downsampling and upsampling, which effectively alleviates the problem.
[0071] Step 8: Specific parameters include temperature (two stages), cooling time (two stages), forging temperature, heat treatment, image magnification, etc. These parameters are transformed through embedding vectors and combined with image data during model training and generation, affecting the final generated image.
[0072] Step 9: In the forward propagation function of the model, the features generated by these embedding layers are merged with the image data and participate in the subsequent network calculations. By adjusting the values of these parameters, the specific conditions for generating images can be controlled, such as changing the temperature or cooling time to observe the changes in the titanium alloy structure.
[0073] Step 10, in the prediction functions predict and predictByPara, images are dynamically generated according to the provided parameters, such as finding the closest condition configuration according to the actual physical properties (such as tensile strength), and then generating the corresponding image.
[0074] During the model training phase, in order to improve the model convergence stability, reduce the shock of the training process, and improve the prediction performance of the model, an exponential moving average (EMA) strategy is used to update the network parameters. EMA achieves this by calculating the sliding average of the model parameters, thereby reducing the volatility of the model weights during training.
[0075] Image generation: Randomly generate Gaussian noise image x t , input into the trained deep learning model, and the model predicts the mean μ θ (x t ,t) and variance Σ θ (x t ,t), according to the sampling formula, the mean is μ θ (x t ,t), the variance is Σ θ (x t ,t) is sampled from the Gaussian distribution to obtain xt1 , and repeat T times until x0 is obtained, which is the generated titanium alloy tissue image.
[0076] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A titanium alloy tissue image generation method based on a deep learning model, characterized in that: The following steps are involved: Acquire an original titanium alloy tissue image, and perform forward noise processing on the original titanium alloy tissue image to obtain a pure noise image; A deep learning model is constructed, and the pure noise image is input into the deep learning model for reverse denoising to generate a predicted titanium alloy tissue image.
2. The method for generating titanium alloy tissue images based on a deep learning model according to claim 1, characterized in that: The expression of forward noise addition is: In the formula, p(x t |x t-1 ) indicates positive noise addition, β t is the preset noise weight, I is the identity matrix, x t represents a pure noise image.
3. The method for generating titanium alloy tissue images based on a deep learning model according to claim 2, characterized in that: The expression of the pure noise image is: In the formula, is the cumulative product of the denoising coefficients, ∈ is the Gaussian noise in the forward noise addition process, x t represents a pure noise image.
4. The method for generating titanium alloy tissue images based on a deep learning model according to claim 3, characterized in that: The process of the deep learning model includes predicting the noise at each step; wherein the expression for predicting the noise is: In the formula, μ θ (x t ,t) and represents the mean and variance predicted by the network, p θ (x t-1 |x t ) represents the predicted noise.
5. The method for generating titanium alloy tissue images based on a deep learning model according to claim 4, characterized in that: The expression of reverse denoising is: In the formula, ∈′ is the Gaussian noise in the reverse denoising process, x t-1 represents the denoised image at step t-1.
6. The method for generating titanium alloy tissue images based on a deep learning model according to claim 1, characterized in that: The deep learning model also includes several embedding layers, which are used to embed performance parameters into each upsampling layer and downsampling layer; the performance parameters include: temperature, cooling time, forging temperature, heat treatment, and image magnification.
7. The method for generating titanium alloy tissue images based on a deep learning model according to claim 1, characterized in that: Before generating the predicted titanium alloy tissue image based on the deep learning model, a model training stage is also included, and the model training stage is optimized based on the minimum loss value; Among them, the expression of the loss function is: In the formula, Represents the loss value.
Citation Information
Patent Citations
Neural network for image restoration and training and using method thereof
CN111316316A
Collaborative recommendation method based on knowledge graph representation learning and neural network
CN111582509A
Low-dose CT image denoising method based on mixed representation learning
CN116563554A
Metal internal defect prediction method and device, equipment and storage medium
CN117272837A
Image segmentation method and device based on diffusion model and generative adversarial network
CN117314930A
