fudan-zvg / 4d-gaussian-splatting

[ICLR 2024] Real-time Photorealistic Dynamic Scene Representation and Rendering with 4D Gaussian Splatting
MIT License
587 stars 42 forks source link

How to Visualize or test the training results? #12

Closed ch1998 closed 8 months ago

ch1998 commented 8 months ago

According to the guidelines you gave, I completed the data training. The psnr results during the training process were very high, but how to visualize or render the results?

Alexander0Yang commented 8 months ago

Hi @ch1998 The current code evaluates quantitative metrics on all test views and visualizes some of them in tensorboard during training. Since the checkpoint already captures all parameters of the 4D Gaussians, I believe that by applying slight adaption to the original 3DGS's render.py, it can be employed to visualize the training result within our framework.

ookey commented 8 months ago

Hi there, I just made a quick render.py adaptation for the same purpose. In case it helps I join the git patch. I launched it with:

$ python render.py --model_path output/dnerf/lego/ --loaded_pth=output/dnerf/lego/chkpnt_best.pth

render_patch.txt

Regards, Matthieu.

cmh1027 commented 8 months ago

@ookey could you share the code please?

ookey commented 8 months ago

Hi @cmh1027 You just have to:

  1. download the render_patch.txt file (see post above) at the root of the project (in 4d-gaussian-splatting folder)
  2. execute the command git apply render_patch.txt

This should add a file called render.py + change (slightly) scene/__init__.py

@Alexander0Yang tell me if you want me to issue a PR.

darthandvader commented 8 months ago

hi, I followed your instruction, but when I tried "python3 render.py --model_path output/dnerf/hellwarrior/ --loaded_pth=output/dnerf/hellwarrior/chkpnt30000.pth", it still showed command not found

ookey commented 8 months ago

"command not found"? This is probably because python3 is not known in your shell. Try python render.py --model_path output/dnerf/hellwarrior/ --loaded_pth=output/dnerf/hellwarrior/chkpnt30000.pth :-)

RNGrunshen commented 8 months ago

hi, I followed your instruction, but when I tried "python3 render.py --model_path output/dnerf/hellwarrior/ --loaded_pth=output/dnerf/hellwarrior/chkpnt30000.pth", it still showed command not found

please try the following command, we should add " " to str path

python render.py --model_path "output/dnerf/standup/" --loaded_pth="output/dnerf/standup/chkpnt_best.pth"

EarltShirt commented 6 months ago

@Alexander0Yang such a command line would be usefull in order to visualize the rendered result : ffmpeg -r 40 -f image2 -i %05d.png -c:v libx264 -pix_fmt yuv420p output_render.mp4

cdfan0627 commented 6 months ago

Hi @cmh1027 You just have to:

  1. download the render_patch.txt file (see post above) at the root of the project (in 4d-gaussian-splatting folder)
  2. execute the command git apply render_patch.txt

This should add a file called render.py + change (slightly) scene/__init__.py

@Alexander0Yang tell me if you want me to issue a PR.

Hi there, I just made a quick render.py adaptation for the same purpose. In case it helps I join the git patch. I launched it with:

$ python render.py --model_path output/dnerf/lego/ --loaded_pth=output/dnerf/lego/chkpnt_best.pth

render_patch.txt

Regards, Matthieu.

Hi It only visualize training data result. Can I visualize testing data result?

ookey commented 6 months ago

hello @cmh1027 , I'm sorry I don't have a mean to test it on this computer. Reviewing quickly the code seems to show a "test" subdirectory should be created with the test output images, if scene has a test_cameras list. You will have to dig into the code by yourself :-/ Matthieu.

caiobarrosv commented 5 months ago

Hi there, I just made a quick render.py adaptation for the same purpose. In case it helps I join the git patch. I launched it with:

$ python render.py --model_path output/dnerf/lego/ --loaded_pth=output/dnerf/lego/chkpnt_best.pth

render_patch.txt

Regards, Matthieu.

@ookey, the render.txt file seems to be incomplete.

How can I visualize the training results?

Zain-Razzaq commented 4 months ago

@ookey your script gives output in form of pictures. Cant we get the result in video form as shown in the result of github repo by author

ookey commented 4 months ago

@ookey your script gives output in form of pictures. Cant we get the result in video form as shown in the result of github repo by author

Hello @Zain-Razzaq , I'm sorry I no longer have the software installed. I guess that as simple ffmpeg command would produce a video from the images. see https://ffmpeg.org/

GuoPingPan commented 1 month ago

@ookey Hi, bro. Thank you for providing the rendering solution. Why is the rendering on RTX4090 only about 2fps? image