Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练自定义数据集时出了个错 #19

Open
MrAccelerator opened this issue Nov 6, 2022 · 0 comments
Open

训练自定义数据集时出了个错 #19

MrAccelerator opened this issue Nov 6, 2022 · 0 comments

Comments

@MrAccelerator
Copy link

An error has been caught in function 'launch', process 'MainProcess' (5932), t
hread 'MainThread' (20804):
Traceback (most recent call last):

File "tools\train.py", line 137, in
launch(
└ <function launch at 0x0000022C3AC6AAF0>

File "D:\YoLo\miemiedetection-main\mmdet\core\launch.py", line 98, in launch
main_func(*args)
│ └ (╒═══════════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════
════════...
└ <function main at 0x0000022C3AC6AE50>

File "tools\train.py", line 115, in main
trainer.train()
│ └ <function Trainer.train at 0x0000022C3D390430>
└ <mmdet.core.trainer.Trainer object at 0x0000022C3D421880>

File "D:\YoLo\miemiedetection-main\mmdet\core\trainer.py", line 101, in train
self.before_train()
│ └ <function Trainer.before_train at 0x0000022C3D3909D0>
└ <mmdet.core.trainer.Trainer object at 0x0000022C3D421880>

File "D:\YoLo\miemiedetection-main\mmdet\core\trainer.py", line 504, in before_train
self.train_loader = self.exp.get_data_loader(
│ │ │ └ <function PPYOLOE_Method_Exp.get_data_loader at 0x0000022C3D3F8B80>
│ │ └ ╒═══════════════════════╤══════════════════════════════════════════════════════════════════════════════
══════════════════════...
│ └ <mmdet.core.trainer.Trainer object at 0x0000022C3D421880>
└ <mmdet.core.trainer.Trainer object at 0x0000022C3D421880>

File "D:\YoLo\miemiedetection-main\mmdet\exp\ppyoloe\ppyoloe_method_base.py", line 260, in get_data_loader
train_dataset = PPYOLOE_COCOTrainDataset(
└ <class 'mmdet.data.datasets.coco.PPYOLOE_COCOTrainDataset'>

File "D:\YoLo\miemiedetection-main\mmdet\data\datasets\coco.py", line 780, in init
train_records = data_clean(train_dataset, train_img_ids, _catid2clsid, train_pre_path, 'train', xy_plus_1=True)
│ │ │ │ └ 'datasets\Go_Black_White_COCO/train2017'
│ │ │ └ {0: 0, 1: 1, 2: 2, 3: 3}
│ │ └ ['000001', '000002', '000004', '000005', '000006', '000007', '000008', '000009', '0000
10', '000011', '000012', '000013', '000...
│ └ <pycocotools.coco.COCO object at 0x0000022C3D5233D0>
└ <function data_clean at 0x0000022C3C6B28B0>

File "D:\YoLo\miemiedetection-main\mmdet\data\datasets\coco.py", line 229, in data_clean
img_anno = coco.loadImgs(img_id)[0]
│ │ └ '000001'
│ └ <function COCO.loadImgs at 0x0000022C3D39A3A0>
└ <pycocotools.coco.COCO object at 0x0000022C3D5233D0>

File "D:\Anaconda3\lib\site-packages\pycocotools\coco.py", line 229, in loadImgs
return [self.imgs[id] for id in ids]
│ │ └ '000001'
│ └ {'000001': {'file_name': '000001.jpg', 'height': 640, 'width': 640, 'id': '000001'}, '000002': {'file_name': '00000
2.jpg', 'h...
└ <pycocotools.coco.COCO object at 0x0000022C3D5233D0>

File "D:\Anaconda3\lib\site-packages\pycocotools\coco.py", line 229, in
return [self.imgs[id] for id in ids]
│ │ │ └ '0'
│ │ └ '0'
│ └ {'000001': {'file_name': '000001.jpg', 'height': 640, 'width': 640, 'id': '000001'}, '000002': {'file_name': '00000
2.jpg', 'h...
└ <pycocotools.coco.COCO object at 0x0000022C3D5233D0>

KeyError: '0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant