A high-fidelity aggregate particle generation and evaluation method based on VAE

By using a deep learning method based on VAE, new particles that match the particle morphology features but do not exist in the training set are generated, which solves the error problem caused by the simplification of sand particles in traditional methods and achieves efficient and accurate particle generation and evaluation.

CN118537430BActive Publication Date: 2024-11-19HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410704758.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-11-19
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

Traditional methods simplify sand particles into round or elliptical shapes, leading to errors and failing to accurately characterize the complex shapes of natural sand particles, thus affecting the study of the macroscopic properties of sand bodies.

Method used

We employ a deep learning approach based on VAEs to generate new particles that match the morphological features of particles not found in the training set by training a variational autoencoder model. By combining the standardization of the image dataset with the autoencoder network architecture, we achieve high-fidelity particle generation and evaluation.

Benefits of technology

The generated particles have high fidelity, short training time, high efficiency, and strong adaptability, and can accurately characterize particles with complex shapes, thus improving the accuracy of sand and soil body research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537430B_ABST
    Figure CN118537430B_ABST
Patent Text Reader

Abstract

The present invention provides a method for generating and evaluating high-fidelity aggregate particles based on VAE, and relates to the field of aggregate particle generation and evaluation. The present invention systematically illustrates a method for generating high-fidelity particles based on VAE from aspects such as the establishment of a particle image data set, the standardization and normalization processing of a particle image data set, the construction of a variational autoencoder (VAE) model, and the generation of custom training of two-dimensional particle images; and introduces reconstruction errors and geometric feature distribution differences to qualitatively and quantitatively evaluate the generated images. Using the VAE model trained by the present invention, completely new particles that do not exist in the training set but still fall within the learned probability distribution and match the particle morphological features can be generated. The present invention overcomes the shortcomings of the prior art and has the characteristics of short training time, high efficiency, high-fidelity particles, strong adaptability, and effective evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of deep learning and computer vision, and in particular to a VAE-based high-fidelity aggregate particle generation and evaluation method. Background Art

[0002] Sand, as a granular, cohesive-free soil existing in nature, is widely used in industry and engineering practice. As a typical discrete granular material, the mechanical properties of sand under load are closely related to its microstructure. Generally speaking, its characteristic parameters such as particle size and particle shape have an important influence on the macroscopic physical and mechanical properties of the entire sand body, such as density, shear characteristics, and compressibility.

[0003] The traditional characterization of sand particles is limited by the means of observation and research methods. The characterization of sand particle characteristics has the problems of simple geometric parameters and general particle shapes. In order to study the influence of complex particle shapes on the macroscopic properties of sand bodies, the traditional approach is to simplify the particles into simple shapes such as circles and ellipses. For practical problems, this simplification does not take into account the complexity and richness of the actual particle shapes, which will bring a certain degree of error. At present, deep learning and computer vision methods have been used to realize the characterization, matching and generation of sand particle shapes.

[0004] This method focuses on identifying the morphological patterns of sand particles and then adding randomness to these patterns to generate new particles. However, the morphological characteristics of natural sand particles are generated by complex geological processes, so their probability distribution may not be expressed by a clear formula and varies greatly.

[0005] The principle of VAE is to learn the implicit probability distribution of particles in the training set, because the probability distribution of real particles may be too complex to be expressed by an explicit formula. Using deep neural networks, real data can be approximated. The trained VAE model can directly generate new samples that fall within the learned probability distribution. The advantage of VAE is that it can not only generate new particles by introducing randomness to existing particles, but also generate completely new particles that do not exist in the training set but still match the morphological characteristics of the aggregate. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides a high-fidelity aggregate particle generation and evaluation method based on VAE. By using the VAE model trained by the present invention, new particles can be generated that do not exist in the training set but still fall within the learned probability distribution and match the particle morphological characteristics. The overall process has the characteristics of short training time, high efficiency, high-fidelity particles, strong adaptability and effective evaluation.

