l1346792580123 / FastHuman

[3DV 2024] FastHuman: Reconstructing High-Quality Clothed Human in Minutes.
https://l1346792580123.github.io/nccsfs/
40 stars 4 forks source link

Texture extraction #6

Closed ansj11 closed 5 months ago

ansj11 commented 5 months ago

I see that your rendered image from mesh is very realistic. So I want to know how to get the texture, can you give me your texture extraction and rendering code

l1346792580123 commented 5 months ago

You can check the rendering code in sfs_optim.py. The texture is stored as per vertex color in the saved pt file. You can construct the colored obj file like

mesh = trimesh.Trimesh(np_verts, np_faces, vertcex_color=albedo.squeeze().cpu().numpy())

or you can check this issue to construct the textured obj.

ansj11 commented 5 months ago

thank you for your quick reply! I used your rendering code but got a textured mesh with some abnormal colors. Is it normal?

https://github.com/l1346792580123/FastHuman/assets/24786133/74ec6bcb-9b7b-4a9f-9347-b237218380ba

l1346792580123 commented 5 months ago

This is because this part does not appear in the images, so the albedo of this part is not optimized. You can load all the NHR images by changing the resolution in get_nhr_data and employ sfs_optim to get the final albedo.