ethnhe / PVN3D

Code for "PVN3D: A Deep Point-wise 3D Keypoints Hough Voting Network for 6DoF Pose Estimation", CVPR 2020
MIT License
482 stars 105 forks source link

TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'NoneType'> #95

Open hark001 opened 2 years ago

hark001 commented 2 years ago

Hello everyone,

I'm trying to evaluate using the available trained model (LINEMOD dataset) on pyTorch 1.5 . I have downloaded the datasets from deep fusion and linked the datasets to pvn3d/datasets/linemod/Linemod_preprocessed . I have followed the necessary steps for inferencing. While executing, I got this error from yaml.load requesting for another argument. I'm able to overcome the error by using yaml.safe_load.

Now I'm struck at another error which I'm not able to resolve. Any help is much appreciated. Thank you.

loading pretrained mdl. ==> Loading from checkpoint 'train_log/linemod/checkpoints/ape/ape_pvn3d_best.pth.tar' ==> Done test_loader size: 1050 Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/harish/harish/PVN3D/pvn3d/demo.py", line 190, in main() File "/home/harish/harish/PVN3D/pvn3d/demo.py", line 183, in main for i, data in tqdm.tqdm( File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/tqdm/std.py", line 1180, in iter for obj in iterable: File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 345, in next data = self._next_data() File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 856, in _next_data return self._process_data(data) File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 881, in _process_data data.reraise() File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/torch/_utils.py", line 395, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop data = fetcher.fetch(index) File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/home/harish/.virtualenvs/pvn3d/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 81, in default_collate raise TypeError(default_collate_err_msg_format.format(elem_type)) TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'NoneType'>