[0007] By learning the implicit probability distribution of particles in the training set, using a deep neural network, real data can be approximated. The trained variational autoencoder VAE model can not only generate new particles by introducing randomness to existing particles, but also generate brand new particles that do not exist in the training set but still fall within the learned probability distribution and match the particle morphological characteristics. It has the characteristics of short training time, high efficiency, good accuracy, and strong adaptability.

[0008] To achieve the above objectives, the technical solution of the present invention is implemented through the following technical solutions:

[0009] A method for generating and evaluating high-fidelity aggregate particles based on VAE, the method comprising the following steps:

[0010] S1. Acquisition of original two-dimensional particle image datasets, including capturing existing sample images using acquisition equipment, online image acquisition using a batch image downloader, and traditional data enhancement of original images;

[0011] S2, standardizing and normalizing the above two-dimensional particle image dataset, including particle identification and classification, information annotation, and key area extraction and transformation of the dataset;

[0012] S3, based on the image data set processed in step S2, in combination with the VAE network architecture, constructing a variational autoencoder model; the construction of the variational autoencoder model includes: constructing a variational autoencoder, and constructing a variational autoencoder loss function;

[0013] S4, using a custom training loop to train the constructed variational autoencoder model to generate a two-dimensional image of particles; based on the variational autoencoder model constructed in step S3 and the image data set processed in step S2, the VAE network is trained; according to different training results, the model-related parameters are adjusted to obtain the variational autoencoder model with the best effect, so as to generate a variety of high-fidelity aggregate particles;

[0014] S5. Generate an image based on qualitative and quantitative evaluation of the particles, wherein the generated image evaluation includes: reconstruction error visualization and geometric feature distribution difference evaluation.

[0015] Preferably, the acquisition of the original two-dimensional particle image data set in step S1 comprises the following steps:

[0016] S1-1, using a collection device to capture an existing sample image;

[0017] S1-2, batch image downloader to collect images online: The batch image downloader of Scrapy, a web crawler program under the Python platform, collects images online;

[0018] S1-3. Traditional data enhancement of original images: For the extracted original two-dimensional particle image, image segmentation and feature extraction are performed; at the same time, data enhancement includes: angle rotation, brightness and contrast adjustment, and color space transformation.

[0019] Preferably, the specific method of standardization and normalization processing in step S2 includes the following steps:

[0020] S2-1. Particle identification, classification and information annotation: Automatic and semi-automatic pattern recognition methods are used to analyze the collected images to determine the particle roundness R value; the automated method is used to analyze the particle images with simple internal textures, while the calculation results are manually reviewed to ensure accuracy; the semi-automatic method is used to analyze the remaining images;

[0021] The calculation formula of the particle roundness R value is as follows:

[0022]

[0023] Among them, r i is the radius of the i-th circle fitted to the i-th corner, used to calculate the radius of curvature; N is the total number of corners; r in is the radius of the largest inscribed circle;

[0024] According to the calculated roundness R value, these images are divided into six categories, namely very angular (0.12-0.17), angular (0.17-0.25), subangular (0.25-0.35), subrounded (0.35-0.49), rounded (0.49-0.70) and well rounded (0.70-1.00); according to the classification results, the images are labeled in the form of "roundness category + class number", and the balance of the number of images in each category should be ensured;

[0025] S2-2. Extraction and transformation of key areas of the dataset: Based on the annotation information and actual model training needs, samples of the required size are obtained through matrix cropping, and a set of datasets with regular image data types and regular image annotation category distribution is generated to complete the standardization and normalization of key areas of the dataset.

[0026] Preferably, the specific method in step S3 comprises the following steps:

[0027] S3-1. Construct a variational autoencoder: The autoencoder consists of two parts: an encoder and a decoder. The encoder accepts the aggregate particle image input and converts it into a latent vector representation through a series of operations. The latent variable captures the key features of the image. The decoder receives the latent vector representation and reconstructs it into the original input image through a series of operations. The input is sampled using a custom layer that accepts the logarithmic variance vector logσ 2 The concatenated mean vector μ is used as input and The elements of are sampled to make the training process more numerically stable;

