开始之前,请勿必跟着视频教程,来完成 python 和 git 的环境安装
【安装教程】:点击前往
CodeFormer 免费开源项目 GitHub :【链接】、或者【网盘打包下载】
如果你电脑没安装conda,那么请先下载安装【官方链接】
安装命令:
git clone https://github.com/sczhou/CodeFormer cd CodeFormer pip install -r requirements.txt pip install -q gradio python basicsr/setup.py develop
如果出现无法下载,请更换你的IP,或通过代理IP进行全局上网,推荐【Surfshark VPN】最高优惠链接 :https://bittly.cc/Surfshark
【下载预训练模型】:
1.从 [ Google Drive |下载 facelib 预训练模型 OneDrive ] 到weights/facelib
文件夹。您可以手动下载预训练模型或通过运行以下命令下载。
python scripts/download_pretrained_models.py facelib
2.从 [ Google Drive |下载 CodeFormer 预训练模型 OneDrive ] 到weights/CodeFormer
文件夹。您可以手动下载预训练模型或通过运行以下命令下载。
python scripts/download_pretrained_models.py CodeFormer
面部修复(裁剪和对齐的面部)
# For cropped and aligned faces
python inference_codeformer.py -w 0.5 --has_aligned --input_path [input folder]
整体图像增强
# For whole image
# Add '--bg_upsampler realesrgan' to enhance the background regions with Real-ESRGAN
# Add '--face_upsample' to further upsample restorated face with Real-ESRGAN
python inference_codeformer.py -w 0.7 --input_path [image folder/image path]
视频增强
# For video clips
python inference_codeformer.py --bg_upsampler realesrgan --face_upsample -w 1.0 --input_path
保真度权重w位于 [0, 1] 中。通常,较小的w往往会产生较高质量的结果,而较大的w会产生较高保真度的结果。
结果将保存在results
文件夹中。
本条线报内容来自互联网,所推荐内容不代表本站立场,请自行鉴别。
相关文章
- 1 Windows 11 开始默认不读取A:软驱
- 2 K歌必备神器!全民K歌、K歌达人 支持电脑 手机 电视TV
- 3 Windows 11 开始默认不读取A:软驱
- 4 GibberLink 神奇的两 AI 加密对话! 完全开源,本地部署教程!
- 5 震惊!AI 竟秘密通信,人类完全听不懂!太离谱了!免费开源,可本地部署 GibberLink | 零度解说
- 6 Winhance – Windows 11 系统增强实用工具,系统瘦身优化神器!
- 7 Windows 11 Debloater Tool (可视化 UI 版) ,免费开源,一键去除电脑臃肿功能!
- 8 Windows 11 卡顿、运行慢?试试这两款优化神器,让电脑丝滑流畅、极速起飞! | 零度解说
- 9 AI 太强了!几分钟生成一首原创音乐,真实又好听,教程来了! | 零度解说
- 10 OmniHuman-1 多模态 “真人”视频生成项目! 效果真不错
-
扫码下载安卓APP
-
微信扫一扫关注我们
微信扫一扫打开小程序
微信扫一扫打开小程序
-
返回顶部
发表评论