mks0601 / Hand4Whole_RELEASE

Official PyTorch implementation of "Accurate 3D Hand Pose Estimation for Whole-Body 3D Human Mesh Estimation", CVPRW 2022 (Oral.)
MIT License
314 stars 31 forks source link

Training problem #83

Open Julylala opened 1 year ago

Julylala commented 1 year ago

Hello, can you help me to see what might be wrong? I only used MPII data for training, and then generated the model after the second stage for running the demo, but the following error was reported. Thanks a lot!

trainset_3d = []
trainset_2d = ['MPII'] 

Using GPU: 0 Load checkpoint from ./snapshot_6.pth.tar Traceback (most recent call last): File "demo.py", line 84, in rendered_img = render_mesh(vis_img, mesh, smpl_x.face, {'focal': focal, 'princpt': princpt}) File "/home/na/main/../common/utils/vis.py", line 134, in render_mesh mesh = pyrender.Mesh.from_trimesh(mesh, material=material, smooth=False) File "/home/anaconda3/envs/torch/lib/python3.7/site-packages/pyrender/mesh.py", line 205, in from_trimesh positions = m.vertices[m.faces].reshape((3 * len(m.faces), 3)) IndexError: index 0 is out of bounds for axis 0 with size 0

mks0601 commented 1 year ago

please check dimension of vis_img and mesh

Julylala commented 1 year ago

I printed out their shape information, but it looks correct. Shape of vis_img: (512, 384, 3) Shape of mesh: (10475, 3),

And confused, the pre-trained model I downloaded worked fine, but the model I trained with this MPII data had this problem.

mks0601 commented 1 year ago

can you save mesh and visualize it through meshlab

Julylala commented 1 year ago

MESHLAB reported an error: Warning mesh contains 10475 vertices with NAN coords and 0 degenerated faces. Corrected. Opened mesh C:/Users/19626/Desktop/output.obj in 101176 msec All files opened in 101177 msec.

Maybe there's something wrong with my model training.

mks0601 commented 1 year ago

I think so. Basically, MPI dataset only has 2D body data, so it's not a good idea to train a model only on that dataset

Julylala commented 1 year ago

Received, and thank you very much for your guidance.