[0028] Define the encoder network: downsample the 84×84×1 image to a 32×1 latent vector; for image input, specify an image input layer whose input size matches the training data; downsample the input, specify two 2-D convolutional layers and ReLU layers; specify a fully connected layer whose output channels are twice the number of latent channels, and output the concatenated vector of mean and log variance;

[0029] Define the decoder network: reconstruct an 84×84×1 image from a 32×1 latent vector, specify a feature input layer whose input size matches the number of latent channels for feature vector input; use a custom layer to project and reshape the latent input into a 7×7×64 array, setting the projection size to 7×7×64; specify two transposed convolutional layers and a ReLU layer to upsample the input; add a 3×3 filter to the transposed convolutional layer, and output an image of size 84×84×1;

[0030] S3-2. Construct the variational autoencoder loss function:

[0031] Assuming that z obeys the standard Gaussian distribution, the prior distribution P(x|z) is Gaussian, that is, x|z~N(μ(z),σ(z)), then the probability distribution of the original sample data x is:

[0032] P(x)=∫ z P(x)P(x|z)dz

[0033] Solving P(x) is equivalent to solving the maximum log-likelihood with respect to x:

[0034] L=∑ x logP(x)

[0035] And log P(x) can be transformed into:

[0036] logP(x)=L b +KL(q(z|x)||P(z|x))

[0037] in,

[0038] Maximize L b It is equivalent to minimizing KL divergence and maximizing expectation; the purpose of minimizing KL divergence is to ensure that the learned mean and variance are as close as possible to the mean and variance of the target normal distribution;

[0039]

[0040] Maximizing expectation requires considering q(z|x) and logP(x|z). q(z|x) can use the encoder’s neural network to calculate the mean and variance, and sample z from them. Maximizing logP(x|z) can use the decoder’s neural network to calculate the mean and variance of z. The closer the mean is to x, the larger logP(x|z).

[0041] Preferably, the specific method in S4 comprises the following steps:

[0042] S4-1. Create a minibatchqueue object to process and manage mini-batches of images during training. For each mini-batch, convert the training data into an array data store and specify the fourth dimension for iteration. Use the custom mini-batch preprocessing function preprocessMiniBatch to preprocess the mini-batch of the predictor by concatenating the input along the fourth dimension.

[0043] S4-2. Use the dimension tag "SSCB" to format the image data. By default, the minibatchqueue object converts the data to a single dlarray object with the underlying type. If there is a GPU, training is performed on the GPU. When training on the GPU, the minibatchqueue object converts each output to a gpuArray.

[0044] S4-3. In each epoch, the data is shuffled and looped in the mini-batch; for each mini-batch, the model loss and gradient are evaluated using the dlfeval and modelLoss functions; the encoder and decoder network parameters are updated using the adamupdate function;

[0045] The value of each dimension of the latent variable is sampled from a standard Gaussian distribution to form a tensor with Nlatent dimensions; the tensor is input into the decoder to generate new aggregate particles; the generated aggregate particles are new pure digital particles outside the dataset, with various shapes, consistent with the characteristics of natural aggregate particles.

[0046] Preferably, the specific method in S5 comprises the following steps:

[0047] S5-1. Visualization of reconstruction error: Test the trained autoencoder using the reserved test set and create a mini-batch data queue using the same steps as the training data; use the modelPredictions function to make predictions for the trained autoencoder; calculate the mean square error of the test image and the reconstructed image and visualize it as a histogram to intuitively display the reconstruction error;

[0048] S5-2. Evaluation of geometric feature distribution differences: Repeat step S4, use the constructed variational autoencoder model to randomly generate 1500 particles, and randomly select 1500 particles from the training samples of the particle image data set in step S2, and calculate their particle morphology parameters respectively; according to the calculated particle morphology parameters, draw a distribution violin comparison diagram of natural particles and generated particles to compare the distribution differences in geometric features; the more consistent the geometric feature distribution between the generated particles and the natural particles, the closer the mapped image space is to the continuous manifold of the real particle distribution, the smaller the distribution difference of the geometric features, the higher the particle generation quality, and the particle morphology calculation indicators include the calculation area sphericity S A , diameter sphericity S D , circumference sphericity S P , Ratio sphericity S WL .

