Closed XLR-man closed 2 years ago
@chenyuntc
Clearly my ImageSets/Main/trainval. txt index is greater than or equal to 1, why the independence idx = 0, causing the error. I need you guys to take a look. Thank you
I printed the IDX index for each IT and encountered a 0 to report an error @chenyuntc @ZuochaoLee @GreenTeaHua
Traceback (most recent call last): File "train.py", line 130, in
fire.Fire()
File "/usr/local/lib/python3.7/dist-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/usr/local/lib/python3.7/dist-packages/fire/core.py", line 471, in _Fire
target=component.name)
File "/usr/local/lib/python3.7/dist-packages/fire/core.py", line 681, in CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "train.py", line 76, in train
for ii, (img, bbox, label_, scale) in tqdm(enumerate(dataloader)):
File "/usr/local/lib/python3.7/dist-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 530, in next
data = self._next_data()
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 570, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/simple-faster-rcnn-pytorch/data/dataset.py", line 108, in getitem
ori_img, bbox, label, difficult = self.db.get_example(idx)
File "/content/simple-faster-rcnn-pytorch/data/voc_dataset.py", line 121, in get_example
label.append(VOC_BBOX_LABEL_NAMES.index(name))
ValueError: substring not found
What can i do to avoid this problem?Thanks for your suggestion.