A geological texture synthesis method and device based on a GAN network

CN117576177BActive Publication Date: 2026-10-09CHINA RAILWAY SIYUAN SURVEY & DESIGN GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311585938.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-22
Publication Date
2026-10-09
Estimated Expiration
2043-11-22

AI Technical Summary

Technical Problem

[0004]本发明提供一种基于GAN网络的地质纹理合成方法及装置,用以解决参数化合成方法和非参数化合成方法的存在的忽略纹理全局构造、纹理结构错误、边界痕迹明显和计算难以收敛的问题,以提高地质纹理图像合成方法的鲁棒性和纹理图像合成质量,实现高质量且具有完整性和连贯性的地质纹理合成

Benefits of technology

[0022]Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the geological texture synthesis method based on GAN network as described above.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117576177B_ABST
    Figure CN117576177B_ABST
Patent Text Reader

Abstract

The application provides a geological texture synthesis method and device based on a GAN network, and belongs to the technical field of image processing. The method comprises the following steps: cutting a given geological sample texture into a plurality of texture blocks to obtain a training set; constructing a geological texture synthesis model based on a generator and a discriminator of a generative adversarial network; training the generator using the training set and expected geometric transformation parameters to generate a texture image of an expected output shape; training the discriminator using the texture image of the expected output shape and an input sample image; alternately training the generator and the discriminator based on a preset loss function to obtain a trained geological texture synthesis model; and synthesizing a geological texture image using the trained geological texture synthesis model. The application realizes effective training and optimization of the texture synthesis model, so that the model can generate a high-quality, complete and coherent geological texture synthesis image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and apparatus for synthesizing geological textures based on GAN networks. Background Technology

[0002] In the process of 3D model rendering, texture mapping is a fast and effective method to enhance the realism of a model. Texture mapping refers to mapping a texture image onto the surface of a given 3D model to enhance its realism. However, current geological 3D models generally use colors or simple lines overlaid with colors as texture maps, which cannot express the rich surface geometric details and lighting details of 3D geological models, resulting in insufficient realism. The reason why 3D geological models cannot use natural geological textures as texture map resources is due to the non-uniformity of natural geological textures and the limitations of the size of the texture area that can be obtained.

[0003] Geological textures are characterized by their non-uniformity and large scale. Current texture synthesis methods still face challenges when synthesizing highly non-uniform textures based on samples, or textures exhibiting large-scale or global structures. Texture synthesis methods are mainly parametric and non-parametric. Non-parametric texture synthesis primarily involves pixel-based and patch-based methods. Traditional pixel-based and patch-based methods suffer from ignoring the global texture structure, resulting in obvious boundary marks and texture structure errors when synthesizing such textures. Parametric texture synthesis methods, on the other hand, suffer from computational convergence difficulties, blurring, and artifacts. Summary of the Invention

[0004] This invention provides a geological texture synthesis method and apparatus based on GAN network to solve the problems of neglecting the global texture structure, texture structure errors, obvious boundary traces and difficulty in convergence of parametric and non-parametric synthesis methods. It aims to improve the robustness and texture image synthesis quality of geological texture image synthesis methods and achieve high-quality geological texture synthesis with integrity and coherence.

[0005] In a first aspect, the present invention provides a geological texture synthesis method based on a GAN network, comprising: cropping a given geological sample texture into several texture blocks to obtain a training set; constructing a geological texture synthesis model based on a generator and a discriminator of an adversarial network; training the generator using the training set and desired geometric transformation parameters to generate a texture image with a desired output shape; wherein the desired geometric transformation parameters are randomly set in each iteration of the generator; training the discriminator using the texture image with the desired output shape and the input sample image; alternatingly training the generator and the discriminator based on a preset loss function to obtain a trained geological texture synthesis model; and synthesizing a geological texture image using the trained geological texture synthesis model.