[0049] The present invention provides a VAE-based high-fidelity aggregate particle generation and evaluation method, which has the following advantages over the prior art:

[0050] The present invention can approximate real data by learning the implicit probability distribution of particles in the training set and using a deep neural network; the trained variational autoencoder VAE model can not only generate new particles by introducing randomness into existing particles, but also generate completely new particles that do not exist in the training set but still fall within the learned probability distribution and match the particle morphological characteristics; it has the characteristics of short training time, high efficiency, good accuracy, strong adaptability, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Schematic diagram of obtaining an original two-dimensional particle image data set in an embodiment of the present invention;

[0052] Figure 2 Schematic diagram of aggregate particle identification, classification and information labeling in an embodiment of the present invention;

[0053] Figure 3 Schematic diagram of a VAE model in an embodiment of the present invention;

[0054] Figure 4 To maximize L in the embodiment of the present invention b Schematic diagram;

[0055] Figure 5 Schematic diagram of VAE training progress in an embodiment of the present invention;

[0056] Figure 6 This is a schematic diagram of the process of generating aggregate particles by a VAE generator in an embodiment of the present invention;

[0057] Figure 7 is a histogram of mean square error of a test image and a reconstructed image in an embodiment of the present invention;

[0058] Figure 8 Schematic diagram of the violin comparison of the distribution of natural particles and generated particles in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention is clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] Example:

[0061] High-fidelity aggregate particle generation and evaluation method based on VAE:

[0062] Step S1: Acquisition of original two-dimensional particle image dataset:

[0063] like Figure 1 As shown, the acquisition of the above-mentioned original two-dimensional particle image dataset includes: using acquisition equipment to capture existing sample images, online acquisition of images by a batch image downloader, and traditional data enhancement of original images;

[0064] Step S1-1: Capture the existing sample image using acquisition equipment: The two-dimensional particle image can be captured by off-the-shelf cameras, digital microscopes, scanning electron microscopes and other equipment. The equipment should have high resolution to ensure stable and consistent results. Before image acquisition, the sample should be placed on an appropriate carrier to ensure that the particles are clearly visible.

[0065] Step S1-2: Batch image downloader collects images online: The batch image downloader Scrapy collects images online through the web crawler program (also known as web spider or web robot) under the Python platform; Scrapy can automatically search and collect aggregate particle images from various websites according to the input keywords, such as granular soil, granular materials, sand, gravel, aggregate, ballast and rock fragments; these images have different geological origins, colors, shapes and sizes.

[0066] Step S1-3: Traditional data enhancement of the original image: for the extracted original two-dimensional particle image, image segmentation and feature extraction are performed; traditional data enhancement methods are used to perform post-processing such as angle rotation, brightness and contrast adjustment, and color space transformation.

[0067] Step S2: Standardization and normalization of the two-dimensional particle image data set, including: particle identification classification and information annotation, data set key area extraction and transformation:

[0068] Step S2-1: Particle identification, classification and information annotation. Automatic and semi-automatic pattern recognition methods are used to analyze the collected images to determine their roundness R value. The automated method is used to analyze particle images with simple internal textures, while manually reviewing the calculation results to ensure accuracy; the semi-automatic method is used to analyze the remaining images. The above particle roundness R value calculation formula is as follows:

[0069]

[0070] Among them, r i is the radius of the i-th circle fitted to the i-th corner, used to calculate the radius of curvature; N is the total number of corners; r in is the radius of the largest inscribed circle.

[0071] According to the calculated roundness R value, these images were divided into six categories, namely very angular (0.12-0.17), angular (0.17-0.25), subangular (0.25-0.35), subrounded (0.35-0.49), rounded (0.49-0.70) and well rounded (0.70-1.00). Figure 2 As shown, according to the classification results, the images are labeled in the form of "roundness category + class number", and the balance of the number of images between each category should be ensured.

