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

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

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

roidb[i]['image'] = imdb.image_path_at(i)

I thought this may be caused by the cache file, you can delete the specific cache files for your training data under the folder fast-rcnn-master/data/cache/, and try again

然后自己就清理了第一次运行产生的cache,然后程序就可以正常运行了。

 一定要清理第一次运行的时候 cache.

猜你喜欢

转载自blog.csdn.net/zhuoyuezai/article/details/84101521
今日推荐