yqyao/FCOS_PLUS

'list' object has no attribute 'resize'???

sweetTT opened this issue · 1 comments

Traceback (most recent call last):
File "tools/train_net.py", line 182, in
main()
File "tools/train_net.py", line 175, in main
model = train(cfg, args.local_rank, args.distributed)
File "tools/train_net.py", line 81, in train
arguments,
File "/home/data/TeddyZhang/nothing/FCOS_PLUS/maskrcnn_benchmark/engine/trainer.py", line 57, in do_train
for iteration, (images, targets, _) in enumerate(data_loader, start_iter):
File "/home/t704/Software/anaconda3/envs/Detectron/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next
return self._process_data(data)
File "/home/t704/Software/anaconda3/envs/Detectron/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
data.reraise()
File "/home/t704/Software/anaconda3/envs/Detectron/lib/python3.7/site-packages/torch/_utils.py", line 385, in reraise
raise self.exc_type(msg)
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/t704/Software/anaconda3/envs/Detectron/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/t704/Software/anaconda3/envs/Detectron/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/t704/Software/anaconda3/envs/Detectron/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/data/TeddyZhang/nothing/FCOS_PLUS/maskrcnn_benchmark/data/datasets/coco.py", line 67, in getitem
img, anno = super(COCODataset, self).getitem(idx)
File "/home/t704/Software/anaconda3/envs/Detectron/lib/python3.7/site-packages/torchvision/datasets/coco.py", line 118, in getitem
img, target = self.transforms(img, target)
File "/home/data/TeddyZhang/nothing/FCOS_PLUS/maskrcnn_benchmark/data/transforms/transforms.py", line 15, in call
image, target = t(image, target)
File "/home/data/TeddyZhang/nothing/FCOS_PLUS/maskrcnn_benchmark/data/transforms/transforms.py", line 60, in call
target = target.resize(image.size)
AttributeError: 'list' object has no attribute 'resize'

how to set the dataset ?? i set it by using maskrcnn-benchmark version... please help me !!

ooh, i know it, it's torchvision problem, by following command:
pip uninstall torchvision
pip install torchvision==0.2.1