Data enhancement method for synchronously generating microscopic structure image and label graph thereof
By constructing a generative adversarial network and a conditional generative adversarial network, microstructure images and their label maps are generated simultaneously, which solves the problems of high manual calibration cost and low efficiency in the establishment of microstructure data sets, expands the sample size of the data set, and improves The accuracy and universality of the deep learning model solves the problem of insufficient small sample size.
Patent Information
- Application Number
- CN202410902725.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology requires a large amount of manual calibration during the establishment of microstructure data sets, resulting in high cost and low efficiency. Moreover, a single generative adversarial network can only generate microstructure images but cannot generate corresponding label maps, resulting in deep learning models. The problem of insufficient small sample size is faced in microscopic tissue identification.
Using a data enhancement method that simultaneously generates microstructure images and their label maps, by constructing a generative adversarial network and a conditional generative adversarial network, a simulated label map and a simulated microstructure map are generated, and the generative adversarial network and the conditional generative adversarial network are combined to quickly generate A large number of realistic 'simulated organization chart-simulated label chart' image pairs to expand the sample size of the data set.
It effectively alleviates the small sample problem of deep learning technology in microstructure identification, improves model accuracy and universality, and provides support for widespread applications in the field of microstructure analysis.
Smart Images

Figure CN118735799A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of metal material microstructure identification, and in particular relates to a data enhancement method for synchronously generating a microstructure image and a label image thereof. Background Art
[0002] The chain relationship of "ingredients-process-microstructure-performance" has long guided material design. Microstructure, as a link, closely connects composition, process and performance. Therefore, accurate identification and quantification of microstructure are crucial for the development of high-performance materials. With the popularization and application of artificial intelligence technology, material research has gradually been integrated with the era of big data, and advanced artificial intelligence methods are widely used in the field of materials science. In addition to applying traditional machine learning to establish quantitative associations between "ingredients-process-performance", deep learning technology represented by machine vision has been widely used in the automatic identification and quantification of microstructures, and has achieved excellent results. For example, the invention patent with application number 202010816423.6 uses the classic U-Net model to establish a microstructure identification and quantification model for steel materials, and has been successfully applied to quenching and partitioning steel. The input of the model is a scanning electron microscope (SEM) image, and the output is a "phase diagram" of steel materials. Different phases are marked with different colors in the "phase diagram".
[0003] Although deep learning technology has performed well in the field of microstructure recognition, it is limited by the statistical analysis nature of deep learning models, which requires a large number of training data samples to obtain good model performance. However, in the process of constructing a microstructure dataset, it is necessary to first collect microstructure images through experimental characterization methods (optical microscope, scanning electron microscope, etc.), and then calibrate the various phases in the tissue image through manual experience to establish a label map. The process of establishing a microstructure dataset requires a lot of experimental costs, and the process of phase calibration based on manual experience is extremely time-consuming. These factors greatly reduce the efficiency of sample collection in the dataset, resulting in the bottleneck problem of insufficient sample size in microstructure recognition based on deep learning, which restricts the improvement of model performance. Therefore, it is necessary to perform data enhancement on microstructure images to achieve effective expansion of training data.
[0004] Generative adversarial networks have attracted much attention due to their powerful ability to generate high-quality simulated images and are widely used in the field of data enhancement. For example, the invention patent with application number 201911198833.2 uses generative adversarial networks to establish a defect image data enhancement method for the field of robot vision industrial products, and improves the defect detection effect of industrial products by expanding the sample size. Y. Han et al. from Shanghai University used generative adversarial networks to establish a microstructure generation model for various materials to expand the sample size of tissue images. However, the existing generative adversarial networks can only generate microstructure images, such as SEM images, through training, but cannot generate label images corresponding to SEM images, that is, they cannot generate "tissue image-label image" image pairs, and still cannot solve the small sample problem faced in the microstructure recognition task based on deep learning. Therefore, there is an urgent need for a data enhancement method that can simultaneously generate microstructure images and their label images to improve the performance of microstructure recognition and quantification models based on deep learning. Summary of the invention
[0005] In view of the deficiencies of the prior art, the present invention provides a data enhancement method for synchronously generating a microstructure image and a label map thereof.
[0006] The technical solution adopted by the present invention to solve the technical problem is:
[0007] A data enhancement method for synchronously generating a microstructure image and a label map thereof, characterized in that the method comprises the following contents:
[0008] Construct original dataset A, dataset B and dataset C; original dataset A contains several "real microstructure image-real label image" image pairs; dataset B contains several real label images, which are obtained by randomly transforming and cropping the real label images in the original dataset A; dataset C contains several "real microstructure image-real label image" sub-image pairs, which are obtained by randomly transforming and cropping the image pairs in the original dataset A;
[0009] A generative model is constructed based on a generative adversarial network. The generative model includes a generator and a discriminator. The generator generates a simulated label image based on random noise that follows a standard normal distribution, and the discriminator discriminates the simulated label image based on the real label image.
[0010] A translation model is constructed based on a conditional generative adversarial network. The translation model includes a generator and a discriminator. The generator generates a simulated microstructure image based on a simulated label image, and the discriminator discriminates the simulated microstructure image based on the real microstructure image.
[0011] The generative model is trained using dataset B, and the translation model is trained using dataset C. Random noise that obeys a standard normal distribution is input into the generator of the trained generative model to generate a simulated label image. The simulated label image is then input into the generator of the trained translation model to generate a simulated microstructure image, thereby achieving paired generation of the microstructure image and its label image.
[0012] Furthermore, the generator of the generative model includes a sequentially connected input layer, a deconvolution layer and an output layer, and the discriminator includes a sequentially connected input layer, a convolution layer and a fully connected layer; the generator of the translation model includes a sequentially connected input layer, a convolution layer, a deconvolution layer and an output layer, and the discriminator includes a sequentially connected input layer, a convolution layer and a fully connected layer.
[0013] Furthermore, the characterization equipment is used to collect the microstructure of the target material, and each phase in the microstructure is calibrated, and each phase is distinguished by different colors to obtain a label map, thereby forming a real microstructure map and a real label. Figure 1 A pair of corresponding images.
[0014] Compared with the prior art, the present invention has the following beneficial effects:
[0015] For the microstructure recognition task, when establishing a microstructure dataset based on deep learning, it is necessary to manually calibrate the various phases in the microstructure image in advance, mark different tissues with different colors, obtain label maps, and form "tissue map-label map" image pairs for training microstructure recognition models. The process of establishing a microstructure dataset consumes a lot of manpower and time, and the labeling efficiency is extremely low, which seriously restricts the sample size of the dataset, and further limits the accuracy of microstructure recognition based on deep learning technology. There is an urgent need for a microstructure dataset enhancement method with low labor cost and high efficiency. To address this bottleneck problem, the present invention provides a data enhancement method for synchronously generating a microstructure image and its label map. The generation model generates a simulated label map based on random noise, and the translation model generates a simulated microstructure map based on the simulated label map, thereby forming a "simulated tissue map-simulated label map" image pair. The generation model is constructed based on a generative adversarial network, and the translation model is established based on a conditional generative adversarial network. Through the combination of the two types of generative adversarial networks, a large number of realistic "simulated tissue map-simulated label map" image pairs can be quickly generated, and the sample size of the data set can be effectively expanded, which solves the bottleneck problem that the traditional single generative adversarial network can only generate microstructure images. A special data enhancement technology suitable for microstructure identification tasks is developed, which can effectively alleviate the small sample problem commonly faced by the current material microstructure identification based on deep learning technology, and can improve the accuracy and universality of the microstructure identification model based on deep learning, providing support for promoting the widespread application of artificial intelligence methods in the field of microstructure analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is the overall flow chart of the present invention;
[0017] Figure 2 Compare the simulated label graph generated by the generative model of the present invention with the real label graph;
[0018] Figure 3 Comparison of the simulated SEM image generated by the translation model applied in the present invention with the real SEM image;
[0019] Figure 4 The microstructure recognition results of the model built by the enhanced data set are shown in the figure. DETAILED DESCRIPTION
[0020] Specific embodiments are given below in conjunction with the accompanying drawings. The specific embodiments are only used to introduce the technical solutions of the present invention in detail and are not intended to limit the protection scope of the present application.
[0021] The present invention provides a data enhancement method for synchronously generating a microstructure image and its label map (hereinafter referred to as the method, see Figures 1 to 4 ), including the following steps:
[0022] Step 1: Create the original data set;
[0023] Through microstructure characterization and image data annotation, a target material microstructure image dataset is established as an original dataset A. The original dataset A contains multiple "real microstructure image-real label image" image pairs. In this embodiment, the target material is a complex steel material prepared by additive manufacturing technology. The specific steps are as follows:
[0024] Step 1.1 Use the tissue characterization equipment to collect microstructure images of N different areas in the metallographic sample of the target material;
[0025] In this embodiment, the tissue characterization device uses a scanning electron microscope, and the tissue is collected from N=3 areas in the metallographic sample of the target material. A SEM image is collected from each area, the magnification is 2000 times, and the SEM image size is 1024×768 pixels;
[0026] Step 1.2 Use image data annotation software such as Labelme to calibrate the SEM image to form a real label map;
[0027] In this embodiment, professionals in the field of materials are relied upon, and Labelme image data annotation software is used to calibrate each phase in the SEM image, including martensite, austenite and Mahout islands (a mixed structure of martensite and austenite), to form a true label map; each phase in the true label map is distinguished by different colors, for example, martensite is marked in red, austenite is marked in blue, and Mahout islands are marked in green; the label map size is consistent with the SEM image, and there is a completely consistent pixel correspondence relationship between the SEM image and the label map; through the aforementioned tissue calibration, this embodiment forms 3 "true SEM image-true label map" image pairs, which then constitute the original data set A.
[0028] Step 2: Establish a dedicated dataset B for generative modeling;
[0029] The generative model is used to generate simulated label images. The input of the model is random noise that conforms to the standard normal distribution, and the output is a simulated label image. Therefore, the dataset used to train the model should consist of several real label images.
[0030] Step 2.1 Use image processing software to randomly crop each real label image in the original data set A, and obtain a total of M real label sub-images of size P×P, where M=N×E, E represents the number of sub-images cropped from each real label image, and all real label sub-images constitute the special data set B for generative model building.
[0031] In this embodiment, the OpenCV algorithm is used to randomly transform and crop the three real label images with a size of 1024×768 in the original data set A. The random transformation and cropping include clockwise flipping, mirror flipping and scaling operations at different angles (0-360°) of the image, and then E=200 sub-images with a size of 128×128 pixels are randomly cropped from the transformed image, and a total of M=600 real label sub-images are obtained, thereby establishing a special data set B for generative modeling, which contains 600 real label images with a size of 128×128 pixels.
[0032] Step 3: Establish a generative model and use the generative model modeling dedicated dataset B established in step 2 to train the generative model;
[0033] Step 3.1 Establish a generative model; the generative model uses a conventional generative adversarial network (GAN), which consists of a "generator" and a "discriminator". The generator includes an input layer, a deconvolution layer, and an output layer. The layers are connected sequentially, and the output of the previous layer is used as the input of the next layer; the input of the generator is random noise that obeys the standard normal distribution, and the output is a simulated label map; the discriminator includes an input layer, a convolution layer, and a fully connected layer. The layers are connected sequentially, and the output of the previous layer is used as the input of the next layer; the input of the discriminator is an image pair consisting of a real label map and a simulated label map, and the output is the discrimination result (true or false) of the simulated label map.
[0034] Step 3.2 trains the generative model; the generative model is trained using the generative model modeling dedicated dataset B established in step 2. The model input is random noise that conforms to the standard normal distribution, and the output is a simulated label map. The Adam optimizer is used to train the generative model and optimize the model's hyperparameters; Mean Absolute Error (MAE) is used as the evaluation index of model performance during model training. In this embodiment, the number of iterations of model training is set to num=2000. The generative model is written in the Keras open source artificial neural network library in Python language.
[0035] Step 3.3 evaluates the generative model; after the generative model training is completed, the trained generative model is used to generate n simulated label images, and the FID (Fréchet Inception Distance) indicator is used to calculate the spatial distribution difference between the simulated label image and the real label image. The smaller the FID value, the higher the model accuracy and the more realistic the generated simulated label image. If the FID indicator does not meet the requirements, return to step 3.2 to continue training the model and optimize the hyperparameters until the requirements are met.
[0036] In this embodiment, after the model training is completed, the generative model is applied to generate n = 1024 simulated label images with a size of 128 × 128 pixels. The FID index calculated from the simulated label images and the real label images is 21.4, which is a small value, indicating that the generated simulated label images and the real label images have extremely similar morphological features. Figure 2 shown.
[0037] Step 4: Establish a dedicated dataset C for translation model modeling;
[0038] The translation model obtains the SEM image based on the simulated label map generated by the generative model. Therefore, the translation model modeling dedicated dataset C used for training should include the real label map and its corresponding SEM image. The specific establishment process is as follows:
[0039] Step 4.1 Use image processing software to crop the real SEM images and real label images in the original data set A respectively, and obtain a total of W real SEM sub-images and label sub-images. This process should ensure that there is a strict pixel correspondence between the real SEM sub-images and the real label sub-images; where W = R × T, R represents the number of sub-images cropped from each real SEM image or real label image, and T is the data volume of the original data set A. All real SEM sub-images and real label sub-images constitute a special data set C for translation model building. The data set contains one-to-one corresponding W real SEM sub-images and W real label sub-images, and the special data set C for translation model building is divided into a training set and a test set according to a ratio of 7:3;
[0040] In this embodiment, the OpenCV algorithm is used to crop the three "real SEM image-real label image" image pairs in the original data set A, and each image pair is cropped into R = 200 "SEM image-label image" sub-image pairs according to the random cropping method described in step 2.1. The sizes of the SEM sub-image and the label sub-image are both 128×128 pixels, and finally a total of W = 600 "SEM image-label image" sub-image pairs are obtained, and then a special data set C for translation model building is obtained, in which the training set and the test set contain 420 and 180 "SEM image-label image" sub-image pairs respectively;
[0041] Step 4.2: Use image processing methods to flip the real SEM sub-images and real label sub-images in the training set clockwise by 90°, 180°, and 270°, respectively, and mirror-flip them, so as to achieve data enhancement and expand the training set. The expanded training set contains 2100 “SEM image-label image” sub-image pairs.
[0042] Step 5: Establish a translation model, and use the translation model established in step 4 to model a dedicated data set C to train the translation model;
[0043] Step 5.1: Establish a translation model; the translation model uses a conditional generative adversarial network (CGAN), which is also composed of a "generator" and a "discriminator". The generator includes an input layer, a convolutional layer, a deconvolutional layer, and an output layer. Each layer is connected sequentially, and the output of the previous layer is used as the input of the next layer. The input of the generator is a simulated label map, and the output is a simulated SEM image; the discriminator includes an input layer, a convolutional layer, and a fully connected layer. Each layer is connected sequentially, and the output of the previous layer is used as the input of the next layer. The input of the discriminator is an image pair consisting of a real SEM image and a simulated SEM image, and the output is the discrimination result (true or false) of the simulated SEM image.
[0044] Step 5.2: training the translation model; using the translation model modeling dedicated dataset C established in step 4 to train the translation model, the input of the translation model during training is the real label map, and the output is the real SEM image. The Adam optimizer is used to train the model and optimize the hyperparameters in the model; Mean Absolute Error (MAE) is used as the evaluation index of model performance during model training; in this embodiment, the number of iterations of model training is set to num=5000.
[0045] Step 5.3: Evaluate the translation model; after the model training is completed, use the trained translation model to generate n simulated SEM images, and use the FID (Fréchet Inception Distance) indicator to calculate the spatial distribution difference between the simulated SEM image and the real SEM image. The smaller the FID value, the higher the model accuracy and the more realistic the generated simulated SEM image. If the FID indicator does not meet the requirements, return to step 5.2 to continue training the model and optimize the hyperparameters until the requirements are met.
[0046] In this embodiment, after the model training is completed, the model performance is evaluated using the test set. The translation model is applied to generate n = 180 simulated SEM images with a size of 128 × 128 pixels. The FID index calculated between the simulated SEM images and the real SEM images of the test set in data set C is 32.5, which is a small value, indicating that the generated simulated SEM images have extremely similar morphological features to the real SEM images. The comparison between the simulated SEM images and the real SEM images is shown in the figure. Figure 3 As shown, (a) is a simulated SEM image generated by a real label image. It can be seen that there is almost no difference between the morphological features of the simulated SEM image and the corresponding real SEM image. (b) is a simulated SEM image generated by a simulated label image.
[0047] Step 6: Synchronous generation of microstructure images and their corresponding label images
[0048] Random noise is input into the generator of the trained generative model, which outputs a simulated label map. Subsequently, the simulated label map is input into the generator of the trained translation model, which outputs a simulated SEM image. Finally, a simulated SEM image and its label map are obtained, thus realizing the paired generation of the SEM image and its label map.
[0049] This embodiment successfully generates more than 5,000 SEM images of additively manufactured complex steel materials and their corresponding label images by using the generation model and translation model, effectively expanding the sample size in the data set and establishing an enhanced data set. Based on the enhanced data set established by the present invention, a U-Net semantic segmentation model is trained to automatically identify the various phases of the SEM images of additively manufactured complex steel materials, and the recognition results are compared with the U-Net semantic segmentation model trained by the original data set A, as shown in the attached figure. Figure 4 As shown, it can be found that the microstructure recognition accuracy of the model built by the enhanced data set obtained by the method of the present invention is higher, especially for complex tissue areas, the identification of each phase is more accurate, which fully verifies the effectiveness of the data enhancement method proposed in the present invention in improving the accuracy of deep learning modeling under small samples.
[0050] Matters not covered by the present invention are known technologies.
Claims
1. A data enhancement method for synchronously generating a microstructure image and its label map, characterized in that: The method includes the following: Construct original dataset A, dataset B and dataset C; original dataset A contains several "real microstructure image-real label image" image pairs; dataset B contains several real label images, which are obtained by randomly transforming and cropping the real label images in the original dataset A; dataset C contains several "real microstructure image-real label image" sub-image pairs, which are obtained by randomly transforming and cropping the image pairs in the original dataset A; A generative model is constructed based on a generative adversarial network. The generative model includes a generator and a discriminator. The generator generates a simulated label image based on random noise that follows a standard normal distribution, and the discriminator discriminates the simulated label image based on the real label image. A translation model is constructed based on a conditional generative adversarial network. The translation model includes a generator and a discriminator. The generator generates a simulated microstructure image based on a simulated label image, and the discriminator discriminates the simulated microstructure image based on the real microstructure image. The generative model is trained using dataset B, and the translation model is trained using dataset C. Random noise that obeys a standard normal distribution is input into the generator of the trained generative model to generate a simulated label image. The simulated label image is then input into the generator of the trained translation model to generate a simulated microstructure image, thereby achieving paired generation of the microstructure image and its label image.
2. A data enhancement method for synchronously generating a microstructure image and its label map according to claim 1, characterized in that: The generator of the generative model includes a sequentially connected input layer, a deconvolution layer and an output layer, and the discriminator includes a sequentially connected input layer, a convolution layer and a fully connected layer; the generator of the translation model includes a sequentially connected input layer, a convolution layer, a deconvolution layer and an output layer, and the discriminator includes a sequentially connected input layer, a convolution layer and a fully connected layer.
3. A data enhancement method for synchronously generating a microstructure image and its label map according to claim 1 or 2, characterized in that: The characterization equipment is used to collect the microstructure map of the target material, and each phase in the microstructure map is calibrated. Different colors are used to distinguish each phase to obtain a label map, thereby forming an image pair with a one-to-one correspondence between the real microstructure map and the real label map.
Citation Information
Patent Citations
Conditional generative adversarial network model method based on single-pair image training
CN113111906A
Method for generating titanium alloy microstructure image by inputting multiple mechanical properties
CN113870373A
Metallographic microstructure image generation method based on improved generative adversarial network
CN115100307A
Cast aluminum cylinder cover mechanical property prediction method based on GAN and CNN
CN116152146A
Person re-identification system and method integrating multi-scale GAN and label learning
US20220374630A1
