A method for generating three-dimensional images of coal and rock based on generative adversarial

By using the method of generative adversariality, coal rock images are multi-threshold segmentation and feature extraction to generate high-quality three-dimensional coal rock images, solving the problem of low image clarity in the prior art and achieving more accurate and diversified coal rock images generation.

CN119169190BInactive Publication Date: 2025-04-22SOUTHWEST PETROLEUM UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411240429.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-04-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as low image clarity, fracture defects, and blur when acquiring high-quality three-dimensional images of coal rock, which is difficult to effectively reflect the heterogeneity and anisotropy of coal rock.

Method used

The three-dimensional coal rock image generation method based on generative adversariality is adopted, and the two-dimensional coal rock image is pore segmented and feature extraction is performed through multi-threshold segmentation and feature extraction network, and a more realistic three-dimensional coal rock image is generated by combining random noise and a generative adversarial network.

Benefits of technology

The accuracy of extraction of pore structure of coal rock images is improved, and the generated three-dimensional coal rock images are more realistic and diversified, enriching the three-dimensional coal rock image dataset, reducing the acquisition cost, and improving the accuracy of image generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169190B_ABST
    Figure CN119169190B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating three-dimensional coal rock images based on a generative adversarial network, and relates to the technical field of coal rock image generation, comprising: slicing a three-dimensional coal rock image into a group of two-dimensional coal rock images, performing pore segmentation processing and feature extraction on each two-dimensional coal rock image in the same group to obtain a segmented fusion image; adding random noise M to the segmented fusion image and inputting the image into a generator of a first generative adversarial network, and then stacking the generated multiple images into a three-dimensional image A; extracting a second feature from a coal rock image with typical features through a second feature extraction network, and then adding noise M1 thereto to obtain a typical coal rock feature map; inputting the three-dimensional image A and the typical coal rock feature map together into a generator of a second generative adversarial network to obtain a generated three-dimensional coal rock image; the present invention utilizes a generative adversarial network to enrich a coal rock three-dimensional image data set; and adding typical coal rock features to the model can reduce the learning difficulty of the model and improve the coal rock image generation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image generation, and in particular to a method for generating three-dimensional coal and rock images based on generative adversarial technology. Background Art

[0002] As the world's main energy reserve, coal rock provides the basis for global energy supply. At the same time, the microstructural characteristics of coal rock have a vital impact on coal mine safety, gas management, and mining efficiency. The distribution and connectivity of coal rock pores are directly related to the occurrence and migration of coalbed methane, which in turn affects the mining effect and safety of coalbed methane. Therefore, a deep understanding of the composition of coal rock is crucial to guiding its efficient and clean use and evaluating its technical properties. High-resolution microscopic images of coal rock play a key role in accurately distinguishing coal rock. However, due to the limitations of optical imaging technology and the professional level of operators, the image quality obtained is sometimes poor and unsuitable for practical scientific research applications. The composition, structural structure and other characteristics of coal rock cause the heterogeneity of its material composition, the anisotropy of physical properties and the discontinuity of structural structure, which is the most prominent feature that distinguishes it from other rock minerals. The heterogeneity and anisotropy of coal rock are prominently manifested in the differences in its composition in different directions and depths in the same coal seam in the vertical and horizontal directions, as well as the differences in the obvious layered structure and pore structure formed during the generation process. Usually, coal rock has well-developed layered structure and special pore structure, which fully reflects the discontinuity of coal rock structural structure.

[0003] In recent years, deep learning technology has made significant progress in the fields of image processing and computer vision. GAN is a representative deep learning model that performs well in image processing and natural language processing. Combining the two models, ZGAN and SuttonGAN, can achieve more powerful image analysis and processing capabilities. ZGAN and SuttonGAN have great potential in the field of coal and rock image generation, which can improve the accuracy and efficiency of coal and rock exploration and analysis, and provide strong support for the development and utilization of coal and rock resources. This innovative technology will help to better understand and utilize coal and rock resources and promote the sustainable development of the coal industry.

[0004] Traditional coal and rock image acquisition methods use a combination of field surveys, precise sampling, instrument measurement, and borehole sampling. These methods provide support for obtaining detailed image information of coal and rock through field surveys and precise experimental sampling by geological exploration experts, supplemented by advanced measurement equipment for data collection. Although borehole sampling can directly obtain accurate information about underground rock formations, it may have limitations in the exploration of deep coal and rock. The traditional coal and rock image acquisition process is time-consuming, and the images taken are not clear, with problems such as incomplete cracks and blurs. At present, scholars at home and abroad have conducted in-depth research and proposed some methods for coal rock image reconstruction. For the research on coal rock three-dimensional image reconstruction algorithm, Li Shuangcen et al. improved the genetic rules of genetic algorithm and changed the traditional completely random exchange mechanism to selective exchange. Although such a mechanism has improved the shortcomings of traditional algorithms, it still has limitations on the heterogeneity of simulated coal rock, and this limitation is artificially selected, which makes it difficult to reflect the heterogeneity characteristics of coal rock itself, and the generated image has a certain structural repeatability; the method used by Miao Jie et al. combines the measured porosity to improve the effect of coal rock pore extraction, but the extraction effect of pores filled with minerals is not enough, and it cannot make up for the problem of image pore fracture, and the threshold segmentation process of pores still has serious uncertainty. Summary of the invention

[0005] In order to solve the shortcomings of the prior art in the background technology, the present invention provides a method for generating a coal rock three-dimensional image based on generative adversarial technology, comprising the following steps:

[0006] S1. Slice the three-dimensional coal-rock image into a group of two-dimensional coal-rock images, perform pore segmentation processing and feature extraction operations on each two-dimensional coal-rock image in the same group, so as to obtain a segmented fusion image; S1 includes,

[0007] S101. Segment the two-dimensional coal rock image using a multi-threshold segmentation method;

[0008] S102. The obtained segmented images with different thresholds are subjected to a feature extraction operation through a first feature extraction network to obtain a first feature map, where the first feature map is composed of a plurality of sub-feature maps;

[0009] S103. Perform feature fusion on multiple sub-feature maps, and the fused feature map is a segmented fusion image;

[0010] S2. Add random noise M to the segmented fusion image obtained in S1 and input it into the generator of the first generative adversarial network trained in advance, and then stack the generated multiple two-dimensional images into a three-dimensional image A; in this step, the input and output of the generator of the first generative adversarial network are both two-dimensional images, and multiple continuous two-dimensional images are stacked into a three-dimensional image A, and the input of the discriminator of the first generative adversarial network is the stacked three-dimensional image A;

[0011] S3. extracting a second feature from the coal-rock image with typical features through a second feature extraction network, and then adding noise M1 to the second feature to obtain a typical coal-rock feature map;

