A newly-released artificial intelligence (AI) model called the “Generative Facial Prior” (GFP-GAN) can repair most old photographs in mere seconds, and it can do it for free.
Anyone who has old photographs of their families and friends that have not held up well against time, regardless of the small and/or poor condition of the image, now has the chance to restore their faded and cracked images, returning them to their original state, or even better.
In the eight-minute video above from What’s AI, Louis Bouchard describes how well the “Towards Real-World Blind Face Restoration with Generative Facial Prior” project (published in March of 2022), worked at photo restoration with details on how to use it for free.
According to Bouchard, the AI model works with even very low quality and low-resolution files, yet it can still seemingly outperform many other photo restoration AI tools providing incredible results. While the restored images are impressive, Bouchard says “They do not represent the actual image. It’s important to understand that these results are just guesses from the model — guesses that seem pretty damn close.
“To human eyes, it seems like the same image representing the person. We couldn’t guess that a model created more pixels without knowing anything else about the person.”
The improved 1.3 version of the GFP-GAN model tries to analyze what is contained in the image to understand the content, and then fill in the gaps and add pixels to the missing sections. It uses a pre-trained StyleGAN-2 model to orient their own generative model at multiple scales during the encoding of the image down to the latent code and up to reconstruction.
Using additional metrics helps the AI enhance facial details, focusing on important local features like a person’s eyes, mouth, and nose. The system then compares the real image to the newly restored image to see if they still have the same person in the generated photo.
GFP-GAN is not without its flaws though. According to the developers, while the restored images are much more detailed than previous and other versions, the current restored images are not very sharp and can have a “slight change of identity.” This means that in some cases, the restored images can sometimes look like a different person. Typically this happens more with images that are very low resolution and very heavily damaged, making the AI have to make some broad guesses as to what was behind the blurry or torn sections of the photograph.
Bouchard says even though the results are mostly fantastic and remarkably close to reality, “The resulting image will look just like our grandfather if we are lucky enough. But it may as well look like a complete stranger, and you need to keep that in consideration when you use these kinds of models.”
Those who want to download the code can do so for free or visit the existing demo online to try for themselves. Readers can find more of Bouchard’s work on his YouTube Channel here.
Author: David Crewe
Source: Petapixel