Tencent ARC's practical face restoration model for real-world photos.
open sourceApache-2.0self-hostablefree
GFPGAN is Tencent ARC's algorithm for real-world face restoration. It uses the priors in a pretrained face GAN to restore low-quality faces, with versions 1.3 and 1.4 giving more natural results and v1.2 needing no CUDA extensions. It can enhance the non-face background with Real-ESRGAN. It's a Python package on PyPI with pretrained models in its GitHub releases.
Problems it solves
- restore low-quality faces in old photos
- sharpen faces in a batch of blurry pictures from a script
- improve faces before upscaling a whole image
Limitations
- Its LICENSE says some bundled third-party code isn't Apache-2.0: StyleGAN2 code under NVIDIA's licence (research or evaluation only) and DFDNet-derived code under CC BY-NC-SA 4.01
- Its README states no separate licence for the pretrained models2
- Its last release is v1.3.8, from 16 September 20223
- Users report a ModuleNotFoundError for torchvision.transforms.functional_tensor with newer torchvision versions, through its basicsr dependency, with no fix released45
Alternatives
The same job
These do what GFPGAN does.
- CodeFormer A face restoration model that repairs blurry, low-quality and old photos of faces.