[0012] S4. Add noise M1 to the second feature to obtain a typical coal feature map, and input the three-dimensional image A obtained in S2 and the typical coal rock feature map together into the generator of the second generative adversarial network to obtain a generated coal rock three-dimensional image; in the generator of the second generative adversarial network, perform multiple downsampling operations on the three-dimensional image A and perform upsampling operations corresponding to the number of downsampling times on the typical coal rock feature map, and perform a Contast operation after adding the upsampled output and downsampled output of the corresponding size of each level; then input the result of the Contast operation output into the next level, and perform an addition operation together with the upsampled output and downsampled output of the next level; the Contast operation selects at least one from the contrast enhancement operation, the detail and edge enhancement operation, and the dynamic range adjustment operation;

[0013] In the process of training the second generative adversarial network, in addition to training the generator through the discriminator of the second generative adversarial network, the loss Loss between the generated coal rock 3D image and the labeled coal rock image is also calculated. 总 , in order to train the generator of the second generative adversarial network.

[0014] Furthermore, the loss function of the first feature extraction network during training is:

[0015]

[0016] Among them, y i is the true label, which is 1 for pores and 0 for non-pores; b i is the probability of judging whether there is pore in the i-th sample when the first feature extraction network predicts the i-th sample; h i is the ratio of the number of pores in the i-th sample to the total number of pores, and N is the number of samples.

[0017] Specifically, the feature fusion of multiple sub-feature maps is as follows:

[0018]

[0019] Among them, F 融合 is the fused segmentation image, F i is the sub-feature map of the coal-rock image segmented by the ith threshold, n is the total number of images; w i Here, the porosity is directly used as the weight, that is, w i =p i , p iis the porosity.

[0020] Preferably, both the first feature extraction network and the second feature extraction network are CMT networks, the CMT network includes three 3*3 convolutional layers, four 2*2 convolutional layers, an average pooling layer and a 1*1 convolutional layer connected in sequence, the output of the 1*1 convolutional layer is the output of the CMT network, and each 2*2 convolutional layer is connected to three LLI modules;

[0021] The LLI module consists of a local perception unit, a lightweight multi-head self-attention unit, and a residual feedforward network unit connected sequentially;

[0022] The local perception unit and the lightweight multi-head self-attention unit are both provided with a layer normalization layer; specifically, the local perception unit includes a depthwise separable convolution unit, and the input and output of the depthwise separable convolution unit have a residual structure;

[0023] The lightweight multi-head self-attention unit includes a K*K deep convolution layer, a fully connected layer 1, a fully connected layer 2, a fully connected layer 3 and a multi-head self-attention mechanism layer; first, the output of the normalization unit after the local perception unit is input to the K*K deep convolution layer with a stride of K and the fully connected layer 1; then, the output of the K*K deep convolution layer is input to the fully connected layer 2 and the fully connected layer 3 respectively; finally, the outputs of the fully connected layer 1, the fully connected layer 2 and the fully connected layer 3 are respectively input to the multi-head self-attention mechanism layer;

[0024] The residual feedforward network unit includes a first 1*1 convolutional layer, a 3*3 deep convolutional layer, and a second 1*1 convolutional layer connected in sequence. An activation function layer and a normalization layer are arranged after the first 1*1 convolutional layer. The normalized output is input into the 3*3 deep convolutional layer and then residually connected with the output of the first 1*1 convolutional layer. The result after the residual connection is input into the activation function and normalization layer again, and then input into the second 1*1 convolutional layer. A normalization layer is arranged after the second 1*1 convolutional layer.

[0025] Specifically, in S4, the step of adding noise M1 to the second feature to obtain a typical coal characteristic map includes: (1) partitioning the second feature; (2) in each partition, selecting an area with the longest pores or the densest pore distribution, adding noise M1 and random scattered points to this area, and adding random scattered points to other areas except this area, to obtain a typical coal characteristic map, where the noise M1 is random noise and the random scattered points are random holes.

[0026] Specifically, in S3, the coal-rock image with typical features comes from the existing public dataset Shearedcoal sample. The author of this dataset is D Nicolas Espinoza from the University of Texas at Austin. More specifically, the coal-rock image with typical features should meet the following requirements:

[0027] The porosity is less than 25%, the pore shape factor is in the range of 0-0.8 and the pore size distribution satisfies 1 micron < average pore diameter ≤ 9 microns; specifically, the porosity p i The calculation formula is,

[0028]

[0029] The calculation formula of pore shape factor s is:

[0030]

[0031] Where s is the pore shape factor.

[0032] Furthermore, the first generative adversarial network is a SuttonGAN model, the generator of the SuttonGAN model is a plurality of fully connected layers; the discriminator of the SuttonGAN model is a binary classification layer;

[0033] The discriminator loss of the SuttonGAN model is,

[0034]

[0035] Among them, D1 represents the discriminator of the SuttonGAN model, G1 represents the generator of the SuttonGAN model; x represents the real sample, P data (x) represents the real sample distribution; represents the expected output of the discriminator for the real sample distribution; Represents the first conditional variable in the latent space z and the second condition variable The expected output of the generated sample; P z (z) represents the distribution of the latent space z, Represents the first condition variable The distribution of Represents the second condition variable The distribution of the first conditional variable The value of is taken from the average porosity of the six surfaces of the generated sample, and the second condition variable The value is taken from the average pore length of the six surfaces of the generated sample; p1~p6 represent the porosity of the six surfaces, and l1~l6 represent the average pore length of the six surfaces; in the above description, the generated sample represents a three-dimensional coal-rock image after stacking the same group of two-dimensional coal-rock images;

[0036] Represents the mutual information term, and the calculation formula is,

[0037]

[0038] in, represents the generation conditional balancing factor of SuttonGAN discriminator D1,

[0039]

[0040] yes and The joint prior probability of Represents a conditional variable and The conditional probability that x satisfies the Gaussian distribution;

[0041]

[0042] Mean μ1 and variance σ 2 is a linear function, a2, b2, d, e, v2 and f2 are all parameters of the linear function;

[0043]

[0044] express and The joint entropy of jx is the generated sample of SuttonGAN. is known and Generate the probability density function of jx under the condition of ;

[0045] The generator loss of the SuttonGAN model is,

[0046]

[0047] src i Represents the porosity of the i-th slice (two-dimensional real coal rock image) in the real sample. The purpose of the generator G1 is to minimize the expected output of the discriminator of the SuttonGAN model for the generated data;

[0048]

[0049] Among them, Mb represents the generation condition coordination factor of SuttonGAN generator G1, rc1 is the average porosity of the six faces of the real sample; β1 is the coefficient of maximizing the auxiliary classifier, and its initial value is set to 0; λ1 is the coefficient of minimizing the trade-off error, and its initial value is set to 1.

