chaofengc / PSFRGAN

PyTorch codes for "Progressive Semantic-Aware Style Transformation for Blind Face Restoration", CVPR2021
Other
370 stars 68 forks source link

Enhanced face not blending properly(?) #40

Closed Kubishime closed 3 years ago

Kubishime commented 3 years ago

I'm testing PSFRGAN on old images and it constantly places hard boxes that are either black or grey around the enhanced subject, is there something I'm missing or doing wrong?

chaofengc commented 3 years ago

Yes, this is probably because of blending problem. We use simple gaussian blur with (5, 5) kernel size to blurry the mask border. Since your picture is quite big, it is likely that small gaussian kernel fails. https://github.com/chaofengc/PSFRGAN/blob/82a8755116d61e83a302b7e48fb61c53c36e34c9/test_enhance_single_unalign.py#L81

Kubishime commented 3 years ago

Yes, this is probably because of blending problem. We use simple gaussian blur with (5, 5) kernel size to blurry the mask border. Since your picture is quite big, it is likely that small gaussian kernel fails. https://github.com/chaofengc/PSFRGAN/blob/82a8755116d61e83a302b7e48fb61c53c36e34c9/test_enhance_single_unalign.py#L81

Thank you. What you've done here is incredible.