How the FLAME texture space is built
masterThe project describes a pipeline to build a FLAME texture space from in-the-wild images (specifically using the FFHQ dataset) to cover diverse ethnicities and age groups. The process follows four main stages:
- Initialization: An initial texture basis is created by fitting FLAME to the Basel Face Model (BFM) template and projecting BFM vertex colors onto the FLAME mesh.
- Model Fitting: FLAME is fitted to FFHQ images by optimizing shape, pose, expression, initial texture space parameters, Spherical Harmonics (SH) lighting (9 coefficients), and a texture offset. The loss function combines landmark loss (using FAN), photometric loss (restricted to skin regions via face segmentation), and various regularizers.
- Texture Completion: To handle occlusions, an inpainting network (adapted from GMCNN) is trained to fill in missing regions of the texture maps using random strokes in the visible face regions.
- Texture Space Computation: Principal Component Analysis (PCA) is applied to the completed texture maps to compute the final texture space.