[0050] Specifically, in S4, the second generative adversarial network adopts a ZGAN model, including a generator and a discriminator. In the generator of the ZGAN model, after the three-dimensional image A is input into the down-sampling blocks down-block1, down-block2, down-block3, down-block4 and down-block5, the first down-sampling feature map, the second down-sampling feature map, the third down-sampling feature map, the fourth down-sampling feature map and the fifth down-sampling feature map are obtained respectively. The sizes of these down-sampling feature maps in three dimensions are 1 / 2, 1 / 4, 1 / 8, 1 / 16 and 1 / 32 of the three-dimensional sizes of the input original three-dimensional image respectively; after the typical coal rock feature map is input into the up-sampling blocks up-Block1, up-Block2, up-Block3, up-Block4 and up-Block5 in sequence, the first up-sampling feature map, the second up-sampling feature map, the third up-sampling feature map, the fourth up-sampling feature map and the fifth up-sampling feature map are obtained respectively. The sizes of these up-sampling feature maps in three dimensions are respectively Figure 3 The first fusion feature map is obtained by adding the fifth down-sampled feature map to the first up-sampled feature map; the first fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the fourth down-sampled feature map and the second up-sampled feature map to obtain the second fusion feature map; the second fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the third down-sampled feature map and the third up-sampled feature map to obtain the third fusion feature map; the third fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the second down-sampled feature map and the fourth up-sampled feature map to obtain the fourth fusion feature map; the fourth fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the first down-sampled feature map and the fifth up-sampled feature map to obtain the fifth fusion feature map; the fifth fusion feature map is input into the contrast enhancement layer and then feature extraction is performed to obtain the intermediate feature map.

[0051] Furthermore, the discriminator of the ZGAN model is a binary classification layer. After receiving the output of the generator of the ZGAN model, the discriminator of the ZGAN model compares the output value with the porosity and average pore length of the six surface images of the scalar value through the binary classification layer to obtain the identification result;

[0052] The discriminator loss of the ZGAN model is,

[0053]

[0054] Among them, D2 represents the discriminator of the ZGAN model, is the expected value of the real sample x output in the discriminator D2 of the ZGAN model, and x is from the real sample distribution P data(x) obtained by sampling; is the expected value of the discriminator D2 output under the data generated by the generator G2 of the ZGAN model, and zc is the output from the prior noise distribution P zc (zc) is a random noise vector sampled from the conditional distribution P c2 The third conditional variable obtained by sampling in (c2), where the value is the permeability of the real sample; is the gradient penalty term, which is used to ensure that the discriminator D2 satisfies the 1-Lipschitz continuity condition; is the interpolation point between the real sample and the generated sample; λ2 is the weight of the gradient penalty;

[0055] The loss of the generator of the ZGAN model is,

[0056]

[0057] Among them, G2 represents the generator of the ZGAN model; Represents the expected output of the generated samples of the ZGAN model generator G2 evaluated by the discriminator D2 of the ZGAN model; is the penalty term of the conditional constraint, f(G2(zc,c2)) represents the conditional information extracted from the output of the generator G2 of the ZGAN model, which refers to the permeability of the generated samples; rc2 is the permeability of the real samples; λ cond is the penalty weight of the conditional constraint.

[0058] Preferably, the loss between the calculated coal-rock three-dimensional image and the labeled coal-rock image is 总 The steps include:

[0059] The generated coal-rock three-dimensional image is input into the first FC layer, the second FC layer and the third FC layer respectively, the tortuosity of the generated coal-rock three-dimensional image and the permeability of the generated coal-rock three-dimensional image are obtained through the first FC layer and the second FC layer, and the category of the generated coal-rock three-dimensional image is obtained through the third FC layer;

[0060] The tortuosity of the generated coal rock three-dimensional image and the tortuosity of the labeled coal rock image are calculated to obtain Loss1, the permeability of the generated coal rock three-dimensional image and the permeability of the labeled coal rock image are calculated to obtain Loss2, and the category of the generated coal rock three-dimensional image and the category of the labeled coal rock image are calculated to obtain Loss3. The ZGAN model is optimized through the results of Loss1, Loss2, and Loss3;

[0061] Specifically, the calculation process of Loss1, Loss2, and Loss3 is as follows:

[0062]

[0063] Among them, tz represents the tortuosity, I represents the actual length of the path, and ol represents the Euclidean distance between the start and end points of the pore path; Represents the average tortuosity of samples generated by ZGAN, tz i represents the tortuosity of the i-th three-dimensional path that generates the sample, Represents the average tortuosity value of the real sample, r tzi represents the tortuosity of the ith three-dimensional path of the real sample, and n represents the number of paths;

[0064]

[0065] Where Pe(G2(zc,rc2)) represents the average permeability of the six surfaces of the generated samples of the ZGAN generator, is the average permeability of the six surfaces corresponding to the label image;

[0066]

[0067] u i '=u i ×(1-θ)+θ×v

[0068]

[0069] Among them, u i represents the original predicted probability that the i-th sample belongs to the coal and rock category, u i ' represents the predicted probability that the i-th sample belongs to the coal-rock category after adjustment by the smoothing parameter θ and the baseline probability v; n i is the dynamic weight, τ1 and τ2 are hyperparameters used to control the baseline and sensitivity of the weight; N is the number of samples;

[0070] Loss 总 =λ3Loss1+λ4Loss2+Loss3

[0071] Among them, λ3 represents the weight value of Loss1, and λ4 represents the weight value of Loss2.

[0072] After adopting the above scheme, the beneficial effects of the present invention are:

[0073] (1) The multi-threshold image segmentation method is used to preserve the pore structure of coal rock images, and the feature fusion method is introduced to improve the overall accuracy of extracting the pore structure of coal rock images.

[0074] (2) A new method for generating three-dimensional digital core images of coal and rock based on a generative adversarial network was used to produce more diverse and realistic three-dimensional coal and rock images than traditional methods, enriching the coal and rock three-dimensional image dataset, providing more experimental samples, and reducing the cost of acquiring coal and rock three-dimensional images. Standard coal and rock samples were added to the model, reducing the difficulty of model learning and improving the accuracy of coal and rock image generation.

[0075] (3) Use geological parameters and generated samples to continuously improve the discriminator level and improve the generation quality of coal and rock 3D images. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 A flow chart of the main steps of the present invention;

[0077] Figure 2 Schematic diagram of the process of acquiring segmented fusion images;

[0078] Figure 3 It is the structural diagram of CMT network;

[0079] Figure 4 It is the structural diagram of the LLI unit in the CMT network;

[0080] Figure 5 It is the structural diagram of the local perception unit in the LLI module;

[0081] Figure 6 This is the structural diagram of the lightweight multi-head self-attention unit in the LLI module;

[0082] Figure 7 It is the structural diagram of the residual feed-forward network unit in the LLI module;

[0083] Figure 8 Schematic diagram of the process of obtaining a three-dimensional image A by segmenting and fusing images;

[0084] Fig. 9 This is the structural diagram of the SuttonGAN model;

[0085] Fig.10 This is the structural diagram of the ZGAN model;

[0086] Fig.11 To calculate the loss between the generated coal rock 3D image and the target coal rock image 总 Schematic diagram of the process;

[0087] Fig.12 This is a three-dimensional pore distribution map of a coal rock sample;

[0088] Fig.13 A cross-sectional view of a three-dimensional pore map of a coal rock sample;

[0089] Fig.14A side view of a three-dimensional map of the pores in a coal rock sample. DETAILED DESCRIPTION

[0090] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0091] like Figure 1 As shown, a method for generating coal rock three-dimensional images based on generative adversarial technology includes the following steps:

