Zirconium alloy high temperature oxidation microstructure image recognition method, system and storage medium
By combining image processing technology with deep learning models, identifying and calculating the α-phase, β-phase and oxide film regions of zirconium alloys, the problem of time-consuming identification process and inaccurate results in the prior art is solved, and more efficient and accurate identification results are achieved, providing reliable data support for safety evaluation.
Patent Information
- Application Number
- CN202111519661.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-12-13
AI Technical Summary
The existing high-temperature oxidation microstructure image recognition process of zirconium alloys is time-consuming and the output results are inaccurate, which affects research and safety evaluation.
Using a method combining image processing technology and deep learning model, the α-phase, β-phase and oxide film regions of zircon alloy are identified and calculated through grayscale processing, non-local mean denoising, adaptive threshold segmentation, morphological modeling, connecting domain analysis denoising, watershed algorithm segmentation and deep learning model prediction operations.
It improves the accuracy and efficiency of picture recognition, and the output results are more accurate, which can provide accurate guidance for the zirconium alloy fuel element cladding design and reactor safety evaluation.
Smart Images

Figure CN114140791B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition and computing, and in particular to a method, system and storage medium for recognizing images of zirconium alloy high-temperature oxidation microstructures. Background Art
[0002] Nuclear energy is a clean and efficient energy source. Developing nuclear energy is my country's current unwavering energy development strategy. Nuclear fuel elements are the core components of the nuclear reactor's barrier and have an extremely important impact on the safety and reliability of the reactor. The cladding is the first line of safety for the nuclear reactor. Zirconium alloy is the only fuel element cladding material currently used in water-cooled nuclear reactors due to its low thermal neutron absorption cross section, good corrosion resistance and moderate mechanical properties. The study of the oxidation law of zirconium alloy and the influence of high-temperature oxidation on the performance of zirconium alloy materials can provide guidance and reference for the design of zirconium alloy as fuel element cladding and the safety evaluation of reactors under hypothetical LCOA.
[0003] In the process of studying the oxidation law of zirconium alloys and the influence of high-temperature oxidation on the performance of zirconium alloy materials, researchers need to accurately analyze the proportion of α phase and β phase in the oxidized structure of zirconium alloys under different oxidation atmospheres, oxidation temperatures, and oxidation times, and complete the measurement of the thickness of the oxide film. The existing operation method is: after the researcher prepares the sample, the surface of the sample to be analyzed is placed on the stage where the microscope objective is placed, and the metallographic photos to be analyzed are collected and maintained; then the metallographic pictures to be analyzed are compared one by one with the pictures in the dedicated database for identification, and the area and proportion of the α phase and β phase are calculated, and then the pictures marked with each phase and the calculation results are output for the researcher to analyze. This process is not only time-consuming, but also causes image recognition errors due to human factors, which leads to poor consistency between the output pictures and the actual pictures, and the calculation results are also inaccurate. Summary of the invention
[0004] The technical problem to be solved by the present invention is that the existing image recognition process of zirconium alloy high temperature oxidation microstructure is time-consuming and the output result is inaccurate, which affects the research of researchers and cannot provide accurate guidance and reference for the design of zirconium alloy as fuel element cladding and the safety evaluation of reactor under hypothetical LCOA. The purpose is to provide a method, system and storage medium for image recognition of zirconium alloy high temperature oxidation microstructure to solve the above problems.
[0005] The present invention is achieved through the following technical solutions:
[0006] The first object of the present invention is to provide a method for identifying a high temperature oxidation microstructure of a zirconium alloy, comprising:
[0007] S101: Acquire a metallographic image to be identified;
[0008] S102: performing grayscale processing, non-local mean denoising, and adaptive threshold segmentation on the obtained metallographic image in sequence to obtain a binary image;
[0009] S103: performing morphological modeling and connected domain analysis denoising on the binary image;
[0010] S104: Segment the image de-noised by connected domain analysis into α phase, β phase, and oxide film regions by using a watershed algorithm;
[0011] S105: Find the closed contour of the binary image obtained after segmentation, distinguish each closed contour into α phase, β phase, oxide film area, and scale by color, form an output image, and calculate the area of each α phase and β phase and the area ratio of the α phase and β phase;
[0012] S201: amplifying the metallographic image to be identified and inputting it into a deep learning model that has been trained in metallographic image identification in advance for prediction operation, obtaining a predicted metallographic image, identifying the oxide film area of the predicted metallographic image, and calculating the oxide film thickness;
[0013] S202: Corresponding the obtained predicted metallographic image to the output image in S105;
[0014] S301: Outputting an image, the area values and area ratios of the α phase and the β phase, and the thickness of the oxide film.
[0015] Optionally, the deep learning model adopts a convolutional neural network model with a CNN architecture.
[0016] Optionally, the method for identifying and predicting the oxide film area of the metallographic image in S201 is:
[0017] Define the convolutional neural network parameters θ = {θ1, θ2, θ3…θ n};
[0018] During the recognition training process, the convolutional neural network parameters are updated using the following iterative formula:
[0019]
[0020] where θ j represents θ j : iteration, represents the first-order derivative, L B Represents the segmentation loss function, the segmentation loss function L B Used to predict the degree of overlap between the metallographic boundary of the metallographic image segmentation to be identified and the metallographic boundary of the metallographic image segmentation for identification training input into the deep learning model;
[0021] Then, the last layer of the trained convolutional neural network is subjected to Softmax probability prediction, and the classification of each pixel point of the predicted metallographic image is predicted. The area with the largest Softmax probability prediction value is the oxide film area.
[0022]
[0023] where x i It represents the value of each pixel point x in the predicted metallographic image belonging to class i. The sum of the Softmax probability prediction values of all pixel point classifications in each predicted metallographic image is 1.
[0024] Optionally, the segmented metallographic boundaries include segmented α phase, β phase, and oxide film region boundaries;
[0025] The segmentation loss function L B The calculation process is:
[0026] Defining the accuracy of metallographic boundary segmentation
[0027] Recall
[0028] in B(x) = x - minpool(x);
[0029] Represents the true label of the metallographic image, y pr Represents the predicted value of the metallographic image obtained by segmentation, minpool represents minimum pooling, Represents the true boundaries of each phase in the metallographic image, represents the predicted boundary of each phase in the metallographic image, and sum represents the matrix sum of the operation;
[0030] Calculate the harmonic mean score of the segmentation boundary based on the precision P and recall R Get the boundary loss function of the metallographic image The boundary loss function With the cross entropy function L C Perform addition operation to obtain the segmentation loss function L B ,in:
[0031] Harmonic mean score
[0032] Marginal loss function
[0033] Segmentation loss function ω b ,ω C Represent the boundary loss function respectively and the cross entropy function L C Hyperparameters of .
[0034] Optionally, the ω b is 0.5, the ω C is 1.0.
[0035] Optionally, the calculation method for calculating the oxide film thickness in S201 is:
[0036] The pixels in the identified oxide film area are extracted, and the oxide film pixel set is defined as {(x1,y1),(x2,y2),…(x n ,y n )}, use n lines to intersect with the pixel set, calculate the sum of the number of pixels intersecting with each line, N, the thickness of the oxide film
[0037] Among them, the oxide film pixel set (x n ,y n ) represents the coordinates of each pixel in the predicted metallographic image, each line is parallel to the spatial coordinate axis X, and the coordinate equation set of each line is {x = x 1 , x=x 2 , ... x = x n}.
[0038] Optionally, the deep learning process includes:
[0039] The amplified metallographic images are input into the resnet101 network pre-trained on the ImageNet dataset of the deep learning model to extract the feature vector of each metallographic image;
[0040] The feature vectors of each metallographic image are input into the feature attention module FPA to obtain the feature information of metallographic images of different sizes, and these feature information are fused with the original feature vector processed by convolution, which is recorded as vector A1;
[0041] The feature vectors of the three different stages on the resnet101 network are processed by the global attention upsampling module GAU to obtain B1, B2, and B3 vectors;
[0042] The vectors B1, B2, and B3 are multiplied and then added with the vector A1, and then up-sampled to obtain the predicted metallographic image.
[0043] Optionally, in S105, counting the pixels in each closed contour found;
[0044] Calculate the coaxiality of each closed contour, mark the closed contour with coaxiality less than the set threshold as α phase, and mark the closed contour with coaxiality greater than or equal to the set threshold as β phase, add the number of pixels of each closed contour belonging to the α phase or β phase, and get the area of the α phase or β phase, and mark the closed contours of each α phase or β phase with different colors;
[0045] The second object of the present invention is to provide a zirconium alloy high temperature oxidation microstructure image recognition system, comprising:
[0046] An image acquisition module is used to acquire metallographic images to be identified;
[0047] An image processing module is communicatively connected to the image acquisition module, and is used to perform grayscale processing, non-local mean denoising, and adaptive threshold segmentation on the metallographic image to be identified to obtain a binary image, and at the same time, perform denoising processing on the binary image through morphological modeling and connected domain analysis denoising, and perform phase segmentation on the denoised binary image using a watershed algorithm, and perform color annotation on the closed contours of the segmented binary image to form an output image, and count the pixels in each closed contour to obtain the area of the α phase or β phase, and the area ratio of the α phase and the β phase;
[0048] An image amplification module, communicatively connected to the image acquisition module, and used to amplify the acquired metallographic image to be identified;
[0049] Deep learning module: communicatively connected to the image amplification module and the image processing module, used to input the obtained amplified image into the deep learning model that has completed the metallographic image recognition training for prediction operation, obtain the predicted metallographic image, and identify the oxide film area in the predicted metallographic image, calculate the oxide film thickness, and correspond the obtained predicted metallographic image to the output image obtained by the image processing module;
[0050] The image output module is communicatively connected to the image processing module and the deep learning module, and is used to output the image and the area value of each phase, the area ratio value, and the oxide film thickness.
[0051] The third object of the present invention is to provide a computer-readable storage medium, on which are stored program instructions for identifying high-temperature oxidation microstructure images of zirconium alloys, and the program instructions can be executed by one or more processors to implement the steps of the above-mentioned method for identifying high-temperature oxidation microstructure images of zirconium alloys.
[0052] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0053] (1) The present invention provides a method and system for identifying zirconium alloy high temperature oxidation microstructure images and a computer readable storage medium, which combines image processing technology with a deep learning model. The image processing technology and deep learning technology are used in parallel, which can improve the accuracy of image recognition, make the output results more accurate, and have good reproducibility, and provide accurate guidance and reference for the design of zirconium alloy as fuel element cladding and the safety evaluation of reactors under hypothetical LCOA. And by inputting the zirconium alloy high temperature oxidation microstructure image into the zirconium alloy high temperature oxidation microstructure image recognition system, the output image result can be obtained quickly and rapidly; at the same time, after pre-training for metallographic image recognition, each phase can be quickly distinguished and the area and area proportion of each phase can be calculated, which greatly reduces the workload of researchers and shortens working time.
[0054] (2) The present invention provides a method for identifying high-temperature oxidation microstructure images of zirconium alloys, which introduces a segmentation loss function L in the deep learning process. B , the degree of overlap between the metallographic boundary of the metallographic image to be identified and the metallographic boundary of the metallographic image segmented by the identification training can be predicted in the deep learning model, and the consistency between the predicted metallographic image and the output result can be predicted, so as to solve the "over-segmentation" phenomenon in the traditional watershed segmentation, improve the image segmentation accuracy, and make the output predicted metallographic image more accurate. And by iteratively updating the convolutional neural network parameters, the identified oxide film area and the calculated film thickness results are also more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0056] Figure 1 A schematic flow chart of a method for identifying a high temperature oxidation microstructure image of a zirconium alloy provided in an embodiment of the present invention;
[0057] Figure 2 An operation flow chart of a method for identifying a high temperature oxidation microstructure image of a zirconium alloy provided by an embodiment of the present invention;
[0058] Figure 3 A schematic diagram of the structure of a zirconium alloy high temperature oxidation microstructure image recognition system provided by an embodiment of the present invention;
[0059] Figure 4 A diagram of an input recognition system according to Embodiment 1 of the present invention;
[0060] Figure 5 The result graph of the image input into the recognition system in Embodiment 1 of the present invention and output after the system recognizes the image;
[0061] Figure 6 A diagram of an input recognition system according to Embodiment 2 of the present invention;
[0062] Figure 7 The result graph of the image input into the recognition system in Embodiment 2 of the present invention and output after the system recognizes the image;
[0063] Figure 8 A diagram of an input recognition system according to Embodiment 3 of the present invention;
[0064] Fig. 9 This is a result graph of the image input into the recognition system in Example 3 of the present invention and output after the system recognizes it. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. The illustrative embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0066] In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the present invention. However, it is apparent to one of ordinary skill in the art that these specific details are not necessarily employed to practice the present invention. In other embodiments, in order to avoid obscuring the present invention, well-known structures, circuits, materials, or methods are not specifically described.
[0067] Throughout the specification, references to "one embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in conjunction with the embodiment or example is included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment," "an embodiment," "an example," or "an example" appearing in various places throughout the specification do not necessarily all refer to the same embodiment or example. In addition, particular features, structures, or characteristics may be combined in one or more embodiments or examples in any suitable combination and / or sub-combination. In addition, it will be appreciated by those of ordinary skill in the art that the figures provided herein are for illustrative purposes and that the figures are not necessarily drawn to scale. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0068] In the description of the present invention, the directions or positional relationships indicated by terms such as “front”, “rear”, “left”, “right”, “up”, “down”, “vertical”, “horizontal”, “high”, “low”, “inside” and “outside” are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the scope of protection of the present invention.
[0069] Example
[0070] A method for identifying a high temperature oxidation microstructure image of a zirconium alloy, comprising:
[0071] S101: Acquire a metallographic image to be identified;
[0072] S102: performing grayscale processing, non-local mean denoising, and adaptive threshold segmentation on the obtained metallographic image in sequence to obtain a binary image;
[0073] S103: performing morphological modeling and connected domain analysis denoising on the binary image;
[0074] S104: Segment the image de-noised by connected domain analysis into α phase, β phase, and oxide film regions by using a watershed algorithm;
[0075] S105: Find the closed contour of the binary image obtained after segmentation, distinguish each closed contour into α phase, β phase, oxide film area, and scale by color, form an output image, and calculate the area of each α phase and β phase and the area ratio of the α phase and β phase;
[0076] S201: amplifying the metallographic image to be identified and inputting it into a deep learning model that has been trained in metallographic image identification in advance for prediction operation, obtaining a predicted metallographic image, identifying the oxide film area of the predicted metallographic image, and calculating the oxide film thickness;
[0077] S202: Corresponding the obtained predicted metallographic image to the output image in S105;
[0078] S301: Outputting an image, the area values and area ratios of the α phase and the β phase, and the thickness of the oxide film.
[0079] Specifically,
[0080] S101: Obtaining a metallographic image to be identified: preparing a sample, placing the surface of the sample to be analyzed facing the microscope objective on a stage, and collecting and saving M clear metallographic photos of the surface of the sample to be analyzed;
[0081] S 102:
[0082] (1) Grayscale processing: The M metallographic images to be identified are grayscaled according to the following formula (1).
[0083] Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j)
[0084] Among them, Gray represents the grayscale image, (i, j) represents the coordinates of each metallographic image, Gray(i, j) represents the grayscale value of the metallographic image with coordinates (i, j); R(i, j) represents the red channel of the metallographic image, G(i, j) represents the green channel of the metallographic image, and B(i, j) represents the blue channel of the metallographic image.
[0085] (2) Non-local mean denoising: The non-local mean denoising method can be used to maintain the detailed features of the metallographic image to the greatest extent while denoising.
[0086] Specifically, non-local mean denoising is performed using the following formula (II):
[0087]
[0088] Wherein, NL represents the metallographic image after denoising, v(j) represents the pixel point in the search window, and w(i, j) represents the weight, which is determined by the Gaussian distance between two points. Specifically, the existing technology in the field can be used, which will not be described in detail here.
[0089] (3) Adaptive threshold segmentation: Adaptive threshold segmentation is performed on the metallographic image after non-local mean denoising to obtain a binary image. Specifically, the adaptive threshold segmentation method can adopt the existing technology in the field, which will not be described in detail here.
[0090] S103:
[0091] (1) Morphological modeling: The binary image is processed through morphological opening, closing, dilation, and erosion operations to remove small holes and adhesion.
[0092] (2) Connected domain analysis denoising: After morphological modeling, connected analysis denoising is used. After connected domain analysis, the area of each noise point contour is calculated, and noise points with an area less than 50px are removed. The specific process can be carried out using existing technologies and will not be described in detail here.
[0093] S104: Segment the denoised image into α phase, β phase and oxide film regions by using a watershed algorithm to obtain segmentation results of the α phase, β phase and oxide film regions. The watershed algorithm belongs to the prior art and will not be described in detail here.
[0094] S105: Find the closed contours of the binary image obtained after segmentation, distinguish each closed contour into α phase, β phase, oxide film area, and scale by color, form an output image, and calculate the area of each α phase and β phase and the area ratio of the α phase and β phase.
[0095] Specifically:
[0096] Find the closed contour of the binary image obtained after segmentation, count the pixels in each closed contour found; calculate the coaxiality of each closed contour. In order to calculate the coaxiality Z of each closed contour, find the minimum circumscribed rectangle of each closed contour, obtain the width W and height H of the rectangle, then
[0097] The coaxiality is compared with the set threshold th, and the closed contours with coaxiality less than the set threshold th are marked as α phase, and the closed contours with coaxiality greater than or equal to the set threshold th are marked as β phase. The number of pixels of each closed contour belonging to the α phase is added to obtain the area of the α phase, which is recorded as S α ; Add the number of pixels of each closed contour belonging to the β phase to get the area of the β phase, S β . And according to the area of α and β phases, calculate the proportion of each phase α / (α+β)=S β / (S α +S β ), β / (α+β)=S α / (S α +S β ).
[0098] At the same time, all closed contours belonging to the α phase are color-marked and filled with Color3, and all closed contours belonging to the β phase are color-marked and filled with Color4. The specific selection of Color3 and Color4 can be selected according to needs.
[0099] For the oxide film and scale bar area, use the same method to fill in the color.
[0100] The image after color distinction marking is the output image.
[0101] S201: amplifying the metallographic image to be identified and inputting it into a deep learning model that has been pre-trained for metallographic image recognition to perform a prediction operation, thereby obtaining a predicted metallographic image, identifying the oxide film area of the predicted metallographic image, and calculating the oxide film thickness.
[0102] (1) Image amplification: The collected metallographic photos to be identified (including oxide film, α phase, β phase) are enlarged to M×N images through mirroring, rotation, scaling, random cropping, translation transformation, and Gaussian noise perturbation, and the resolution of these M×N images can be unified to a resolution of 1024*1024.
[0103] (2) Deep Learning:
[0104] (a) Obtain predicted metallographic images, including:
[0105] The amplified M×N images are input into the resnet101 network pre-trained on the ImageNet dataset of the deep learning model to extract the feature vector of each metallographic image; the deep learning model can adopt a convolutional neural network model of the CNN architecture;
[0106] The feature vectors of each metallographic image extracted are input into the feature attention module FPA (Feature Pyramid Attention module) of a three-layer pyramid structure (taking 3×33×3, 5×55×5, and 7×77×7 convolution as pyramid structures as examples) to obtain the feature information of metallographic images of different sizes, and these feature information are fused with the original feature vector after 1×1 convolution processing, which is recorded as vector A1;
[0107] The feature vectors of the three different stages on the boock on the resnet101 network are processed by the global attention upsampling module GAU (Global Attention Upsample) to obtain B1, B2, and B3 vectors;
[0108] The vectors B1, B2, and B3 are multiplied and then added with the vector A1, and then up-sampled to obtain the predicted metallographic image.
[0109] (b) Identify the oxide film area of the predicted metallographic image:
[0110] Define the convolutional neural network parameters θ = {θ1, θ2, θ3…θ n};
[0111] During the recognition training process, the following iterative formula is used to update the above convolutional neural network parameters in real time:
[0112]
[0113] where θ j represents θ j : iteration, represents the first-order derivative, L B represents the segmentation loss function;
[0114] The iterative and trained convolutional neural network parameters are used for the Softmax probability prediction of the last layer of the convolutional neural network. This probability prediction is the classification of each pixel in the predicted metallographic image. The Softmax probability prediction value is less than 1. The specific formula is:
[0115]
[0116] where x i The value of each pixel point x in the predicted metallographic image belonging to class i (the value of the last layer of the convolutional neural network) represents the predicted metallographic image. The sum of the Softmax probability prediction values of all pixel points in each predicted metallographic image is 1, and the area with the largest Softmax probability prediction value is the oxide film area.
[0117] The biggest limitation of the traditional watershed algorithm is "over-segmentation". For example, a large grain is over-segmented into many small grains, and scratches will appear during the segmentation process. These scratches and corrosion pits in the image will also become connecting points of the segmentation lines, which will lead to reduced image segmentation accuracy.
[0118] In the process of identifying and training the metallographic images of zirconium alloys, the present invention introduces a segmentation loss function L B , which is used to predict the degree of overlap between the metallographic boundaries of the metallographic images to be identified and the metallographic boundaries of the metallographic images for identification training, where the segmented metallographic boundaries include α-phase boundaries, β-phase boundaries, and oxide film area boundaries; L B The smaller the value, the higher the overlap. B When it is small enough, it indicates that the metallographic image trained by the neural network input into the deep learning model can produce results that are more consistent with the correct recognition results, that is, the predicted metallographic image.
[0119] Segmentation loss function L B The specific calculation process is:
[0120] Define the precision of metallographic boundary segmentation process
[0121] Recall
[0122] in B(x) = x - minpool(x);
[0123] Represents the true label of the metallographic image, y pr represents the predicted value of the metallographic image obtained by segmentation, minpool represents minimum pooling, B(x) represents an operation, Represents the true boundaries of each phase in the metallographic image, represents the predicted boundary of each phase in the metallographic image, and sum represents the matrix sum of the operation;
[0124] Calculate the harmonic mean score of the segmentation boundary based on the precision P and recall R Get the boundary loss function of the metallographic image The boundary loss function With the cross entropy function L C Perform addition operation to obtain the segmentation loss function L B ,in:
[0125] Harmonic mean score
[0126] Marginal loss function
[0127] Segmentation loss function ω b ,ω C Represent the boundary loss function respectively and the cross entropy function L C In the embodiment of the present invention, ω b is 0.5, the ω C is 1.0.
[0128] Among them, the harmonic mean score
[0129] The maximum is 1 and the minimum is 0. When the predicted boundary and the true boundary completely coincide, the harmonic mean score is 1.
[0130] By introducing the segmentation loss function L B , the convolutional neural network parameters can be iteratively updated during the recognition training process, so as to predict the overlap between the input metallographic image and the predicted metallographic image, avoid over-segmentation, improve the image segmentation accuracy, and make the output predicted metallographic image more accurate, and the identified oxide film area and calculated film thickness results more accurate.
[0131] In the process of identifying oxide films, it should be pointed out that since there is no oxide film in some metallographic images, the oxide film cannot be identified in this case. At this time, the probability prediction value of Softmax corresponding to the oxide film is close to 0.
[0132] (c) Calculate and identify the oxide film thickness
[0133] All pixels in the identified oxide film area are extracted, and the oxide film pixel set is defined as {(x1,y1),(x2,y2),…(x n ,yn )}, use n lines to intersect with the pixel set, calculate the sum of the number of pixels intersecting with each line, N, the thickness of the oxide film
[0134] Among them, the oxide film pixel set (x n ,y n ) represents the coordinates of each pixel in the predicted metallographic image, each line is parallel to the spatial coordinate axis X, and the coordinate equation set of each line is {x = x 1 , x=x 2 , ... x = x n}.
[0135] Embodiment 1:
[0136] (1) Sample preparation and acquisition of images to be identified: The zirconium alloy plates were cut into 10 mm × 10 mm × 1.8 mm samples, and oxidized at 950 ° C and 3600 s in a water vapor oxidation atmosphere. Subsequently, the oxidized samples were numbered, mounted, and finely ground with 1000# SiC water sandpaper, and then etched with a 5% HF + 45% HNO3 + 50% H2O etching solution, rinsed with clean water, and dried for metallographic observation.
[0137] Place the surface of the sample to be analyzed on the stage facing the microscope objective lens, and collect and save clear metallographic photos of the surface of the sample to be analyzed.
[0138] (2) Image amplification;
[0139] (3) Deep Learning:
[0140] The amplified metallographic image to be identified is input into the deep learning model for prediction operation to obtain a predicted metallographic image;
[0141] Identify oxide film:
[0142] Define the convolutional neural network parameters θ = {θ1, θ2, θ3…θ n}, during the training process, the convolutional neural network parameters are updated through the iterative formula:
[0143] Then, the softmax probability prediction is performed on the last layer of the convolutional neural network according to the convolutional neural network parameters. The results show that the softmax probability prediction value is close to 0, indicating that there is no oxide film in the metallographic image.
[0144] The predicted metallographic image is matched to the output image obtained in step (4), the output image, the area value and area ratio of the α phase and the β phase, and the thickness of the oxide film.
[0145] (4) Identify the α-phase, β-phase, and scale
[0146] The color image has three channels, namely R (red), G (green), and B (blue), denoted as x[3][h][w].
[0147] a. First, perform grayscale processing on the input image according to formula (1) to obtain gray[h][w].
[0148] b. Denoise according to formula (2) to obtain NL[h][w].
[0149] c. Initially obtain a binary image e[h][w] through adaptive threshold segmentation.
[0150] d. Perform morphological modeling and denoising on the binary image e[h][w]. The area of each phase is the sum of the number of pixels, and the same applies hereinafter.
[0151] e. Use the watershed algorithm to segment the α-phase, β-phase, and oxide film regions on the denoised image to obtain the segmentation result.
[0152] f. Use the contours obtained in step e to find the closed contours among them, and distinguish each closed contour by color as the α-phase, β-phase, oxide film region, and scale to form the output image. Calculate the coaxiality Z for each closed contour. We find the minimum bounding rectangle of each closed contour, with width W and height H.
[0153]
[0154] Mark the closed contours with Z < threshold as the α-phase, and vice versa as the β-phase. Add up the number of their pixel points respectively, denoted as S α and S β . Where threshold is set to 2.
[0155] Calculate the area ratios occupied by the α-phase and β-phase respectively, and form the output image.
[0156] Among them, step (3) deep learning and step (4) identifying the α-phase, β-phase, and scale are carried out synchronously.
[0157] Figure 4 、 5 They are respectively the image input to the image recognition system in Example 1 and the image result output from the image recognition system.
[0158] Table 1 shows the results output in Example 1:
[0159] Table 1
[0160] Oxide film thickness α Area Beta Area α / (α+β) β / (α+β) 0 461912.0 109613.0 0.80820961462753 0.19179038537247
[0161] Example 2
[0162] (1) Sample preparation and acquisition of images to be identified:
[0163] The zirconium alloy plates were cut into 10mm×10mm×1.8mm samples, and oxidized in a water vapor oxidation atmosphere at an oxidation temperature of 1200℃ and a holding time of 60s. Subsequently, the oxidized samples were numbered, mounted, and finely ground with 1000# SiC water sandpaper, and then etched with 5% HF+45% HNO3+50% H2O etching solution, rinsed with clean water, and dried for metallographic observation.
[0164] Place the surface of the sample to be analyzed on the stage facing the microscope objective lens, and collect and save clear metallographic photos of the surface of the sample to be analyzed.
[0165] The remaining process is the same as in Example 1.
[0166] Figure 6 , Figure 7 They are respectively the picture input into the picture recognition system and the picture output from the picture recognition system in Example 2.
[0167] Table 2 is the output result of Example 2:
[0168] Table 2
[0169] Oxide film thickness α Area Beta Area α / (α+β) β / (α+β) 0 524624.0 109077.0 0.17212691789977 0.82787308210023
[0170] Example 3
[0171] (1) Sample preparation and acquisition of images to be identified:
[0172] The zirconium alloy plates were cut into 10mm×10mm×1.8mm samples, and oxidized at 1200℃ and 60s in a dry air oxidation atmosphere. Subsequently, the oxidized samples were numbered, mounted, finely ground with 1000# SiC water sandpaper, and then etched in 5% HF+45% HNO3+50% H2O etching solution, rinsed with clean water, and dried for metallographic observation.
[0173] Place the surface of the sample to be analyzed on the stage facing the microscope objective lens, and collect and save clear metallographic photos of the surface of the sample to be analyzed.
[0174] Then calculate the thickness of the oxide film:
[0175] All pixels in the identified oxide film area are extracted, and the oxide film pixel set is defined as {(x1,y1),(x2,y2),…(x n ,y n)}, use 10 lines to intersect with the pixel set, calculate the sum of the number of pixels intersecting with each line, N, the thickness of the oxide film
[0176] Among them, the oxide film pixel set (x n ,y n ) represents the coordinates of each pixel in the predicted metallographic image, each line is parallel to the spatial coordinate axis X, and the coordinate equation set of each line is {x = x 1 , x=x 2 , ... x = x 10}.
[0177] The remaining process is the same as in Example 1.
[0178] Figure 8 , Fig. 9 They are respectively the picture input into the picture recognition system and the picture output from the picture recognition system in Example 3.
[0179] Table 3 is the output result of Example 3:
[0180] Table 3
[0181] Oxide film thickness α Area Beta Area α / (α+β) β / (α+β) 74.8μm 255578.0 184769.5 0.5804007062604 0.4195992937396
[0182] Example 4
[0183] A zirconium alloy high temperature oxidation microstructure image recognition system, comprising:
[0184] An image acquisition module is used to acquire metallographic images to be identified;
[0185] The image processing module and the communication connection image acquisition module are used to perform grayscale processing, non-local mean denoising, and adaptive threshold segmentation on the metallographic image to be identified to obtain a binary image. At the same time, the binary image is denoised by morphological modeling and connected domain analysis denoising. The denoised binary image is segmented by a watershed algorithm. The closed contours of the segmented binary image are color-labeled to form an output image. The pixel points in each closed contour are counted to obtain the area of the α phase or β phase, and the area ratio of the α phase and the β phase.
[0186] An image amplification module, which is communicatively connected to the image acquisition module, and is used to amplify the acquired metallographic image to be identified;
[0187] Deep learning module: the communication connection is connected to the image amplification module and the image processing module, and is used to input the obtained amplified image into the deep learning model that has completed the metallographic image recognition training for prediction operation, obtain the predicted metallographic image, and identify the oxide film area in the predicted metallographic image, calculate the oxide film thickness, and correspond the obtained predicted metallographic image to the output image obtained by the image processing module;
[0188] The image output module communicates with the image processing module and the deep learning module and is used to output images as well as the area value of each phase, the area ratio value, and the oxide film thickness.
[0189] Example 5
[0190] This embodiment provides a computer-readable storage medium, on which program instructions for identifying high-temperature oxidation microstructure images of zirconium alloys are stored. The program instructions can be executed by one or more processors to implement the steps of the method for identifying high-temperature oxidation microstructure images of zirconium alloys as described in any one of Embodiments 1 to 3.
[0191] The methods, processes, devices, etc. not involved in the present invention are all known technologies and will not be described in detail here.
[0192] A person of ordinary skill in the art can understand that all or part of the steps in realizing the above-mentioned facts and methods can be completed by instructing the relevant hardware through a program, and the program involved or the program described can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: At this time, the corresponding method steps are derived, and the storage medium can be ROM / RAM, a disk, an optical disk, etc.
[0193] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for identifying a high temperature oxidation microstructure image of a zirconium alloy, characterized in that: include S101: Obtain a metallographic image to be identified; S102: performing grayscale processing, non-local mean denoising, and adaptive threshold segmentation on the obtained metallographic image in sequence to obtain a binary image; S103: performing morphological modeling and connected domain analysis denoising on the binary image; S104: Segment the image de-noised by connected domain analysis into α phase, β phase, and oxide film regions by using a watershed algorithm; S105: Find the closed contour of the binary image obtained after segmentation, distinguish each closed contour into α phase, β phase, oxide film area, and scale by color, form an output image, and calculate the area of each α phase and β phase and the area ratio of the α phase and β phase; S201: amplifying the metallographic image to be identified and inputting it into a deep learning model that has been trained in metallographic image identification in advance for prediction operation, obtaining a predicted metallographic image, identifying the oxide film area of the predicted metallographic image, and calculating the oxide film thickness; S202: Corresponding the obtained predicted metallographic image to the output image in S105; S301: outputting an image, area values and area ratios of the α phase and the β phase, and the thickness of the oxide film; The deep learning process includes: The amplified metallographic images are input into the resnet101 network pre-trained on the ImageNet dataset of the deep learning model to extract the feature vector of each metallographic image; The feature vectors of each metallographic image are input into the feature attention module FPA to obtain the feature information of metallographic images of different sizes, and these feature information are fused with the original feature vector processed by convolution, which is recorded as vector A1; The feature vectors of the three different stages on the resnet101 network are processed by the global attention upsampling module GAU to obtain B1, B2, and B3 vectors; The vectors B1, B2, and B3 are multiplied and then added with the vector A1, and then up-sampled to obtain a predicted metallographic image; in S105, the pixel points in each closed contour found are counted; Calculate the coaxiality of each closed contour, mark the closed contour with coaxiality less than the set threshold as α phase, mark the closed contour with coaxiality greater than or equal to the set threshold as β phase, add the number of pixels of each closed contour belonging to the α phase or β phase, and get the area of the α phase or β phase, and mark the closed contours of each α phase or β phase with different colors.
2. A method for identifying a zirconium alloy high temperature oxidation microstructure image according to claim 1, characterized in that: The deep learning model adopts a convolutional neural network model with a CNN architecture.
3. A method for identifying a zirconium alloy high temperature oxidation microstructure image according to claim 2, characterized in that: The method for identifying and predicting the oxide film area of the metallographic image in S201 is: Define the convolutional neural network parameters θ = {θ1, θ2, θ3…θ n }; During the recognition training process, the convolutional neural network parameters are updated using the following iterative formula: where θ j represents θ j : iteration, represents the first-order derivative, L B Represents the segmentation loss function, the segmentation loss function L B Used to predict the degree of overlap between the metallographic boundaries of the metallographic image segmentation to be identified and the metallographic boundaries of the metallographic image segmentation for identification training that is input into the deep learning model; Then, the last layer of the trained convolutional neural network is subjected to Softmax probability prediction, and the classification of each pixel point of the predicted metallographic image is predicted. The area with the largest Softmax probability prediction value is the oxide film area. where x i It represents the value of each pixel point x in the predicted metallographic image belonging to class i. The sum of the Softmax probability prediction values of all pixel point classifications in each predicted metallographic image is 1.
4. A method for identifying zirconium alloy high temperature oxidation microstructure images according to claim 3, characterized in that: The segmented metallographic boundaries include the segmented α phase, β phase, and oxide film region boundaries; The segmentation loss function L B The calculation process is: Defining the accuracy of metallographic boundary segmentation Recall in B(x) = x - minpool(x); Represents the true label of the metallographic image, y pr Represents the predicted value of the metallographic image obtained by segmentation, minpool represents minimum pooling, Represents the true boundaries of each phase in the metallographic image, represents the predicted boundary of each phase in the metallographic image, and sum represents the matrix sum of the operation; Calculate the harmonic mean score of the segmentation boundary based on the precision P and recall R The boundary loss function of the metallographic image is obtained The boundary loss function With the cross entropy function L C Perform addition operation to get the segmentation loss function L B ,in: Harmonic mean score Marginal loss function Segmentation loss function ω b ,ω C Represent the boundary loss function respectively and the cross entropy function L C Hyperparameters of .
5. A method for identifying zirconium alloy high temperature oxidation microstructure images according to claim 4, characterized in that: The ω b is 0.5, the ω C is 1.
0.
6. A method for identifying zirconium alloy high temperature oxidation microstructure images according to claim 3, characterized in that: The calculation method for calculating the oxide film thickness in S201 is: The pixels in the identified oxide film area are extracted, and the oxide film pixel set is defined as {(x1,y1),(x2,y2),…(x n ,y n )}, use n lines to intersect with the pixel set, calculate the sum of the number of pixels intersecting with each line, N, the thickness of the oxide film Among them, the oxide film pixel set (x n ,y n ) represents the coordinates of each pixel in the predicted metallographic image, each line is parallel to the spatial coordinate axis X, and the coordinate equation set of each line is {x = x 1 , x=x 2 , ... x = x n }.
7. A zirconium alloy high temperature oxidation microstructure image recognition system, characterized in that include: An image acquisition module is used to acquire metallographic images to be identified; An image processing module is communicatively connected to the image acquisition module, and is used to perform grayscale processing, non-local mean denoising, and adaptive threshold segmentation on the metallographic image to be identified to obtain a binary image, and at the same time, perform denoising processing on the binary image through morphological modeling and connected domain analysis denoising, and perform phase segmentation on the denoised binary image using a watershed algorithm, and perform color annotation on the closed contours of the segmented binary image to form an output image, and count the pixels in each closed contour to obtain the area of the α phase or β phase, and the area ratio of the α phase and the β phase; An image amplification module, communicatively connected to the image acquisition module, and used to amplify the acquired metallographic image to be identified; Deep learning module: communicatively connected to the image amplification module and the image processing module, used to input the obtained amplified image into the deep learning model that has completed the metallographic image recognition training for prediction operation, obtain the predicted metallographic image, and identify the oxide film area in the predicted metallographic image, calculate the oxide film thickness, and correspond the obtained predicted metallographic image to the output image obtained by the image processing module; An image output module, communicatively connected to the image processing module and the deep learning module, for outputting images and area values of each phase, area ratio values, and oxide film thickness; The process of the deep learning module performing deep learning includes: The amplified metallographic images are input into the resnet101 network pre-trained on the ImageNet dataset of the deep learning model to extract the feature vector of each metallographic image; The feature vectors of each metallographic image are input into the feature attention module FPA to obtain the feature information of metallographic images of different sizes, and these feature information are fused with the original feature vector processed by convolution, which is recorded as vector A1; The feature vectors of the three different stages on the resnet101 network are processed by the global attention upsampling module GAU to obtain B1, B2, and B3 vectors; The vectors B1, B2, and B3 are multiplied and then added with the vector A1, and then up-sampled to obtain the predicted metallographic image; The process of the image processing module performing metallographic image processing includes: Count the pixels within each closed contour found; Calculate the coaxiality of each closed contour, mark the closed contour with coaxiality less than the set threshold as α phase, mark the closed contour with coaxiality greater than or equal to the set threshold as β phase, add the number of pixels of each closed contour belonging to the α phase or β phase, and get the area of the α phase or β phase, and mark the closed contours of each α phase or β phase with different colors.
8. A computer-readable storage medium, characterized in that: The storage medium stores program instructions for identifying high-temperature oxidation microstructure images of zirconium alloys, and the program instructions can be executed by one or more processors to implement the steps of a method for identifying high-temperature oxidation microstructure images of zirconium alloys as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Workpiece metal surface character recognition method and system based on image segmentation
CN111160352A
Metal surface damage target detection and recognition method, device and equipment and storage medium
CN113538331A