解决办法:将data/voc0712.py中的VOC_CLASSES = ('aeroplane')改为VOC_CLASSES = ('aeroplane',)
SSD算法检测单类别报错:label_idx = self.class_to_ind[name] KeyError: ‘aeroplane‘
最新推荐文章于 2024-02-26 17:36:10 发布
文章讨论了在使用PyTorch的数据加载器时遇到KeyError的问题,原因是在VOC_CLASSES定义中缺少逗号。解决方法是修正VOC_CLASSES变量的语法,将其从VOC_CLASSES=aeroplane改为VOC_CLASSES=(aeroplane,)。
1314

被折叠的 条评论
为什么被折叠?



