TencentARC /GFPGAN

GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.

★ 37,704⑂ 6,279👁 510⑃ 65● 511▤ 8
PythonNOASSERTIONCreated 2021-03-19
More from this author
Download: GFPGAN v1.3.8 Release NoteGFPGAN-1.3.8 ↓1.3.82022-09-16
+3
Daily
+2
Weekly
37,704
stars
6,279
forks
510
watchers
65
prs
511
issues
8
releases

README

English | 简体中文



    
 --










1. :boom: Updated online demo: . Here is the backup.
1. :boom: Updated online demo: 
1. Colab Demo for GFPGAN ; (Another Colab Demo for the original paper model)



 :rocket: Thanks for your interest in our work. You may also want to check our new updates on the tiny models for anime images and videos in Real-ESRGAN :blush:

GFPGAN aims at developing a Practical Algorithm for Real-world Face Restoration.
It leverages rich and diverse priors encapsulated in a pretrained face GAN (e.g., StyleGAN2) for blind face restoration.

:question: Frequently Asked Questions can be found in FAQ.md.

:triangular_flag_on_post: Updates

- :white_check_mark: Add RestoreFormer inference codes.
- :white_check_mark: Add V1.4 model, which produces slightly more details and better identity than V1.3.
- :white_check_mark: Add V1.3 model, which produces more natural restoration results, and better results on very low-quality / high-quality inputs. See more in Model zoo, Comparisons.md
- :white_check_mark: Integrated to Huggingface Spaces with Gradio. See Gradio Web Demo.
- :white_check_mark: Support enhancing non-face regions (background) with Real-ESRGAN.
- :white_check_mark: We provide a clean version of GFPGAN, which does not require CUDA extensions.
- :white_check_mark: We provide an updated model without colorizing faces.

---

If GFPGAN is helpful in your photos/projects, please help to :star: this repo or recommend it to your friends. Thanks:blush:
Other recommended projects:
:arrow_forward: Real-ESRGAN: A practical algorithm for general image restoration
:arrow_forward: BasicSR: An open-source image and video restoration toolbox
:arrow_forward: facexlib: A collection that provides useful face-relation functions
:arrow_forward: HandyView: A PyQt5-based image viewer that is handy for view and comparison

---

 :book: GFP-GAN: Towards Real-World Blind Face Restoration with Generative Facial Prior

 [Paper]   [Project Page]   [Demo] 
 Xintao Wang, Yu Li, Honglun Zhang, Ying Shan 
 Applied Research Center (ARC), Tencent PCG


  


---

 :wrench: Dependencies and Installation

- Python = 3.7 (Recommend to use Anaconda or Miniconda)
- PyTorch = 1.7
- Option: NVIDIA GPU + CUDA
- Option: Linux

 Installation

We now provide a clean version of GFPGAN, which does not require customized CUDA extensions. 
If you want to use the original model in our paper, please see PaperModel.md for installation.

1. Clone repo

    bash
    git clone https://github.com/TencentARC/GFPGAN.git
    cd GFPGAN
    

1. Install dependent packages

    bash
     Install basicsr - https://github.com/xinntao/BasicSR
     We use BasicSR for both training and inference
    pip install basicsr

     Install facexlib - https://github.com/xinntao/facexlib
     We use face detection and face restoration helper in the facexlib package
    pip install facexlib

    pip install -r requirements.txt
    python setup.py develop

     If you want to enhance the back

Top issues

Discussions

Latest release

GFPGAN v1.3.8 Release Note v1.3.8 2022-09-16
🚀 See you again 😸

✨ Highlights
✅ remove codeformer

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON