Given a paragraph consisting of multiple sentences, this paper proposed a sequential conditional GAN framework to generate a sequence of images, one for each sentence, to depict the total story.
Different from the video generation, story visualization mainly focuses less on the continuity of motions in frames, such as a running man move dynamically which is smoothly represented in the clip, but more on global consistency across scenes and characters.
There are two main challenges for story visualization:
One is that the sequence of images should be coherently describe the total story. In other words, if the model is highly based on the previous strategy where each generation is solely based on the single sentence, the final result will be inconsistent. For instance, ‘A rectangular is at the center. Then add a round at the right’. In this case, the result will fail to represent the relationship between two object.
Another challenge is how to keep the appearance and layout of objects and background in a coherent way as the story progresses. For example, Harry and the surrounding around him appeared in the paragraph description should be uniform in some way.
Difference between video generation and story visualization
For video generation, models focus on extract dynamic feature to maintain motions, like the man is running. It pay attention to the body movement as time goes by, while story visualization is devoted to a sequence of key static frames representing the whole plots, like this man runs from the garden with many flowers to the bus station and inquiry the people around him. From this point of view, motion features of story visualization are less important while scene changes with variation of multiple objects should be captured, comparing to the relatively static background in video clips.
The architecture is relatively easy to understand, as shown below. It is composed of Story Encoder, Context Enocder, Image Generator, Image Discriminator and Story Discriminator.
Story encoder is to map the story description into the low dimensional vector, story context , which contains all information of the story.
Specifically, … TODO
To smooth the representation manifold in latent semantic space, KL divergence is imported.
where is the encoded feature vecotrs for the paragraph, different with the notation in the image for the convenience of interpretation.
A deep RNN based Context encoder is imported to capture contextual information during sequential generation. It contains two parts, standard GRU cells and Text2Gist cells.
For each time , GRU takes as input sentence and noise , and outputs which contains the local information of each sentence.
Then Text2Gist module combines with the story context to generate so-called ‘Gist’ vector which contains both global and local context information.
To be explicit for the Text2Gist, as shown below:
and are the update and reset gates, respectively. The update gate decide how much information from the previous step should be kept, while the reset gate determines what to forget from .
is used to choose the necessary part for image generation. TODO
Image and Story discriminator is introduced to ensure the local and global consistency of the story, respectively.
Image discriminator measures whether the generated image matches the sentecne by comparing triplet to the real
Story discriminator enforce the global consistency of image sequence given story . It differs from video generation using 3D convolution to smooth the changes between frames. The framework is shown as follows:
Each side of image or text descriptions are firstly embedded and concatenated separately in to two single vectors, shown as the blue and red one.
where is element-wise product.
The objective for StoryGAN is:
where , and denotes the parametes of generator, image discriminator and story discriminator, respectively.
The algorithm outlines is given: