YOLOX icon indicating copy to clipboard operation
YOLOX copied to clipboard

自己训练的水果分类数据集里,出现了Keyerror

Open maziyi234 opened this issue 3 years ago • 7 comments

File "/home/maziyi/python/yolox4/YOLOX/yolox/evaluators/voc_eval.py", line 139, in voc_eval R = class_recs[image_ids[d]] │ │ └ 0 │ └ ['apple_86', 'apple_86', 'apple_86', 'apple_13', 'apple_13', 'apple_95', 'apple_95', 'orange_67', 'apple_35', 'apple_95', 'ap... └ {'orange_30': {'bbox': array([], dtype=float64), 'difficult': array([], dtype=bool), 'det': []}, 'orange_67': {'bbox': array(...

KeyError: 'apple_86'

求大佬解答

maziyi234 avatar Nov 04 '21 10:11 maziyi234

I have the same problem

fellowbak avatar Nov 08 '21 19:11 fellowbak

delete the "annotations_cache" file in your datasets

qwtoe avatar Nov 15 '21 10:11 qwtoe

but i donot find the "annotations_cache" file in your datasets

ShuShuai163 avatar May 11 '22 08:05 ShuShuai163

请问您解决了吗?

ShuShuai163 avatar May 11 '22 09:05 ShuShuai163

可能的解决方法:

解决方法1:

# The PASCAL VOC metric changed in 2010
        use_07_metric = True # if int(self._year) < 2010 else False  #mask2      self._year 应该是“2012”或“2010”或 VOC 中这样的字符串。  float
        # https: // github.com / Megvii - BaseDetection / YOLOX / issues / 225

解决方法2:del annotations_cache

解决方法3:修改数据路径,改变名字

KangChou avatar Aug 21 '22 16:08 KangChou

删除数据集中的“annotations_cache”文件

thank

Iamlaoli avatar Sep 08 '22 06:09 Iamlaoli

U are my hero

niktarkon avatar Dec 10 '23 16:12 niktarkon