youngLBW / HRN

[CVPR2023] A Hierarchical Representation Network for Accurate and Detailed Face Reconstruction from In-The-Wild Images.
https://younglbw.github.io/HRN-homepage/
Apache License 2.0
452 stars 38 forks source link

A little question about the texture fitting and the 'fat_face' function #44

Closed kizum closed 9 months ago

kizum commented 1 year ago

Great work! Thanks for sharing the code. I have noticed that during the texture fitting process in the final visualization stage (at [https://github.com/youngLBW/HRN/blob/main/models/facerecon_model.py#L417]), the high color is further fitted to the tensor self.input_img_for_tex to improve the output look. After checking the code, I found that self.input_img_for_tex is generated by a fat_face function (at [https://github.com/youngLBW/HRN/blob/623155deab5883a25f884e4ce72ede34f2ca8f4b/facelandmark/large_model_infer.py#L347]) input with the original image. And if I understand correctly, it turns out that the self.input_img_for_tex is the same input image with face expanding. My question is why this face expanding step is needed? Thanks for your answering.

youngLBW commented 9 months ago

Hi, kizum. This is because if the predicted face is smaller than the input face, the face contour area of the resulting texture map will contain background noise. The 'fat_face' function is introduced to prevent this situation.