[0006] According to the present invention, a geological texture synthesis method based on GAN network is provided, wherein the size of the texture block is determined according to the sharpness and size of the geological texture image to be synthesized.

[0007] According to the present invention, a geological texture synthesis method based on a GAN network is provided, wherein the generator is fully convolutional, has a U-Net architecture and skip connections, and the bottleneck structure of the generator is composed of ResNet sequence modules; wherein the ResNet sequence modules include: InceptionV2, ResSK and ResBlock.

[0008] According to the present invention, a method for synthesizing geological textures based on a GAN network is provided, which trains the discriminator using a texture image of the desired output shape and an input sample image, including: adjusting the input image to different scales; running the corresponding PatchGAN at each scale to obtain the result image at each scale; and performing weighted aggregation on the result images at each scale according to a scale weight list to obtain the judgment result of the input image.

[0009] According to the present invention, a geological texture synthesis method based on a GAN network is provided. Based on a preset loss function, the generator and the discriminator are trained alternately to obtain a trained geological texture synthesis model. The loss function of the geological texture synthesis model is set to a hybrid loss function containing multiple different losses. When the loss function is less than or equal to a preset threshold or the number of training iterations is greater than or equal to a preset number, the training of the geological texture synthesis model is stopped, and the trained geological texture synthesis model is obtained.

[0010] According to the geological texture synthesis method based on GAN network provided by the present invention, the loss function of the geological texture synthesis model is set as a hybrid loss function L containing multiple different losses, specifically:

[0011] L = L GAN +βL reconst+γL SWD ;

[0012] Among them, L GAN Indicating resistance to loss, L SWD This represents the Sliced ​​Wasserstein distance loss based on VGG19, L reconst β represents the reconstruction loss; β represents the loss weight of the reconstruction loss, and γ represents the loss weight of the Sliced ​​Wasserstein distance loss, β+γ=1.

[0013] According to the present invention, a geological texture synthesis method based on a GAN network is provided, which uses a trained geological texture synthesis model to synthesize geological texture images, including: inputting a texture sample image into the geological texture synthesis model, and setting the desired geometric transformation parameters as additional input to set the size of the corresponding generated geological texture image.

[0014] Secondly, the present invention also provides a geological texture synthesis device based on a GAN network, comprising:

[0015] The first processing module is used to crop the given geological sample texture into several texture blocks to obtain a training set;

[0016] The second processing module is used to construct a geological texture synthesis model based on an adversarial network-based generator and discriminator.

[0017] The third processing module is used to train the generator using the training set and the desired geometric transformation parameters to generate a texture image of the desired output shape; wherein the desired geometric transformation parameters are randomly set in each iteration of the generator;

[0018] The fourth processing module is used to train the discriminator using the texture image of the desired output shape and the input sample image;

[0019] The fifth processing module is used to alternately train the generator and the discriminator based on a preset loss function to obtain a trained geological texture synthesis model.

[0020] The sixth processing module is used to synthesize geological texture images using the trained geological texture synthesis model.

[0021] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the geological texture synthesis method based on GAN network as described above.

[0022] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the geological texture synthesis method based on GAN network as described above.

[0023] The geological texture synthesis method and apparatus based on GAN network provided by this invention overcomes the problems of neglecting the global texture structure, texture structure errors, obvious boundary traces and difficulty in convergence of parametric and non-parametric synthesis methods. It improves the robustness and texture image synthesis quality of geological texture image synthesis method, and realizes high-quality geological texture synthesis with integrity and coherence.

[0024] This invention proposes a method for geological texture synthesis based on Generative Adversarial Networks (GANs). The generator model, employing a U-Net architecture and skip connections, effectively preserves the correlations between texture features, resulting in more coherent synthesis results. Simultaneously, ResNet sequence modules, including InceptionV2, ResSK, and ResBlock, capture the large-scale structure and features of geological textures. Furthermore, by introducing a reconstruction loss function and a VGG19-based Sliced ​​Wasserstein distance loss, effective training and optimization of the texture synthesis model are achieved, enabling the model to generate high-quality, complete, and coherent geological texture images. This enhances the realism and visual appeal of geological models, strengthens the presentation of geological information, and brings new possibilities to geological simulation, research, and virtual environment creation. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0026] Figure 1 This is a flowchart illustrating the geological texture synthesis method based on GAN network provided by the present invention.

