fraunhoferhhi / gaussian_gan_decoder

Official implementation for: https://arxiv.org/abs/2404.10625
https://florian-barthel.github.io/gaussian_decoder/index.html
43 stars 1 forks source link

AttributeError: 'SequentialDecoderReverse' object has no attribute 'triplane_sr' #7

Closed yangqinhui0423 closed 3 days ago

yangqinhui0423 commented 2 months ago

When running the training command "python train_pano2gaussian_decoder.py", I get callback as follows: (gs-decoder) D:\cici\gaussian_gan_decoder\main>python train_pano2gaussian_decoder.py wandb: Currently logged in as: 624280889 (nanjing-university-3dv). Use wandb login --relogin to force relogin wandb: wandb version 0.16.6 is available! To upgrade, please run: wandb: $ pip install wandb --upgrade wandb: Tracking run with wandb version 0.16.5 wandb: Run data is saved locally in ./results/pano2gaussian/runtest_8\wandb\run-20240504_104549-0u9zluac wandb: Run wandb offline to turn off syncing. wandb: Syncing run test_8 wandb: View project at https://wandb.ai/nanjing-university-3dv/GaussianHeadDecoder wandb: View run at https://wandb.ai/nanjing-university-3dv/GaussianHeadDecoder/runs/0u9zluac/workspace Loading networks from "../PanoHead/models/easy-khair-180-gpc0.8-trans10-025000.pkl"... Reloading Modules! 0%| | 0/100001 [00:00<?, ?it/s]Setting up PyTorch plugin "bias_act_plugin"... D:\anaconda3\envs\gs-decoder\lib\site-packages\torch\utils\cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST']. warnings.warn( Done. Setting up PyTorch plugin "upfirdn2d_plugin"... Done. 0%| | 0/100001 [00:02<?, ?it/s] Traceback (most recent call last): File "D:\cici\gaussian_gan_decoder\main\train_pano2gaussian_decoder.py", line 322, in main() File "D:\anaconda3\envs\gs-decoder\lib\site-packages\click\core.py", line 1157, in call return self.main(args, kwargs) File "D:\anaconda3\envs\gs-decoder\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "D:\anaconda3\envs\gs-decoder\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "D:\anaconda3\envs\gs-decoder\lib\site-packages\click\core.py", line 783, in invoke return __callback(args, kwargs) File "D:\cici\gaussian_gan_decoder\main\train_pano2gaussian_decoder.py", line 219, in main decoded_attributes = decoder(result.z, result.gan_camera_params, result.vertices, File "D:\anaconda3\envs\gs-decoder\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "D:\anaconda3\envs\gs-decoder\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(args, kwargs) File "D:\cici\gaussian_gan_decoder\main..\main\decoder_models\sequential_decoder_reverse.py", line 58, in forward if self.triplane_sr != "None": File "D:\anaconda3\envs\gs-decoder\lib\site-packages\torch\nn\modules\module.py", line 1709, in getattr raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'") AttributeError: 'SequentialDecoderReverse' object has no attribute 'triplane_sr'

I check the sequential_decoder_reverse.py and find that the "SequentialDecoderReverse" class does not have the triplane_sr attribute, whereas in forward function, self.triplane_sr is used image

I wonder how to solve it. Can you give me some suggestions?

Florian-Barthel commented 1 month ago

Hi, I was removing this part, however, missed this line. For now, simply comment out this if condition. I will push a solution soon.

yangqinhui0423 commented 1 month ago

Hi, I was removing this part, however, missed this line. For now, simply comment out this if condition. I will push a solution soon.

Thanks for your answer! By the way, I wonder know the dimensions of the triplane features in your work, could you tell me?

May be 32 here in the code? image

And I notice that you omit the estimation of view-dependent SH coefficients, have you trained with considering SH? Does it take a lot of training time or result in poor training results?

Florian-Barthel commented 1 month ago

Yes exactly, the 32 denotes the dimensionality of the tri-plane features. The tri-plane is constructed of 3 planes with a shape of 32x256x256 each. When sampling a point, the sum of all three tri-plane values is calculated and forwarded to the decoder.

The position_dim is 3 in most cases. This is just the xyz dimension. And the +3 +4 + 8 +11 are accumulated dimensions of the prior decoders. For instance, the opacity decoder receives the 3 out_features from the color_decoder