xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
BSD 3-Clause "New" or "Revised" License
27.95k stars 3.51k forks source link

problem with face_enhance #506

Open rekombination opened 1 year ago

rekombination commented 1 year ago

first of all thank you for the great work!

the following problem occurs when using face_enhance. with most of the images it works as it should. but with some of them there is a narrow border at the top, which stands out strongly from the rest of the image.

original image: original

error at the top: Real-ESRGAN_out__

Real-ESRGAN_out_

second example: error

Real-ESRGAN_out_

does anyone have any idea what could be the reason for this and how to fix it?

martinholecekmax commented 1 year ago

Did you try to change the tile size?

adahbingee commented 2 months ago

This is GFPGANer implementation bugs.

It crop and replace the detected face box.

Helper for restoration with GFPGAN.

It will detect and crop faces, and then resize the faces to 512x512. GFPGAN is used to restored the resized faces. The background is upsampled with the bg_upsampler. Finally, the faces will be pasted back to the upsample background image.