All Projects → RameenAbdal → Styleflow

RameenAbdal / Styleflow

StyleFlow: Attribute-conditioned Exploration of StyleGAN-generated Images using Conditional Continuous Normalizing Flows (ACM TOG 2021)

Programming Languages

python
139335 projects - #7 most used programming language
Cuda
1817 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Styleflow

System.js
The library System.js designed to improve the quality of writing JavaScript source code. It contains features that allow you refactor source code. Thanks to the clear and readable functions, the code will be good understood and supported accordingly.
Stars: ✭ 6 (-99.7%)
Mutual labels:  quality
Pyreportcard
🚥 A report card for Python application
Stars: ✭ 90 (-95.46%)
Mutual labels:  quality
Piqa
PyTorch Image Quality Assessement package
Stars: ✭ 108 (-94.55%)
Mutual labels:  quality
Fastp
An ultra-fast all-in-one FASTQ preprocessor (QC/adapters/trimming/filtering/splitting/merging...)
Stars: ✭ 966 (-51.26%)
Mutual labels:  quality
Kitab
Kitab is the ideal companion for Documentation-Driven Quality: Render and Test your documentation.
Stars: ✭ 79 (-96.01%)
Mutual labels:  quality
Dart Code Metrics
Software analytics tool that helps developers analyse and improve software quality.
Stars: ✭ 96 (-95.16%)
Mutual labels:  quality
Android Guidelines
Project Guidelines for the Android Buffer App
Stars: ✭ 760 (-61.65%)
Mutual labels:  quality
Any good
Is this gem any good?
Stars: ✭ 119 (-94%)
Mutual labels:  quality
Airknow
An air quality app 💑. BRING YOUR MASKs.
Stars: ✭ 85 (-95.71%)
Mutual labels:  quality
Pytest Monitor
Pytest plugin for analyzing resource usage during test sessions
Stars: ✭ 105 (-94.7%)
Mutual labels:  quality
React Drawer
react.js drawer component
Stars: ✭ 42 (-97.88%)
Mutual labels:  quality
Insight
SymfonyInsight Official SDK
Stars: ✭ 73 (-96.32%)
Mutual labels:  quality
Render Timing For Unity
GPU time metric for Unity apps (currently limited to Android/GLES)
Stars: ✭ 97 (-95.11%)
Mutual labels:  quality
Sonarondocker
🐳 📡 Docker way of running SonarQube + any DB
Stars: ✭ 25 (-98.74%)
Mutual labels:  quality
Qualinsight Plugins Sonarqube Badges
Plugin for SonarQube that generates badges displaying information about a project's or view's quality.
Stars: ✭ 108 (-94.55%)
Mutual labels:  quality
Chimp
Tooling that helps you do quality, faster.
Stars: ✭ 783 (-60.49%)
Mutual labels:  quality
Qa Checks V4
PowerShell scripts to ensure consistent and reliable build quality and configuration for your servers
Stars: ✭ 94 (-95.26%)
Mutual labels:  quality
Imagezipper
An image compresssion library in android.
Stars: ✭ 121 (-93.9%)
Mutual labels:  quality
Cppdep
C/C++ Dependency Analyzer: a rewrite of John Lakos' dep_utils (adep/cdep/ldep) from "Large-Scale C++ Software Design"
Stars: ✭ 115 (-94.2%)
Mutual labels:  quality
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-95.11%)
Mutual labels:  quality

StyleFlow: Attribute-conditioned Exploration of StyleGAN-Generated Images using Conditional Continuous Normalizing Flows (ACM TOG 2021)

See you @ Siggraph 2021

Python 3.7 pytorch 1.1.0 TensorFlow 1.15.0 Torchdiffeq 0.0.1 pyqt5 5.13.0

image Figure: Sequential edits using StyleFlow

High-quality, diverse, and photorealistic images can now be generated by unconditional GANs (e.g., StyleGAN). However, limited options exist to control the generation process using (semantic) attributes, while still preserving the quality of the output. Further, due to the entangled nature of the GAN latent space, performing edits along one attribute can easily result in unwanted changes along other attributes. In this paper, in the context of conditional exploration of entangled latent spaces, we investigate the two sub-problems of attribute-conditioned sampling and attribute-controlled editing. We present StyleFlow as a simple, effective, and robust solution to both the sub-problems by formulating conditional exploration as an instance of conditional continuous normalizing flows in the GAN latent space conditioned by attribute features. We evaluate our method using the face and the car latent space of StyleGAN, and demonstrate fine-grained disentangled edits along various attributes on both real photographs and StyleGAN generated images. For example, for faces, we vary camera pose, illumination variation, expression, facial hair, gender, and age. Finally, via extensive qualitative and quantitative comparisons, we demonstrate the superiority of StyleFlow to other concurrent works.

StyleFlow: Attribute-conditioned Exploration of StyleGAN-Generated Images using Conditional Continuous Normalizing Flows (ACM TOG 2021)
Rameen Abdal, Peihao Zhu, Niloy Mitra, Peter Wonka
KAUST, Adobe Research

[Paper] [Project Page] [Demo] [Promotional Video]

Installation

Clone this repo.

git clone https://github.com/RameenAbdal/StyleFlow.git
cd StyleFlow/

This code requires PyTorch, TensorFlow, Torchdiffeq, Python 3+ and Pyqt5. Please install dependencies by

conda env create -f environment.yml

StyleGAN2 relies on custom TensorFlow ops that are compiled on the fly using NVCC. To correctly setup the StyleGAN2 generator follow the Requirements in this repo.

Installation (Docker)

Clone this repo.

git clone https://github.com/RameenAbdal/StyleFlow.git
cd StyleFlow/

You must have CUDA (>=10.0 && <11.0) and nvidia-docker2 installed first !

Then, run :

xhost +local:docker # Letting Docker access X server
wget -P stylegan/ http://d36zk2xti64re0.cloudfront.net/stylegan2/networks/stylegan2-ffhq-config-f.pkl
docker-compose up --build # Expect some time before UI appears

When finished, run :

xhost -local:docker

UI Illustration

main main

Loading images may take 2 - 3 seconds on the first click. Move the slider smoothly to render results.

Editing Images Using Pretrained Models

  1. Run the main UI

    python main.py
  2. Run the Attribute Transfer UI

    python main_attribute.py 

Web UI (Beta)

A web based UI is also now available. Follow webui dev branch for setup.

image

Training New Model

Dataset containing sampled StyleGAN2 latents, lighting SH parameters and other attributes. (Download Here)

Create ./data_numpy/ in the main folder and extract the above data or create your own dataset.

Train your model:

   python train_flow.py 

Projection

Our new projection method is currently under review. To be updated!

License

All rights reserved. Licensed under the CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike 4.0 International). The code is released for academic research use only.

Citation

If you use this research/codebase/dataset, please cite our papers.

@article{10.1145/3447648,
author = {Abdal, Rameen and Zhu, Peihao and Mitra, Niloy J. and Wonka, Peter},
title = {StyleFlow: Attribute-Conditioned Exploration of StyleGAN-Generated Images Using Conditional Continuous Normalizing Flows},
year = {2021},
issue_date = {May 2021},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {40},
number = {3},
issn = {0730-0301},
url = {https://doi.org/10.1145/3447648},
doi = {10.1145/3447648},
abstract = {High-quality, diverse, and photorealistic images can now be generated by unconditional GANs (e.g., StyleGAN). However, limited options exist to control the generation process using (semantic) attributes while stillpreserving the quality of the output. Further, due to the entangled nature of the GAN latent space, performing edits along one attribute can easily result in unwanted changes along other attributes. In this article, in the context of conditional exploration of entangled latent spaces, we investigate the two sub-problems of attribute-conditioned sampling and attribute-controlled editing. We present StyleFlow as a simple, effective, and robust solution to both the sub-problems by formulating conditional exploration as an instance of conditional continuous normalizing flows in the GAN latent space conditioned by attribute features. We evaluate our method using the face and the car latent space of StyleGAN, and demonstrate fine-grained disentangled edits along various attributes on both real photographs and StyleGAN generated images. For example, for faces, we vary camera pose, illumination variation, expression, facial hair, gender, and age. Finally, via extensive qualitative and quantitative comparisons, we demonstrate the superiority of StyleFlow over prior and several concurrent works. Project Page and Video: https://rameenabdal.github.io/StyleFlow.},
journal = {ACM Trans. Graph.},
month = may,
articleno = {21},
numpages = {21},
keywords = {image editing, Generative adversarial networks}
}
@INPROCEEDINGS{9008515,
  author={Abdal, Rameen and Qin, Yipeng and Wonka, Peter},
  booktitle={2019 IEEE/CVF International Conference on Computer Vision (ICCV)}, 
  title={Image2StyleGAN: How to Embed Images Into the StyleGAN Latent Space?}, 
  year={2019},
  volume={},
  number={},
  pages={4431-4440},
  doi={10.1109/ICCV.2019.00453}}

Broader Impact

Important : Deep learning based facial imagery like DeepFakes and GAN generated images can be gravely misused. This can spread misinformation and lead to other offences. The intent of our work is not to promote such practices but instead be used in the areas such as identification (novel views of a subject, occlusion inpainting etc. ), security (facial composites etc.), image compression (high quality video conferencing at lower bitrates etc.) and development of algorithms for detecting DeepFakes.

Acknowledgments

This implementation builds upon the awesome work done by Karras et al. (StyleGAN2), Chen et al. (torchdiffeq) and Yang et al. (PointFlow). This work was supported by Adobe Research and KAUST Office of Sponsored Research (OSR).

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