人脸修复模型介绍
模型 | 文件名 | 修复力度 | 清晰度 | 保真度 | 可调节性 | 最佳用途 |
---|---|---|---|---|---|---|
CodeFormer | codeformer-v0.1.0.pth | ★★★★☆ | ★★★★☆ | ★★★★☆ | ✅(fidelity) | 模糊脸/老照片修复、人脸提升 |
GFPGAN v1.3 | GFPGANv1.3.pth | ★★★☆☆ | ★★★☆☆ | ★★★★★ | ❌ | 泛用修复、自然风格 |
GFPGAN v1.4 | GFPGANv1.4.pth | ★★★★☆ | ★★★★★ | ★★★☆☆ | ❌ | 写实风格、细节增强 |
GPEN-512 | GPEN-BFR-512.onnx | ★★★★☆ | ★★★☆☆ | ★★★☆☆ | ❌ | 中分辨率人脸修复 |
GPEN-1024 | GPEN-BFR-1024.onnx | ★★★★★ | ★★★★★ | ★★★☆☆ | ❌ | 高清人脸增强 |
GPEN-2048 | GPEN-BFR-2048.onnx | ★★★★★ | ★★★★★ | ★★★☆☆ | ❌ | 超高清人像修复/人脸特写 |
face_restore_visibility:人脸恢复可见度,值越大,人脸越清晰,但是人脸的相似度相应下降。红色值为face_restore_visibility,绿色值为dist,值越小,代表与参考图越像。
codeformer_weight:CodeFormer模型权重,只在使用codeformer-v0.1.0.pth模型时有效。红色值为权重,绿色值为dist,值越小,代表与参考图越像。
- detect_gender_input:输入图像性别检测选项
- detect_gender_source:源图像性别检测选项
- input_faces_index:输入图像人脸索引
- source_faces_index:源图像人脸索引
当场景中有多张人脸时,则需要指定性别进行换脸。
在以下场景中,input_faces_index=1,则替换索引1的人脸。