[0072] Step S2-2: Extraction and transformation of key areas of the dataset. According to the annotation information and actual needs of model training, a sample of the required size is obtained through matrix cropping, and a dataset with regular image data types and regular distribution of image annotation categories is generated to complete the standardization and normalization of key areas of the dataset.

[0073] Step S3: Based on the image dataset of step S2, combined with the VAE network architecture, such as Figure 3 As shown, a variational autoencoder (VAE) model is constructed; the construction of the variational autoencoder model mentioned above includes: constructing a variational autoencoder and constructing a variational autoencoder loss function. The specific implementation of the construction of the variational autoencoder model mentioned above is as follows:

[0074] Step S3-1: Construct a variational autoencoder. The autoencoder consists of two parts: an encoder and a decoder. The encoder accepts the aggregate particle image input and converts it into a latent vector representation through a series of operations (such as convolution). The latent variables capture the key features of the image. The decoder receives this latent vector representation and reconstructs it into the original input image through a series of operations (such as transposed convolution). The input is sampled using a custom layer that accepts a logarithmic variance vector logσ 2 The concatenated mean vector μ is used as input and The elements of are sampled to make the training process more numerically stable.

[0075] Define the encoder network. Downsample the 84×84×1 image to a 32×1 latent vector. For image input, specify an image input layer with an input size that matches the training data. Downsample the input, specify two 2-D convolutional layers and a ReLU layer. Specify a fully connected layer with twice the number of output channels as the latent channels, and output a concatenated vector of means and log-variances.

[0076] Define the decoder network. Reconstruct an 84×84×1 image from a 32×1 latent vector. Specify a feature input layer with an input size that matches the number of latent channels for the feature vector input. Use a custom layer to project and reshape the latent input into a 7×7×64 array, setting the projection size to 7×7×64. Specify two transposed convolutional layers and a ReLU layer to upsample the input. Add a 3×3 filter to the transposed convolutional layer, and output an image of size 84×84×1.

[0077] Step S3-2: Construct a variational autoencoder loss function.

[0078] Assuming that z obeys the standard Gaussian distribution, the prior distribution P(x|z) is Gaussian, that is, x|z~N(μ(z),σ(z)), then the probability distribution of the original sample data x is:

[0079] P(x)=∫ z P(x)P(x|z)dz

[0080] Among them, μ(z) and σ(z) are two functions of the mean and variance of the Gaussian distribution corresponding to z, and P(x) is the accumulation of all Gaussian distributions in the integral domain.

[0081] Solving P(x) is equivalent to solving the maximum log-likelihood with respect to x:

[0082] L=∑ x logP(x)

[0083] And logP(x) can be transformed into:

[0084]

[0085] in, is the KL divergence of q and P, that is

[0086] KL(q(z|x)||P(z|x))

[0087] The Nether Then we have:

[0088] log P(x)=L b +KL(q(z|x)||P(z|x))

[0089] like Figure 4 As shown, maximizing log P(x) is equivalent to maximizing L b . Fix P(x|z) and adjust q(z|x) to maximize the lower bound L b , KL is smaller. When q(z|x) and the posterior distribution P(z|x) are constantly approaching, the KL divergence tends to 0, and log P(x) is equal to L b equivalence.

[0090]

[0091] From the above formula, we can see that maximizing L b Equivalent to minimizing KL(q(z|x)||P(z)) and maximizing E q(z∣x) [log(P(x|z))], which minimizes the KL divergence and maximizes the expectation.

[0092] Minimize KL divergence: Make sure the learned mean and variance are as close as possible to the mean and variance of the target normal distribution.

[0093]

[0094] Maximizing expectation: Maximizing expectation requires considering q(z|x) and logP(x|z). q(z|x) can use the encoder's neural network to calculate the mean and variance, and sample z from them. Maximizing log P(x|z) can use the decoder's neural network to calculate the mean and variance of z. The closer the mean is to x, the larger logP(x|z).

[0095] Step S4, use a custom training loop to train the constructed variational autoencoder model to generate a two-dimensional image of the particles. Based on the variational autoencoder (VAE) model constructed in step S3 and the image data set obtained in step S2, the VAE network is trained. According to different training results, the model-related parameters are adjusted to obtain the optimal variational autoencoder (VAE) model to generate a variety of high-fidelity aggregate particles.

