huanglianghua/GlobalTrack

list index out of range

Closed this issue · 3 comments

I follow Non-distributed training to train all dataset. but when some time, the programe will interrupt. The question is IndexError: list index out of range. Can you tell me how to solve this question? Is the dataset is something wrong? @huanglianghua Thank you very much

@wangaixue Hi, can you provide more details on the reported error? For example, at which line of the code the running stopped?

@huanglianghua the question like this
File "tools/train_qg_rcnn.py", line 103, in
main()
File "tools/train_qg_rcnn.py", line 99, in main
logger=logger)
File "_submodules/mmdetection/mmdet/apis/train.py", line 62, in train_detector
_non_dist_train(model, dataset, cfg, validate=validate)
File "_submodules/mmdetection/mmdet/apis/train.py", line 229, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/mmcv/runner/runner.py", line 358, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/mmcv/runner/runner.py", line 260, in train
for i, data_batch in enumerate(data_loader):
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/wyc/anaconda3/envs/globaltrack/lib/python3.7/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/wyc/anaconda3/envs/globaltrack/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/wyc/GlobalTrack/datasets/wrappers.py", line 76, in getitem
item = self.base_dataset[index]
File "_submodules/neuron/neuron/data/datasets/structure.py", line 395, in getitem
return dataset[index]
File "_submodules/neuron/neuron/data/datasets/structure.py", line 79, in getitem
img_x = ops.read_image(img_files[rand_x])
IndexError: list index out of range
I guess the rand_x is out the image_file? Can you help me? very thank you

@huanglianghua I also find this question when i only use the got-10k to train.