A scanning electron microscope mineral identification method and device based on SAM model
By constructing and training the SAM2 model, the mineral recognition task is optimized, and the problem of unverified application effect of the existing SAM model in the field of mineral recognition is solved, and high-precision mineral and pore segmentation effect is achieved.
Patent Information
- Application Number
- CN202510051639.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-14
AI Technical Summary
In the prior art, mineral recognition methods based on SAM models have not been specially trained for mineral recognition tasks and cannot be effectively used for mineral and pore segmentation in shale SEM images.
By obtaining the sample image set, the minerals and pores are annotated, the SAM2 model is constructed, and the SAM2 model is trained through the sample image set and the label image set, and the model parameters are optimized to improve the segmentation accuracy of minerals and pores.
A good balance of boundary details, category distinctions and segmentation coverage is achieved, the accuracy of mineral identification and boundary clarity are improved, and the accuracy of mineral division results are enhanced.
Smart Images

Figure CN119478558B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of mineral identification, and in particular to a scanning electron microscope mineral identification method and equipment based on a SAM model. Background Art
[0002] Mineral identification is of great significance in the study of unconventional reservoir geology, which directly affects the classification, research and application of minerals in unconventional reservoirs. Scanning electron microscopy (SEM) is widely used in the study of reservoir pore characterization due to its high resolution and superior surface morphology imaging capabilities. Shale is an important unconventional oil and gas reservoir, and its mineral composition and pore structure play a decisive role in the storage performance and permeability of oil and gas. Traditional mineral identification methods usually rely on manual analysis and empirical judgment, which is not only time-consuming and labor-intensive, but also easily affected by subjective factors such as human errors. In order to solve these problems, in recent years, image segmentation technology based on deep learning has gradually been introduced into the field of mineral identification.
[0003] Patent application CN202410762786.4 discloses a method and related device for identifying minerals based on a machine learning algorithm, which realizes the automatic identification of mineral samples. However, due to the generalization ability of the recognition algorithm, it is only limited to identifying the mineral types contained in the local library and cannot identify samples that are not in the learning library.
[0004] Patent application CN202311584960.2 discloses a mineral identification method and system based on image data enhancement and integrated learning. It uses a deep convolutional generative adversarial network (DCGAN) to enhance data based on real mineral images and synthetic images, and couples multiple deep learning models to effectively enhance the accuracy of mineral identification. However, it is basically impossible to segment the complete mineral morphology in shale SEM images, and the model is unable to distinguish the pore and fracture characteristics in oil and gas reservoirs.
[0005] Chen et al. used a convolutional neural network with a U-Net architecture to effectively segment the internal texture differences between clay minerals and matrix minerals in shale SEM images by modifying the original weight function; Wu et al. used a random forest classifier to identify four key rock components: pores / cracks, organic matter / ketones, rock matrix (clay, calcite, quartz) and pyrite. This method has been proven to be more reliable and robust than traditional segmentation techniques, especially for matrix and pyrite components. In the above methods, the key features used for classification are mainly extracted from methods such as wavelet transform, Gaussian blur and Gaussian difference. It uses a limited training data set, but the classifier has an overall F1 score of more than 0.9 on the validation data set.
[0006] The above works have provided new ideas and methods for shale mineral identification to a certain extent, but the training data sets used by these methods mainly come from manual labeling, which is labor-intensive and highly subjective. The main problems currently exist include: 1) High labeling cost and small amount of labeled data: Existing deep learning methods require a large number of labeled samples for training, which is time-consuming and costly, especially in the absence of sufficient labeled data, the performance of the model is difficult to meet the requirements; 2) Insufficient segmentation accuracy: Existing technologies have insufficient accuracy when dealing with complex minerals and pore boundaries, especially when identifying small pores, cracks and clay mineral edges, the segmentation edges are often blurred and inaccurate; 3) Lack of flexibility and adaptability: Traditional methods lack adaptability when dealing with different types of minerals and pores, and require frequent parameter adjustments or complex preprocessing, which limits their application in diverse geological samples.
[0007] In 2023, Maciej A. Mazurowski used the Segment Anything Model (SAM) as a basic model to study and evaluate medical image segmentation. The performance of SAM was tested on 19 different medical imaging datasets, covering a variety of imaging modes and anatomical parts. The results showed that SAM has good segmentation performance for targets with clear contours and less ambiguous hint information, such as organ segmentation in computed tomography; but for more complex scenarios, such as brain tumor segmentation, the performance is poor. In 2024, Yihao Liu developed the SAMM (Segment Any Medical Model) system for medical images, including images from different imaging modes such as CT, MRI, and ultrasound, which can achieve segmentation and visualization of most medical images.
[0008] Although the SAM model performs well in natural image and medical image segmentation, and outperforms traditional methods in zero-sample edge detection tasks, it has not yet been fully applied in the field of mineral identification. In addition, the existing SAM model has not been specially trained for mineral identification tasks, and its specific application effect in shale SEM images remains to be verified. Therefore, the SAM model can be used as a potential general visual model in the field of mineral identification. Summary of the invention
[0009] In view of this, the purpose of the present invention is to provide a scanning electron microscope mineral identification method and equipment based on the SAM model, which is used to solve the technical problem that the existing SAM model has not been specially trained for mineral identification tasks and cannot be used for mineral identification.
[0010] The present invention provides a SAM model-based mineral identification method using a scanning electron microscope, comprising the following steps:
[0011] S1: Obtain a sample image set, annotate the sample image set with minerals and pores, and obtain a label image set;
[0012] S2: Build a SAM2 model, train the SAM2 model through a sample image set and a label image set, and obtain a trained SAM2 model;
[0013] S3: acquiring a scanning electron microscope image to be identified, performing image enhancement processing on the scanning electron microscope image, and obtaining an enhanced scanning electron microscope image;
[0014] S4: Input the enhanced SEM image into the trained SAM2 model to obtain the segmentation results of minerals and pores.
[0015] Preferred:
[0016] The SAM2 model includes: image encoder, hint encoder and mask decoder;
[0017] The image encoder is connected to the hint encoder, and both the image encoder and the hint encoder are connected to the mask decoder.
[0018] Preferably, step S2 specifically comprises:
[0019] S21: Input the sample image set into the SAM2 model, and obtain the predicted segmentation region after passing through the image encoder and mask decoder;
[0020] S22: Input the label image set into the SAM2 model, and obtain the true segmentation area after passing through the prompt encoder and mask decoder;
[0021] S23: Boundary loss, cross entropy loss and IOU loss are calculated by predicting the segmentation area and the actual segmentation area;
[0022] S24: The total loss is calculated by Boundary loss, cross entropy loss and IOU loss;
[0023] S25: The Adaw optimizer back-propagates the SAM2 model through the total loss and updates the parameters of the SAM2 model;
[0024] S26: Repeat steps S21-S25 until the total loss is less than a preset value to obtain a trained SAM2 model.
[0025] Preferred:
[0026] Boundary loss The calculation formula is:
[0027]
[0028] Among them, P(x) is the probability mapping of the predicted segmented area; T(x) is the label mapping of the actual segmented area; Represents boundary gradient, used to identify the boundaries of mineral regions;
[0029] Cross Entropy Loss The calculation formula is:
[0030]
[0031] Where C represents the total number of mineral categories, c is the category number of the mineral, Tc(x) represents the true label on category c, and Pc(x) represents the predicted probability on category c;
[0032] IOU Loss The calculation formula is:
[0033]
[0034] Among them, the molecule Represents the intersection of the predicted segmentation area and the true segmentation area, the denominator Represents the union of the predicted segmentation region and the true segmentation region.
[0035] Preferred:
[0036] Total loss The calculation formula is:
[0037]
[0038] in, Boundary loss, is the cross entropy loss, is the IOU loss, λ b , ce and λ IOU are all hyperparameters.
[0039] Preferably, step S3 specifically comprises:
[0040] S31: input the SEM image into the Laplace filter, perform second-order derivative edge detection on the SEM image, and highlight the boundary between minerals and pores;
[0041] S32: inputting the SEM image into a Gaussian difference filter, performing multi-scale edge enhancement on the SEM image to detect edge features of different scales;
[0042] S33: Input the scanning electron microscope image into the Canny edge detection filter, perform edge refinement extraction on the scanning electron microscope image, improve edge clarity and continuity, and output an enhanced scanning electron microscope image.
[0043] A storage medium, wherein the storage medium stores instructions and data for implementing the SAM model-based scanning electron microscope mineral identification method.
[0044] A scanning electron microscope mineral identification device based on a SAM model comprises: a processor and a storage medium; the processor loads and executes instructions and data in the storage medium to implement the scanning electron microscope mineral identification method based on the SAM model.
[0045] The present invention has the following beneficial effects:
[0046] The sample images are labeled with minerals and pores to obtain labeled images, which are used as training data for the SAM2 model to meet the training requirements of the SAM2 model for image segmentation of minerals and pores. During the training process of the SAM2 model, the total loss is calculated through the boundary loss, cross entropy loss and IOU loss, and the parameters of the SAM2 model are adjusted through the total loss, so that the SAM2 model can achieve a good balance in boundary details, category distinction and segmentation coverage, improve the accuracy of mineral identification and boundary clarity, and ultimately improve the accuracy of the segmentation results of minerals and pores. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of a method according to an embodiment of the present invention;
[0048] Figure 2 This is the structural diagram of the SAM2 model;
[0049] Figure 3 is a schematic diagram of a scanning electron microscope image to be identified;
[0050] Figure 4 Schematic diagram of image enhancement processing for scanning electron microscope images;
[0051] Figure 5 Schematic diagram of the segmentation results of minerals and pores;
[0052] Figure 6 This is a structural diagram of the device according to an embodiment of the present invention;
[0053] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0055] Reference Figure 1 The present invention provides a scanning electron microscope mineral identification method based on the SAM model, comprising the steps of:
[0056] S1: Obtain a sample image set, annotate the sample image set with minerals and pores, and obtain a label image set;
[0057] Specifically, the label image set is generated by manual image annotation, including:
[0058] Collect a large number of scanning electron microscope (SEM) images to ensure that the samples are diverse and cover different minerals and pore structures, and evaluate the quality of the collected images to remove low-quality images to ensure the validity of the data set. Manually annotate the minerals and pores in the images, generate the corresponding segmentation masks, and finally review the annotation results to ensure the accuracy and consistency of the annotations.
[0059] S2: Build a SAM2 model, train the SAM2 model through a sample image set and a label image set, and obtain a trained SAM2 model;
[0060] Further:
[0061] The SAM2 model includes: image encoder, hint encoder and mask decoder;
[0062] The image encoder is connected to the hint encoder, and both the image encoder and the hint encoder are connected to the mask decoder.
[0063] Specifically, the basic structure of the Segment Anything Model 2 (SAM2) model is as follows: Figure 2 As shown:
[0064] 1) Image Encoder: The image encoder is responsible for processing the image and creating an embedding that represents the image. This part consists of the VIT transformer and is the largest component of the network;
[0065] 2) Hint encoder: The hint encoder processes additional inputs to the network, which are labels of minerals and pores;
[0066] 3) Mask Decoder: The mask decoder receives the output of the image encoder and the hint encoder and generates the final segmentation mask.
[0067] Furthermore, during the training process, the SAM2 model uses the read function to read the training data: The loaded image is passed to the image encoder (the first part of the network): Next, the input point is processed using the prompt encoder of the network, and the encoded prompt (point) and image are used to predict the segmentation mask; through the 3 segmentation masks (prd_masks) and mask scores (prd_scores) for each input point. prd_masks contains the 3 predicted masks for each input point. prd_scores contains the scores of how good the network thinks each mask is (or how sure it is about the prediction).
[0068] Step S2 is specifically as follows:
[0069] S21: Input the sample image set into the SAM2 model, and obtain the predicted segmentation region after passing through the image encoder and mask decoder;
[0070] S22: Input the label image set into the SAM2 model, and obtain the true segmentation area after passing through the prompt encoder and mask decoder;
[0071] S23: Boundary loss, cross entropy loss and IOU loss are calculated by predicting the segmentation area and the actual segmentation area;
[0072] Furthermore, the Boundary loss indicator focuses on the distance deviation of the boundary area. By calculating the gap between the predicted boundary and the true boundary, the model pays more attention to the boundary position of the mineral area.
[0073] Boundary loss The calculation formula is:
[0074]
[0075] Among them, P(x) is the probability mapping of the predicted segmented area; T(x) is the label mapping of the actual segmented area; Represents boundary gradient, used to identify the boundaries of mineral regions;
[0076] The cross entropy loss is used to evaluate the difference between the class probability of the predicted segmentation result and the true label;
[0077] Cross Entropy Loss The calculation formula is:
[0078]
[0079] Where C represents the total number of mineral categories, c is the category number of the mineral, Tc(x) represents the true label on category c, and Pc(x) represents the predicted probability on category c;
[0080] The IOU loss directly measures the degree of overlap between the predicted area and the true area, and optimizes the shape and coverage of the entire segmented area by reducing the area of non-overlapping areas;
[0081] IOU Loss The calculation formula is:
[0082]
[0083] Among them, the molecule Represents the intersection of the predicted segmentation area and the true segmentation area, the denominator Represents the union of the predicted segmentation region and the true segmentation region.
[0084] S24: The total loss is calculated by Boundary loss, cross entropy loss and IOU loss;
[0085] Furthermore, L b It is mainly used to predict boundary details, especially for complex boundary shapes of mineral regions. By calculating the distance between the predicted boundary and the real boundary, it helps the model to locate the edge of complex mineral shapes more accurately and make the boundary segmentation clearer. This is especially effective for the detailed segmentation of mineral regions. L ce It is mainly used for classification prediction of mineral areas and is used to measure the probability of each pixel belonging to the correct category. Therefore, it helps the model to identify mineral types more accurately, reduce classification errors, and improve the classification effect of the model in various mineral areas; L IOU It is mainly used to enhance the integrity of the segmented area and make the predicted area highly overlap with the real area. Through this combined loss function formula, the model can achieve a good balance between boundary details, category distinction and segmentation coverage, and improve the accuracy and boundary clarity of mineral identification.
[0086] Total loss The calculation formula is:
[0087]
[0088] in, Boundary loss, is the cross entropy loss, is the IOU loss, λ b , ce and λ IOU are all hyperparameters.
[0089] Specifically, the hyperparameter is used to adjust the impact of each loss, and the preferred hyperparameter setting is λ b = 0.5, λ ce =1.0,λ IOU =1.5.
[0090] S25: The Adaw optimizer back-propagates the SAM2 model through the total loss and updates the parameters of the SAM2 model;
[0091] Specifically, we use the total loss function, which is done by comparing the true mask and the corresponding predicted mask using the (IOU) metric, calculating the intersection between the predicted mask and the true mask, and finally combining the segmentation loss and the score loss. Once we get the loss, we can use the optimizer we created earlier to calculate the backpropagation and update the weights. We save the trained model every 1000 steps. Since we have calculated the IOU, we can display it as a moving average to see how the model predictions improve over time.
[0092] The optimizer uses the standard Adaw optimizer, which makes the training of deep learning models more efficient and stable by optimizing the parameter update method and introducing weight decay. The learning rate of the Adam optimizer is set to 0.0001.
[0093] The IOU (Intersection over Union) refers to the ratio of the overlapping area of two regions (usually the predicted mask and the real mask) to their union, and the formula is:
[0094]
[0095] Among them, |A∩B| represents the intersection of the predicted mask and the true mask (overlapping area); |A∪B| represents the union of the predicted mask and the true mask (total area).
[0096] S26: Repeat steps S21-S25 until the total loss is less than a preset value to obtain a trained SAM2 model.
[0097] S3: acquiring a scanning electron microscope image to be identified, performing image enhancement processing on the scanning electron microscope image, and obtaining an enhanced scanning electron microscope image;
[0098] Further, a scanning electron microscope image to be identified is obtained, such as Figure 3 As shown, the scanning electron microscope usually obtained has an overall color that tends to be gray due to the luminosity problem during experimental processing, and the image quality is not high, which is not conducive to mineral and pore identification. The image quality here refers to the brightness, contrast, and signal-to-noise ratio of the image, that is, the brightness of some images is low, the contrast is poor, and the signal-to-noise ratio is quite different. The scanning speed selection of the scanning electron microscope will affect the signal intensity and signal-to-noise ratio. Too fast a scanning speed may lead to insufficient signal intensity, increase noise, and reduce the signal-to-noise ratio. Properly extending the scanning time can improve the signal-to-noise ratio, but too long a scanning time may cause the electron beam to remain on the sample, affecting the image quality. According to the specific characteristics of the image, the image enhancement process of the present invention can perform adaptive adjustment of the filter parameters.
[0099] Different mineral types and pore structures may have different textures and edge features, so by adaptively adjusting the filter parameters, the image enhancement effect can be further optimized to ensure the accuracy of segmentation.
[0100] The filter parameter adaptive adjustment is performed by histogram equalization to enhance the image contrast, and the formula is as follows:
[0101]
[0102] in, H represents the cumulative distribution function of each gray level, N k is the number of pixels at gray level k, and N is the total number of pixels. In this study, the equalized image is used for subsequent processing.
[0103] Among them, the histogram equalization is mainly to improve the contrast of the image by adjusting the grayscale distribution of the image, especially in images with uneven lighting or low contrast. For darker or brighter details, equalization can make these areas clearer, thereby making the features and edges more prominent, which can help better identify and analyze important features in the image.
[0104] Then, a Laplace filter, a Gaussian difference filter, and a Canny edge detection filter are applied respectively to perform image enhancement, as shown in step S3.
[0105] Step S3 is specifically as follows:
[0106] S31: input the SEM image into the Laplace filter, perform second-order derivative edge detection on the SEM image, and highlight the boundary between minerals and pores;
[0107] Specifically, Laplace filter is used for edge detection, and the formula is:
[0108]
[0109] The generated image is laplacian_image, which emphasizes the edge information in the image. The study set the cv2.CV_64Fc type to improve accuracy, and then converted it to an 8-bit image through the module cv2.convertScaleAbs, such as Figure 4 As shown in (a) in .
[0110] S32: inputting the SEM image into a Gaussian difference filter, performing multi-scale edge enhancement on the SEM image to detect edge features of different scales;
[0111] Specifically, the Gaussian difference filter performs grayscale image enhancement and corner point detection to enhance the detection capability of the image. First, the input image is Gaussian smoothed to generate Gaussian images with different standard deviations. The formula is:
[0112]
[0113] Where G(x,y,σ) represents a Gaussian filter with a standard deviation of σ, and x and y are image coordinates. The study sets the two standard deviations σ1=1.0 and σ2=2.0 to effectively capture the details and edges in the image.
[0114] Compute the difference between two Gaussian images with different standard deviations:
[0115]
[0116] Among them, DoG (x, y) is used to capture the edge and detail information in the image. It is converted to an 8-bit image through the module cv2.conver)tScaleAbs, such as Figure 4 As shown in (b) in .
[0117] S33: Input the scanning electron microscope image into the Canny edge detection filter, perform edge refinement extraction on the scanning electron microscope image, improve edge clarity and continuity, and output an enhanced scanning electron microscope image.
[0118] Specifically, the goal of the Canny edge detection filter is to find an optimal edge detection solution or to find the location where the grayscale intensity changes most strongly in an image. First, Gaussian smoothing is applied to calculate the gradient magnitude and direction. The formula is as follows:
[0119]
[0120] Among them, G x , G y are the gradients of the image in the x and y directions respectively, and M(x,y) represents the gradient amplitude at the point (x,y), reflecting the edge strength of the image. Among them, Gx and Gy are gradients, and the low threshold is set to 100 and the high threshold is set to 200 to control the sensitivity of edge detection, such as Figure 4 As shown in (c) in .
[0121] S4: Input the enhanced SEM image into the trained SAM2 model to obtain the segmentation results of minerals and pores.
[0122] Specifically, first, load the standard SAM2 model, then load the weights of the trained SAM2 model, run the model to obtain a series of predicted masks and scores, and add the masks to the graph according to the predicted scores based on the predicted masks. Finally, the images formed by the segmentation codes are formed. The segmentation results are as follows: Figure 5 As shown, a. original image, b. pores / cracks; c. clay minerals; d. matrix kerogen; e. matrix minerals; f. pyrite.
[0123] Among them, the segmentation results are post-processed, specifically including: saving the mask of the target object, using image processing software to restore the scale of the image, and spatially calibrating the image to export scale setting information, then selecting the target object in the image and exporting related data.
[0124] The exported data includes: 1. Classifying different types of minerals and pores; 2. Counting the number, distribution, size and other information of minerals and pores; 3. Finally, generating an analysis report.
[0125] See also Figure 6 , Figure 6 4 is a schematic diagram of the working of the hardware device of an embodiment of the present invention, wherein the hardware device specifically comprises: a SAM model-based scanning electron microscope mineral identification device 401, a processor 402 and a storage medium 403.
[0126] A scanning electron microscope mineral identification device 401 based on the SAM model: The scanning electron microscope mineral identification device 401 based on the SAM model implements the scanning electron microscope mineral identification method based on the SAM model.
[0127] Processor 402: The processor 402 loads and executes the instructions and data in the storage medium 403 to implement the SAM model-based scanning electron microscope mineral identification method.
[0128] Storage medium 403: The storage medium 403 stores instructions and data; the storage medium 403 is used to implement the SAM model-based scanning electron microscope mineral identification method.
[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0130] The serial numbers of the embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. In a unit claim that lists several means, several of these means may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order and these words may be interpreted as identifiers.
[0131] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A scanning electron microscope mineral identification method based on the SAM model, characterized in that: Includes steps: S1: Obtain a sample image set, annotate the sample image set with minerals and pores, and obtain a label image set; S2: Build a SAM2 model, train the SAM2 model through a sample image set and a label image set, and obtain a trained SAM2 model; S3: acquiring a scanning electron microscope image to be identified, performing image enhancement processing on the scanning electron microscope image, and obtaining an enhanced scanning electron microscope image; S4: Input the enhanced SEM image into the trained SAM2 model to obtain the segmentation results of minerals and pores; The SAM2 model includes: image encoder, hint encoder and mask decoder; The image encoder is connected to the hint encoder, and both the image encoder and the hint encoder are connected to the mask decoder; Step S2 is specifically as follows: S21: Input the sample image set into the SAM2 model, and obtain the predicted segmentation region after passing through the image encoder and mask decoder; S22: Input the label image set into the SAM2 model, and obtain the true segmentation area after passing through the prompt encoder and mask decoder; S23: Boundary loss, cross entropy loss and IOU loss are calculated by predicting the segmentation area and the actual segmentation area; S24: The total loss is calculated by Boundary loss, cross entropy loss and IOU loss; S25: The Adaw optimizer back-propagates the SAM2 model through the total loss and updates the parameters of the SAM2 model; S26: Repeat steps S21-S25 until the total loss is less than a preset value, and obtain a trained SAM2 model; Boundary loss The calculation formula is: Among them, P(x) is the probability mapping of the predicted segmented area; T(x) is the label mapping of the actual segmented area; Represents boundary gradient, used to identify the boundaries of mineral regions; Cross Entropy Loss The calculation formula is: Where C represents the total number of mineral categories, c is the category number of the mineral, Tc(x) represents the true label on category c, and Pc(x) represents the predicted probability on category c; IOU Loss The calculation formula is: Among them, the molecule Represents the intersection of the predicted segmentation area and the true segmentation area, the denominator Represents the union of the predicted segmentation region and the true segmentation region.
2. The SAM model-based mineral identification method according to claim 1, characterized in that: Total loss The calculation formula is: in, Boundary loss, is the cross entropy loss, is the IOU loss, λ b , ce and λ IOU are all hyperparameters.
3. The SAM model-based mineral identification method according to claim 1, characterized in that: Step S3 is specifically as follows: S31: input the SEM image into the Laplace filter, perform second-order derivative edge detection on the SEM image, and highlight the boundary between minerals and pores; S32: inputting the SEM image into a Gaussian difference filter, performing multi-scale edge enhancement on the SEM image to detect edge features of different scales; S33: Input the scanning electron microscope image into the Canny edge detection filter, perform edge refinement extraction on the scanning electron microscope image, improve edge clarity and continuity, and output an enhanced scanning electron microscope image.
4. A storage medium, characterized in that: The storage medium stores instructions and data for implementing the SAM model-based scanning electron microscope mineral identification method described in any one of claims 1 to 3.
5. A scanning electron microscope mineral identification device based on the SAM model, characterized in that: include: Processor and storage medium; the processor loads and executes instructions and data in the storage medium to implement the SAM model-based scanning electron microscope mineral identification method described in any one of claims 1 to 3.
Citation Information
Patent Citations
Mineral identification method and system based on image data enhancement and ensemble learning
CN117496266A
Mineral identification method based on machine vision and related device
CN118628817A
Wafer target segmentation method based on boundary perception SegFormer
CN117409410A
Method for identifying organic matter holes and measuring pore parameters of shale and medium
CN118469969A