[0027] Figure 2 This is a generalized network structure diagram of the GAN network provided by the present invention;

[0028] Figure 3 This is a network structure diagram of the generator provided by the present invention;

[0029] Figure 4 This is a network structure diagram of the discriminator provided by the present invention;

[0030] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0032] It should be noted that, in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0033] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more.

[0034] The following is combined with Figures 1-5 This invention describes the geological texture synthesis method and apparatus based on GAN networks provided in embodiments of the present invention.

[0035] Figure 1 This is a flowchart illustrating the geological texture synthesis method based on GAN networks provided by this invention, as shown below. Figure 1 As shown, including but not limited to the following steps:

[0036] Step 101: Crop the given geological sample texture into several texture blocks to obtain the training set.

[0037] Optionally, the size of the texture block is determined based on the sharpness and size of the geological texture image to be synthesized.

[0038] Specifically, a controllable texture block clipping area can be set according to the size of its pixels. If the pixels of the geological texture image to be synthesized are clear and small in size, they can be clipped to smaller texture blocks to save computing resources.

[0039] Step 102: Construct a geological texture synthesis model based on the generator and discriminator of the adversarial network;

[0040] Generative Adversarial Networks (GANs) are an unsupervised learning method. In its standard form, it consists of two neural networks: a generator G and a discriminator D. The generator attempts to create realistic samples to deceive the discriminator, which tries to distinguish between real and fake samples—that is, whether a given image is a real image or a generated fake sample. Because their goals are opposite, their abilities can improve each other through continuous dynamic game-like interaction. The model training process involves allowing them to learn from each other through this game-like interaction until the generator can eventually win. At this point, the result generated by G is sufficient for the discriminator D to determine whether a random sample is real or fake.

[0041] Step 103: Train the generator using the training set and the desired geometric transformation parameters to generate a texture image of the desired output shape; wherein, the desired geometric transformation parameters are randomly set in each iteration of the generator;

[0042] Figure 2 This is a generalized network structure diagram of the GAN network provided by the present invention. Figure 3 This is a network structure diagram of the generator provided by the present invention. In the generator G of the present invention, in each forward propagation, the expected geometric transformation parameters (including geometric parameters and corresponding affine transformation parameters) of the geometric transformation T are input as additional inputs to the generator after the first convolutional layer T of the generator G. T transforms the feature map into the desired output geometry.

[0043] The geometric transformation T implements a parameterless training generator during training (the parameters of T are randomly sampled at each iteration) to transform the input image to any size, shape, or aspect ratio when generating images using G after training is complete.

[0044] The principle is as follows: First, the input image tensor is expanded in dimension and its size is changed to facilitate the subsequent transformation of the input image to the target image. An affine transformation matrix is ​​generated based on the affine parameters, and then the corresponding affine-transformed two-dimensional flow field is generated. The input image is then bilinearly sampled according to this two-dimensional flow field to obtain the image with the desired geometry.

[0045] Reference Figure 2 The generator is fully convolutional, featuring a U-Net architecture and skipped connections. The bottleneck structure of the generator consists of ResNet sequence modules; these ResNet sequence modules include InceptionV2, ResSK, and ResBlock. Its specific structure is as follows:

[0046] The first layer has a 7×7 Conv-BN-LeakyReLU structure, outputting 64 feature maps. The second layer is a geometric transformation layer T, which transforms the input tensor into the desired geometric tensor based on the input geometric transformation parameters. The third layer has a 3×3 Conv-BN-LeakyReLU structure, outputting 128 feature maps. The fourth and fifth layers have the same structure as the third layer, outputting 256 and 512 feature maps respectively. The sixth layer is a max pooling layer.

