All Projects → huangzh13 → Stylegan.pytorch

huangzh13 / Stylegan.pytorch

Licence: other
A PyTorch implementation for StyleGAN with full features.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Stylegan.pytorch

Anime Inpainting
An application tool of edge-connect, which can do anime inpainting and drawing. 动漫人物图片自动修复,去马赛克,填补,去瑕疵
Stars: ✭ 761 (+407.33%)
Mutual labels:  cv, gan, generative-adversarial-network
Ganimation
GANimation: Anatomically-aware Facial Animation from a Single Image (ECCV'18 Oral) [PyTorch]
Stars: ✭ 1,730 (+1053.33%)
Mutual labels:  gan, generative-adversarial-network
Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+1109.33%)
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 (-10.67%)
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 (-18.67%)
Mutual labels:  gan, generative-adversarial-network
Mlds2018spring
Machine Learning and having it Deep and Structured (MLDS) in 2018 spring
Stars: ✭ 124 (-17.33%)
Mutual labels:  gan, generative-adversarial-network
Semantic image inpainting
Semantic Image Inpainting
Stars: ✭ 140 (-6.67%)
Mutual labels:  gan, generative-adversarial-network
Gpnd
Generative Probabilistic Novelty Detection with Adversarial Autoencoders
Stars: ✭ 112 (-25.33%)
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 (-7.33%)
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 (-6.67%)
Mutual labels:  gan, generative-adversarial-network
Focal Frequency Loss
Focal Frequency Loss for Generative Models
Stars: ✭ 141 (-6%)
Mutual labels:  gan, generative-adversarial-network
Capsule Gan
Code for my Master thesis on "Capsule Architecture as a Discriminator in Generative Adversarial Networks".
Stars: ✭ 120 (-20%)
Mutual labels:  gan, generative-adversarial-network
The Gan Zoo
A list of all named GANs!
Stars: ✭ 11,454 (+7536%)
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 (+7188.67%)
Mutual labels:  gan, generative-adversarial-network
Hccg Cyclegan
Handwritten Chinese Characters Generation
Stars: ✭ 115 (-23.33%)
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 (+1033.33%)
Mutual labels:  gan, generative-adversarial-network
Tensorflow Infogan
🎎 InfoGAN: Interpretable Representation Learning
Stars: ✭ 149 (-0.67%)
Mutual labels:  gan, generative-adversarial-network
Convolutional Handwriting Gan
ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generation (CVPR20)
Stars: ✭ 107 (-28.67%)
Mutual labels:  gan, cvpr
Exermote
Using Machine Learning to predict the type of exercise from movement data
Stars: ✭ 108 (-28%)
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 (-8%)
Mutual labels:  gan, generative-adversarial-network

StyleGAN.pytorch

[⭐️ New ⭐️] Please head over to StyleGAN2.pytorch for my stylegan2 pytorch implementation.


[ChineseGirl Dataset]

This repository contains the unofficial PyTorch implementation of the following paper:

A Style-Based Generator Architecture for Generative Adversarial Networks
Tero Karras (NVIDIA), Samuli Laine (NVIDIA), Timo Aila (NVIDIA)
http://stylegan.xyz/paper

Abstract: We propose an alternative generator architecture for generative adversarial networks, borrowing from style transfer literature. The new architecture leads to an automatically learned, unsupervised separation of high-level attributes (e.g., pose and identity when trained on human faces) and stochastic variation in the generated images (e.g., freckles, hair), and it enables intuitive, scale-specific control of the synthesis. The new generator improves the state-of-the-art in terms of traditional distribution quality metrics, leads to demonstrably better interpolation properties, and also better disentangles the latent factors of variation. To quantify interpolation quality and disentanglement, we propose two new, automated methods that are applicable to any generator architecture. Finally, we introduce a new, highly varied and high-quality dataset of human faces.

Features

  • [x] Progressive Growing Training
  • [x] Exponential Moving Average
  • [x] Equalized Learning Rate
  • [x] PixelNorm Layer
  • [x] Minibatch Standard Deviation Layer
  • [x] Style Mixing Regularization
  • [x] Truncation Trick
  • [x] Using official tensorflow pretrained weights
  • [x] Gradient Clipping
  • [ ] Multi-GPU Training
  • [ ] FP-16 Support
  • [ ] Conditional GAN

How to use

Requirements

  • yacs
  • tqdm
  • numpy
  • torch
  • torchvision
  • tensorflow(Optional, for ./convert.py)

Running the training script:

Train from scratch:

python train.py --config configs/sample.yaml

Using trained model:

Resume training from a checkpoint (start form 128x128):

python train.py --config config/sample.yaml --start_depth 5 --generator_file [] [--gen_shadow_file] --discriminator_file [] --gen_optim_file [] --dis_optim_file []

Style Mixing

python generate_mixing_figure.py --config config/sample.yaml --generator_file [] 


Thanks to dataset provider:Copyright(c) 2018, seeprettyface.com, BUPT_GWY contributes the dataset.

Truncation trick

python generate_truncation_figure.py --config configs/sample_cari2_128_truncation.yaml --generator_file cari2_128_truncation_gen.pth


Convert from official format

python convert.py --config configs/sample_ffhq_1024.yaml --input_file PATH/karras2019stylegan-ffhq-1024x1024.pkl --output_file ffhq_1024_gen.pth

Generated samples


[FFHQ Dataset](128x128)

Using weights tranferred from official tensorflow repo.


[FFHQ Dataset](1024x1024)


[WebCaricatureDataset](128x128)

Reference

Thanks

Please feel free to open PRs / issues / suggestions here.

Due Credit

This code heavily uses NVIDIA's original StyleGAN code. We accredit and acknowledge their work here. The Original License is located in the base directory (file named LICENSE_ORIGINAL.txt).

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