Method and system for improving quality of image generated by generative adversarial network based on guide sampling

By introducing a method of common normalized loss function and probability adjustment tag category in the generative adversarial network, combined with the bootstrap sampling algorithm, the problems of GAN in the image generation quality and diversity trade-offs and complex scene generation tasks are solved, and higher quality and diversity image generation is achieved.

CN119990247APending Publication Date: 2025-05-13SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411858538.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Existing generative adversarial networks (GANs) are difficult to trade off between image generation quality and diversity, and are prone to problems of missing details and structural distortion in complex scenario generation tasks.

Method used

By introducing a common normalized loss function of the generator and discriminator, and using probability to adjust the category of the training data label, the intermediate variable is generated in combination with the guide sampling algorithm, as input to generate adversarial networks, to improve the image generation quality.

Benefits of technology

It effectively prevents the problem of instability in GAN training, reduces the occurrence of pattern collapse, and improves the generation ability and image quality of generative adversarial networks in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990247A_ABST
    Figure CN119990247A_ABST
Patent Text Reader

Abstract

The invention relates to a method and a system for improving the quality of an image generated by a generative adversarial network based on guide sampling. The method comprises the following steps of: obtaining an image training set and category or text label information corresponding to an image in the image training set, and pairing the image and the corresponding label information into result; an image, a label gt; in the form, constructing an image label training set; the image label training set is utilized to train a generative adversarial network, the generative adversarial network comprises a generator and a discriminator, the category of a training data label is adjusted through probability in the training process of the generative adversarial network, and a common normalized loss function of the generator and the discriminator is introduced to perform parameter updating; and obtaining potential vectors, generating an intermediate variable based on a guide sampling algorithm, taking the intermediate variable as the input of the trained generative adversarial network, and generating a high-quality composite image by using the trained generative adversarial network. Compared with the prior art, the method has the advantages of stable training, good image generation effect and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image generation technology, and in particular to a method and system for improving the quality of images generated by a generative adversarial network based on guided sampling. Background Art

[0002] Since its introduction, Generative Adversarial Network (GAN) has quickly become a core technology in the field of deep learning. GAN can generate highly realistic images through adversarial training of the generator and the discriminator. In the past decade, with the optimization of model architecture and the improvement of training technology, GAN has made significant progress in the quality of image generation. However, the development of this technology still faces some limitations and challenges.

[0003] 1. Main progress of GAN model image generation technology

[0004] Model architecture optimization: Due to the problems of unstable training and low quality of generated images, the traditional GAN ​​model has gradually evolved into a series of improved architectures. For example, DCGAN (Deep Convolutional GAN) improves the clarity and stability of image generation by introducing convolutional neural networks. StyleGAN and StyleGAN2 further optimize the design of the generator, so that the generated images reach a high level in terms of details and structure. In addition, BigGAN has achieved significant improvements in image generation quality by introducing larger network capacity and high-resolution training.

[0005] Improvement of loss function: The binary cross entropy loss used by traditional GAN ​​is prone to mode collapse. To solve this problem, researchers proposed WGAN (Wasserstein GAN) and its variants, which improved the stability of the training process by adopting Wasserstein distance. In subsequent developments, methods such as LSGAN (Least Squares GAN) and Hinge Loss further optimized the diversity and visual quality of generated images.

[0006] Improvement of training technology: The instability and difficulty in convergence during GAN training have always been the focus of research. In recent years, technologies such as spectral normalization and gradient penalty have been introduced to improve the stability of training. In addition, progressive growing training significantly improves the effect of high-resolution image generation by gradually increasing the complexity of the model from low resolution to high resolution.

[0007] Application scenario expansion: In addition to high-quality image generation, GAN has also been widely used in image restoration, super-resolution, style transfer and other fields. For example, Pix2Pix and CycleGAN make image-to-image conversion tasks more efficient through the improvement of Conditional GAN.

[0008] 2. Disadvantages of Existing Technologies

[0009] Although GAN models have made great progress in image generation quality, they still have the following limitations and challenges:

[0010] Unstable training process: GAN training requires the generator and the discriminator to reach a dynamic balance, but due to the antagonism between the two, the training process is often unstable and prone to problems such as mode collapse, gradient disappearance or divergence. In addition, improvements in the generator often lead to enhanced adaptability of the discriminator, and this dynamic change makes training more complicated.

