Two-dimensional material automatic detection method and detection system based on deep learning
Through a two-dimensional material detection system based on deep learning, using image acquisition and model training technology, the problems of high error detection rate and cumbersome parameter adjustment of existing detection methods are solved, and two-dimensional material detection with high accuracy and high efficiency are achieved. Adapting to different environments reduces labor and time costs.
Patent Information
- Application Number
- CN202410914887.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-29
AI Technical Summary
The existing two-dimensional material detection methods have high error detection rates and cumbersome and time-consuming parameter adjustments, resulting in low detection accuracy and poor efficiency, and are sensitive to changes in microscopic observation conditions, affecting experimental results and material performance.
Adopt a deep learning-based automatic detection system, including a data acquisition module and a two-dimensional material detection module, and use the image acquisition system to collect data, perform data augmentation and model training, build ResNet-101 and full convolutional network models, and combine regional suggestions networks and The mask generation network is used to train the model using the stochastic gradient descent algorithm to achieve real-time detection.
It significantly reduces the error detection rate, improves the detection speed and accuracy, reduces labor costs and time, enhances the repeatability of the detection results, adapts to different environments, and improves the speed of material search and detection accuracy.
Smart Images

Figure CN119048417A_ABST
Abstract
Description
[0001] The present invention relates to the technical field of automatic detection of two-dimensional materials, and in particular to an automatic detection method and detection system for two-dimensional materials based on deep learning. Background Art
[0002] Two-dimensional materials have great application potential in field-effect transistors, photodetectors, supercapacitors, sensors, catalysis, etc., and the number of layers is of great significance for regulating the performance of nanoelectronic and optoelectronic devices. Therefore, before further physical research or device manufacturing, it is often necessary to determine the optimal thickness of the target sample.
[0003] At present, after the traditional two-dimensional material detection method obtains optical images or spectral information through optical technology, the subsequent data processing often relies on the professional knowledge of researchers and is greatly affected by personal experience and subjective factors. The detection accuracy is low and the efficiency is low. How to use deep learning models for automatic detection of two-dimensional materials has important research and application value.
[0004] Compared with traditional two-dimensional material detection methods, existing two-dimensional material detection methods based on rules and image processing have made some progress. However, the following problems still exist:
[0005] 1. High false positive rate. Existing algorithms require experts to make fine parameter adjustments and are sensitive to changes in microscopic observation conditions. Once conditions change, parameters need to be readjusted. This results in poor algorithm universality and low accuracy.
[0006] 2. Poor convenience. The parameter adjustment process is cumbersome and time-consuming, with high time and labor costs, and poor repeatability of the test results.
[0007] 3. The long parameter adjustment process may lead to the degradation of sensitive two-dimensional materials, which not only affects the accuracy of the experimental results and the performance of the materials, but also causes changes in the layer thickness of the two-dimensional materials, affecting the performance parameters.
[0008] Deep learning technology has made great progress in the field of imaging. Applying deep learning technology to the automatic detection of two-dimensional materials has important research significance and value. Summary of the invention
[0009] The technical problem to be solved by the present invention is to provide a two-dimensional material automatic detection method and detection system based on deep learning, with low false detection rate and fast detection speed.
[0010] In order to solve the above technical problems, the present invention provides a two-dimensional material automatic detection system based on deep learning, comprising:
[0011] Data acquisition module and two-dimensional material detection module;
[0012] Wherein, the data acquisition module is as follows: Fig. 9 As shown, it includes an optical microscope body, an image acquisition unit and a transmission unit;
[0013] The two-dimensional material detection module includes a data processing unit, a detection model M and a result visualization unit.
[0014] A two-dimensional material automatic detection method based on deep learning, the specific steps are as follows:
[0015] Step 1: Utilization Fig. 9 The image acquisition system shown captures pictures and creates a two-dimensional material data set.
[0016] Step 2: Perform data enhancement on the dataset.
[0017] Step 3: Build a detection model M and use the data set in step 1 to train the detection model M.
[0018] Step 4: Use the detection model M trained in step 3 to perform inference detection.
[0019] Furthermore, step 1 is specifically as follows:
[0020] Step 11, observing the two-dimensional material through the optical microscope body, and collecting photos of the two-dimensional material under the microscope through the image acquisition unit, and then transmitting the photos to the host computer through the transmission unit;
[0021] Step 12: Annotate the photos obtained in step 11 in COCO format;
[0022] Use the labelme package in Python to label the photos obtained in step 11 and divide them into two categories: single-layer and double-layer. Figure 5 Shown Figure 4 An example of labeling in the program. After completing the labeling of all the pictures, use the labelme2coco package in Python to convert the labelme format dataset to COCO format for subsequent training.
[0023] Step 13: Divide the labeled files into training set and test set.
[0024] Furthermore, step 2 is specifically as follows:
[0025] The original dataset is augmented by the data processing unit using a custom method to flip horizontally with a probability of 50%, vertically inverted with a probability of 50%, and perform cropping and padding, affine and translation transformations.
[0026] Furthermore, step 3 is specifically as follows:
[0027] Step 31: Use ResNet-101 to build the backbone network of the deep learning model;
[0028] Step 32: Build a region proposal network based on the fully convolutional network, and connect the network to the backbone network mentioned in step 31;
[0029] Step 33: construct a region of interest network based on a combination of full convolutional layers, pooling layers, and interpolation methods, and connect it to the backbone network and region proposal network mentioned in steps 31 and 32;
[0030] Step 34: Build a fully convolutional network and connect it after the region of interest network to generate categories and bounding boxes.
[0031] Step 35: construct a mask generation network based on the full convolutional network and connect it after the region of interest network to generate a mask to complete the construction of the entire detection model M.
[0032] Step 36: Train the detection model M:
[0033] In the first stage, the fully convolutional network constructed in step 34 is trained with an initial learning rate of 10 -3 , the fourth and higher stages of ResNet-101 in the second stage fine-tuning step 31, with an initial learning rate of 10 -4 In the third stage, all layers of the detection model M are fine-tuned, and the initial learning rate is 10 -4 In the fourth stage, all layers are further fine-tuned, and the initial learning rate is reduced to 10 -5 .
[0034] The loss function L of the detection model M consists of three sub-losses, namely, classification loss L cls , positioning loss L box and the segmentation mask loss L mask , the stochastic gradient algorithm is used to update the gradient of the model, with a total of 120 rounds of iterations, each round consisting of 500 steps.
[0035] The loss function L has each sub-loss formula as follows:
[0036] 1. Classification loss: L cls = -log p u
[0037] 2. Positioning loss:
[0038] 3. Mask loss:
[0039] Total loss: L = αL cls +βL box +γL mask
[0040] The values of parameters α, β, and γ are (α, β, γ) = (0.6, 1.0, 1.0)
[0041] After obtaining the total loss L at each step, back propagation is performed to update the model parameters until the loss value converges.
[0042] Furthermore, step 4 is specifically as follows:
[0043] Use as Fig. 9 The image acquisition system shown scans the actual two-dimensional material and uses the detection model M to detect the scanned image. The image without the sample is directly output, and the image with the sample is output with the annotation, and the position of the sample, the corresponding category, the mask and the corresponding confidence are marked on the image.
[0044] Compared with the prior art, this application has the following beneficial effects:
[0045] 1. The present invention is based on a deep learning model, which has extremely high accuracy and robustness compared to traditional machine learning algorithm detection and manual detection, and is convenient for fine-tuning the structure for different data sets to adapt to different environments. The processing speed of the neural network model is much higher than the speed of manual detection, so that the scanning results can be obtained while scanning, and real-time detection can be completed; compared with the traditional image segmentation algorithm, this method has more accurate detection capabilities. The present invention enables the method of using deep learning models for two-dimensional material detection to be truly put into practical applications, greatly reducing the time spent by researchers on such time-consuming and labor-intensive repetitive work, and also improving the speed of finding materials. For finding related materials that are difficult to find by manpower, the present invention can play a more important role.
[0046] 2. Use the TensorFlow framework in Python to train the open source model Mask R-CNN. Compared with traditional machine learning image segmentation algorithms, Mask R-CNN continuously extracts features through convolutional layers, uses mask generation networks for accurate segmentation, and uses fully connected layers and pooling layers to output classification and its probability, which greatly improves the accuracy of model detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a schematic diagram of the activity flow of each module of the system of the present invention;
[0048] Figure 2 It is a schematic diagram of the activity flow of the present invention;
[0049] Figure 3 A schematic diagram of deep learning model training of the present invention;
[0050] Figure 4 This is a graphene monolayer micrograph at 20 times magnification from the data set of the present invention;
[0051] Figure 5 A schematic diagram of a graphene micrograph of the present invention annotated in COCO format;
[0052] Figure 6 This is a schematic diagram of the loss rate change curve during training of the present invention;
[0053] Figure 7 This is a schematic diagram of the detection result of the scanned image of the present invention;
[0054] Figure 8 This is a schematic diagram of the structure of the model M used in this system;
[0055] Fig. 9 This is the data acquisition module used in this system. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the examples of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described examples are only part of the examples of the present invention, not all 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.
[0057] A deep learning-based automatic detection system for two-dimensional materials, such as Figure 1 As shown, including:
[0058] Data acquisition module and two-dimensional material detection module;
[0059] Wherein, the data acquisition module is as follows: Fig. 9 As shown, it includes an optical microscope body, an image acquisition unit and a transmission unit;
[0060] The two-dimensional material detection module includes a data processing unit, a detection model M and a result visualization unit.
[0061] A deep learning-based automatic detection method for two-dimensional materials, such as Figure 2-3 As shown, the specific steps are as follows:
[0062] Step 1: Use Fig. 9 The image acquisition system shown produces a graphene dataset;
[0063] Step 11: Observe graphene through the optical microscope body, and collect graphene photos under the microscope through the image acquisition unit, and then transmit the photos to the host computer through the transmission unit.
[0064] The graphene is placed on a SiO2 substrate, the graphene material is photographed and observed using an optical microscope, and the background color of the SiO2 substrate in the image is adjusted to fit the weights of the referenced Mask R-CNN model pre-trained on the large-scale open source dataset MS COCO.
[0065] Collect micrographs of graphene single-layer and double-layer materials under a 20x microscope. The 20x magnification is chosen because it is more suitable for detecting samples of about 10 microns and above, and it is easier for the human eye to find. In contrast, it is difficult to see samples of about 10 microns at a 5x magnification, and although a 50x magnification can see more details, the scanning time will increase by more than 6 times due to the fixed time of a single shot. Therefore, the 20x magnification photos are selected as the basis for training and detection. Figure 4 Shown is a micrograph of a pristine graphene sample in the dataset, with a resolution of 1024x1024 to ensure that all images have consistent resolution.
[0066] Step 12: Annotate the photos obtained in step 11 in COCO format;
[0067] Use the labelme package in Python to label the photos obtained in step 11 and divide them into two categories: single-layer and double-layer. Figure 5 Shown Figure 4 An example of labeling in the program. After completing the labeling of all the pictures, use the labelme2coco package in Python to convert the labelme format dataset to COCO format for subsequent training.
[0068] Step 13: Divide the labeled files into training set and test set.
[0069] Step 2: Perform data enhancement on the data set;
[0070] The data processing unit uses a custom method to enhance the original data set, horizontally flipping with a probability of 50%, vertically inverting with a probability of 50%, and performing cropping and padding, affine and translation transformations.
[0071] Step 3: Build a detection model M and use the data set in step 1 to train the detection model M.
[0072] Step 31: Use ResNet-101 to build the backbone network of the deep learning model;
[0073] Step 32: Build a region proposal network based on the fully convolutional network, and connect the network to the backbone network mentioned in step 31;
[0074] Step 33: construct a region of interest network based on a combination of full convolutional layers, pooling layers, and interpolation methods, and connect it to the backbone network and region proposal network mentioned in steps 31 and 32;
[0075] Step 34: Build a fully convolutional network and connect it after the region of interest network to generate categories and bounding boxes.
[0076] Step 35: construct a mask generation network based on the full convolutional network and connect it after the region of interest network to generate a mask to complete the construction of the entire detection model M.
[0077] Step 36: Train the detection model M:
[0078] In the first stage, the fully convolutional network constructed in step 34 is trained with an initial learning rate of 10 -3 , the fourth and higher stages of ResNet-101 in the second stage fine-tuning step 31, with an initial learning rate of 10 -4 In the third stage, all layers of the detection model M are fine-tuned, and the initial learning rate is 10 -4 In the fourth stage, all layers are further fine-tuned, and the initial learning rate is reduced to 10 -5 .
[0079] The loss function L of the detection model M consists of three sub-losses, namely, classification loss L cls , positioning loss L box and the segmentation mask loss L mask , the stochastic gradient algorithm is used to update the gradient of the model, with a total of 120 rounds of iterations, each round consisting of 500 steps.
[0080] The loss function L has each sub-loss formula as follows:
[0081] 1. Classification loss: L cls = -log p u
[0082] 2. Positioning loss:
[0083] 3. Mask loss:
[0084] Total loss: L = αL cls +βL box +γL mask
[0085] The values of parameters α, β, and γ are (α, β, γ) = (0.6, 1.0, 1.0)
[0086] After obtaining the total loss L at each step, back propagation is performed to update the model parameters until the loss value converges.
[0087] Use a 4090 GPU with 24G memory for training, and train 2 images on each GPU. Figure 6 The loss changes after 120 epochs of training. The initial model is obtained after basic convergence.
[0088] Step 4: Use the detection model M trained in step 3 to perform inference detection.
[0089] like Figure 8 As shown, an image acquisition system is used to scan actual graphene, and a detection model M is used to detect the scanned images. Images without samples are directly output, and images with annotations are output if there are samples. The positions of the samples, corresponding categories, masks, and corresponding confidence levels are marked on the images.
[0090] like Figure 4 The figure shows a photo of a graphene sample output from the scan. At the same time, after each piece of graphene is scanned, the graphene scan map is output, and the corresponding sample position is marked on the map, and the category probability is marked in the box, such as Figure 7 To facilitate subsequent searches.
Claims
1. A two-dimensional material automatic detection system based on deep learning, characterized in that: include: Data acquisition module and two-dimensional material detection module; Wherein, the data acquisition module includes an optical microscope body, an image acquisition unit and a transmission unit; The two-dimensional material detection module includes a data processing unit, a detection model M and a result visualization unit.
2. A deep learning two-dimensional material automatic detection method, the method is based on the automatic detection system according to claim 1, characterized in that: The specific steps are as follows: Step 1: Create a two-dimensional material data set; Step 2: Perform data enhancement on the data set; Step 3: Build a detection model M and use the data set in step 1 to train the detection model M; Step 4: Use the detection model M trained in step 3 to perform inference detection.
Citation Information
Patent Citations
Two-dimensional material sample position visualization method
CN112884705A
Reconfigurable X-ray imaging method based on two-dimensional layered material
CN114965515A
Two-dimensional material rapid and accurate identification method based on target real-time detection model
CN117830285A
Method and system for analyzing 2d material thin film
US20210349299A1
Augmentation of 3D surface of dental site using 2d images
US20240058105A1
Cited By
Method and device for detecting number of layers of two-dimensional material under microscope based on deep learning
CN119887783A
