-
Notifications
You must be signed in to change notification settings - Fork 2.5k
IndexError: list index out of range #1182
Comments
I meet the same situation and I modify the followed file.py: substitue for all torch.bool with torch.uint8. |
@FuckThatcher I have exactly the same behavior. Changing from @Jinksi isn't this pull request #4 not exactly the otherway round as @RadiantJeral explained up here? |
You need continue to modify coco_eval.py like below: |
@maximilian-durner yeh sure is. |
🐛 Bug
Traceback (most recent call last):
File "/home/lucifer/LibSrcs/pycharm-community-2018.3.2/helpers/pydev/pydevd.py", line 1741, in
main()
File "/home/lucifer/LibSrcs/pycharm-community-2018.3.2/helpers/pydev/pydevd.py", line 1735, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/lucifer/LibSrcs/pycharm-community-2018.3.2/helpers/pydev/pydevd.py", line 1135, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/lucifer/LibSrcs/pycharm-community-2018.3.2/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/my_run/run_local/e2e_faster_rcnn_R_50_C4_1x/train_net_e2e_faster_rcnn_R_50_C4_1x.py", line 201, in
main()
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/my_run/run_local/e2e_faster_rcnn_R_50_C4_1x/train_net_e2e_faster_rcnn_R_50_C4_1x.py", line 194, in main
model = train(cfg, args.local_rank, args.distributed)
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/my_run/run_local/e2e_faster_rcnn_R_50_C4_1x/train_net_e2e_faster_rcnn_R_50_C4_1x.py", line 94, in train
arguments,
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/maskrcnn_benchmark/engine/trainer.py", line 72, in do_train
for iteration, (images, targets, _) in enumerate(data_loader, start_iter):
File "/home/lucifer/.virtualenvs/maskrcnn-benchmark/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 537, in next
return self._process_next_batch(batch)
File "/home/lucifer/.virtualenvs/maskrcnn-benchmark/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 577, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/lucifer/.virtualenvs/maskrcnn-benchmark/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/lucifer/.virtualenvs/maskrcnn-benchmark/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/lucifer/.virtualenvs/maskrcnn-benchmark/lib/python3.6/site-packages/torch/utils/data/dataset.py", line 85, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/maskrcnn_benchmark/data/datasets/coco.py", line 94, in getitem
target = target.clip_to_image(remove_empty=True)
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/maskrcnn_benchmark/structures/bounding_box.py", line 223, in clip_to_image
return self[keep]
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/maskrcnn_benchmark/structures/bounding_box.py", line 208, in getitem
bbox.add_field(k, v[item])
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/maskrcnn_benchmark/structures/segmentation_mask.py", line 555, in getitem
selected_instances = self.instances.getitem(item)
File "/home/lucifer/Projects/05_maskrcnn-benchmark/maskrcnn-benchmark/maskrcnn_benchmark/structures/segmentation_mask.py", line 464, in getitem
selected_polygons.append(self.polygons[i])
IndexError: list index out of range
To Reproduce
reproducible code:
Expected behavior
I have tried follow by #881,#1053,#725 and so on. But they seems not work for my situation.
any help is appreciated
Environment
Collecting environment information...
PyTorch version: 1.0.0.dev20190409
Is debug build: No
CUDA used to build PyTorch: 9.0.176
OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
CMake version: version 3.5.1
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce GTX 1070
Nvidia driver version: 384.130
cuDNN version: Could not collect
Versions of relevant libraries:
[pip3] numpy==1.17.4
[pip3] torch-nightly==1.0.0.dev20190409
[pip3] torchvision-nightly==0.2.3
[conda] Could not collect:
Additional context
The text was updated successfully, but these errors were encountered: