waczjoan / gaussian-mesh-splatting

Other
274 stars 12 forks source link

Error when perform flame rendering #6

Closed ldz666666 closed 3 months ago

ldz666666 commented 4 months ago

Hi, thanks for your great work. I train the model with the following command: python train.py --eval -s ./data/datasets/face_f1036_A -m ./output/face_f1036_A --gs_type gs_flame -w every thing went fine. However, when i perform rendering with the following command: python scripts/render.py -m ./output/face_f1036_A --gs_type gs_flame it throws out an error:

截屏2024-03-08 16 26 39

Traceback shows the error occurs in self.alpha = self.update_alpha_func(self._alpha) #? bug when self._alpha=0 where self._alpha is initalized with an empty list. So should i change self._alpha to self.alpha?

Later, i comment these lines, it can render face frames which seems normal Line 45-50, scripts/render.py

截屏2024-03-08 16 42 41
waczjoan commented 3 months ago

Thank you for reporting this issue!

I think it made me decide to add in the Tutorial section how to run the code related to the Flame Gaussian Splatting model. Which actually could not have been so trivial. Answering more personally: We have prepared a special script that renders GS using flame in order to run it you need:

scripts/render_flame.py -m output/<id_face>

add --animated flag if you would like to modify face:

scripts/render_flame.py -m output/<id_face>

In fact, if you only want to render and not animate the image, you can use render.py script but with the gs flag:

scripts/render.py -m output/face_f1036_A --gs_type gs

it's done that way because if you need to do an ordinary render -- without animation you don't really need a mesh/initial mesh, just the Gaussians information, which gets saved just like the original GS.