The note of Generative Adversarial Text to Image Synthesis
For text to image, there are many plausible value to one pixel that correctly illustrate the description of the text, since the the distribution of image conditioned on the text is highly multimodal, e.g. small changes of text description may affect pixel values with low correlation across a wide range.
For image to text, it is much practical to decompose the sequence according to the chain rule to generate captions. TOREAD
It is common to maximize for the generator, while it is found to be more effective to minimize maximize instead.
Joint embedding with symmetric structure
The purpose of this structure is to obtain which can encode text description to visually-discriminative vector.
Denote the classifier as followed, where is the image encoder, and is the text encoder. Inner-product of vectors can be interpreted to some degree as the distance or similarity of two vectors.
Then optimize the following structured loss:
The intuition here is that a text encoding should have a higher compatibility score with image of the corresponding class and vice-versa TOREAD
There is no particular to the total architecture of network, except for the conditions which is encoded from the text description and concatenated to noise afterwards. Two different full-connected layers are implemented to encode text description both in upsampling and downsampling model.
Two sources of error should be considered: unrealistic (bad generation) images, and realistic image yet dismatched with the text.
For this reason, apart from origin losses: real image with right text and fake image with false text, additional loss: real image with false text, is added to train the discriminator to have the ability of discriminate whether the generated image match the text or not, instead of only to measure the quality of output image.
Deep networks have been shown to learn representations in which interpolations between embedding pairs tend to be near the data manifold (Bengio et al., 2013) TOREAD
Then laryge amount of additional text embeddings can be generated by simply interpolation between captions of training samples.
The generator can learn an ability of generate the ‘interpolated image’ and fill in gaps on the data manifold between training points TOREAD, while discriminator can learn to predict whether image and text pairs match or not.
Note that there is no need to add label of interpolated vector for they are synthetic and fake.
Disentangling style and content
It is a validation method to qualitify the ability of each proposed model to use the noise as style information, in other words, to determine the strength of the effect of noise z in different training methods
By content, we mean the visual attributes of the bird itself, such as shape, size and color of each body part. By style, we mean all of the other factors of variation in the image such as background color and the pose orientation of the bird.
Therefore, generative model must learn to use noise, the prior-condition, to represent style variations in order to generate realistic image.
Inverting generative model for style transfer is designed to transfer the generative image back into noise z with the following loss,
It is a bit difficult to understand the implication this model. To make sense of this, we can interpret this inverted model as to measure the ability of to output a generative image with both decent content and style in convergence case where comes close to 0.
cosine similarity and
ROC is used as showed in the above figure. Images with similar and dissimilar content and style is selected and constructed as a pair, and if GAN has disentangled ability, the similarity between noises inverted from images of the same style (e.g. similar pose) should be higher than that of different styles (e.g. different pose).