Cylinder3D icon indicating copy to clipboard operation
Cylinder3D copied to clipboard

wrong predicted results when running demo_folder.py

Open GaloisWang opened this issue 2 years ago • 8 comments

Thank you for your excellent work! When I run demo_folder.py to predict my own dataset (velodyne 64E, same as semanticKITTI), I find that the semantic labels generated by the pre-trained model you provided are all 0. What is the reason? When I replaced my own data with KITTI's 18,19 sequence, I found that the predicted semantic labels were all 0. Where is the problem with this? 11

GaloisWang avatar Mar 31 '22 12:03 GaloisWang

Same for me... Waiting for an answer

Pst2000 avatar Apr 02 '22 07:04 Pst2000

Same for me... Waiting for an answer

have you solved it ?

GaloisWang avatar Apr 13 '22 02:04 GaloisWang

Same for me... Waiting for an answer

have you solved it ?

Well I have trained a new model instead of using the model provided... And when I run demo_folder.py using my model it still produced a null result. How I solved it is using my_model.load_state_dict(torch.load(xxx)) instead of using load_checkpoint(), then it works...

Do you use the same version of spconv and torch as the author? I think it may be because of the newer version changes some names of the state_dict so the old model's state_dict doesn't match the provided one. Hope it helps !

Pst2000 avatar Apr 13 '22 08:04 Pst2000

Same for me... Waiting for an answer

have you solved it ?

Well I have trained a new model instead of using the model provided... And when I run demo_folder.py using my model it still produced a null result. How I solved it is using my_model.load_state_dict(torch.load(xxx)) instead of using load_checkpoint(), then it works...

Do you use the same version of spconv and torch as the author? I think it may be because of the newer version changes some names of the state_dict so the old model's state_dict doesn't match the provided one. Hope it helps !

Could you please upload the code where you have changed? I find that the load_checkpoint() function in load_save_util.py is the same as you changed.Besides, I find that although the predicts shows all zeros my be the pointcloud is too sparse due to the author used sparconv. When I plot the label it predicted, it works and shows perfect. You can plot the plot cloud and labels to judge if the mode has correctly predicted the result.

GaloisWang avatar Apr 14 '22 03:04 GaloisWang

I had that error too, but it was resolved. The cause is that the model weights are not loaded correctly.

The solution is to replace the model_load_path: ". /model_load_dir/model_load.pt" in config/semantickitti.yaml and replace it with your model.

rdkouhei avatar May 20 '22 04:05 rdkouhei

Have anyone found any other solutions, I have wrote my own tester and the results are random because the predictions are mostly 0

RandyAndy-byte avatar Jul 27 '22 06:07 RandyAndy-byte

Same for me... Waiting for an answer

have you solved it ?

Well I have trained a new model instead of using the model provided... And when I run demo_folder.py using my model it still produced a null result. How I solved it is using my_model.load_state_dict(torch.load(xxx)) instead of using load_checkpoint(), then it works...

Do you use the same version of spconv and torch as the author? I think it may be because of the newer version changes some names of the state_dict so the old model's state_dict doesn't match the provided one. Hope it helps !

That works. Thanks!

wangsu747 avatar Mar 21 '23 06:03 wangsu747