[0047] Layer 7: Layer 7 is the ResBlock layer, which is a residual block layer with a structure of 1×1Conv-BN-LeakyRelu-3×3Conv-BN-LeakyRelu-1×1Conv-BN. As a learning layer for residual information, the input data is directly transmitted to the output via a skip connection.

[0048] Layer 8: Inception V2 + SKNet. Inception V2 expands the receptive field by extracting multi-scale spatial information. Specifically, it performs multiple convolutional or pooling operations in parallel on the input image and concatenates all outputs into a very deep feature map. The multiple branches are 1×1Conv-3×3Conv-1×1Conv, 1×1Conv-3×3Conv, MaxPool-1×1Conv, and 1×1Conv. After the feature maps from these multiple branches are concatenated, a feature vector X containing w×h×c (width, height, number of channels) is input into the SKNet network, which mainly involves three operations.

[0049] The three operations are as follows: (1) Split operation: Perform convolution operations with different kernel sizes of 3×3 and 5×5 on the input vector X, and obtain the outputs U^ and U. ~ (2) Fuse operation: superimpose the two feature maps, i.e., U = U^+U ~ Then, a global average pooling operation F is performed. gp After F fc The two fully connected layers first reduce the dimensionality and then increase it. Finally, two output matrices a and a redundant matrix b are obtained. In the case of two branches, b = 1 - a. (3) Select operation: Use the two weight matrices a and b obtained in the previous step to select the two feature maps U^ and U^ obtained earlier. ~ After weighting and summing, the final output vector V = a·U^+b·U ~ After this step, the feature value of each channel is multiplied by the corresponding weight coefficient, which recalibrates the features of the original image, thus suppressing useless features while enhancing useful features.

[0050] The structures of layers 9, 10, 11, and 12 are the same as layer 7. The structure of layer 12 is the same as layer 8. Layers 13 to 14 have a 3×3 Conv-BN-LeakyReLU structure, and simultaneously receive data from downsampling layers (layers 3 to 5) with the same number of feature maps through fully skip-connected layers, outputting 256, 128, and 64 feature maps respectively. The final layer is a 7×7 Conv-Tanh, outputting a texture image of the desired geometry.

[0051] Where Conv refers to convolutional layer, BN refers to batch normalization, LeakyReLU refers to a linear rectified function with leakage, and Tanh refers to a hyperbolic tangent function.

[0052] Step 104: Train the discriminator using the texture image of the desired output shape and the input sample image.

[0053] Optionally, step 104 includes: adjusting the input image to different scales; running the corresponding PatchGAN at each scale to obtain the result image at each scale; and performing weighted aggregation on the result images at each scale according to the scale weight list to obtain the decision result of the input image.

[0054] Figure 4 This is a network structure diagram of the discriminator provided by the present invention. Specifically, the texture image of the desired output shape and the input sample image (which can be a real image) are input into the discriminator. The discriminator attempts to distinguish between real and fake images, i.e., whether a given image is a real image or a generated fake image. In the discriminator D, the input image is adjusted to different scales through interpolation operations, and then the corresponding PatchGAN discriminator is run at each scale. In the single-scale PatchGAN discriminator, the input image is passed through three 3×3 Conv-BN-LeakyReLU convolutional layers and then fed into a 1×1 convolutional layer to be mapped to an N×N matrix, which is activated by Sigmoid. Finally, the result images at each scale are listed according to the scale weights. We perform weighted summation and aggregation to obtain a decision result for the input image.

[0055] Step 105: Based on a preset loss function, the generator and the discriminator are trained alternately to obtain a trained geological texture synthesis model.

[0056] Optionally, the loss function of the geological texture synthesis model can be set to a hybrid loss function that includes multiple different losses; specifically:

