Closed holtvogt closed 1 year ago
Did you remove the PointSample
in the training pipeline? It would cause the different numbers of points in the different samples.
Great note, I indeed missed including it. But after adding, I receive the following issue:
Traceback (most recent call last):
File "./tools/train.py", line 298, in <module>
main()
File "./tools/train.py", line 286, in main
train_model(
File "/home/ws/x/Dokumente/Repositories/dasad3d/mmdet3d/apis/train.py", line 407, in train_model
train_detector(
File "/home/ws/x/Dokumente/Repositories/dasad3d/mmdet3d/apis/train.py", line 379, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/mmcv/runner/epoch_based_runner.py", line 49, in train
for i, data_batch in enumerate(self.data_loader):
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
data = self._next_data()
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/torch/_utils.py", line 434, in reraise
raise exception
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ws/x/anaconda3/envs/das3d/lib/python3.8/site-packages/mmdet/datasets/dataset_wrappers.py", line 178, in __getitem__
return self.dataset[idx % self._ori_len]
File "/home/ws/x/Dokumente/Repositories/dasad3d/mmdet3d/datasets/custom_3d.py", line 449, in __getitem__
data = self.prepare_train_data(idx)
File "/home/ws/x/Dokumente/Repositories/dasad3d/mmdet3d/datasets/custom_3d.py", line 236, in prepare_train_data
example = self.pipeline(input_dict)
File "/home/ws/x/Dokumente/Repositories/dasad3d/mmdet3d/datasets/pipelines/compose.py", line 49, in __call__
data = t(data)
File "/home/ws/x/Dokumente/Repositories/dasad3d/mmdet3d/datasets/pipelines/transforms_3d.py", line 1166, in __call__
points, choices = self._points_random_sampling(
File "/home/ws/x/Dokumente/Repositories/dasad3d/mmdet3d/datasets/pipelines/transforms_3d.py", line 1132, in _points_random_sampling
replace = points.shape[0] < num_samples
AttributeError: 'DataContainer' object has no attribute 'shape'
@holtvogt . Maybe the position of PointSample
you added is wrong. Please refer to this:https://github.com/open-mmlab/mmdetection3d/blob/master/configs/point_rcnn/point_rcnn_2x8_kitti-3d-3classes.py#L41
Prerequisite
Task
I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.
Branch
master branch https://github.com/open-mmlab/mmdetection3d
Environment
Reproduces the problem - code sample
My 3DSSD configuration:
Reproduces the problem - error message
Additional information
The training stops immediately with the abovementioned error message as soon as I increase the batch size to greater than 1. Any ideas about what goes wrong?