andrewhou1 / GeomConsistentFR

Official Code for Face Relighting with Geometrically Consistent Shadows (CVPR 2022)
https://openaccess.thecvf.com/content/CVPR2022/html/Hou_Face_Relighting_With_Geometrically_Consistent_Shadows_CVPR_2022_paper.html
MIT License
114 stars 17 forks source link

Transfer lightning #2

Closed hhlsygmz closed 2 years ago

hhlsygmz commented 2 years ago

Hello! Amazing job! I’m sorry to disturb you in your busy schedule. I’m a student of Shenzhen University from China. I want to relight images through reference images, but I don’t know how to do that . If possible, can you teach me how to do that? I would appreciate it if you could help me. Thanks and regards!

wrainbow0705 commented 2 years ago

Have you solved this problem?I want to transfer reference image's lighting to target image,too.

hhlsygmz commented 2 years ago

I send email to the author,he said he will upload the code for lighting transfer later. ^_^

andrewhou1 commented 2 years ago

Hi there,

Thanks for your interest in our work! I've uploaded the lighting transfer testing code and model as well as some updates to the instructions in the Testing section for how to run the lighting transfer code. The python file of interest is "test_relight_single_image_lighting_transfer.py". I will also upload the training code for lighting transfer, as it is a separately trained model from the model with fixed lighting parameters (target lightings).

hhlsygmz commented 2 years ago

Thanks a lot!

hhlsygmz commented 2 years ago

Sorry to disturb you, I wonder can I use the input mask from MP_data you provide or use the face_parsing? I try the lighting transfe code, the result is not good, and there is some black pixels, I use the fix_border_artifacts_CVPR2022.m to fix it, but the result is almost unchanged.

hhlsygmz commented 2 years ago

I test the method on CelebAHQ-dataset.

andrewhou1 commented 2 years ago

Did you use the mask from CelebAHQ_face_masks/? Those masks involve the whole face. Also yes, in my experiments I often found the lighting transfer performance is not as good as the performance when the user fixes the lighting. We rely heavily on the SfSNet method to supervise the lighting estimation, which is not always accurate for directional lighting. Our method's lighting estimation is therefore impacted by this.

hhlsygmz commented 2 years ago

Yes,I used the mask from CelebAHQ_face_masks. I will try some other lighting estimation approach. Thank you so much for replying me!