All Projects → XingangPan → Gan2shape

XingangPan / Gan2shape

Licence: mit
Code for GAN2Shape (ICLR2021 oral)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Gan2shape

Image generator
DCGAN image generator 🖼️.
Stars: ✭ 173 (-5.46%)
Mutual labels:  gan, generative-adversarial-network
Shapegan
Generative Adversarial Networks and Autoencoders for 3D Shapes
Stars: ✭ 151 (-17.49%)
Mutual labels:  gan, generative-adversarial-network
P2pala
Page to PAGE Layout Analysis Tool
Stars: ✭ 147 (-19.67%)
Mutual labels:  gan, generative-adversarial-network
Focal Frequency Loss
Focal Frequency Loss for Generative Models
Stars: ✭ 141 (-22.95%)
Mutual labels:  gan, generative-adversarial-network
Anime Face Gan Keras
A DCGAN to generate anime faces using custom mined dataset
Stars: ✭ 161 (-12.02%)
Mutual labels:  gan, generative-adversarial-network
Tsit
[ECCV 2020 Spotlight] A Simple and Versatile Framework for Image-to-Image Translation
Stars: ✭ 141 (-22.95%)
Mutual labels:  gan, generative-adversarial-network
Stylegan.pytorch
A PyTorch implementation for StyleGAN with full features.
Stars: ✭ 150 (-18.03%)
Mutual labels:  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 (-26.78%)
Mutual labels:  gan, generative-adversarial-network
Frontalization
Pytorch deep learning face frontalization model
Stars: ✭ 160 (-12.57%)
Mutual labels:  gan, generative-adversarial-network
A Pytorch Tutorial To Super Resolution
Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network | a PyTorch Tutorial to Super-Resolution
Stars: ✭ 157 (-14.21%)
Mutual labels:  gan, generative-adversarial-network
Nice Gan Pytorch
Official PyTorch implementation of NICE-GAN: Reusing Discriminators for Encoding: Towards Unsupervised Image-to-Image Translation
Stars: ✭ 140 (-23.5%)
Mutual labels:  gan, generative-adversarial-network
Gannotation
GANnotation (PyTorch): Landmark-guided face to face synthesis using GANs (And a triple consistency loss!)
Stars: ✭ 167 (-8.74%)
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 (-24.04%)
Mutual labels:  gan, generative-adversarial-network
Semantic image inpainting
Semantic Image Inpainting
Stars: ✭ 140 (-23.5%)
Mutual labels:  gan, generative-adversarial-network
Generative adversarial networks 101
Keras implementations of Generative Adversarial Networks. GANs, DCGAN, CGAN, CCGAN, WGAN and LSGAN models with MNIST and CIFAR-10 datasets.
Stars: ✭ 138 (-24.59%)
Mutual labels:  gan, generative-adversarial-network
Tensorflow Infogan
🎎 InfoGAN: Interpretable Representation Learning
Stars: ✭ 149 (-18.58%)
Mutual labels:  gan, generative-adversarial-network
Ganimation
GANimation: Anatomically-aware Facial Animation from a Single Image (ECCV'18 Oral) [PyTorch]
Stars: ✭ 1,730 (+845.36%)
Mutual labels:  gan, generative-adversarial-network
Gandissect
Pytorch-based tools for visualizing and understanding the neurons of a GAN. https://gandissect.csail.mit.edu/
Stars: ✭ 1,700 (+828.96%)
Mutual labels:  gan, generative-adversarial-network
Anogan Keras
Unsupervised anomaly detection with generative model, keras implementation
Stars: ✭ 157 (-14.21%)
Mutual labels:  gan, generative-adversarial-network
Tensorflow Mnist Gan Dcgan
Tensorflow implementation of Generative Adversarial Networks (GAN) and Deep Convolutional Generative Adversarial Netwokrs for MNIST dataset.
Stars: ✭ 163 (-10.93%)
Mutual labels:  gan, generative-adversarial-network

Do 2D GANs Know 3D Shape? Unsupervised 3D Shape Reconstruction from 2D Image GANs

Figure: Recovered 3D shape and rotation&relighting effects using GAN2Shape.

Do 2D GANs Know 3D Shape? Unsupervised 3D Shape Reconstruction from 2D Image GANs
Xingang Pan, Bo Dai, Ziwei Liu, Chen Change Loy, Ping Luo
ICLR2021 (Oral)

[Paper] [Project Page]

In this repository, we present GAN2Shape, which reconstructs the 3D shape of an image using off-the-shelf 2D image GANs in an unsupervised manner. Our method does not rely on mannual annotations or external 3D models, yet it achieves high-quality 3D reconstruction, object rotation, and relighting effects.

Requirements

  • python>=3.6
  • pytorch=1.1 or 1.2
  • neural_renderer
    pip install neural_renderer_pytorch  # or follow the guidance at https://github.com/elliottwu/unsup3d
    
  • mmcv
    pip install mmcv
    
  • other dependencies
    conda install -c conda-forge scikit-image matplotlib opencv pyyaml tensorboardX
    

Dataset and pre-trained weights

To download dataset and pre-trained weights, simply run:

sh scripts/download.sh

Training

Before training, you may optionally compile StyleGAN2 operations, which would be faster:

cd gan2shape/stylegan/stylegan2-pytorch/op
python setup.py install
cd ../../../..

Example1: training on car images:

sh scripts/run_car.sh

This would run on 4 GPUs by default. You can view the results at results/car/images or Tensorboard.

Example2: training on Celeba images:

sh scripts/run_celeba.sh

This by default uses our provided pre-trained weights. You can also perform joint pre-training via:

sh scripts/run_celeba-pre.sh

Example3: evaluating on synface (BFM) dataset:

sh scripts/run_synface.sh

This by default uses our provided pre-trained weights. You can also perform joint pre-training via:

sh scripts/run_synface-pre.sh

If you want to train on new StyleGAN2 samples, simply run the following script to generate new samples:

sh scripts/run_sample.sh

Note:
- For human and cat faces, we perform joint training before instance-specific training, which produces better results.
- For car and church, the quality of StyleGAN2 samples vary a lot, thus our approach may not produce good result on every sample. The downloaded dataset contains examples of good samples.

Acknowledgement

Part of the code is borrowed from Unsup3d and StyleGAN2.
Colab demo reproduced by ucalyptus: Link

BibTeX

@inproceedings{pan2020gan2shape,
  title   = {Do 2D GANs Know 3D Shape? Unsupervised 3D Shape Reconstruction from 2D Image GANs},
  author  =  {Pan, Xingang and Dai, Bo and Liu, Ziwei and Loy, Chen Change and Luo, Ping},
  booktitle = {ICLR},
  year    = {2021}
}
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].