ValueError: Key img_path is not in available keys. #1008
Unanswered
gogoworker
asked this question in
Q&A
Replies: 2 comments 9 replies
-
我也遇到了同样的问题,请问你解决了马 |
Beta Was this translation helpful? Give feedback.
4 replies
-
Facing the same issue. Did anyone solve this? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I run each coco class config file, I encounter the same issue every time. I only modified the path of the coco dataset. Here are the detailed errors:
05/18 13:10:57 - mmengine - INFO - Checkpoints will be saved to /media/cs303-1/disk1/xdn/mmyolo/work_dirs/yolov8_s_syncbn_fast_8xb16-500e_coco.
Traceback (most recent call last):
File "tools/train.py", line 123, in
main()
File "tools/train.py", line 119, in main
runner.train()
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1777, in train
model = self.train_loop.run() # type: ignore
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/loops.py", line 96, in run
self.run_epoch()
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/loops.py", line 112, in run_epoch
for idx, data_batch in enumerate(self.dataloader):
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/torch/_utils.py", line 434, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/dataset/base_dataset.py", line 410, in getitem
data = self.prepare_data(idx)
File "/media/cs303-1/disk1/xdn/mmyolo/mmyolo/datasets/yolov5_coco.py", line 53, in prepare_data
return self.pipeline(data_info)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/dataset/base_dataset.py", line 60, in call
data = t(data)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmcv/transforms/base.py", line 12, in call
return self.transform(results)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmdet/structures/bbox/box_type.py", line 267, in wrapper
return func(self, results)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/mmdet/datasets/transforms/transforms.py", line 1699, in transform
results = self.aug(**results)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/albumentations/core/composition.py", line 247, in call
self._check_args(**data)
File "/home/cs303-1/miniconda3/envs/mmyolo/lib/python3.8/site-packages/albumentations/core/composition.py", line 316, in _check_args
raise ValueError(msg)
ValueError: Key img_path is not in available keys.
why?How can I resolve this issue?
Beta Was this translation helpful? Give feedback.
All reactions