High-temperature alloy microstructure segmentation method and device based on deep learning

Through the improved Mask R-CNN model, combined with adaptive histogram equalization and Sobel operator, the complexity of the microstructure segmentation of high-temperature alloy materials under the scanning electron microscope is solved, and efficient and accurate automated segmentation is achieved, which is suitable for high-temperature alloy materials. Flux Materials Research.

CN118736211AActive Publication Date: 2024-10-01ZHEJIANG UNIV

Patent Information

Application Number
CN202410699783.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-10-01
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently and accurately segment the microstructure of complex high-temperature alloy materials under a scanning electron microscope, especially in the case of high background noise and dense structures. Traditional methods rely on manual intervention and are inefficient, and cannot adapt to the microstructure of the material. Special properties.

Method used

Using a method based on deep learning, an improved Mask R-CNN model is constructed, which expands the dynamic range of image gray levels through adaptive histogram equalization, enhances local contrast, and introduces the Sobel operator and Huber loss function to fuse image edge information to Improve model performance and realize automated segmentation of high-temperature alloy microstructures.

Benefits of technology

It achieves precise identification and segmentation of the microstructure of high-temperature alloy materials in scanning electron microscope images. It is suitable for high-throughput material research and can quantitatively analyze multiple microstructural features at the same time, improving segmentation efficiency and accuracy and reducing costs. Effects of contrast imbalance and noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736211A_ABST
    Figure CN118736211A_ABST
Patent Text Reader

Abstract

The invention discloses a high-temperature alloy microstructure segmentation method and device based on deep learning, and the method comprises the steps: collecting a microstructure image of a high-temperature alloy material in a scanning electron microscope, carrying out the marking and annotation of the microstructure in the image, and constructing a data set through image preprocessing and image enhancement; an improved Mask R-CNN model is constructed, the dynamic range of the image gray level is expanded by adopting adaptive histogram equalization, and the local contrast is enhanced; fusing image edge information into the network model by adopting a Sobel operator, and introducing a Huber loss function to improve the performance of the model; carrying out transfer learning training on the model; and adopting the trained instance segmentation model to carry out identification segmentation on a to-be-analyzed SEM image to obtain a segmentation mask and a calibration rectangular frame of each microstructure in the image. According to the method, accurate high-temperature alloy material microstructure object identification is realized based on the improved Mask R-CNN model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microstructure characterization of high-temperature alloy materials under a scanning electron microscope, and in particular to a high-temperature alloy microstructure segmentation method and device based on deep learning. Background Art

[0002] Material structure is one of the four basic elements of material science. The properties and performance of a material depend on its microstructure, which can be controlled through the production process. The microstructure of a material determines its properties more than its chemical composition. In the field of material science research, observing and analyzing the microstructure of a material to determine the relationship between its microstructure and performance is a very important topic.

[0003] The imaging of the microstructure of materials under a scanning electron microscope is a grayscale image. The imaging effect is affected by factors such as the quality of sample pretreatment before the experiment and the manual operation of the scanning process, which often makes it difficult to accurately reflect the microstructural features. The microstructural features extracted based on traditional methods rely on manual subjective marking and are not efficient. Therefore, the accurate, high-throughput and efficient microstructural feature positioning in the in-situ experiment process through automated instance segmentation methods can play a good supplementary role in material analysis. The microstructure in the scanning electron microscope image often presents the characteristics of fuzzy morphological features and poor imaging effect. The traditional segmentation method relies on expert manual annotation, which makes it difficult to collaboratively extract and observe a large number of features. In addition, the microstructure of materials is different from ordinary objects in the macroscopic world. Its structure is usually very complex, such as irregular grains, curved and staggered grain boundaries, etc.; the microstructural imaging is affected by the instrument and sample preparation, resulting in high image noise and low signal-to-noise ratio. At the same time, the microstructural features in the scanning electron microscope image are not obviously different from the background environment, and the image contrast is uneven. Traditional instance segmentation technology is difficult to adapt to the special properties of material microstructural images. Therefore, it is urgent to propose instance segmentation techniques that can adapt to the needs of microstructure characterization.

[0004] Traditional automatic image segmentation algorithms, such as those incorporated into ImageJ, such as threshold-based algorithms and watershed algorithms, usually perform segmentation by looking for spots with constant contrast or edges with varying contrast. These methods can handle suitable microstructures well, but complex or non-ideal images usually require a lot of human intervention or even manual segmentation, resulting in a workflow that is subjective, slow, and limited to specific materials.

[0005] With the in-depth development of machine vision, image segmentation based on machine vision has important and extensive applications in the fields of autonomous driving and medical imaging. Due to its excellent efficiency, it has attracted great attention in the segmentation of material microstructures.

[0006] However, existing machine vision models can only segment specific types of microstructures in relatively simple SEM / TEMs, and perform poorly when dealing with high background noise, small microstructures, and dense microstructures. At the same time, existing networks generally only perform semantic segmentation on microstructures, that is, separation of target objects from backgrounds, which is not suitable for the requirements of quantitative research on multiple microstructure features at the same time in the context of high-throughput material research. Summary of the invention

[0007] The purpose of the present invention is to address the deficiencies in the prior art and to propose a method and device for segmenting the microstructure of a high-temperature alloy based on deep learning.

[0008] The object of the present invention is achieved through the following technical solution: A high-temperature alloy microstructure segmentation method based on deep learning, comprising the following steps:

[0009] S1, collects microstructure images of high-temperature alloy materials in scanning electron microscope, labels and annotates the microstructure in SEM images, and constructs a data set through image preprocessing and image enhancement;

[0010] S2, constructing an improved Mask R-CNN model, wherein the improved Mask R-CNN model uses adaptive histogram equalization to expand the dynamic range of image grayscale levels, enhance local contrast, uses the Sobel operator to fuse image edge information into the network model, and introduces the Huber loss function to improve model performance;

[0011] S3, using the constructed dataset to perform transfer learning training on the improved Mask R-CNN model to obtain a material microstructure instance segmentation model;

[0012] S4, using the trained material microstructure instance segmentation model, the SEM image to be analyzed is identified and segmented to obtain the segmentation mask and calibration rectangle of each microstructure in the image.

[0013] Furthermore, the step S1, collecting microstructure images of high-temperature alloy materials in a scanning electron microscope, marking and annotating the microstructures in the SEM images, and constructing a data set through image preprocessing and image enhancement, specifically includes:

[0014] S1.1. Collect microscopic images of the superalloy microstructure in a scanning electron microscope;

[0015] S1.1. Use VGG image annotator to define regions in the image and add text descriptions of the regions. The data format is converted into JSON format and the data set is divided.

[0016] S1.1. Enhance the image data by using contrast enhancement, image sharpening, rotation and deformation methods.

[0017] Furthermore, the step S2, constructing an improved Mask R-CNN model, specifically includes:

[0018] S2.1, Scanning electron microscope images of high-temperature alloy microstructures expand the grayscale dynamic range of images and enhance local contrast through adaptive histogram equalization;

[0019] S2.2, input the scanning electron microscope image after adaptive histogram equalization into the 101-layer residual neural network ResNet101 and the shared convolutional layer of the feature pyramid network to extract the feature map of the material microstructure in the image;

[0020] S2.3, use the region proposal network RPN to generate target proposal candidate boxes of different positions and sizes on the feature map;

[0021] S2.4, using the ROI Align method to process the target proposed candidate box, associate the proposed candidate box feature map to a specific ROI and crop it into a feature vector of a fixed size;

[0022] S2.5, the feature vector output by the ROI Align enters two heads respectively, namely the classification and bounding box regression head and the mask prediction head;

[0023] The classification branch in the classification and bounding box regression head predicts the object category of each region proposed by the RPN through a fully connected layer to distinguish different types of objects in the image;

[0024] The bounding box regression branch in the classification and bounding box regression head is used to adjust the coordinates of each RPN proposed region, refine its size and position to more accurately surround the object;

[0025] The mask prediction head uses a small fully convolutional network for each ROI region, which generates a binary mask that outlines the exact shape of the object;

[0026] S2.6, the Sobel operator is used to fuse the image edge information into the network model, which is reflected in the introduction of a small edge detection network after the output mask branch. The network input is the predicted mask and the Ground truth real mask. The two are convolved with the Sobel operator to determine the edge difference between the predicted mask and the real mask, and then the edge consistency error is calculated through the Huber loss function.

