GFP-GAN:人面部图像智能修复软件

GFP-GAN:利用生成性面部优先权实现现实世界的盲目面部修复;GFP-GAN: Towards Real-World Blind Face Restoration with Generative Facial PriorGFPGAN旨在开发一个实用的算法用于现实世界的人脸修复。
它利用预先训练好的人脸GAN(如StyleGAN2)中封装的丰富和多样的先验因素进行盲目的人脸修复。

GFP-GAN:人面部图像智能修复软件

安装

  1. Clone repo

    git clone https://github.com/TencentARC/GFPGAN.git
    cd GFPGAN
  2. Install dependent packages

    # 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 background (non-face) regions with Real-ESRGAN,
    # you also need to install the realesrgan package
    pip install realesrgan

快速开始:

下载预训练模型GFPGANv1.3.pth,

wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P experiments/pretrained_models

其他模型下载链接:https://share.weiyun.com/ShYoCCoc

使用方法:

python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.3 -s 2
Usage: python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1.3 -s 2 [options]...

  -h                   show this help
  -i input             Input image or folder. Default: inputs/whole_imgs
  -o output            Output folder. Default: results
  -v version           GFPGAN model version. Option: 1 | 1.2 | 1.3. Default: 1.3
  -s upscale           The final upsampling scale of the image. Default: 2
  -bg_upsampler        background upsampler. Default: realesrgan
  -bg_tile             Tile size for background sampler, 0 for no tile during testing. Default: 400
  -suffix              Suffix of the restored faces
  -only_center_face    Only restore the center face
  -aligned             Input are aligned faces
  -ext                 Image extension. Options: auto | jpg | png, auto means using the same extension as inputs.

如若转载,请注明出处:https://www.ouq.net/gfp-gan.html

(0)
打赏 微信打赏,为服务器增加100M流量 微信打赏,为服务器增加100M流量 支付宝打赏,为服务器增加100M流量 支付宝打赏,为服务器增加100M流量
上一篇 2022年4月11日 上午12:41
下一篇 2022年4月16日 上午1:02

相关推荐

  • EasyPubMed

    专为新版PubMed设计的工具条——看摘要、找全文、收藏文献都不是问题
    – 一键点击从UnpayWall、Sci-Hub、Libgen多渠道获取全文PDF,找全文如此简单
    – 一键收集PubMed文章,好文献随时收藏并支持做多种标记,如星价、旗标、贴标签、写备注
    – 展示最新(2021年)杂志影响因子、JCR分区、中科院分区及文章被引用次数
    – 获取文章10000+种参考文献引用格式,覆盖绝大多数SCI杂志
    – PubMed搜索界面展示完整摘要

    2022年4月16日
  • SCENIC:cisTarget databases数据库下载

    List of databases for the cisTarget family of tools (e.g. RcisTarget, SCENIC/pySCENIC, and…

    R 2022年3月21日
  • 药学专业知识二习题

    一、最佳选择题 1.下列药物中属于非苯二氮䓬结构的杂环类镇静催眠药的是 A.苯巴比妥    B.地西泮   C.劳拉西泮 D.阿普唑仑    E.佐匹克隆   2.与单胺…

    题集 2022年4月23日
  • MAC常用软件介绍与合集大全(一)

    阅读和写作工具 Applications to edit text, I suggest the open-source editors 文本编辑器 Atom – Ha…

    IOS系统资源 2022年4月16日
  • 复旦大学硕士博士学位授予工作细则

    复旦大学学位授予工作细则 (2016年11月修订)   第一章  总则     第一条  根据《中华人民共和国学位条例》、《中华人民共和国学位条例暂行实施办法》以及国家相关文件,结…

    高校政策 2022年7月27日