All Projects → Prinsphield → Genegan

Prinsphield / Genegan

Licence: gpl-3.0
GeneGAN: Learning Object Transfiguration and Attribute Subspace from Unpaired Data

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Genegan

Tsit
[ECCV 2020 Spotlight] A Simple and Versatile Framework for Image-to-Image Translation
Stars: ✭ 141 (-0.7%)
Mutual labels:  generative-adversarial-network, image-manipulation
Focal Frequency Loss
Focal Frequency Loss for Generative Models
Stars: ✭ 141 (-0.7%)
Mutual labels:  generative-adversarial-network, image-manipulation
Igan
Interactive Image Generation via Generative Adversarial Networks
Stars: ✭ 3,845 (+2607.75%)
Mutual labels:  generative-adversarial-network, image-manipulation
Deep Generative Prior
Code for deep generative prior (ECCV2020 oral)
Stars: ✭ 308 (+116.9%)
Mutual labels:  generative-adversarial-network, image-manipulation
Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (-31.69%)
Mutual labels:  generative-adversarial-network, image-manipulation
Selectiongan
[CVPR 2019 Oral] Multi-Channel Attention Selection GAN with Cascaded Semantic Guidance for Cross-View Image Translation
Stars: ✭ 366 (+157.75%)
Mutual labels:  generative-adversarial-network, image-manipulation
Image To Image Papers
🦓<->🦒 🌃<->🌆 A collection of image to image papers with code (constantly updating)
Stars: ✭ 949 (+568.31%)
Mutual labels:  generative-adversarial-network, image-manipulation
Finegan
FineGAN: Unsupervised Hierarchical Disentanglement for Fine-grained Object Generation and Discovery
Stars: ✭ 240 (+69.01%)
Mutual labels:  generative-adversarial-network, image-manipulation
Pix2pix
Image-to-image translation with conditional adversarial nets
Stars: ✭ 8,765 (+6072.54%)
Mutual labels:  generative-adversarial-network, image-manipulation
Dna Gan
DNA-GAN: Learning Disentangled Representations from Multi-Attribute Images
Stars: ✭ 65 (-54.23%)
Mutual labels:  generative-adversarial-network, image-manipulation
Gandissect
Pytorch-based tools for visualizing and understanding the neurons of a GAN. https://gandissect.csail.mit.edu/
Stars: ✭ 1,700 (+1097.18%)
Mutual labels:  generative-adversarial-network, image-manipulation
Cyclegan
Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Stars: ✭ 10,933 (+7599.3%)
Mutual labels:  generative-adversarial-network, image-manipulation
Faceswap Gan
A denoising autoencoder + adversarial losses and attention mechanisms for face swapping.
Stars: ✭ 3,099 (+2082.39%)
Mutual labels:  generative-adversarial-network, image-manipulation
Anycost Gan
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Stars: ✭ 367 (+158.45%)
Mutual labels:  generative-adversarial-network, image-manipulation
UEGAN
[TIP2020] Pytorch implementation of "Towards Unsupervised Deep Image Enhancement with Generative Adversarial Network"
Stars: ✭ 68 (-52.11%)
Mutual labels:  generative-adversarial-network, image-manipulation
Contrastive Unpaired Translation
Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
Stars: ✭ 822 (+478.87%)
Mutual labels:  generative-adversarial-network, image-manipulation
Cocosnet
Cross-domain Correspondence Learning for Exemplar-based Image Translation. (CVPR 2020 Oral)
Stars: ✭ 211 (+48.59%)
Mutual labels:  generative-adversarial-network, image-manipulation
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+11503.52%)
Mutual labels:  generative-adversarial-network, image-manipulation
Bringing Old Photos Back To Life
Bringing Old Photo Back to Life (CVPR 2020 oral)
Stars: ✭ 9,525 (+6607.75%)
Mutual labels:  generative-adversarial-network, image-manipulation
Mgan
Masking GAN - Image attribute mask generation
Stars: ✭ 120 (-15.49%)
Mutual labels:  generative-adversarial-network, image-manipulation

