python scripts/download_pretrained_models.py facelib
python scripts/download_pretrained_models.py CodeFormer
面部修复(裁剪和对齐的面部)
# For cropped and aligned facespython 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-ESRGANpython inference_codeformer.py -w 0.7 --input_path [image folder/image path]
视频增强
# For video clipspython inference_codeformer.py --bg_upsampler realesrgan --face_upsample -w 1.0 --input_path
保真度权重w位于 [0, 1] 中。通常,较小的w往往会产生较高质量的结果,而较大的w会产生较高保真度的结果。
结果将保存在results文件夹中。
原始地址:freedidi.com/7749.html