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

how to resolve #23

Open
ToTensor opened this issue Feb 27, 2024 · 13 comments
Open

how to resolve #23

ToTensor opened this issue Feb 27, 2024 · 13 comments

Comments

@ToTensor
Copy link

Traceback (most recent call last):
File "tools/train.py", line 263, in
main()
File "tools/train.py", line 259, in main
meta=meta)
File "/home/ly/tr3d-main/mmdet3d/apis/train.py", line 351, in train_model
meta=meta)
File "/home/ly/tr3d-main/mmdet3d/apis/train.py", line 319, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 49, in train
for i, data_batch in enumerate(self.data_loader):
File "/home/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/ly/anaconda3/envs/tr3d-main/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/ly/anaconda3/envs/tr3d-main/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/ly/anaconda3/envs/tr3d-main/lib/python3.7/site-packages/mmdet/datasets/dataset_wrappers.py", line 178, in getitem
return self.dataset[idx % self._ori_len]
File "/home/ly/tr3d-main/mmdet3d/datasets/custom_3d.py", line 435, in getitem
data = self.prepare_train_data(idx)
File "/home/ly/tr3d-main/mmdet3d/datasets/custom_3d.py", line 225, in prepare_train_data
input_dict = self.get_data_info(index)
File "/home/ly/tr3d-main/mmdet3d/datasets/sunrgbd_dataset.py", line 112, in get_data_info
depth2img = calib['K'] @ rt_mat
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 3 is different from 9)

@filaPro
Copy link
Contributor

filaPro commented Feb 27, 2024

Can you print the shapes of calib['K'] and rt_mat? I think they both should be (3, 3), as we save them here.

@filaPro
Copy link
Contributor

filaPro commented Feb 28, 2024

Why do I fail to scan the scan dataset when running Python batchreload_scannet_data.py

can you please share the full error log?

@ToTensor
Copy link
Author

(9,9)

I have not solved this problem at present, and the shape of both of them is 9

@filaPro
Copy link
Contributor

filaPro commented Feb 28, 2024

may you try to reshape 9 to (3, 3)?

btw did you run this script? are both matrices (3, 3) after it?

@ToTensor
Copy link
Author

python batch_load_scannet_data.py
--------------------begin
2024-02-29 19:04:14.024408
scene0000_00
Failed export scan: scene0000_00
--------------------done
--------------------begin
2024-02-29 19:04:14.831180
scene0000_01
Failed export scan: scene0000_01
--------------------done
This error occurred when I was processing the scannetv2 dataset

@filaPro
Copy link
Contributor

filaPro commented Feb 29, 2024

Looks like the real error is hidden by this exception. Can you please share the error trace at this line?

@ToTensor
Copy link
Author

FileNotFoundError: [Errno 2] No such file or directory: 'scans/scene0000_00/scene0000_00.txt'
` # try:
export_one_scan(scan_name, output_filename_prefix, max_num_point,
label_map_file, scannet_dir, test_mode)

    #except Exception:
        #print(f'Failed export scan: {scan_name}')
    print('-' * 20 + 'done')`

When I remove the thrown exception

@filaPro
Copy link
Contributor

filaPro commented Feb 29, 2024

Have you downloaded the scannet dataset and put it to this scans/ directory? The first item in the instruction here.

@ToTensor
Copy link
Author

。thanks!The problem has been solved, btw. May I ask how to display the correct boxes in the visualization of the obj file

@filaPro
Copy link
Contributor

filaPro commented Feb 29, 2024

We save both gt and predictied boxes for visualization with this function. Resulting .obj files can be opened with the meshlab together with point cloud .obj file.

@ToTensor
Copy link
Author

ToTensor commented Mar 1, 2024

Why the gt visualized by the sunrgbd data set is slanted and does not completely wrap the real object. And pred.obj visualizes a lot of boxes, how can I show the box that is closest to gt?
gt
pred

@filaPro
Copy link
Contributor

filaPro commented Mar 1, 2024

To reduce the number of predicted boxes please follow our advice about score_thr in the readme.

Gt boxes looks pretty much fine. May be you can try it on scene 000967 from SUN RGB-D, to be sure that it is the similar with gt visualization in our paper.

@JiaQuan1203
Copy link

。thanks!The problem has been solved, btw. May I ask how to display the correct boxes in the visualization of the obj file

I am experiencing the same issue. How did you resolve it?

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

3 participants