HLinChen / VCR-GauS

[NeurIPS 2024] VCR-GauS: View Consistent Depth-Normal Regularizer for Gaussian Surface Reconstruction
https://hlinchen.github.io/projects/VCR-GauS/
Other
123 stars 4 forks source link

train error on custom dataset (about trans) #2

Closed firecc408 closed 1 month ago

firecc408 commented 1 month ago

Thank you for excellent work, yesterday i encounter some error when training on my custom dataset(outdoor scene), here is the error log:

File "/data/XXX/VCR-GauS-main/tools/camera_utils.py", line 320, in bb_camera up_axis, up_sign = find_axis(trans[:3, :3], axis_name='up') IndexError: too many indices for tensor of dimension 1 Training progress: 2%|█▎ | 590/30000 [01:14<1:01:43]

From the metajson file, generated by the 'bound-by_points (points3D)' function in 'convert_data_to_json.py', 'trans' stores the mean of the point cloud's xyz coordinates, it's a 1*3 vector i think, so use 'trans[:3,:3]' may cause the error above, is this an error in the reference in the find_axis() function, or just my data processing didn't work well, hoping for your kind reply.

And congratulations for acception!

HLinChen commented 1 month ago

I haven't tested on the custom dataset. This will be done in the future. I have fixed this bug and pushed an update to solve the problem. Please run git pull to get the latest version.

zhouilu commented 1 month ago

I haven't tested on the custom dataset. This will be done in the future. I have fixed this bug and pushed an update to solve the problem. Please run git pull to get the latest version.

error still exists after git pull. here is log:

Traceback (most recent call last):
  File "/mnt/xx/VCR-GauS/train.py", line 41, in <module>
    main()
  File "/mnt/xx/VCR-GauS/train.py", line 34, in main
    trainer.train()
  File "/mnt/xx/VCR-GauS/trainer.py", line 208, in train
    output = self.train_step(mode='train')
  File "/mnt/xx/VCR-GauS/trainer.py", line 363, in train_step
    visi = self.get_visi_mask_acc(self.cfg.optim.densify_large.sample_cams.num,
  File "/mnt/xx/conda/gs/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/mnt/xx/VCR-GauS/trainer.py", line 691, in get_visi_mask_acc
    viewpoint_stack = self.sample_cameras(n, up, around, sample_mode=sample_mode)
  File "/mnt/xx/VCR-GauS/trainer.py", line 623, in sample_cameras
    w2cs = bb_camera(n, self.model.trans, self.model.scale, cam_height, up=up, around=around, \
  File "/mnt/xx/VCR-GauS/tools/camera_utils.py", line 332, in bb_camera
    h = scale[up_axis]
IndexError: too many indices for tensor of dimension 0
HLinChen commented 1 month ago

Can you check the shape of scale?

zhouilu commented 1 month ago

Can you check the shape of scale?

scale shape is torch.Size([])

HLinChen commented 1 month ago

Have fixed