AILab-CVC / YOLO-World

[CVPR 2024] Real-Time Open-Vocabulary Object Detection
https://www.yoloworld.cc
GNU General Public License v3.0
4.67k stars 453 forks source link

ValueError: Key img_path is not in available keys. #350

Closed jiangsu415 closed 5 months ago

jiangsu415 commented 5 months ago

File "/root/zzy/YOLO_world/tools/train.py", line 116, in main runner.train() File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1777, in train model = self.train_loop.run() # type: ignore File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/mmengine/runner/loops.py", line 96, in run self.run_epoch() File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/mmengine/runner/loops.py", line 111, in run_epoch for idx, data_batch in enumerate(self.dataloader): File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 628, in next data = self._next_data() File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1333, in _next_data return self._process_data(data) File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1359, in _process_data data.reraise() File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/torch/_utils.py", line 543, in reraise {'img_path': '/root/zzy/dataset/coco2017/images/train2017/000000481399.jpg', 'img_id': 481399, 'seg_map_path': None, 'height': 424, 'width': 640, 'instances': [{'ignore_flag': 0, 'bbox': [115.64, 269.82, 189.42000000000002, 409.68], 'bbox_label': 56, 'mask': [[115.64, 389.86, 122.24, 269.82, 149.78, 279.73, 151.98, 311.67, 162.99, 291.84, 168.5, 288.54, 171.8, 298.45, 182.82, 311.67, 189.42, 317.17, 188.32, 337.0, 186.12, 409.68, 148.68, 396.47]]}], 'sample_idx': 82724, 'texts': [['person'], ['bicycle'], ['car'], ['motorcycle'], ['airplane'], ['bus'], ['train'], ['truck'], ['boat'], ['traffic light'], ['fire hydrant'], ['stop sign'], ['parking meter'], ['bench'], ['bird'], ['cat'], ['dog'], ['horse'], ['sheep'], ['cow'], ['elephant'], ['bear'], ['zebra'], ['giraffe'], ['backpack'], ['umbrella'], ['handbag'], ['tie'], ['suitcase'], ['frisbee'], ['skis'], ['snowboard'], ['sports ball'], ['kite'], ['baseball bat'], ['baseball glove'], ['skateboard'], ['surfboard'], ['tennis racket'], ['bottle'], ['wine glass'], ['cup'], ['fork'], ['knife'], ['spoon'], ['bowl'], ['banana'], ['apple'], ['sandwich'], ['orange'], ['broccoli'], ['carrot'], ['hot dog'], ['pizza'], ['donut'], ['cake'], ['chair'], ['couch'], ['potted plant'], ['bed'], ['dining table'], ['toilet'], ['tv'], ['laptop'], ['mouse'], ['remote'], ['keyboard'], ['cell phone'], ['microwave'], ['oven'], ['toaster'], ['sink'], ['refrigerator'], ['book'], ['clock'], ['vase'], ['scissors'], ['teddy bear'], ['hair drier'], ['toothbrush']]} raise exception ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 58, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/root/zzy/YOLO_world/yolo_world/datasets/mm_dataset.py", line 87, in getitem return self.pipeline(data_info) File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/mmengine/dataset/base_dataset.py", line 60, in call data = t(data) File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/mmcv/transforms/base.py", line 12, in call return self.transform(results) File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/mmdet/structures/bbox/box_type.py", line 267, in wrapper return func(self, results) File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/mmdet/datasets/transforms/transforms.py", line 1699, in transform results = self.aug(results) File "/root/anaconda3/envs/pytorch8/lib/python3.8/site-packages/albumentations/core/composition.py", line 247, in call self._check_args(data) File "/root/anaconda3/envs/pytorch8/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.

wondervictor commented 5 months ago

You can refer to https://github.com/AILab-CVC/YOLO-World/issues/343.

jiangsu415 commented 5 months ago

You can refer to #343.

太感谢了哥们,问题解决了

wondervictor commented 5 months ago

This issue will be closed since there is no further update related to the main topic. Besides, the error has been fixed already. Thanks for your interest. If you have any questions about YOLO-World in the future, you're welcome to open a new issue.