Improving Faces with GFPGAN
GFPGAN (https://github.com/TencentARC/GFPGAN) is a generative adversarial network for Face Restoration - or in other terms, a machine learning model for fixing faces. You can use this tool to improve faces and eyes created with applications like MidJourney where things aren't quite right.
Note this generally preserves the image feel (identifying and improving the face), but may change the facial expression or detail. It works towards realistic faces as well, so may be less useful for other purposes.
ESRGAN (Online)[edit | edit source]
Pulling to the top - ESRGAN appears to have close to or equal to the same quality as GFPGAN, and is much easier to use. If you'd prefer to use GFPGAN directly, skip to the below, otherwise I encourage you to try https://replicate.com/nightmareai/real-esrgan (makes sure to enable "face_enhance", and if you don't want to scale up set "scale" to 1).
GFPGAN (Online)[edit | edit source]
The latest instructions are built into the Notebook available at https://colab.research.google.com/drive/1sVsoBd9AjckIXThgtZhGrHRfFI6UUYOo, which we'll be using here as well. This uses Google Collab to host and run this tool. You can also run this locally, as linked in the above github instructions if you'd prefer and meet the requirements - but local running of the tool isn't gone over here.
- Navigate to https://colab.research.google.com/drive/1sVsoBd9AjckIXThgtZhGrHRfFI6UUYOo
- Click "Connect" to enable the page (top right)
- Mouse over the code in Step 1 and hit the "Play" button that shows up. This runs the code to set up the environment
- Scroll to the "Upload Images" step and mouse over / hit play on the code. You can then click the "upload image" button to upload your original image. Skip the "OR" code in this case (as it uses an example image)
- Run the code in Step 3
- Run the code in Step 4, which will give you a comparison of just the face regions
- Run the code in Step 5, which will show you a comparison (as seen above) of the entire image
- Run the code in Step 6, to download a zip with your results
- Open the zip file, and look in the "results\restored_imgs" folder for the result!
ALTERNATIVES[edit | edit source]
These other tools work similarly, but don't appear as effective in this case. They are however easier to use than GFPGAN above! Though I'd highly recommend ESRGAN (First section).