Ssd.pytorch: one problem with my own dataset

Created on 9 May 2019  ·  4Comments  ·  Source: amdegroot/ssd.pytorch

when i use my dataset, i have the problem
KeyError: 'Traceback (most recent call last):\n File "C:\Program Files\Anaconda3\lib\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 "C:\Program Files\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 138, in \n samples = collate_fn([dataset[i] for i in batch_indices])\n File "F:\pychqarmtestdemo\ssd.pytorch-master\data\voc0712.py", line 126, in getitem\n im, gt, h, w = self.pull_item(index)\n File "F:\pychqarmtestdemo\ssd.pytorch-master\data\voc0712.py", line 141, in pull_item\n target = self.target_transform(target, width, height)\n File "F:\pychqarmtestdemo\ssd.pytorch-master\data\voc0712.py", line 83, in call\n label_idx = self.class_to_ind[name]\nKeyError: 'feng'\n
feng is the lable name

Do you know how to fix it?

Most helpful comment

you can use VOC_CLASSES = [(
'feng')] instead

All 4 comments

you can use VOC_CLASSES = [(
'feng')] instead

you can use VOC_CLASSES = [(
'feng')] instead

How to add multiple categories?

you can use VOC_CLASSES = [(
'feng')] instead

How to add multiple categories?

may be VOC_CLASSES = [('feng','yu')]

对,在后面加标签名就行发自我的华为手机-------- 原始邮件 --------发件人: 岑朝君 notifications@github.com日期: 2020年3月24日周二 下午4:37收件人: "amdegroot/ssd.pytorch" ssd.pytorch@noreply.github.com抄送: sxyxf66 13269273379@163.com, Author author@noreply.github.com主 题: Re: [amdegroot/ssd.pytorch] one problem with my own dataset (#345)

you can use VOC_CLASSES = [(

'feng')] instead

How to add multiple categories?

may be VOC_CLASSES = [('feng','yu')]

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MakeToast picture MakeToast  ·  3Comments

oarriaga picture oarriaga  ·  4Comments

isalirezag picture isalirezag  ·  5Comments

bassyess picture bassyess  ·  5Comments

lmingyin picture lmingyin  ·  5Comments