[0011] The trade-off between generation quality and diversity: Improving image quality while maintaining the diversity of generated images is a major challenge. For example, certain optimization methods may cause the images generated by the model to tend to certain specific patterns, while losing the diversity of the data. This mode collapse problem is particularly prominent in large-scale generation tasks.

[0012] Lack of processing capabilities for complex scenes: Existing GAN models perform well in generating simple, clearly structured images (such as faces and objects), but are prone to problems such as missing details and structural distortion in complex scene generation tasks (such as natural scenery and dense crowds). This limits the promotion and application of GAN in specific fields. Summary of the invention

[0013] The purpose of the present invention is to provide a method and system for improving the quality of images generated by a generative adversarial network based on guided sampling.

[0014] The purpose of the present invention can be achieved by the following technical solutions:

[0015] A method for improving the quality of images generated by a generative adversarial network based on guided sampling, comprising the following steps:

[0016] Step 1) obtaining an image training set and the category or text label information corresponding to the images in the image training set, pairing the images and their corresponding label information in the form of <image, label>, and constructing an image label training set;

[0017] Step 2) using the image label training set to train a generative adversarial network, the generative adversarial network includes a generator and a discriminator, during the generative adversarial network training process, the category of the training data label is adjusted by probability, and a common normalized loss function of the generator and the discriminator is introduced to update the parameters;

[0018] Step 3) Obtain the latent vector, generate intermediate variables based on the guided sampling algorithm, use them as the input of the trained generative adversarial network, and use the trained generative adversarial network to generate high-quality synthetic images.

[0019] The step 2) comprises the following steps:

[0020] Step 21) setting the structure of the generative adversarial network and initializing the weight matrices of the generator and the discriminator, wherein the structure includes the number of layers of the generator and the discriminator and the specific network structure of each layer, wherein the generator includes a mapping network and a synthesis network;

[0021] Step 22) obtaining <image, label> pairs of data from the image label training set, performing preprocessing, and adjusting the categories of the training data labels by probability to form training samples;

[0022] Step 23) Using the training samples to train the generator to generate a synthetic image: randomly sampling from a standard normal distribution to obtain a first latent vector as the input of the mapping network in the generator, and outputting a synthetic image after passing through the mapping network and the synthesis network;

[0023] Step 24) Train the discriminator to distinguish between real and synthetic images: input the real images in the image label training set and the synthetic images generated by the generator into the discriminator. The goal of the discriminator is to mark the real images as real and the synthetic images as fake.

[0024] Step 25) According to the result output by the discriminator, the common normalized loss function of the generator and the discriminator is calculated, and the weight matrices of the generator and the discriminator are updated using the back propagation algorithm and the gradient descent method;

[0025] Step 26) determines whether the training is completed. If so, save the generated adversarial network. If not, return to step 23) for the next training.

[0026] In the generator, the mapping network consists of 8 layers of fully connected neural networks, and the structure of the synthesis network is: attn ×Self-attention layer-n res ×(n cnn × Convolutional Neural Network – Upsampling Convolution Layer)-toRGB, where the output of the mapping network interacts with the network output features of each layer in the synthesis network through an adaptive instance normalization operation; the structure of the discriminator is: n res ×(n cnn× Convolutional Neural Network-Downsampling Convolution Layer)-n attn ×Self-attention layer – Sigmoid, where n res ,n cnn and n attn They are the number of resolution enhancement dimensions, the number of convolutional neural network layers, and the number of self-attention mechanism layers, toRGB is the output layer of the generator network, and Sigmoid is the output layer of the discriminator network.

[0027] The step 22) is specifically as follows: resize, normalize and enhance the data of each image in the image label training set, and perform image labeling on all images according to the probability p. all Set to <all>Labels and use the processed data as training samples for the generator and discriminator.

[0028] The loss function of the generator is:

[0029] L G =-E z~N(0,1) [logD(G(z))]

[0030] The loss function of the discriminator is the binary cross entropy loss:

[0031]

[0032] The regularization term is used to optimize the generator and the discriminator at the same time, and a common normalized loss function is obtained:

[0033]

[0034] Among them, D(x) represents the output of the discriminator for the input x, G(z) represents the synthetic image output by the generator for the input potential vector z, z~N(0,1) means that the potential vector z conforms to the standard normal distribution, x~p data It means that x follows the real data distribution, and E means to find the expectation according to the probability distribution.

[0035] In step 25), an adaptive optimizer is used to update the weight matrix, and its initial learning rate and other hyperparameters are adjusted according to the task scale.

[0036] In the step 26), the criterion for judging whether the training is completed is: when the set number of training times N is reached or the quality of the image generated by the generator reaches the preset standard, the training is judged to be completed.

[0037] The step 3) comprises the following steps:

[0038] Step 31) sampling from the standard normal distribution to obtain a second latent vector z', selecting a conditional label c corresponding to the target generated image, and presetting an interval of the guided sampling intensity λ;

[0039] Step 32) Use the mapping network of the generator to obtain the latent space variable w and edit and modify the variable w according to the guided sampling intensity to obtain the intermediate variable:

[0040] w edit =G mapp (z′,c)+(λ-1)(G mapp (z ′ ,c)-G mapp (z′, <all>))

[0041] Among them, G mapp represents the mapping network, <all>Represents the category of the data label after probability adjustment

[0042] Step 33) The modified intermediate variable w edit As the input of the generator synthesis network, the synthesized data is obtained, and the optimal synthesized data is selected as the final synthesized image output according to the synthesis effect.

[0043] In the step 31), the sampling intensity interval is guided to be adjusted according to the task category.

[0044] A system for improving the quality of images generated by a generative adversarial network based on guided sampling, used to implement the method as described above, the system comprising:

[0045] Training set construction module: obtain the image training set and the category or text label information corresponding to the images in the image training set, pair the images and their corresponding label information in the form of <image, label>, and construct the image label training set;

[0046] Generative adversarial network training module: uses the image label training set to train the generative adversarial network, which includes a generator and a discriminator. During the generative adversarial network training process, the category of the training data label is adjusted by probability, and a common normalized loss function of the generator and the discriminator is introduced to update the parameters;

[0047] Image synthesis module: obtains the latent vector, generates intermediate variables based on the guided sampling algorithm, and uses the trained generative adversarial network as the input to generate high-quality synthetic images.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] First, the present invention proposes for the first time a method of introducing a common normalized loss function of the generator and the discriminator in the training process of a generative adversarial network, and adjusting the categories of the training data labels through appropriate probabilities. This method can effectively prevent the training instability problem of the generative adversarial network, reduce the occurrence of mode collapse, and has the characteristics of good robustness.

[0050] Second, the present invention uses the operation of rationally editing the output space of the generator's mapping network through vector calculation, which can greatly improve the final generation effect or correct the problem of unreasonable structural shape in the generation result.

[0051] Third, the recognition accuracy of the present invention is better than the mainstream algorithms on CIFAR10, FFHQ, LSUN, and ImageNet1K datasets, and has high computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 is a flow chart of the method of the present invention;

[0053] Figure 2 A schematic diagram of the training process of a generative adversarial network of the present invention;

[0054] Figure 3 It is a schematic diagram of the guided sampling generation process of the present invention. DETAILED DESCRIPTION

[0055] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0056] This embodiment provides a method for improving the quality of images generated by a generative adversarial network based on guided sampling. Figure 1 As shown, the following steps are included:

[0057] Step 1) obtain an image training set and the category or text label information corresponding to the images in the image training set, pair the images and their corresponding label information in the form of <image, label>, and construct an image label training set.

[0058] Step 2) Train the Generative Adversarial Network (GAN) using the image labeled training set.

[0059] The generative adversarial network includes a generator and a discriminator. In the generative adversarial network training process, this embodiment adjusts the category of the training data label by probability, and introduces a common normalized loss function of the generator and the discriminator to update the parameters.

[0060] Specifically, Figure 2 As shown in Figure 1, the training process of the generative adversarial network includes the following steps:

