avatarTom Tillo

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

2705

Abstract

nerate images ( of objects, human faces, and almost anything ) from random noise by iteratively trying out several rounds of trial outputs which are better than the previous attempt. After a few iterations, they generate synthetic images which are almost similar to the real images which were originally present in the training set.</p><p id="290c">(<i> Unfortunately, we wont be going into the details of the working of GANs. </i>) You can learn about GANs <a href="https://livebook.manning.com/book/gans-in-action/chapter-1/">here in this wonderful book</a>. (<b><i>GANs in Action: Deep learning with Generative Adversarial Networks</i> — by Jakub Langr and Vladimir Bok</b>)</p><h2 id="2930">GFPGAN ( Generative Facial Prior GAN )</h2><p id="a675">GFPGAN is a GAN implementation which specializes in restoring human faces . As menetioned in their site, they</p><p id="aff3">It is open sourced and is available here . (<a href="https://github.com/TencentARC/GFPGAN">https://github.com/TencentARC/GFPGAN</a> )</p><p id="518d">But for those of you who donot have a GPU supported machine or are not technically savvy ( in case you might run into some troubles having to fix some errors), here is the GFPGAN implementation on hugging face spaces . The link here — <a href="https://huggingface.co/spaces/akhaliq/GFPGAN">https://huggingface.co/spaces/akhaliq/GFPGAN</a></p><h2 id="6515">Back to midjourney</h2><p id="30b7">Here are some of the samples of real outputs we restored from midjourney.</p><figure id="b434"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*sciAqkxGUIu99epRge8DXA.png"><figcaption>Image generated by text prompt through midjourney , facial restoration by GFPGAN</figcaption></figure><figure id="88de"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Hp2qSYIAPYNP3W5hJs0F4w.png"><figcaption>Image generated by text prompt through midjourney , facial restoration by GFPGAN</figcaption></figure><figure id="45af"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*YjrC1U4X9DqUOjNVfRjWkw.png"><figcaption>Image generated by text prompt through midjourney , facial restoration by GFPGAN</figcaption></figure><h2 id="e69a">Potential to create stunning facial Images</h2><p id="2277">And here are some images of human faces generated through midjourney — after a few iterations .</p><figure id="2c00"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*fL1sy-BBqZpKv_7v-djUpg.png"><figcaption>Sample faces generated and iterated through midjourney + GFPGAN loops</figcaption></figure><h1 id="5029">References</h1><ul><li>GFPGAN github link — <a href="https://github.com/TencentARC/GFPGAN">https://github.com/TencentARC/GFPGAN</

Options

a></li><li>GFPGAN original paper — <a href="https://arxiv.org/abs/2101.04061">https://arxiv.org/abs/2101.04061</a></li><li>Original Homepage — <a href="https://xinntao.github.io/projects/gfpgan#citation">https://xinntao.github.io/projects/gfpgan#citation</a></li></ul><h1 id="4ced">Related Links</h1><ol><li>How to write better prompts and get your desired results from the Images generated by Midjourney</li></ol><div id="1199" class="link-block"> <a href="https://readmedium.com/an-advanced-guide-to-writing-prompts-for-midjourney-text-to-image-aa12a1e33b6"> <div> <div> <h2>An advanced guide to writing prompts for Midjourney ( text-to-image)</h2> <div><h3>A detailed ‘cheat sheet’ and some keywords for improving image output by using better prompts</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*61Vk6EDAFTD6j4s7X6y2NA.png)"></div> </div> </div> </a> </div><p id="2ef0">2. <b>How Adobe is implementing AI into its environment.</b></p><div id="27d6" class="link-block"> <a href="https://bootcamp.uxdesign.cc/adobe-photoshop-implemented-5-new-ai-tools-and-it-is-killing-the-competition-ec722af7ec6"> <div> <div> <h2>Adobe Photoshop implemented 5 new AI tools and it is killing the competition</h2> <div><h3>The new AI features in Photoshop 2021 inspired by the latest researches in AI</h3></div> <div><p>bootcamp.uxdesign.cc</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*aPBk7zo05ve8KFG36V2_Jg.png)"></div> </div> </div> </a> </div><p id="3ba9">3. A practitioners guide to using lama-cleaner ( An open source watermark remover)</p><div id="aba9" class="link-block"> <a href="https://readmedium.com/lama-cleaner-ai-based-watermark-remover-image-editor-6446958536a4"> <div> <div> <h2>lama-cleaner : AI based watermark remover & Image Editor</h2> <div><h3>The latest Open source Image Editor with support for Stable Diffusion</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*bnKh6KNy7-6d3j5GzXbJgw.png)"></div> </div> </div> </a> </div></article></body>

MIDJOURNEY, TEXT-TO-IMAGE

Taking generated Midjourney (MJ) images to the next level

A text-to-image generation pipeline for human faces for midjourney

In this article

This article will give a quick overview on a process pipeline and to generate more realistic synthetic human faces using midjourney .

Bad facial reconstruction

Anybody who has used midjourney for creating images which involve human faces, knows pretty well that, the images generated using midjourney have a bad finish when it comes to human faces.

For example — the images below are generated using midjourney app ( Upscaled version ) and almost every realistic image of a human face ends up distorted.

Image generated by midjourney : Example of bad face construction (1)
Image generated by midjourney : Example of bad face construction (2)

A facial restoration pipeline

To reduce the facial reconstruction aberrations and to make it more useful , here is a quick image generation pipeline you can try —

image generation pipeline using GFPGAN for face-restoration

Step 1 : provide a link to an image as your image prompt , along with your text prompt . Learn how to do some advanced text prompt generation by following the link here. ( An advanced guide to writing prompts for Midjourney )

Step 2 : Refine with keywords and attributes

Step 3 : Pass the refined image as input to GFPGAN.

Step 4. You can feed this new restored image back into the image prompt or continue with a couple of iterations in GFPGAN.

👉 Note : This may need s few iterations from the face reconstruction package ( GFPGAN ) and so might be easier to create a tiny python script for the same.

GANS

GANs (Generative Adversarial Networks) are neural networks which generate images ( of objects, human faces, and almost anything ) from random noise by iteratively trying out several rounds of trial outputs which are better than the previous attempt. After a few iterations, they generate synthetic images which are almost similar to the real images which were originally present in the training set.

( Unfortunately, we wont be going into the details of the working of GANs. ) You can learn about GANs here in this wonderful book. (GANs in Action: Deep learning with Generative Adversarial Networks — by Jakub Langr and Vladimir Bok)

GFPGAN ( Generative Facial Prior GAN )

GFPGAN is a GAN implementation which specializes in restoring human faces . As menetioned in their site, they

It is open sourced and is available here . (https://github.com/TencentARC/GFPGAN )

But for those of you who donot have a GPU supported machine or are not technically savvy ( in case you might run into some troubles having to fix some errors), here is the GFPGAN implementation on hugging face spaces . The link here — https://huggingface.co/spaces/akhaliq/GFPGAN

Back to midjourney

Here are some of the samples of real outputs we restored from midjourney.

Image generated by text prompt through midjourney , facial restoration by GFPGAN
Image generated by text prompt through midjourney , facial restoration by GFPGAN
Image generated by text prompt through midjourney , facial restoration by GFPGAN

Potential to create stunning facial Images

And here are some images of human faces generated through midjourney — after a few iterations .

Sample faces generated and iterated through midjourney + GFPGAN loops

References

Related Links

  1. How to write better prompts and get your desired results from the Images generated by Midjourney

2. How Adobe is implementing AI into its environment.

3. A practitioners guide to using lama-cleaner ( An open source watermark remover)

Midjourney
AI
Image Processing
Python
Ml So Good
Recommended from ReadMedium