felixboelter / gansformer-reproducibility-challenge

Replication of the novel Generative Adversarial Transformer using TensorFlow 1.x.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gansformer-reproducibility-challenge

Project for Advance Topic in Machine Learning course @ USI 21/22.
See https://github.com/GiorgiaAuroraAdorni/gansformer-reproducibility-challenge, https://drive.google.com/drive/folders/1sqHD-X4mLOOkoT-xJvWGdPlwxb5et0kA?usp=sharing for datasets and https://drive.google.com/drive/folders/1ZFfO4HVINH-aDQbgLscJxNTqGLEIOMZv?usp=sharing for models.

Contributors

Giorgia Adornigiorgia.adorni@usi.ch GiorgiaAuroraAdorni

Felix Boelterfelix.boelter@usi.ch felixboelter

Stefano Carlo Lambertenghistefano.carlo.lambertenghi@usi.ch steflamb

Prerequisites

  • Python 3
  • Tensorflow 1.X

Installation

Clone our repository and install the requirements

$ git clone https://github.com/GiorgiaAuroraAdorni/gansformer-reproducibility-challenge
$ cd gansformer-reproducibility-challenge/src
$ pip install -r requirements.txt

Usage

For the usage, go to the colab notebooks directory:

  • Run Reproducibility_model_trainer.ipynb for training the models: Stylegan2, GANformers with Simplex and Duplex Attention and GANformers with Simplex and Duplex Attention (with vanilla StyleGAN2 discriminator).
  • Run Reproducibility_result_visualizer.ipynb for the visualisation phase: here you can select the model that you want to use and generate random images, perform a symple interpolation of the latent space or even perform style mixing starting from a chosen target image.

Results

Reproducibility results for the GANFormer/StyleGAN2 hybrid. All of the results are found in the Report.

FID scores

     (1) FID scores for the cartoon dataset          (2) FID scores for the FFHQ dataset

FID Score cartoon dataset FID Score FFHQ dataset

Generated images for the StyleGAN2 baseline and all types of GANFormer

Generated images for the StyleGAN2 baseline and all types of GANFormer

Latent space interpolation for GANFormer model with Duplex attention on the Generator

Interpolation of images from the GANFormer with Duplex attention and a StyleGAN2 discriminator

Latent space interpolation for GANFormer model with Simplex attention on the Generator

Interpolation of images from the GANFormer with Simplex attention and a StyleGAN2 discriminator

About

Replication of the novel Generative Adversarial Transformer using TensorFlow 1.x.

License:MIT License


Languages

Language:Python 47.7%Language:Jupyter Notebook 41.1%Language:TeX 8.3%Language:Cuda 2.4%Language:HTML 0.4%Language:Dockerfile 0.0%