使用自己制作的coco格式的数据,训练时候遇到的问题+roidb[0]['dataset'].classes IndexError: list index out of range

在使用自定义COCO格式数据训练时遇到'list index out of range'错误,主要可能由数据结构不完整、roidb为空、'area'项为0等原因引起。检查数据结构中的segmentation、area等字段,确保与COCO标准一致,清理缓存文件,并确保'area'值非零,以避免此类错误。
摘要由CSDN通过智能技术生成

File "/home1/Detectron/lib/datasets/roidb.py", line 71, in combined_roidb_for_training_compute_and_log_stats(roidb)
File "/home1/Detectron/lib/datasets/roidb.py", line 181, in _compute_and_log_stats classes = roidb[0]['dataset'].classes
IndexError: list index out of range

i, I have got same issue and figured it out. The reason was my own data structure's segmentation was wrong. So if you get this issue make sure your own data has same structure as coco.


it more likely the roidb is an empty list, when you read the roidb.py you can see if you miss some information like segmentation , area and so on it would not fill data to the list of roidb

根据上面的回答,查看了一下自己的相关数据项,发现少了一些,添加上去之后,运行的时候还出现同样的问题.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值