philgras / neural-head-avatars

Official PyTorch implementation of "Neural Head Avatars from Monocular RGB Videos"
544 stars 74 forks source link

How to save obj? #32

Open qiuyuzhao opened 2 years ago

qiuyuzhao commented 2 years ago

from synthesize_novel_poses_and_expressions get rgba and shaded_mesh and see the image. but how to convert to obj?

rgba, shaded_mesh = synthesize_novel_poses_and_expressions(expr=expr, pose=pose, image_size=(512, 512)) verts, faces, normals, values = marching_cubes(rgba[0, :3].detach().cpu().permute(1, 2, 0).numpy()) save_obj("rgb.obj",torch.tensor(verts.copy()), torch.tensor(faces.copy()))

I convert this way, but the result is not right

yangqing-yq commented 1 year ago

@qiuyuzhao have you figured that out?