百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

Real-ESRGAN

> 编程语言
开源

Real-ESRGAN 的目标是开发用于一般图像/视频恢复的实用算法。

36.4K stars0 点赞4 次浏览
访问官网GitHub

工具介绍

Real-ESRGAN 的目标是开发用于一般图像/视频恢复的实用算法。

AnimeVideo-v3 model (动漫视频小模型). Please see [anime video models] and [comparisons]
RealESRGAN_x4plus_anime_6B for anime images (动漫插图模型). Please see [anime_model]

  1. :boom: Update online Replicate demo:
  2. Online Colab demo for Real-ESRGAN: | Online Colab demo for for Real-ESRGAN (anime videos):
  3. Portable Windows / Linux / MacOS executable files for Intel/AMD/Nvidia GPU. You can find more information here. The ncnn implementation is in Real-ESRGAN-ncnn-vulkan

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
We extend the powerful ESRGAN to a practical restoration application (namely, Real-ESRGAN), which is trained with pure synthetic data.

Thanks for your valuable feedbacks/suggestions. All the feedbacks are updated in feedback.md.


If Real-ESRGAN is helpful, please help to ⭐ this repo or recommend it to your friends
Other recommended projects:
▶️ GFPGAN: A practical algorithm for real-world face restoration
▶️ BasicSR: An open-source image and video restoration toolbox
▶️ facexlib: A collection that provides useful face-relation functions.
▶️ HandyView: A PyQt5-based image viewer that is handy for view and comparison
▶️ HandyFigure: Open source of paper figures


Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data

[Paper]   [YouTube Video]   [B站讲解]   [Poster]   [PPT slides]
Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan
Tencent ARC Lab; Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences


Updates

  • ✅ Add the realesr-general-x4v3 model - a tiny small model for general scenes. It also supports the -dn option to balance the noise (avoiding over-smooth results). -dn is short for denoising strength.
  • ✅ Update the RealESRGAN AnimeVideo-v3 model. Please see anime video models and comparisons for more details.
  • ✅ Add small models for anime videos. More details are in anime video models.
  • ✅ Add the ncnn implementation Real-ESRGAN-ncnn-vulkan.
  • ✅ Add RealESRGAN_x4plus_anime_6B.pth, which is optimized for anime images with much smaller model size. More details and comparisons with waifu2x are in anime_model.md
  • ✅ Support finetuning on your own data or paired data (i.e., finetuning ESRGAN). See here
  • ✅ Integrate GFPGAN to support face enhancement.
  • ✅ Integrated to Huggingface Spaces with Gradio. See Gradio Web Demo. Thanks @AK391
  • ✅ Support arbitrary scale with --outscale (It actually further resizes outputs with LANCZOS4). Add RealESRGAN_x2plus.pth model.
  • ✅ The inference code supports: 1) tile options; 2) images with alpha channel; 3) gray images; 4) 16-bit images.
  • ✅ The training codes have been released. A detailed guide can be found in Training.md.

Demos Videos

Bilibili

  • 大闹天宫片段
  • Anime dance cut 动漫魔性舞蹈
  • 海贼王片段

YouTube

Dependencies and Installation

  • Python >= 3.7 (Recommend to use Anaconda or Miniconda)
  • PyTorch >= 1.7

Installation

  1. Clone repo

    bash
    git clone https://github.com/xinntao/Real-ESRGAN.git
    cd Real-ESRGAN
  2. Install dependent packages

    bash
    # Install basicsr - https://github.com/xinntao/BasicSR
    # We use BasicSR for both training and inference
    pip install basicsr
    # facexlib and gfpgan are for face enhancement
    pip install facexlib
    pip install gfpgan
    pip install -r requirements.txt
    python setup.py develop

⚡ Quick Inference

There are usually three ways to inference Real-ESRGAN.

  1. Online inference
  2. Portable executable files (NCNN)
  3. Python script

Online inference

  1. You can try in our website: ARC Demo (now only support RealESRGAN_x4plus_anime_6B)
  2. Colab Demo for Real-ESRGAN | Colab Demo for Real-ESRGAN (anime videos).

Portable executable files (NCNN)

You can download Windows / Linux / MacOS executable files for Intel/AMD/Nvidia GPU.

