{"name":"DragGAN: Interactive Point-Based Image Manipulation with Generative AI","description":"DragGAN is the official code for the SIGGRAPH 2023 paper, \"Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold.\" This powerful Python-based repository enables users to precisely control and manipulate generated images using interactive dragging points. It offers an intuitive way to edit AI-generated content, making complex image transformations accessible.","github":"https://github.com/XingangPan/DragGAN","url":"https://osrepos.com/repo/xingangpan-draggan","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/xingangpan-draggan","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/xingangpan-draggan.md","json":"https://osrepos.com/repo/xingangpan-draggan.json","topics":["artificial-intelligence","generative-adversarial-network","generative-models","image-manipulation","python","computer-vision","deep-learning","interactive-ai"],"keywords":["artificial-intelligence","generative-adversarial-network","generative-models","image-manipulation","python","computer-vision","deep-learning","interactive-ai"],"stars":null,"summary":"DragGAN is the official code for the SIGGRAPH 2023 paper, \"Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold.\" This powerful Python-based repository enables users to precisely control and manipulate generated images using interactive dragging points. It offers an intuitive way to edit AI-generated content, making complex image transformations accessible.","content":"## Introduction\nDragGAN presents a groundbreaking approach to interactive image manipulation, as featured in the SIGGRAPH 2023 conference proceedings. This repository provides the official implementation for \"Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold,\" allowing users to precisely control the pose, shape, expression, and layout of objects within AI-generated images. By simply \"dragging\" points on an image, users can achieve complex and realistic transformations, making it a powerful tool for artists, researchers, and developers working with generative models.\n\n## Installation\nTo get started with DragGAN, follow these installation instructions based on your system configuration.\n\n### For CUDA-enabled GPUs:\nbash\nconda env create -f environment.yml\nconda activate stylegan3\npip install -r requirements.txt\n\n\n### For MacOS with Apple Silicon (M1/M2) or CPU-only:\nbash\ncat environment.yml | \\\n  grep -v -E 'nvidia|cuda' > environment-no-nvidia.yml && \\\n    conda env create -f environment-no-nvidia.yml\nconda activate stylegan3\n\n# On MacOS\nexport PYTORCH_ENABLE_MPS_FALLBACK=1\n\n\n### Running with Docker (for Gradio visualizer):\nFirst, clone the repository and download pre-trained models:\nbash\npython scripts/download_model.py\n\nThen, build and run the Docker container:\nbash\ndocker build . -t draggan:latest\ndocker run -p 7860:7860 -v \"$PWD\":/workspace/src -it draggan:latest bash\n# For GPU acceleration:\n# docker run --gpus all -p 7860:7860 -v \"$PWD\":/workspace/src -it draggan:latest bash\n\ncd src && python visualizer_drag_gradio.py --listen\n\n\n## Examples\nDragGAN offers several ways to interact with its powerful image manipulation capabilities. After installation and downloading pre-trained StyleGAN2 weights (using `python scripts/download_model.py`), you can run the graphical user interface (GUI) or a Gradio web demo.\n\n### Running the GUI:\nbash\nsh scripts/gui.sh\n# For Windows:\n# .\\scripts\\gui.bat\n\nThe GUI allows for direct editing of GAN-generated images. For real image editing, GAN inversion tools like PTI are required first.\n\n### Running the Gradio Demo:\nbash\npython visualizer_drag_gradio.py\n\nThis provides a web-based interface accessible from any browser, making it easy to experiment with the dragging functionality. Pre-trained models for StyleGAN-Human and Landscapes HQ (LHQ) are also available for download to expand your creative possibilities.\n\n## Why Use DragGAN?\nDragGAN stands out for its intuitive and precise control over generative adversarial networks (GANs). Instead of complex parameter adjustments, users can achieve desired image transformations by simply dragging points, mimicking how one might edit an image in a traditional editor. This interactive approach democratizes access to advanced AI image generation and manipulation, enabling rapid prototyping, artistic creation, and detailed research into the latent space of GANs. Its robust implementation, backed by SIGGRAPH 2023, ensures high-quality results and a strong foundation for further development in the field of AI-driven content creation.\n\n## Links\n*   **GitHub Repository:** <a href=\"https://github.com/XingangPan/DragGAN\" target=\"_blank\">XingangPan/DragGAN</a>\n*   **Project Page:** <a href=\"https://vcai.mpi-inf.mpg.de/projects/DragGAN/\" target=\"_blank\">DragGAN Project Page</a>\n*   **Paper (PDF):** <a href=\"https://arxiv.org/abs/2305.10973\" target=\"_blank\">Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold</a>\n*   **Open In Colab:** <a href=\"https://colab.research.google.com/drive/1mey-IXPwQC_qSthI5hO-LTX7QL4ivtPh?usp=sharing\" target=\"_blank\">Google Colab</a>\n*   **Hugging Face Demo:** <a href=\"https://huggingface.co/spaces/radames/DragGan\" target=\"_blank\">Hugging Face Space</a>\n*   **OpenXLab Demo:** <a href=\"https://openxlab.org.cn/apps/detail/XingangPan/DragGAN\" target=\"_blank\">OpenXLab App</a>","metrics":{"detailViews":4,"githubClicks":1},"dates":{"published":null,"modified":"2025-12-12T00:01:00.000Z"}}