Interactive Point-based Manipulation on the Generative Image Manifold
Draggan AI is a tool that edited pictures that users want by moving objects in the image. Dragan lets users “drag” any points of the image.
The DragGAN tool has two parts:
1️⃣ a motion supervision that moves the point.
2️⃣ a point tracking approach that finds the point.
With Draggan AI, anyone can change an image by moving pixels, and change how objects look and where they are. The pictures are real even for hard cases. We show DragGAN is better than other methods in changing images and finding points. We also show how to change real images.
To use NVlabs/stylegan3, you need a CUDA-enabled graphics card. Check the specifications of your device and the software requirements before proceeding.
Alternatively, you can use GPU acceleration on MacOS with Silicon Mac M1/M2, or CPU only, by following these steps:
cat environment.yml | \ grep -v -E 'nvidia|cuda' > environment-no-nvidia.yml && \ conda env create -f environment-no-nvidia.yml conda activate stylegan3 # On MacOS export PYTORCH_ENABLE_MPS_FALLBACK=1
Download pre-trained StyleGAN2 weights
You can download the pre-trained weights by executing the following command:
You can experiment with different pre-trained StyleGAN models as well.
Run DragGAN GUI
To launch the DragGAN GUI, run the following command:
You can use this GUI to modify images created by GANs. For real images, you have to invert them to GAN space with methods like PTI. Then load the new latent code and model weights to the GUI.
A Gradio demo of DragGAN is also available for you to try.
Join Guidady AI Mail List
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.