An issue on re-implementation with COCO2017 dataset
rose-jinyang opened this issue · comments
Hello
How are you?
Thanks for contributing this project.
I have searched related issues but cannot get the expected help.
The bug has not been fixed in the latest version.
I cloned the latest version of this project and tried to train a model with COCO2017 dataset.
I used the following command.
python tools/train.py configs/DetectoRS/DetectoRS_mstrain_400_1200_r50_40e.py
I did not modify your code.
My environment is following.
I installed Pytorch 1.4.0 with conda command.
The environment variables are following.
The issue track is following:
Traceback (most recent call last):
File "tools/train.py", line 142, in
main()
File "tools/train.py", line 138, in main
meta=meta)
File "/mnt/Jin/DetectoRS/mmdet/apis/train.py", line 111, in train_detector
meta=meta)
File "/mnt/Jin/DetectoRS/mmdet/apis/train.py", line 242, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 122, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 27, in train
for i, data_batch in enumerate(data_loader):
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 856, in _next_dat
return self._process_data(data)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 881, in process
data.reraise()
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/_utils.py", line 394, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worke
data = fetcher.fetch(index)
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/vishwam/anaconda3/envs/py37/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcom
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/mnt/Jin/DetectoRS/mmdet/datasets/custom.py", line 132, in getitem
data = self.prepare_train_img(idx)
File "/mnt/Jin/DetectoRS/mmdet/datasets/custom.py", line 145, in prepare_train_img
return self.pipeline(results)
File "/mnt/Jin/DetectoRS/mmdet/datasets/pipelines/compose.py", line 24, in call
data = t(data)
File "/mnt/Jin/DetectoRS/mmdet/datasets/pipelines/transforms.py", line 323, in call
self._pad_masks(results)
File "/mnt/Jin/DetectoRS/mmdet/datasets/pipelines/transforms.py", line 310, in _pad_masks
for mask in results[key]
File "/mnt/Jin/DetectoRS/mmdet/datasets/pipelines/transforms.py", line 310, in
for mask in results[key]
TypeError: impad() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given
Please let me know the reason of this issue asap.
Thanks
It seems to be a dependency issue. Please consider using the implementation of DetectoRS provided by MMDetection if the problem is not resolved after checking conda_env.md.