-
Notifications
You must be signed in to change notification settings - Fork 123
Description
I am using a custom COCO-type dataset. The classes and everything are updated, and in my log file, it can pick up my dataset and divide it according to the N-way K-shot specs I defined. But at the end, I'm getting this error. What could be the possible reason?
Traceback (most recent call last):
File "tools/detection/train.py", line 236, in
main()
File "tools/detection/train.py", line 225, in main
train_detector(
File "c:\projects\imad-gohar\mmfewshot-main\mmfewshot\detection\apis\train.py", line 206, in train_detector
runner.run(data_loaders, cfg.workflow)
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\mmcv\runner\iter_based_runner.py", line 134, in run
iter_runner(iter_loaders[i], **kwargs)
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\mmcv\runner\iter_based_runner.py", line 59, in train
data_batch = next(data_loader)
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\mmcv\runner\iter_based_runner.py", line 32, in next
data = next(self.iter_loader)
File "c:\projects\imad-gohar\mmfewshot-main\mmfewshot\detection\datasets\dataloader_wrappers.py", line 35, in next
support_data = self.support_iter.next()
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next
data = self._next_data()
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\torch\utils\data\dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\torch\utils\data\dataloader.py", line 1229, in _process_data
data.reraise()
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\torch_utils.py", line 434, in reraise
raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\torch\utils\data_utils\worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "c:\projects\imad-gohar\mmfewshot-main\mmfewshot\detection\datasets\dataset_wrappers.py", line 350, in getitem
batch_data = [
File "c:\projects\imad-gohar\mmfewshot-main\mmfewshot\detection\datasets\dataset_wrappers.py", line 351, in
self.support_dataset.prepare_train_img(idx, 'support',
File "c:\projects\imad-gohar\mmfewshot-main\mmfewshot\detection\datasets\base.py", line 328, in prepare_train_img
return self.multi_pipelinespipeline_key
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\mmdet\datasets\pipelines\compose.py", line 41, in call
data = t(data)
File "C:\Anaconda3\envs\mmfewshot_env\lib\site-packages\mmdet\datasets\pipelines\loading.py", line 61, in call
if results['img_prefix'] is not None:
KeyError: 'img_prefix'