Data expansion method based on maximum likelihood estimation
By using the data expansion method based on great estimation in the training database, build a sample distribution estimation model and draw samples from the distribution, solve the problem of imbalanced data distribution in the training database, significantly improve the generalization ability of the model And identifying performance.
Patent Information
- Application Number
- CN202411907643.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the data distribution in the training database is uneven, resulting in the model tending toward a large number of categories during the training process, and the identification performance is affected for high-value but small number of categories, and the model is difficult to face unknown samples. Make accurate judgments.
Adopt the data expansion method based on a great and graive estimation, by building a model distribution model, using a neural network and a self -attention network to the data to characterize the data, accurately estimate the real distribution of the sample, and no from this distribution, there is no in this distribution Limit the samples to make up for the vacancies of the rare category.
Effectively reduce the suppression effect of the head category on the tail category, ensure the rich diversity of generating data, significantly enhance the generalization ability of the model, and avoid the excessive fitting phenomenon of the model's tail category data.
Smart Images

Figure CN119380141A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the general field of image data processing or generation technology, and in particular to a data expansion method based on maximum likelihood estimation. Background Art
[0002] In the process of building an artificial intelligence recognition system, collecting massive amounts of target data is a crucial step. These data need to be carefully labeled by experts or professional labelers in the field to ensure their accuracy and effectiveness, and then build a large and sophisticated database. However, in actual operations, we often encounter a severe challenge, namely the long-tail effect of data. Common categories of data, due to their universality and easy accessibility, can often easily collect a large number of samples. However, rare or special category data, due to their low frequency of occurrence, the difficulty of collection increases significantly, resulting in a serious imbalance in the amount of data of different categories in the database.
[0003] Take image recognition in natural scenes as an example. Although a few categories have a large amount of data, most categories can only collect very small amounts of data. This imbalance in data distribution not only leads to a serious imbalance in the number of categories in the database, but also poses a great challenge to model training. In the field of medicine, this problem is particularly prominent. Normal samples occupy the vast majority of database samples, while abnormal samples with high diagnostic value only account for a very small part, which results in a large amount of worthless data in the database.
[0004] This unbalanced data distribution makes the model naturally biased towards categories with larger numbers during training, while the recognition performance of categories with high value but smaller numbers is often seriously affected. In addition, due to the complexity and variability of the real world, algorithms often encounter a large number of samples that are not included in the training database in practical applications. This makes it difficult for the model to make accurate judgments and predictions when faced with unknown samples, thus causing serious generalization problems. This not only affects the practical application value of the model, but also limits the application and development of artificial intelligence recognition systems in a wider range of fields. Summary of the invention
[0005] The present invention is to solve the problem of uneven distribution of training databases, and provides a data expansion method based on maximum likelihood estimation. The maximum likelihood estimation principle is used to accurately estimate the true distribution of the sample, and at the same time obtain a parameterized representation of the distribution. Based on the learned distribution, the present invention can extract samples from the distribution without restriction, thereby quickly filling the data gaps of rare categories and effectively reducing the suppression effect of the head category on the tail category. At the same time, this scheme ensures the richness and diversity of the generated data, significantly enhances the generalization ability of the model, and effectively avoids the overfitting phenomenon of the model on the tail category data.
[0006] The present invention provides a data expansion method based on maximum likelihood estimation, comprising the following steps: S1. Collect medical image data and natural image data and build a training database; S2. Construct a sample distribution estimation model. The sample distribution estimation model is a neural network model. The sample distribution estimation model divides the samples in the training database into blocks through the self-attention network and converts them into sample feature vectors. The sample feature vectors are mapped by the sample distribution estimation model and parameter estimation is performed. The optimization target is constructed based on the maximum likelihood estimation principle, and the optimization target is optimized using the gradient descent method to obtain the hidden variables that generate the image. z True posterior distribution parameters , distribution parameters The mean is u , a multidimensional normal distribution with a covariance matrix of ∑, where x is the image data variable; S3, through the decoder from the distribution parameters The latent variables after sampling are z Send it to the decoder for image restoration and use reparameterization to decouple the distributed parameters Randomness: , ; Among them, e is a random variable; The gradient descent algorithm is used to jointly optimize the sample distribution estimation model and the decoder, and the image expansion model is obtained after reaching the target accuracy; S4. Use the image expansion model to expand the data and directly perform the latent variables z From the standard normal distribution N(0,1) The sampling is performed and the sampling result is input into the decoder for decoding to obtain the image sample corresponding to the latent variable. A data expansion method based on maximum likelihood estimation is completed.
[0007] The data expansion method based on maximum likelihood estimation described in the present invention is, as a preferred mode, in step S1, when collecting medical image data, images are obtained with the help of electron microscopes, phase contrast microscopes and optical microscopes, and data are collected using a microscope camera; when collecting natural image data, ordinary cameras are used for field photography, or relevant image data are captured from the Internet; After data collection is completed, the medical image data and natural image data are cleaned and organized, and then stored in the database to obtain the training database.
[0008] The data expansion method based on maximum likelihood estimation described in the present invention, as a preferred embodiment, step S2 comprises the following steps: S21, constructing a sample distribution estimation model, the sample distribution estimation model is a neural network model, the sample distribution estimation model divides the samples in the training database into blocks through the self-attention network and converts them into sample feature vectors, and the sample feature vectors are mapped by the sample distribution estimation model; S22, sample distribution estimation model based on observed image data variables x The marginal distribution p(x), Through the posterior distribution Get image data variable x and hidden variables z The joint distribution of p(x, z) ; S23, using the gradient descent method combined with KL divergence, the optimization objective of the likelihood estimation is changed to: ; Where E is the expectation of the function under a certain distribution; S24, the sample distribution estimation model performs learning optimization on the optimization target to obtain the latent variables that generate the image z True posterior distribution parameters ,and .
[0009] The data expansion method based on maximum likelihood estimation described in the present invention is, as a preferred embodiment, in step S21, the self-attention network divides the images in the training database into image blocks, each image block has a size of 16*16, and each image block is represented by a feature vector.
[0010] The data expansion method based on maximum likelihood estimation described in the present invention is preferably implemented in step S22. Translates to: .
[0011] The data expansion method based on maximum likelihood estimation described in the present invention is, as a preferred embodiment, in step S23, the gradient descent method is: Convert the expected function into a distance metric between distributions: ; Among them, D KL is the KL divergence; The value of KL divergence is always greater than zero; p(x) The larger it is, the smaller the KL divergence is, and the closer the distributions are. The larger the value, the greater the KL divergence. p(x) same same, p(x) Reach the maximum value and complete the optimization task of maximizing likelihood.
[0012] The data expansion method based on maximum likelihood estimation described in the present invention, as a preferred embodiment, step S3 comprises the following steps: S31, through the decoder from the distribution parameters The latent variables after sampling are z Send it to the decoder for image restoration and get the same image as the original Figure 1 The decoder is a self-attention neural network model. S32, the optimization goal is: ; Split into: ; in, p θ (z) is a hidden variable z The true posterior distribution of For image data variables x No. i The true posterior distribution after sub-optimization, No. i The posterior distribution after sub-optimization; S33, use stochastic gradient descent algorithm for optimization, use reparameterization to decouple distribution parameters Randomness: , ; Among them, e is a random variable; The gradient descent algorithm is used to jointly optimize the sample distribution estimation model and the decoder, and the image expansion model is obtained after reaching the target accuracy.
[0013] The data expansion method based on maximum likelihood estimation described in the present invention is, as a preferred embodiment, in step S32, maximizing the optimization target, and p(z|x) The distance is gradually approaching, p(x|z) exist The expectations are growing.
[0014] The data expansion method based on maximum likelihood estimation described in the present invention is preferably implemented in step S33, wherein the randomness of the latent variable z is determined by the introduced random variable e Decision, variable e Obey standard normal distribution; When optimizing the model, the encoder's prediction results u ,∑ participate in the model optimization process, hidden variables z Directly to the variable u Differentiate the parameter .
[0015] The data expansion method based on maximum likelihood estimation described in the present invention is preferably implemented in step S4, wherein the latent variable z The dimension is 10000, the number of feature points is 10*10, and the dimension is 100.
[0016] In the existing technology, data is widely collected to build a training database. In this process, samples of minority categories with lower value occupy the majority of the database, resulting in an extreme data imbalance problem in the training database. This problem has a significant impact on the training effect of the model and needs to be solved urgently.
[0017] At present, the data in the training database is incomplete and fails to cover all possible data samples. The collected data is seriously lacking in diversity, which limits the generalization ability of the model and makes it difficult to cope with complex and changing scenarios in practical applications.
[0018] The existing deep learning recognition model based on supervised learning uses deep neural networks for feature extraction and automatic classification, aiming to improve recognition accuracy and efficiency and lay a solid foundation for subsequent applications.
[0019] The database constructed by the current method is filled with a large amount of low-value training data, resulting in an extremely unbalanced database. This imbalance makes the model naturally biased towards a large number of categories during the recognition process, which seriously weakens the model's ability to recognize high-value, rare, and abnormal categories. This phenomenon poses a significant challenge to the model's recognition performance.
[0020] The database constructed by the existing methods is relatively narrow in coverage, and the data covered is not comprehensive and lacks diversity. This limitation easily leads to a decrease in the recognition performance of the model when facing unknown samples, thereby reducing the generalization ability of the model. This not only affects the practical application value of the model, but also limits its application and development in a wider range of fields.
[0021] Existing methods often require a long period of time to collect data, and may encounter many unknown obstacles in the process. For example, data of rare categories are often difficult to obtain easily, and their occurrence frequency is low and unpredictable, which seriously affects the efficiency of data collection and increases the cost and difficulty of data collection.
[0022] The present invention proposes a data expansion scheme based on maximum likelihood estimation. The core of this scheme is to use the principle of maximum likelihood estimation to accurately estimate the true distribution of the sample and obtain a parameterized representation of the distribution. Based on the learned distribution, the present invention can extract samples from the distribution without restriction, thereby quickly filling the data gaps of rare categories and effectively reducing the suppression effect of the head category on the tail category. At the same time, this scheme ensures the richness and diversity of the generated data, significantly enhances the generalization ability of the model, and effectively avoids the overfitting phenomenon of the model on the tail category data.
[0023] In addition, the method of the present invention is also highly flexible and targeted. According to the needs of specific categories, the present invention can accurately generate target data and achieve large-scale and targeted supplementation of samples of rare categories, thereby quickly building a comprehensive, complete and diverse training database. It not only fundamentally solves the negative impact of the data level on model training, but also greatly improves the performance of the model. Through this innovative data expansion method, the present invention provides a more solid data foundation for model training and promotes the optimization and improvement of model performance.
[0024] The present invention cleverly uses the "variational inference method" to estimate the lower limit of the likelihood function containing latent variables, namely ELBO, and gradually iterates and optimizes to obtain the optimal model parameters. In order to overcome the non-differentiable problem of sampling operations, the present invention innovatively introduces the model reparameterization operation, so that the gradient can be propagated from the decoder to the encoder, and the model can be accurately optimized; the variational method is innovatively used to estimate the distribution of the input image, obtain the distribution parameters of the image, and unlimited sampling can be performed from the distribution to expand the data on a large scale.
[0025] The present invention has the following advantages: (1) For most categories in the database with relatively scarce data, the present invention proposes an efficient data supplementation solution. This fundamentally solves the problem of poor recognition performance of tail categories caused by data imbalance, thereby comprehensively improving the recognition performance of the model. By filling the model's shortcomings, the present invention ensures that it can cope with the challenges of various complex scenarios, making the model have higher application value.
[0026] (2) By generating image posterior distribution sampling, the present invention can expand the database infinitely to ensure that the database covers all image data as comprehensively as possible. This measure effectively enriches the diversity of the database, significantly improves the generalization performance of the model when facing various unknown data, enhances the stability of the model, and lays a solid foundation for the wide application of the model.
[0027] (3) The optimization target selected by the present invention contains "hidden variables" and cannot be directly estimated using the maximum likelihood estimation method. Instead, the "variational inference method" is cleverly used to estimate the lower limit of the likelihood function containing hidden variables, namely ELBO, and the optimal model parameters are obtained by step-by-step iterative optimization. The distribution of the input image is estimated by the variational method to obtain the distribution parameters of the image, and unlimited sampling can be performed from the distribution to expand the data on a large scale. In order to overcome the non-differentiable problem of the sampling operation, the present invention innovatively introduces a model reparameterization operation, so that the gradient can be propagated from the decoder to the encoder, and the model can be accurately optimized.
[0028] (4) The present invention does not require tedious data labeling work. Instead, it only requires moderate collection of raw data to expand the database into a large-scale training database with complete categories, a wide variety of types, and a large number of data. This method can quickly, accurately, and efficiently solve most of the problems encountered in the data collection process, significantly improving the efficiency and quality of data collection.
[0029] (5) This invention is based on the theory of maximum likelihood estimation and can estimate the true distribution of generated data more accurately. The images generated by the model are closer to reality and show higher diversity. At the same time, this method effectively reduces the risk of large differences between generated data and real data, significantly improves the model's image generation capability, and provides strong support for applications in related fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flow chart of a data augmentation method based on maximum likelihood estimation; Figure 2 A schematic diagram of an overview of the training database for a data augmentation method based on maximum likelihood estimation; Figure 3 It is a schematic diagram of the model structure of a data augmentation method based on maximum likelihood estimation; Figure 4 A schematic diagram of image reconstruction using a data augmentation method based on maximum likelihood estimation; Figure 5 Image 1 is generated for a data augmentation method model based on maximum likelihood estimation; Figure 6 Image 2 is generated for a data augmentation method model based on maximum likelihood estimation. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Example 1
[0032] like Figure 1 As shown in Figure 1, a data augmentation method based on maximum likelihood estimation mainly consists of four stages: 1. Build a training database Different types of data require different collection methods. In the process of collecting medical image data, the present invention can use professional equipment such as electron microscopes, phase contrast microscopes, and optical microscopes to obtain images, and use microscope cameras to collect data. For the collection of natural image data, the present invention can use ordinary cameras for on-site shooting, or use web crawler technology to grab relevant image data from the Internet. After the data collection is completed, the present invention will clean and organize the images to ensure their quality and accuracy, and finally store them for subsequent use. An overview of building a training database is shown below. Figure 2 shown.
[0033] 2. Sample distribution estimation Based on the "training database", a "sample distribution estimation model" is constructed to estimate the parameters of the distribution of samples generated in the database, and the optimization target is constructed using the maximum likelihood estimation principle. The target is optimized using the gradient descent method to obtain the distribution parameters of the generated samples. The present invention assumes that the hidden variables corresponding to the distribution of the generated samples obey a multidimensional normal distribution with a mean of u and a covariance matrix of ∑, that is, .
[0034] 3. Image restoration Based on the distribution parameters of the generated samples obtained in 2, the reparameterization method is used to decouple the randomness of the samples, making the sampling operation differentiable. Its mathematical expression is as follows: , ; The randomness of z is reflected in the variable e. The random variable e is sampled and added to u to obtain the random variable z. z is input into the decoder for decoding to obtain the decoded image.
[0035] 4. Image Generation In the process of 2 and 3, the model has learned the real distribution of the generated samples. At this time, the present invention uses the model to generate data an unlimited number of times, from the standard Gaussian distribution The random variable z obtained by sampling is input into the decoder to obtain its corresponding image.
[0036] The present invention rapidly expands data based on the "maximum likelihood estimation" principle to build a comprehensive, complete and diversified training database.
[0037] In order to train the data augmentation model based on "maximum likelihood estimation", it is necessary to first collect data preliminarily and build a "training database". Then, based on the "training database", the specific parameters of the normal distribution that the sample obeys are estimated, and the estimated parameters are sampled and input into the decoder for decoding to reconstruct the original image sample and complete the model training. In the inference stage, random sampling is performed from the standard normal distribution to obtain a random feature vector z, which is input into the decoder for decoding to obtain an image sample. If sampling from the normal distribution is unlimited, unlimited data can be obtained. The obtained image is further cleaned and added to the database to build a larger training database. The specific process is as follows: (1) Building a training database First, the present invention is committed to the detailed collection of target data, striving to include all available data resources to ensure that all types of samples that may appear in actual application scenarios are covered. On this basis, a "training database" is constructed, and by enriching the diversity of the database, the model can make more accurate estimates of the distribution parameters of the generated samples, providing a solid foundation for subsequent model training.
[0038] (2) Sample distribution estimation like Figure 3 As shown, based on the constructed "training database", the present invention uses the "maximum likelihood estimation principle" to accurately estimate the parameters of the generated sample distribution. The present invention assumes that the collected image is first sampled from p(z|x) to obtain z, and then the image x is sampled from p(x|z) after z is given. Therefore, the present invention needs to estimate p(z|x).
[0039] First, the present invention selects a neural network as the parameter estimation function and uses a self-attention network to perform feature encoding on image samples. The network divides the image into image blocks, each of which is 16*16 in size. Each image block is represented by a feature vector, which is mapped by a multi-layer self-attention network to predict the true parameters of the image distribution. This process is a posterior parameter estimation process, and the specific process is as follows: According to the maximum likelihood estimation principle, the present invention needs to estimate the true posterior distribution, assuming that the marginal distribution of the observable image is p(x) , the distribution that produces this image is p(z) , then the image actually obtained is determined by the hidden variable z and observed variables x The joint distribution of the two is p(x, z) .
[0040] Now, only the observed image is available, and the maximum likelihood estimation is performed on it: ; in, p(x) is the marginal distribution of the observed image data, p(x, z) is the joint distribution of the image data variable and the latent variable (the distribution that generates the image). The above optimization objective cannot be optimized directly. At this time, an arbitrary posterior distribution is introduced q (z|x) , so that the optimization objective can be optimized directly.
[0041] ; At this point, according to the definition of expectation, the above formula is transformed into the following expression ; Among them, p(z|x) is the true posterior distribution of the distribution p(z) that generates the image, and E represents the expectation of the function under a certain distribution. Further, the above formula is converted into a distance metric between distributions, namely the KL divergence form ; The purpose of the present invention is to estimate the likelihood of p(x), and for KL divergence, its value is always greater than zero. The larger the p(x) on the left side, the smaller the KL divergence, and the closer the distance between the distributions. The larger the KL divergence is, the smaller the p(x) is. The same, then p(x) reaches its maximum value. The optimization task of maximizing likelihood is completed.
[0042] Finally, the optimization objective becomes: ; By optimizing the above objectives, we can obtain the true posterior distribution p(z|x) of the latent variable z, that is, the specific distribution of the generated image. This distribution is assumed to be a normal distribution, and its distribution is ; Through continuous learning and optimization, the model eventually learns the latent variable distribution p(z|x) that generates images, which can be used to further sample and generate images.
[0043] (3) Image reconstruction Based on the posterior distribution parameters of the latent variables obtained by optimization in 2, the present invention needs to sample from the distribution and send the sampled latent variables to the decoder for image restoration to ensure the decoder's ability to generate image samples from latent variables.
[0044] The present invention selects a neural network as a decoder. A self-attention network is used to decode latent variables. The network divides the latent variable features into feature points (tokens) of the same dimension. The latent variable dimension is 10,000, the number of feature points is 10*10, and the dimension of each feature point is 100. After the feature vector is interactively mapped by a multi-layer self-attention mechanism, the original image of the input encoder is restored and reconstructed to obtain the same original image. Figure 1 Generate the image consistently.
[0045] For the optimization goal in 3, its form can be further transformed ; Among them, p(x, z) represents the joint distribution of random variables x and z. The above formula can be further decomposed into: ; in, represents the KL divergence, p(z) for z The true posterior distribution of p(x|z) is the true posterior distribution of x. E represents the expectation of the function under a certain distribution, and q(z|x) is an arbitrary distribution introduced. To maximize the above objectives, q(z|x) and p(z|x) The distance will gradually approach, and at the same time p(x|z) exist q(z|x) The expectation under the condition is getting bigger and bigger, indicating that "the original image is learned by the encoder to obtain the posterior distribution of the latent variable z p(z|x) , while from p(z|x) Sampling in z ,Will z The image decoded by the input decoder is consistent with the original image. This ensures that the model accurately learns the hidden variables that generate the image. z The posterior distribution of , and the ability to decode this distribution into an image.
[0046] When optimizing the above objectives, the stochastic gradient descent algorithm is used, which requires the objective function to be differentiable everywhere. However, the sampling operation of the latent variable is not differentiable. To address this problem, the present invention proposes a reparameterization technique to decouple the randomness of the posterior distribution p(z|x).
[0047] , ; Using the above scheme, the randomness of the hidden variable z is determined by the introduced random variable e Decision. Variable e It obeys the standard normal distribution. When the model is optimized, the encoder's prediction result u ,∑ can participate in the model optimization process, variables z You can directly use variables uThe parameters of the model are differentiated to avoid the problem of non-differentiable sampling operations. At this time, the model can use the gradient descent algorithm to jointly optimize the 2nd and 3rd stages, which greatly reduces the training cost and improves the model optimization efficiency. The 2nd and 3rd stages are the training stages of the model. The image reconstruction diagram is shown in Figure 4 shown.
[0048] (4) Image generation The image expansion model obtained by training in two stages 2 and 3 can be used to expand the data without limit.
[0049] When generating images, the present invention discards the encoder structure in the training process and only retains the decoder structure. The specific process is as follows: First, directly calculate the latent variable z From the standard normal distribution N(0,1) Sampling, hidden variables z The dimension is 10000, the number of feature points is 10*10, and the dimension of feature points is 100. z Input the decoder structure for decoding and get the image sample corresponding to the latent variable. The model generates an image such as Figure 5 , 6 shown.
[0050] Through the above steps, the present invention can implement targeted image augmentation strategies for scarce tail categories. At the same time, large-scale sampling and generation of images from latent variable distributions not only greatly enriches the diversity of the database, but also significantly improves the model's generalization ability and practical application value, laying a solid foundation for in-depth research and practical application in related fields.
[0051] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A data expansion method based on maximum likelihood estimation, characterized in that: The following steps are involved: S1. Collect medical image data and natural image data and build a training database; S2. Construct a sample distribution estimation model, which is a neural network model. The sample distribution estimation model divides the samples in the training database into blocks through a self-attention network and converts them into sample feature vectors. The sample feature vectors are mapped by the sample distribution estimation model and parameter estimation is performed. An optimization target is constructed based on the maximum likelihood estimation principle, and the optimization target is optimized using the gradient descent method to obtain the hidden variables that generate the image. z True posterior distribution parameters , distribution parameters The mean is u , a multidimensional normal distribution with a covariance matrix of ∑, where x is the image data variable; S3, through the decoder from the distribution parameters The latent variables after sampling are z The image is sent to the decoder for image restoration, and the distribution parameters are decoupled using reparameterization. Randomness: , ; Among them, e is a random variable; Using a gradient descent algorithm to jointly optimize the sample distribution estimation model and the decoder, and obtaining an image expansion model after reaching a target accuracy; S4, use the image expansion model to expand the data, directly z From the standard normal distribution N(0,1) The sampling is performed, and the sampling result is input into the decoder for decoding to obtain the image sample corresponding to the latent variable, and a data expansion method based on maximum likelihood estimation is completed.
2. The data expansion method based on maximum likelihood estimation according to claim 1, characterized in that: In step S1, when collecting medical image data, images are obtained with the help of an electron microscope, a phase contrast microscope and an optical microscope, and data are collected using a microscope camera; when collecting natural image data, an ordinary camera is used for field photography, or relevant image data is captured from the Internet; After data collection is completed, the medical image data and the natural image data are cleaned and sorted, and then stored in the database to obtain the training database.
3. The data expansion method based on maximum likelihood estimation according to claim 1, characterized in that: Step S2 includes the following steps: S21, constructing the sample distribution estimation model, wherein the sample distribution estimation model is a neural network model, wherein the sample distribution estimation model divides the samples in the training database into blocks through a self-attention network and converts the blocks into the sample feature vectors, and the sample feature vectors are mapped by the sample distribution estimation model; S22, the sample distribution estimation model is based on the observed image data variables x The marginal distribution p(x), Through the posterior distribution Get image data variable x and hidden variables z The joint distribution of p(x, z) ; S23, using the gradient descent method combined with KL divergence, the optimization objective of the maximum likelihood estimation is changed to: ; Where E is the expectation of the function under a certain distribution; S24, the sample distribution estimation model performs learning optimization on the optimization target to obtain latent variables for generating the image z True posterior distribution parameters ,and .
4. The data expansion method based on maximum likelihood estimation according to claim 3, characterized in that: In step S21, the self-attention network divides the images in the training database into image blocks, each image block has a size of 16*16, and each image block is represented by a feature vector.
5. The data expansion method based on maximum likelihood estimation according to claim 3, characterized in that: In step S22, Translates to: .
6. The data expansion method based on maximum likelihood estimation according to claim 5, characterized in that: In step S23, the gradient descent method is: Convert the expected function into a distance metric between distributions: ; Among them, D KL is the KL divergence; The value of KL divergence is always greater than zero; p(x) The larger it is, the smaller the KL divergence is, and the closer the distributions are. The larger the value, the greater the KL divergence. p(x) same same, p(x) Reach the maximum value and complete the optimization task of maximizing likelihood.
7. The data expansion method based on maximum likelihood estimation according to claim 3, characterized in that: Step S3 includes the following steps: S31, using the decoder to obtain the distribution parameters The latent variables after sampling are z The decoder is sent to the decoder for image restoration to obtain a generated image consistent with the original image, and the decoder is a self-attention neural network model; S32, the optimization goal is: ; Split into: ; in, p θ (z) is a hidden variable z The true posterior distribution of For image data variables x No. i The true posterior distribution after sub-optimization, No. i The posterior distribution after sub-optimization; S33, the stochastic gradient descent algorithm is used for optimization, and the distribution parameters are decoupled by using reparameterization Randomness: , ; Among them, e is a random variable; The sample distribution estimation model and the decoder are jointly optimized using a gradient descent algorithm, and an image expansion model is obtained after a target accuracy is achieved.
8. The data expansion method based on maximum likelihood estimation according to claim 7, characterized in that: In step S32, the optimization target is maximized. and p(z|x) The distance is gradually approaching, p(x|z) exist The expectations are growing.
9. The data expansion method based on maximum likelihood estimation according to claim 7, characterized in that: In step S33, the randomness of the hidden variable z is determined by the introduced random variable e decision, random variable e Obey standard normal distribution; When the model is optimized, the prediction result of the encoder u ,∑ participate in the model optimization process, hidden variables z Directly to the variable u Differentiate the parameter .
10. The data expansion method based on maximum likelihood estimation according to claim 1, characterized in that: In step S4, the hidden variable z The dimension is 10000, the number of feature points is 10*10, and the dimension is 100.
Citation Information
Patent Citations
Method for supplementing missing values by applying Bayesian estimation in power load prediction
CN111667117A
Process industrial soft measurement data supplement method based on SVAE-WGAN
CN113505477A
Continuous learning method based on Bayesian variational inference
CN115731396A
Industrial process soft measurement modeling method based on VAE-MRCNN
CN116975645A
Improved active learning remote sensing sample marking method
WO2023216725A1