This executable file is portable and includes all the binaries and models required. No CUDA or PyTorch environment is needed.

You can simply run the following command (the Windows example, more information is in the README.md of each executable files):

bash
./realesrgan-ncnn-vulkan.exe -i input.jpg -o output.png -n model_name

We have provided five models:

  1. realesrgan-x4plus (default)
  2. realesrnet-x4plus
  3. realesrgan-x4plus-anime (optimized for anime images, small model size)
  4. realesr-animevideov3 (animation video)

You can use the -n argument for other models, for example, ./realesrgan-ncnn-vulkan.exe -i input.jpg -o output.png -n realesrnet-x4plus

Usage of portable executable files

  1. Please refer to Real-ESRGAN-ncnn-vulkan for more details.
  2. Note that it does not support all the functions (such as outscale) as the python script inference_realesrgan.py.
…

Note that it may introduce block inconsistency (and also generate slightly different results from the PyTorch implementation), because this executable file first crops the input image into several tiles, and then processes them separately, finally stitches together.

Python script

Usage of python script

  1. You can use X4 model for arbitrary output size with the argument outscale. The program will further perform cheap resize operation after the Real-ESRGAN output.
…

Inference general images

Download pre-trained models: RealESRGAN_x4plus.pth

bash
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P weights

Inference!

bash
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance

Results are in the results folder

Inference anime images

Pre-trained models: RealESRGAN_x4plus_anime_6B
More details and comparisons with waifu2x are in anime_model.md

bash
# download model
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth -P weights
# inference
python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i inputs

Results are in the results folder


BibTeX

@InProceedings{wang2021realesrgan,
    author    = {Xintao Wang and Liangbin Xie and Chao Dong and Ying Shan},
    title     = {Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data},
    booktitle = {International Conference on Computer Vision Workshops (ICCVW)},
    date      = {2021}
}

Contact

If you have any question, please email [email protected] or [email protected].

Projects that use Real-ESRGAN

If you develop/use Real-ESRGAN in your projects, welcome to let me know.

  • NCNN-Android: RealSR-NCNN-Android by tumuyan
  • VapourSynth: vs-realesrgan by HolyWu
  • NCNN: Real-ESRGAN-ncnn-vulkan

    GUI

  • Waifu2x-Extension-GUI by AaronFeng753
  • Squirrel-RIFE by Justin62628
  • Real-GUI by scifx
  • Real-ESRGAN_GUI by net2cn
  • Real-ESRGAN-EGUI by WGzeyu
  • anime_upscaler by shangar21
  • Upscayl by Nayam Amarshe and TGS963

Acknowledgement

Thanks for all the contributors.

  • AK391: Integrate RealESRGAN to Huggingface Spaces with Gradio. See Gradio Web Demo.
  • Asiimoviet: Translate the README.md to Chinese (中文).
  • 2ji3150: Thanks for the detailed and valuable feedbacks/suggestions.
  • Jared-02: Translate the Training.md t

Issues· 649 开放

查看全部 Issues在 GitHub 打开
  • #677

    RealESRGan 检查点的许可/条款?

    更新于 2026年9月27日
  • #1012

    你能提供 arm64 版的 realesrgan-ncnn-vulkan 吗?

    更新于 2026年9月25日
  • #1011

    在 Papers with Code 上验证评估

    更新于 2026年9月14日
  • #1004

    关于将 RealESRGANv2-animevideo 用于自由职业工作的商业使用问题

    更新于 2026年8月26日
  • #1003

    已通过 ncnn 和 WebAssembly 实现了浏览器版本

    更新于 2026年7月18日
  • #1002

    优化文字增强何时发布

    更新于 2026年7月17日
  • #985

    有人能解释一下怎么使用吗?

    更新于 2026年5月20日
  • #996

    改进 PDF

    更新于 2026年5月11日
  • #978

    Real-ESRGAN 是否可用于视频播放器的实时超分辨率? 是否有现成的工作流? (Real-ESRGAN 是否可用于视频播放器的实时超分辨率? 是否有现成的工作流?)

    更新于 2026年5月8日
  • #995

    图片

    更新于 2026年4月28日

> 标签

Pythonaminedenoiseesrganimage-restoration

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月30日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言