GeneGAN: Learning Object Transfiguration and Attribute Subspace from Unpaired Data

By Shuchang Zhou, Taihong Xiao, Yi Yang, Dieqiao Feng, Qinyao He, Weiran He

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

@inproceedings{DBLP:conf/bmvc/ZhouXYFHH17,
  author    = {Shuchang Zhou and
               Taihong Xiao and
               Yi Yang and
               Dieqiao Feng and
               Qinyao He and
               Weiran He},
  title     = {GeneGAN: Learning Object Transfiguration and Attribute Subspace from Unpaired Data},
  booktitle = {Proceedings of the British Machine Vision Conference (BMVC)},
  year      = {2017},
  url       = {http://arxiv.org/abs/1705.04932},
  timestamp = {http://dblp.uni-trier.de/rec/bib/journals/corr/ZhouXYFHH17},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}

We have two following papers, DNA-GAN and ELEGANT, that generalize the method into multiple attributes case. It is worth mentioning that ELEGANT can transfer multiple face attributes on high resolution images. Please pay attention to our new methods!

Introduction

This is the official source code for the paper GeneGAN: Learning Object Transfiguration and Attribute Subspace from Unpaired Data. All the experiments are initially done in our proprietary deep learning framework. For convenience, we reproduce the results using TensorFlow.

cross

GeneGAN is a deterministic conditional generative model that can learn to disentangle the object features from other factors in feature space from weak supervised 0/1 labeling of training data. It allows fine-grained control of generated images on one certain attribute in a continous way.

Requirement

  • Python 3.5
  • TensorFlow 1.0
  • Opencv 3.2

Training GeneGAN on celebA dataset

  1. Download celebA dataset and unzip it into datasets directory. There are various source providers for CelebA datasets. To ensure that the size of downloaded images is correct, please run identify datasets/celebA/data/000001.jpg. The size should be 409 x 687 if you are using the same dataset. Besides, please ensure that you have the following directory tree structure.
├── datasets
│   └── celebA
│       ├── data
│       ├── list_attr_celeba.txt
│       └── list_landmarks_celeba.txt
  1. Run python preprocess.py. It will take several miniutes to preprocess all face images. A new directory datasets/celebA/align_5p will be created.

  2. Run python train.py -a Bangs -g 0 to train GeneGAN on the attribute Bangs. You can train GeneGAN on other attributes as well. All available attribute names are listed in the list_attr_celeba.txt file.

  3. Run tensorboard --logdir='./' --port 6006 to watch your training process.

Testing

We provide three kinds of mode for test. Run python test.py -h for detailed help. The following example is running on our GeneGAN model trained on the attribute Bangs. Have fun!

1. Swapping of Attributes

You can easily add the bangs of one person to another person without bangs by running

python test.py -m swap -i datasets/celebA/align_5p/182929.jpg -t datasets/celebA/align_5p/022344.jpg
input target out1 out2
Swap Attribute

2. Linear Interpolation of Image Attributes

Besides, we can control to which extent the bangs style is added to your input image through linear interpolation of image attribute. Run the following code.

python test.py -m interpolation -i datasets/celebA/align_5p/182929.jpg -t datasets/celebA/align_5p/035460.jpg -n 5
interpolation target
Linear Interpolation

3. Matrix Interpolation in Attribute Subspace

We can do something cooler. Given four images with bangs attributes at hand, we can observe the gradual change process of our input images with a mixing of difference bangs style.

python test.py -m matrix -i datasets/celebA/align_5p/182929.jpg --targets datasets/celebA/align_5p/035460.jpg datasets/celebA/align_5p/035451.jpg datasets/celebA/align_5p/035463.jpg datasets/celebA/align_5p/035474.jpg -s 5 5
matrix
Matrix Interpolation

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