YuelangX / Gaussian-Head-Avatar

[CVPR 2024] Official repository for "Gaussian Head Avatar: Ultra High-fidelity Head Avatar via Dynamic Gaussians"
Other
757 stars 47 forks source link

can't get verts, features and faces list from marching_tetrahedra function on own data #23

Open zxy0304 opened 5 months ago

zxy0304 commented 5 months ago

hi yuelang! I tried on my own data, followed the instruction in 3DMM and seccussfully fitted the model. But when process the training process, This line returned none.

verts_list, features_list, faces_list = marching_tetrahedra(verts_deformed, features, self.tets, sdf)

More specifically, inside of this function, all the vertices seems to fail the occupancy sum test, occ_sum is None.

occ_n = sdf > 0
occ_fx4 = occ_n[tets.reshape(-1)].reshape(-1, 4)
occ_sum = torch.sum(occ_fx4, -1)
valid_tets = (occ_sum > 0) & (occ_sum < 4)
occ_sum = occ_sum[valid_tets]

edit: The sdf valuefrom self.geometry(geo_input) are all greater than 0

Have you also encountered this problem by any chance or do you have any thoughts and comments about how to fix it? I don't think this is a problem from 3dmm fitthing by the way, because the visualize result looks correct to me.

image_0231

thx a lot!

YuelangX commented 5 months ago

Did you initialize the neutral mesh as a sphere? When did this problem occur? And visualization results?

zxy0304 commented 5 months ago

Did you initialize the neutral mesh as a sphere? When did this problem occur? And visualization results?

Yes, I initialized it as a sphere. I encountered the problem when training the first state, in file dmtet_utils.py, line 51. Occ_sum is a Nonetype, since all sdf value > 0. I tried to substract 0.5 for each sdf value since maybe sdf=0.5 is the boundary(? After this modification the code can run now, but I don't think it is the right way to fix it:(

I didn't have any visualize result for training this gaussian head avatar yet, and i have attached the visualization for 3DMM model as above.

zxy0304 commented 5 months ago

Hi yuelang, thank you for answering! I can train meshhead now by manually subtract 0.5 for each sdf value, and here is the visualization. However, I encountered another problem when train gaussian head: all visualization images are offsets from the original. Do you know what's the reason? Are there something wrong with the extrinsic parameters of camera? Thank u so much for your help! 007600 000300

YuelangX commented 5 months ago

When reading the data in Dataset, I crop the image and modify the intrinsic in function "CropImage". In addition, I also crop images in GaussianHeadTrainer. You can check whether it is caused by these two parts.