栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

AI面部修复项目:GFP-GAN

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

AI面部修复项目:GFP-GAN

GitHub项目页:
https://github.com/TencentARC/GFPGAN

Hugging Face试玩传送门:
https://huggingface.co/spaces/akhaliq/GFPGAN

安装anaconda 下载解压GFPGAN-0.2.0.zip文件 安装dependent 包

安装 basicsr - https://github.com/xinntao/BasicSR

# We use BasicSR for both training and inference

pip install basicsr

安装 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 inference_gfpgan_full.py --upscale_factor 2 --test_path inputs/whole_imgs --save_root results

 已训练模型https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth 下载拷贝到 experiments/pretrained_models目录

相关参数配置

    parser.add_argument('--upscale_factor', type=int, default=2)
    parser.add_argument('--arch', type=str, default='clean')
    parser.add_argument('--channel', type=int, default=2)
    parser.add_argument('--model_path', type=str, default='experiments/pretrained_models/GFPGANCleanv1-NoCE-C2.pth')
    parser.add_argument('--test_path', type=str, default='inputs/whole_imgs')
    parser.add_argument('--suffix', type=str, default=None, help='Suffix of the restored faces')
    parser.add_argument('--only_center_face', action='store_true')
    parser.add_argument('--aligned', action='store_true')
    parser.add_argument('--paste_back', action='store_false')
    parser.add_argument('--save_root', type=str, default='results')

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/664583.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号