autonomousvision / gaussian-opacity-fields

Gaussian Opacity Fields: Efficient and Compact Surface Reconstruction in Unbounded Scenes
https://niujinshuchong.github.io/gaussian-opacity-fields/
Other
559 stars 26 forks source link

How to cull the mesh of tnt ? #37

Closed mudimingquedeyinmoujia closed 1 month ago

mudimingquedeyinmoujia commented 1 month ago

Hi, thanks for your great work. I trained the tnt datasets and successfully exported the mesh. Then I want to evaluate the F1 score, but now I was stucked in eval_tnt/cull_mesh.py; So I have 2 questions in eval_tnt/cull_mesh.py:

  1. How should I specify --traj-path ? Is it "TNT_GOF/TrainingSet/Barn/Barn_COLMAP_SfM.log" ?
  2. I am confused of the line28: mesh = trimesh.load("/home/yuzh/mnt/A3_data/sdfstudio/meshes_tnt/bakedangelo/Barn_fullres_1024.ply"), should I change it to my exported mesh ?
niujinshuchong commented 1 month ago

Hi, you can run the evaluation for TNT like here https://github.com/autonomousvision/gaussian-opacity-fields/blob/main/scripts/run_tnt.py#L39. I don't use cull_mesh for the evaluation (and indeed culling the mesh could help). The eval_tnt/cull_mesh.py is the old code we write for sdfstudio but forgot to remove it in this repo.

mudimingquedeyinmoujia commented 1 month ago

Thanks for your reply, it works! I have another question, I feel hard to view all of the exported mesh because of the large size (I tired mesh_viewer.py, meshlab, Blender), so do you have any recommendation for culling the exported mesh? Or is there any parameter to control the size of exported mesh ?

niujinshuchong commented 1 month ago

Hi, maybe you can try to use different hyperparamters for training such as use a large threshold for pruning (https://github.com/autonomousvision/gaussian-opacity-fields/blob/main/train.py#L259) or a large threshold for gaussian densification such that less gaussian is used.

Otherwise if you only want to extract the mesh for the foreground region, you can define a bbox for the object and only use the gaussian within the bbox for mesh extraction by changing the code here https://github.com/autonomousvision/gaussian-opacity-fields/blob/main/scene/gaussian_model.py#L379-L384.