zeng-yifei / STAG4D

Official Implementation for STAG4D: Spatial-Temporal Anchored Generative 4D Gaussians
139 stars 6 forks source link

Freeze Dependencies pls #7

Closed MultiTrickFox closed 4 months ago

MultiTrickFox commented 4 months ago

Hi, I'm testing out the Minion dataset with your exemplary code block. However, some dependencies have changed since you pushed the code;

Also here is another error where I'm stuck;

[INFO] loaded zero123!
  0% 0/8001 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/content/STAG4D/main.py", line 1013, in <module>
    gui.train(opt.save_step+1)
  File "/content/STAG4D/main.py", line 985, in train
    self.train_step()
  File "/content/STAG4D/main.py", line 281, in train_step
    out = self.renderer.render(cur_cam,stage=self.stage)
  File "/content/STAG4D/gs_renderer_4d.py", line 888, in render
    rendered_image, rendered_depth, rendered_alpha, radii = rasterizer(
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
TypeError: GaussianRasterizer.forward() got an unexpected keyword argument 'cov3D_precomp'
rwn17 commented 4 months ago

That's because diff-gaussian-rasterization changes the api, you can change it according to https://github.com/slothfulxtx/diff-gaussian-rasterization.

MultiTrickFox commented 4 months ago

Alright! I'm glad they changed cov3D_precomp into cov3Ds_precomp. The latter one is now so much more beautiful..

I modified gs_renderer_4d at 888 to following:

rendered_image, rendered_depth, rendered_norm, rendered_alpha, radii, extra = rasterizer(
        means3D = means3D_final,
        means2D = means2D,
        opacities = opacity_final,
        shs = shs,
        colors_precomp = colors_precomp,
        scales = scales_final,
        rotations = rotations_final,
        cov3Ds_precomp = cov3D_precomp,
        )