图像编辑与放大Apache-2.0Python

GFPGAN

Blind face restoration for old and low-quality photos.

Star 数
37.7K
Fork 数
6.3K
未关闭 Issue
402
最近提交
2024-07-26

数据来自 GitHub API · 更新于 2026-10-15

GFPGAN 是什么?

GFPGAN restores degraded faces — blur, noise, compression artifacts — in old photos and AI images, and can upscale the background with Real-ESRGAN in the same pass.

主要功能

  • Face restoration for old or blurry photos
  • Background upscaling via Real-ESRGAN
  • Multiple model versions (1.3, 1.4)

系统要求

平台
Windows · macOS · Linux
显卡
NVIDIA recommended; CPU works slowly
Python
3.7+

如何安装 GFPGAN

根据项目 README 整理。开源项目更新很快,请以 GitHub 页面上的最新说明为准。

Python

  1. 1
    Clone and install dependencies.
    git clone https://github.com/TencentARC/GFPGAN.git
    cd GFPGAN
    pip install basicsr facexlib
    pip install -r requirements.txt
    python setup.py develop
    pip install realesrgan
  2. 2
    Restore the faces in a folder of images.
    python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.3 -s 2

优势

  • Fast, good-looking face fixes
  • Built into many UIs

不足

  • Can make faces look too smooth
  • Older Python dependencies

GFPGAN 替代品对比

软件Star 数许可证平台显存
GFPGAN

Blind face restoration for old and low-quality photos.

37.7KApache-2.0—
CodeFormer

Robust face restoration with an adjustable fidelity–quality trade-off.

18.2KS-Lab License 1.0 (non-commercial)—
Real-ESRGAN

Practical image and video super-resolution models.

37.1KBSD-3-Clause—
Upscayl

Free desktop app that upscales images with AI.

50.6KAGPL-3.0—
rembg

Remove image backgrounds from the command line, Python or an HTTP server.

25.1KMIT—
BiRefNet

High-resolution dichotomous segmentation — state-of-the-art background removal.

4.3KMIT—

常见问题

GFPGAN 免费吗?

是的——GFPGAN 是开源软件,采用 Apache-2.0 许可证。商用前请确认软件及模型权重的许可条款。

GFPGAN 支持 Windows、Mac 和 Linux 吗?

GFPGAN 支持:Windows, macOS, Linux。

运行 GFPGAN 需要什么配置?

NVIDIA recommended; CPU works slowly

如何安装 GFPGAN?

1. Clone and install dependencies. 2. Restore the faces in a folder of images.

GFPGAN 有哪些好的替代品?

常见替代品包括 CodeFormer, Real-ESRGAN, Upscayl, rembg,详见本页对比表。

可以不安装、在线使用 GFPGAN 吗?

如果只想要结果,AiLoft 可在浏览器中运行 GPT Image 2.5、Nano Banana Pro 等顶级图像模型,无需显卡和配置。

不想安装?直接在浏览器里生成图片

无需显卡、驱动或 Python。在线使用 GPT Image 2.5 和 Nano Banana Pro,并排对比效果。