| Text to image synthesis is an important research direction in the field of computer vision.According to the semantic relationship in text description,an image generator is used to synthesize a picture related to semantics.This is a cross-modal cross-cutting task.The purpose of this article is to implement the following work in the experiments of text-generating pictures:(1)This article uses the encoder in Skip-Thoughts to encode the input text description into a text feature vector.Random noise z and text feature vectors are connected together through a fully connected layer as a condition input to the generation network,and the discrimination network needs to: the fake image generated by the generator,the real image and its matching description,the real image and its.The error describes these three types of conditions for discrimination.The ability of the discriminator is enhanced.Through error back propagation,the image generated by the generator will be close to the real image,the effect is more realistic,and it also shows that the encoder in Skip-Thoughts can generate effective feature vectors.(2)Change the loss function to stabilize the training process.In this paper,the least squares generation adversarial network is used to replace the cross-entropy loss in the traditional generational adversarial network with the least square loss.Based on the structure of the deep convolution generation adversarial network,LSDCGAN is constructed,and the text is used as the input condition to guide the generator to generate pictures.The experimental results prove that the LSDCGAN model convergence speed is relatively faster,which can effectively reduce the model training time,and the quality of the generated pictures is also guaranteed.(3)The dual discriminator generates an adversarial network to solve the problem of insufficient sample diversity by combining KL and inverse KL divergence to generate a unified objective function.This paper adds a discriminator on the basis of the original generative adversarial network,where the discriminator obtains high scores in the generated distribution by judging that the data comes from real data,and the other discriminator is the opposite,by judging the data from the generated distribution and Do not get high scores in real data.The generator G tries to deceive these two discriminators during the training process.Using dual discriminators to generate adversarial networks for text generation can effectively increase the diversity of generated data samples. |