yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.68k stars 615 forks source link

face3d/morphable_model/fit.py #72

Closed diggle1 closed 4 years ago

diggle1 commented 4 years ago

Excuse me, why are the indexes of landmark points timed by 3? image

csyuhao commented 4 years ago

X_ind means the index of 68-landmarks in human face, which can be described $(x, y, z)$. In ShapeMU, ShapePC, texMU and texPC, for example, there are two points P_1(x_1, y_1, y_2) and P_2(x_2, y_2, z_2), which are stored as x_1, y_1, z_1, x_2, y_2, z_2. If the index of a landmark point is 3, in ShapeMU, the value of this point is stored in 9, 10, 11. So in this code, the author first copies the index three times, multiply 3, and then adds (0, 1, 2) in order.

diggle1 commented 4 years ago

Many thanks