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

Shape mismatch error on 360 scenes other than garden #1

Closed
vaibhavnayel opened this issue Jun 23, 2023 · 3 comments
Closed

Shape mismatch error on 360 scenes other than garden #1

vaibhavnayel opened this issue Jun 23, 2023 · 3 comments

Comments

@vaibhavnayel
Copy link
Contributor

Hello and thank you for this elegant implementation! The code is very readable and I look forward to seeing more commits.

I tried to run the code on some mipnerf360 datasets other than garden but I get a shape mismatch error in the photometric loss calculation. I have verified the bug on the bonsai and kitchen scenes.

$ python train.py --data bonsai
100%|█████████████████████████████████████████████████████████████████████████████| 292/292 [00:03<00:00, 96.17it/s]
100%|█████████████████████████████████████████████████████████████████████████████| 206613/206613 [00:43<00:00, 4710.91it/s]
805.6752699398112
805.6752699398112
  0%|                                                                                                                                                                                | 0/7001 [00:00<?, ?it/s]{'     culling tiles': 0.0019258240461349488,
 '     gather culled tiles': 0.0009233599901199341,
 '     rendering': 0.01425823974609375,
 '     sorting': 0.0008818240165710449,
 '    set camera': 0.00043235200457274913,
 '    set image': 0.00015588800236582755,
 '    write out': 1.4720000326633453e-05,
 ' frustum cuda': 0.0016573439836502074,
 'crop': 0.00014073599874973297,
 'forward': 0.021217279434204102,
 'frustum culling': 0.0017174719572067261,
 'render function': 0.018458879470825196,
 'set camera': 0.0007449600100517273}
  0%|                                                                                                                                                                                | 0/7001 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "3d-gaussian-splatting/train.py", line 385, in <module>
    trainer.train()
  File "3d-gaussian-splatting/train.py", line 190, in train
    output = self.train_step(i_iter, bar)
  File "3d-gaussian-splatting/train.py", line 92, in train_step
    l1_loss = ((rendered_img - self.gaussian_splatter.ground_truth).abs()).mean()
RuntimeError: The size of tensor a (519) must match the size of tensor b (520) at non-singleton dimension 0

It seems like the error is related to cropping the padded render in splatter.py. I will try to debug and submit a fix soon.

Thanks again for the great project.

@WangFeng18
Copy link
Owner

Thank you for your modification, it is indeed a good point to initialize the tile info from the ground truth images.

@vaibhavnayel
Copy link
Contributor Author

Glad to help. Are there plans to add a license to the repository?

@WangFeng18
Copy link
Owner

WangFeng18 commented Jun 25, 2023

Yes, MIT license is applied now.

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

2 participants