mks0601 / Hand4Whole_RELEASE

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

output.obj upside down #57

Closed dtgfdgfgf closed 1 year ago

dtgfdgfgf commented 1 year ago

The output.obj in /demo is upside down, and so is my own output.obj I have to use these .obj to do other work, so I am wondering that how to flip the obj

dtgfdgfgf commented 1 year ago

I made it with some clue in /commom/utils/vis.py, function render_mesh().

import trimesh mesh = out['smplx_mesh_cam'].detach().cpu().numpy()[0] mesh_fix = trimesh.Trimesh(mesh, smpl_x.face) rot = trimesh.transformations.rotation_matrix(np.radians(180), [1, 0, 0]) mesh_fix.apply_transform(rot) save_obj(mesh_fix.vertices, smpl_x.face, "%s/obj%d.obj"%(obj_path, cnt))