[0092] S1. Slice the three-dimensional coal rock image into a group of two-dimensional coal rock images, and perform pore segmentation processing and feature extraction operations on each two-dimensional coal rock image in the same group to obtain a segmented fusion image; the process of obtaining coal rock sample data is as follows: by using a CT scanning electron microscope to collect coal rock samples, a series of high-precision images of coal rock samples of different sizes are obtained; for each coal rock sample, multiple two-dimensional cross-sectional images at different radius levels are obtained, and these two-dimensional cross-sectional images form an image sequence, and each image in the sequence represents a specific level of the internal structure of the coal rock, extending from the center point outward to the edge of the coal rock. Such a grouped image sequence not only reveals the hierarchical structure of the coal rock, but also allows the microscopic characteristics and pore distribution of the coal rock to be analyzed from multiple angles and depths;

[0093] The pore segmentation and feature extraction operations on the two-dimensional coal-rock image to obtain the segmented fusion image include:

[0094] S101. The two-dimensional coal rock image is segmented by a multi-threshold segmentation method; the multi-threshold segmentation method refers to segmenting the same image with different thresholds, and the multiple thresholds are preferably 3-4, and no more than 10 at most, because if the threshold range is too large, the interval between the thresholds will be small, and the reference value of the pore structure segmented in this way is low, because the pore structures between each other are not very different; in this specific implementation, if Figure 2 As shown, three thresholds are used, and the three threshold ranges are (20, 50), (70, 100), and (110, 140). In actual operation, the specific threshold range should be determined based on whether the proportion of inorganic matter and minerals in the sample is close to 40% of the overall image. This embodiment does not exceed this value, so low, medium, and high threshold intervals are used to maintain a constant value. If this value is exceeded, it is recommended to use a high threshold interval.

[0095] S102. The segmented images with different thresholds are subjected to feature extraction operation through a first feature extraction network to obtain a first feature map. Since there are different thresholds, the first feature map is composed of multiple sub-feature maps;

[0096] like Figure 3As shown, the first feature extraction network is a CMT network including three 3*3 convolutional layers, four 2*2 convolutional layers, an average pooling layer and a 1*1 convolutional layer connected in sequence, the output of the 1*1 convolutional layer is the output of the CMT network, and three LLI modules are connected after each 2*2 convolutional layer;

[0097] like Figure 4 As shown, the LLI module includes a local perception unit, a lightweight multi-head self-attention unit and a residual feedforward network unit connected in sequence; the local perception unit and the lightweight multi-head self-attention unit are both provided with a layer normalization layer; specifically, Figure 5 As shown in , the local perception unit includes a depthwise separable convolution unit, and the input and output of this depthwise separable convolution unit have a residual structure; the depthwise separable convolution unit extracts local information through depthwise convolution and maintains the consistency of features through residual connection. Figure 6 As shown, the lightweight multi-head self-attention unit includes a K*K deep convolution layer, a fully connected layer 1, a fully connected layer 2, a fully connected layer 3 and a multi-head self-attention mechanism layer; first, the output of the first layer normalization unit is input to the K*K deep convolution layer with a stride of K and the fully connected layer 1; then, the output of the K*K deep convolution layer is input to the fully connected layer 2 and the fully connected layer 3 respectively; finally, the outputs of the fully connected layer 1, the fully connected layer 2 and the fully connected layer 3 are input to the multi-head self-attention mechanism layer respectively. Specifically, the number of layers of the above-mentioned deep convolution layer is uncertain. In this specific implementation, the input image size is 1960*3630, the number of layers of the deep convolution layer is 16, K is a specific value of 3, 5 or 7, and the k*k selected in this specific implementation is 5*5; the multi-head self-attention mechanism layer is an expansion based on a self-attention mechanism, and captures different features by executing multiple self-attention operations in parallel. The multi-head self-attention mechanism layer is an existing technology and will not be described in detail in this specific implementation.

[0098] like Figure 7 As shown, the residual feedforward network unit includes a first 1*1 convolutional layer, a 3*3 deep convolutional layer, and a second 1*1 convolutional layer connected in sequence. There is an activation function layer and a normalization layer after the first 1*1 convolutional layer. The normalized output is input to the 3*3 deep convolutional layer and then residually connected with the output of the first 1*1 convolutional layer. A normalization layer is provided after the second 1*1 convolutional layer. Local and global information is extracted through the reverse residual module. The loss function of the CMT network during training is,

[0099]

[0100] Among them, y i is the true label, which is 1 for pores and 0 for non-pores; b iis the probability of judging whether there is pore in the i-th sample when the first feature extraction network predicts the i-th sample, and the initial value is set to 0.5; h i is the weight of the i-th sample, reflecting the actual proportion of pores. More specifically, it is the ratio of the number of pores in the i-th sample to the total number of pores. N is the number of samples. The label images in the CMT network training process are manually annotated.

[0101] S103. Feature fusion is performed on multiple sub-feature maps, and the fused feature map is a segmented fusion image. It should be noted that before image segmentation, the coal rock image sequence should be finely processed using image standardization technology to ensure that all images reach a uniform resolution standard, and the potential noise interference is effectively eliminated through a smoothing denoising algorithm, laying a solid foundation for subsequent feature extraction and image analysis.

[0102] The feature fusion of multiple sub-feature maps is specifically as follows:

[0103]

[0104] Among them, F 融合 is the fused segmentation image, F i is the sub-feature map of the coal-rock image segmented by the ith threshold, n is the total number of images; w i Here, the porosity is directly used as the weight, that is, w i =p i , p i is the porosity;

[0105] S2. Figure 8 and Fig. 9 As shown, the segmented fusion image obtained by S1 is inverted, and then random noise M is added and input into the generator of the first generative adversarial network trained in advance, and then the generated image is stacked into a three-dimensional image A; in this step, the input and output of the generator of the first generative adversarial network are both two-dimensional images. After the generator outputs the two-dimensional image, multiple continuous two-dimensional images are stacked into a three-dimensional image A, where the multiple continuous two-dimensional images are the same group of two-dimensional images described above; the input of the discriminator of the first generative adversarial network is the stacked three-dimensional image A; Figure 8 Only the generation part of the SuttonGAN model is shown. Fig. 9The generator structure of SuttonGAN is shown in the figure. The first generative adversarial network is the SuttonGAN model. The generator of the SuttonGAN model is a structure of multiple fully connected layers: 3*3 convolutional layer, multiple fully connected layers and 3*3 deconvolutional layer. In this specific implementation, 6 fully connected layers are used. The discriminator of the SuttonGAN model is a classifier, which adopts a binary classifier. After receiving the output of the generator, the discriminator compares the output value with the porosity and average pore length of the scalar value through the binary classification layer to obtain the identification result. The scalar value here is a two-dimensional slice of the real sample. The premise for comparing the porosity and the average pore length is that the sizes of the two are the same.

[0106] The generator G1 of SuttonGAN is designed to generate high-quality samples that meet specific conditional information. The generator accepts inputs from the latent space and conditional variables and generates data through the fully connected layer; the discriminator loss of the SuttonGAN model is,

