Closed EmbeddedAndMore closed 3 years ago
Hello,
The path in the config file is only for the pretrained DeepLabV3 model, and not the full CaDDN model. Please revert that change in order to get rid of this error. I recommend to leave this config as is.
If you would like to run the pretrained CaDDN model, please specify the path to caddn.pth
via the command line: I also recommend to run all commands while inside the tools
directory
cd tools
python test.py --cfg_file cfgs/kitti_models/CaDDN.yaml --ckpt caddn.pth
Closing due to inactivity
Hello, I have the same problem, run the command exactly as you indicated.
I still get this error.
Traceback (most recent call last): File "test.py", line 199, in <module> main() File "test.py", line 190, in main model = build_network(model_cfg=cfg.MODEL, num_class=len(cfg.CLASS_NAMES), dataset=test_set) File "/content/drive/MyDrive/CaDDN/pcdet/models/__init__.py", line 15, in build_network model_cfg=model_cfg, num_class=num_class, dataset=dataset File "/content/drive/MyDrive/CaDDN/pcdet/models/detectors/__init__.py", line 24, in build_detector model_cfg=model_cfg, num_class=num_class, dataset=dataset File "/content/drive/MyDrive/CaDDN/pcdet/models/detectors/caddn.py", line 7, in __init__ self.module_list = self.build_networks() File "/content/drive/MyDrive/CaDDN/pcdet/models/detectors/detector3d_template.py", line 51, in build_networks model_info_dict=model_info_dict File "/content/drive/MyDrive/CaDDN/pcdet/models/detectors/detector3d_template.py", line 76, in build_ffe downsample_factor=model_info_dict["downsample_factor"] File "/content/drive/MyDrive/CaDDN/pcdet/models/backbones_3d/ffe/depth_ffe.py", line 28, in __init__ **ddn_cfg.ARGS File "/content/drive/MyDrive/CaDDN/pcdet/models/backbones_3d/ffe/ddn/ddn_deeplabv3.py", line 21, in __init__ super().__init__(constructor=constructor, **kwargs) File "/content/drive/MyDrive/CaDDN/pcdet/models/backbones_3d/ffe/ddn/ddn_template.py", line 34, in __init__ self.model = self.get_model(constructor=constructor) File "/content/drive/MyDrive/CaDDN/pcdet/models/backbones_3d/ffe/ddn/ddn_template.py", line 60, in get_model pretrained_dict = torch.load(self.pretrained_path) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 525, in load with _open_file_like(f, 'rb') as opened_file: File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 212, in _open_file_like return _open_file(name_or_buffer, mode) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 193, in __init__ super(_open_file, self).__init__(open(name, mode)) FileNotFoundError: [Errno 2] No such file or directory: '../checkpoints/deeplabv3_resnet101_coco-586e9e4e.pth'
Should I just add this checkpoint in order to make it work even though I will not use it?
~Hi @octavianplesea. I also had this issue. Did you get it to work in the end?~
Edit: set pretrained_path
to ~
(which means None in YAML) in the config file and also provide --ckpt
in the command line works.
Correction: don't change pretrained_path
. It turns out that the pre-trained model is still required (for some unknown reason) to get the correct output. The pre-trained model can be downloaded here.
hi @m-Just . In the end I made it work exactly as you've done. You must respect the whole structure of the files even though normally they wouldn't be needed. I would have one question for you also. In the end, you end up getting a file "result.pkl". What did you do with it in order to see the results?
@octavianplesea, I used pickle.load
to see the results in "result.pkl".
i am getting the following error by running this command:
python ./tools/test.py --cfg_file ./tools/cfgs/kitti_models/CaDDN.yaml --launcher pytorch --eval_all
error:
to be more precise: i downloaded the cadnn.pth from the link in README.md and set the path in the config file. also
pretrained_dict
only contains:pretrained_dict : dict_keys(['epoch', 'it', 'model_state', 'optimizer_state', 'version'])
installation is based on what you mentioned in INSTALL.md