SamsungLabs / tr3d

[ICIP2023] TR3D: Towards Real-Time Indoor 3D Object Detection
Other
154 stars 10 forks source link

how to resolve #23

Open ToTensor opened 9 months ago

ToTensor commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

(9,9)

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

filaPro commented 9 months ago

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

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

ToTensor commented 9 months ago

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 commented 9 months ago

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

ToTensor commented 9 months ago

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 commented 9 months ago

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

ToTensor commented 9 months ago

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

filaPro commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 5 months ago

。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?