Home > Article > Technology peripherals > Relive the beautiful moments of the past! AI technology helps you repair old photos!
This article introduces an open source AI technology (released in 2021) that can help you repair old photos and let you relive the beautiful moments of the past!
Online free trial website: https://huggingface.co/spaces/akhaliq/GFPGAN
Because this model is relatively large, it requires a lot of computing resources, especially GPU resources. And it’s free, so I don’t know when it will be closed. There are few people using it now, so this online experience can still be used for free.
The GFPGAN algorithm is used behind this repair. GFPGAN is Tencent’s open-source face repair algorithm. It uses rich and diverse prior factors encapsulated in pre-trained facial GAN (such as StyleGAN2) to perform blind face repair and is designed to be developed for real-world faces. Practical algorithms for repair.
https://www.php.cn/link/649adc59afdef2a8b9e943f94a04b02f
Choose an old photo to see the repair effect how.
I specially picked a very blurry photo.
The effect after repair:
Then GFP- How does GAN achieve such a powerful effect? Researchers were inspired by StyleGAN2:
Since GAN can already generate real-life images, can the facial information it contains also help in face repair? Therefore, in the GFP-GAN model framework, a degradation removal module and a pre-trained GAN are mainly used as priors.
The two modules are connected through latent coding mapping and multiple channel segmentation spatial feature change layers (CS-SFT).
# During the training process, low-quality faces must first be subjected to rough processing such as noise reduction, and then facial information is retained.
In terms of fidelity, the researchers introduced a facial loss (Facial Component Loss) to determine which details need to be improved and retained, and then use the identification retention loss (Identity Preserving Loss) to repair them.
Stable Diffusion, which has recently become popular in the field of AI graphics, also uses GFPGAN. Refer to the sixth line of the dependency package file below https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/requirements.txt
The above is the detailed content of Relive the beautiful moments of the past! AI technology helps you repair old photos!. For more information, please follow other related articles on the PHP Chinese website!