SMPLX body doesn't match the beta coefficient
zycliao opened this issue · 1 comments
Hi,
thanks for the amazing work. However, when I run demo.py, the output beta coefficient can't match the output vertices. Here's a code snippet that can reproduce the problem:
import smplx
import numpy as np
smplx_model = smplx.SMPLX(os.path.join(SMPLX_MODEL_DIR, "SMPLX_NEUTRAL.npz"))
faces = smplx_model.faces
body_estimation_path = "/root/project/shapy/samples/shapy_fit/img_21.npz"
body_estimation = np.load(body_estimation_path)
est_body_vertices = smplx_model(beta=torch.tensor(body_estimation["betas"][None], dtype=torch.float32))
save_obj_mesh(os.path.join(data_dir, "smplx_vshaped.obj"), est_body_vertices.v_shaped.detach().cpu().numpy()[0], faces)
save_obj_mesh(os.path.join(data_dir, "est_body_vshaped.obj"), body_estimation['v_shaped'], faces)
The visualization of these two meshes is as follows. The grayish one is est_body_vshaped.obj (it's the same shape as the saved ply file) and the white one is smplx_vshaped.obj (obtained by running SMPLX alone using the predicted betas). And they have a clear difference. I also tried with other examples, and they all have this problem. I would really appreciate it if you have any hints about solving this. Thank you!
😢 Sorry, it's just a silly bug. The argument name should be betas
instead of beta
. The SMPLX model didn't receive the betas coefficients.