Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error occurred #8

Open
ForrestPi opened this issue Apr 2, 2024 · 13 comments
Open

error occurred #8

ForrestPi opened this issue Apr 2, 2024 · 13 comments

Comments

@ForrestPi
Copy link

ForrestPi commented Apr 2, 2024

when run
python train_gaussianhead.py --config config/train_gaussianhead_N031.yaml
error blow

raceback (most recent call last):
  File "train_gaussianhead.py", line 89, in <module>
    trainer.train(0, 1000)
  File "/data0/XXX/avatar/Gaussian-Head-Avatar/lib/trainer/GaussianHeadTrainer.py", line 57, in train
    supres_images = self.supres(cropped_render_images)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data0/XXX/avatar/Gaussian-Head-Avatar/lib/module/SuperResolutionModule.py", line 14, in forward
    output = self.upsampler(input)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data0/XXX/avatar/Gaussian-Head-Avatar/lib/network/Upsampler.py", line 81, in forward
    x = self.inc(x)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/data0/XXX/avatar/Gaussian-Head-Avatar/lib/network/Upsampler.py", line 23, in forward
    return self.double_conv(x)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/container.py", line 141, in forward
    input = module(input)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 447, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/home/XXX/anaconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 443, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [128, 32, 3, 3], expected input[1, 3, 512, 512] to have 32 channels, but got 3 channels instead
@ForrestPi ForrestPi changed the title error ocurred error occurred Apr 2, 2024
@YuelangX
Copy link
Owner

YuelangX commented Apr 2, 2024

Please confirm that the output dimension of the color MLPs are equal to the input dimension of the super resolution network. You can modify it in the config file.

@ForrestPi
Copy link
Author

@YuelangX
when run
python train_gaussianhead.py --config config/train_gaussianhead_N031.yaml
error above

@INERTIA2001
Copy link

Hello, I have the same problem with the code. Below is the configurations used, however the error stays the same. note that all the color MLPs is set to output 32 channel tensor, however after rendering, it outputs a 3 channel tensor.

image

Also how do I view it using SIBR viewers? since the output is a RGB image. Thank you in advanced!

@SQYmu
Copy link

SQYmu commented Apr 10, 2024

same problem

@SQYmu
Copy link

SQYmu commented Apr 10, 2024

image
the color_precomp is a 32 channel tensor, but render_images_b is a 3 channel tensor

@INERTIA2001
Copy link

Yes I also notice that, due to Gaussian rasterization, the output have 3 channels.

But after trying out different configuration, we can make it work by reducing the color MLP output to have 3 dims and the supres module to have 3 dims input.

However this deviates from the original paper where they mentioned about rendering a 32 channel image.

So I kind of dont know what to do here

@YuelangX
Copy link
Owner

@INERTIA2001 @SQYmu Do you modify "NUM_CHANNELS 3" to "NUM_CHANNELS 32" in "diff-gaussian-rasterization/cuda_rasterizer/config.h"?

@SQYmu
Copy link

SQYmu commented Apr 10, 2024

@YuelangX It works, and diff_gaussian_rasterization need to reinstall because I have installed it before

@INERTIA2001
Copy link

it also works for me thanks a lot!

@INERTIA2001
Copy link

any luck visualizing gaussian using SIBR? @SQYmu

@wuxianjia1996
Copy link

@YuelangX when run python train_gaussianhead.py --config config/train_gaussianhead_N031.yaml error above

I got the same error. How did you solve it ?

@zhaowangke
Copy link

zhaowangke commented Apr 22, 2024

It is necessary to delete Gaussian_splatting, then pull it again, and modify /submodules/diff-Gaussian-reconstruction/cuda_rasterizer/config. h NUM-CHANNELS 32. It only works with pip uninstall diff-gaussian-rasterization then install again, It cannot be solved.

@huahangc
Copy link

And if it do not work, please delete the submodules/diff_gaussian_rasterization/build/ and submodules/diff_gaussian_rasterization/diff_gaussian_rasterization.egg-info directories and modify the NUM_CHANNEL 3 to NUM_CHANNEL 32 then use pip to install it once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants