abdallahdib / NextFace

A high-fidelity 3D face reconstruction library from monocular RGB image(s)
GNU General Public License v3.0
702 stars 90 forks source link

How to get uvParametrization.*.pickle #39

Open shuishiwojiade opened 2 years ago

shuishiwojiade commented 2 years ago

Thanks for your great works. I want to know the process of calculating uvParametrization.pickle, in order to replace BFM model to FLAME. Looking forward to your detailed answer.

abdallahdib commented 2 years ago

uvParametrization.pickle contains the barycentric coordinates used to generate the texture map from the per vertex color. Flame already have these barycentric coordinates which can be found here: https://github.com/TimoBolkart/BFM_to_FLAME/blob/main/col_to_tex.py these coordinates are saved here x_coords, y_coords

U get these coordinates from the npy file here: https://github.com/TimoBolkart/BFM_to_FLAME/tree/main/data

The structure of the cached_data file can be found here in the def cache_data() function in https://github.com/TimoBolkart/BFM_to_FLAME/blob/main/col_to_tex.py

I have started working on adding FLAME to NextFace, any help is appreciated :) please let me know if u need more help with this