// image · TencentARC/GFPGAN

GFPGAN

GFPGAN — проект с открытым исходным кодом из категории «Изображения» от TencentARC (TencentARC/GFPGAN на GitHub). У него 37 703 звезды на GitHub и 6 279 форков, он распространяется по лицензии Apache-2.0 и последний раз обновлялся на GitHub 26 июля 2024.

Tencent ARC face restoration — revives old, blurry and low-quality faces with a StyleGAN2 prior, Apache-2.0

★ 37,7 тыс. звёзд⑂ 6,3 тыс. форковApache-2.0обновлено июль 2024
▦ визуал — в README этого проекта нет встраиваемого скриншота,
поэтому здесь заглушка. Руководство ниже в любом случае полное.
// факты о проекте

Факты о проекте

Репозиторий
TencentARC/GFPGAN
Звёзды GitHub
37 703
Форки
6 279
Лицензия
Apache-2.0
Последнее обновление на GitHub
26 июля 2024
Категория
Изображения
Тип страницы
Полное руководство по установке
Официальный сайт
Project page
// как это работает

Как это работает

  1. Clone the repo

    Download the source and move into the project folder.

  2. Install the dependencies

    Install BasicSR, facexlib and the requirements file, then install the package in development mode.

  3. Download a model

    Grab a pretrained model such as GFPGANv1.3.pth into experiments/pretrained_models.

  4. Restore your photos

    Point the inference script at a folder of images and collect the results.

// возможности

Почему его любят

Blind face restoration

Rebuilds faces from blurry, noisy or compressed photos using a pretrained StyleGAN2 prior.

Clean version, no CUDA extensions

Runs on Windows and CPU — no custom CUDA build step.

Three model versions to choose from

v1.3 for natural results, v1.4 for detail and identity, v1.2 for sharpness.

Background enhancement

Pairs with Real-ESRGAN to upscale the non-face parts of the photo too.

Training code included

The full training pipeline is in the repo if you want to improve it on your own data.

// запустите сами

Запустите сами

  1. Step 1 — Clone and install

    Clone the repo and install its Python dependencies.

    git clone https://github.com/TencentARC/GFPGAN.git
    cd GFPGAN
    pip install basicsr facexlib
    pip install -r requirements.txt
    python setup.py develop
  2. Step 2 — Download the v1.3 model

    Fetch the pretrained weights into the models folder.

    wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P experiments/pretrained_models
  3. Step 3 — Restore a folder of photos

    Run inference at 2x upscaling; results land in the results folder.

    python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.3 -s 2
// сценарии использования

Что можно создать

  • Restore old family photos with damaged faces
  • Clean up blurry profile pictures and scanned prints
  • Upscale low-quality faces for video frames
  • Pre-process faces before recognition or editing

Close neighbours on the Image shelf: Real-ESRGAN — practical blind super-resolution for real-world, and CodeFormer — NeurIPS 2022] Towards Robust Blind Face Restoration. The full shelf is the Image tools in the catalogue.

// вопросы и ответы

Вопросы и ответы

What does GFPGAN do?

It restores low-quality faces — blurry, compressed, noisy or old photos — using the facial knowledge inside a pretrained StyleGAN2.

Which model version should I use?

v1.3 for the most natural results, v1.4 for more detail and identity, v1.2 if you want sharper output. Try more than one on your photos.

Do I need a GPU?

No — the clean version runs on CPU and Windows without CUDA extensions, though a GPU is faster.

Is it free?

Yes — Apache 2.0.

Can it fix the background too?

Yes, with the Real-ESRGAN background upsampler (pip install realesrgan).

// продолжить изучение

Похожие инструменты

Изображения

Real-ESRGAN

Real-ESRGAN — practical blind super-resolution for real-world photos and video: restores and upscales degraded images with models trained on pure synthetic data, BSD-3-Clause

★ 37,1 тыс. звёздBSD-3-Clause
Смотреть руководство →
Изображения

CodeFormer

[NeurIPS 2022] Towards Robust Blind Face Restoration with Codebook Lookup Transformer

★ 18,2 тыс. звёздCustom (check repo)
Смотреть руководство →
Изображения

MirrorMetrics

Visual diagnostics for LoRA training — spot overfitting with face biometrics

★ 62 звездыMIT
Смотреть руководство →
Изображения

ImageUpscaler

Simple Flask web app that upscales low-res images with AI

★ 129 звёздMIT
Смотреть руководство →
Изображения

PhotoCraft

PhotoCraft — a clean-room Photoshop reimplementation in pure Rust: layers, masks, adjustment layers, type, vectors, brushes and real PSD files, offline, MIT / Apache-2.0

★ 73,2 тыс. звёздMIT / Apache-2.0
Смотреть руководство →
Изображения

SAM 2

SAM 2 — Meta's Segment Anything Model 2: promptable segmentation for images and video, Apache-2.0

★ 20,1 тыс. звёздApache-2.0
Смотреть руководство →
// альтернативы

Альтернативы: Изображения

Другие проекты из категории «Изображения» с наибольшим числом звёзд в каталоге LibreAI — реалистичный список альтернатив, если GFPGAN вам не подходит.

  • Stable Diffusion Webui★ 165,2 тыс.

    Stable Diffusion web UI

  • ComfyUI★ 136,0 тыс.

    The node-graph powerhouse for precise, professional AI image and video generation.

  • Immich★ 115,5 тыс.

    High performance self-hosted photo and video management solution

  • Stable Diffusion (Original)★ 73,6 тыс.

    The original latent text-to-image diffusion model from CompVis — the CVPR 2022 reference implementation, Open RAIL-M

  • PhotoCraft★ 73,2 тыс.

    PhotoCraft — a clean-room Photoshop reimplementation in pure Rust: layers, masks, adjustment layers, type, vectors, brushes and real PSD files, offline, MIT / Apache-2.0

// ещё в категории image

Больше проектов: Изображения

Соседние проекты из категории «Изображения» в каталоге, ближайшие по числу звёзд к GFPGAN — продолжайте изучать полку по обе стороны от него.

  • aseprite★ 39,9 тыс.

    Animated sprite editor & pixel art tool (Windows, macOS, Linux)

  • Real-ESRGAN★ 37,1 тыс.

    Real-ESRGAN — practical blind super-resolution for real-world photos and video: restores and upscales degraded images with models trained on pure synthetic data, BSD-3-Clause

  • PhotoPrism★ 40,3 тыс.

    AI-Powered Photos App 🌈💎✨

  • diffusers★ 34,6 тыс.

    🤗 Diffusers: State-of-the-art diffusion models for image, video, and audio generation in PyTorch.

  • Upscayl★ 50,1 тыс.

    🆙 Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows

  • ControlNet★ 34,1 тыс.

    ControlNet — the original conditional control for diffusion models: steer Stable Diffusion with edges, depth, pose and scribbles instead of prompts alone, Apache-2.0

Получить GFPGAN

Бесплатно и открыто — забирайте исходный код, ставьте звезду репозиторию и начинайте создавать.