Home

Awesome

EditGAN

<div align="center"> Official code and tool release for:

EditGAN: High-Precision Semantic Image Editing

Huan Ling*, Karsten Kreis*, Daiqing Li, Seung Wook Kim, Antonio Torralba, Sanja Fidler

(* authors contributed equally)

NeurIPS 2021

[project page] [paper] [supplementary material]

</div>

Demos and results

<img src = "https://nv-tlabs.github.io/editGAN/resources/demo2.gif" width="35%"/><img src = "https://nv-tlabs.github.io/editGAN/resources/demo.gif" width="35%"/>

Left: The video showcases EditGAN in an interacitve demo tool. Right: The video demonstrates EditGAN where we apply multiple edits and exploit pre-defined editing vectors. <u>Note that the demo is accelerated. See paper for run times.</u>

<img src = "https://nv-tlabs.github.io/editGAN/resources/demo_interp.gif" width="35%"/><img src = "https://nv-tlabs.github.io/editGAN/resources/demo_cross.gif" width="28%"/>

Left: The video shows interpolations and combinations of multiple editing vectors. Right: The video presents the results of applying EditGAN editing vectors on out-of-domain images.

Requirements

virtualenv env
source env/bin/activate
pip install -r requirements.txt
export PYTHONPATH=$PWD

Use pre-trained model & Run tool locally

In the repo, we release our demo tool and pre-trained models for the car class. Follow these steps to set up our interactive WebAPP:

Training your own model

Here, we provide step-by-step instructions to create a new EditGAN model. We use our fully released car class as an example.

Citations

Please use the following citation if you use our data or code:

@inproceedings{ling2021editgan,
  title = {EditGAN: High-Precision Semantic Image Editing}, 
  author = {Huan Ling and Karsten Kreis and Daiqing Li and Seung Wook Kim and Antonio Torralba and Sanja Fidler},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year = {2021}
}

License

Copyright © 2022, NVIDIA Corporation. All rights reserved.

This work is made available under the Nvidia Source Code License-NC. Please see our main LICENSE file.

License Dependencies

For any code dependencies related to StyleGAN2, the license is the Nvidia Source Code License-NC by NVIDIA Corporation, see StyleGAN2 LICENSE.

For any code dependencies related to DatasetGAN, the license is the MIT License, see DatasetGAN LICENSE.

The dataset of DatasetGAN is released under the Creative Commons BY-NC 4.0 license by NVIDIA Corporation.

For any code dependencies related to the frontend tool (including html, css and Javascript), the license is the Nvidia Source Code License-NC. To view a copy of this license, visit ./static/LICENSE.md. To view a copy of terms of usage, visit ./static/term.txt.