GANime
VIDEO GENERATION OF ANIME CONTENT CONDITIONED ON�TWO FRAMES
Farid Abdalla – 12/09/2022
Table of contents
2
Context
3
Introduction
4
Introduction
5
Introduction
6
VideoGPT: generation conditioned on a single frame
Related work
7
Autoencoders
8
Architecture of an autoencoder
Variational Autoencoders
9
Architecture of a variational autoencoder
Regularized latent space
Vector-Quantized Variational Autoencoders
10
Architecture of a variational autoencoder
Two stage training
11
Architecture of the VQ-GAN
Vector-Quantized GAN
12
Architecture of the VQ-GAN
Perceptual loss
13
Example of style transfer
Adversarial loss
14
Generator
Discriminator
Real / Fake
VideoGPT
15
Example of video generation with VideoGPT
Point-to-point video generation
16
Approach
17
First stage
18
Example of the Moving MNIST dataset
Example of the Kimetsu no Yaiba anime dataset
First stage
19
Artifacts appearing when using the adversarial loss
Second stage
20
Example of scene splitting
Second stage
21
Frame by frame generation
22
Frame by frame generation - example
23
first frame
last frame
VQ-GAN encoder
[35, 28, 16, 58, 32, …]
indices first frame
[62, 15, 57, 58, 32, …]
indices last frame
GPT2
Number of remaining frames
frame to predict
[38, 28, 51, 58, 32, …]
indices frame to predict
[38, 29, 50, 58, 32, …]
prediction
Loss
VQ-GAN decoder
prediction
M previous frames
24
Input frames | Generated frames |
0, last | 1 |
0, 1, last | 2 |
0, 1, 2, last | 3 |
1, 2, 3, last | 4 |
2, 3, 4, last | 5 |
With M=3
Using ground truth during N epochs
25
Ground truth
Frame 0
Frame 1
Frame 2
Frame 3
Frame N
Ground truth
Frame 0
Frame 1
Frame 2
Frame 3
Frame N
Generated
Frame 1
Generated
Frame 2
Ground truth is used until the model starts to produce meaningful results
Using ground truth during N epochs
26
Ground truth
Frame 0
Frame 1
Frame 2
Frame 3
Frame N
Generated
Frame 1
Generated
Frame 2
Generated
Frame 3
Results
27
Generated
Ground truth
On the test set:
Results on the test set
Good results:
28
Results on the test set
Surprising results:
29
Conclusion
30
Other improvements
31
Self-evaluation
I am happy with the results considering that 5 months is a rather short period. It was interesting to work on this project and also be able to travel to Japan to realise it. Even though there are some possible improvements, I hope it can encourage future works on video synthesis
Source code available here: https://github.com/Kurokabe/GANime
Updates will come with a Google colab to test the model (if it fits on the available memory)
32
Questions
33
References
[1] Cost of one episode of Kimetsu no Yaiba https://animegalaxyofficial.com/demon-slayer-season-2-budget-for-the-making-of-single-episode-is-way-more-expensive/
[2] Number of frames for an anime https://coconala.com/magazine/3042
[3] Kimetsu no Yaiba costs and profit https://www.quora.com/How-long-does-it-take-animators-to-make-a-12-episode-season-of-anime
[4] DALL-E beta https://openai.com/blog/dall-e-now-available-in-beta/
[5] Style loss of the FILM paper https://film-net.github.io/
34