All Projects → alpc91 → Nice Gan Pytorch

alpc91 / Nice Gan Pytorch

Licence: mit
Official PyTorch implementation of NICE-GAN: Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nice Gan Pytorch

Pix2pixhd
Synthesizing and manipulating 2048x1024 images with conditional GANs
Stars: ✭ 5,553 (+3866.43%)
Mutual labels:  deep-neural-networks, gan, generative-adversarial-network
Gpnd
Generative Probabilistic Novelty Detection with Adversarial Autoencoders
Stars: ✭ 112 (-20%)
Mutual labels:  deep-neural-networks, gan, generative-adversarial-network
Adversarial video generation
A TensorFlow Implementation of "Deep Multi-Scale Video Prediction Beyond Mean Square Error" by Mathieu, Couprie & LeCun.
Stars: ✭ 662 (+372.86%)
Mutual labels:  deep-neural-networks, gan, generative-adversarial-network
P2pala
Page to PAGE Layout Analysis Tool
Stars: ✭ 147 (+5%)
Mutual labels:  deep-neural-networks, gan, generative-adversarial-network
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (+434.29%)
Mutual labels:  deep-neural-networks, gan, generative-adversarial-network
Deep Learning With Python
Example projects I completed to understand Deep Learning techniques with Tensorflow. Please note that I do no longer maintain this repository.
Stars: ✭ 134 (-4.29%)
Mutual labels:  gan, generative-adversarial-network
Exermote
Using Machine Learning to predict the type of exercise from movement data
Stars: ✭ 108 (-22.86%)
Mutual labels:  gan, generative-adversarial-network
Hccg Cyclegan
Handwritten Chinese Characters Generation
Stars: ✭ 115 (-17.86%)
Mutual labels:  gan, generative-adversarial-network
Mgan
Masking GAN - Image attribute mask generation
Stars: ✭ 120 (-14.29%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Spectralnormalizationkeras
Spectral Normalization for Keras Dense and Convolution Layers
Stars: ✭ 100 (-28.57%)
Mutual labels:  gan, generative-adversarial-network
The Gan Zoo
A list of all named GANs!
Stars: ✭ 11,454 (+8081.43%)
Mutual labels:  gan, generative-adversarial-network
Tensorflow Mnist Cgan Cdcgan
Tensorflow implementation of conditional Generative Adversarial Networks (cGAN) and conditional Deep Convolutional Adversarial Networks (cDCGAN) for MANIST dataset.
Stars: ✭ 122 (-12.86%)
Mutual labels:  gan, generative-adversarial-network
Stylegan2 Projecting Images
Projecting images to latent space with StyleGAN2.
Stars: ✭ 102 (-27.14%)
Mutual labels:  gan, generative-adversarial-network
Faceaging By Cyclegan
Stars: ✭ 105 (-25%)
Mutual labels:  deep-neural-networks, generative-adversarial-network
Tensorflow2.0 Examples
🙄 Difficult algorithm, Simple code.
Stars: ✭ 1,397 (+897.86%)
Mutual labels:  deep-neural-networks, gan
Capsule Gan
Code for my Master thesis on "Capsule Architecture as a Discriminator in Generative Adversarial Networks".
Stars: ✭ 120 (-14.29%)
Mutual labels:  gan, generative-adversarial-network
Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+1195.71%)
Mutual labels:  gan, generative-adversarial-network
Cyclegan
Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Stars: ✭ 10,933 (+7709.29%)
Mutual labels:  gan, generative-adversarial-network
Ganimation
GANimation: Anatomically-aware Facial Animation from a Single Image (ECCV'18 Oral) [PyTorch]
Stars: ✭ 1,730 (+1135.71%)
Mutual labels:  gan, generative-adversarial-network
Unetgan
Official Implementation of the paper "A U-Net Based Discriminator for Generative Adversarial Networks" (CVPR 2020)
Stars: ✭ 139 (-0.71%)
Mutual labels:  gan, generative-adversarial-network

NICE-GAN — Official PyTorch Implementation [Project Page]

Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation

Paper

Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation

Abstract Unsupervised image-to-image translation is a central task in computer vision. Current translation frameworks will abandon the discriminator once the training process is completed. This paper contends a novel role of the discriminator by reusing it for encoding the images of the target domain. The proposed architecture, termed as NICE-GAN, exhibits two advantageous patterns over previous approaches: First, it is more compact since no independent encoding component is required; Second, this plug-in encoder is directly trained by the adversary loss, making it more informative and trained more effectively if a multi-scale discriminator is applied. The main issue in NICE-GAN is the coupling of translation with discrimination along the encoder, which could incur training inconsistency when we play the min-max game via GAN. To tackle this issue, we develop a decoupled training strategy by which the encoder is only trained when maximizing the adversary loss while keeping frozen otherwise. Extensive experiments on four popular benchmarks demonstrate the superior performance of NICE-GAN over state-of-the-art methods in terms of FID, KID, and also human preference. Comprehensive ablation studies are also carried out to isolate the validity of each proposed component.

Author

Runfa Chen, Wenbing Huang, Binghui Huang, Fuchun Sun, Bin Fang Tsinghua Robot Learning Lab

Citation

If you find this code useful for your research, please cite our paper:

@InProceedings{Chen_2020_CVPR,
author = {Chen, Runfa and Huang, Wenbing and Huang, Binghui and Sun, Fuchun and Fang, Bin},
title = {Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2020}
}

Usage

├── dataset
   └── YOUR_DATASET_NAME
       ├── trainA
           ├── xxx.jpg (name, format doesn't matter)
           ├── yyy.png
           └── ...
       ├── trainB
           ├── zzz.jpg
           ├── www.png
           └── ...
       ├── testA
           ├── aaa.jpg 
           ├── bbb.png
           └── ...
       └── testB
           ├── ccc.jpg 
           ├── ddd.png
           └── ...

Prerequisites

  • Python 3.6.9
  • Pytorch 1.1.0 and torchvision (https://pytorch.org/)
  • TensorboardX
  • Tensorflow (for tensorboard usage)
  • CUDA 10.0.130, CuDNN 7.3, and Ubuntu 16.04.

Train

> python main.py --dataset cat2dog
  • If the memory of gpu is not sufficient, set --light to True

Restoring from the previous checkpoint

> python main.py --dataset cat2dog --resume True

Test

> python main.py --dataset cat2dog --phase test

Metric

> python fid_kid.py testA fakeA --mmd-var 
  • You can use gpu, set --gpu to the index of gpu, such as --gpu 0

Network

Comparison

User study

t-SNE

Heatmaps

Shared latent space

Acknowledgments

Our code is inspired by UGATIT-pytorch.

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].