CenterNet训练报错KeyError: ‘Traceback (most recent call last):\n File “/home/em/anaconda3/lib/python3.5

错误描述:

KeyError: 'Traceback (most recent call last):\n  File "/home/em/anaconda3/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 138, in _worker_loop\n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/home/em/anaconda3/lib/python3.5/site-packages/torch/utils/data/dataloader.py", line 138, in \n    samples = collate_fn([dataset[i] for i in batch_indices])\n  File "/home/data_1/project/big-obj/CenterNet/src/lib/datasets/sample/ctdet.py", line 102, in __getitem__\n    cls_id = int(self.cat_ids[ann[\'category_id\']])\nKeyError: 12\n'
原因:直接使用了coco.py修改自己的数据集,coco.py中少了12.

CenterNet训练报错KeyError: ‘Traceback (most recent call last):\n File “/home/em/anaconda3/lib/python3.5_第1张图片

无语..........................................................

你可能感兴趣的:(pytorch,图像处理)