csxmli2016 / DFDNet

Blind Face Restoration via Deep Multi-scale Component Dictionaries (ECCV 2020)
915 stars 215 forks source link

Code compiles and runs, but resulting alignment of face is sometimes incorrect #55

Open kremens opened 4 years ago

kremens commented 4 years ago

DFDNet is adding some great detail to the images I'm giving it. But alignment is sometimes incorrect.

Here's the original, unprocessed image - no detail, but her face is correctly placed! crop_unprocessed_correct_placement

Here's the processed image - magical detail, but her face is incorrectly attached! crop_processed_bad_placement

Any ideas?

kremens commented 4 years ago

Hello?

lhdlhdlhdhh commented 4 years ago

Yes, I found the same problem. And the resulting face and background colors changed.

kremens commented 4 years ago

Yes, color change too. But that’s easy enough to correct. The placement issue is kind of a dealbreaker, though. @csxmli2016? If you can’t fix, could you point to where the problem might be? Or perhaps suggest a workaround?

eko666 commented 4 years ago

Yes, color change too. But that’s easy enough to correct. The placement issue is kind of a dealbreaker, though. @csxmli2016? If you can’t fix, could you point to where the problem might be? Or perhaps suggest a workaround?

can you tell me how to correct the color ? thx !

kremens commented 4 years ago

Any NLE (non-linear editing) program will have tools for color correction - that’s probably the easiest workaround. Davinci Resolve has a free edition and a cheap “Studio” edition. Both do color correction at the highest possible level - and pretty much everything else.

But I guess the color change here is a hassle if you don’t already have experience with an NLE. As for how to correct it programmatically, I don’t know at this point - I’d have to look into it further. I’m wondering if the problem might be an incorrect translation of color space. I’ve seen this happen with image processing programs where it isn’t even the developer’s fault - it’s caused by an error in an underlying library...

zakajd commented 3 years ago

Hi An easy way to fix the issue with colours is to perform histogram matching between face crop and original image before joining them together.