[0057] L = L GAN +βL reconst +γL SWD ;

[0058] Among them, L GAN Indicating resistance to loss, L SWD L represents the Sliced ​​Wasserstein distance (SWD) loss based on VGG19. reconst β represents the reconstruction loss; β represents the loss weight of the reconstruction loss, and γ represents the loss weight of the Sliced ​​Wasserstein distance loss, β+γ=1.

[0059] Reference Figure 2 SWD loss L SWD The synthesized result is processed by using a VGG19 convolutional neural network with the fully connected layers removed to extract image feature maps and calculate the Sliced ​​Wasserstein distance between the synthesized result and the real image, in order to minimize the perceptual difference between the predicted synthesized texture image and the real texture image in each batch of randomly cropped texture images.

[0060] Suppose that the output of the l-th layer of VGG19 has M l pixels and N l Each feature map is recorded. It is the feature vector of pixel m. is the nth component of the feature vector, and pl is the probability density function of the l-th layer feature map. This function is defined as the sum of the Dirac distributions, and the calculation process is shown in the following formula:

[0061]

[0062] L SWD This involves projecting n-dimensional features onto random directions, then sorting the one-dimensional projections, and calculating the L values ​​between the sorted lists. 2 Distance, the formula is as follows:

[0063]

[0064] Where I is the input sample, The result of generator synthesis. This represents the random direction of the unit one-dimensional hypersphere onto which feature points are projected onto feature vectors. The expected value of the one-dimensional optimal transmission distance is given by the following formula:

[0065]

[0066] in, Represents any m eigenvectors The unordered set of scalars L with a random direction V SW1D The one-dimensional optimal transmission loss between two unordered scalar sets is defined as L on the sorted list. 2 Distance, its formula is as follows:

[0067]

[0068] For each texture image synthesis result, a generator and inverse transform T are used. -1 Reconstruct the input x′ from the result and construct the reconstruction loss function L. reconst This is used to encourage the prediction results to match the input distribution, and its calculation formula is:

[0069]

[0070] Where x is the input sample, and x′ is the value obtained using the generator and inverse transform T. -1 The input samples reconstructed from the results, where n is the number of samples.

[0071] L GAN The adversarial loss uses LSGAN loss, and its formula is as follows:

[0072]

[0073] If the loss function is less than or equal to a preset threshold or the number of training iterations is greater than or equal to a preset number, stop training the geological texture synthesis model and obtain the trained geological texture synthesis model.

[0074] Step 106: Use the trained geological texture synthesis model to synthesize geological texture images.

[0075] Specifically, the texture sample image is input into the geological texture synthesis model, and the desired geometric transformation parameters are set as additional inputs to set the size of the corresponding generated geological texture image.

[0076] This invention allows for the acquisition of geological texture images of a specified size by adjusting the desired geometric transformation parameters.

[0077] Traditional texture synthesis methods, i.e., non-neural network methods, typically do not actually model natural textures but instead employ mechanical procedures to randomize the source texture while preserving perceptual characteristics. In contrast, this invention utilizes a Generative Adversarial Network (GAN) architecture. By training a convolutional network, it learns the texture features of geological texture samples and can use these learned features to synthesize textured images. To learn texture features, this invention introduces ResBlocks to improve network performance. The presence of ResBlocks allows for the construction of deep networks without performance degradation. By increasing network layers, the network can better capture complex features and patterns in the input image, and multiple ResBlocks enable the network to learn large-scale features. Considering the importance of multi-scale texture features for synthesis, this invention uses Inception V2 to extract multi-scale texture features and combines it with SKNet to recalibrate the fused features. This helps to obtain global features and suppress some irrelevant features. Simultaneously, this also compensates for the insufficient feature extraction by ResBlocks at both shallow and deep layers, thereby enriching and improving the final generated image. In order to synthesize texture images of arbitrary geometric shapes, this invention introduces a geometric transformation T into the input, enabling the generator G to learn and generate texture results of arbitrary geometric shapes.