[0096] The hardware platform used for VAE includes a 13th Gen Intel(R) Core(TM) i5-13400F CPU and NVIDIA GeForce RTX 3060 with 16GB RAM. The software environment includes MATLAB 23.2.0.2365128 (R2023b). The operating system is Microsoft Windows 10 Professional.

[0097] The specific implementation of the above-mentioned custom training loop to train the variational autoencoder model is as follows:

[0098] Step S4-1: Create a minibatchqueue object to process and manage mini-batches of images during training. For each mini-batch, convert the training data into an array data store and specify the iteration 4th dimension. Use the custom mini-batch preprocessing function preprocessMiniBatch to preprocess the mini-batches of the predictor by concatenating the input along the fourth dimension.

[0099] Step S4-2: Format the image data using dimension labels "SSCB" (spatial, spatial, channel, batch). By default, the minibatchqueue object converts the data to a dlarray object whose underlying type is a single. If a GPU is available, training is performed on the GPU. When training on a GPU, the minibatchqueue object converts each output to a gpuArray. Using a GPU requires Parallel Computing Toolbox TM and supported GPU devices.

[0100] Step S4-3: In each epoch, the data is shuffled and looped through the mini-batches. For each mini-batch, the model loss and gradients are evaluated using the dlfeval and modelLoss functions. The encoder and decoder network parameters are updated using the adamupdate function. Figure 5 As shown, the training progress is displayed.

[0101] The VAE generation process is as follows Figure 6 As shown in Figure 1, the value of each dimension of the latent variable is sampled from a standard Gaussian distribution to form a tensor with Nlatent dimensions. The tensor is input into the decoder to generate new aggregate particles. The generated aggregate particles are new pure digital particles outside the dataset, with various morphologies that match the characteristics of natural aggregate particles.

[0102] Step S5: Generate an image based on qualitative and quantitative evaluation of particles. The above-mentioned generated image evaluation includes: reconstruction error visualization and geometric feature distribution difference evaluation. The specific implementation of the above-mentioned generated image evaluation is as follows:

[0103] Step S5-1: Visualization of reconstruction error. Test the trained autoencoder using the reserved test set and create a mini-batch data queue using the same steps as the training data. Use the modelPredictions function to make predictions for the trained autoencoder. Calculate the mean square error between the test image and the reconstructed image, as Figure 7 As shown, it can be visualized as a histogram to intuitively show the reconstruction error.

[0104] Step S5-2: Geometric feature distribution difference evaluation. Repeat step S4, use the constructed variational autoencoder model to randomly generate 1500 particles, and randomly select 1500 particles from the training samples of the particle image dataset in step S2, and calculate their particle morphology parameters respectively. Based on the calculated particle morphology parameters, draw a violin comparison diagram of the distribution of natural particles and generated particles, as shown in Figure 8 As shown in the figure, the distribution differences in geometric features are compared. The more consistent the geometric feature distribution between the generated particles and the natural particles is, the closer the mapped image space is to the continuous manifold of the real particle distribution, the smaller the distribution difference of the geometric features is, and the higher the particle generation quality is.

[0105] The particle morphology calculation indicators mentioned above include the calculation of area sphericity (S A ), diameter sphericity (S D ), circumference sphericity (S P ), ratio sphericity (S WL ), and each indicator is defined as follows:

[0106] Area sphericity (S A ):

[0107]

[0108] Where: A is the area of ​​the 2D projection of aggregate particles in the image; A cir ——The area of ​​the minimum circumscribed circle of the 2D projection area of ​​the aggregate particles in the image.

[0109] Diameter sphericity (SD ):

[0110]

[0111] Where: d c ——The diameter of the circle with the same area as the 2D projection area of ​​the aggregate particle in the image; d cir ——The diameter of the minimum circumscribed circle of the 2D projection area of ​​the aggregate particles in the image.

[0112] Circumference sphericity (S P ):

[0113]

[0114] Where: P1 is the circumference of a circle with the same area as the 2D projection area of ​​the aggregate particles in the image; P2 is the actual circumference of the 2D projection area of ​​the aggregate particles in the image.

[0115] Ratio sphericity (S WL ):

[0116]

[0117] Where: d1 is the length of aggregate particles in the image; d2 is the width of aggregate particles in the image.

[0118] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A high-fidelity aggregate particle generation and evaluation method based on VAE, characterized in that: The generation and evaluation method comprises the following steps: S1. Acquisition of original two-dimensional particle image datasets, including capturing existing sample images using acquisition equipment, online image acquisition using a batch image downloader, and traditional data enhancement of original images; S2, standardizing and normalizing the above two-dimensional particle image dataset, including particle identification and classification, information annotation, and key area extraction and transformation of the dataset; S3, based on the image data set processed in step S2, in combination with the VAE network architecture, constructing a variational autoencoder model; the construction of the variational autoencoder model includes: constructing a variational autoencoder, and constructing a variational autoencoder loss function; The specific method includes the following steps: S3-1. Construct a variational autoencoder: The autoencoder consists of two parts: an encoder and a decoder. The encoder accepts the aggregate particle image input and converts it into a latent vector representation through a series of operations. The latent variable captures the key features of the image. The decoder receives the latent vector representation and reconstructs it into the original input image through a series of operations. The input is sampled using a custom layer that accepts the logarithmic variance vector logσ 2 The concatenated mean vector μ is taken as input and N(μ i ,σ i 2 ) elements to make the training process more numerically stable; Define the encoder network: downsample the 84×84×1 image to a 32×1 latent vector; for image input, specify an image input layer whose input size matches the training data; downsample the input, specify two 2-D convolutional layers and ReLU layers; specify a fully connected layer whose output channels are twice the number of latent channels, and output the concatenated vector of mean and log variance; Define the decoder network: reconstruct an 84×84×1 image from a 32×1 latent vector, specify a feature input layer whose input size matches the number of latent channels for feature vector input; use a custom layer to project and reshape the latent input into a 7×7×64 array, and set the projection size to 7×7×64; specify two transposed convolutional layers and a ReLU layer to upsample the input; add a 3×3 filter to the transposed convolutional layer, and output an image of size 84×84×1; S3-2. Construct the variational autoencoder loss function: Assuming that z obeys the standard Gaussian distribution, the prior distribution P(x|z) is Gaussian, that is, x|z~N(μ(z),σ(z)), then the probability distribution of the original sample data x is: P(x)=∫ z P(x)P(x∣z)dz Solving P(x) is equivalent to solving the maximum log-likelihood with respect to x: L=∑ x logP(x) And logP(x) can be transformed into: logP(x)=L b +KL(q(z∣x)∥P(z∣x)) in, Maximize L b It is equivalent to minimizing KL divergence and maximizing expectation; the purpose of minimizing KL divergence is to ensure that the learned mean and variance are as close as possible to the mean and variance of the target normal distribution; Maximizing expectation requires considering q(z|x) and logP(x|z). q(z|x) can use the encoder's neural network to calculate the mean and variance, and sample z from them. Maximizing logP(x|z) can use the decoder's neural network to calculate the mean and variance of z. The closer the mean is to x, the larger logP(x|z). S4, using a custom training loop to train the constructed variational autoencoder model to generate a two-dimensional image of particles; based on the variational autoencoder model constructed in step S3 and the image data set processed in step S2, the VAE network is trained; according to different training results, the model-related parameters are adjusted to obtain the variational autoencoder model with the best effect, so as to generate a variety of high-fidelity aggregate particles; S5. Generate an image based on qualitative and quantitative evaluation of the particles, wherein the generated image evaluation includes: reconstruction error visualization and geometric feature distribution difference evaluation.

