Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems launching kitti example #4

Open
DaddyWesker opened this issue Jul 2, 2021 · 2 comments
Open

Problems launching kitti example #4

DaddyWesker opened this issue Jul 2, 2021 · 2 comments

Comments

@DaddyWesker
Copy link

DaddyWesker commented Jul 2, 2021

Hello.

I've been trying for a while to launch your example with kitti using command
python evaluate_depth.py --data_path /home/daddywesker/datasets/kitti/ --load_weights_folder ./ --post_process --save_pred_disp --eval_mono
UNfortunately, i'm getting

`TypeError: init() got an unexpected keyword argument 'do_not_load_pretrained'

AS i see in networks/resnet_encoder there is no do_not_load_pretrained in init for this network. SO, probably, either this 'do_not_load_pretrained' was deleted in the new version or wasn't added. If i'm changing line from
encoder = networks.ResnetEncoder(cfg, maskrcnn_path, do_not_load_pretrained=True)
to encoder = networks.ResnetEncoder(cfg, maskrcnn_path)

i'm getting

Traceback (most recent call last):
  File "/home/daddywesker/TestingRGB/SimVODIS/evaluate_depth.py", line 237, in <module>
    evaluate(options.parse())
  File "/home/daddywesker/TestingRGB/SimVODIS/evaluate_depth.py", line 96, in evaluate
    encoder = networks.ResnetEncoder(cfg, maskrcnn_path)#, do_not_load_pretrained=True)
  File "/home/daddywesker/TestingRGB/SimVODIS/networks/resnet_encoder.py", line 62, in __init__
    _ = self.checkpointer.load(pretrained_model_path, convert=True)
  File "/home/daddywesker/TestingRGB/SimVODIS/maskrcnn_benchmark/utils/checkpoint.py", line 67, in load
    self._load_model(checkpoint)
  File "/home/daddywesker/TestingRGB/SimVODIS/maskrcnn_benchmark/utils/checkpoint.py", line 111, in _load_model
    load_state_dict(self.model, checkpoint.pop("model"))
  File "/home/daddywesker/TestingRGB/SimVODIS/maskrcnn_benchmark/utils/model_serialization.py", line 77, in load_state_dict
    align_and_update_state_dicts(model_state_dict, loaded_state_dict)
  File "/home/daddywesker/TestingRGB/SimVODIS/maskrcnn_benchmark/utils/model_serialization.py", line 35, in align_and_update_state_dicts
    max_match_size, idxs = match_matrix.max(1)
RuntimeError: cannot perform reduction function max on tensor with no elements because the operation does not have an identity

so, probably, there should be some replacement... Any advice?

@DaddyWesker
Copy link
Author

Well, error with cannot perform reduction function is related to line
checkpoint = self._convert_checkpoint(checkpoint_old)
in the file maskrcnn_benchmark/utils/checkpoint.py. After this operation checkpoint is empty. I've set convert to False but not sure if it is a good solution...

@DaddyWesker
Copy link
Author

With this "solution" of mine program worked till the end and gave me some info

 Mono evaluation - using median scaling
 Scaling ratios | med: 34.752 | std: 0.026

   abs_rel |   sq_rel |     rmse | rmse_log |       a1 |       a2 |       a3 | 
&   0.079  &   0.270  &   3.028  &   0.107  &   0.946  &   0.998  &   1.000  \\

-> Done!

Process finished with exit code 0

So, how to get semantic images as in here https://github.com/Uehwan/SimVODIS#qualitative-results ?

sreejithpai added a commit to sreejithpai/SimVODIS that referenced this issue Mar 7, 2022
Fix as suggested in comment Uehwan#4 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant