This is an unofficial implementation of the paper "Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold" by Xingang Pan, Ayush Tewari, Thomas Leimkühler, Lingjie Liu, Abhimitra Meka, and Christian Theobalt.
The UI is built with the Streamlit framework to run as a web app in your browser. GPU-enabled demos are available for Hugging Face Spaces and Colab:
demo.mp4
Follow these steps to run the app in your local environment:
- Install dependencies:
pip install -r requirements.txt
- Run app:
streamlit run app.py
- Add Colab demo
- Add Hugging Face Spaces demo
- Implement mask reconstruction loss
- Regularization loss
- Inversion for real image editing
This project is made possible by these works:
- StyleGAN2-ADA — Official PyTorch implementation
- Self-Distilled StyleGAN: Towards Generation from Internet Photos
For the complete details about the algorithm please refer to the original paper:
@inproceedings{pan2023draggan,
title={Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold},
author={Pan, Xingang and Tewari, Ayush, and Leimk{\"u}hler, Thomas and Liu, Lingjie and Meka, Abhimitra and Theobalt, Christian},
booktitle = {ACM SIGGRAPH 2023 Conference Proceedings},
year={2023}
}