avatarTristan Wolff

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2868

Abstract

figure><p id="2d78"><b>Step two:</b> select your GPU in the notebook settings and run the installation code, after that run the demo code block.</p><p id="c33f"><b>Step three:</b> Choose a model and image to test DragGAN by setting origin and target handles and clicking “Drag it” (available via the “Setup Handle Points” menu).</p><figure id="32af"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*DGT9GjyaBlHhpe-KSa8ezw.gif"><figcaption></figcaption></figure><h2 id="6eca">Huggingface Space</h2><p id="9c03">There is a space on Huggingface that is pre-configured and has simple click & drag functionality (you don’t have to set origin and target points, which makes it easier to get a feel for the method, but of course less controllable)</p><p id="b785"><b>Step one: navigate to</b> <a href="https://huggingface.co/spaces/radames/UserControllableLT-Latent-Transformer">https://huggingface.co/spaces/radames/UserControllableLT-Latent-Transformer</a></p><figure id="047a"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*BTwL0inwUtSKHJf0WKFT9A.png"><figcaption></figcaption></figure><p id="7c76"><b>Step two: select an image to work with.</b></p><p id="2bfe">There are two options for this: generate an image with one of the provided GAN models or upload a face image/use a sample face image.</p><p id="a218"><i>Option 1: Generate an image</i></p><p id="e480">Choose one of the “Pretrained Models”. In this example, I use the “anime” model.</p><figure id="15f2"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*PvSpuWOwPG7YVcSiDHP7sA.png"><figcaption></figcaption></figure><p id="88f9">Then click “Random sample” until you find an image you like (alternatively, use “Change style” to change the image)</p><figure id="d00d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*FN1vTkoZI5LfFJD_9bWaRg.png"><figcaption></figcaption></figure><p id="8ded"><i>Option 2: Use a face image sample or upload your own face image</i></p><p id="cc80">Click the upload your face image rider to either upload an image or use one of the provided sample images.</p><figure id="d58c"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*DvJQXA86Twzk7RsJBZhC1w.png"><figcaption></figcaption></figure><p id="2466"><b>Step three: click&drag over the chosen image to manipulate it.</b></p><p id="70b2">Here’s an example:</p><figure id="1dbe"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*bN643OX3AKb6Q6IuVdXZAw.gif"><figcaption></figcaption></figure><p id="4ad5">🚨 For more information about <a href="https://fabulous-maker-2733.ck.page/da150f448e">AI & Creativity</a>, follow me on <a href="http://twitter.com/tristwolff">Twitter</a> or <a href="https://medium.com/@tristwolff/membership">use my referral link to get full access to all my Medium articles</a> (+ those of thousand

Options

s of other writers).</p><div id="f2da" class="link-block"> <a href="https://medium.com/@tristwolff/membership"> <div> <div> <h2>Join Medium with my referral link — Tristan Wolff</h2> <div><h3>Read every story from Tristan Wolff (and thousands of other writers on Medium). Your membership fee directly supports…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*uENkZ7BN6_QNnAxp)"></div> </div> </div> </a> </div><p id="9991">➡️ If you like my content, why not leave a “clap” at the end of this article, so more people can see it?</p><h2 id="e658">More From The Generator</h2><div id="77ca" class="link-block"> <a href="https://readmedium.com/kill-your-orphans-with-ai-for-better-seo-link-whisper-review-69e11c59118f"> <div> <div> <h2>Kill Your Orphans with AI for Better SEO; Link Whisper Review</h2> <div><h3>A Wordpress plugin that automates internal linking for bloggers</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*af_yAhGTqVNlfQo1XeKZ8Q.png)"></div> </div> </div> </a> </div><div id="5c37" class="link-block"> <a href="https://readmedium.com/googles-generative-ai-search-an-evolution-not-the-end-of-blogging-1771fadd331c"> <div> <div> <h2>Google’s Generative AI Search: An Evolution, Not the End, of Blogging</h2> <div><h3>Here is my take as a full-time blogger</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*8ejDLBWN4l6SQJ9-Ehx_wA.png)"></div> </div> </div> </a> </div><div id="572d" class="link-block"> <a href="https://readmedium.com/how-one-screenwriter-finds-ai-useful-and-useless-f48d155354ae"> <div> <div> <h2>How one screenwriter finds AI useful (and useless)</h2> <div><h3>My union, the Writers Guild of America (WGA), is on strike over a host of issues, one being a proposed set of rules…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*G3raAAAxhEZ6VsAiNCZjqg.jpeg)"></div> </div> </div> </a> </div></article></body>

How To Set Up & Use DragGAN

While we wait for the official release, you can already play with DragGAN

It’s one of those releases that everyone is excited about. And with good reason: DragGAN not only puts GAN back on the map but also opens up a ton of new possibilities for GAN image manipulation.

The official release is announced this month. But you can already try out the new tool in an unofficial demo. Here’s how.

Wait, what’s GAN again?

A Generative Adversarial Network (GAN) is a type of machine learning system that uses a specific architecture to produce incredibly realistic synthetic data.

How DragGAN works

DragGAN allows you to drag any point of a GAN-generated image to a target point, thus transforming the image.

For more information about DragGAN and lots of image examples, check out my recent post:

For a technical deep dive, check out the original paper here.

How to set up and use DragGAN

Two ways to use DragGAN right now (before the official release): via Google Colab or Huggingface Spaces.

Google Colab

There is a Google Colab that lets you run DragGAN in your browser window. All you need to do is get a Google account and some GPU time ($10/month).

Step one: navigate to https://colab.research.google.com/github/Zeqiang-Lai/DragGAN/blob/master/colab.ipynb#scrollTo=JwFHP4JUWtko

Step two: select your GPU in the notebook settings and run the installation code, after that run the demo code block.

Step three: Choose a model and image to test DragGAN by setting origin and target handles and clicking “Drag it” (available via the “Setup Handle Points” menu).

Huggingface Space

There is a space on Huggingface that is pre-configured and has simple click & drag functionality (you don’t have to set origin and target points, which makes it easier to get a feel for the method, but of course less controllable)

Step one: navigate to https://huggingface.co/spaces/radames/UserControllableLT-Latent-Transformer

Step two: select an image to work with.

There are two options for this: generate an image with one of the provided GAN models or upload a face image/use a sample face image.

Option 1: Generate an image

Choose one of the “Pretrained Models”. In this example, I use the “anime” model.

Then click “Random sample” until you find an image you like (alternatively, use “Change style” to change the image)

Option 2: Use a face image sample or upload your own face image

Click the upload your face image rider to either upload an image or use one of the provided sample images.

Step three: click&drag over the chosen image to manipulate it.

Here’s an example:

🚨 For more information about AI & Creativity, follow me on Twitter or use my referral link to get full access to all my Medium articles (+ those of thousands of other writers).

➡️ If you like my content, why not leave a “clap” at the end of this article, so more people can see it?

More From The Generator

Artificial Intelligence
Technology
Creativity
Innovation
Future Technology
Recommended from ReadMedium