Font Size: a A A

Research On Image Generation Algorithm Based On Text Semantics

Posted on:2021-01-01Degree:MasterType:Thesis
Country:ChinaCandidate:L L WeiFull Text:PDF
GTID:2428330620464173Subject:Engineering
Abstract/Summary:PDF Full Text Request
In daily life,there are many ways to transfer information,including text,images,audio,video,etc.In many scenes,people prefer the way of conveying information with pictures and texts,but the text information is easier to obtain,and the corresponding image information is more difficult to obtain.In order to solve such problems,this thesis conducted a research on image generation based on text semantics.In this research,the variational autoencoder plays a very important role.Its core is to generate images by encoding and decoding text information.The measure of image quality uses the mean square error method,but this method The quality of the generated image cannot be guaranteed.At present,the most popular method of this research is based on GAN and its modified methods.GAN designed a generator and discriminator based on the idea of game to generate high-quality images.GAN has achieved certain results in image generation in English and simple scenes,but there are still some problems,such as less research on Chinese text,insufficient diversity of generated images,poor stability,and poor text consistency.In addition,in the traditional convolutional GAN,the problem that the long-distance pixel association relationship brought about by the local perception feature of the convolution operation is also a limitation of the GAN model.In response to the above problems,this thesis did the following research:1)This thesis constructs a dataset of Chinese poetry with rich emotional information.In order to make full use of text information in the image generation,this thesis carried out subject classification and emotion classification on the data set obtained by the crawler.In the subject classification task,the TextCNN model is selected,and the classification object is a single sentence of poetry.According to the characteristics of the short text of the poetry and the difficulty of extracting features,this text uses text multi-channel features and dynamic k-max pooling to improve TextCNN.The improved model has an F1 value of 0.965 in the classification of poetry themes.In the sentiment classification task,the classification object is a poetry sequence.In order to obtain the context of the poetry sequence,the task uses the Bi-LSTM classification model.In order to capture the long-distance feature dependence relationship in the text sequence,this thesis uses the Self-Attention mechanism toBi-LSTM.Improvements were made.The improved model has an F1 value of 0.963 in the poetry sentiment classification task.2)This thesis proposes three improved cGAN models for text image generation.First,the cGAN model(PSN-cGAN)based on the pseudo-twin neural network is proposed;second,the cGAN model(SA-cGAN)based on the Self-Attention mechanism is proposed;PSN-cGAN model.In addition,this thesis introduces the L-cGAN model of emotional feature formation,which is 0.25 higher than the Inception Score without emotional feature.This thesis conducts experiments on PSN-cGAN and SA-cGAN based on emotional features.The PSN-cGAN model enhances the consistency of generated images and text.The improved model Inception Score is improved by 0.39;the Self-Attention mechanism in the SA-cGAN model is solved.The problem of poor correlation of long-distance pixels caused by the characteristics of local perception of the convolution operation in the convolution cGAN,the improved model Inception Score increased by 0.56.In order to further improve the quality of the image generation model,this thesis proposes that the SA-PSN-cGAN model reaches the highest in the Inception Score indicator and Turing-like test,which is 3.04 and 62.8%,respectively.
Keywords/Search Tags:GAN, Text2 Image, text classification, sentiment analysis, pseudo siamese network, Self-Attention
PDF Full Text Request
Related items