ssd.pytorch icon indicating copy to clipboard operation
ssd.pytorch copied to clipboard

line 83, in __call__\n label_idx = self.class_to_ind[name]\nKeyError:

Open sxyxf66 opened this issue 5 years ago • 11 comments

sxyxf66 avatar May 08 '19 08:05 sxyxf66

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

sxyxf66 avatar May 08 '19 08:05 sxyxf66

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

LeiGan0215 avatar May 13 '19 12:05 LeiGan0215

I have the same question,do you solve it? and how?

liujiale1234 avatar Oct 24 '19 13:10 liujiale1234

您可以改用VOC_CLASSES = [( 'feng')] it doesnt work

liujiale1234 avatar Oct 24 '19 13:10 liujiale1234

您可以改用VOC_CLASSES = [( 'feng')] it doesnt work

您好!我遇到了同样的问题,您解决了吗?可以探讨一下!

zeroorhero avatar Feb 07 '20 00:02 zeroorhero

没有()发自我的华为手机-------- 原始邮件 --------发件人: zeroorhero [email protected]日期: 2020年2月7日周五 早上8:49收件人: "amdegroot/ssd.pytorch" [email protected]抄送: sxyxf66 [email protected], Author [email protected]主 题: Re: [amdegroot/ssd.pytorch] line 83, in call\n label_idx = self.class_to_ind[name]\nKeyError: (#343)

您可以改用VOC_CLASSES = [(

'feng')]

it doesnt work

您好!我遇到了同样的问题,您解决了吗?可以探讨一下!

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

sxyxf66 avatar Feb 10 '20 02:02 sxyxf66

没有()发自我的华为手机-------- 原始邮件 --------发件人: zeroorhero [email protected]日期: 2020年2月7日周五 早上8:49收件人: "amdegroot/ssd.pytorch" [email protected]抄送: sxyxf66 [email protected], Author [email protected]主 题: Re: [amdegroot/ssd.pytorch] line 83, in call\n label_idx = self.class_to_ind[name]\nKeyError: (#343) 您可以改用VOC_CLASSES = [( 'feng')] it doesnt work 您好!我遇到了同样的问题,您解决了吗?可以探讨一下! —You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

作者您好,遇到了一样的问题,请问你们解决了吗之前

calvin886 avatar Feb 03 '21 10:02 calvin886

Hello, i'm facing the same issue and i dont know how to do i tried many things =(

AntoineGerardeaux avatar Jul 21 '21 13:07 AntoineGerardeaux

Hello, anyone solved this issue? LeiGan's comment didn't work for me.

cnr0724 avatar Aug 03 '21 07:08 cnr0724

Hello, anyone solved this issue? LeiGan's comment didn't work for me.

Hello, you may try this when you define your classes : YOUR_CLASSES = [('Label_1') , ('Label_2') , ('Label_3') ]

AntoineGerardeaux avatar Aug 03 '21 12:08 AntoineGerardeaux

Hello, you also must also upgrade coco_classes.py like voc_classes.py

MehmetZahidGenc avatar Sep 09 '22 09:09 MehmetZahidGenc