graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
14.63k stars 1.92k forks source link

RuntimeError: Given groups=3, weight of size [3, 1, 11, 11], expected input[1, 1, 1200, 1920] to have 3 channels, but got 1 channels instead #733

Closed jiangyijin closed 7 months ago

jiangyijin commented 7 months ago

(gaussian_splatting) D:\3dgs\gaosi\gaussian-splatting> python train.py -s D:\shirtv1_colmap\roe1\light -m D:\shirtv1_colmap\roe1\light\3dgs_result -r 1 Optimizing D:\shirtv1_colmap\roe1\light\3dgs_result <arguments.GroupParams object at 0x00000159CFEA7AC8> <arguments.GroupParams object at 0x00000159CFFAD5C8> <arguments.GroupParams object at 0x00000159C8EF6788> [7000, 30000] [7000, 30000, 30000] [] None -1 [31/03 18:52:43] Output folder: D:\shirtv1_colmap\roe1\light\3dgs_result [31/03 18:52:43] Tensorboard not available: not logging progress [31/03 18:52:43] Reading camera 1716/1716 [31/03 18:52:46] Loading Training Cameras [31/03 18:52:46] Loading Test Cameras [31/03 18:53:37] Number of points at initialisation : 185 [31/03 18:53:37] Training progress: 0%| | 0/30000 [00:00<?, ?it/s]Traceback (most recent call last): File "train.py", line 221, 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) File "train.py", line 93, in training loss = (1.0 - opt.lambda_dssim) Ll1 + opt.lambda_dssim (1.0 - ssim(image, gt_image)) File "D:\3dgs\gaosi\gaussian-splatting\utils\loss_utils.py", line 41, in ssim return _ssim(img1, img2, window, window_size, channel, size_average) File "D:\3dgs\gaosi\gaussian-splatting\utils\loss_utils.py", line 45, in _ssim mu2 = F.conv2d(img2, window, padding=window_size // 2, groups=channel) RuntimeError: Given groups=3, weight of size [3, 1, 11, 11], expected input[1, 1, 1200, 1920] to have 3 channels, but got 1 channels instead Training progress: 0%| | 0/30000 [00:00<?, ?it/s] I'm not sure why this issue occurred. I used over 2,000 images for the reconstruction.

jaco001 commented 7 months ago

-r parameter is strange. Try remove -r 1 (your data set is very big) or set it like -r 1920 (if you have enough VRAM :)

Difference in 1600 vs 1920 is not worth to do IMHO. I tried 2400 on my very small datasets and the differences were virtually invisible and I spend a lot time for doing this. So...

jiangyijin commented 7 months ago

-r parameter is strange. -r 参数很奇怪。 Try remove -r 1 (your data set is very big) or set it like -r 1920 (if you have enough VRAM :)尝试删除 -r 1(您的数据集非常大)或将其设置为 -r 1920(如果您有足够的 VRAM:)

Difference in 1600 vs 1920 is not worth to do IMHO. I tried 2400 on my very small datasets and the differences were virtually invisible and I spend a lot time for doing this. So...恕我直言,1600 年与 1920 年的差异不值得这样做。我在非常小的数据集上尝试了 2400,差异几乎是看不见的,我花了很多时间来做这件事。所以。。。

Thank you very much for your response; I have successfully resolved the issue.

anja-sheppard commented 1 month ago

How did you solve this? @jiangyijin