Rock slice particle video segmentation method, related method and device
By collecting multi-angle orthogonal polarization sequence image data and synthesizing them into videos, and combining them with deep learning models to perform rock thin section particle segmentation, the problem of low segmentation efficiency in traditional methods is solved, high-precision rock thin section particle segmentation is achieved, and an effective data foundation is provided.
Patent Information
- Application Number
- CN202410337014.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-22
- Publication Date
- 2025-09-23
AI Technical Summary
Existing traditional image segmentation algorithms have problems with segmentation in rock thin section images, such as single segmentation, time-consuming and labor-intensive, low efficiency, and poor adaptability. It is difficult to achieve efficient particle segmentation, especially when the complexity of diagenesis is high. The features of rock thin section images under single polarization are not obvious and the contours are not significant.
By collecting multi-angle orthogonal polarization sequence image data to synthesize rock thin section video data, the rock particle segmentation model based on deep learning is used for segmentation. The backbone feature extractor, pixel decoder and Transformer decoder are combined to perform video instance segmentation of multi-channel rock thin section sequence images. The SSIM value is used to merge the mask to achieve accurate segmentation of particles.
It improves the segmentation accuracy of particles in rock thin section images, provides quantitative basic data, and provides a powerful technical means for mineral composition identification, pore throat extraction and diagenesis evaluation, significantly improving segmentation efficiency and accuracy.
Smart Images

Figure CN120689603A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sedimentary reservoirs, and in particular to a rock slice particle video segmentation method, related methods and devices. Background Art
[0002] Rock particle segmentation is fundamental to reservoir grain size analysis, mineral composition identification, and pore structure analysis. Particle segmentation results from rock thin sections not only provide quantitative data for mineral composition identification, pore throat extraction, and diagenetic evaluation, but also directly influence the determination of particle contact relationships, and thus the results of compaction evaluation. Therefore, segmenting and extracting particles from thin section images is an effective approach for understanding and analyzing their microstructure.
[0003] Image segmentation is the process of grouping pixels with distinct semantic meanings within an image. Conventional image segmentation methods can generally be categorized into two main categories: traditional image processing-based segmentation methods and deep learning-based image segmentation methods. Traditional image processing-based segmentation methods primarily utilize techniques from digital image processing, topology, and mathematical geometry to achieve image segmentation. Traditional image processing-based segmentation methods primarily include early threshold segmentation, region segmentation, K-means clustering, superpixel segmentation, and watershed segmentation, as well as more advanced algorithms such as active contour model-based segmentation, graph theory-based segmentation, and Markov random field-based segmentation. Traditional image segmentation algorithms achieve some success in some images, but with the increasing complexity of massive image data and the demand for automated and intelligent batch processing, traditional image segmentation algorithms suffer from limitations such as simplistic segmentation, time-consuming and labor-intensive processing, low efficiency, and poor adaptability, lacking the ability to intelligently and automatically perform segmentation. Compared to traditional image processing-based segmentation methods, deep learning-based image segmentation technology, supported by extensive data training and the core technology of convolutional neural networks, has achieved superior application results in numerous fields and real-world scenarios, such as face recognition, map feature extraction, and autonomous vehicle perception. Currently, image segmentation is further subdivided into semantic segmentation, instance segmentation, and panoramic segmentation based on the different purposes of image segmentation. Semantic segmentation distinguishes every pixel in the image, and representative network structures include FCN, U-Net, SegNet, PSNet, Deeplab, etc. Instance segmentation only accurately detects non-background target objects in the image and distinguishes different instances of the same attributes. It is developed based on target detection and semantic segmentation. Representative networks include Faster R-CNN, Mask R-CNN, Non-local Neural Networks, PANet, Tensormask, etc. Panoramic segmentation detects and segments the entire image, while performing semantic segmentation of background objects and instance segmentation of non-background target objects. Representative networks include Panoptic FPN, DeeperLab, AUNet, TASCNet, etc. Summary of the Invention
[0004] In order to better achieve rock slice particle segmentation, an embodiment of the present invention provides a rock slice particle video segmentation method, related methods and devices.
[0005] In a first aspect, an embodiment of the present invention provides a method for segmenting rock slice particles through video, the method comprising:
[0006] Merging the acquired multi-channel rock thin section sequence image data to be identified into a video to obtain the rock thin section video data to be identified; the multi-channel rock thin section sequence image data to be identified includes a single polarization image and a plurality of orthogonal polarization images;
[0007] Inputting the rock slice video data to be identified into a rock particle segmentation model to obtain multiple masks;
[0008] Performing similarity calculation based on the multiple masks to obtain a rock slice particle segmentation result;
[0009] The rock particle segmentation model is obtained by:
[0010] For each rock thin section image in the acquired rock thin section image dataset, sequential image data of orthogonal polarization at multiple angles are collected to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0011] performing data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset;
[0012] Merging each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0013] A preset rock particle segmentation model is trained based on a rock thin section video dataset to obtain the rock particle segmentation model.
[0014] In one or some optional implementations of the embodiment of the present application, performing similarity calculation based on the multiple masks to obtain a rock slice particle segmentation result includes:
[0015] Based on the multiple masks, respectively calculating the SSIM values of two adjacent masks;
[0016] Based on the SSIM value, every two adjacent masks are merged to obtain a new mask;
[0017] The above operation of calculating the SSIM values of the adjacent masks and merging them to obtain a new mask is repeated until all masks are merged to obtain the rock slice particle segmentation result.
[0018] In one or some optional implementations of the embodiment of the present application, the preset rock particle segmentation model includes a backbone feature extractor, a pixel decoder and a Transformer decoder;
[0019] The step of training a preset rock particle segmentation model based on the rock thin section video dataset to obtain the particle segmentation model includes:
[0020] Slicing the rock slice video data in the rock slice video dataset into a plurality of image data;
[0021] Inputting the plurality of image data into the backbone feature extractor to obtain low-resolution features;
[0022] Inputting the low-resolution features into the pixel decoder to obtain a plurality of per-pixel embedded features;
[0023] obtaining position coding features based on the plurality of image data;
[0024] Inputting the position encoding features into the Transformer decoder, and combining the multiple per-pixel embedding features layer by layer to obtain multiple masks;
[0025] Optimizing the preset rock particle segmentation model based on the multiple masks and the multiple real annotations corresponding to the rock slice video data to obtain an optimized rock particle segmentation model;
[0026] Repeat the above operations of segmenting the rock slice video data, inputting it into the optimized rock particle segmentation model, and optimizing the rock particle segmentation model until the preset conditions are met to obtain the rock particle segmentation model.
[0027] In one or some optional implementations of the embodiment of the present application, the pixel decoder includes a plurality of upsampling modules connected in sequence;
[0028] Inputting the low-resolution features into the pixel decoder to obtain a plurality of per-pixel embedded features includes:
[0029] Inputting the low-resolution feature into a first upsampling module of the pixel decoder to obtain a first per-pixel embedded feature;
[0030] Inputting the first per-pixel embedded feature into a second upsampling module of the pixel decoder to obtain a second per-pixel embedded feature;
[0031] Repeat the above operation of inputting the per-pixel embedded feature into the next upsampling module of the pixel decoder until the last per-pixel embedded feature output by the last upsampling module of the pixel decoder is obtained, thereby obtaining multiple per-pixel embedded features.
[0032] In one or some optional implementations of the embodiment of the present application, the Transformer decoder includes multiple decoding modules;
[0033] The step of inputting the position encoding features into the Transformer decoder and combining the multiple per-pixel embedding features layer by layer to obtain multiple masks includes:
[0034] Inputting the position encoding feature and the first per-pixel embedding feature into a first decoding module of the Transformer decoder to obtain a first new position encoding feature;
[0035] Inputting the first new position encoding feature and the second per-pixel embedding feature into the second decoding module of the Transformer decoder to obtain a second new position encoding feature;
[0036] Repeat the above operation of inputting the new position encoding feature into the decoding module of the Transformer encoder until the last new position encoding feature output by the last decoding module of the Transformer decoder is obtained;
[0037] Based on the last new position encoding feature and the last per-pixel embedding feature, multiple masks are calculated.
[0038] In one or some optional implementations of the embodiment of the present application, the data preprocessing of the multi-channel rock thin section sequence image dataset includes:
[0039] performing data normalization on the multi-channel rock thin section sequence image dataset;
[0040] Data enhancement is performed on the multi-channel rock thin section sequence image dataset; the data enhancement includes: flipping, rotating, random color jittering, random cropping and resolution adjustment.
[0041] In a second aspect, an embodiment of the present invention provides a method for training a rock slice particle video segmentation model, the method comprising:
[0042] For each rock thin section image in the acquired rock thin section image dataset, sequential image data of orthogonal polarization at multiple angles are collected to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0043] performing data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset;
[0044] Merging each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0045] A preset rock particle segmentation model is trained based on a rock thin section video dataset to obtain the rock particle segmentation model.
[0046] In a third aspect, an embodiment of the present invention provides a rock slice particle video segmentation device, the device comprising:
[0047] A first merging module is configured to merge the acquired multi-channel rock thin section sequence image data to be identified into a video to obtain the rock thin section video data to be identified; the multi-channel rock thin section sequence image data to be identified includes a single polarization image and a plurality of orthogonal polarization images;
[0048] A first prediction module is configured to input the rock slice video data to be identified into a rock particle segmentation model to obtain a plurality of masks;
[0049] A first calculation module is configured to perform similarity calculation based on the multiple masks to obtain a rock slice particle segmentation result; wherein the rock particle segmentation model is obtained by:
[0050] The first processing module is configured to collect sequence image data of orthogonal polarization at multiple angles for each rock thin section image in the acquired rock thin section image dataset to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0051] a second processing module, configured to perform data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset;
[0052] The second merging module is used to merge each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0053] The first training module is used to train a preset rock particle segmentation model based on a rock slice video dataset to obtain the rock particle segmentation model.
[0054] In a fourth aspect, an embodiment of the present invention provides a rock slice particle video segmentation model training device, the device comprising:
[0055] The first processing module is configured to collect sequence image data of orthogonal polarization at multiple angles for each rock thin section image in the acquired rock thin section image dataset to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0056] a second processing module, configured to perform data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset;
[0057] A first merging module is used to merge each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0058] The first training module is used to train a preset rock particle segmentation model based on a rock slice video dataset to obtain the rock particle segmentation model.
[0059] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the rock thin section particle video segmentation method described above, and / or the rock thin section particle video segmentation model training method described above.
[0060] In a sixth aspect, an embodiment of the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the rock thin section particle video segmentation method described above and / or the rock thin section particle video segmentation model training method described above are implemented.
[0061] In a seventh aspect, an embodiment of the present invention provides a computer program product comprising instructions, which, when run on a computer device, enables the computer device to execute the rock thin section particle video segmentation method described above, and / or the rock thin section particle video segmentation model training method described above.
[0062] The beneficial effects of the above technical solutions provided by the embodiments of the present invention include at least:
[0063] The rock thin section particle video segmentation method provided by the embodiment of the present invention collects sequential image data of orthogonal polarization under multiple angles, merges the sequential image data to obtain rock thin section video data to be identified, and inputs the rock thin section video data into a trained particle segmentation model to obtain multiple masks, i.e., multiple particle segmentation results. The multiple masks are then merged through similarity calculation to obtain rock thin section particle segmentation results. The method is based on deep learning instance segmentation technology applied to rock thin section sequential image data under multiple angles and multiple light sources, and uses video instance segmentation to extract sequence features. Rock thin section images under single polarization and orthogonal polarization are combined. By identifying the features of rock particles such as extinction and protrusions under multi-channel transformation, the edge feature information of thin section particles is fully utilized to achieve accurate segmentation of particles in rock thin section images, thereby improving the accuracy of rock particle segmentation and providing a powerful technical means for related thin section image analysis and processing and quantitative evaluation of rock structure.
[0064] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description. Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or may be learned by practicing the present invention. The objectives and other advantages of the present invention may be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0065] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0067] Figure 1 1 is a flow chart of a rock slice particle video segmentation method provided in an embodiment of the present application;
[0068] Figure 2 This is a flow chart of the rock particle segmentation model training process provided by the embodiment of the present application;
[0069] Figure 3 This is a schematic diagram of a rock particle segmentation model provided in an embodiment of the present application;
[0070] Figure 4 This is a schematic diagram of single polarization and multiple orthogonal polarization sequence image data provided by an embodiment of the present application;
[0071] Figure 5 2. It is a schematic diagram of the rock slice particle video segmentation results obtained by the rock slice particle video segmentation method provided by the embodiment of the present application and the comparative method;
[0072] Figure 6 A flowchart of a rock slice particle video segmentation model training method provided in an embodiment of the present application;
[0073] Figure 7 A schematic diagram of the structure of a rock slice particle video segmentation device provided in an embodiment of the present application;
[0074] Figure 8 A schematic diagram of the structure of a rock slice particle video segmentation model training device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0076] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0077] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0078] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0079] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0080] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0081] It should be understood that the size of the serial numbers of the steps in the following embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0082] In order to illustrate the technical solution of the present application, specific embodiments are provided below.
[0083] The inventors discovered that, in the prior art, when dealing with rock thin section images, as discussed in the present invention, due to the complexity of diagenesis, rock thin section images under single polarization often exhibit unclear particle features and inconspicuous outlines. Therefore, achieving effective particle segmentation using conventional image processing algorithms is difficult. However, under continuously varying orthogonal polarization, mineral particles exhibit alternating light and dark extinction, resulting in clear edges and easier segmentation. Based on this, the inventors, through further research and development, developed the present invention, which provides a rock thin section particle video segmentation method, related methods, and apparatus.
[0084] Example 1
[0085] The embodiment of the present invention provides a rock slice particle video segmentation method, referring to Figure 1 As shown, the method includes:
[0086] S101: merging the acquired multi-channel rock thin section sequence image data to be identified into a video to obtain the rock thin section video data to be identified; the multi-channel rock thin section sequence image data to be identified includes a single polarization image and multiple orthogonal polarization images.
[0087] In the embodiment of the present application, in step S101, a multi-channel rock section sequence image sequence to be identified is first acquired and resized. The multi-channel rock section sequence image sequence to be identified is then sequentially merged into a video, with each image data representing a frame of the video. The multi-channel rock section sequence image data includes a rock section image acquired under a single polarization and multiple rock section images acquired under orthogonal polarization at different angles.
[0088] In a specific embodiment, a rock thin section to be identified is placed on a polarizing image microscope acquisition device, and a fixed-position orthogonal angle rock thin section image is obtained every time the orthogonal polarizer is rotated 15°. A total of one rock thin section image acquired under single polarization and six rock thin section images acquired under orthogonal polarization at different angles (i.e., 0°, 15°, 30°, 45°, 60°, and 75°) are obtained. The seven images are merged into a video in the order of acquisition to obtain the rock thin section video data to be identified.
[0089] S102: Inputting the rock slice video data to be identified into a rock particle segmentation model to obtain multiple masks.
[0090] In the embodiment of the present application, in step S102, the rock slice video data to be identified is input into the rock particle segmentation model, and the rock particle segmentation model outputs multiple masks, i.e., the rock slice particle segmentation results for multiple images. In one specific embodiment, if the rock slice video data to be identified input into the rock particle segmentation model includes seven images, the rock particle segmentation model outputs the rock slice particle segmentation results for the seven images.
[0091] The rock particle segmentation model is obtained in the following way:
[0092] For each rock thin section image in the acquired rock thin section image dataset, sequential image data of orthogonal polarization at multiple angles are collected to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0093] Perform data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain the annotated multi-channel rock thin section sequence image dataset;
[0094] Merging each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0095] A preset rock particle segmentation model is trained based on a rock thin section video dataset to obtain a rock particle segmentation model.
[0096] In the embodiment of the present application, the flow chart of rock particle segmentation model training and generating rock particle segmentation results is as follows: Figure 2As shown, in the first step, multi-channel rock thin section image data is collected to obtain a batch of high-quality rock thin section sequence image data to form a multi-channel rock thin section sequence image dataset, wherein the multi-channel rock thin section sequence image data includes a rock thin section image collected under a single polarization and multiple rock thin section images collected under orthogonal polarization at different angles; in the second step, the multi-channel rock thin section sequence image dataset is preprocessed, and the data preprocessing includes data normalization and data enhancement for the multi-channel rock thin section sequence image dataset, wherein data normalization means unifying the size of all images, and data enhancement includes horizontal flipping, vertical flipping, random rotation, random color jittering (brightness ±0.3, contrast ±0.3, saturation ±0.3, hue ±0.3), and random cropping of the original image resolution; in the third step, Particle annotation is performed on rock thin section images. Rock and mineral identification experts, following industry standards, annotate the edges of all pre-processed multi-channel rock thin section image sequences based on optical features and texture. Fourth, the annotated multi-channel rock thin section image sequences are merged into a single video to generate rock thin section video data, thereby obtaining a rock thin section video dataset. This dataset is then divided into a training dataset, a validation sample set, and a test sample set in a ratio of 7:2:1. For ease of explanation, when describing the specific training methods below, reference to the rock thin section video dataset refers to the training dataset unless otherwise specified. Fifth, a pre-set rock particle segmentation model is trained based on the rock thin section video dataset to obtain the rock particle segmentation model, completing the training of the rock particle segmentation model. Because rock particle image data inherently suffers from particle overlap and irregular morphology, certain data augmentation techniques are not applicable in this scenario. For example, distortion and the addition of Gaussian noise can compromise the authenticity of the original sample data.
[0097] In the embodiment of the present application, the schematic diagram of the preset rock particle segmentation model is as follows: Figure 3 As shown, Figure 3 On the left is the rock particle video data input to the model, which contains a multi-channel rock thin section sequence image. In the middle is the rock particle segmentation model. This rock particle segmentation model is built based on Mask2Former, including a backbone feature extractor (Backbone), a pixel decoder (PixelDecoder), and a Transformer decoder (Transformer Decoder), and outputs multiple masks corresponding to the multi-channel rock thin section sequence image. Figure 3 The step of merging multiple masks into the rock slice particle segmentation result on the right is S103, which will be described in detail later.
[0098] Next, the training process will be described in detail based on the specific structure of the preset rock particle segmentation model. The steps of training the preset rock particle segmentation model based on the rock thin section video dataset to obtain the particle segmentation model include:
[0099] Slice the rock slice video data in the rock slice video dataset into multiple image data;
[0100] Input multiple image data into the backbone feature extractor to obtain low-resolution features;
[0101] Inputting the low-resolution feature into a first upsampling module of the pixel decoder to obtain a first per-pixel embedded feature;
[0102] Inputting the first per-pixel embedded feature into a second upsampling module of the pixel decoder to obtain a second per-pixel embedded feature;
[0103] Repeat the above operation of inputting the per-pixel embedded features into the upsampling module of the pixel decoder until the last per-pixel embedded feature output by the last upsampling module of the pixel decoder is obtained, thereby obtaining multiple per-pixel embedded features.
[0104] Obtaining position encoding features based on a plurality of image data;
[0105] Inputting the position encoding feature and the first per-pixel embedding feature into a first decoding module of the Transformer decoder to obtain a first new position encoding feature;
[0106] Inputting the first new position encoding feature and the second per-pixel embedding feature into the second decoding module of the Transformer decoder to obtain a second new position encoding feature;
[0107] Repeat the above operation of inputting the new position encoding feature into the decoding module of the Transformer encoder until the last new position encoding feature output by the last decoding module of the Transformer decoder is obtained;
[0108] Based on the last new position encoding feature and the last per-pixel embedding feature, multiple masks are calculated.
[0109] Optimizing a preset rock particle segmentation model based on multiple masks and multiple real annotations corresponding to the rock thin section video data to obtain an optimized rock particle segmentation model;
[0110] Repeat the above operations of segmenting the rock slice video data, inputting it into the optimized rock particle segmentation model, and optimizing the rock particle segmentation model until the preset conditions are met to obtain the rock particle segmentation model.
[0111] In the embodiment of the present application, the training steps of the rock particle segmentation model include: the first step is to divide a rock thin section video dataset in the rock video dataset into multiple image data, namely, rock thin section sequence image data; the second step is to input the obtained rock thin section sequence image data into the backbone feature extractor in the preset rock particle segmentation model to obtain low-resolution features of the rock thin section sequence image data; the third step is to input the low-resolution features into the pixel decoder in the preset rock particle segmentation model, and the pixel decoder includes multiple upsampling modules connected in sequence, referring to Figure 3 As shown in FIG, the pixel decoder includes four upsampling modules connected in sequence. The low-resolution feature data is first up-sampled to the first module to obtain the first per-pixel embedding feature O1 (Per-Pixel Embedding). The first per-pixel embedding feature O1 is input into the second up-sampling module to obtain the second per-pixel embedding feature O2. By analogy, a total of four high-resolution per-pixel embedding features O1, O2, O3 and O4 are obtained. In the fourth step, the position coding feature is obtained according to the rock thin section sequence image data. This step can be implemented by a variety of existing technologies and will not be described in detail here. In the fifth step, the position coding feature is input into the Transformer decoder, where the Transformer decoder includes multiple decoding modules. Figure 3 As shown, the Transformer decoder includes three decoding modules. The position coding feature is input into the first decoding module and embedded into the per-pixel embedding feature O1 obtained in the third step to obtain the first new position coding feature. The first new position coding feature is input into the second decoding module and embedded into the per-pixel embedding feature O2 obtained in the third step to obtain the second new position coding feature. This is repeated to obtain the last new position coding feature. The last new position coding feature is outer-producted with the per-pixel embedding feature O4 obtained in the third step to obtain multiple masks. In the sixth step, based on the multiple masks and multiple real particle edge annotations corresponding to the rock thin section video data and the preset loss function, the preset rock particle segmentation model is optimized to obtain an optimized rock particle segmentation model. The above steps 1 to 6 are repeated until the preset conditions are met to obtain the rock particle segmentation model. The preset loss function can be set as a conventional loss function such as mean square error (MSE) or root mean square error (RMSE). The preset condition for stopping training can be set as a conventional condition such as the loss function value no longer decreasing or the accuracy reaching a preset threshold, which is not limited in the present invention.
[0112] S103: performing similarity calculation based on the multiple masks to obtain a rock slice particle segmentation result.
[0113] In the embodiment of the present application, in the above step S103, similarity calculation is performed based on the multiple masks to obtain the rock slice particle segmentation result, including:
[0114] Based on multiple masks, the SSIM values of two adjacent masks are calculated respectively;
[0115] Based on the SSIM value, every two adjacent masks are merged to obtain a new mask;
[0116] Repeat the above operation of calculating the SSIM values of adjacent masks and merging them to obtain a new mask until all masks are merged to obtain the rock thin section particle segmentation result.
[0117] In the embodiment of the present application, similarity calculation is performed based on the multiple masks obtained in step S102 to obtain a mask, i.e., the rock slice particle segmentation result. Since the multi-channel rock slice sequence images in the rock slice video data input to the rock particle segmentation model are obtained from the same fixed position and different angles, the multiple masks output have certain similarities. Therefore, the present invention chooses to use the SSIM indicator, which is a measure of image similarity from the aspects of brightness, contrast, and structure. The specific calculation formula based on the comparison of adjacent image samples x, y is shown in Formula 1:
[0118] SSIM(x,y)=[l(x,y) α c(x,y) β s(x,y) γ ] Formula 1;
[0119] Here, l(x,y), c(x,y), and s(x,y) refer to the brightness, contrast, and structure comparison modules, respectively. The specific calculations are shown in Formula 2, Formula 3, and Formula 4. The exponents α, β, and γ in the formula are used to adjust the relative importance of different components:
[0120]
[0121]
[0122]
[0123] Among them, μ x is the mean of x, μ y is the mean of y, is the variance of x, is the variance of y, s xy is the covariance of x and y, c1, c2, c3 are constants, generally taken as
[0124] In an embodiment of the present application, based on multiple masks, the SSIM values of two adjacent masks are calculated respectively. Based on the obtained SSIM values, the corresponding two adjacent masks are merged to obtain a new mask. The above operation of calculating the SSIM values of adjacent masks and merging them to obtain a new mask is repeated until all masks are merged to obtain the last mask, which is the rock thin section particle segmentation result.
[0125] In a specific embodiment, the collected rock slice data set includes a total of 245 multi-channel rock slice image data. Figure 4 As shown in the figure, it includes one single polarization image and six orthogonal polarization images. The rock thin section image data has a resolution of 4062*2733. During the data preprocessing phase, the rock thin section image data size was normalized to 1024*1024. After data enhancement, a total of 1725 multi-channel rock thin section images were obtained. Data annotation was then performed by rock and mineral identification experts from the China National Petroleum Corporation Research Institute. After synthesizing the multi-channel rock thin section image dataset, the rock thin section video dataset was divided into training, validation, and test datasets in a ratio of 7:2:1.
[0126] After training the rock particle segmentation model based on the training dataset from the rock thin section video dataset, the model was evaluated using the test dataset. In this paper, AP (average precision), AP50, and AP75 were used as the primary evaluation metrics for the model. AP50 and AP75 are the AP values estimated using IoU thresholds of 0.5 and 0.75, respectively.
[0127] For a given input image, the present invention outputs multiple masks for a rock slice image and compares each predicted mask with all true particle annotations. If the IoU (intersection over union ratio, calculated as shown in Formula 5) between the predicted particle segmentation mask and the actual mask is greater than a set threshold t, it is considered a true positive; if it is less than t, it is considered a false positive.
[0128]
[0129] A precision-recall curve is created by calculating the precision and recall for different thresholds t, and the area under the curve is taken as the average precision (AP).
[0130] The results of the index evaluation of the rock particle segmentation model are shown in Table 1.
[0131] Table 1 Comparison of evaluation results of different algorithms
[0132] Model Experimental data AP AP50 AP75 1 The technology of the present invention Single polarization + orthogonal polarization sequence images 0.61 0.77 0.69 2 MMTracking Single polarization + orthogonal polarization sequence images 0.58 0.74 0.51 3 MMTracking Single polarized image 0.54 0.71 0.41
[0133] The rock slice particle segmentation results obtained by the present invention and the rock slice particle segmentation results obtained by the comparative method are as follows: Figure 5 As shown, Figure 5 The leftmost one is the rock slice particle segmentation result obtained by the present invention. Figure 5 The middle one is the rock thin section particle segmentation result obtained by using single polarization + orthogonal polarization sequence images based on MMTracking technology. Figure 5 The rightmost image shows the rock thin section particle segmentation result obtained by using single polarization image segmentation based on MMTracking technology.
[0134] Table 1 shows that the numerical values of the rock particle segmentation model obtained by the present invention in terms of objective indicators are obviously different due to the comparison method. Figure 5 The rock particle segmentation model developed by this invention accurately extracts particle edges, resulting in clearer lines, outperforming currently used deep learning instance segmentation methods like MMTracking. A comparison of the results from the two experiments shows that the technology developed by this invention achieves the best particle segmentation results for rock thin section images, identifying virtually all particles in the input image.
[0135] In the embodiments of the present application, the present invention relates to the intersection of sedimentary reservoirs and computer vision. Its main purpose is to achieve accurate segmentation of rock thin section particles under multi-channel conditions and solve the problem of segmentation of rock particles under multi-channel transformations. The main technical means is to apply artificial intelligence deep learning segmentation algorithms to the field of thin section processing and analysis, and to construct an instance segmentation model suitable for rock thin section particles under multi-channel conditions, providing strong technical support and necessary technical means for the intelligent identification of rocks and minerals.
[0136] The present invention collects sequential image data of orthogonally polarized light at multiple angles, merges the sequential image data to obtain video data of the rock thin section to be identified, and inputs the rock thin section video data into a trained particle segmentation model to obtain multiple masks, i.e., multiple particle segmentation results. The multiple masks are then merged through similarity calculation to obtain the rock thin section particle segmentation results. The present invention is based on deep learning instance segmentation technology and is applied to sequential image data of rock thin sections under multiple angles and multiple light sources. Video instance segmentation is used to capture sequence features, and rock thin section images under single polarization and orthogonal polarization are combined. By identifying the characteristics of rock particles such as extinction and protrusions under multi-channel transformation, the edge feature information of the thin section particles is fully utilized to achieve high-precision segmentation of particles in the rock thin section image, significantly improving the accuracy of rock particle segmentation, and providing strong technical support for the analysis and processing of related thin section images and the quantitative evaluation of rock structure.
[0137] Example 2
[0138] Based on the same inventive concept, the present application embodiment also provides a rock slice particle video segmentation model training method, referring to Figure 6 As shown, the method includes:
[0139] S201: For each rock thin section image in the acquired rock thin section image dataset, sequential image data of orthogonal polarization at multiple angles are collected to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0140] S202: performing data preprocessing and grain edge labeling on the multi-channel rock thin section sequence image dataset to obtain a labeled multi-channel rock thin section sequence image dataset;
[0141] S203: merging each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding plurality of sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0142] S204: Training a preset rock particle segmentation model based on the rock thin section video dataset to obtain the rock particle segmentation model.
[0143] Example 3
[0144] Based on the same inventive concept, the embodiment of the present invention also provides a rock slice particle video segmentation device, referring to Figure 7 As shown, the device includes:
[0145] A first merging module 101 is configured to merge the acquired multi-channel rock thin section sequence image data to be identified into a video to obtain the rock thin section video data to be identified; the multi-channel rock thin section sequence image data to be identified includes a single polarization image and multiple orthogonal polarization images;
[0146] The first prediction module 102 is configured to input the rock slice video data to be identified into a rock particle segmentation model to obtain a plurality of masks;
[0147] The first calculation module 103 is configured to perform similarity calculation based on the multiple masks to obtain a rock slice particle segmentation result. The rock particle segmentation model is obtained by:
[0148] The first processing module 104 is configured to collect sequence image data of orthogonal polarization at multiple angles for each rock thin section image in the acquired rock thin section image dataset to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0149] The second processing module 105 is configured to perform data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset;
[0150] The second merging module 106 is configured to merge each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding plurality of sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0151] The first training module 107 is configured to train a preset rock particle segmentation model based on the rock slice video dataset to obtain the rock particle segmentation model.
[0152] Example 4
[0153] Based on the same inventive concept, the embodiment of the present invention also provides a rock slice particle video segmentation model training device, referring to Figure 8 As shown, the device includes:
[0154] The first processing module 201 is configured to collect sequence image data of orthogonal polarization at multiple angles for each rock thin section image in the acquired rock thin section image dataset to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset;
[0155] The second processing module 202 is configured to perform data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset;
[0156] The first merging module 203 is configured to merge each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding plurality of sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset;
[0157] The first training module 204 is configured to train a preset rock particle segmentation model based on the rock slice video dataset to obtain the rock particle segmentation model.
[0158] Example 5
[0159] Based on the same inventive concept, an embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it implements the rock thin section particle video segmentation method described in the above embodiment 1, and / or the rock thin section particle video segmentation model training method described in the above embodiment 2.
[0160] Example 6
[0161] Based on the same inventive concept, an embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the rock thin section particle video segmentation method described in the above-mentioned embodiment 1 and / or the rock thin section particle video segmentation model training method described in the above-mentioned embodiment 2 are implemented.
[0162] Example 7
[0163] Based on the same inventive concept, an embodiment of the present invention also provides a computer program product comprising instructions. When the computer program product is run on a computer device, the computer device executes the rock thin section particle video segmentation method described in the above embodiment 1, and / or the rock thin section particle video segmentation model training method described in the above embodiment 2.
[0164] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.
[0165] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0168] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A rock slice particle video segmentation method, characterized in that: include: Merging the acquired multi-channel rock thin section sequence image data to be identified into a video to obtain the rock thin section video data to be identified; The multi-channel rock thin section sequence image data to be identified includes a single polarization image and a plurality of orthogonal polarization images; Inputting the rock slice video data to be identified into a rock particle segmentation model to obtain multiple masks; Performing similarity calculation based on the multiple masks to obtain a rock slice particle segmentation result; The rock particle segmentation model is obtained by: For each rock thin section image in the acquired rock thin section image dataset, sequential image data of orthogonal polarization at multiple angles are collected to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset; performing data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset; Merging each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset; A preset rock particle segmentation model is trained based on a rock thin section video dataset to obtain the rock particle segmentation model.
2. The method according to claim 1, wherein The similarity calculation based on the multiple masks to obtain the rock slice particle segmentation result includes: Based on the multiple masks, respectively calculating the SSIM values of two adjacent masks; Based on the SSIM value, every two adjacent masks are merged to obtain a new mask; The above operation of calculating the SSIM values of the adjacent masks and merging them to obtain a new mask is repeated until all masks are merged to obtain the rock slice particle segmentation result.
3. The method according to claim 1, wherein The preset rock particle segmentation model includes a backbone feature extractor, a pixel decoder and a Transformer decoder; The step of training a preset rock particle segmentation model based on the rock thin section video dataset to obtain the particle segmentation model includes: Slicing the rock slice video data in the rock slice video dataset into a plurality of image data; Inputting the plurality of image data into the backbone feature extractor to obtain low-resolution features; Inputting the low-resolution features into the pixel decoder to obtain a plurality of per-pixel embedded features; obtaining position coding features based on the plurality of image data; Inputting the position encoding features into the Transformer decoder, and combining the multiple per-pixel embedding features layer by layer to obtain multiple masks; Optimizing the preset rock particle segmentation model based on the multiple masks and the multiple real annotations corresponding to the rock slice video data to obtain an optimized rock particle segmentation model; Repeat the above operations of segmenting the rock slice video data, inputting it into the optimized rock particle segmentation model, and optimizing the rock particle segmentation model until the preset conditions are met to obtain the rock particle segmentation model.
4. The method according to claim 3, wherein The pixel decoder includes a plurality of upsampling modules connected in sequence; Inputting the low-resolution features into the pixel decoder to obtain a plurality of per-pixel embedded features includes: Inputting the low-resolution feature into a first upsampling module of the pixel decoder to obtain a first per-pixel embedded feature; Inputting the first per-pixel embedded feature into a second upsampling module of the pixel decoder to obtain a second per-pixel embedded feature; Repeat the above operation of inputting the per-pixel embedded feature into the next upsampling module of the pixel decoder until the last per-pixel embedded feature output by the last upsampling module of the pixel decoder is obtained, thereby obtaining multiple per-pixel embedded features.
5. The method according to claim 3, wherein The Transformer decoder includes multiple decoding modules; The step of inputting the position encoding features into the Transformer decoder and combining the multiple per-pixel embedding features layer by layer to obtain multiple masks includes: Inputting the position encoding feature and the first per-pixel embedding feature into a first decoding module of the Transformer decoder to obtain a first new position encoding feature; Inputting the first new position encoding feature and the second per-pixel embedding feature into the second decoding module of the Transformer decoder to obtain a second new position encoding feature; Repeat the above operation of inputting the new position encoding feature into the decoding module of the Transformer encoder until the last new position encoding feature output by the last decoding module of the Transformer decoder is obtained; Based on the last new position encoding feature and the last per-pixel embedding feature, multiple masks are calculated.
6. The method according to claim 1, wherein The data preprocessing of the multi-channel rock thin section sequence image data set includes: performing data normalization on the multi-channel rock thin section sequence image dataset; Data enhancement is performed on the multi-channel rock thin section sequence image dataset; the data enhancement includes: flipping, rotating, random color jittering, random cropping and resolution adjustment.
7. A rock slice particle video segmentation model training method, characterized in that: include: For each rock thin section image in the acquired rock thin section image dataset, sequential image data of orthogonal polarization at multiple angles are collected to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset; performing data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset; Merging each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset; A preset rock particle segmentation model is trained based on a rock thin section video dataset to obtain the rock particle segmentation model.
8. A rock slice particle video segmentation device, characterized in that: include: A first merging module is used to merge the acquired multi-channel rock thin section sequence image data to be identified into a video to obtain the rock thin section video data to be identified; The multi-channel rock thin section sequence image data to be identified includes a single polarization image and a plurality of orthogonal polarization images; A first prediction module is configured to input the rock slice video data to be identified into a rock particle segmentation model to obtain a plurality of masks; A first calculation module is configured to perform similarity calculation based on the multiple masks to obtain a rock slice particle segmentation result; wherein the rock particle segmentation model is obtained by: The first processing module is configured to collect sequence image data of orthogonal polarization at multiple angles for each rock thin section image in the acquired rock thin section image dataset to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset; a second processing module, configured to perform data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset; The second merging module is used to merge each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset; The first training module is used to train a preset rock particle segmentation model based on a rock slice video dataset to obtain the rock particle segmentation model.
9. A rock slice particle video segmentation model training device, characterized in that: include: The first processing module is configured to collect sequence image data of orthogonal polarization at multiple angles for each rock thin section image in the acquired rock thin section image dataset to form multi-channel rock thin section sequence image data, thereby obtaining a multi-channel rock thin section sequence image dataset; a second processing module, configured to perform data preprocessing and particle edge annotation on the multi-channel rock thin section sequence image dataset to obtain an annotated multi-channel rock thin section sequence image dataset; A first merging module is used to merge each rock thin section image in the labeled multi-channel rock thin section sequence image dataset with the corresponding multiple sequence image data into a video to form rock thin section video data, thereby obtaining a rock thin section video dataset; The first training module is used to train a preset rock particle segmentation model based on a rock slice video dataset to obtain the rock particle segmentation model.
10. A computer-readable storage medium storing instructions, which, when executed on a terminal, causes the terminal to execute the rock thin slice particle video segmentation method according to any one of claims 1 to 6, and / or the rock thin slice particle video segmentation model training method according to claim 7.
11. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for video segmentation of rock slice particles according to any one of claims 1 to 6 and / or the method for training a model for video segmentation of rock slice particles according to claim 7 is implemented.
12. A computer program product comprising instructions, which, when executed on a computer device, causes the computer device to execute the rock thin slice particle video segmentation method according to any one of claims 1 to 6, and / or the rock thin slice particle video segmentation model training method according to claim 7.