Implementation of StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation in PyTorch

Overview

StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation

Implementation of StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation (https://arxiv.org/pdf/2011.12799.pdf) in PyTorch

This implementation is mostly relied on rosinality's stylegan2-pytorch

An image

Requirements

I have tested on:

  • PyTorch 1.3.1
  • CUDA 10.1

Usage

For the index and channel, please check the paper (https://arxiv.org/pdf/2011.12799.pdf), e.g., (11_286), channel 286 of generator level 11.

FFHQ

  • Firstly, you should download pretrained model from here and place the stylegan2-ffhq-config-f.pkl into pretrained folder.
  • Open the notebook StyleSpace_FFHQ.ipynb

Car

  • Comming soon

LSUN

  • Comming soon

Credit

The pretrained model weights are from https://github.com/NVlabs/stylegan2 and converted with https://github.com/rosinality/stylegan2-pytorch

You might also like...
Non-Official Pytorch implementation of
Non-Official Pytorch implementation of "Face Identity Disentanglement via Latent Space Mapping" https://arxiv.org/abs/2005.07728 Using StyleGAN2 instead of StyleGAN

Face Identity Disentanglement via Latent Space Mapping - Implement in pytorch with StyleGAN 2 Description Pytorch implementation of the paper Face Ide

GAN encoders in PyTorch that could match PGGAN, StyleGAN v1/v2,  and BigGAN.  Code also integrates the implementation of these GANs.
GAN encoders in PyTorch that could match PGGAN, StyleGAN v1/v2, and BigGAN. Code also integrates the implementation of these GANs.

MTV-TSA: Adaptable GAN Encoders for Image Reconstruction via Multi-type Latent Vectors with Two-scale Attentions. This is the official code release fo

 Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP
Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP

Segmentation in Style: Unsupervised Semantic Image Segmentation with Stylegan and CLIP Abstract: We introduce a method that allows to automatically se

Image-generation-baseline - MUGE Text To Image Generation Baseline

MUGE Text To Image Generation Baseline Requirements and Installation More detail

This is an official implementation of our CVPR 2021 paper "Bottom-Up Human Pose Estimation Via Disentangled Keypoint Regression" (https://arxiv.org/abs/2104.02300)

Bottom-Up Human Pose Estimation Via Disentangled Keypoint Regression Introduction In this paper, we are interested in the bottom-up paradigm of estima

Implementation of the method described in the Speech Resynthesis from Discrete Disentangled Self-Supervised Representations.
Implementation of the method described in the Speech Resynthesis from Discrete Disentangled Self-Supervised Representations.

Speech Resynthesis from Discrete Disentangled Self-Supervised Representations Implementation of the method described in the Speech Resynthesis from Di

Discovering Interpretable GAN Controls [NeurIPS 2020]
Discovering Interpretable GAN Controls [NeurIPS 2020]

GANSpace: Discovering Interpretable GAN Controls Figure 1: Sequences of image edits performed using control discovered with our method, applied to thr

Official Implementation for
Official Implementation for "ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement" https://arxiv.org/abs/2104.02699

ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement Recently, the power of unconditional image synthesis has significantly advanced th

StyleGAN - Official TensorFlow Implementation
StyleGAN - Official TensorFlow Implementation

StyleGAN — Official TensorFlow Implementation Picture: These people are not real – they were produced by our generator that allows control over differ

Comments
  • Could you share the code regarding detecting style channels?

    Could you share the code regarding detecting style channels?

    Hi,

    Thank you for this implementation.

    Could you share the implementation of detecting locally active style channels and detecting attribute-specific channels?

    Thank you very much!

    Best, Shengwei

    opened by njuaplusplus 1
  • Editing Failed

    Editing Failed

    Sorry to bother.

    I used the default setting but modified the resolution to 256, and I tried the channels you used and provided by paper. However, it seems like nothing has changed. Even with channels from the low layers, the image does not change.😭😭😭

    图片

    图片

    opened by zhanjiahui 0
  • GANs inversion using encoder4editing

    GANs inversion using encoder4editing

    Hi!

    I am implementing GANs inversion using repo encoder4editing. But I saw that they trained the model with stylegan2 generator to be fixed. In your notebook, you also use pretrained model of stylegans2, and then inject it into your encoder, decoder.

    1. Is your decoder with conv wrapper is what makes StyleSpace?
    2. I asked the author of encoder4editing and they said as follow:

    Screenshot from 2021-07-06 18-49-29

    But I do not clearly understand the phrase "extracting the StyleSpace representation during a forward pass of the generator". Could you explain me this? Thank you

    opened by duongquangvinh 1
  • A communication community for Stylespace

    A communication community for Stylespace

    Thanks to the excellent work, StyleSpace. However,it is a new concept and one always explores the S space alone. Hence, I create a QQ group (754288725) for communication of StyleSpace. I hope everybody can communicate and brainstorm here.

    opened by sunpeng1996 0
Owner
Xuanchi Ren
Fight for future
Xuanchi Ren
Implementation of Analyzing and Improving the Image Quality of StyleGAN (StyleGAN 2) in PyTorch

Implementation of Analyzing and Improving the Image Quality of StyleGAN (StyleGAN 2) in PyTorch

Kim Seonghyeon 2.2k Jan 1, 2023
[SIGGRAPH'22] StyleGAN-XL: Scaling StyleGAN to Large Diverse Datasets

[Project] [PDF] This repository contains code for our SIGGRAPH'22 paper "StyleGAN-XL: Scaling StyleGAN to Large Diverse Datasets" by Axel Sauer, Katja

null 742 Jan 4, 2023
Language Models Can See: Plugging Visual Controls in Text Generation

Language Models Can See: Plugging Visual Controls in Text Generation Authors: Yixuan Su, Tian Lan, Yahui Liu, Fangyu Liu, Dani Yogatama, Yan Wang, Lin

Yixuan Su 195 Dec 22, 2022
Official implementation of "StyleCariGAN: Caricature Generation via StyleGAN Feature Map Modulation" (SIGGRAPH 2021)

StyleCariGAN in PyTorch Official implementation of StyleCariGAN:Caricature Generation via StyleGAN Feature Map Modulation in PyTorch Requirements PyTo

PeterZhouSZ 49 Oct 31, 2022
Official implementation of "StyleCariGAN: Caricature Generation via StyleGAN Feature Map Modulation" (SIGGRAPH 2021)

StyleCariGAN: Caricature Generation via StyleGAN Feature Map Modulation This repository contains the official PyTorch implementation of the following

Wonjong Jang 270 Dec 30, 2022
DeepFaceEditing: Deep Face Generation and Editing with Disentangled Geometry and Appearance Control

DeepFaceEditing: Deep Face Generation and Editing with Disentangled Geometry and Appearance Control One version of our system is implemented using the

null 260 Nov 28, 2022
(CVPR 2021) Lifting 2D StyleGAN for 3D-Aware Face Generation

Lifting 2D StyleGAN for 3D-Aware Face Generation Official implementation of paper "Lifting 2D StyleGAN for 3D-Aware Face Generation". Requirements You

Yichun Shi 66 Nov 29, 2022
StyleGAN-Human: A Data-Centric Odyssey of Human Generation

StyleGAN-Human: A Data-Centric Odyssey of Human Generation Abstract: Unconditional human image generation is an important task in vision and graphics,

stylegan-human 762 Jan 8, 2023
PyTorch implementation of: Michieli U. and Zanuttigh P., "Continual Semantic Segmentation via Repulsion-Attraction of Sparse and Disentangled Latent Representations", CVPR 2021.

Continual Semantic Segmentation via Repulsion-Attraction of Sparse and Disentangled Latent Representations This is the official PyTorch implementation

Multimedia Technology and Telecommunication Lab 42 Nov 9, 2022
Official PyTorch implementation of BlobGAN: Spatially Disentangled Scene Representations

BlobGAN: Spatially Disentangled Scene Representations Official PyTorch Implementation Paper | Project Page | Video | Interactive Demo BlobGAN.mp4 This

null 148 Dec 29, 2022