youngLBW / HRN

[CVPR2023] A Hierarchical Representation Network for Accurate and Detailed Face Reconstruction from In-The-Wild Images.
https://younglbw.github.io/HRN-homepage/
Apache License 2.0
441 stars 38 forks source link

How to create a color face mesh obj file? #69

Open jireh-father opened 1 month ago

jireh-father commented 1 month ago

How to create a color face mesh obj file?

Even though I added a texture map like the code below, the color texture is not applied.

# in save_results of facerecon_model.py 
color_map = (self.extra_results['pred_face_high_color'].permute(0, 2, 3, 1)[0] * 255.0).detach().cpu().numpy()
color_map = color_map[..., ::-1].clip(0, 255)
dense_mesh = {
    'vertices': dense_vertices_batch[i],
    'faces': dense_faces_batch[i],
    'texture_map': color_map,

}

캡처

I want obj file like the last image of the gif below.

1_0_hrn_output