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

Inconsistent shadows. #14

Closed waleedrazakhan92 closed 1 year ago

waleedrazakhan92 commented 1 year ago

Hello, I'm trying to generate a variety of shadows from different angles using the x,y and z direction coordinates. However some times the shadows that are generated are not very smooth and consistent and even seams start to appear. Or sometimes aliasing start to appear in the results. I'm attaching some of the images for reference. Please let me know if there is a setting or something either in the preprocessing or postprocessing that can be done to improve the results.

4 3 2

I've also noticed that the generated shadow masks aren't exactly smooth themselves and is there a reason behind it? or something that can be improved upon? download (1) (1) P.S the mask is not of the same image above.

andrewhou1 commented 1 year ago

Hi, so that may happen if the estimated shape is not perfect, specifically that the shadow may not be smooth. If the shape is inaccurate, shadows could appear where they shouldn't. However, to deal with the seams, you can raise the number of sampled points from 160 to something higher. Specifically this variable:

self.num_sample_points = 160