[0027] Furthermore, the improved Mask R-CNN model is constructed, and the high-temperature alloy microstructure scanning electron microscope image expands the image grayscale dynamic range through adaptive histogram equalization to enhance the local contrast, specifically including:

[0028] S2.1.1, input scanning electron microscope image;

[0029] S2.1.2, dividing the image into several sub-regions;

[0030] S2.1.3, calculate the histogram of each area and preset the maximum pixel frequency threshold;

[0031] S2.1.4, allocating the excess pixels of the histogram that exceed the frequency threshold range to the remaining bins;

[0032] S2.1.5. Scale and map the redistributed histogram using the cumulative distribution function;

[0033] S2.1.6, stitch the generated sub-regions together using bilinear interpolation;

[0034] S2.1.7. Output enhanced scanning electron microscope images.

[0035] Furthermore, the use of the region proposal network RPN to generate target proposal candidate boxes of different positions and sizes on the feature map specifically includes:

[0036] S2.2.1, input the 101-layer residual neural network ResNet101 and the shared convolutional layer in the feature pyramid network to obtain the feature map of the material microstructure;

[0037] S2.2.2. Generate anchor points for element points on the feature map, and use the anchor points as the center points to generate anchor boxes of different sizes and shapes in a sliding window manner. The anchor boxes are controlled by two parameters: the pixel size of the longest side of the box and the aspect ratio;

[0038] S2.2.3. Generate 9 anchor boxes of different sizes and proportions at each anchor point in the feature map;

[0039] S2.2.4. Use the RPN network to obtain the possibility of the predicted anchor point being the background or foreground, and refine the anchor point.

[0040] Furthermore, the target proposed candidate box is processed using the ROI Align method, and the proposed candidate box feature map is associated with a specific ROI and cropped into a feature vector of a fixed size, specifically including:

[0041] S2.3.1, traverse each candidate region and keep the floating point number boundaries without quantization;

[0042] S2.3.2, divide the candidate region into k*k units, and the boundary of each unit is not quantized;

[0043] S2.3.3. Calculate four fixed coordinate positions in each unit, use bilinear interpolation to calculate the interpolation values ​​of these four positions, and then perform maximum pooling operation;

[0044] S2.3.4. Output a fixed-size feature map that retains the edge feature information of the image.

[0045] Furthermore, the use of the Sobel operator to fuse image edge information into the network model specifically includes: the Sobel operator used for edge detection is a network with a 3*3*2 convolution kernel, including a transverse filter describing the horizontal gradient, and a longitudinal filter describing the vertical gradient.

[0046] Furthermore, the error of edge consistency calculated by Huber loss function specifically includes:

[0047] Integrate edge detection into the network as a branch and add the edge loss function L to the loss function edge , then the improved Mask R-CNN loss function is: L = L cls +L box +L mask +L edge ; where L cls For classification loss, the cross entropy loss function is used, and the calculation formula is:

[0048]

[0049] Among them, N is the total number of samples, y i is the true category label of the i-th sample, p i is the predicted probability of the i-th sample;

[0050] L box The bounding box regression loss uses a smooth L1 loss and is calculated as:

[0051]

[0052] Among them, t i Represents the parameters of the predicted bounding box, including the center coordinates x, y, width w and height h, represents the parameters of the true bounding box, and the smooth L1 loss is defined as:

[0053]

[0054] L mask For mask loss, a binary cross entropy loss for each pixel is used to calculate the difference between the true mask and the predicted mask for each pixel. The calculation formula is:

[0055]

[0056] Where m is the resolution of the mask, y i is the true mask label of the ith pixel, p i is the predicted probability of the i-th pixel;

[0057] Margin loss function L edge It is used to evaluate the difference between the edge information of the instance segmentation mask and the ground truth edge information. Huber Loss is used as the calculation formula of the edge detection loss function, that is:

[0058]

[0059] Furthermore, step S3 includes using MS COCO weights and SEM image datasets to perform transfer learning training on the improved Mask R-CNN model to obtain a material microstructure instance segmentation model. During the training process, the training optimizer of the model is set to Adam, and the learning rate adjustment strategy is Step.

[0060] According to another aspect of the specification, a high-temperature alloy material microstructure segmentation device based on an improved Mask R-CNN model is also provided, comprising a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, the high-temperature alloy microstructure segmentation method based on deep learning is implemented.

[0061] Beneficial effects of the present invention:

[0062] The present invention provides a high-temperature alloy material microstructure segmentation method based on an improved Mask R-CNN model, constructs an improved Mask R-CNN model, and replaces the traditional image segmentation method that is subjective, relies on human intervention, is slow and is limited to specific materials in the traditional workflow with an automated deep learning segmentation method; contrast-limited adaptive histogram equalization is used to expand the dynamic range of image grayscale levels and enhance local contrast, which is suitable for imaging conditions where scanning electron microscope images have high noise, low signal-to-noise ratio, and uneven image contrast; the Sobel operator is used to fuse image edge information into the network model and the Huber loss function is introduced to improve model performance, which solves the problem that high background noise, small microstructures, and dense microstructures are difficult to segment, and realizes accurate identification of the microstructure of high-temperature alloy materials under scanning electron microscope images, which is suitable for the requirements of quantitative research on multiple microstructure features at the same time in the context of high-throughput material research, and provides theoretical and methodological support for the characterization and analysis of the microstructure of high-temperature alloy materials, and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0064] Figure 1 It is a flow chart of the microstructure segmentation method of high-temperature alloy material based on the improved Mask R-CNN model of the present invention;

[0065] Figure 2 Schematic diagram of the improved Mask R-CNN model of the present invention;

[0066] Figure 3 It is a flow chart of contrast-limited histogram adaptive equalization algorithm;

[0067] Figure 4 This is the flow chart of ROI Align algorithm;

[0068] Figure 5 A schematic diagram of a small edge detection network of the present invention;

[0069] Figure 6 Schematic diagram of the segmentation mask and calibration rectangle frame of each microstructure of the high-temperature alloy material in the SEM image;

[0070] Figure 7 Schematic diagram of a high-temperature alloy material microstructure segmentation device based on an improved Mask R-CNN model provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0071] The specific implementation methods of the present invention are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] The purpose of the present invention is to provide a high-temperature alloy microstructure segmentation method based on deep learning, which adopts adaptive histogram equalization technology and the improved Mask R-CNN model that adopts the Sobel operator to fuse image edge information into the network model and introduces the Huber loss function to achieve accurate scanning electron microscope image high-temperature alloy microstructure segmentation.

[0073] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0074] like Figure 1 As shown, the high-temperature alloy material microstructure segmentation method based on the improved Mask R-CNN model provided by the present invention comprises the following steps:

[0075] S1, collects microstructure images of high-temperature alloy materials in scanning electron microscope, labels and annotates the microstructure in SEM images, and constructs a data set through image preprocessing and image enhancement;

[0076] S2, constructing an improved Mask R-CNN model, wherein the improved Mask R-CNN model uses adaptive histogram equalization to expand the dynamic range of image grayscale and enhance local contrast; uses the Sobel operator to fuse image edge information into the network model and introduces the Huber loss function to improve model performance;

[0077] S3, using MS COCO weights and SEM image datasets to perform transfer learning training on the improved Mask R-CNN model to obtain a material microstructure instance segmentation model;

[0078] S4, using the trained instance segmentation model, the SEM image to be analyzed is identified and segmented to obtain the segmentation mask and calibration rectangle of each microstructure in the image.

[0079] Specifically, the step S1 collects microstructure images of high-temperature alloy materials in a scanning electron microscope, labels and annotates the microstructures in the SEM images, and constructs a data set through image preprocessing and image enhancement, including:

[0080] S1.1 Prepare an IN718 specimen suitable for high-temperature in-situ tensile test, which is dog-bone shaped, 50 mm long, and contains an observation gauge section with a length of 1.5 mm and a width of 1.35 mm; use 400 mesh, 600 mesh, and 1200 mesh sandpaper to mechanically grind the original tensile specimen, use a vibration polisher to perform rough polishing and fine polishing on the polished sample, and use a cupric chloride solution to corrode the polished sample to focus on the grains and grain boundaries in the in-situ experiment;

[0081] S1.2 Collect microscopic images of the superalloy microstructure from a scanning electron microscope during the in-situ experiment;

[0082] S1.3 uses VGG image annotator to define regions in the image and add text descriptions of the regions. The data format is converted into JSON format and the data set is divided;

[0083] S1.4 uses methods such as contrast enhancement, image sharpening, rotation, and deformation to enhance image data in order to improve the robustness of the model.

[0084] Specifically, the step S2 is as follows: Figure 2 As shown in the figure, an improved Mask R-CNN model is constructed. The improved Mask R-CNN model uses adaptive histogram equalization to expand the dynamic range of image grayscale and enhance local contrast. The Sobel operator is used to fuse image edge information into the network model and the Huber loss function is introduced to improve model performance, including:

[0085] S2.1 Scanning electron microscope images of high-temperature alloy microstructures use adaptive histogram equalization to expand the grayscale dynamic range of the image and enhance the local contrast. Specifically, Figure 3 As shown, the following steps are included:

[0086] (1) Input scanning electron microscope image;

[0087] (2) Divide the image into several sub-regions;

[0088] (3) Calculate the histogram of each sub-region and preset the maximum pixel frequency threshold;

[0089] (4) allocating the excess pixels of the histogram that exceed the pixel frequency threshold range to the remaining pixels;

[0090] (5) Use the cumulative distribution function (CDF) to scale and map the redistributed histogram;

[0091] (6) Use bilinear interpolation to stitch the generated sub-regions together;

[0092] (7) Output enhanced scanning electron microscope image.

[0093] S2.2 inputs the scanning electron microscope image after adaptive histogram equalization into the 101-layer residual neural network ResNet101 and the shared convolutional layer of the feature pyramid network to extract the feature map of the material microstructure in the image;

[0094] S2.3 uses the region proposal network RPN (Region Proposal Network) to generate target proposal candidate boxes of different positions and sizes on the feature map. The specific steps are as follows:

[0095] (1) Input the feature map of the material microstructure obtained by the 101-layer residual neural network ResNet101 and the shared convolutional layer in the feature pyramid network;

[0096] (2) Generate anchor points for all element points on the feature map, and use the anchor points as the center points to generate anchor boxes of different sizes and shapes in a sliding window manner. The anchor boxes are controlled by two parameters: the pixel size of the longest side of the box (Scales) and the aspect ratio (Aspectboxes);

[0097] (3) The pixel sizes of the longest side of the frame are 128×128, 256×256, and 512×512, and the aspect ratios are 1:1, 1:2, and 2:1. Therefore, according to the permutation and combination, 9 anchor boxes of different sizes and proportions are generated at each anchor point in the feature map;

[0098] For all pixels in the feature map, the anchor box positioning and classification are determined by calculating the anchor box classifier layer and the anchor box regressor layer, and the loss function is:

[0099]

[0100] in is the prospect judgment loss function, L cls is the classification loss function, p i refers to the prospect probability score, is the ground truth value, N cls Used as normalization, determined by the size of the mini-batch.

[0101] is the classification model loss function of the coordinates, t i is a vector of 4 parameterized coordinates of the predicted bounding box, N reg Used as normalization, determined by the number of anchor positions, λ is weighted as a balance parameter. By default, λ is 10;

[0102] The target proposal candidate boxes are screened through the back propagation of the loss function, and the target proposal candidate boxes with foreground and accurate positioning are input into the ROI Align of the next step.

[0103] S2.4 uses the ROI Align method to process the target proposed candidate box, associates the proposed candidate box feature map to a specific ROI and crops it into a fixed-size feature vector, such as Figure 4 As shown, the specific steps are as follows:

[0104] (1) Traverse each candidate region and keep the floating point boundaries unquantized;

[0105] (2) Divide the candidate region into k*k units, and do not quantize the boundaries of each unit;

[0106] (3) Calculate four fixed coordinate positions in each unit, and use the bilinear interpolation method to calculate the interpolation values ​​of these four positions. The bilinear interpolation equation is:

[0107] (4) Performing maximum pooling operation;

[0108] (5) Output a feature vector of fixed size without losing important boundary features.

[0109] The feature vectors output by ROI Align described in S2.5 are fed into two heads, one of which is a classification and bounding box regression head;

[0110] The classification branch predicts the object category of each region proposed by RPN through a fully connected layer to distinguish different types of objects in the image;

[0111] The bounding box regression branch is used to adjust the coordinates of each RPN proposed region, refining its size and position to more accurately surround the object;

[0112] Another mask prediction head in ROI Align described in S2.6 uses a small fully convolutional network (FCN) for each ROI region, which generates a binary mask that outlines the exact shape of the object;

[0113] like Figure 5 As shown in the figure, the Sobel operator is used to fuse the image edge information into the network model, which is reflected in the introduction of a small edge detection network after the output mask branch. The network input is the predicted mask and the real mask. The two are convolved with the Sobel operator to determine the edge difference between the predicted mask and the real mask, and then the error of the edge consistency is calculated by the Huber loss function. The specific steps are as follows:

[0114] Integrate edge detection into the network as a branch and add the edge loss function L to the loss function edge , then the improved Mask R-CNN loss function is: L = L cls +L box +L mask +L edge ;

[0115] L cls , that is, classification loss, is used to evaluate the accuracy of category prediction in target detection. The cross entropy loss function is used to calculate the difference between the actual category label and the predicted category. The calculation formula is:

[0116]

[0117] Among them, N is the total number of samples, y i is the true category label of the i-th sample, p i is the predicted probability of the ith sample.

[0118] L box, that is, the bounding box regression loss, is used to evaluate the difference between the predicted bounding box and the true bounding box. The smooth L1 loss is used to calculate the difference between the predicted bounding box and the true bounding box. The calculation formula is:

[0119]

[0120] Among them, t i Represents the parameters of the predicted bounding box (center coordinates x, y, and width and height w, h), represents the parameters of the true bounding box. The smooth L1 loss is defined as:

[0121]

[0122] L mask , namely mask loss, is used to evaluate the accuracy of mask prediction in instance segmentation. The binary cross entropy loss of each pixel is used to calculate the difference between the true mask and the predicted mask of each pixel. The calculation formula is:

[0123]

[0124] Where m is the resolution of the mask, y i is the true mask label of the ith pixel, p i is the predicted probability of the ith pixel.

[0125] Integrate edge loss into Mask R-CNN and introduce edge loss function L edge It is used to evaluate the difference between the edge information of the instance segmentation mask and the ground truth edge information. Huber Loss is used as the calculation formula of the edge detection loss function, that is:

[0126]

[0127] The Sobel operator for edge detection is a network with a 3*3*2 convolution kernel, which contains two filters:

[0128]

[0129] Among them, S x is a lateral filter describing the horizontal gradient, S y It is a longitudinal filter that describes the vertical gradient. Generally speaking, the edges in the image will produce a higher response along the filtering direction, which is reflected in the enhancement of the edges of the target object in the output image.

[0130] Specifically, the step S3 uses the MS COCO weights and SEM image datasets to perform transfer learning training on the improved Mask R-CNN model to obtain a material microstructure instance segmentation model, including:

[0131] For example, the hardware environment for experimental training is NVIDIA GeForce RTX 4060, the processor is Intel i5-13400F, and the memory is 16G; the software environment for model training is Python 3.18.8, using Tensorflow2.4.0 as the backend. The model training optimizer (Optimizer) is set to Adam, the learning rate (Learning rate strategy) adjustment strategy is Step, the initial learning rate is set to 0.001, Steps_Per_Epoch is set to 5, the batch size (Batch size) is set to 2, and the training stage (Epoch) is set to 300. The specific process of model training based on the training set can refer to the conventional model training process.

[0132] Specifically, the step S4 uses the trained instance segmentation model to identify and segment the SEM image to be analyzed, and obtains the segmentation mask and calibration rectangle of each microstructure in the image. The specific steps are:

[0133] Save the weights of the 300th epoch obtained from the training, set the model mode to inference mode in the jupyter notebook, write the address of the image to be detected into the program, and the improved Mask R-CNN model performs microstructure segmentation on all SEM images to be analyzed in the address, such as Figure 6 As shown, the segmentation mask and calibration rectangle of each microstructure of the high-temperature alloy material in the SEM image are obtained, and a unique ID is assigned to each object.

[0134] Corresponding to the above-mentioned embodiment of the high-temperature alloy microstructure segmentation method based on deep learning, the present invention also provides an embodiment of a high-temperature alloy material microstructure segmentation device based on an improved Mask R-CNN model. Figure 7 An embodiment of the present invention provides a high-temperature alloy material microstructure segmentation device based on an improved Mask R-CNN model, comprising a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, it is used to implement the high-temperature alloy microstructure segmentation method based on deep learning in the above embodiment.

