hustvl / 4DGaussians

[CVPR 2024] 4D Gaussian Splatting for Real-Time Dynamic Scene Rendering
https://guanjunwu.github.io/4dgs/
Apache License 2.0
2.26k stars 189 forks source link

Fixed loading checkpoints #37

Closed itaishufaro closed 11 months ago

itaishufaro commented 1 year ago

Mistake when attempting to load a checkpoint - fixed so it will load the checkpoint correctly now (note the difference between the dict in capture and the previous restore).

guanjunwu commented 11 months ago

I've submitted the latest version, can you recheck your changes? If it works, I'll merge your PR :)

guanjunwu commented 11 months ago

Can you provide the test code? I've run with:

exp_name="dnerf"
export CUDA_VISIBLE_DEVICES=2&&python train.py -s data/dnerf/hook --port 6069 --expname "$exp_name1/hook" --configs arguments/$exp_name1/hook.py --start_checkpoint output/dnerf/hook/point_cloud/iteration_3000/deformation.pt
Traceback (most recent call last):
  File "train.py", line 409, in <module>
    training(lp.extract(args), hp.extract(args), op.extract(args), pp.extract(args), args.test_iterations, args.save_iterations, args.checkpoint_iterations, args.start_checkpoint, args.debug_from, args.expname)
  File "train.py", line 287, in training
    gaussians, scene, "coarse", tb_writer, opt.coarse_iterations,timer)
  File "train.py", line 48, in scene_reconstruction
    (model_params, first_iter) = torch.load(checkpoint)
ValueError: too many values to unpack (expected 2)
guanjunwu commented 11 months ago

Hi,I’ve fix it in the latest version, thank you very much!