eth-siplab / AvatarPoser

Official Code for ECCV 2022 paper "AvatarPoser: Articulated Full-Body Pose Tracking from Sparse Motion Sensing"
https://siplab.org/projects/AvatarPoser
MIT License
277 stars 46 forks source link

ValueError: Cannot use face colors with a smooth mesh #17

Open ChrisGoettfert opened 1 year ago

ChrisGoettfert commented 1 year ago

Hi,

Thanks for your great work. I wanted to export animation videos and set the boolean save_animation (line 19) in main_test_avatarposer.py to True. This creates: ValueError: Cannot use face colors with a smooth mesh

Full output:

/home/christopher/Downloads/AvatarPoser/venv/bin/python /home/christopher/Downloads/AvatarPoser/main_test_avatarposer.py export CUDA_VISIBLE_DEVICES=0 number of GPUs is: 1 LogHandlers setup! -------------------------------number of test data is 536 Dataset [AMASS_Dataset - test_dataset] is created. Initialization method [kaiming_normal + uniform], gain is [0.20] Training model [ModelAvatarPoser] is created. Loading model for G [model_zoo/avatarposer.pth] ... 23-02-22 16:12:21.641 : testing the sample 0/536 Traceback (most recent call last): File "/home/christopher/Downloads/AvatarPoser/main_test_avatarposer.py", line 178, in main() File "/home/christopher/Downloads/AvatarPoser/main_test_avatarposer.py", line 140, in main vis.save_animation(body_pose=gt_body, savepath=save_video_path_gt, bm = model.bm, fps=60, resolution = resolution) File "/home/christopher/Downloads/AvatarPoser/utils/utils_visualize.py", line 196, in save_animation mv.set_static_meshes([checker_mesh,body_mesh]) File "/home/christopher/Downloads/AvatarPoser/venv/lib/python3.10/site-packages/body_visualizer/mesh/mesh_viewer.py", line 97, in set_static_meshes def set_static_meshes(self, meshes, poses=[]): self.set_meshes(meshes, group_name='static', poses=poses) File "/home/christopher/Downloads/AvatarPoser/venv/lib/python3.10/site-packages/body_visualizer/mesh/mesh_viewer.py", line 88, in set_meshes mesh = pyrender.Mesh.from_trimesh(mesh) File "/home/christopher/Downloads/AvatarPoser/venv/lib/python3.10/site-packages/pyrender/mesh.py", line 209, in from_trimesh color_0, texcoord_0, primitive_material = Mesh._get_trimesh_props(m, smooth=smooth, material=material) File "/home/christopher/Downloads/AvatarPoser/venv/lib/python3.10/site-packages/pyrender/mesh.py", line 272, in _get_trimesh_props raise ValueError('Cannot use face colors with a smooth mesh') ValueError: Cannot use face colors with a smooth mesh

Process finished with exit code 1

yc4ny commented 1 year ago

@ChrisGoettfert I faced this problem as well.

In body_visualizer/mesh/mesh_viewer.py :

Fix line 88: mesh = pyrender.Mesh.from_trimesh(mesh) to mesh = pyrender.Mesh.from_trimesh(mesh, smooth = False)

and it seems to work.