zhuhao-nju / facescape

FaceScape (PAMI2023 & CVPR2020)
833 stars 94 forks source link

Texture/color for multi-view mesh #91

Closed SaharHusseini closed 1 year ago

SaharHusseini commented 2 years ago

Do we have a texture (color corresponding to each vertex) for each multi-view mesh? I was able to find textures for TU models but not for the multiview meshes. If we do not have them, how can we generate?

zhuhao-nju commented 2 years ago

Hi @SaharHusseini ,

The dataset doesn't contain vertex colors or UV textures for raw-scaned models, but they can be generated with provided multi-view images and calibrations. Firstly, inverse-project the multi-view images to each triangle face on the raw scanned mesh (refer to https://github.com/zhuhao-nju/facescape/blob/master/toolkit/demo_mview_projection.ipynb), transferring the pixels from the images to the triangle faces, then blend them to build a texture atlas. The pixels that are occluded or with a normal direction perpendicular to the camera direction are filtered out. The blending process is to simply compute the mean of multi-view colors for each pixel.