mileyan / pseudo-LiDAR_e2e

pseudo-LiDAR_e2e
MIT License
187 stars 37 forks source link

KeyError: 'depth_state_dict' when trying to run PIXOR #8

Closed moragab1993 closed 4 years ago

moragab1993 commented 4 years ago

hello

i downloaded both the pixor_checkpoint.pth.tar and depth_checkpoint.pth.tar and followed the documentation in PIXOR folder

when i runt this evaluation lik this :

CUDA_VISIBLE_DEVICES=0 python3 train_pixor_e2e.py -c configs/fusion.cfg --mode eval --eval_ckpt pixor_checkpoint.pth.tar

i get the following error:

[20-08-27 08:47:40 pixor_e2e] => Evaluation mode
[20-08-27 08:47:44 pixor_e2e] Finish cuda loading in 2.870 s
[20-08-27 08:47:45 pixor_e2e] => loading checkpoint 'pixor_checkpoint.pth.tar'
Traceback (most recent call last):
  File "train_pixor_e2e.py", line 823, in <module>
    depth_model.load_state_dict(checkpoint['depth_state_dict'])
KeyError: 'depth_state_dict'

i added the pre-trained depth model to the run command :

CUDA_VISIBLE_DEVICES=0 python3 train_pixor_e2e.py -c configs/fusion.cfg --mode eval --eval_ckpt pixor_checkpoint.pth.tar --depth_pretrain depth_checkpoint.pth.tar

i still get the same error

i check the keys inside each wight file

for pixor_checkpoint.pth.tar : dict_keys(['state_dict', 'optimizer', 'scheduler', 'epoch'])

for depth_checkpoint.pth.tar

dict_keys(['epoch', 'arch', 'state_dict', 'best_RMSE', 'scheduler', 'optimizer'])

none of them have the 'depth_state_dict' key

rui1996 commented 4 years ago

Hi I think for the pretrained models, they are provided for end-to-end training, and the checkpoint generated during the training would have the key of 'depth_state_dict'. But if you just want to test the pretrained models, would you mind just trying the 'state_dict' key in depth_checkpoint.pth.tar?