[0107]

[0108] Among them, D1 represents the discriminator of the SuttonGAN model, G1 represents the generator of the SuttonGAN model; x represents the real sample, P data (x) represents the real sample distribution; represents the expected output of the discriminator for the real sample distribution; Represents the first conditional variable in the latent space z and the second condition variable The expected output of the generated sample; P z (z) represents the distribution of the latent space z, Represents the first condition variable The distribution of Represents the second condition variable The distribution of P z (z) is specifically a normal distribution; the first conditional variable The value of is taken from the average porosity of the six surfaces of the generated sample (3D image), the second condition variable The value of is taken from the average pore length of the six surfaces of the generated sample (three-dimensional image); p1~p6 represent the porosity of the six surfaces, and l1~l6 represent the average pore length of the six surfaces;

[0109] Represents the mutual information term, which is used to measure the generated sample and the first conditional variable and the second condition variable The mutual information between them ensures that the generated samples correctly reflect these characteristics;

[0110]

[0111] It is the generative conditional balancing factor of the SuttonGAN discriminator D1, which is used to extract the conditional variables from the discriminator D1 of the SuttonGAN model. and To ensure that this information can guide the generation process of the generator G1 of the SuttonGAN model; MC maximizes the mutual information between the generated samples and the conditional information To ensure Significantly constrained sample generation during the generation process, making the generated samples more accurate in satisfying the properties of pore number and average length;

[0112]

[0113] yes and The joint prior probability of Represents a conditional variable and The conditional probability that x satisfies the Gaussian distribution is, The purpose is to simulate the distribution of pores;

[0114]

[0115] Mean μ1 and variance σ 2 is a linear function, a2, b2, d, e, v2 and f2 are all parameters of the linear function. In this specific implementation, the initial values ​​of a2, b2 and v2 are set to 0.01, the initial values ​​of d and e are set to 0.1, and the initial value of f2 is 0.5 and cannot be 0. The values ​​of these parameters are continuously changed by generating sample data fitting;

[0116]

[0117] express and The joint entropy of jx is the generated sample of SuttonGAN. is known and The probability density function of jx is generated under the condition of ; the entropy model is mainly used as an indicator to evaluate the model and The consistency and accuracy of the generated sample data: According to the learning rate and higher entropy values, greater randomness is indicated, while lack of consistency and lower entropy values ​​may lead to overfitting, and the generated images will not change much and lack diversity; entropy is obtained by calculating the expected amount of information of the conditional probability distribution;

[0118] The generator loss of the SuttonGAN model is,

[0119]

[0120] src i Represents the porosity of the i-th slice in the real sample. The purpose of the generator G1 of the SuttonGAN model is to minimize the expected output of the discriminator of the SuttonGAN model for the generated data;

[0121]

[0122] Among them, Mb represents the generation condition coordination factor of the SuttonGAN generator G1, with an initial value of 0.5, rc1 is the average porosity of the six faces of the real sample three-dimensional coal rock image, to ensure that the generated image closely corresponds to the expected input conditions; β1 is the coefficient of the auxiliary classifier maximization, with an initial value of 0, and gradually increases according to the effect of model generation; λ1 is the coefficient of minimizing the trade-off error, with an initial value of 1, relying on Hyperopt to optimize the parameter λ1. The training of the SuttonGAN model is separate from the subsequent training.

[0123] S3. extracting a second feature from the coal rock image having typical features through a second feature extraction network;

[0124] The second feature extraction network is a CMT network;

[0125] The coal-rock images with typical features are from the existing public dataset Sheared coal sample. The author of this dataset is D Nicolas Espinoza from the University of Texas at Austin. More specifically, the coal-rock images with typical features should meet the following requirements:

[0126] The porosity is less than 25%, the pore shape factor is in the range of 0-0.8 and the pore size distribution satisfies 1 micron < average pore diameter ≤ 9 microns; specifically, the porosity p i The calculation formula is,

[0127]

[0128] The calculation formula of pore shape factor s is:

[0129]

[0130] Where s is the pore shape factor.

[0131] The original coal rock image is a three-dimensional image. When calculating the above-mentioned porosity, pore shape factor and pore size distribution, the two-dimensional slices of the coal rock image are calculated, and then the average value of all slices of the entire coal rock image is taken;

[0132] S4. Fig.10 As shown, the noise M1 is added to the second feature to obtain a typical coal feature map;

[0133] The method of adding noise M1 to the second feature to obtain a typical coal feature map includes: (1) removing impurities from the second feature to obtain a binary image that only retains coal rock features; the binary image that only retains coal rock features here refers to a binary image that retains coal rock pores, holes, and cracks; (2) partitioning the binary image, for example, for a 128*128 image, partitioning the image into 6*6 partitions; (3) in each partition, selecting the area with the longest pores or the densest pore distribution, adding noise M1 and random scattered points to this area, and adding random scattered points to other areas except this area to obtain a typical coal feature map, where the noise M1 is random noise and the random scattered points are random holes. In fact, the position of the random scattered points is the coordinate generated by the hole. The introduction of noise M1 is to make the subsequent ZGAN generator generate images with randomness. However, if only noise M1 is added, only cracks and pores will be generated. The holes are added to imitate the holes of real coal rocks.

[0134] The three-dimensional image A obtained by S2 and the typical coal rock feature map are input into the generator of the second generative adversarial network to obtain the generated three-dimensional image of coal rock; in the generator of the second generative adversarial network, the three-dimensional image A is downsampled multiple times and the typical coal rock feature map is upsampled corresponding to the number of downsampling times, and the upsampled output and downsampled output of the corresponding size of each level are added and then the Contast operation is performed; the result of the Contast operation output is then input into the next level, and the upsampled output and downsampled output of the next level are added together; specifically, the last downsampled output of the three-dimensional image A and the first upsampled output of the typical coal rock feature map are directly added, and the output of the Contast operation is not included. The Contast operation includes but is not limited to local contrast enhancement operation, detail and edge enhancement operation, and dynamic range adjustment operation. Local contrast enhancement uses a 3x3x3 filter to traverse each voxel of the image, calculates the local statistical characteristics of the pixel intensity of each voxel and its neighborhood, such as the mean and standard deviation, and adjusts the intensity value of each voxel according to the local statistical characteristics to make it more prominent relative to other voxels in the neighborhood. Detail and edge enhancement uses edge detection technology to enhance the edges and details in the image, which is particularly important for highlighting crack and pore features. Edge enhancement is achieved by reducing the similarity of voxel values ​​to the values ​​of its surrounding voxels, emphasizing the intensity changes caused by changes in physical properties. Dynamic range adjustment is to adjust the dynamic range of the entire image or local area to improve the overall or local contrast of the image. It is achieved by standardizing and stretching the intensity distribution in the image, making the difference between high-intensity and low-intensity areas more obvious. The Contast operation selects at least one of the above-mentioned contrast enhancement operations, detail and edge enhancement operations, and dynamic range adjustment operations. The specific implementation of the present invention selects the contrast enhancement operation. This contrast enhancement technology can help coal rock image analysis software more accurately identify and classify different structures in coal rocks, such as distinguishing different types of coal, identifying the width and direction of cracks, and evaluating the size and distribution of pores. This is of great significance to fields such as coal mining, geological exploration, and environmental assessment.

