All Projects → ChristophReich1996 → Semantic_Pyramid_for_Image_Generation

ChristophReich1996 / Semantic_Pyramid_for_Image_Generation

Licence: MIT license
PyTorch reimplementation of the paper: "Semantic Pyramid for Image Generation" [CVPR 2020].

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Semantic Pyramid for Image Generation

Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (+115.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation, adversarial-learning
Dcgan Tensorflow
A Tensorflow implementation of Deep Convolutional Generative Adversarial Networks trained on Fashion-MNIST, CIFAR-10, etc.
Stars: ✭ 70 (+55.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Pix2pix
Image-to-image translation with conditional adversarial nets
Stars: ✭ 8,765 (+19377.78%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+36515.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Selectiongan
[CVPR 2019 Oral] Multi-Channel Attention Selection GAN with Cascaded Semantic Guidance for Cross-View Image Translation
Stars: ✭ 366 (+713.33%)
Mutual labels:  generative-adversarial-network, image-generation, adversarial-learning
Anycost Gan
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Stars: ✭ 367 (+715.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Ganspace
Discovering Interpretable GAN Controls [NeurIPS 2020]
Stars: ✭ 1,224 (+2620%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Deep-Exemplar-based-Video-Colorization
The source code of CVPR 2019 paper "Deep Exemplar-based Video Colorization".
Stars: ✭ 180 (+300%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Mlds2018spring
Machine Learning and having it Deep and Structured (MLDS) in 2018 spring
Stars: ✭ 124 (+175.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Cyclegan
Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Stars: ✭ 10,933 (+24195.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Unetgan
Official Implementation of the paper "A U-Net Based Discriminator for Generative Adversarial Networks" (CVPR 2020)
Stars: ✭ 139 (+208.89%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Few Shot Patch Based Training
The official implementation of our SIGGRAPH 2020 paper Interactive Video Stylization Using Few-Shot Patch-Based Training
Stars: ✭ 313 (+595.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
MNIST-invert-color
Invert the color of MNIST images with PyTorch
Stars: ✭ 13 (-71.11%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Hidt
Official repository for the paper "High-Resolution Daytime Translation Without Domain Labels" (CVPR2020, Oral)
Stars: ✭ 513 (+1040%)
Mutual labels:  generative-adversarial-network, gan, image-generation
ADL2019
Applied Deep Learning (2019 Spring) @ NTU
Stars: ✭ 20 (-55.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Tsit
[ECCV 2020 Spotlight] A Simple and Versatile Framework for Image-to-Image Translation
Stars: ✭ 141 (+213.33%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Gpnd
Generative Probabilistic Novelty Detection with Adversarial Autoencoders
Stars: ✭ 112 (+148.89%)
Mutual labels:  generative-adversarial-network, gan, adversarial-learning
Focal Frequency Loss
Focal Frequency Loss for Generative Models
Stars: ✭ 141 (+213.33%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Arbitrary Text To Image Papers
A collection of arbitrary text to image papers with code (constantly updating)
Stars: ✭ 196 (+335.56%)
Mutual labels:  generative-adversarial-network, gan, image-generation
Gan Sandbox
Vanilla GAN implemented on top of keras/tensorflow enabling rapid experimentation & research. Branches correspond to implementations of stable GAN variations (i.e. ACGan, InfoGAN) and other promising variations of GANs like conditional and Wasserstein.
Stars: ✭ 210 (+366.67%)
Mutual labels:  generative-adversarial-network, gan

Semantic Pyramid for Image Generation

License: MIT

Unofficel PyTorch implementation of the paper Semantic Pyramid for Image Generation by Assaf Shocher, Yossi Gandelsman et al.

Results Source. Proposed results of the paper.

Model Architecture

Architecture Source

The full architecture consists of three parts. First, the object recognition model which is implemented as a pre-trained VGG 16 network. Secondly, the residual generator network which is partly based on the generator architecture of the SAGAN. And thirdly, the residual discriminator network which is also based on the SAGAN.

Dataset

To download and extract the places365 dataset from the official website run the following script

sh download_places365.sh

Trained VGG-16

The original VGG-16 provided by the MIT CV group is trained on a resolution of 224 x 224. This implementation, however, utilizes the native resolution (256 x 256) of the places365 dataset. This issue is addressed by fine-tuning the pre-trained VGG-16 network on the higher resolution.

The necessary fine-tuned VGG-16 state dict can be downloaded here.

To download and convert the original VGG-16 model pre-trained on the lower resolution (224 x 224) places dataset run the following command. The downloaded model can be fine-tuned on the higher resolution by using the training script, which is based on the original training script.

sh download_pretrained_vgg16.sh

This script downloads the official pre-trained caffe models from the places365 repository. Afterwards, the caffe model gets converted with the help of the caffemodel2pytorch repo created by Vadim Kantorov.

Usage

To train or test the GAN simply run the main script python main.py. This main script takes multiple arguments.

Argument Default value Info
--train False Flag to perform training
--test False Flag to perform testing
--batch_size 20 Batch size to be utilized
--lr 1e-04 Learning rate to use
--channel_factor 1 Channel factor adopts the number of channels utilized in the U-Net
--device 'cuda' Device to use (cuda recommended)
--gpus_to_use '0' Indexes of the GPUs to be use
--use_data_parallel False Use multiple GPUs
--load_generator_network None Path of the generator network to be loaded (.pt)
--load_discriminator_network None Path of the discriminator network to be loaded (.pt)
--load_pretrained_vgg16 'pre_trained_models/vgg_places_365.pt' Path of the pre-trained VGG 16 to be loaded (.pt)
--path_to_places365 'places365_standard' Path to places365 dataset
--epochs 50 Epochs to perform while training

While training logs and models gets save automatically to the saved_data file. Inference plots also gets saved in the same folder.

Results

With limited compute budget I was not able to reproduce the results form the paper. The plot, shown below, was after approximately 24h of training on a single Nvidia Tesla V100. After 24h the whole performance dropped again. However, due to the limited computing power, I was only able to train 48h.

Plot

VGG-16 Fine-Tuning Details

The VGG-16 network is fine-tuned on the higher resolution images for three epochs. In contrast to the original training script the Adam optimizer is utilized. Validation results before and after the fine-tuning on the full resolution is presented in the table below.

Top-1 accuracy Top-5 accuracy
Before fine-tuning 7.493 23.047
After fine-tuning 51.140 82.085

Additional hyperparameters can be seen in the training script.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].