2. The method for generating and evaluating high-fidelity aggregate particles based on VAE according to claim 1, characterized in that: The acquisition of the original two-dimensional particle image data set in step S1 includes the following steps: S1-1, using acquisition equipment to capture existing sample images; S1-2, batch image downloader to collect images online: The batch image downloader of Scrapy, a web crawler program under the Python platform, collects images online; S1-3, traditional data enhancement of original images: for the extracted original two-dimensional particle image, image segmentation and feature extraction are performed; Simultaneous data enhancement includes: angle rotation, brightness and contrast adjustment, and color space transformation.

3. The method for generating and evaluating high-fidelity aggregate particles based on VAE according to claim 1, characterized in that: The specific method of the standardization and normalization processing in step S2 includes the following steps: S2-1. Particle identification, classification and information annotation: Automatic and semi-automatic pattern recognition methods are used to analyze the collected images to determine the particle roundness R value; the automated method is used to analyze the particle images with simple internal textures, while the calculation results are manually reviewed to ensure accuracy; the semi-automatic method is used to analyze the remaining images; The calculation formula of the particle roundness R value is as follows: Among them, r i is the radius of the i-th circle fitted to the i-th corner, used to calculate the radius of curvature; N is the total number of corners; r in is the radius of the largest inscribed circle; According to the calculated roundness R value, these images are divided into six categories, namely very angular (0.12-0.17), angular (0.17-0.25), subangular (0.25-0.35), subrounded (0.35-0.49), rounded (0.49-0.70) and well rounded (0.70-1.00); according to the classification results, the images are labeled in the form of "roundness category + class number", and the balance of the number of images in each category should be ensured; S2-2. Extraction and transformation of key areas of the dataset: Based on the annotation information and actual model training needs, samples of the required size are obtained through matrix cropping, and a set of datasets with regular image data types and regular image annotation category distribution is generated to complete the standardization and normalization of key areas of the dataset.

4. The method for generating and evaluating high-fidelity aggregate particles based on VAE according to claim 1, characterized in that: The specific method in S4 comprises the following steps: S4-1. Create a minibatchqueue object to process and manage mini-batches of images during training. For each mini-batch, convert the training data into an array data store and specify the fourth dimension for iteration. Use the custom mini-batch preprocessing function preprocessMiniBatch to preprocess the mini-batch of the predictor by concatenating the input along the fourth dimension. S4-2. Use the dimension tag "SSCB" to format the image data. By default, the minibatchqueue object converts the data to a single dlarray object with the underlying type. If there is a GPU, training is performed on the GPU. When training on the GPU, the minibatchqueue object converts each output to a gpuArray. S4-3. In each epoch, the data is shuffled and looped in the mini-batch; for each mini-batch, the model loss and gradient are evaluated using the dlfeval and modelLoss functions; the encoder and decoder network parameters are updated using the adamupdate function; The value of each dimension of the latent variable is sampled from a standard Gaussian distribution to form a tensor with Nlatent dimensions; the tensor is input into the decoder to generate new aggregate particles; the generated aggregate particles are new pure digital particles outside the dataset, with various shapes, consistent with the characteristics of natural aggregate particles.

5. The method for generating and evaluating high-fidelity aggregate particles based on VAE according to claim 4, characterized in that: The specific method in S5 comprises the following steps: S5-1. Visualization of reconstruction error: Test the trained autoencoder using the reserved test set and create a mini-batch data queue using the same steps as the training data; use the modelPredictions function to make predictions for the trained autoencoder; calculate the mean square error of the test image and the reconstructed image and visualize it as a histogram to intuitively display the reconstruction error; S5-2. Evaluation of geometric feature distribution differences: Repeat step S4, use the constructed variational autoencoder model to randomly generate 1500 particles, and randomly select 1500 particles from the training samples of the particle image data set in step S2, and calculate their particle morphology parameters respectively; according to the calculated particle morphology parameters, draw a distribution violin comparison diagram of natural particles and generated particles to compare the distribution differences in geometric features; the more consistent the geometric feature distribution between the generated particles and the natural particles, the closer the mapped image space is to the continuous manifold of the real particle distribution, the smaller the distribution difference of the geometric features, the higher the particle generation quality, and the particle morphology calculation indicators include the calculation area sphericity S A , diameter sphericity S D , circumference sphericity S P , Ratio sphericity S WL .