[0135] An embodiment of a high-temperature alloy material microstructure segmentation device based on an improved Mask R-CNN model provided by the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the internal memory for execution. From a hardware perspective, if Figure 7 As shown, it is a hardware structure diagram of any device with data processing capability where a high-temperature alloy material microstructure segmentation device based on the improved Mask R-CNN model provided by the present invention is located, except Figure 7 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0136] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0137] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0138] An embodiment of the present invention also provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the high-temperature alloy microstructure segmentation method based on deep learning in the above embodiment is implemented.

[0139] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0140] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the high-temperature alloy material microstructure segmentation method based on the improved Mask R-CNN model.

[0141] It should be noted that in the claims and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0142] While the present invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims

1. A high-temperature alloy microstructure segmentation method based on deep learning, characterized in that: The following steps are involved: S1, collects microstructure images of high-temperature alloy materials in scanning electron microscope, labels and annotates the microstructure in SEM images, and constructs a data set through image preprocessing and image enhancement; S2, constructing an improved Mask R-CNN model, wherein the improved Mask R-CNN model uses adaptive histogram equalization to expand the dynamic range of image grayscale levels, enhance local contrast, uses the Sobel operator to fuse image edge information into the network model, and introduces the Huber loss function to improve model performance; S3, using the constructed dataset to perform transfer learning training on the improved Mask R-CNN model to obtain a material microstructure instance segmentation model; S4, using the trained material microstructure instance segmentation model, the SEM image to be analyzed is identified and segmented to obtain the segmentation mask and calibration rectangle of each microstructure in the image.

2. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 1 is characterized in that: The step S1, collecting microstructure images of high-temperature alloy materials in a scanning electron microscope, marking and annotating the microstructures in the SEM images, and constructing a data set through image preprocessing and image enhancement, specifically includes: S1.

1. Collect microscopic images of the superalloy microstructure in a scanning electron microscope; S1.

1. Use VGG image annotator to define regions in the image and add text descriptions of the regions. The data format is converted into JSON format and the data set is divided. S1.

1. Enhance the image data by using contrast enhancement, image sharpening, rotation and deformation methods.

3. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 1 is characterized in that: The step S2, constructing an improved Mask R-CNN model, specifically includes: S2.1, Scanning electron microscope images of high-temperature alloy microstructures expand the grayscale dynamic range of images and enhance local contrast through adaptive histogram equalization; S2.2, input the scanning electron microscope image after adaptive histogram equalization into the 101-layer residual neural network ResNet101 and the shared convolutional layer of the feature pyramid network to extract the feature map of the material microstructure in the image; S2.3, use the region proposal network RPN to generate target proposal candidate boxes of different positions and sizes on the feature map; S2.4, using the ROI Align method to process the target proposed candidate box, associate the proposed candidate box feature map to a specific ROI and crop it into a feature vector of a fixed size; S2.5, the feature vector output by the ROI Align enters two heads respectively, namely the classification and bounding box regression head and the mask prediction head; The classification branch in the classification and bounding box regression head predicts the object category of each region proposed by the RPN through a fully connected layer to distinguish different types of objects in the image; The bounding box regression branch in the classification and bounding box regression head is used to adjust the coordinates of each RPN proposed region, refine its size and position to more accurately surround the object; The mask prediction head uses a small fully convolutional network for each ROI region, which generates a binary mask that outlines the exact shape of the object; S2.6, the Sobel operator is used to fuse the image edge information into the network model, which is reflected in the introduction of a small edge detection network after the output mask branch. The network input is the predicted mask and the Ground truth real mask. The two are convolved with the Sobel operator to determine the edge difference between the predicted mask and the real mask, and then the edge consistency error is calculated through the Huber loss function.

4. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 3 is characterized in that: The improved Mask R-CNN model is constructed, and the high-temperature alloy microstructure scanning electron microscope image expands the image grayscale dynamic range through adaptive histogram equalization to enhance the local contrast, specifically including: S2.1.1, input scanning electron microscope image; S2.1.2, dividing the image into several sub-regions; S2.1.3, calculate the histogram of each area and preset the maximum pixel frequency threshold; S2.1.4, allocating the excess pixels of the histogram that exceed the frequency threshold range to the remaining bins; S2.1.

5. Scale and map the redistributed histogram using the cumulative distribution function; S2.1.6, stitch the generated sub-regions together using bilinear interpolation; S2.1.

