CodeFormer icon indicating copy to clipboard operation
CodeFormer copied to clipboard

Repair results are different in final_results directory and restored_faces directory.

Open LyneDefense opened this issue 2 years ago • 3 comments

When I use the command "python3 inference_codeformer.py --bg_upsampler realesrgan -w 0.7 --input_path ~/Desktop/xiufu4.jpg" to repair a photo, the faces and clothes in the "restored_faces" are both in high definition. However, in the "final_results" directory, the faces are in high definition, but the clothes are blurry. Why is this happening? orignial photo: image photo in restored_faces: image photo in final results: image I wonder if i use wrong parameter or it is an expected result? If not, how can I get same result between restored_faces and final_result.

LyneDefense avatar Oct 31 '23 08:10 LyneDefense

I have the same confusion.

Gubaii avatar Oct 31 '23 08:10 Gubaii

Use this --bg_upsampler realesrgan and --face_upsample

So, the command will be python inference_codeformer.py -w 0.5 --has_aligned --bg_upsampler realesrgan --face_upsample --input_path [image folder]|[image path]

Prudhvi-Daruvuri avatar Nov 06 '23 16:11 Prudhvi-Daruvuri

因为CF只对脸部作高清修复, 而对非脸部外的图像只作增强,修复完脸部后复合到背景图像中去,因而背景仍会是较模糊的。

hoveryoung avatar Dec 19 '23 07:12 hoveryoung