smplify-x icon indicating copy to clipboard operation
smplify-x copied to clipboard

guess_init() function fails

Open dongliangcao opened this issue 5 years ago • 4 comments

Processing: data/images\COCO_val2014_000000000241.jpg Found Trained Model: vposer\snapshots\TR00_E096.pt Traceback (most recent call last): File "smplifyx/main.py", line 272, in main(**args) File "smplifyx/main.py", line 262, in main **args) File "C:\Users\caodo\Desktop\TUM\3DMC\project\smplify-x\smplifyx\fit_single_frame.py", line 274, in fit_single_frame focal_length=focal_length, dtype=dtype) File "C:\Users\caodo\anaconda3\lib\site-packages\torch\autograd\grad_mode.py", line 49, in decorate_no_grad return func(*args, **kwargs) File "C:\Users\caodo\Desktop\TUM\3DMC\project\smplify-x\smplifyx\fitting.py", line 89, in guess_init for edge in edge_idxs: TypeError: 'NoneType' object is not iterable

I think the reason is that edge_indices = kwargs.get('body_tri_idxs'), line 269, in fit_single_frame.py. I think I didn't pass a argument body_tri_idxs to the main function.

dongliangcao avatar Jul 11 '20 13:07 dongliangcao

@dongliangcao Sorry for that, I just pushed a fix. Please try to run it again.

vchoutas avatar Jul 16 '20 08:07 vchoutas

@dongliangcao Sorry for that, I just pushed a fix. Please try to run it again.

It's still have a error for edge in edge_idxs: diff3d.append(joints_3d[:, edge[0]] - joints_3d[:, edge[1]]) diff2d.append(joints_2d[:, edge[0]] - joints_2d[:, edge[1]])

edge_idxs=[5, 12, 2, 9] so there is no 'edge[0]' and 'edge[1]' I modified code like this: for index in range(len(edge_idxs)//2): diff3d.append(joints_3d[:, edge_idxs[index*2]] - joints_3d[:, edge_idxs[index*2+1]]) diff2d.append(joints_2d[:, edge_idxs[index*2]] - joints_2d[:, edge_idxs[index*2+1]])

BboyHanat avatar Jul 30 '20 07:07 BboyHanat

@BboyHanat Does the issue still exist? This line should convert the input body_tri_idxs to a list of pairs.

vchoutas avatar Sep 15 '20 10:09 vchoutas

@BboyHanat Does the issue still exist? This line should convert the input body_tri_idxs to a list of pairs.

yeah, I have solved it, It's not a big problem.

BboyHanat avatar Sep 15 '20 10:09 BboyHanat