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

Mismatch in shape when running the demo #149

Open
WEIJIARONG99 opened this issue Jun 23, 2022 · 4 comments
Open

Mismatch in shape when running the demo #149

WEIJIARONG99 opened this issue Jun 23, 2022 · 4 comments

Comments

@WEIJIARONG99
Copy link

python demo_folder.py --demo-folder model_load_dir --save-folder results
demo_folder.py --demo-folder model_load_dir --save-folder results
Namespace(config_path='config/semantickitti.yaml', demo_folder='model_load_dir', demo_label_folder='', save_folder='results')
[480 360 32]
matched parameter sets: 226, and no matched: 48
Traceback (most recent call last):
File "demo_folder.py", line 151, in
main(args)
File "demo_folder.py", line 103, in main
demo_dataset_loader):
File "/home/weijiarong/anaconda3/envs/master_thesis/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 530, in next
data = self._next_data()
File "/home/weijiarong/anaconda3/envs/master_thesis/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1224, in _next_data
return self._process_data(data)
File "/home/weijiarong/anaconda3/envs/master_thesis/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1250, in _process_data
data.reraise()
File "/home/weijiarong/anaconda3/envs/master_thesis/lib/python3.7/site-packages/torch/_utils.py", line 457, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/weijiarong/anaconda3/envs/master_thesis/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/weijiarong/anaconda3/envs/master_thesis/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/weijiarong/anaconda3/envs/master_thesis/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/weijiarong/Desktop/Cylinder3D/dataloader/dataset_semantickitti.py", line 192, in getitem
data = self.point_cloud_dataset[index]
File "/home/weijiarong/Desktop/Cylinder3D/dataloader/pc_dataset.py", line 50, in getitem
raw_data = np.fromfile(self.im_idx[index], dtype=np.float32).reshape((-1, 4))
ValueError: cannot reshape array of size 55885386 into shape (4)

Anyone met the similar error?

@ZixuanChen613
Copy link

I met the same error... waiting for an answer

ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/envs/4dplsca/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/envs/4dplsca/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/envs/4dplsca/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/workspace/code/Cylinder3D/dataloader/dataset_semantickitti.py", line 192, in getitem
data = self.point_cloud_dataset[index]
File "/workspace/code/Cylinder3D/dataloader/pc_dataset.py", line 52, in getitem
raw_data = np.fromfile(self.im_idx[index], dtype=np.float32).reshape((-1, 4))
ValueError: cannot reshape array of size 293 into shape (4)

@WEIJIARONG99
Copy link
Author

WEIJIARONG99 commented Jun 24, 2022 via email

@ZhouYC-X
Copy link

ZhouYC-X commented Nov 7, 2022

I encountered similar problem and solved it by "python demo_folder.py --demo-folder /mnt/data/datasets/kitti/sequences/00/velodyne/ --save-folder ./results/". Good luck.

@christophTUM
Copy link

Does anyone else still has this problem?

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

4 participants