[0078] Furthermore, in nature, each natural image possesses unique internal statistics, meaning that small patches are frequently reproduced within a single natural image. To represent this characteristic in a network, this invention sets a bidirectional objective: on the one hand, the target image is constrained to contain only patches from the input image, i.e., "visual coherence"; on the other hand, conversely, the input should contain only patches from the target, i.e., "visual integrity." Therefore, this invention introduces a reconstruction loss function and a VGG19-based Sliced ​​Wasserstein distance loss in addition to traditional adversarial losses. The reconstruction loss function aims to provide visual integrity, while the VGG19-based Sliced ​​Wasserstein distance loss aims to better constrain the feature similarity between images, thereby providing visual coherence. This multifaceted loss function design helps improve the quality and realism of the generated images. In the embodiment, geological texture samples are derived from the network. The samples are cropped, and the training set is expanded by horizontal flipping and 90-degree rotation, containing 10,000 sample patches of size 128×128. These sample patches are used as training data, and the original geological texture samples are used as the test set. Experiments demonstrate the superiority of this invention.

[0079] In summary, the advantages of this invention are as follows: It proposes a method for geological texture synthesis based on Generative Adversarial Networks (GANs). The generator model, employing a U-Net architecture and skip connections, effectively preserves the correlation between texture features, resulting in more coherent synthesis results. Simultaneously, ResNet sequence modules, including InceptionV2, ResSK, and ResBlock, capture the large-scale structure and features of geological textures. Furthermore, by introducing a reconstruction loss function and a VGG19-based Sliced ​​Wasserstein distance loss, effective training and optimization of the texture synthesis model are achieved, enabling the model to generate high-quality, complete, and coherent geological texture synthesized images. This is beneficial for improving the realism and visual effects of geological models, enhancing the presentation of geological information, and bringing new possibilities to geological simulation, research, and virtual environment creation.

[0080] On the other hand, the present invention also provides a geological texture synthesis device based on a GAN network, the device comprising:

[0081] The first processing module is used to crop the given geological sample texture into several texture blocks to obtain a training set;

[0082] The second processing module is used to construct a geological texture synthesis model based on an adversarial network-based generator and discriminator.

[0083] The third processing module is used to train the generator using the training set and the desired geometric transformation parameters to generate a texture image of the desired output shape; wherein the desired geometric transformation parameters are randomly set in each iteration of the generator;

[0084] The fourth processing module is used to train the discriminator using the texture image of the desired output shape and the input sample image;

[0085] The fifth processing module is used to alternately train the generator and the discriminator based on a preset loss function to obtain a trained geological texture synthesis model.

[0086] The sixth processing module is used to synthesize geological texture images using the trained geological texture synthesis model.

[0087] It should be noted that the geological texture synthesis device based on GAN network provided in this embodiment of the invention can execute the geological texture synthesis method based on GAN network described in any of the above embodiments during specific operation, and will not be elaborated on in this embodiment.

[0088] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 5As shown, the electronic device may include a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a GAN-based geological texture synthesis method. This method includes: cropping a given geological sample texture into several texture blocks to obtain a training set; constructing a geological texture synthesis model based on a generator and discriminator using an adversarial network; training the generator using the training set and desired geometric transformation parameters to generate a texture image with a desired output shape; wherein the desired geometric transformation parameters are randomly set in each iteration of the generator; training the discriminator using the texture image with the desired output shape and the input sample image; alternatingly training the generator and the discriminator based on a preset loss function to obtain a trained geological texture synthesis model; and synthesizing a geological texture image using the trained geological texture synthesis model.

