Rock mass image generation method and equipment based on conditional control diffusion probability model
By using conditions to control the diffusion probability model and conditional embedding module in the generation of rock body images, combine the ResNet50 network, solve the problem of incomparable image quality and authenticity in existing technologies, realize high -quality, controllable and geological rationality rationality. The rock body image is generated.
Patent Information
- Application Number
- CN202411584587.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-07
AI Technical Summary
When generating real rock mass images, the prior art has problems such as insufficient quality and authenticity of generated images, difficulty in accurately controlling the generation process, lack of geological rationality in generated images, and difficulty in taking into account both macro structure and micro texture.
The rock body image generation method based on the condition of controlling the diffusion probability model is used to accurately control geological parameters by constructing conditions, such as rocky, weather, and structural surface parameters. Feature extraction ability.
A high -quality, true and reasonable rock body image can be achieved, which can accurately reflect the geological characteristics of the input, improve the model training effect, and meet the needs of high -quality virtual samples in the field of geological engineering.
Smart Images

Figure CN119379835A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of geological engineering, and in particular to a method and device for generating rock mass images based on a conditionally controlled diffusion probability model. Background Art
[0002] With the rapid development of computer vision technology, image recognition technology has been widely used in various engineering fields, such as engineering geology, where it can be used to identify rock types and rock structure surfaces. However, image recognition technology in many vertical fields is limited by the difficulty in collecting original image data and insufficient data volume, resulting in low recognition accuracy and poor effect of image recognition models. The identification of lithology and rock structure surfaces of rock bodies exposed by tunnel excavation is due to the difficulty in collecting images of rock bodies exposed by excavation, resulting in a serious shortage of training samples.
[0003] In response to this problem, relevant solutions have been proposed in the field. Common methods and processes are mainly:
[0004] (1) Methods based on generative adversarial networks (GANs): YouN et al. (2021) proposed training a progressively growing generative adversarial network (PG-GAN) to generate high-quality two-dimensional cross-section images of digital rocks, and used it to generate high-quality digital rock images of carbonate rocks. Zhao (2020) proposed a new method for reconstructing three-dimensional digital rocks from dense sandstone CT images based on deep convolutional generative adversarial networks (DCGANs), and used 3D convolutions in the generator and discriminator to achieve reconstruction from one-dimensional data to three-dimensional digital rock models. Mosser (2017) also used DCGAN to construct a three-dimensional digital rock generation model, which can be used to reconstruct digital rocks with controllable physical properties at different scales.
[0005] (2) Method based on variational autoencoder (VAE)
[0006] Zhang et al. (2022) proposed using a variational autoencoder (AE) model to unconditionally construct a 3D digital rock generation model using real homogeneous sandstone samples as training sets. Zheng et al. proposed a new deep learning framework called RockGPT, which consists of VQ-VAE and conditional GPT, and synthesizes 3D digital rock samples based on a single 2D slice from the perspective of video generation.
[0007] Although the above methods have made significant progress in the field of digital rock image generation, real rock images are different from digital rock images. Real rock images contain many physical features, including qualitative and quantitative features. When GAN and VAE are applied to rock image generation, there are many deficiencies. The main problems include: 1) the quality and authenticity of the generated images are insufficient; 2) it is difficult to accurately control the generation process, especially for specific geological parameters; 3) the generated images often lack geological rationality; 4) it is difficult to simultaneously take into account the generation of macrostructures and microtextures. In addition, most methods do not make full use of geological knowledge to guide the generation process.
[0008] Given the limitations of existing methods, there is a need for a method that can generate high-quality, more realistic and reasonable rock images based on specific geological parameters. Summary of the invention
[0009] The purpose of the present invention is to overcome the above-mentioned deficiencies in the prior art and to provide a method and device for generating rock mass images based on a conditionally controlled diffusion probability model.
[0010] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:
[0011] A rock mass image generation method based on a conditional controlled diffusion probability model comprises the following steps:
[0012] a: inputting the required parameters of the rock mass image to be generated into the pre-built conditional controlled diffusion probability model; the required parameters include the geological parameters of the rock mass image to be generated and the number of generated images;
[0013] b: Output the rock mass image corresponding to the required parameters;
[0014] The pre-construction of the conditional controlled diffusion probability model includes the following steps:
[0015] S1: Construct rock mass image dataset;
[0016] S2: Establish a condition vector; the condition vector is a vector composed of geological parameter codes;
[0017] S3: Building a conditional controlled diffusion probability model; the conditional controlled diffusion probability model is based on the DDPM model and also includes a conditional embedding module;
[0018] S4: Performing model training on the conditional controlled diffusion probability model, and outputting the conditional controlled diffusion probability model after the model converges.
[0019] As a preferred embodiment of the present invention, S1 comprises the following steps:
[0020] S11: Acquire rock mass image data;
[0021] S12: Preprocessing and data annotation of the rock mass image data; the preprocessing includes image cropping and alignment, illumination and color correction, noise removal and geometric transformation processing; the data annotation is geological parameter annotation.
[0022] As a preferred solution of the present invention, the expression of the conditional vector is:
[0023] c=[c r , c w , c s ],
[0024] Among them, c is the conditional vector, c r is the lithology vector, c w is the weathering degree vector, c s is the structural surface parameter vector.
[0025] As a preferred solution of the present invention, the structural surface parameter vector c s The expression is:
[0026] c s =[num_fractures,avg_length,num_groups,dominant_dips],
[0027] Where num_fractures is the number of fractures, avg_length is the average length of the fractures, num_groups is the number of fracture groups, and dominant_dips is the dominant dip.
[0028] As a preferred solution of the present invention, the lithology vector and the weathering degree vector are encoded using One-Hot coding, and the structural surface parameter vector is directly input using numerical values.
[0029] As a preferred solution of the present invention, the conditional embedding module is composed of a plurality of conditional coding residual blocks and convolutional layers; the conditional coding residual block includes a first convolutional block, a time embedding block, a conditional embedding block and a second convolutional block connected in sequence;
[0030] The first convolution block is used for initial feature extraction;
[0031] The time embedding block is used to encode time step information;
[0032] The condition embedding block is used to process the geological parameter condition vector;
[0033] The second convolution block is used for feature integration.
[0034] As a preferred solution of the present invention, it also includes replacing the backbone network in the U-Net framework of the DDPM model with a ResNet50 network.
[0035] As a preferred solution of the present invention, the loss function of the conditionally controlled diffusion probability model adopts a reconstruction loss function, and its expression is:
[0036]
[0037] Among them, L recon is the reconstruction loss function; is the expected value; x0 is the initial sample of the data; ∈ is the Gaussian noise added to the image; t is the time step; ∈ θ (x t ,t,c) is the noise prediction function of the model, which indicates the model’s prediction value for noise∈, θ is the model parameter, x t is the image generated at time step t, and c is the conditional vector information.
[0038] As a preferred solution of the present invention, the batch size of the model training in S4 is set to 8; the initial value of the learning rate is set to 1e-4 and is scheduled by cosine annealing; the optimizer uses Adam; the number of training rounds is set to 500 epochs; and the data enhancement method uses random cropping, horizontal flipping and / or color jittering.
[0039] A rock image generation device based on a conditional controlled diffusion probability model comprises at least one processor and a memory connected to the at least one processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the methods described above.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention proposes a method and device for generating rock images based on a conditionally controlled diffusion probability model by combining the current diffusion model and the characteristics of real rock images. By introducing an accurate conditional control mechanism, accurate control of geological parameters (such as lithology, degree of weathering, crack distribution, etc.) is achieved, and the generated image can highly realistically reflect the input geological characteristics. This technology not only meets the demand for high-quality virtual samples in the field of geological engineering, but also greatly improves the training effect of related models. Through multi-scale feature extraction strategies and geological constraints, high-quality, controllable and geologically reasonable rock image generation is achieved. This method can not only meet the demand for a large number of high-quality rock images in the field of geological engineering, but also provide new possibilities for related research and applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of a method for generating a rock mass image based on a conditionally controlled diffusion probability model according to Embodiment 1 of the present invention;
[0043] Figure 2 It is a schematic diagram of the principle of the conditional controlled diffusion probability model in the rock mass image generation method based on the conditional controlled diffusion probability model described in Example 2 of the present invention;
[0044] Figure 3 It is a schematic diagram of the principle of embedding a conditional vector into a U-Net framework in a rock mass image generation method based on a conditionally controlled diffusion probability model described in Example 2 of the present invention;
[0045] Figure 4 It is a structural schematic diagram of a conditional coding residual block in a rock mass image generation method based on a conditional controlled diffusion probability model described in Example 2 of the present invention;
[0046] Figure 5 A schematic diagram of a rock mass image generated by an experimental example in a rock mass image generation method based on a conditionally controlled diffusion probability model described in Example 2 of the present invention;
[0047] Figure 6 This is a structural schematic diagram of a rock mass image generation device based on a conditional controlled diffusion probability model described in Example 3 of the present invention, which utilizes the rock mass image generation method based on a conditional controlled diffusion probability model described in Example 1. DETAILED DESCRIPTION
[0048] The present invention is further described in detail below in conjunction with test examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following embodiments, and all technologies realized based on the content of the present invention belong to the scope of the present invention.
[0049] Example 1
[0050] like Figure 1 As shown, a rock mass image generation method based on a conditional controlled diffusion probability model comprises the following steps:
[0051] a: Input the required parameters of the rock mass image to be generated into the pre-built conditional controlled diffusion probability model; the required parameters include the geological parameters of the rock mass image to be generated and the number of generated images.
[0052] b: Output the rock mass image corresponding to the required parameters.
[0053] The pre-construction of the conditional controlled diffusion probability model includes the following steps:
[0054] S1: Construct rock mass image dataset.
[0055] S2: Establish a conditional vector; the conditional vector is a vector composed of geological parameter codes.
[0056] S3: Building a conditional controlled diffusion probability model; the conditional controlled diffusion probability model is based on the DDPM model and also includes a conditional embedding module.
[0057] S4: Performing model training on the conditional controlled diffusion probability model, and outputting the conditional controlled diffusion probability model after the model converges.
[0058] Example 2
[0059] This embodiment is a specific implementation of the rock mass image generation method based on the conditional controlled diffusion probability model described in Embodiment 1, and includes the following steps:
[0060] a: Input the required parameters of the rock mass image to be generated into the pre-built conditional controlled diffusion probability model; the required parameters include the geological parameters of the rock mass image to be generated and the number of generated images.
[0061] b: Output the rock mass image corresponding to the required parameters.
[0062] The pre-construction of the conditional controlled diffusion probability model includes the following steps:
[0063] S1: Construct rock mass image dataset.
[0064] Dataset construction is the basis of the present invention, and its purpose is to create a high-quality and diverse rock image dataset for model training and verification. The rock image dataset consists of image data and corresponding annotation data. The image data is a high-resolution rock image in PNG or TIFF format (the recommended resolution is not less than 1024x1024 pixels), and the annotation data is a json format file containing geological parameter information for each image. The geological parameter information includes lithology, degree of weathering, and structural surface parameters (number of cracks, average length of cracks, number of crack groups, and dominant inclination). Specifically, the following steps are included:
[0065] S11: Acquire rock mass image data; the image data mainly comes from the rock mass images of the tunnel face exposed by excavation taken at the tunnel construction site.
[0066] S12: Preprocessing and data annotation of the rock mass image data; the preprocessing includes image cropping and alignment, lighting and color correction, noise removal, and geometric transformation processing (rotation, flipping, scaling); the data annotation is geological parameter annotation, and professional geological engineering performs parameter annotation on each image, including lithology, weathering degree, and structural surface parameters (quantity, length, number of groups, and dominant inclination).
[0067] S2: Establish a conditional vector; the conditional vector is a vector composed of geological parameter codes.
[0068] In the process of rock mass image generation, the characteristics of the generated image often depend on specific geological parameters, such as lithology, weathering degree, structural surface parameters, etc. These parameters not only determine the macroscopic structural characteristics of the rock mass, but also affect its microscopic texture details. In order to ensure that the generated rock mass image can accurately reflect these complex geological characteristics, the present invention proposes the concept of "conditional vector". The design of the conditional vector aims to represent the geological parameters numerically and use them as input to guide the generation process, so that the generated rock mass image is both visually realistic and geologically reasonable.
[0069] The purpose of designing condition vectors is to convert complex, multi-dimensional geological parameters into a unified numerical format that can be processed by computers, so that the image generation effect can be effectively controlled during the image generation process. By embedding key geological parameters into the model, the generated image can capture the physical characteristics corresponding to these conditions, realizing precise control of the generation process.
[0070] The condition vector is the key to control the generation process, which contains the key geological parameters of the rock mass. The condition vector will be explained in detail below:
[0071] (1) Composition of conditional vector:
[0072] The conditional vector is composed of three types of parameters, namely lithology, weathering degree and structural surface parameters. In order to better represent these different types of parameters, the present invention adopts different encoding methods to ensure that the conditional vector can express both discrete category information and continuous quantitative information. The expression of the conditional vector is:
[0073] c=[c r , c w , c s ],
[0074] Among them, c is the conditional vector; c r is the lithology vector, used to represent the lithology category; c w is the weathering degree vector, which is used to represent the weathering condition of the rock mass; c s is a structural surface parameter vector, which is used to represent the number, length, number of groups and dominant inclination of cracks.
[0075] (2) Encoding method of conditional vector parameters:
[0076] According to the characteristics of geological parameters, a suitable encoding method is selected. The selection of each encoding method is based on the essential properties of the parameters (discrete or continuous), ensuring that the generated model can better handle different types of input information.
[0077] ① Lithology coding
[0078] Lithology parameters are discrete category features, and different lithologies represent different rock types, such as sandstone, mudstone, limestone, and granite. This embodiment uses One-Hot encoding to represent lithology. One-Hot encoding is suitable for processing discrete features, and it maps each lithology into a unique binary vector. This method can ensure that different lithologies are independent of each other and does not introduce additional order or size relationships.
[0079] For example: r =(r1, r2, r3, r4); r1, r2, r3, r4 represent sandstone, mudstone, limestone and granite respectively.
[0080] ②Weathering degree coding
[0081] The degree of weathering is also a discrete feature, indicating the weathering of the rock mass, including slight weathering, moderate weathering, and strong weathering. This embodiment also uses One-Hot coding to indicate the degree of weathering. The degree of weathering is discrete classification information, similar to lithology. Using One-Hot coding can effectively distinguish different weathering states and ensure that each degree of weathering can be independently controlled during the generation process.
[0082] For example: c w =(w1,w2,w3), w1,w2,w3 represent slightly weathered, moderately weathered, and strongly weathered respectively.
[0083] ③Structural surface parameter coding
[0084] The structural surface parameters include the number of fractures, the average length of fractures, the number of fracture groups and the dominant inclination. Among these parameters, the number of fractures and the average length are continuous values, the number of fracture groups is a discrete value, and the dominant inclination is closely related to the number of fracture groups, with each fracture group corresponding to a dominant inclination. Therefore, it is necessary to ensure that these parameters can be handled uniformly in the design to simplify the learning process of the model and facilitate the subsequent generation of new rock mass images.
[0085] In order to make it easier for the model to understand and process these structural parameters, we choose not to perform additional encoding, but directly input the values into the conditional vector. This approach not only simplifies the construction of the vector, but also ensures the flexibility of the generation process and the interpretability of the parameters.
[0086] Furthermore, the expression of the structural surface parameter vector cs is:
[0087] c s =[num_fractures,avg_length,num_groups,dominant_dips],
[0088] Where: num_fractures is the number of fractures, num_fractures∈[0,∞). For example, an input value of 10 means there are 10 fractures in the rock mass.
[0089] avg_length is the average length of the crack, avg_length∈[0,∞). For example, an input value of 5 means the average length of the crack is 5 meters.
[0090] num_groups is the number of fracture groups, For example, an input value of 3 indicates that there are three fracture groups in the rock mass.
[0091] dominant_dips is the dominant dip angle, which is linked to the number of fracture groups and indicates the dip angle corresponding to each fracture group. dominant_dips = [dip1, dip2, dip3, ..., dip i ], for example, if there are 3 fracture groups, the dominant dips may be dominant_dips = [45°, 60°, 30°].
[0092] The final structural surface parameter vector is expressed as:
[0093] c s =[num_fractures,avg_length,num_groups,dominant_dips], for example, a
[0094] The structural plane parameters of the rock mass may be cs = [10, 5.2, 3, [45°, 60°, 30°]]. This vector clearly represents the number of cracks in the rock mass, the average length, the number of crack groups and the dominant inclination of each crack group.
[0095] (3) Conditional vector generation
[0096] The final conditional vector is composed of the above encodings:
[0097] c=Concatenate([c r ,c w ,c s ]),
[0098] The final conditional vector is a high-dimensional vector of uniform length, which can effectively express complex geological features and serve as a control variable for generating rock mass images. Through such a design, the conditional vector can accurately control the lithology, weathering degree and fracture characteristics during the image generation process, ensuring that the generated image not only conforms to the input geological parameters, but also meets the geological rationality in practical applications.
[0099] The lithology vector and the weathering degree vector are encoded using One-Hot coding, and the structural surface parameter vector is directly input using numerical values.
[0100] S3: Build a conditional control diffusion probability model; the conditional control diffusion probability model uses the DDPM model as a framework and also includes a conditional embedding module. Specifically, the conditional control diffusion probability model will be described in detail below:
[0101] (1) The basic framework of the conditional controlled diffusion probability model
[0102] The conditional diffusion probability model (Conditional DDPM) is an optimization improvement based on the diffusion model. Its core idea is to gradually transform random noise into the target image and use the conditional vector to control the specific properties of the generation process. Specifically, the generation process of DDPM is divided into two steps: the forward diffusion process and the reverse denoising process.
[0103] Forward diffusion process: gradually add noise to the real image until it becomes pure noise.
[0104] Inverse denoising process: Starting from the noise, the noise is gradually removed through the learned denoising model to reconstruct the rock image with specified geological parameters.
[0105] like Figure 2 As shown, in the conditional controlled diffusion probability model, geological parameters are embedded as conditional vectors in each step of the model's denoising process to ensure that the generated image can accurately reflect these parameters. The present invention adopts the basic framework of the conditional controlled diffusion probability model and controls the specific geological features of the generated rock mass image by introducing geological conditions (lithology, weathering degree and structural surface parameters).
[0106] (2) Building a conditional embedding module
[0107] The conditional embedding module is the core part of the conditional controlled diffusion probability model, which is used to convert geological parameters into numerical vectors and provide guidance for each step in the generation process. The conditional vectors include lithology, weathering degree and structural surface parameters (such as the number of fractures, average length, number of fracture groups and dominant dip). These parameters are processed through different encoding methods to ensure that the model can handle discrete and continuous data.
[0108] The specific design and embedding process of conditional vectors: Figure 3 As shown in the figure, the discrete and continuous parameters are uniformly converted into an embedding vector of fixed dimension, and the conditional vector is further embedded into the downsampling and upsampling blocks in the U-Net framework of the DDPM model, so that DDPM has the ability to conditionally control the generation of rock images.
[0109] Furthermore, the conditional embedding module is composed of several conditional coding residual blocks and convolutional layers; Figure 4 As shown, each conditional coding residual block contains four core parts in sequence:
[0110] The first convolutional block: used for initial feature extraction; Figure 4 As shown in (2), it is denoted as convolution block 1, which consists of Conv2D, BatchNorm and ReLU.
[0111] Time Embedding Block: used to encode time step information, such as Figure 4 As shown in (3), it includes temporal position encoding, linear layer and temporal feature activation.
[0112] Conditional embedding block: used to process geological parameter condition vectors (including lithology, weathering degree and structural surface parameters), such as Figure 4 As shown in (4), it includes conditional vector input, conditional projection and conditional feature activation. The conditional vector is composed of Figure 4 As shown in (5).
[0113] The second convolutional block is used for feature integration, such as Figure 4 As shown in (2), it is denoted as convolution block 2, which consists of Conv2D, BatchNorm and ReLU.
[0114] These conditional coding residual blocks are strategically inserted into the downsampling blocks, intermediate residual layers, and upsampling blocks of the U-Net architecture, ensuring the effective transmission of information through residual connections, thereby achieving precise control of the image generation process at different scales by conditional information, so that the generated rock images can accurately reflect the input geological parameter characteristics.
[0115] (3) Improve U-Netbackbone
[0116] In the standard DDPM model, the U-Net structure is widely used in image generation tasks. In order to better capture the complex features in rock mass images, the present invention replaces the backbone network of U-Net with ResNet50. ResNet50 is a widely used deep residual network that solves the problem of gradient vanishing in deep networks through residual connections, and can effectively improve the stability and feature extraction capabilities of the model during image generation.
[0117] The specific improvements are as follows:
[0118] ① Residual connection: Through the residual structure, ResNet50 can better capture the multi-scale feature information in rock images, especially the representation of fine-grained geological features (such as crack texture, weathering traces, etc.) is more accurate.
[0119] ② Improved feature extraction capability: Compared with traditional U-Net, ResNet50 has stronger feature extraction capability, especially when processing high-resolution rock images, it can effectively capture the macro structure and micro texture of the rock.
[0120] In the model framework, ResNet50 is used to replace U-Net as the encoder, which extracts image features of different scales from the input noisy image and embeds the conditional vectors into each level of the feature extraction process, so that the model can fully consider the input geological parameters when generating rock images.
[0121] (4) Constructing the loss function
[0122] During the model training process, the reconstruction loss function (Lrecon) is used to optimize the generation effect of the model by comparing the pixel difference between the generated image and the real image. The goal of the reconstruction loss is to ensure that the generated image is similar to the real image. By optimizing the reconstruction loss, the model can generate high-quality rock images and ensure that the images are visually consistent with the real rock images. Its expression is:
[0123]
[0124] Among them, L recon is the reconstruction loss function; is the expected value; x0 is the initial sample of the data; ∈ is the Gaussian noise added to the image; t is the time step, which is used to represent the steps of the diffusion process; ∈ θ (x t ,t,c) is the noise prediction function of the model, which indicates the model’s prediction value for noise∈, θ is the model parameter, x t is the image generated at time step t, and c is the conditional vector information.
[0125] This method introduces a reconstruction loss function in combination with geological knowledge, ensuring that the generated image is not only visually realistic, but also geologically reasonable. In comparative experiments, the images generated by the present invention show higher authenticity and detail retention in visual effects compared with existing methods, especially in the restoration of rock texture and fracture structure. The test results show that the similarity between the generated image and the real rock image in structure and texture is significantly improved, and the consistency of geological features is more in line with the actual situation, reflecting the significant improvement of the image generation quality of this method.
[0126] S4: Performing model training on the conditional controlled diffusion probability model, and outputting the conditional controlled diffusion probability model after the model converges.
[0127] ① Training goal: minimize the reconstruction loss error, optimize the generation effect of the model by comparing the pixel differences between the generated image and the real image, ensure that the generated rock image conforms to the input geological parameters, and maintain its geological rationality.
[0128] ②Training parameter settings:
[0129] a) Batch size: 8;
[0130] b) Learning rate: Initially 1e-4, using cosine annealing scheduling;
[0131] c) Optimizer: Adam;
[0132] d) Number of training rounds: 500 epochs;
[0133] e) Data enhancement: random cropping, horizontal flipping, and color jittering.
[0134] Furthermore, the following is an experimental example of simulating and generating a rock mass image with specific parameters using the conditionally controlled diffusion probability model constructed by the method described in this embodiment:
[0135] The required parameters are:
[0136] ① Rock type: sandstone; ② Weathering degree: moderate weathering; ③ Number of fractures: 21; ④ Average length of fractures: 0.55m; ⑤ Number of fracture groups: 3 groups; ⑥ Predominant fracture inclination angle: [22°, 60°, 86°]; ⑦ Number of generated images: 3.
[0137] The demand parameters are input into the constructed conditional control diffusion probability model, such as Figure 5 As shown, the generated image shows the typical texture characteristics of sandstone, the crack distribution is clear, and the inclination and length of the cracks meet the preset parameters. The image quality is high and has a high degree of geological rationality, which is in line with the expectations of the present invention.
[0138] Example 3
[0139] like Figure 6 As shown, a rock mass image generation device based on a conditional controlled diffusion probability model includes at least one processor, a memory connected to the at least one processor, and at least one input / output interface connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the rock mass image generation method based on the conditional controlled diffusion probability model described in the above embodiment. The input / output interface may include a display, a keyboard, a mouse, and a USB interface for inputting and outputting data.
[0140] Those skilled in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc. Various media that can store program codes.
[0141] When the above-mentioned integrated unit of the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A rock mass image generation method based on a conditional controlled diffusion probability model, characterized in that: The following steps are involved: a: Input the required parameters of the rock mass image to be generated into the pre-built conditional controlled diffusion probability model; The required parameters include geological parameters of the rock mass images to be generated and the number of images to be generated; b: Output the rock mass image corresponding to the required parameters; The pre-construction of the conditional controlled diffusion probability model includes the following steps: S1: Construct rock mass image dataset; S2: Establish a condition vector; the condition vector is a vector composed of geological parameter codes; S3: Building a conditional controlled diffusion probability model; the conditional controlled diffusion probability model is based on the DDPM model and also includes a conditional embedding module; S4: Performing model training on the conditional controlled diffusion probability model, and outputting the conditional controlled diffusion probability model after the model converges.
2. The rock mass image generation method based on the conditional controlled diffusion probability model according to claim 1 is characterized in that: The S1 comprises the following steps: S11: Acquire rock mass image data; S12: Preprocessing and data annotation of the rock mass image data; the preprocessing includes image cropping and alignment, illumination and color correction, noise removal and geometric transformation processing; the data annotation is geological parameter annotation.
3. The rock mass image generation method based on the conditional controlled diffusion probability model according to claim 1 is characterized in that: The expression of the conditional vector is: c=[c r ,c w ,c s ], Among them, c is the conditional vector, c r is the lithology vector, c w is the weathering degree vector, c s is the structural surface parameter vector.
4. The rock mass image generation method based on the conditional controlled diffusion probability model according to claim 3 is characterized in that: The structural surface parameter vector c s The expression is: c s =[num_fractures,avg_length,num_groups,dominant_dips], Where num_fractures is the number of fractures, avg_length is the average length of the fractures, num_groups is the number of fracture groups, and dominant_dips is the dominant dip.
5. The rock mass image generation method based on the conditional controlled diffusion probability model according to claim 4 is characterized in that: The lithology vector and the weathering degree vector are encoded using One-Hot coding, and the structural surface parameter vector is directly input using numerical values.
6. The rock mass image generation method based on the conditional controlled diffusion probability model according to claim 1 is characterized in that: The conditional embedding module is composed of a plurality of conditional coding residual blocks and convolutional layers; the conditional coding residual block includes a first convolutional block, a time embedding block, a conditional embedding block and a second convolutional block connected in sequence; The first convolution block is used for initial feature extraction; The time embedding block is used to encode time step information; The condition embedding block is used to process the geological parameter condition vector; The second convolution block is used for feature integration.
7. The rock mass image generation method based on the conditional controlled diffusion probability model according to claim 1 is characterized in that: It also includes replacing the backbone network in the U-Net framework of the DDPM model with a ResNet50 network.
8. The method for generating rock mass images based on a conditionally controlled diffusion probability model according to claim 1, characterized in that: The loss function of the conditional controlled diffusion probability model adopts a reconstruction loss function, and its expression is: Among them, L recon is the reconstruction loss function; is the expected value; x0 is the initial sample of the data; ∈ is the Gaussian noise added to the image; t is the time step; ∈ θ (x t ,t,c) is the noise prediction function of the model, which indicates the model’s prediction value for noise∈, θ is the model parameter, x t is the image generated at time step t, and c is the conditional vector information.
9. The rock mass image generation method based on the conditional controlled diffusion probability model according to claim 1 is characterized in that: The batch size of the model training in S4 is set to 8; the initial value of the learning rate is set to 1e-4 and scheduled by cosineannealing; the optimizer uses Adam; the number of training rounds is set to 500 epochs; Data augmentation is done by random cropping, horizontal flipping, and / or color jittering.
10. A rock mass image generation device based on a conditional controlled diffusion probability model, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Automatic inversion method for joint development tunnel surrounding rock mechanical parameters
CN114169238A
Multi-condition constraint three-dimensional digital core generation method based on diffusion model
CN117830510A
Systems and methods for medical images denoising using deep learning
WO2024226421A1