[0061] Step 21) Set the structure of the generative adversarial network and the upper limit of the number of training times N, and initialize the weight matrix θ of the generator and discriminator G and θ D The structure includes the number of layers of the generator and the discriminator and the specific network structure of each layer. The generator includes a mapping network and a synthesis network, wherein the mapping network is composed of 8 layers of fully connected neural networks, and the structure of the synthesis network is: attn ×Self-attention layer-n res ×(n cnn × Convolutional Neural Network – Upsampling Convolution Layer)-toRGB, where the output of the mapping network interacts with the network output features of each layer in the synthesis network through an adaptive instance normalization operation; the structure of the discriminator is: n res ×(n cnn × Convolutional Neural Network-Downsampling Convolution Layer)-n attn ×Self-attention layer – Sigmoid, where n res ,n cnn and n attn They are the number of resolution enhancement dimensions, the number of convolutional neural network layers, and the number of self-attention mechanism layers, toRGB is the output layer of the generator network, and Sigmoid is the output layer of the discriminator network.

[0062] Step 22) Obtain <image, label> pairs of data from the image label training set, perform preprocessing, and adjust the categories of the training data labels by probability to form training samples.

[0063] Each image in the image label training set is resized, normalized, and data augmented (such as rotation, scaling, flipping, etc.) to improve the robustness of the model and ensure that the pixel value is in the range of [-1,1], and all images are labeled according to the probability p. all Set to <all>Labels and use the processed data as training samples for the generator and discriminator.

[0064] Step 23) Use the training samples to train the generator to generate a synthetic image: randomly sample the first latent vector z from the standard normal distribution as the input of the mapping network in the generator, and output the synthetic image G(z) after passing through the mapping network and the synthesis network.

[0065] Step 25) Train the discriminator to distinguish between real and synthetic images: The real images in the image label training set and the synthetic images generated by the generator are input into the discriminator. The goal of the discriminator is to label the real images as 1 (real) and the synthetic images as 0 (fake).

[0066] Step 26) According to the output of the discriminator, the common normalized loss function of the generator and the discriminator is calculated, and the weight matrix θ of the generator and the discriminator is updated using the back propagation algorithm and the gradient descent method. G and θ D .

[0067] The loss function of the generator is:

[0068] L G =-E z~N(0,1) [logD(G(z))]

[0069] The loss function of the discriminator is the binary cross entropy loss:

[0070]

[0071] The regularization term is used to optimize the generator and the discriminator at the same time, and a common normalized loss function is obtained:

[0072]

[0073] Among them, D(x) represents the output of the discriminator for the input x, G(z) represents the synthetic image output by the generator for the input potential vector z, z~N(0,1) means that the potential vector z conforms to the standard normal distribution, x~p data It means that x follows the real data distribution, and E means to find the expectation according to the probability distribution.

[0074] The adaptive optimizer Adamw is used to update the weight matrix, and its initial learning rate and other hyperparameters can be adjusted according to the task scale.

[0075] Step 27) determines whether the training is completed. If so, save the generated adversarial network. If not, return to step 23) for the next training.

[0076] The criterion for judging whether the training is completed is: when the set number of training times N is reached or the quality of the image generated by the generator reaches the preset standard (which can be measured by certain evaluation indicators, such as Fréchet Inception Distance, FID value), the training is considered to be completed.

[0077] Step 3) Obtain the latent vector, generate intermediate variables based on the guided sampling algorithm, use them as the input of the trained generative adversarial network, and use the trained generative adversarial network to generate high-quality synthetic images.

[0078] Specifically, Figure 3 As shown, step 3) includes the following steps:

[0079] Step 31) Sampling a second latent vector z' from a standard normal distribution, selecting a conditional label c corresponding to the target generated image, and presetting an interval of the guided sampling intensity λ (e.g., [1.0, 2.5]);

[0080] Step 32) Use the mapping network of the generator to obtain the latent space variable w and edit and modify the variable w according to the guided sampling intensity to obtain the intermediate variable:

[0081] w edit =G mapp (z′,c)+(λ-1)(G mapp (z ′ ,c)-G mapp (z′, <all>))

[0082] Among them, G mapp represents the mapping network, <all>Represents the category of the data label after probability adjustment

[0083] Step 33) The modified intermediate variable w edit As the input of the generator synthesis network, the synthesized data is obtained, and the optimal synthesized data is selected as the final synthesized image output according to the synthesis effect.

[0084] In the step 31), the sampling intensity interval is guided to be adjusted according to the task category.

[0085] The above is an introduction to the method embodiment. The following is a further explanation of the solution of the present invention through a system embodiment.

[0086] A system for improving the quality of images generated by a generative adversarial network based on guided sampling, the system comprising:

[0087] Training set construction module: obtain the image training set and the category or text label information corresponding to the images in the image training set, pair the images and their corresponding label information in the form of <image, label>, and construct the image label training set;

[0088] Generative adversarial network training module: uses the image label training set to train the generative adversarial network, which includes a generator and a discriminator. During the generative adversarial network training process, the category of the training data label is adjusted by probability, and a common normalized loss function of the generator and the discriminator is introduced to update the parameters;

[0089] Image synthesis module: obtains the latent vector, generates intermediate variables based on the guided sampling algorithm, and uses the trained generative adversarial network as the input to generate high-quality synthetic images.

[0090] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0091] In order to verify the performance of the present invention, this embodiment is experimented on four public data sets (CIFAR-10, FFHQ, LSUN, ImageNet1K), and analyzed and compared with the existing generative adversarial network model training method and sampling optimization method. This embodiment adopts a variety of different experimental settings, namely:

[0092] Experimental setting 1: Traditional training method, this experiment is used as the performance baseline;

[0093] Experimental setting 2: traditional training method + traditional sampling boosting method;

[0094] Experimental setup 3: Based on Experimental setup 1, the data proposed by the present invention is added. <all>Label;

[0095] Experimental setting 4: Based on experimental setting 3, the common normalization loss proposed by this invention is added;

[0096] Experimental setting 5: Based on Experimental setting 4, the guided sampling optimization synthesis result proposed by the present invention is added.

[0097] To control variables, all experimental settings use the same model structure and unified hyperparameters for training and testing. From the comparison in Table 1, Table 2 and Table 3, it can be seen that the improvement schemes proposed in the present invention can effectively improve the final synthesis performance of the model, which fully proves that the new training method proposed in the present invention can effectively improve the problems of unstable training and pattern collapse of the generative adversarial network, and the proposed guided sampling algorithm can further improve the final generation effect of the system. On the above four data sets, the FID scores of the present invention are 2.84, 4.23, 2.86 and 4.06 respectively. The experimental results are better than the currently published mainstream algorithms and have better data fitting effects.

[0098] Table 1 Experimental data of CIFAR-10 dataset

[0099] Experimental Configuration FID score↓ IS score↑ Experimental Setup 1 4.62 47.41 Experimental Setup 2 4.21 43.64 Experimental Setup 3 3.98 49.15 Experimental Setup 4 3.52 52.38 Experimental Setup 5 2.84 51.23

[0100] Table 2 Experimental data of FFHQ and LSUN datasets (FID score↓)

[0101]

[0102]

[0103] Table 3 Experimental data of ImageNet1K dataset

[0104] Experimental Configuration FID score↓ IS score↑ Experimental Setup 1 9.24 97.46 Experimental Setup 2 8.87 93.13 Experimental Setup 3 6.62 102.58 Experimental Setup 4 5.78 111.27 Experimental Setup 5 4.06 105.69

[0105] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.< / all> < / all> < / all> < / all> < / all> < / all> < / all>

Claims

1. A method for improving the quality of images generated by a generative adversarial network based on guided sampling, characterized in that: The following steps are involved: Step 1) obtaining an image training set and the category or text label information corresponding to the images in the image training set, pairing the images and their corresponding label information in the form of <image, label>, and constructing an image label training set; Step 2) using the image label training set to train a generative adversarial network, the generative adversarial network includes a generator and a discriminator, during the generative adversarial network training process, the category of the training data label is adjusted by probability, and a common normalized loss function of the generator and the discriminator is introduced to update the parameters; Step 3) Obtain the latent vector, generate intermediate variables based on the guided sampling algorithm, use them as the input of the trained generative adversarial network, and use the trained generative adversarial network to generate high-quality synthetic images.

2. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 1, characterized in that: The step 2) comprises the following steps: Step 21) setting the structure of the generative adversarial network and initializing the weight matrices of the generator and the discriminator, wherein the structure includes the number of layers of the generator and the discriminator and the specific network structure of each layer, wherein the generator includes a mapping network and a synthesis network; Step 22) obtaining <image, label> pairs of data from the image label training set, performing preprocessing, and adjusting the categories of the training data labels by probability to form training samples; Step 23) Using the training samples to train the generator to generate a synthetic image: randomly sampling from a standard normal distribution to obtain a first latent vector as the input of the mapping network in the generator, and outputting a synthetic image after passing through the mapping network and the synthesis network; Step 24) Train the discriminator to distinguish between real and synthetic images: input the real images in the image label training set and the synthetic images generated by the generator into the discriminator. The goal of the discriminator is to mark the real images as real and the synthetic images as fake. Step 25) According to the result output by the discriminator, the common normalized loss function of the generator and the discriminator is calculated, and the weight matrices of the generator and the discriminator are updated using the back propagation algorithm and the gradient descent method; Step 26) determines whether the training is completed. If so, save the generated adversarial network. If not, return to step 23) for the next training.

3. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 2, characterized in that: In the generator, the mapping network consists of 8 layers of fully connected neural networks, and the structure of the synthesis network is: attn ×Self-attention layer-n res ×(n cnn × Convolutional Neural Network – Upsampling Convolution Layer)-toRGB, where the output of the mapping network interacts with the network output features of each layer in the synthesis network through an adaptive instance normalization operation; the structure of the discriminator is: n res ×(n cnn × Convolutional Neural Network-Downsampling Convolution Layer)-n attn ×Self-attention layer – Sigmoid, where n res ,n cnn and n attn They are the number of resolution enhancement dimensions, the number of convolutional neural network layers, and the number of self-attention mechanism layers, toRGB is the output layer of the generator network, and Sigmoid is the output layer of the discriminator network.

4. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 2, characterized in that: The step 22) is specifically as follows: resize, normalize and enhance the data of each image in the image label training set, and perform image labeling on all images according to the probability p. all Set to <all> Labels and use the processed data as training samples for the generator and discriminator.< / all> 5. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 2, characterized in that: The loss function of the generator is: L G =-E z~N(0,1) [logD(G(z))] The loss function of the discriminator is the binary cross entropy loss: The regularization term is used to optimize the generator and the discriminator at the same time, and a common normalized loss function is obtained: Among them, D(x) represents the output of the discriminator for the input x, G(z) represents the synthetic image output by the generator for the input potential vector z, z~N(0,1) means that the potential vector z conforms to the standard normal distribution, x~p data It means that x follows the real data distribution, and E means to find the expectation according to the probability distribution.

6. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 2, characterized in that: In step 25), an adaptive optimizer is used to update the weight matrix, and its initial learning rate and other hyperparameters are adjusted according to the task scale.

7. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 2, characterized in that: In the step 26), the criterion for judging whether the training is completed is: when the set number of training times N is reached or the quality of the image generated by the generator reaches the preset standard, the training is judged to be completed.

8. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 1, characterized in that: The step 3) comprises the following steps: Step 31) sampling from the standard normal distribution to obtain a second latent vector z', selecting a conditional label c corresponding to the target generated image, and presetting an interval of the guided sampling intensity λ; Step 32) Use the mapping network of the generator to obtain the latent space variable w and edit and modify the variable w according to the guided sampling intensity to obtain the intermediate variable: w edit =G mapp (z′,c)+(λ-1)(G mapp (z′,c)-G mapp (z′, <all> ))< / all> Among them, G mapp represents the mapping network, <all> Represents the category of the data label after probability adjustment< / all> Step 33) The modified intermediate variable w edit As the input of the generator synthesis network, the synthesized data is obtained, and the optimal synthesized data is selected as the final synthesized image output according to the synthesis effect.

9. The method for improving the quality of images generated by a generative adversarial network based on guided sampling according to claim 8, characterized in that: In the step 31), the sampling intensity interval is guided to be adjusted according to the task category.

10. A system for improving the quality of images generated by a generative adversarial network based on guided sampling, characterized in that: For implementing the method according to any one of claims 1 to 9, the system comprises: Training set construction module: obtain the image training set and the category or text label information corresponding to the images in the image training set, pair the images and their corresponding label information in the form of <image, label>, and construct the image label training set; Generative adversarial network training module: uses the image label training set to train the generative adversarial network, which includes a generator and a discriminator. During the generative adversarial network training process, the category of the training data label is adjusted by probability, and a common normalized loss function of the generator and the discriminator is introduced to update the parameters; Image synthesis module: obtains the latent vector, generates intermediate variables based on the guided sampling algorithm, and uses the trained generative adversarial network as the input to generate high-quality synthetic images.