[0089] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0090] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the geological texture synthesis method based on GAN network provided in the above embodiments. The method includes: cropping a given geological sample texture into several texture blocks to obtain a training set; constructing a geological texture synthesis model based on a generator and a discriminator of an adversarial network; training the generator using the training set and desired geometric transformation parameters to generate a texture image with a desired output shape; wherein the desired geometric transformation parameters are randomly set in each iteration of the generator; training the discriminator using the texture image with the desired output shape and the input sample image; alternatingly training the generator and the discriminator based on a preset loss function to obtain a trained geological texture synthesis model; and synthesizing a geological texture image using the trained geological texture synthesis model.

[0091] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for synthesizing geological textures based on GAN networks, characterized in that, include: The given geological sample texture is cropped into several texture blocks to obtain the training set; A geological texture synthesis model is constructed based on a generator and discriminator using adversarial networks. The generator is fully convolutional, with a U-Net architecture and skip connections. The bottleneck structure of the generator is composed of ResNet sequence modules, including InceptionV2, ResSK, and ResBlock. The generator is trained using a training set and desired geometric transformation parameters to generate a texture image of the desired output shape; wherein the desired geometric transformation parameters are randomly set in each iteration of the generator. The discriminator is trained using a texture image of the desired output shape and an input sample image; this includes: adjusting the input image to different scales; running the corresponding PatchGAN at each scale to obtain result images at each scale; and weighting and aggregating the result images at each scale according to a scale weight list to obtain the judgment result of the input image. Based on a preset loss function, the generator and the discriminator are trained alternately to obtain a trained geological texture synthesis model; The loss function is: ; in, Indicating resistance to loss, This represents the Sliced ​​Wasserstein distance loss based on VGG19. Indicates the losses incurred during reconstruction; The loss weight represents the reconstruction loss. This represents the loss weights of the Sliced ​​Wasserstein distance loss. ; in, For the input sample, To use the generator and inverse transform T -1 The input sample reconstructed from the results, The number of samples; Geological texture images are synthesized using a trained geological texture synthesis model.

2. The geological texture synthesis method based on GAN network according to claim 1, characterized in that, in, The size of the texture blocks is determined based on the sharpness and size of the geological texture image to be synthesized.

3. The geological texture synthesis method based on GAN network according to claim 1, characterized in that, Based on a preset loss function, the generator and the discriminator are trained alternately to obtain a trained geological texture synthesis model, including: The loss function of the geological texture synthesis model is set to a hybrid loss function that includes multiple different losses; If the loss function is less than or equal to a preset threshold or the number of training iterations is greater than or equal to a preset number, stop training the geological texture synthesis model and obtain the trained geological texture synthesis model.

4. The geological texture synthesis method based on GAN network according to claim 1, characterized in that, The trained geological texture synthesis model is used to synthesize geological texture images, including: Input the texture sample into the geological texture synthesis model and set the desired geometric transformation parameters as additional input to set the size of the corresponding generated geological texture image.

5. A geological texture synthesis device based on a GAN network, used to implement the geological texture synthesis method based on a GAN network as described in any one of claims 1 to 4, characterized in that, include: The first processing module is used to crop the given geological sample texture into several texture blocks to obtain a training set; The second processing module is used to construct a geological texture synthesis model based on the generator and discriminator of the adversarial network. The third processing module is used to train the generator using the training set and the desired geometric transformation parameters to generate a texture image of the desired output shape; wherein the desired geometric transformation parameters are randomly set in each iteration of the generator; The fourth processing module is used to train the discriminator using the texture image of the desired output shape and the input sample image; The fifth processing module is used to alternately train the generator and the discriminator based on a preset loss function to obtain a trained geological texture synthesis model. The sixth processing module is used to synthesize geological texture images using the trained geological texture synthesis model.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the geological texture synthesis method based on GAN network as described in any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the geological texture synthesis method based on GAN network as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • GAN-based texture image intelligent synthesis method

    CN111626926A

  • Automatic caricature generating method and apparatus

    US20230206515A1