lkeab / gaussian-grouping

[ECCV'2024] Gaussian Grouping for open-world Anything reconstruction, segmentation and editing.
https://arxiv.org/abs/2312.00732
Apache License 2.0
500 stars 37 forks source link

Fail to train my own data #28

Open tymanab opened 3 months ago

tymanab commented 3 months ago

Hi, Thanks for sharing this great project. I want to try run this project with my own dataset, but the training phased failed when calculating object cross entropy loss. The images are prepared follow Readme.

Here is the error message I got:

Exception has occurred: RuntimeError input and target batch or spatial sizes don't match: target [1, 952, 535], input [1, 256, 952, 534] File "/home/gw/projects/gaussian-grouping/train.py", line 89, in training loss_obj = cls_criterion(logits.unsqueeze(0), gt_obj.unsqueeze(0)).squeeze().mean() File "/home/gw/projects/gaussian-grouping/train.py", line 255, in training(lp.extract(args), op.extract(args), pp.extract(args), args.test_iterations, args.save_iterations, args.checkpoint_iterations, args.start_checkpoint, args.debug_from, args.use_wandb) RuntimeError: input and target batch or spatial sizes don't match: target [1, 952, 535], input [1, 256, 952, 534]

I also tried some other datasets, and most of them share similar problems. Lerf mask all works well, but mipnerf360 data(from the original website) such as room, garden will also get stuck here. Is there any extra preparation I need to do with my own dataset?

tymanab commented 3 months ago

I think I'm kind of understanding what happens, when the image size[H/W] is odd and resolution is not 1, convert.py's resize operation gives images_x and object_mask a slightly different size compare with the original image size / resolution.

Yenhongxuan commented 3 months ago

So, how did you solve the problem?