[0135] like Fig.10As shown, the second generative adversarial network adopts a ZGAN model, including a generator and a discriminator. In the generator of the ZGAN model, after the three-dimensional image A is input into the down-sampling blocks down-block1, down-block2, down-block3, down-block4 and down-block5, the first down-sampling feature map, the second down-sampling feature map, the third down-sampling feature map, the fourth down-sampling feature map and the fifth down-sampling feature map are obtained respectively. The sizes of these down-sampling feature maps in three dimensions are 1 / 2, 1 / 4, 1 / 8, 1 / 16 and 1 / 32 of the three dimensions of the input original three-dimensional image respectively; after the typical coal rock feature map is input into the up-sampling blocks up-Block1, up-Block2, up-Block3, up-Block4 and up-Block5 in sequence, the first up-sampling feature map, the second up-sampling feature map, the third up-sampling feature map, the fourth up-sampling feature map and the fifth up-sampling feature map are obtained respectively. The sizes of these up-sampling feature maps in three dimensions are respectively the sizes of the input coal rock feature map with noise added Figure 3 The first fusion feature map is obtained by adding the fifth down-sampled feature map to the first up-sampled feature map; the first fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the fourth down-sampled feature map and the second up-sampled feature map to obtain the second fusion feature map; the second fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the third down-sampled feature map and the third up-sampled feature map to obtain the third fusion feature map; the third fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the second down-sampled feature map and the fourth up-sampled feature map to obtain the fourth fusion feature map; the fourth fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then added with the first down-sampled feature map and the fifth up-sampled feature map to obtain the fifth fusion feature map; the fifth fusion feature map is input into the contrast enhancement layer and then feature extraction is performed to obtain the intermediate feature map.

[0136] In the above process, the four-level downsampling blocks abstract and deepen the coal and rock features. This process not only increases the abstract level of coal and rock data, but also strengthens the model's ability to understand high-level features through further depth increase. Then, after a series of upsampling blocks, adaptive instance normalization and contrast enhancement layers are incorporated, which can not only refine feature details, but also maintain the coherence and consistency of image content, which is different in traditional upsampling methods. In addition, this architecture uses jump connections, which directly combine the low-level features of the downsampling module with the high-level features of the upsampling module, which not only strengthens the transmission of features in the network, but also ensures the preservation of details during image enlargement.

[0137] The ZGAN model introduces detailed features of typical coal and rock three-dimensional characteristic images. These conditional information ensures that it plays an effective guiding role in the generator output process, thereby enhancing the accuracy and quality of the generated images.

[0138] The discriminator of the ZGAN model is a binary classification layer. After receiving the output of the generator of the ZGAN model, the discriminator of the ZGAN model compares the output value with the porosity and average pore length of the six surface images of the scalar value through the binary classification layer to obtain an identification result. Here, since the output value and scalar value of the ZGAN model generator are three-dimensional images, the six surfaces of the three-dimensional image are selected. In this way, the amount of calculation can be reduced. The premise for comparing the porosity and the average pore length is that the sizes of the two are the same, which is 128*128*128 in this specific implementation.

[0139] The discriminator loss of the ZGAN model is,

[0140]

[0141] Among them, D2 represents the discriminator of the ZGAN model, is the expected value of the real sample x output in the discriminator D2 of the ZGAN model, and x is from the real sample distribution P data(x) obtained by sampling; is the expected value of the discriminator D2 output under the data generated by the generator G2 of the ZGAN model, and zc is the output from the prior noise distribution P zc (zc) is a random noise vector sampled from the conditional distribution P. c2 The third conditional variable sampled in (c2) is the permeability of the real sample (3D image); is the gradient penalty term, which is used to ensure that the discriminator D2 satisfies the 1-Lipschitz continuity condition; It is the interpolation point between the real sample and the generated sample, which is used to ensure that the output of the discriminator changes smoothly in the entire input space to avoid training instability; λ2 is the weight of the gradient penalty, and its initial value is 1;

[0142] The loss of the generator of the ZGAN model is,

[0143]

[0144] Among them, G2 represents the generator of the ZGAN model; Represents the expected output of the generated samples of the ZGAN model generator G2 evaluated by the discriminator D2 of the ZGAN model; is the penalty term of the conditional constraint, f(G2(zc,c2)) represents the conditional information extracted from the output of the generator G2 of the ZGAN model, which refers to the quantifiable label of the generated sample. Here, it refers to the permeability of the generated sample; rc2 is the permeability of the real sample; λ cond is the penalty weight of the conditional constraint, and its initial value is set to 0.5;

[0145] In the process of training the ZGAN model, in addition to training the generator through the discriminator of the ZGAN model, it is also necessary to calculate the loss Loss between the generated coal rock 3D image and the target coal rock image. 总 , in order to train the generator of the ZGAN model; Fig.11 As shown, the loss Loss between the three-dimensional coal-rock image generated by the calculation and the target coal-rock image 总 The steps include:

[0146] The generated coal rock three-dimensional image is input into the first FC layer, the second FC layer and the third FC layer respectively. The tortuosity and permeability of the generated coal rock three-dimensional image are obtained through the first FC layer and the second FC layer, and the category of the generated coal rock three-dimensional image is obtained through the third FC layer. The category is divided into two categories: 0 and 1, that is, only whether it is a coal rock image is judged. The tortuosity of the generated coal rock three-dimensional image and the tortuosity of the labeled coal rock image are calculated by loss to obtain Loss1, the permeability of the generated coal rock three-dimensional image and the permeability of the labeled coal rock image are calculated by loss to obtain Loss2, and the category of the generated coal rock three-dimensional image and the category of the labeled coal rock image are calculated by loss to obtain Loss3. The ZGAN model is optimized by the results of Loss1, Loss2 and Loss3. Specifically, the calculation process of Loss1, Loss2 and Loss3 is as follows:

[0147]

[0148]

[0149] Where, tz represents the tortuosity, I represents the actual length of the path, and ol represents the Euclidean distance between the start and end points of the pore path. It should be noted that the tortuosity here refers to the mean tortuosity of all pores in the image; Represents the average tortuosity of samples generated by ZGAN, tz i represents the tortuosity of the i-th three-dimensional path that generates the sample, Represents the average tortuosity value of the real sample, r tzi represents the tortuosity of the ith three-dimensional path of the real sample, and n represents the number of paths;

[0150]

[0151] Where Pe(G2(zc,rc2)) represents the average permeability of the six surfaces of the generated samples (3D images) of the ZGAN generator, is the average permeability of the six surfaces corresponding to the label image;

[0152]

[0153] u i '=u i ×(1-θ)+θ×v

[0154]

[0155] Among them, u i represents the original predicted probability that the i-th sample belongs to the coal and rock category, u i ' represents the predicted probability that the i-th sample belongs to the coal and rock category after adjustment by the smoothing parameter θ and the baseline probability v; the purpose of label smoothing is to prevent the model from being too confident in its own predictions, especially when the categories are very unbalanced, to help the model generalize better. In this specific implementation, v is taken as 0.5 and θ is taken as 0.1; n i is a dynamic weight, which adjusts the weight in the loss based on the difficulty or uncertainty of each sample prediction, so that the model pays more attention to those difficult-to-predict samples. τ1 and τ2 are hyperparameters used to control the baseline and sensitivity of the weight; N is the number of samples;

[0156] Loss 总 =λ3Loss1+λ4Loss2+Loss3

[0157] Among them, λ3 represents the weight value of Loss1, and λ4 represents the weight value of Loss2

[0158] After adopting the above scheme, the final coal rock image is processed to obtain the pore map, such as Figure 12-14 shown. Fig.12 This is a pore distribution map of the entire coal rock sample, which clearly shows the three-dimensional distribution of pores in the entire coal rock, and can clearly observe the size, shape and position of the pores in the coal rock. Fig.13 A cross-section of a coal rock sample is shown, showing the detailed structure of the pores in more detail. From this perspective, the connectivity between the pores and their complex network structure can be clearly seen, which is crucial to understanding the permeability and structural integrity of coal rock. Fig.14A side view is provided, in which the pores in the edge area indicate that the pores are particularly concentrated in these areas or have specific flow channels. This image provides another important perspective on the internal structure of the coal rock, which is helpful for analyzing and generating the physical and chemical properties of the coal rock image. It can be seen that the coal rock image generated by the method of the present invention has a real pore structure.

[0159] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0160] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0161] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for generating three-dimensional coal and rock images based on generative adversarial methods, characterized in that: The steps include: S1. Slice the three-dimensional coal-rock image into a group of two-dimensional coal-rock images, perform pore segmentation processing and feature extraction operations on each two-dimensional coal-rock image in the same group, so as to obtain a segmented fusion image; S1 includes, S101. Segment the two-dimensional coal rock image using a multi-threshold segmentation method; S102. The obtained segmented images with different thresholds are subjected to a feature extraction operation through a first feature extraction network to obtain a first feature map, where the first feature map is composed of a plurality of sub-feature maps; S103. Perform feature fusion on multiple sub-feature maps, and the fused feature map is a segmented fusion image; S2. Add random noise M to the segmented fusion image obtained in S1 and input it into the generator of the first generative adversarial network trained in advance, and then stack the generated multiple two-dimensional images into a three-dimensional image A; S3. extracting a second feature from the coal rock image having typical features through a second feature extraction network; S4. Add noise M1 to the second feature to obtain a typical coal feature map, and input the three-dimensional image A obtained in S2 and the typical coal rock feature map together into the generator of the second generative adversarial network to obtain a generated coal rock three-dimensional image; in the generator of the second generative adversarial network, perform multiple downsampling operations on the three-dimensional image A and perform upsampling operations corresponding to the number of downsampling times on the typical coal rock feature map, and perform a Contast operation after adding the upsampled output and downsampled output of the corresponding size of each level; then input the result of the Contast operation output into the next level, and perform an addition operation together with the upsampled output and downsampled output of the next level; the Contast operation selects at least one from the contrast enhancement operation, the detail and edge enhancement operation, and the dynamic range adjustment operation; In the process of training the second generative adversarial network, in addition to training the generator through the discriminator of the second generative adversarial network, the loss Loss between the generated coal rock 3D image and the labeled coal rock image is also calculated. 总 , in order to train the generator of the second generative adversarial network.

2. According to the method for generating coal rock three-dimensional images based on generative adversarial technology in claim 1, it is characterized in that: The loss function of the first feature extraction network during training is: Among them, y i is the true label, which is 1 for pores and 0 for non-pores; b i is the probability of judging whether there is pore in the i-th sample when the first feature extraction network predicts the i-th sample; h i is the ratio of the number of pores in the i-th sample to the total number of pores; N is the number of samples.

3. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 1, characterized in that: The feature fusion of multiple sub-feature maps is specifically as follows: Among them, F 融合 is the fused segmentation image, F i is the sub-feature map of the coal-rock image segmented by the ith threshold, n is the total number of images; w i Here, the porosity is directly used as the weight, that is, w i =p i , p i is the porosity.

4. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 1, characterized in that: The first feature extraction network and the second feature extraction network are both CMT networks, the CMT network includes three 3*3 convolutional layers, four 2*2 convolutional layers, an average pooling layer and a 1*1 convolutional layer connected in sequence, the output of the 1*1 convolutional layer is the output of the CMT network, and each 2*2 convolutional layer is connected to three LLI modules; The LLI module consists of a local perception unit, a lightweight multi-head self-attention unit, and a residual feedforward network unit connected sequentially; The local perception unit and the lightweight multi-head self-attention unit are both provided with a layer normalization layer; specifically, the local perception unit includes a depthwise separable convolution unit, and the input and output of the depthwise separable convolution unit have a residual structure; The lightweight multi-head self-attention unit includes a K*K deep convolution layer, a fully connected layer 1, a fully connected layer 2, a fully connected layer 3 and a multi-head self-attention mechanism layer; first, the output of the normalization unit after the local perception unit is input to the K*K deep convolution layer with a stride of K and the fully connected layer 1; then, the output of the K*K deep convolution layer is input to the fully connected layer 2 and the fully connected layer 3 respectively; finally, the outputs of the fully connected layer 1, the fully connected layer 2 and the fully connected layer 3 are respectively input to the multi-head self-attention mechanism layer; The residual feedforward network unit includes a first 1*1 convolutional layer, a 3*3 deep convolutional layer, and a second 1*1 convolutional layer connected in sequence. An activation function layer and a normalization layer are arranged after the first 1*1 convolutional layer. The normalized output is input into the 3*3 deep convolutional layer and then residually connected with the output of the first 1*1 convolutional layer. The result after the residual connection is input into the activation function and normalization layer again, and then input into the second 1*1 convolutional layer. A normalization layer is arranged after the second 1*1 convolutional layer.

5. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 1, characterized in that: In S4, the step of adding noise M1 to the second feature to obtain a typical coal characteristic map includes: (1) partitioning the second feature; (2) in each partition, selecting an area with the longest pores or the densest pore distribution, adding noise M1 and random scattered points to this area, and adding random scattered points to other areas except this area, to obtain a typical coal characteristic map, where the noise M1 is random noise and the random scattered points are random holes.

6. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 1, characterized in that: In S3, the coal rock image with typical features comes from the existing public data set Sheared coalsample.

7. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 1, characterized in that: The first generative adversarial network is a SuttonGAN model, the generator of the SuttonGAN model is a plurality of fully connected layers; the discriminator of the SuttonGAN model is a binary classification layer; The discriminator loss of the SuttonGAN model is, Among them, D1 represents the discriminator of the SuttonGAN model, G1 represents the generator of the SuttonGAN model; x represents the real sample, P data (x) represents the true sample distribution; represents the expected output of the discriminator for the real sample distribution; Represents the first conditional variable in the latent space z and the second condition variable The expected output of the generated sample; P z (z) represents the distribution of the latent space z, Represents the first condition variable The distribution of Represents the second condition variable The distribution of the first conditional variable The value of is taken from the average porosity of the six surfaces of the generated sample, and the second condition variable The value of is taken from the average pore length of the six surfaces of the generated sample; p1~p6 represent the porosity of the six surfaces of the generated sample, and l1~l6 represent the average pore length of the six surfaces; Represents the mutual information term, and the calculation formula is, in, represents the generation conditional balancing factor of SuttonGAN discriminator D1, yes and The joint prior probability of Represents a conditional variable and The conditional probability that x satisfies the Gaussian distribution; Mean μ1 and variance σ 2 is a linear function, a2, b2, d, e, v2 and f2 are all parameters of the linear function; express and The joint entropy of jx is the generated sample of SuttonGAN. is known and Generate the probability density function of jx under the condition of ; The generator loss of the SuttonGAN model is, src i Represents the porosity of the i-th slice in the real sample. The purpose of the generator G1 is to minimize the expected output of the discriminator of the SuttonGAN model for the generated data; Among them, Mb represents the generation condition coordination factor of SuttonGAN generator G1, rc1 is the average porosity of the six faces of the real sample; β1 is the coefficient of maximizing the auxiliary classifier, and its initial value is set to 0; λ1 is the coefficient of minimizing the trade-off error, and its initial value is set to 1.

8. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 1, characterized in that: In S4, the second generative adversarial network adopts a ZGAN model, including a generator and a discriminator. In the generator of the ZGAN model, after the three-dimensional image A is input into down-sampling blocks down-block1, down-block2, down-block3, down-block4 and down-block5, the first down-sampling feature map, the second down-sampling feature map, the third down-sampling feature map, the fourth down-sampling feature map and the fifth down-sampling feature map are obtained respectively, and the sizes of these down-sampling feature maps in three dimensions are 1 / 2, 1 / 4, 1 / 8, 1 / 16 and 1 / 32 of the three-dimensional sizes of the input original three-dimensional image respectively; after the typical coal rock feature map is input into up-sampling blocks up-Block1, up-Block2, up-Block3, up-Block4 and up-Block5 in sequence, the first up-sampling feature map, the second up-sampling feature map, the third up-sampling feature map, the fourth up-sampling feature map and the fifth up-sampling feature map are obtained respectively, and the sizes of these up-sampling feature maps in three dimensions are respectively The first fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then the first fusion feature map is added to the fourth down-sampling feature map and the second up-sampling feature map to obtain the second fusion feature map; the second fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then the third down-sampling feature map and the third up-sampling feature map are added to obtain the third fusion feature map; the third fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then the second down-sampling feature map and the fourth up-sampling feature map are added to obtain the fourth fusion feature map; the fourth fusion feature map is input into the adaptive instance normalization layer and the contrast enhancement layer, and then the first down-sampling feature map and the fifth up-sampling feature map are added to obtain the fifth fusion feature map; the fifth fusion feature map is input into the contrast enhancement layer and then the feature extraction operation is performed to obtain the intermediate feature map.

9. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 8, characterized in that: The discriminator of the ZGAN model is a binary classification layer. After receiving the output of the generator of the ZGAN model, the discriminator of the ZGAN model compares the output value with the porosity and average pore length of the six surface images of the scalar value through the binary classification layer to obtain the identification result; The discriminator loss of the ZGAN model is, Among them, D2 represents the discriminator of the ZGAN model, is the expected value of the real sample x output in the discriminator D2 of the ZGAN model, and x is from the real sample distribution P data(x) obtained by sampling; is the expected value of the discriminator D2 output under the data generated by the generator G2 of the ZGAN model, and zc is the output from the prior noise distribution P zc (zc) is a random noise vector sampled from the conditional distribution P c2 The third conditional variable obtained by sampling in (c2), where the value is the permeability of the real sample; is the gradient penalty term, which is used to ensure that the discriminator D2 satisfies the 1-Lipschitz continuity condition; is the interpolation point between the real sample and the generated sample; λ2 is the weight of the gradient penalty; The loss of the generator of the ZGAN model is, Among them, G2 represents the generator of the ZGAN model; Represents the expected output of the generated samples of the ZGAN model generator G2 evaluated by the discriminator D2 of the ZGAN model; is the penalty term of the conditional constraint, f(G2(zc,c2)) represents the conditional information extracted from the output of the generator G2 of the ZGAN model, which refers to the permeability of the generated samples; rc2 is the permeability of the real samples; λ cond is the penalty weight of the conditional constraint.

10. The method for generating three-dimensional coal and rock images based on generative adversarial technology according to claim 1 or 9, characterized in that: The loss between the three-dimensional coal rock image generated by the calculation and the labeled coal rock image 总 The steps include: The generated coal-rock 3D image is input into the first FC layer, the second FC layer and the third FC layer respectively, and the tortuosity and the permeability of the generated coal-rock 3D image are obtained through the first FC layer and the second FC layer, and the category of the generated coal-rock 3D image is obtained through the third FC layer; the category is divided into two categories: 0 and 1, that is, only whether it is a coal-rock image is determined; The tortuosity of the generated coal rock three-dimensional image and the tortuosity of the labeled coal rock image are calculated to obtain Loss1, the permeability of the generated coal rock three-dimensional image and the permeability of the labeled coal rock image are calculated to obtain Loss2, and the category of the generated coal rock three-dimensional image and the category of the labeled coal rock image are calculated to obtain Loss3. The ZGAN model is optimized through the results of Loss1, Loss2, and Loss3; Specifically, the calculation process of Loss1, Loss2, and Loss3 is as follows: Among them, tz represents the tortuosity, l represents the actual length of the path, and ol represents the Euclidean distance between the start and end points of the pore path; Represents the average tortuosity of samples generated by ZGAN, tz i represents the tortuosity of the i-th three-dimensional path that generates the sample, Represents the average tortuosity value of the real sample, r tzi represents the tortuosity of the ith three-dimensional path of the real sample, and n represents the number of paths; Where Pe(G2(zc,rc2)) represents the average permeability of the six surfaces of the generated samples of the ZGAN generator, is the average permeability of the six surfaces corresponding to the label image; in i '=u i ×(1-θ)+θ×v Among them, u i represents the original predicted probability that the i-th sample belongs to the coal and rock category, u i ' represents the predicted probability that the i-th sample belongs to the coal-rock category after adjustment by the smoothing parameter θ and the baseline probability v; n i is the dynamic weight, τ1 and τ2 are hyperparameters used to control the baseline and sensitivity of the weight; N is the number of samples; Loss 总 =λ3Loss1+λ4Loss2+Loss3 Among them, λ3 represents the weight value of Loss1, and λ4 represents the weight value of Loss2.

Citation Information

Patent Citations

  • Single-channel coal rock image enhancement method based on generative adversarial network

    CN115661001A

  • Multi-component three-dimensional gray rock core generation method

    CN118115657A