7. Output enhanced scanning electron microscope images.

5. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 3 is characterized in that: The use of the region proposal network RPN to generate target proposal candidate boxes of different positions and sizes on the feature map specifically includes: S2.2.1, input the 101-layer residual neural network ResNet101 and the shared convolutional layer in the feature pyramid network to obtain the feature map of the material microstructure; S2.2.

2. Generate anchor points for element points on the feature map, and use the anchor points as the center points to generate anchor boxes of different sizes and shapes in a sliding window manner. The anchor boxes are controlled by two parameters: the pixel size of the longest side of the box and the aspect ratio; S2.2.

3. Generate 9 anchor boxes of different sizes and proportions at each anchor point in the feature map; S2.2.

4. Use the RPN network to obtain the possibility of the predicted anchor point being the background or foreground, and refine the anchor point.

6. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 3 is characterized in that: The target proposal candidate box is processed using the ROI Align method, and the proposal candidate box feature map is associated with a specific ROI and cropped into a feature vector of a fixed size, specifically including: S2.3.1, traverse each candidate region and keep the floating point number boundaries without quantization; S2.3.2, divide the candidate region into k*k units, and the boundary of each unit is not quantized; S2.3.

3. Calculate four fixed coordinate positions in each unit, use bilinear interpolation to calculate the interpolation values ​​of these four positions, and then perform maximum pooling operation; S2.3.

4. Output a fixed-size feature map that retains the edge feature information of the image.

7. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 3 is characterized in that: The method of using the Sobel operator to fuse image edge information into the network model specifically includes: the Sobel operator used for edge detection is a network with a 3*3*2 convolution kernel, including a transverse filter describing the horizontal gradient, and a longitudinal filter describing the vertical gradient.

8. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 1, characterized in that: The error of edge consistency calculated by Huber loss function specifically includes: Integrate edge detection into the network as a branch and add the edge loss function L to the loss function edge , then the improved Mask R-CNN loss function is: L = L cls +L box +L mask +L edge ; where L cls For classification loss, the cross entropy loss function is used, and the calculation formula is: Among them, N is the total number of samples, y i is the true category label of the i-th sample, p i is the predicted probability of the i-th sample; L box The bounding box regression loss uses a smooth L1 loss and is calculated as: Among them, t i Represents the parameters of the predicted bounding box, including the center coordinates x, y, width w and height h, represents the parameters of the true bounding box, and the smooth L1 loss is defined as: L mask For mask loss, a binary cross entropy loss for each pixel is used to calculate the difference between the true mask and the predicted mask for each pixel. The calculation formula is: Where m is the resolution of the mask, y i is the true mask label of the ith pixel, p i is the predicted probability of the i-th pixel; Margin loss function L edge It is used to evaluate the difference between the edge information of the instance segmentation mask and the ground truth edge information. Huber Loss is used as the calculation formula of the edge detection loss function, that is:

9. The high-temperature alloy microstructure segmentation method based on deep learning according to claim 1, characterized in that: The step S3 includes using the MS COCO weights and SEM image data sets to perform transfer learning training on the improved Mask R-CNN model to obtain a material microstructure instance segmentation model. During the training process, the training optimizer of the model is set to Adam, and the learning rate adjustment strategy is Step.

10. A high-temperature alloy microstructure segmentation device based on deep learning, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, the high-temperature alloy microstructure segmentation method based on deep learning as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • SEM image molecular sieve particle size statistical method and system based on Mask RCNN instance segmentation

    CN112651989A

  • High-temperature alloy microstructure image segmentation method and device based on deep learning

    CN114119627A

  • Mask R-CNN-based malaria blood smear cell detection and segmentation method

    CN115049613A

  • Molecular sieve particle size statistical method and system and storage medium

    CN117152744A

  • Steel surface defect segmentation method based on improved Mask R-CNN

    CN117726636A

Cited By

  • Nanometer film material in-situ microscopic image characterization method based on deep learning

    CN119399170A

  • Remote sensing visual system based on supervised training

    CN119762835A

  • Method and device for detecting number of layers of two-dimensional material under microscope based on deep learning

    CN119887783A

  • Pig segmentation method based on multi-modal information

    CN120635479A

  • High-temperature alloy microstructure segmentation method based on efficient fine tuning of parameters

    CN121437526A