Closed Jiankai-Sun closed 3 years ago
I have the same issue. For some poses of SMPL meshes I get weird result.
I had the same issue, this is because trimesh changes the vertices values by default. add the flag "process=False" when you load the mesh:
mesh = trimesh.Trimesh(vertices=c2c(all_step_vertices[i]), faces=faces, vertex_colors=np.tile(colors['grey'], (10475, 1)),process=False)
After that, should work!
I spent days debugging this, the authors responded and this was the same problem. I wish I'd seen this issue.
Hi, thanks for the code! I tried to convert an SMPL-H model (.obj generated by the following code piece) to an SMPL-X representation. While trying to run this code
python -m transfer_model --exp-cfg config_files/smplh2smplx.yaml
, I met several problems.trimesh.Trimesh
save_folder = '/'.join(sample_paths[seq_no].split('/')[3:-1]) obj_name = sample_paths[seq_no].split('/')[-1] for i in range(all_step_vertices.shape[0]): if args.model_type in ['smpl', 'smplh']: mesh = trimesh.Trimesh(vertices=c2c(all_step_vertices[i]), faces=faces, vertex_colors=np.tile(colors['grey'], (6890, 1))) else: mesh = trimesh.Trimesh(vertices=c2c(all_step_vertices[i]), faces=faces, vertex_colors=np.tile(colors['grey'], (10475, 1))) os.makedirs(osp.join(OUTPUT_DIR, save_folder), exist_ok=True) save_dir = osp.join(OUTPUT_DIR, savefolder, '{0}{1:02d}.obj'.format(obj_name, i)) save_mesh(mesh, None, save_dir) print('Saved to {}'.format(save_dir)) obj_list.append(save_dir)
Input: model_transfer Output:
Question: I suspect the input .obj file is incorrect, even though the input “looks” correct. Is there any requirements for the transfer_model input?
Thank you for taking the time to solve our problems in advance!
Best